mermaid.core.js 440 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106
  1. (function webpackUniversalModuleDefinition(root, factory) {
  2. if(typeof exports === 'object' && typeof module === 'object')
  3. module.exports = factory();
  4. else if(typeof define === 'function' && define.amd)
  5. define([], factory);
  6. else if(typeof exports === 'object')
  7. exports["mermaid"] = factory();
  8. else
  9. root["mermaid"] = factory();
  10. })(window, function() {
  11. return /******/ (function(modules) { // webpackBootstrap
  12. /******/ // The module cache
  13. /******/ var installedModules = {};
  14. /******/
  15. /******/ // The require function
  16. /******/ function __webpack_require__(moduleId) {
  17. /******/
  18. /******/ // Check if module is in cache
  19. /******/ if(installedModules[moduleId]) {
  20. /******/ return installedModules[moduleId].exports;
  21. /******/ }
  22. /******/ // Create a new module (and put it into the cache)
  23. /******/ var module = installedModules[moduleId] = {
  24. /******/ i: moduleId,
  25. /******/ l: false,
  26. /******/ exports: {}
  27. /******/ };
  28. /******/
  29. /******/ // Execute the module function
  30. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  31. /******/
  32. /******/ // Flag the module as loaded
  33. /******/ module.l = true;
  34. /******/
  35. /******/ // Return the exports of the module
  36. /******/ return module.exports;
  37. /******/ }
  38. /******/
  39. /******/
  40. /******/ // expose the modules object (__webpack_modules__)
  41. /******/ __webpack_require__.m = modules;
  42. /******/
  43. /******/ // expose the module cache
  44. /******/ __webpack_require__.c = installedModules;
  45. /******/
  46. /******/ // define getter function for harmony exports
  47. /******/ __webpack_require__.d = function(exports, name, getter) {
  48. /******/ if(!__webpack_require__.o(exports, name)) {
  49. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  50. /******/ }
  51. /******/ };
  52. /******/
  53. /******/ // define __esModule on exports
  54. /******/ __webpack_require__.r = function(exports) {
  55. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  56. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  57. /******/ }
  58. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  59. /******/ };
  60. /******/
  61. /******/ // create a fake namespace object
  62. /******/ // mode & 1: value is a module id, require it
  63. /******/ // mode & 2: merge all properties of value into the ns
  64. /******/ // mode & 4: return value when already ns object
  65. /******/ // mode & 8|1: behave like require
  66. /******/ __webpack_require__.t = function(value, mode) {
  67. /******/ if(mode & 1) value = __webpack_require__(value);
  68. /******/ if(mode & 8) return value;
  69. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  70. /******/ var ns = Object.create(null);
  71. /******/ __webpack_require__.r(ns);
  72. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  73. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  74. /******/ return ns;
  75. /******/ };
  76. /******/
  77. /******/ // getDefaultExport function for compatibility with non-harmony modules
  78. /******/ __webpack_require__.n = function(module) {
  79. /******/ var getter = module && module.__esModule ?
  80. /******/ function getDefault() { return module['default']; } :
  81. /******/ function getModuleExports() { return module; };
  82. /******/ __webpack_require__.d(getter, 'a', getter);
  83. /******/ return getter;
  84. /******/ };
  85. /******/
  86. /******/ // Object.prototype.hasOwnProperty.call
  87. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  88. /******/
  89. /******/ // __webpack_public_path__
  90. /******/ __webpack_require__.p = "";
  91. /******/
  92. /******/
  93. /******/ // Load entry module and return exports
  94. /******/ return __webpack_require__(__webpack_require__.s = "./src/mermaid.js");
  95. /******/ })
  96. /************************************************************************/
  97. /******/ ({
  98. /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/dark/index.scss":
  99. /*!*******************************************************************************************************************!*\
  100. !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/dark/index.scss ***!
  101. \*******************************************************************************************************************/
  102. /*! no static exports found */
  103. /***/ (function(module, exports, __webpack_require__) {
  104. exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
  105. // Module
  106. exports.push([module.i, "/* Flowchart variables */\n/* Sequence Diagram variables */\n/* Gantt chart variables */\n.label {\n font-family: 'trebuchet ms', verdana, arial;\n color: #333; }\n\n.label text {\n fill: #333; }\n\n.node rect,\n.node circle,\n.node ellipse,\n.node polygon {\n fill: #BDD5EA;\n stroke: purple;\n stroke-width: 1px; }\n\n.node.clickable {\n cursor: pointer; }\n\n.arrowheadPath {\n fill: lightgrey; }\n\n.edgePath .path {\n stroke: lightgrey;\n stroke-width: 1.5px; }\n\n.edgeLabel {\n background-color: #e8e8e8; }\n\n.cluster rect {\n fill: #6D6D65;\n stroke: rgba(255, 255, 255, 0.25);\n stroke-width: 1px; }\n\n.cluster text {\n fill: #F9FFFE; }\n\ndiv.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 12px;\n background: #6D6D65;\n border: 1px solid rgba(255, 255, 255, 0.25);\n border-radius: 2px;\n pointer-events: none;\n z-index: 100; }\n\n.actor {\n stroke: #81B1DB;\n fill: #BDD5EA; }\n\ntext.actor {\n fill: black;\n stroke: none; }\n\n.actor-line {\n stroke: lightgrey; }\n\n.messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: lightgrey; }\n\n.messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: lightgrey; }\n\n#arrowhead {\n fill: lightgrey; }\n\n.sequenceNumber {\n fill: white; }\n\n#sequencenumber {\n fill: lightgrey; }\n\n#crosshead path {\n fill: lightgrey !important;\n stroke: lightgrey !important; }\n\n.messageText {\n fill: lightgrey;\n stroke: none; }\n\n.labelBox {\n stroke: #81B1DB;\n fill: #BDD5EA; }\n\n.labelText {\n fill: #323D47;\n stroke: none; }\n\n.loopText {\n fill: lightgrey;\n stroke: none; }\n\n.loopLine {\n stroke-width: 2;\n stroke-dasharray: '2 2';\n stroke: #81B1DB; }\n\n.note {\n stroke: rgba(255, 255, 255, 0.25);\n fill: #fff5ad; }\n\n.noteText {\n fill: black;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 14px; }\n\n.activation0 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation1 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation2 {\n fill: #f4f4f4;\n stroke: #666; }\n\n/** Section styling */\n.section {\n stroke: none;\n opacity: 0.2; }\n\n.section0 {\n fill: rgba(255, 255, 255, 0.3); }\n\n.section2 {\n fill: #EAE8B9; }\n\n.section1,\n.section3 {\n fill: white;\n opacity: 0.2; }\n\n.sectionTitle0 {\n fill: #F9FFFE; }\n\n.sectionTitle1 {\n fill: #F9FFFE; }\n\n.sectionTitle2 {\n fill: #F9FFFE; }\n\n.sectionTitle3 {\n fill: #F9FFFE; }\n\n.sectionTitle {\n text-anchor: start;\n font-size: 11px;\n text-height: 14px; }\n\n/* Grid and axis */\n.grid .tick {\n stroke: lightgrey;\n opacity: 0.3;\n shape-rendering: crispEdges; }\n\n.grid path {\n stroke-width: 0; }\n\n/* Today line */\n.today {\n fill: none;\n stroke: #DB5757;\n stroke-width: 2px; }\n\n/* Task styling */\n/* Default task */\n.task {\n stroke-width: 2; }\n\n.taskText {\n text-anchor: middle;\n font-size: 11px; }\n\n.taskTextOutsideRight {\n fill: #323D47;\n text-anchor: start;\n font-size: 11px; }\n\n.taskTextOutsideLeft {\n fill: #323D47;\n text-anchor: end;\n font-size: 11px; }\n\n/* Special case clickable */\n.task.clickable {\n cursor: pointer; }\n\n.taskText.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n/* Specific task settings for the sections*/\n.taskText0,\n.taskText1,\n.taskText2,\n.taskText3 {\n fill: #323D47; }\n\n.task0,\n.task1,\n.task2,\n.task3 {\n fill: #BDD5EA;\n stroke: rgba(255, 255, 255, 0.5); }\n\n.taskTextOutside0,\n.taskTextOutside2 {\n fill: lightgrey; }\n\n.taskTextOutside1,\n.taskTextOutside3 {\n fill: lightgrey; }\n\n/* Active task */\n.active0,\n.active1,\n.active2,\n.active3 {\n fill: #81B1DB;\n stroke: rgba(255, 255, 255, 0.5); }\n\n.activeText0,\n.activeText1,\n.activeText2,\n.activeText3 {\n fill: #323D47 !important; }\n\n/* Completed task */\n.done0,\n.done1,\n.done2,\n.done3 {\n stroke: grey;\n fill: lightgrey;\n stroke-width: 2; }\n\n.doneText0,\n.doneText1,\n.doneText2,\n.doneText3 {\n fill: #323D47 !important; }\n\n/* Tasks on the critical line */\n.crit0,\n.crit1,\n.crit2,\n.crit3 {\n stroke: #E83737;\n fill: #E83737;\n stroke-width: 2; }\n\n.activeCrit0,\n.activeCrit1,\n.activeCrit2,\n.activeCrit3 {\n stroke: #E83737;\n fill: #81B1DB;\n stroke-width: 2; }\n\n.doneCrit0,\n.doneCrit1,\n.doneCrit2,\n.doneCrit3 {\n stroke: #E83737;\n fill: lightgrey;\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges; }\n\n.milestone {\n transform: rotate(45deg) scale(0.8, 0.8); }\n\n.milestoneText {\n font-style: italic; }\n\n.doneCritText0,\n.doneCritText1,\n.doneCritText2,\n.doneCritText3 {\n fill: #323D47 !important; }\n\n.activeCritText0,\n.activeCritText1,\n.activeCritText2,\n.activeCritText3 {\n fill: #323D47 !important; }\n\n.titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: #323D47; }\n\ng.classGroup text {\n fill: purple;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 10px; }\n\ng.classGroup rect {\n fill: #BDD5EA;\n stroke: purple; }\n\ng.classGroup line {\n stroke: purple;\n stroke-width: 1; }\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #BDD5EA;\n opacity: 0.5; }\n\n.classLabel .label {\n fill: purple;\n font-size: 10px; }\n\n.relation {\n stroke: purple;\n stroke-width: 1;\n fill: none; }\n\n#compositionStart {\n fill: purple;\n stroke: purple;\n stroke-width: 1; }\n\n#compositionEnd {\n fill: purple;\n stroke: purple;\n stroke-width: 1; }\n\n#aggregationStart {\n fill: #BDD5EA;\n stroke: purple;\n stroke-width: 1; }\n\n#aggregationEnd {\n fill: #BDD5EA;\n stroke: purple;\n stroke-width: 1; }\n\n#dependencyStart {\n fill: purple;\n stroke: purple;\n stroke-width: 1; }\n\n#dependencyEnd {\n fill: purple;\n stroke: purple;\n stroke-width: 1; }\n\n#extensionStart {\n fill: purple;\n stroke: purple;\n stroke-width: 1; }\n\n#extensionEnd {\n fill: purple;\n stroke: purple;\n stroke-width: 1; }\n\n.commit-id,\n.commit-msg,\n.branch-label {\n fill: lightgrey;\n color: lightgrey; }\n", ""]);
  107. /***/ }),
  108. /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/default/index.scss":
  109. /*!**********************************************************************************************************************!*\
  110. !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/default/index.scss ***!
  111. \**********************************************************************************************************************/
  112. /*! no static exports found */
  113. /***/ (function(module, exports, __webpack_require__) {
  114. exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
  115. // Module
  116. exports.push([module.i, "/* Flowchart variables */\n/* Sequence Diagram variables */\n/* Gantt chart variables */\n.label {\n font-family: 'trebuchet ms', verdana, arial;\n color: #333; }\n\n.label text {\n fill: #333; }\n\n.node rect,\n.node circle,\n.node ellipse,\n.node polygon {\n fill: #ECECFF;\n stroke: #9370DB;\n stroke-width: 1px; }\n\n.node.clickable {\n cursor: pointer; }\n\n.arrowheadPath {\n fill: #333333; }\n\n.edgePath .path {\n stroke: #333333;\n stroke-width: 1.5px; }\n\n.edgeLabel {\n background-color: #e8e8e8; }\n\n.cluster rect {\n fill: #ffffde;\n stroke: #aaaa33;\n stroke-width: 1px; }\n\n.cluster text {\n fill: #333; }\n\ndiv.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 12px;\n background: #ffffde;\n border: 1px solid #aaaa33;\n border-radius: 2px;\n pointer-events: none;\n z-index: 100; }\n\n.actor {\n stroke: #CCCCFF;\n fill: #ECECFF; }\n\ntext.actor {\n fill: black;\n stroke: none; }\n\n.actor-line {\n stroke: grey; }\n\n.messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: #333; }\n\n.messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: #333; }\n\n#arrowhead {\n fill: #333; }\n\n.sequenceNumber {\n fill: white; }\n\n#sequencenumber {\n fill: #333; }\n\n#crosshead path {\n fill: #333 !important;\n stroke: #333 !important; }\n\n.messageText {\n fill: #333;\n stroke: none; }\n\n.labelBox {\n stroke: #CCCCFF;\n fill: #ECECFF; }\n\n.labelText {\n fill: black;\n stroke: none; }\n\n.loopText {\n fill: black;\n stroke: none; }\n\n.loopLine {\n stroke-width: 2;\n stroke-dasharray: '2 2';\n stroke: #CCCCFF; }\n\n.note {\n stroke: #aaaa33;\n fill: #fff5ad; }\n\n.noteText {\n fill: black;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 14px; }\n\n.activation0 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation1 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation2 {\n fill: #f4f4f4;\n stroke: #666; }\n\n/** Section styling */\n.section {\n stroke: none;\n opacity: 0.2; }\n\n.section0 {\n fill: rgba(102, 102, 255, 0.49); }\n\n.section2 {\n fill: #fff400; }\n\n.section1,\n.section3 {\n fill: white;\n opacity: 0.2; }\n\n.sectionTitle0 {\n fill: #333; }\n\n.sectionTitle1 {\n fill: #333; }\n\n.sectionTitle2 {\n fill: #333; }\n\n.sectionTitle3 {\n fill: #333; }\n\n.sectionTitle {\n text-anchor: start;\n font-size: 11px;\n text-height: 14px; }\n\n/* Grid and axis */\n.grid .tick {\n stroke: lightgrey;\n opacity: 0.3;\n shape-rendering: crispEdges; }\n\n.grid path {\n stroke-width: 0; }\n\n/* Today line */\n.today {\n fill: none;\n stroke: red;\n stroke-width: 2px; }\n\n/* Task styling */\n/* Default task */\n.task {\n stroke-width: 2; }\n\n.taskText {\n text-anchor: middle;\n font-size: 11px; }\n\n.taskTextOutsideRight {\n fill: black;\n text-anchor: start;\n font-size: 11px; }\n\n.taskTextOutsideLeft {\n fill: black;\n text-anchor: end;\n font-size: 11px; }\n\n/* Special case clickable */\n.task.clickable {\n cursor: pointer; }\n\n.taskText.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n/* Specific task settings for the sections*/\n.taskText0,\n.taskText1,\n.taskText2,\n.taskText3 {\n fill: white; }\n\n.task0,\n.task1,\n.task2,\n.task3 {\n fill: #8a90dd;\n stroke: #534fbc; }\n\n.taskTextOutside0,\n.taskTextOutside2 {\n fill: black; }\n\n.taskTextOutside1,\n.taskTextOutside3 {\n fill: black; }\n\n/* Active task */\n.active0,\n.active1,\n.active2,\n.active3 {\n fill: #bfc7ff;\n stroke: #534fbc; }\n\n.activeText0,\n.activeText1,\n.activeText2,\n.activeText3 {\n fill: black !important; }\n\n/* Completed task */\n.done0,\n.done1,\n.done2,\n.done3 {\n stroke: grey;\n fill: lightgrey;\n stroke-width: 2; }\n\n.doneText0,\n.doneText1,\n.doneText2,\n.doneText3 {\n fill: black !important; }\n\n/* Tasks on the critical line */\n.crit0,\n.crit1,\n.crit2,\n.crit3 {\n stroke: #ff8888;\n fill: red;\n stroke-width: 2; }\n\n.activeCrit0,\n.activeCrit1,\n.activeCrit2,\n.activeCrit3 {\n stroke: #ff8888;\n fill: #bfc7ff;\n stroke-width: 2; }\n\n.doneCrit0,\n.doneCrit1,\n.doneCrit2,\n.doneCrit3 {\n stroke: #ff8888;\n fill: lightgrey;\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges; }\n\n.milestone {\n transform: rotate(45deg) scale(0.8, 0.8); }\n\n.milestoneText {\n font-style: italic; }\n\n.doneCritText0,\n.doneCritText1,\n.doneCritText2,\n.doneCritText3 {\n fill: black !important; }\n\n.activeCritText0,\n.activeCritText1,\n.activeCritText2,\n.activeCritText3 {\n fill: black !important; }\n\n.titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: black; }\n\ng.classGroup text {\n fill: #9370DB;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 10px; }\n\ng.classGroup rect {\n fill: #ECECFF;\n stroke: #9370DB; }\n\ng.classGroup line {\n stroke: #9370DB;\n stroke-width: 1; }\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #ECECFF;\n opacity: 0.5; }\n\n.classLabel .label {\n fill: #9370DB;\n font-size: 10px; }\n\n.relation {\n stroke: #9370DB;\n stroke-width: 1;\n fill: none; }\n\n#compositionStart {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#compositionEnd {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#aggregationStart {\n fill: #ECECFF;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#aggregationEnd {\n fill: #ECECFF;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#dependencyStart {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#dependencyEnd {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#extensionStart {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#extensionEnd {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1; }\n\n.commit-id,\n.commit-msg,\n.branch-label {\n fill: lightgrey;\n color: lightgrey; }\n", ""]);
  117. /***/ }),
  118. /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/forest/index.scss":
  119. /*!*********************************************************************************************************************!*\
  120. !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/forest/index.scss ***!
  121. \*********************************************************************************************************************/
  122. /*! no static exports found */
  123. /***/ (function(module, exports, __webpack_require__) {
  124. exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
  125. // Module
  126. exports.push([module.i, "/* Flowchart variables */\n/* Sequence Diagram variables */\n/* Gantt chart variables */\n.label {\n font-family: 'trebuchet ms', verdana, arial;\n color: #333; }\n\n.label text {\n fill: #333; }\n\n.node rect,\n.node circle,\n.node ellipse,\n.node polygon {\n fill: #cde498;\n stroke: #13540c;\n stroke-width: 1px; }\n\n.node.clickable {\n cursor: pointer; }\n\n.arrowheadPath {\n fill: green; }\n\n.edgePath .path {\n stroke: green;\n stroke-width: 1.5px; }\n\n.edgeLabel {\n background-color: #e8e8e8; }\n\n.cluster rect {\n fill: #cdffb2;\n stroke: #6eaa49;\n stroke-width: 1px; }\n\n.cluster text {\n fill: #333; }\n\ndiv.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 12px;\n background: #cdffb2;\n border: 1px solid #6eaa49;\n border-radius: 2px;\n pointer-events: none;\n z-index: 100; }\n\n.actor {\n stroke: #13540c;\n fill: #cde498; }\n\ntext.actor {\n fill: black;\n stroke: none; }\n\n.actor-line {\n stroke: grey; }\n\n.messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: #333; }\n\n.messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: #333; }\n\n#arrowhead {\n fill: #333; }\n\n.sequenceNumber {\n fill: white; }\n\n#sequencenumber {\n fill: #333; }\n\n#crosshead path {\n fill: #333 !important;\n stroke: #333 !important; }\n\n.messageText {\n fill: #333;\n stroke: none; }\n\n.labelBox {\n stroke: #326932;\n fill: #cde498; }\n\n.labelText {\n fill: black;\n stroke: none; }\n\n.loopText {\n fill: black;\n stroke: none; }\n\n.loopLine {\n stroke-width: 2;\n stroke-dasharray: '2 2';\n stroke: #326932; }\n\n.note {\n stroke: #6eaa49;\n fill: #fff5ad; }\n\n.noteText {\n fill: black;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 14px; }\n\n.activation0 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation1 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation2 {\n fill: #f4f4f4;\n stroke: #666; }\n\n/** Section styling */\n.section {\n stroke: none;\n opacity: 0.2; }\n\n.section0 {\n fill: #6eaa49; }\n\n.section2 {\n fill: #6eaa49; }\n\n.section1,\n.section3 {\n fill: white;\n opacity: 0.2; }\n\n.sectionTitle0 {\n fill: #333; }\n\n.sectionTitle1 {\n fill: #333; }\n\n.sectionTitle2 {\n fill: #333; }\n\n.sectionTitle3 {\n fill: #333; }\n\n.sectionTitle {\n text-anchor: start;\n font-size: 11px;\n text-height: 14px; }\n\n/* Grid and axis */\n.grid .tick {\n stroke: lightgrey;\n opacity: 0.3;\n shape-rendering: crispEdges; }\n\n.grid path {\n stroke-width: 0; }\n\n/* Today line */\n.today {\n fill: none;\n stroke: red;\n stroke-width: 2px; }\n\n/* Task styling */\n/* Default task */\n.task {\n stroke-width: 2; }\n\n.taskText {\n text-anchor: middle;\n font-size: 11px; }\n\n.taskTextOutsideRight {\n fill: black;\n text-anchor: start;\n font-size: 11px; }\n\n.taskTextOutsideLeft {\n fill: black;\n text-anchor: end;\n font-size: 11px; }\n\n/* Special case clickable */\n.task.clickable {\n cursor: pointer; }\n\n.taskText.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n/* Specific task settings for the sections*/\n.taskText0,\n.taskText1,\n.taskText2,\n.taskText3 {\n fill: white; }\n\n.task0,\n.task1,\n.task2,\n.task3 {\n fill: #487e3a;\n stroke: #13540c; }\n\n.taskTextOutside0,\n.taskTextOutside2 {\n fill: black; }\n\n.taskTextOutside1,\n.taskTextOutside3 {\n fill: black; }\n\n/* Active task */\n.active0,\n.active1,\n.active2,\n.active3 {\n fill: #cde498;\n stroke: #13540c; }\n\n.activeText0,\n.activeText1,\n.activeText2,\n.activeText3 {\n fill: black !important; }\n\n/* Completed task */\n.done0,\n.done1,\n.done2,\n.done3 {\n stroke: grey;\n fill: lightgrey;\n stroke-width: 2; }\n\n.doneText0,\n.doneText1,\n.doneText2,\n.doneText3 {\n fill: black !important; }\n\n/* Tasks on the critical line */\n.crit0,\n.crit1,\n.crit2,\n.crit3 {\n stroke: #ff8888;\n fill: red;\n stroke-width: 2; }\n\n.activeCrit0,\n.activeCrit1,\n.activeCrit2,\n.activeCrit3 {\n stroke: #ff8888;\n fill: #cde498;\n stroke-width: 2; }\n\n.doneCrit0,\n.doneCrit1,\n.doneCrit2,\n.doneCrit3 {\n stroke: #ff8888;\n fill: lightgrey;\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges; }\n\n.milestone {\n transform: rotate(45deg) scale(0.8, 0.8); }\n\n.milestoneText {\n font-style: italic; }\n\n.doneCritText0,\n.doneCritText1,\n.doneCritText2,\n.doneCritText3 {\n fill: black !important; }\n\n.activeCritText0,\n.activeCritText1,\n.activeCritText2,\n.activeCritText3 {\n fill: black !important; }\n\n.titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: black; }\n\ng.classGroup text {\n fill: #13540c;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 10px; }\n\ng.classGroup rect {\n fill: #cde498;\n stroke: #13540c; }\n\ng.classGroup line {\n stroke: #13540c;\n stroke-width: 1; }\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #cde498;\n opacity: 0.5; }\n\n.classLabel .label {\n fill: #13540c;\n font-size: 10px; }\n\n.relation {\n stroke: #13540c;\n stroke-width: 1;\n fill: none; }\n\n#compositionStart {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1; }\n\n#compositionEnd {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1; }\n\n#aggregationStart {\n fill: #cde498;\n stroke: #13540c;\n stroke-width: 1; }\n\n#aggregationEnd {\n fill: #cde498;\n stroke: #13540c;\n stroke-width: 1; }\n\n#dependencyStart {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1; }\n\n#dependencyEnd {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1; }\n\n#extensionStart {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1; }\n\n#extensionEnd {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1; }\n\n.commit-id,\n.commit-msg,\n.branch-label {\n fill: lightgrey;\n color: lightgrey; }\n", ""]);
  127. /***/ }),
  128. /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/neutral/index.scss":
  129. /*!**********************************************************************************************************************!*\
  130. !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/neutral/index.scss ***!
  131. \**********************************************************************************************************************/
  132. /*! no static exports found */
  133. /***/ (function(module, exports, __webpack_require__) {
  134. exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
  135. // Module
  136. exports.push([module.i, "/* Flowchart variables */\n/* Sequence Diagram variables */\n/* Gantt chart variables */\n.label {\n font-family: 'trebuchet ms', verdana, arial;\n color: #333; }\n\n.label text {\n fill: #333; }\n\n.node rect,\n.node circle,\n.node ellipse,\n.node polygon {\n fill: #eee;\n stroke: #999;\n stroke-width: 1px; }\n\n.node.clickable {\n cursor: pointer; }\n\n.arrowheadPath {\n fill: #333333; }\n\n.edgePath .path {\n stroke: #666;\n stroke-width: 1.5px; }\n\n.edgeLabel {\n background-color: white; }\n\n.cluster rect {\n fill: #eaf2fb;\n stroke: #26a;\n stroke-width: 1px; }\n\n.cluster text {\n fill: #333; }\n\ndiv.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 12px;\n background: #eaf2fb;\n border: 1px solid #26a;\n border-radius: 2px;\n pointer-events: none;\n z-index: 100; }\n\n.actor {\n stroke: #999;\n fill: #eee; }\n\ntext.actor {\n fill: #333;\n stroke: none; }\n\n.actor-line {\n stroke: #666; }\n\n.messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: #333; }\n\n.messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: #333; }\n\n#arrowhead {\n fill: #333; }\n\n.sequenceNumber {\n fill: white; }\n\n#sequencenumber {\n fill: #333; }\n\n#crosshead path {\n fill: #333 !important;\n stroke: #333 !important; }\n\n.messageText {\n fill: #333;\n stroke: none; }\n\n.labelBox {\n stroke: #999;\n fill: #eee; }\n\n.labelText {\n fill: #333;\n stroke: none; }\n\n.loopText {\n fill: #333;\n stroke: none; }\n\n.loopLine {\n stroke-width: 2;\n stroke-dasharray: '2 2';\n stroke: #999; }\n\n.note {\n stroke: #777700;\n fill: #ffa; }\n\n.noteText {\n fill: black;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 14px; }\n\n.activation0 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation1 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation2 {\n fill: #f4f4f4;\n stroke: #666; }\n\n/** Section styling */\n.section {\n stroke: none;\n opacity: 0.2; }\n\n.section0 {\n fill: #80b3e6; }\n\n.section2 {\n fill: #80b3e6; }\n\n.section1,\n.section3 {\n fill: white;\n opacity: 0.2; }\n\n.sectionTitle0 {\n fill: #333; }\n\n.sectionTitle1 {\n fill: #333; }\n\n.sectionTitle2 {\n fill: #333; }\n\n.sectionTitle3 {\n fill: #333; }\n\n.sectionTitle {\n text-anchor: start;\n font-size: 11px;\n text-height: 14px; }\n\n/* Grid and axis */\n.grid .tick {\n stroke: #e6e6e6;\n opacity: 0.3;\n shape-rendering: crispEdges; }\n\n.grid path {\n stroke-width: 0; }\n\n/* Today line */\n.today {\n fill: none;\n stroke: #d42;\n stroke-width: 2px; }\n\n/* Task styling */\n/* Default task */\n.task {\n stroke-width: 2; }\n\n.taskText {\n text-anchor: middle;\n font-size: 11px; }\n\n.taskTextOutsideRight {\n fill: #333;\n text-anchor: start;\n font-size: 11px; }\n\n.taskTextOutsideLeft {\n fill: #333;\n text-anchor: end;\n font-size: 11px; }\n\n/* Special case clickable */\n.task.clickable {\n cursor: pointer; }\n\n.taskText.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n/* Specific task settings for the sections*/\n.taskText0,\n.taskText1,\n.taskText2,\n.taskText3 {\n fill: white; }\n\n.task0,\n.task1,\n.task2,\n.task3 {\n fill: #26a;\n stroke: #1a4d80; }\n\n.taskTextOutside0,\n.taskTextOutside2 {\n fill: #333; }\n\n.taskTextOutside1,\n.taskTextOutside3 {\n fill: #333; }\n\n/* Active task */\n.active0,\n.active1,\n.active2,\n.active3 {\n fill: #eee;\n stroke: #1a4d80; }\n\n.activeText0,\n.activeText1,\n.activeText2,\n.activeText3 {\n fill: #333 !important; }\n\n/* Completed task */\n.done0,\n.done1,\n.done2,\n.done3 {\n stroke: #666;\n fill: #bbb;\n stroke-width: 2; }\n\n.doneText0,\n.doneText1,\n.doneText2,\n.doneText3 {\n fill: #333 !important; }\n\n/* Tasks on the critical line */\n.crit0,\n.crit1,\n.crit2,\n.crit3 {\n stroke: #b1361b;\n fill: #d42;\n stroke-width: 2; }\n\n.activeCrit0,\n.activeCrit1,\n.activeCrit2,\n.activeCrit3 {\n stroke: #b1361b;\n fill: #eee;\n stroke-width: 2; }\n\n.doneCrit0,\n.doneCrit1,\n.doneCrit2,\n.doneCrit3 {\n stroke: #b1361b;\n fill: #bbb;\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges; }\n\n.milestone {\n transform: rotate(45deg) scale(0.8, 0.8); }\n\n.milestoneText {\n font-style: italic; }\n\n.doneCritText0,\n.doneCritText1,\n.doneCritText2,\n.doneCritText3 {\n fill: #333 !important; }\n\n.activeCritText0,\n.activeCritText1,\n.activeCritText2,\n.activeCritText3 {\n fill: #333 !important; }\n\n.titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: #333; }\n\ng.classGroup text {\n fill: #999;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 10px; }\n\ng.classGroup rect {\n fill: #eee;\n stroke: #999; }\n\ng.classGroup line {\n stroke: #999;\n stroke-width: 1; }\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #eee;\n opacity: 0.5; }\n\n.classLabel .label {\n fill: #999;\n font-size: 10px; }\n\n.relation {\n stroke: #999;\n stroke-width: 1;\n fill: none; }\n\n#compositionStart {\n fill: #999;\n stroke: #999;\n stroke-width: 1; }\n\n#compositionEnd {\n fill: #999;\n stroke: #999;\n stroke-width: 1; }\n\n#aggregationStart {\n fill: #eee;\n stroke: #999;\n stroke-width: 1; }\n\n#aggregationEnd {\n fill: #eee;\n stroke: #999;\n stroke-width: 1; }\n\n#dependencyStart {\n fill: #999;\n stroke: #999;\n stroke-width: 1; }\n\n#dependencyEnd {\n fill: #999;\n stroke: #999;\n stroke-width: 1; }\n\n#extensionStart {\n fill: #999;\n stroke: #999;\n stroke-width: 1; }\n\n#extensionEnd {\n fill: #999;\n stroke: #999;\n stroke-width: 1; }\n\n.commit-id,\n.commit-msg,\n.branch-label {\n fill: lightgrey;\n color: lightgrey; }\n", ""]);
  137. /***/ }),
  138. /***/ "./node_modules/css-loader/dist/runtime/api.js":
  139. /*!*****************************************************!*\
  140. !*** ./node_modules/css-loader/dist/runtime/api.js ***!
  141. \*****************************************************/
  142. /*! no static exports found */
  143. /***/ (function(module, exports, __webpack_require__) {
  144. "use strict";
  145. /*
  146. MIT License http://www.opensource.org/licenses/mit-license.php
  147. Author Tobias Koppers @sokra
  148. */
  149. // css base code, injected by the css-loader
  150. module.exports = function (useSourceMap) {
  151. var list = []; // return the list of modules as css string
  152. list.toString = function toString() {
  153. return this.map(function (item) {
  154. var content = cssWithMappingToString(item, useSourceMap);
  155. if (item[2]) {
  156. return '@media ' + item[2] + '{' + content + '}';
  157. } else {
  158. return content;
  159. }
  160. }).join('');
  161. }; // import a list of modules into the list
  162. list.i = function (modules, mediaQuery) {
  163. if (typeof modules === 'string') {
  164. modules = [[null, modules, '']];
  165. }
  166. var alreadyImportedModules = {};
  167. for (var i = 0; i < this.length; i++) {
  168. var id = this[i][0];
  169. if (id != null) {
  170. alreadyImportedModules[id] = true;
  171. }
  172. }
  173. for (i = 0; i < modules.length; i++) {
  174. var item = modules[i]; // skip already imported module
  175. // this implementation is not 100% perfect for weird media query combinations
  176. // when a module is imported multiple times with different media queries.
  177. // I hope this will never occur (Hey this way we have smaller bundles)
  178. if (item[0] == null || !alreadyImportedModules[item[0]]) {
  179. if (mediaQuery && !item[2]) {
  180. item[2] = mediaQuery;
  181. } else if (mediaQuery) {
  182. item[2] = '(' + item[2] + ') and (' + mediaQuery + ')';
  183. }
  184. list.push(item);
  185. }
  186. }
  187. };
  188. return list;
  189. };
  190. function cssWithMappingToString(item, useSourceMap) {
  191. var content = item[1] || '';
  192. var cssMapping = item[3];
  193. if (!cssMapping) {
  194. return content;
  195. }
  196. if (useSourceMap && typeof btoa === 'function') {
  197. var sourceMapping = toComment(cssMapping);
  198. var sourceURLs = cssMapping.sources.map(function (source) {
  199. return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';
  200. });
  201. return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
  202. }
  203. return [content].join('\n');
  204. } // Adapted from convert-source-map (MIT)
  205. function toComment(sourceMap) {
  206. // eslint-disable-next-line no-undef
  207. var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
  208. var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
  209. return '/*# ' + data + ' */';
  210. }
  211. /***/ }),
  212. /***/ "./node_modules/node-libs-browser/mock/empty.js":
  213. /*!******************************************************!*\
  214. !*** ./node_modules/node-libs-browser/mock/empty.js ***!
  215. \******************************************************/
  216. /*! no static exports found */
  217. /***/ (function(module, exports) {
  218. /***/ }),
  219. /***/ "./node_modules/path-browserify/index.js":
  220. /*!***********************************************!*\
  221. !*** ./node_modules/path-browserify/index.js ***!
  222. \***********************************************/
  223. /*! no static exports found */
  224. /***/ (function(module, exports, __webpack_require__) {
  225. /* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
  226. //
  227. // Permission is hereby granted, free of charge, to any person obtaining a
  228. // copy of this software and associated documentation files (the
  229. // "Software"), to deal in the Software without restriction, including
  230. // without limitation the rights to use, copy, modify, merge, publish,
  231. // distribute, sublicense, and/or sell copies of the Software, and to permit
  232. // persons to whom the Software is furnished to do so, subject to the
  233. // following conditions:
  234. //
  235. // The above copyright notice and this permission notice shall be included
  236. // in all copies or substantial portions of the Software.
  237. //
  238. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  239. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  240. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  241. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  242. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  243. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  244. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  245. // resolves . and .. elements in a path array with directory names there
  246. // must be no slashes, empty elements, or device names (c:\) in the array
  247. // (so also no leading and trailing slashes - it does not distinguish
  248. // relative and absolute paths)
  249. function normalizeArray(parts, allowAboveRoot) {
  250. // if the path tries to go above the root, `up` ends up > 0
  251. var up = 0;
  252. for (var i = parts.length - 1; i >= 0; i--) {
  253. var last = parts[i];
  254. if (last === '.') {
  255. parts.splice(i, 1);
  256. } else if (last === '..') {
  257. parts.splice(i, 1);
  258. up++;
  259. } else if (up) {
  260. parts.splice(i, 1);
  261. up--;
  262. }
  263. }
  264. // if the path is allowed to go above the root, restore leading ..s
  265. if (allowAboveRoot) {
  266. for (; up--; up) {
  267. parts.unshift('..');
  268. }
  269. }
  270. return parts;
  271. }
  272. // Split a filename into [root, dir, basename, ext], unix version
  273. // 'root' is just a slash, or nothing.
  274. var splitPathRe =
  275. /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
  276. var splitPath = function(filename) {
  277. return splitPathRe.exec(filename).slice(1);
  278. };
  279. // path.resolve([from ...], to)
  280. // posix version
  281. exports.resolve = function() {
  282. var resolvedPath = '',
  283. resolvedAbsolute = false;
  284. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  285. var path = (i >= 0) ? arguments[i] : process.cwd();
  286. // Skip empty and invalid entries
  287. if (typeof path !== 'string') {
  288. throw new TypeError('Arguments to path.resolve must be strings');
  289. } else if (!path) {
  290. continue;
  291. }
  292. resolvedPath = path + '/' + resolvedPath;
  293. resolvedAbsolute = path.charAt(0) === '/';
  294. }
  295. // At this point the path should be resolved to a full absolute path, but
  296. // handle relative paths to be safe (might happen when process.cwd() fails)
  297. // Normalize the path
  298. resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
  299. return !!p;
  300. }), !resolvedAbsolute).join('/');
  301. return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
  302. };
  303. // path.normalize(path)
  304. // posix version
  305. exports.normalize = function(path) {
  306. var isAbsolute = exports.isAbsolute(path),
  307. trailingSlash = substr(path, -1) === '/';
  308. // Normalize the path
  309. path = normalizeArray(filter(path.split('/'), function(p) {
  310. return !!p;
  311. }), !isAbsolute).join('/');
  312. if (!path && !isAbsolute) {
  313. path = '.';
  314. }
  315. if (path && trailingSlash) {
  316. path += '/';
  317. }
  318. return (isAbsolute ? '/' : '') + path;
  319. };
  320. // posix version
  321. exports.isAbsolute = function(path) {
  322. return path.charAt(0) === '/';
  323. };
  324. // posix version
  325. exports.join = function() {
  326. var paths = Array.prototype.slice.call(arguments, 0);
  327. return exports.normalize(filter(paths, function(p, index) {
  328. if (typeof p !== 'string') {
  329. throw new TypeError('Arguments to path.join must be strings');
  330. }
  331. return p;
  332. }).join('/'));
  333. };
  334. // path.relative(from, to)
  335. // posix version
  336. exports.relative = function(from, to) {
  337. from = exports.resolve(from).substr(1);
  338. to = exports.resolve(to).substr(1);
  339. function trim(arr) {
  340. var start = 0;
  341. for (; start < arr.length; start++) {
  342. if (arr[start] !== '') break;
  343. }
  344. var end = arr.length - 1;
  345. for (; end >= 0; end--) {
  346. if (arr[end] !== '') break;
  347. }
  348. if (start > end) return [];
  349. return arr.slice(start, end - start + 1);
  350. }
  351. var fromParts = trim(from.split('/'));
  352. var toParts = trim(to.split('/'));
  353. var length = Math.min(fromParts.length, toParts.length);
  354. var samePartsLength = length;
  355. for (var i = 0; i < length; i++) {
  356. if (fromParts[i] !== toParts[i]) {
  357. samePartsLength = i;
  358. break;
  359. }
  360. }
  361. var outputParts = [];
  362. for (var i = samePartsLength; i < fromParts.length; i++) {
  363. outputParts.push('..');
  364. }
  365. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  366. return outputParts.join('/');
  367. };
  368. exports.sep = '/';
  369. exports.delimiter = ':';
  370. exports.dirname = function(path) {
  371. var result = splitPath(path),
  372. root = result[0],
  373. dir = result[1];
  374. if (!root && !dir) {
  375. // No dirname whatsoever
  376. return '.';
  377. }
  378. if (dir) {
  379. // It has a dirname, strip trailing slash
  380. dir = dir.substr(0, dir.length - 1);
  381. }
  382. return root + dir;
  383. };
  384. exports.basename = function(path, ext) {
  385. var f = splitPath(path)[2];
  386. // TODO: make this comparison case-insensitive on windows?
  387. if (ext && f.substr(-1 * ext.length) === ext) {
  388. f = f.substr(0, f.length - ext.length);
  389. }
  390. return f;
  391. };
  392. exports.extname = function(path) {
  393. return splitPath(path)[3];
  394. };
  395. function filter (xs, f) {
  396. if (xs.filter) return xs.filter(f);
  397. var res = [];
  398. for (var i = 0; i < xs.length; i++) {
  399. if (f(xs[i], i, xs)) res.push(xs[i]);
  400. }
  401. return res;
  402. }
  403. // String.prototype.substr - negative index don't work in IE8
  404. var substr = 'ab'.substr(-1) === 'b'
  405. ? function (str, start, len) { return str.substr(start, len) }
  406. : function (str, start, len) {
  407. if (start < 0) start = str.length + start;
  408. return str.substr(start, len);
  409. }
  410. ;
  411. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../process/browser.js */ "./node_modules/process/browser.js")))
  412. /***/ }),
  413. /***/ "./node_modules/process/browser.js":
  414. /*!*****************************************!*\
  415. !*** ./node_modules/process/browser.js ***!
  416. \*****************************************/
  417. /*! no static exports found */
  418. /***/ (function(module, exports) {
  419. // shim for using process in browser
  420. var process = module.exports = {};
  421. // cached from whatever global is present so that test runners that stub it
  422. // don't break things. But we need to wrap it in a try catch in case it is
  423. // wrapped in strict mode code which doesn't define any globals. It's inside a
  424. // function because try/catches deoptimize in certain engines.
  425. var cachedSetTimeout;
  426. var cachedClearTimeout;
  427. function defaultSetTimout() {
  428. throw new Error('setTimeout has not been defined');
  429. }
  430. function defaultClearTimeout () {
  431. throw new Error('clearTimeout has not been defined');
  432. }
  433. (function () {
  434. try {
  435. if (typeof setTimeout === 'function') {
  436. cachedSetTimeout = setTimeout;
  437. } else {
  438. cachedSetTimeout = defaultSetTimout;
  439. }
  440. } catch (e) {
  441. cachedSetTimeout = defaultSetTimout;
  442. }
  443. try {
  444. if (typeof clearTimeout === 'function') {
  445. cachedClearTimeout = clearTimeout;
  446. } else {
  447. cachedClearTimeout = defaultClearTimeout;
  448. }
  449. } catch (e) {
  450. cachedClearTimeout = defaultClearTimeout;
  451. }
  452. } ())
  453. function runTimeout(fun) {
  454. if (cachedSetTimeout === setTimeout) {
  455. //normal enviroments in sane situations
  456. return setTimeout(fun, 0);
  457. }
  458. // if setTimeout wasn't available but was latter defined
  459. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  460. cachedSetTimeout = setTimeout;
  461. return setTimeout(fun, 0);
  462. }
  463. try {
  464. // when when somebody has screwed with setTimeout but no I.E. maddness
  465. return cachedSetTimeout(fun, 0);
  466. } catch(e){
  467. try {
  468. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  469. return cachedSetTimeout.call(null, fun, 0);
  470. } catch(e){
  471. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
  472. return cachedSetTimeout.call(this, fun, 0);
  473. }
  474. }
  475. }
  476. function runClearTimeout(marker) {
  477. if (cachedClearTimeout === clearTimeout) {
  478. //normal enviroments in sane situations
  479. return clearTimeout(marker);
  480. }
  481. // if clearTimeout wasn't available but was latter defined
  482. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  483. cachedClearTimeout = clearTimeout;
  484. return clearTimeout(marker);
  485. }
  486. try {
  487. // when when somebody has screwed with setTimeout but no I.E. maddness
  488. return cachedClearTimeout(marker);
  489. } catch (e){
  490. try {
  491. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  492. return cachedClearTimeout.call(null, marker);
  493. } catch (e){
  494. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
  495. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  496. return cachedClearTimeout.call(this, marker);
  497. }
  498. }
  499. }
  500. var queue = [];
  501. var draining = false;
  502. var currentQueue;
  503. var queueIndex = -1;
  504. function cleanUpNextTick() {
  505. if (!draining || !currentQueue) {
  506. return;
  507. }
  508. draining = false;
  509. if (currentQueue.length) {
  510. queue = currentQueue.concat(queue);
  511. } else {
  512. queueIndex = -1;
  513. }
  514. if (queue.length) {
  515. drainQueue();
  516. }
  517. }
  518. function drainQueue() {
  519. if (draining) {
  520. return;
  521. }
  522. var timeout = runTimeout(cleanUpNextTick);
  523. draining = true;
  524. var len = queue.length;
  525. while(len) {
  526. currentQueue = queue;
  527. queue = [];
  528. while (++queueIndex < len) {
  529. if (currentQueue) {
  530. currentQueue[queueIndex].run();
  531. }
  532. }
  533. queueIndex = -1;
  534. len = queue.length;
  535. }
  536. currentQueue = null;
  537. draining = false;
  538. runClearTimeout(timeout);
  539. }
  540. process.nextTick = function (fun) {
  541. var args = new Array(arguments.length - 1);
  542. if (arguments.length > 1) {
  543. for (var i = 1; i < arguments.length; i++) {
  544. args[i - 1] = arguments[i];
  545. }
  546. }
  547. queue.push(new Item(fun, args));
  548. if (queue.length === 1 && !draining) {
  549. runTimeout(drainQueue);
  550. }
  551. };
  552. // v8 likes predictible objects
  553. function Item(fun, array) {
  554. this.fun = fun;
  555. this.array = array;
  556. }
  557. Item.prototype.run = function () {
  558. this.fun.apply(null, this.array);
  559. };
  560. process.title = 'browser';
  561. process.browser = true;
  562. process.env = {};
  563. process.argv = [];
  564. process.version = ''; // empty string to avoid regexp issues
  565. process.versions = {};
  566. function noop() {}
  567. process.on = noop;
  568. process.addListener = noop;
  569. process.once = noop;
  570. process.off = noop;
  571. process.removeListener = noop;
  572. process.removeAllListeners = noop;
  573. process.emit = noop;
  574. process.prependListener = noop;
  575. process.prependOnceListener = noop;
  576. process.listeners = function (name) { return [] }
  577. process.binding = function (name) {
  578. throw new Error('process.binding is not supported');
  579. };
  580. process.cwd = function () { return '/' };
  581. process.chdir = function (dir) {
  582. throw new Error('process.chdir is not supported');
  583. };
  584. process.umask = function() { return 0; };
  585. /***/ }),
  586. /***/ "./node_modules/webpack/buildin/module.js":
  587. /*!***********************************!*\
  588. !*** (webpack)/buildin/module.js ***!
  589. \***********************************/
  590. /*! no static exports found */
  591. /***/ (function(module, exports) {
  592. module.exports = function(module) {
  593. if (!module.webpackPolyfill) {
  594. module.deprecate = function() {};
  595. module.paths = [];
  596. // module.parent = undefined by default
  597. if (!module.children) module.children = [];
  598. Object.defineProperty(module, "loaded", {
  599. enumerable: true,
  600. get: function() {
  601. return module.l;
  602. }
  603. });
  604. Object.defineProperty(module, "id", {
  605. enumerable: true,
  606. get: function() {
  607. return module.i;
  608. }
  609. });
  610. module.webpackPolyfill = 1;
  611. }
  612. return module;
  613. };
  614. /***/ }),
  615. /***/ "./package.json":
  616. /*!**********************!*\
  617. !*** ./package.json ***!
  618. \**********************/
  619. /*! exports provided: name, version, description, main, keywords, scripts, repository, author, license, standard, dependencies, devDependencies, files, yarn-upgrade-all, default */
  620. /***/ (function(module) {
  621. module.exports = {"name":"mermaid","version":"8.2.4","description":"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.","main":"dist/mermaid.core.js","keywords":["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph"],"scripts":{"build":"webpack --progress --colors","postbuild":"documentation build src/mermaidAPI.js --shallow -f md --markdown-toc false -o docs/mermaidAPI.md","build:watch":"yarn build --watch","minify":"minify ./dist/mermaid.js > ./dist/mermaid.min.js","release":"yarn build -p --config webpack.config.prod.babel.js","lint":"standard","e2e":"yarn lint && jest e2e --config e2e/jest.config.js","e2e-upd":"yarn lint && jest e2e -u --config e2e/jest.config.js","dev":"yarn lint && webpack-dev-server --config webpack.config.e2e.js","test":"yarn lint && jest src","test:watch":"jest --watch src","prepublishOnly":"yarn build && yarn release && yarn test","prepush":"yarn test"},"repository":{"type":"git","url":"https://github.com/knsv/mermaid"},"author":"Knut Sveidqvist","license":"MIT","standard":{"ignore":["**/parser/*.js","dist/**/*.js"],"globals":["page"]},"dependencies":{"@braintree/sanitize-url":"^3.1.0","d3":"^5.7.0","dagre-d3-renderer":"^0.5.8","dagre-layout":"^0.8.8","documentation":"^12.0.1","graphlibrary":"^2.2.0","he":"^1.2.0","lodash":"^4.17.11","minify":"^4.1.1","moment-mini":"^2.22.1","scope-css":"^1.2.1"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.2.0","@babel/register":"^7.0.0","babel-core":"7.0.0-bridge.0","babel-jest":"^23.6.0","babel-loader":"^8.0.4","coveralls":"^3.0.2","css-loader":"^2.0.1","css-to-string-loader":"^0.1.3","husky":"^1.2.1","identity-obj-proxy":"^3.0.0","jest":"^23.6.0","jest-environment-puppeteer":"^4.2.0","jest-image-snapshot":"^2.8.2","jest-puppeteer":"^4.2.0","jison":"^0.4.18","moment":"^2.23.0","node-sass":"^4.11.0","puppeteer":"^1.17.0","sass-loader":"^7.1.0","standard":"^12.0.1","webpack":"^4.27.1","webpack-cli":"^3.1.2","webpack-dev-server":"^3.4.1","webpack-node-externals":"^1.7.2","yarn-upgrade-all":"^0.5.0"},"files":["dist"],"yarn-upgrade-all":{"ignore":["babel-core"]}};
  622. /***/ }),
  623. /***/ "./src/config.js":
  624. /*!***********************!*\
  625. !*** ./src/config.js ***!
  626. \***********************/
  627. /*! exports provided: setConfig, getConfig */
  628. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  629. "use strict";
  630. __webpack_require__.r(__webpack_exports__);
  631. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConfig", function() { return setConfig; });
  632. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getConfig", function() { return getConfig; });
  633. let config = {};
  634. const setConf = function (cnf) {
  635. // Top level initially mermaid, gflow, sequenceDiagram and gantt
  636. const lvl1Keys = Object.keys(cnf);
  637. for (let i = 0; i < lvl1Keys.length; i++) {
  638. if (typeof cnf[lvl1Keys[i]] === 'object' && cnf[lvl1Keys[i]] != null) {
  639. const lvl2Keys = Object.keys(cnf[lvl1Keys[i]]);
  640. for (let j = 0; j < lvl2Keys.length; j++) {
  641. // logger.debug('Setting conf ', lvl1Keys[i], '-', lvl2Keys[j])
  642. if (typeof config[lvl1Keys[i]] === 'undefined') {
  643. config[lvl1Keys[i]] = {};
  644. } // logger.debug('Setting config: ' + lvl1Keys[i] + ' ' + lvl2Keys[j] + ' to ' + cnf[lvl1Keys[i]][lvl2Keys[j]])
  645. config[lvl1Keys[i]][lvl2Keys[j]] = cnf[lvl1Keys[i]][lvl2Keys[j]];
  646. }
  647. } else {
  648. config[lvl1Keys[i]] = cnf[lvl1Keys[i]];
  649. }
  650. }
  651. };
  652. const setConfig = conf => {
  653. setConf(conf);
  654. };
  655. const getConfig = () => config;
  656. /***/ }),
  657. /***/ "./src/diagrams/class/classDb.js":
  658. /*!***************************************!*\
  659. !*** ./src/diagrams/class/classDb.js ***!
  660. \***************************************/
  661. /*! exports provided: addClass, clear, getClass, getClasses, getRelations, addRelation, addMember, addMembers, cleanupLabel, lineType, relationType, default */
  662. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  663. "use strict";
  664. __webpack_require__.r(__webpack_exports__);
  665. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addClass", function() { return addClass; });
  666. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
  667. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClass", function() { return getClass; });
  668. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClasses", function() { return getClasses; });
  669. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRelations", function() { return getRelations; });
  670. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addRelation", function() { return addRelation; });
  671. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addMember", function() { return addMember; });
  672. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addMembers", function() { return addMembers; });
  673. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cleanupLabel", function() { return cleanupLabel; });
  674. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineType", function() { return lineType; });
  675. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "relationType", function() { return relationType; });
  676. /* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
  677. let relations = [];
  678. let classes = {};
  679. /**
  680. * Function called by parser when a node definition has been found.
  681. * @param id
  682. * @param text
  683. * @param type
  684. * @param style
  685. */
  686. const addClass = function (id) {
  687. if (typeof classes[id] === 'undefined') {
  688. classes[id] = {
  689. id: id,
  690. methods: [],
  691. members: []
  692. };
  693. }
  694. };
  695. const clear = function () {
  696. relations = [];
  697. classes = {};
  698. };
  699. const getClass = function (id) {
  700. return classes[id];
  701. };
  702. const getClasses = function () {
  703. return classes;
  704. };
  705. const getRelations = function () {
  706. return relations;
  707. };
  708. const addRelation = function (relation) {
  709. _logger__WEBPACK_IMPORTED_MODULE_0__["logger"].debug('Adding relation: ' + JSON.stringify(relation));
  710. addClass(relation.id1);
  711. addClass(relation.id2);
  712. relations.push(relation);
  713. };
  714. const addMember = function (className, member) {
  715. const theClass = classes[className];
  716. if (typeof member === 'string') {
  717. if (member.substr(-1) === ')') {
  718. theClass.methods.push(member);
  719. } else {
  720. theClass.members.push(member);
  721. }
  722. }
  723. };
  724. const addMembers = function (className, MembersArr) {
  725. if (Array.isArray(MembersArr)) {
  726. MembersArr.forEach(member => addMember(className, member));
  727. }
  728. };
  729. const cleanupLabel = function (label) {
  730. if (label.substring(0, 1) === ':') {
  731. return label.substr(2).trim();
  732. } else {
  733. return label.trim();
  734. }
  735. };
  736. const lineType = {
  737. LINE: 0,
  738. DOTTED_LINE: 1
  739. };
  740. const relationType = {
  741. AGGREGATION: 0,
  742. EXTENSION: 1,
  743. COMPOSITION: 2,
  744. DEPENDENCY: 3
  745. };
  746. /* harmony default export */ __webpack_exports__["default"] = ({
  747. addClass,
  748. clear,
  749. getClass,
  750. getClasses,
  751. getRelations,
  752. addRelation,
  753. addMember,
  754. addMembers,
  755. cleanupLabel,
  756. lineType,
  757. relationType
  758. });
  759. /***/ }),
  760. /***/ "./src/diagrams/class/classRenderer.js":
  761. /*!*********************************************!*\
  762. !*** ./src/diagrams/class/classRenderer.js ***!
  763. \*********************************************/
  764. /*! exports provided: setConf, draw, default */
  765. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  766. "use strict";
  767. __webpack_require__.r(__webpack_exports__);
  768. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
  769. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
  770. /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
  771. /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
  772. /* harmony import */ var dagre_layout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dagre-layout */ "dagre-layout");
  773. /* harmony import */ var dagre_layout__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dagre_layout__WEBPACK_IMPORTED_MODULE_1__);
  774. /* harmony import */ var graphlibrary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! graphlibrary */ "graphlibrary");
  775. /* harmony import */ var graphlibrary__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(graphlibrary__WEBPACK_IMPORTED_MODULE_2__);
  776. /* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
  777. /* harmony import */ var _classDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./classDb */ "./src/diagrams/class/classDb.js");
  778. /* harmony import */ var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./parser/classDiagram */ "./src/diagrams/class/parser/classDiagram.jison");
  779. /* harmony import */ var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__);
  780. _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].yy = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"];
  781. const idCache = {};
  782. let classCnt = 0;
  783. const conf = {
  784. dividerMargin: 10,
  785. padding: 5,
  786. textHeight: 10 // Todo optimize
  787. };
  788. const getGraphId = function (label) {
  789. const keys = Object.keys(idCache);
  790. for (let i = 0; i < keys.length; i++) {
  791. if (idCache[keys[i]].label === label) {
  792. return keys[i];
  793. }
  794. }
  795. return undefined;
  796. };
  797. /**
  798. * Setup arrow head and define the marker. The result is appended to the svg.
  799. */
  800. const insertMarkers = function (elem) {
  801. elem.append('defs').append('marker').attr('id', 'extensionStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 1,7 L18,13 V 1 Z');
  802. elem.append('defs').append('marker').attr('id', 'extensionEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead
  803. elem.append('defs').append('marker').attr('id', 'compositionStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');
  804. elem.append('defs').append('marker').attr('id', 'compositionEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');
  805. elem.append('defs').append('marker').attr('id', 'aggregationStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');
  806. elem.append('defs').append('marker').attr('id', 'aggregationEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');
  807. elem.append('defs').append('marker').attr('id', 'dependencyStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z');
  808. elem.append('defs').append('marker').attr('id', 'dependencyEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');
  809. };
  810. let edgeCount = 0;
  811. let total = 0;
  812. const drawEdge = function (elem, path, relation) {
  813. const getRelationType = function (type) {
  814. switch (type) {
  815. case _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].relationType.AGGREGATION:
  816. return 'aggregation';
  817. case _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].relationType.EXTENSION:
  818. return 'extension';
  819. case _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].relationType.COMPOSITION:
  820. return 'composition';
  821. case _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].relationType.DEPENDENCY:
  822. return 'dependency';
  823. }
  824. };
  825. path.points = path.points.filter(p => !Number.isNaN(p.y)); // The data for our line
  826. const lineData = path.points; // This is the accessor function we talked about above
  827. const lineFunction = d3__WEBPACK_IMPORTED_MODULE_0__["line"]().x(function (d) {
  828. return d.x;
  829. }).y(function (d) {
  830. return d.y;
  831. }).curve(d3__WEBPACK_IMPORTED_MODULE_0__["curveBasis"]);
  832. const svgPath = elem.append('path').attr('d', lineFunction(lineData)).attr('id', 'edge' + edgeCount).attr('class', 'relation');
  833. let url = '';
  834. if (conf.arrowMarkerAbsolute) {
  835. url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;
  836. url = url.replace(/\(/g, '\\(');
  837. url = url.replace(/\)/g, '\\)');
  838. }
  839. if (relation.relation.type1 !== 'none') {
  840. svgPath.attr('marker-start', 'url(' + url + '#' + getRelationType(relation.relation.type1) + 'Start' + ')');
  841. }
  842. if (relation.relation.type2 !== 'none') {
  843. svgPath.attr('marker-end', 'url(' + url + '#' + getRelationType(relation.relation.type2) + 'End' + ')');
  844. }
  845. let x, y;
  846. const l = path.points.length;
  847. if (l % 2 !== 0 && l > 1) {
  848. const p1 = path.points[Math.floor(l / 2)];
  849. const p2 = path.points[Math.ceil(l / 2)];
  850. x = (p1.x + p2.x) / 2;
  851. y = (p1.y + p2.y) / 2;
  852. } else {
  853. const p = path.points[Math.floor(l / 2)];
  854. x = p.x;
  855. y = p.y;
  856. }
  857. if (typeof relation.title !== 'undefined') {
  858. const g = elem.append('g').attr('class', 'classLabel');
  859. const label = g.append('text').attr('class', 'label').attr('x', x).attr('y', y).attr('fill', 'red').attr('text-anchor', 'middle').text(relation.title);
  860. window.label = label;
  861. const bounds = label.node().getBBox();
  862. g.insert('rect', ':first-child').attr('class', 'box').attr('x', bounds.x - conf.padding / 2).attr('y', bounds.y - conf.padding / 2).attr('width', bounds.width + conf.padding).attr('height', bounds.height + conf.padding);
  863. }
  864. edgeCount++;
  865. };
  866. const drawClass = function (elem, classDef) {
  867. _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('Rendering class ' + classDef);
  868. const addTspan = function (textEl, txt, isFirst) {
  869. const tSpan = textEl.append('tspan').attr('x', conf.padding).text(txt);
  870. if (!isFirst) {
  871. tSpan.attr('dy', conf.textHeight);
  872. }
  873. };
  874. const id = 'classId' + classCnt % total;
  875. const classInfo = {
  876. id: id,
  877. label: classDef.id,
  878. width: 0,
  879. height: 0
  880. };
  881. const g = elem.append('g').attr('id', id).attr('class', 'classGroup');
  882. const title = g.append('text').attr('x', conf.padding).attr('y', conf.textHeight + conf.padding).text(classDef.id);
  883. const titleHeight = title.node().getBBox().height;
  884. const membersLine = g.append('line') // text label for the x axis
  885. .attr('x1', 0).attr('y1', conf.padding + titleHeight + conf.dividerMargin / 2).attr('y2', conf.padding + titleHeight + conf.dividerMargin / 2);
  886. const members = g.append('text') // text label for the x axis
  887. .attr('x', conf.padding).attr('y', titleHeight + conf.dividerMargin + conf.textHeight).attr('fill', 'white').attr('class', 'classText');
  888. let isFirst = true;
  889. classDef.members.forEach(function (member) {
  890. addTspan(members, member, isFirst);
  891. isFirst = false;
  892. });
  893. const membersBox = members.node().getBBox();
  894. const methodsLine = g.append('line') // text label for the x axis
  895. .attr('x1', 0).attr('y1', conf.padding + titleHeight + conf.dividerMargin + membersBox.height).attr('y2', conf.padding + titleHeight + conf.dividerMargin + membersBox.height);
  896. const methods = g.append('text') // text label for the x axis
  897. .attr('x', conf.padding).attr('y', titleHeight + 2 * conf.dividerMargin + membersBox.height + conf.textHeight).attr('fill', 'white').attr('class', 'classText');
  898. isFirst = true;
  899. classDef.methods.forEach(function (method) {
  900. addTspan(methods, method, isFirst);
  901. isFirst = false;
  902. });
  903. const classBox = g.node().getBBox();
  904. g.insert('rect', ':first-child').attr('x', 0).attr('y', 0).attr('width', classBox.width + 2 * conf.padding).attr('height', classBox.height + conf.padding + 0.5 * conf.dividerMargin);
  905. membersLine.attr('x2', classBox.width + 2 * conf.padding);
  906. methodsLine.attr('x2', classBox.width + 2 * conf.padding);
  907. classInfo.width = classBox.width + 2 * conf.padding;
  908. classInfo.height = classBox.height + conf.padding + 0.5 * conf.dividerMargin;
  909. idCache[id] = classInfo;
  910. classCnt++;
  911. return classInfo;
  912. };
  913. const setConf = function (cnf) {
  914. const keys = Object.keys(cnf);
  915. keys.forEach(function (key) {
  916. conf[key] = cnf[key];
  917. });
  918. };
  919. /**
  920. * Draws a flowchart in the tag with id: id based on the graph definition in text.
  921. * @param text
  922. * @param id
  923. */
  924. const draw = function (text, id) {
  925. _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].yy.clear();
  926. _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].parse(text);
  927. _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('Rendering diagram ' + text); /// / Fetch the default direction, use TD if none was found
  928. const diagram = d3__WEBPACK_IMPORTED_MODULE_0__["select"](`[id='${id}']`);
  929. insertMarkers(diagram); // Layout graph, Create a new directed graph
  930. const g = new graphlibrary__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({
  931. multigraph: true
  932. }); // Set an object for the graph label
  933. g.setGraph({
  934. isMultiGraph: true
  935. }); // Default to assigning a new object as a label for each new edge.
  936. g.setDefaultEdgeLabel(function () {
  937. return {};
  938. });
  939. const classes = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getClasses();
  940. const keys = Object.keys(classes);
  941. total = keys.length;
  942. for (let i = 0; i < keys.length; i++) {
  943. const classDef = classes[keys[i]];
  944. const node = drawClass(diagram, classDef); // Add nodes to the graph. The first argument is the node id. The second is
  945. // metadata about the node. In this case we're going to add labels to each of
  946. // our nodes.
  947. g.setNode(node.id, node);
  948. _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('Org height: ' + node.height);
  949. }
  950. const relations = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getRelations();
  951. relations.forEach(function (relation) {
  952. _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('tjoho' + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation));
  953. g.setEdge(getGraphId(relation.id1), getGraphId(relation.id2), {
  954. relation: relation
  955. });
  956. });
  957. dagre_layout__WEBPACK_IMPORTED_MODULE_1___default.a.layout(g);
  958. g.nodes().forEach(function (v) {
  959. if (typeof v !== 'undefined' && typeof g.node(v) !== 'undefined') {
  960. _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Node ' + v + ': ' + JSON.stringify(g.node(v)));
  961. d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#' + v).attr('transform', 'translate(' + (g.node(v).x - g.node(v).width / 2) + ',' + (g.node(v).y - g.node(v).height / 2) + ' )');
  962. }
  963. });
  964. g.edges().forEach(function (e) {
  965. if (typeof e !== 'undefined' && typeof g.edge(e) !== 'undefined') {
  966. _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(g.edge(e)));
  967. drawEdge(diagram, g.edge(e), g.edge(e).relation);
  968. }
  969. });
  970. diagram.attr('height', '100%');
  971. diagram.attr('width', '100%');
  972. diagram.attr('viewBox', '0 0 ' + (g.graph().width + 20) + ' ' + (g.graph().height + 20));
  973. };
  974. /* harmony default export */ __webpack_exports__["default"] = ({
  975. setConf,
  976. draw
  977. });
  978. /***/ }),
  979. /***/ "./src/diagrams/class/parser/classDiagram.jison":
  980. /*!******************************************************!*\
  981. !*** ./src/diagrams/class/parser/classDiagram.jison ***!
  982. \******************************************************/
  983. /*! no static exports found */
  984. /***/ (function(module, exports, __webpack_require__) {
  985. /* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
  986. /*
  987. Returns a Parser object of the following structure:
  988. Parser: {
  989. yy: {}
  990. }
  991. Parser.prototype: {
  992. yy: {},
  993. trace: function(),
  994. symbols_: {associative list: name ==> number},
  995. terminals_: {associative list: number ==> name},
  996. productions_: [...],
  997. performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
  998. table: [...],
  999. defaultActions: {...},
  1000. parseError: function(str, hash),
  1001. parse: function(input),
  1002. lexer: {
  1003. EOF: 1,
  1004. parseError: function(str, hash),
  1005. setInput: function(input),
  1006. input: function(),
  1007. unput: function(str),
  1008. more: function(),
  1009. less: function(n),
  1010. pastInput: function(),
  1011. upcomingInput: function(),
  1012. showPosition: function(),
  1013. test_match: function(regex_match_array, rule_index),
  1014. next: function(),
  1015. lex: function(),
  1016. begin: function(condition),
  1017. popState: function(),
  1018. _currentRules: function(),
  1019. topState: function(),
  1020. pushState: function(condition),
  1021. options: {
  1022. ranges: boolean (optional: true ==> token location info will include a .range[] member)
  1023. flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
  1024. backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
  1025. },
  1026. performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
  1027. rules: [...],
  1028. conditions: {associative list: name ==> set},
  1029. }
  1030. }
  1031. token location info (@$, _$, etc.): {
  1032. first_line: n,
  1033. last_line: n,
  1034. first_column: n,
  1035. last_column: n,
  1036. range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
  1037. }
  1038. the parseError function receives a 'hash' object with these members for lexer and parser errors: {
  1039. text: (matched text)
  1040. token: (the produced terminal token, if any)
  1041. line: (yylineno)
  1042. }
  1043. while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
  1044. loc: (yylloc)
  1045. expected: (string describing the set of expected tokens)
  1046. recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
  1047. }
  1048. */
  1049. var parser = (function(){
  1050. var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,11],$V1=[1,12],$V2=[1,13],$V3=[1,15],$V4=[1,16],$V5=[1,17],$V6=[6,8],$V7=[1,26],$V8=[1,27],$V9=[1,28],$Va=[1,29],$Vb=[1,30],$Vc=[1,31],$Vd=[6,8,13,17,23,26,27,28,29,30,31],$Ve=[6,8,13,17,23,26,27,28,29,30,31,45,46,47],$Vf=[23,45,46,47],$Vg=[23,30,31,45,46,47],$Vh=[23,26,27,28,29,45,46,47],$Vi=[6,8,13],$Vj=[1,46];
  1051. var parser = {trace: function trace () { },
  1052. yy: {},
  1053. symbols_: {"error":2,"mermaidDoc":3,"graphConfig":4,"CLASS_DIAGRAM":5,"NEWLINE":6,"statements":7,"EOF":8,"statement":9,"className":10,"alphaNumToken":11,"relationStatement":12,"LABEL":13,"classStatement":14,"methodStatement":15,"CLASS":16,"STRUCT_START":17,"members":18,"STRUCT_STOP":19,"MEMBER":20,"SEPARATOR":21,"relation":22,"STR":23,"relationType":24,"lineType":25,"AGGREGATION":26,"EXTENSION":27,"COMPOSITION":28,"DEPENDENCY":29,"LINE":30,"DOTTED_LINE":31,"commentToken":32,"textToken":33,"graphCodeTokens":34,"textNoTagsToken":35,"TAGSTART":36,"TAGEND":37,"==":38,"--":39,"PCT":40,"DEFAULT":41,"SPACE":42,"MINUS":43,"keywords":44,"UNICODE_TEXT":45,"NUM":46,"ALPHA":47,"$accept":0,"$end":1},
  1054. terminals_: {2:"error",5:"CLASS_DIAGRAM",6:"NEWLINE",8:"EOF",13:"LABEL",16:"CLASS",17:"STRUCT_START",19:"STRUCT_STOP",20:"MEMBER",21:"SEPARATOR",23:"STR",26:"AGGREGATION",27:"EXTENSION",28:"COMPOSITION",29:"DEPENDENCY",30:"LINE",31:"DOTTED_LINE",34:"graphCodeTokens",36:"TAGSTART",37:"TAGEND",38:"==",39:"--",40:"PCT",41:"DEFAULT",42:"SPACE",43:"MINUS",44:"keywords",45:"UNICODE_TEXT",46:"NUM",47:"ALPHA"},
  1055. productions_: [0,[3,1],[4,4],[7,1],[7,2],[7,3],[10,2],[10,1],[9,1],[9,2],[9,1],[9,1],[14,2],[14,5],[18,1],[18,2],[15,1],[15,2],[15,1],[15,1],[12,3],[12,4],[12,4],[12,5],[22,3],[22,2],[22,2],[22,1],[24,1],[24,1],[24,1],[24,1],[25,1],[25,1],[32,1],[32,1],[33,1],[33,1],[33,1],[33,1],[33,1],[33,1],[33,1],[35,1],[35,1],[35,1],[35,1],[11,1],[11,1],[11,1]],
  1056. performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
  1057. /* this == yyval */
  1058. var $0 = $$.length - 1;
  1059. switch (yystate) {
  1060. case 6:
  1061. this.$=$$[$0-1]+$$[$0];
  1062. break;
  1063. case 7:
  1064. this.$=$$[$0];
  1065. break;
  1066. case 8:
  1067. yy.addRelation($$[$0]);
  1068. break;
  1069. case 9:
  1070. $$[$0-1].title = yy.cleanupLabel($$[$0]); yy.addRelation($$[$0-1]);
  1071. break;
  1072. case 12:
  1073. yy.addClass($$[$0]);
  1074. break;
  1075. case 13:
  1076. /*console.log($$[$0-3],JSON.stringify($$[$0-1]));*/yy.addClass($$[$0-3]);yy.addMembers($$[$0-3],$$[$0-1]);
  1077. break;
  1078. case 14:
  1079. this.$ = [$$[$0]];
  1080. break;
  1081. case 15:
  1082. $$[$0].push($$[$0-1]);this.$=$$[$0];
  1083. break;
  1084. case 16:
  1085. /*console.log('Rel found',$$[$0]);*/
  1086. break;
  1087. case 17:
  1088. yy.addMember($$[$0-1],yy.cleanupLabel($$[$0]));
  1089. break;
  1090. case 18:
  1091. console.warn('Member',$$[$0]);
  1092. break;
  1093. case 19:
  1094. /*console.log('sep found',$$[$0]);*/
  1095. break;
  1096. case 20:
  1097. this.$ = {'id1':$$[$0-2],'id2':$$[$0], relation:$$[$0-1], relationTitle1:'none', relationTitle2:'none'};
  1098. break;
  1099. case 21:
  1100. this.$ = {id1:$$[$0-3], id2:$$[$0], relation:$$[$0-1], relationTitle1:$$[$0-2], relationTitle2:'none'}
  1101. break;
  1102. case 22:
  1103. this.$ = {id1:$$[$0-3], id2:$$[$0], relation:$$[$0-2], relationTitle1:'none', relationTitle2:$$[$0-1]};
  1104. break;
  1105. case 23:
  1106. this.$ = {id1:$$[$0-4], id2:$$[$0], relation:$$[$0-2], relationTitle1:$$[$0-3], relationTitle2:$$[$0-1]}
  1107. break;
  1108. case 24:
  1109. this.$={type1:$$[$0-2],type2:$$[$0],lineType:$$[$0-1]};
  1110. break;
  1111. case 25:
  1112. this.$={type1:'none',type2:$$[$0],lineType:$$[$0-1]};
  1113. break;
  1114. case 26:
  1115. this.$={type1:$$[$0-1],type2:'none',lineType:$$[$0]};
  1116. break;
  1117. case 27:
  1118. this.$={type1:'none',type2:'none',lineType:$$[$0]};
  1119. break;
  1120. case 28:
  1121. this.$=yy.relationType.AGGREGATION;
  1122. break;
  1123. case 29:
  1124. this.$=yy.relationType.EXTENSION;
  1125. break;
  1126. case 30:
  1127. this.$=yy.relationType.COMPOSITION;
  1128. break;
  1129. case 31:
  1130. this.$=yy.relationType.DEPENDENCY;
  1131. break;
  1132. case 32:
  1133. this.$=yy.lineType.LINE;
  1134. break;
  1135. case 33:
  1136. this.$=yy.lineType.DOTTED_LINE;
  1137. break;
  1138. }
  1139. },
  1140. table: [{3:1,4:2,5:[1,3]},{1:[3]},{1:[2,1]},{6:[1,4]},{7:5,9:6,10:10,11:14,12:7,14:8,15:9,16:$V0,20:$V1,21:$V2,45:$V3,46:$V4,47:$V5},{8:[1,18]},{6:[1,19],8:[2,3]},o($V6,[2,8],{13:[1,20]}),o($V6,[2,10]),o($V6,[2,11]),o($V6,[2,16],{22:21,24:24,25:25,13:[1,23],23:[1,22],26:$V7,27:$V8,28:$V9,29:$Va,30:$Vb,31:$Vc}),{10:32,11:14,45:$V3,46:$V4,47:$V5},o($V6,[2,18]),o($V6,[2,19]),o($Vd,[2,7],{11:14,10:33,45:$V3,46:$V4,47:$V5}),o($Ve,[2,47]),o($Ve,[2,48]),o($Ve,[2,49]),{1:[2,2]},{7:34,8:[2,4],9:6,10:10,11:14,12:7,14:8,15:9,16:$V0,20:$V1,21:$V2,45:$V3,46:$V4,47:$V5},o($V6,[2,9]),{10:35,11:14,23:[1,36],45:$V3,46:$V4,47:$V5},{22:37,24:24,25:25,26:$V7,27:$V8,28:$V9,29:$Va,30:$Vb,31:$Vc},o($V6,[2,17]),{25:38,30:$Vb,31:$Vc},o($Vf,[2,27],{24:39,26:$V7,27:$V8,28:$V9,29:$Va}),o($Vg,[2,28]),o($Vg,[2,29]),o($Vg,[2,30]),o($Vg,[2,31]),o($Vh,[2,32]),o($Vh,[2,33]),o($V6,[2,12],{17:[1,40]}),o($Vd,[2,6]),{8:[2,5]},o($Vi,[2,20]),{10:41,11:14,45:$V3,46:$V4,47:$V5},{10:42,11:14,23:[1,43],45:$V3,46:$V4,47:$V5},o($Vf,[2,26],{24:44,26:$V7,27:$V8,28:$V9,29:$Va}),o($Vf,[2,25]),{18:45,20:$Vj},o($Vi,[2,22]),o($Vi,[2,21]),{10:47,11:14,45:$V3,46:$V4,47:$V5},o($Vf,[2,24]),{19:[1,48]},{18:49,19:[2,14],20:$Vj},o($Vi,[2,23]),o($V6,[2,13]),{19:[2,15]}],
  1141. defaultActions: {2:[2,1],18:[2,2],34:[2,5],49:[2,15]},
  1142. parseError: function parseError (str, hash) {
  1143. if (hash.recoverable) {
  1144. this.trace(str);
  1145. } else {
  1146. var error = new Error(str);
  1147. error.hash = hash;
  1148. throw error;
  1149. }
  1150. },
  1151. parse: function parse(input) {
  1152. var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
  1153. var args = lstack.slice.call(arguments, 1);
  1154. var lexer = Object.create(this.lexer);
  1155. var sharedState = { yy: {} };
  1156. for (var k in this.yy) {
  1157. if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
  1158. sharedState.yy[k] = this.yy[k];
  1159. }
  1160. }
  1161. lexer.setInput(input, sharedState.yy);
  1162. sharedState.yy.lexer = lexer;
  1163. sharedState.yy.parser = this;
  1164. if (typeof lexer.yylloc == 'undefined') {
  1165. lexer.yylloc = {};
  1166. }
  1167. var yyloc = lexer.yylloc;
  1168. lstack.push(yyloc);
  1169. var ranges = lexer.options && lexer.options.ranges;
  1170. if (typeof sharedState.yy.parseError === 'function') {
  1171. this.parseError = sharedState.yy.parseError;
  1172. } else {
  1173. this.parseError = Object.getPrototypeOf(this).parseError;
  1174. }
  1175. function popStack(n) {
  1176. stack.length = stack.length - 2 * n;
  1177. vstack.length = vstack.length - n;
  1178. lstack.length = lstack.length - n;
  1179. }
  1180. function lex() {
  1181. var token;
  1182. token = tstack.pop() || lexer.lex() || EOF;
  1183. if (typeof token !== 'number') {
  1184. if (token instanceof Array) {
  1185. tstack = token;
  1186. token = tstack.pop();
  1187. }
  1188. token = self.symbols_[token] || token;
  1189. }
  1190. return token;
  1191. }
  1192. var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
  1193. while (true) {
  1194. state = stack[stack.length - 1];
  1195. if (this.defaultActions[state]) {
  1196. action = this.defaultActions[state];
  1197. } else {
  1198. if (symbol === null || typeof symbol == 'undefined') {
  1199. symbol = lex();
  1200. }
  1201. action = table[state] && table[state][symbol];
  1202. }
  1203. if (typeof action === 'undefined' || !action.length || !action[0]) {
  1204. var errStr = '';
  1205. expected = [];
  1206. for (p in table[state]) {
  1207. if (this.terminals_[p] && p > TERROR) {
  1208. expected.push('\'' + this.terminals_[p] + '\'');
  1209. }
  1210. }
  1211. if (lexer.showPosition) {
  1212. errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
  1213. } else {
  1214. errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
  1215. }
  1216. this.parseError(errStr, {
  1217. text: lexer.match,
  1218. token: this.terminals_[symbol] || symbol,
  1219. line: lexer.yylineno,
  1220. loc: yyloc,
  1221. expected: expected
  1222. });
  1223. }
  1224. if (action[0] instanceof Array && action.length > 1) {
  1225. throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
  1226. }
  1227. switch (action[0]) {
  1228. case 1:
  1229. stack.push(symbol);
  1230. vstack.push(lexer.yytext);
  1231. lstack.push(lexer.yylloc);
  1232. stack.push(action[1]);
  1233. symbol = null;
  1234. if (!preErrorSymbol) {
  1235. yyleng = lexer.yyleng;
  1236. yytext = lexer.yytext;
  1237. yylineno = lexer.yylineno;
  1238. yyloc = lexer.yylloc;
  1239. if (recovering > 0) {
  1240. recovering--;
  1241. }
  1242. } else {
  1243. symbol = preErrorSymbol;
  1244. preErrorSymbol = null;
  1245. }
  1246. break;
  1247. case 2:
  1248. len = this.productions_[action[1]][1];
  1249. yyval.$ = vstack[vstack.length - len];
  1250. yyval._$ = {
  1251. first_line: lstack[lstack.length - (len || 1)].first_line,
  1252. last_line: lstack[lstack.length - 1].last_line,
  1253. first_column: lstack[lstack.length - (len || 1)].first_column,
  1254. last_column: lstack[lstack.length - 1].last_column
  1255. };
  1256. if (ranges) {
  1257. yyval._$.range = [
  1258. lstack[lstack.length - (len || 1)].range[0],
  1259. lstack[lstack.length - 1].range[1]
  1260. ];
  1261. }
  1262. r = this.performAction.apply(yyval, [
  1263. yytext,
  1264. yyleng,
  1265. yylineno,
  1266. sharedState.yy,
  1267. action[1],
  1268. vstack,
  1269. lstack
  1270. ].concat(args));
  1271. if (typeof r !== 'undefined') {
  1272. return r;
  1273. }
  1274. if (len) {
  1275. stack = stack.slice(0, -1 * len * 2);
  1276. vstack = vstack.slice(0, -1 * len);
  1277. lstack = lstack.slice(0, -1 * len);
  1278. }
  1279. stack.push(this.productions_[action[1]][0]);
  1280. vstack.push(yyval.$);
  1281. lstack.push(yyval._$);
  1282. newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
  1283. stack.push(newState);
  1284. break;
  1285. case 3:
  1286. return true;
  1287. }
  1288. }
  1289. return true;
  1290. }};
  1291. /* generated by jison-lex 0.3.4 */
  1292. var lexer = (function(){
  1293. var lexer = ({
  1294. EOF:1,
  1295. parseError:function parseError(str, hash) {
  1296. if (this.yy.parser) {
  1297. this.yy.parser.parseError(str, hash);
  1298. } else {
  1299. throw new Error(str);
  1300. }
  1301. },
  1302. // resets the lexer, sets new input
  1303. setInput:function (input, yy) {
  1304. this.yy = yy || this.yy || {};
  1305. this._input = input;
  1306. this._more = this._backtrack = this.done = false;
  1307. this.yylineno = this.yyleng = 0;
  1308. this.yytext = this.matched = this.match = '';
  1309. this.conditionStack = ['INITIAL'];
  1310. this.yylloc = {
  1311. first_line: 1,
  1312. first_column: 0,
  1313. last_line: 1,
  1314. last_column: 0
  1315. };
  1316. if (this.options.ranges) {
  1317. this.yylloc.range = [0,0];
  1318. }
  1319. this.offset = 0;
  1320. return this;
  1321. },
  1322. // consumes and returns one char from the input
  1323. input:function () {
  1324. var ch = this._input[0];
  1325. this.yytext += ch;
  1326. this.yyleng++;
  1327. this.offset++;
  1328. this.match += ch;
  1329. this.matched += ch;
  1330. var lines = ch.match(/(?:\r\n?|\n).*/g);
  1331. if (lines) {
  1332. this.yylineno++;
  1333. this.yylloc.last_line++;
  1334. } else {
  1335. this.yylloc.last_column++;
  1336. }
  1337. if (this.options.ranges) {
  1338. this.yylloc.range[1]++;
  1339. }
  1340. this._input = this._input.slice(1);
  1341. return ch;
  1342. },
  1343. // unshifts one char (or a string) into the input
  1344. unput:function (ch) {
  1345. var len = ch.length;
  1346. var lines = ch.split(/(?:\r\n?|\n)/g);
  1347. this._input = ch + this._input;
  1348. this.yytext = this.yytext.substr(0, this.yytext.length - len);
  1349. //this.yyleng -= len;
  1350. this.offset -= len;
  1351. var oldLines = this.match.split(/(?:\r\n?|\n)/g);
  1352. this.match = this.match.substr(0, this.match.length - 1);
  1353. this.matched = this.matched.substr(0, this.matched.length - 1);
  1354. if (lines.length - 1) {
  1355. this.yylineno -= lines.length - 1;
  1356. }
  1357. var r = this.yylloc.range;
  1358. this.yylloc = {
  1359. first_line: this.yylloc.first_line,
  1360. last_line: this.yylineno + 1,
  1361. first_column: this.yylloc.first_column,
  1362. last_column: lines ?
  1363. (lines.length === oldLines.length ? this.yylloc.first_column : 0)
  1364. + oldLines[oldLines.length - lines.length].length - lines[0].length :
  1365. this.yylloc.first_column - len
  1366. };
  1367. if (this.options.ranges) {
  1368. this.yylloc.range = [r[0], r[0] + this.yyleng - len];
  1369. }
  1370. this.yyleng = this.yytext.length;
  1371. return this;
  1372. },
  1373. // When called from action, caches matched text and appends it on next action
  1374. more:function () {
  1375. this._more = true;
  1376. return this;
  1377. },
  1378. // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
  1379. reject:function () {
  1380. if (this.options.backtrack_lexer) {
  1381. this._backtrack = true;
  1382. } else {
  1383. 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).\n' + this.showPosition(), {
  1384. text: "",
  1385. token: null,
  1386. line: this.yylineno
  1387. });
  1388. }
  1389. return this;
  1390. },
  1391. // retain first n characters of the match
  1392. less:function (n) {
  1393. this.unput(this.match.slice(n));
  1394. },
  1395. // displays already matched input, i.e. for error messages
  1396. pastInput:function () {
  1397. var past = this.matched.substr(0, this.matched.length - this.match.length);
  1398. return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
  1399. },
  1400. // displays upcoming input, i.e. for error messages
  1401. upcomingInput:function () {
  1402. var next = this.match;
  1403. if (next.length < 20) {
  1404. next += this._input.substr(0, 20-next.length);
  1405. }
  1406. return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
  1407. },
  1408. // displays the character position where the lexing error occurred, i.e. for error messages
  1409. showPosition:function () {
  1410. var pre = this.pastInput();
  1411. var c = new Array(pre.length + 1).join("-");
  1412. return pre + this.upcomingInput() + "\n" + c + "^";
  1413. },
  1414. // test the lexed token: return FALSE when not a match, otherwise return token
  1415. test_match:function(match, indexed_rule) {
  1416. var token,
  1417. lines,
  1418. backup;
  1419. if (this.options.backtrack_lexer) {
  1420. // save context
  1421. backup = {
  1422. yylineno: this.yylineno,
  1423. yylloc: {
  1424. first_line: this.yylloc.first_line,
  1425. last_line: this.last_line,
  1426. first_column: this.yylloc.first_column,
  1427. last_column: this.yylloc.last_column
  1428. },
  1429. yytext: this.yytext,
  1430. match: this.match,
  1431. matches: this.matches,
  1432. matched: this.matched,
  1433. yyleng: this.yyleng,
  1434. offset: this.offset,
  1435. _more: this._more,
  1436. _input: this._input,
  1437. yy: this.yy,
  1438. conditionStack: this.conditionStack.slice(0),
  1439. done: this.done
  1440. };
  1441. if (this.options.ranges) {
  1442. backup.yylloc.range = this.yylloc.range.slice(0);
  1443. }
  1444. }
  1445. lines = match[0].match(/(?:\r\n?|\n).*/g);
  1446. if (lines) {
  1447. this.yylineno += lines.length;
  1448. }
  1449. this.yylloc = {
  1450. first_line: this.yylloc.last_line,
  1451. last_line: this.yylineno + 1,
  1452. first_column: this.yylloc.last_column,
  1453. last_column: lines ?
  1454. lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
  1455. this.yylloc.last_column + match[0].length
  1456. };
  1457. this.yytext += match[0];
  1458. this.match += match[0];
  1459. this.matches = match;
  1460. this.yyleng = this.yytext.length;
  1461. if (this.options.ranges) {
  1462. this.yylloc.range = [this.offset, this.offset += this.yyleng];
  1463. }
  1464. this._more = false;
  1465. this._backtrack = false;
  1466. this._input = this._input.slice(match[0].length);
  1467. this.matched += match[0];
  1468. token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
  1469. if (this.done && this._input) {
  1470. this.done = false;
  1471. }
  1472. if (token) {
  1473. return token;
  1474. } else if (this._backtrack) {
  1475. // recover context
  1476. for (var k in backup) {
  1477. this[k] = backup[k];
  1478. }
  1479. return false; // rule action called reject() implying the next rule should be tested instead.
  1480. }
  1481. return false;
  1482. },
  1483. // return next match in input
  1484. next:function () {
  1485. if (this.done) {
  1486. return this.EOF;
  1487. }
  1488. if (!this._input) {
  1489. this.done = true;
  1490. }
  1491. var token,
  1492. match,
  1493. tempMatch,
  1494. index;
  1495. if (!this._more) {
  1496. this.yytext = '';
  1497. this.match = '';
  1498. }
  1499. var rules = this._currentRules();
  1500. for (var i = 0; i < rules.length; i++) {
  1501. tempMatch = this._input.match(this.rules[rules[i]]);
  1502. if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
  1503. match = tempMatch;
  1504. index = i;
  1505. if (this.options.backtrack_lexer) {
  1506. token = this.test_match(tempMatch, rules[i]);
  1507. if (token !== false) {
  1508. return token;
  1509. } else if (this._backtrack) {
  1510. match = false;
  1511. continue; // rule action called reject() implying a rule MISmatch.
  1512. } else {
  1513. // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
  1514. return false;
  1515. }
  1516. } else if (!this.options.flex) {
  1517. break;
  1518. }
  1519. }
  1520. }
  1521. if (match) {
  1522. token = this.test_match(match, rules[index]);
  1523. if (token !== false) {
  1524. return token;
  1525. }
  1526. // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
  1527. return false;
  1528. }
  1529. if (this._input === "") {
  1530. return this.EOF;
  1531. } else {
  1532. return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
  1533. text: "",
  1534. token: null,
  1535. line: this.yylineno
  1536. });
  1537. }
  1538. },
  1539. // return next match that has a token
  1540. lex:function lex () {
  1541. var r = this.next();
  1542. if (r) {
  1543. return r;
  1544. } else {
  1545. return this.lex();
  1546. }
  1547. },
  1548. // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
  1549. begin:function begin (condition) {
  1550. this.conditionStack.push(condition);
  1551. },
  1552. // pop the previously active lexer condition state off the condition stack
  1553. popState:function popState () {
  1554. var n = this.conditionStack.length - 1;
  1555. if (n > 0) {
  1556. return this.conditionStack.pop();
  1557. } else {
  1558. return this.conditionStack[0];
  1559. }
  1560. },
  1561. // produce the lexer rule set which is active for the currently active lexer condition state
  1562. _currentRules:function _currentRules () {
  1563. if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
  1564. return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
  1565. } else {
  1566. return this.conditions["INITIAL"].rules;
  1567. }
  1568. },
  1569. // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
  1570. topState:function topState (n) {
  1571. n = this.conditionStack.length - 1 - Math.abs(n || 0);
  1572. if (n >= 0) {
  1573. return this.conditionStack[n];
  1574. } else {
  1575. return "INITIAL";
  1576. }
  1577. },
  1578. // alias for begin(condition)
  1579. pushState:function pushState (condition) {
  1580. this.begin(condition);
  1581. },
  1582. // return the number of states currently on the stack
  1583. stateStackSize:function stateStackSize() {
  1584. return this.conditionStack.length;
  1585. },
  1586. options: {},
  1587. performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
  1588. var YYSTATE=YY_START;
  1589. switch($avoiding_name_collisions) {
  1590. case 0:/* do nothing */
  1591. break;
  1592. case 1:return 6;
  1593. break;
  1594. case 2:/* skip whitespace */
  1595. break;
  1596. case 3:return 5;
  1597. break;
  1598. case 4: this.begin("struct"); /*console.log('Starting struct');*/return 17;
  1599. break;
  1600. case 5: /*console.log('Ending struct');*/this.popState(); return 19;
  1601. break;
  1602. case 6:/* nothing */
  1603. break;
  1604. case 7: /*console.log('lex-member: ' + yy_.yytext);*/ return "MEMBER";
  1605. break;
  1606. case 8:return 16;
  1607. break;
  1608. case 9:this.begin("string");
  1609. break;
  1610. case 10:this.popState();
  1611. break;
  1612. case 11:return "STR";
  1613. break;
  1614. case 12:return 27;
  1615. break;
  1616. case 13:return 27;
  1617. break;
  1618. case 14:return 29;
  1619. break;
  1620. case 15:return 29;
  1621. break;
  1622. case 16:return 28;
  1623. break;
  1624. case 17:return 26;
  1625. break;
  1626. case 18:return 30;
  1627. break;
  1628. case 19:return 31;
  1629. break;
  1630. case 20:return 13;
  1631. break;
  1632. case 21:return 43;
  1633. break;
  1634. case 22:return 'DOT';
  1635. break;
  1636. case 23:return 'PLUS';
  1637. break;
  1638. case 24:return 40;
  1639. break;
  1640. case 25:return 'EQUALS';
  1641. break;
  1642. case 26:return 'EQUALS';
  1643. break;
  1644. case 27:return 47;
  1645. break;
  1646. case 28:return 'PUNCTUATION';
  1647. break;
  1648. case 29:return 46;
  1649. break;
  1650. case 30:return 45;
  1651. break;
  1652. case 31:return 42;
  1653. break;
  1654. case 32:return 8;
  1655. break;
  1656. }
  1657. },
  1658. rules: [/^(?:%%[^\n]*)/,/^(?:\n+)/,/^(?:\s+)/,/^(?:classDiagram\b)/,/^(?:[\{])/,/^(?:\})/,/^(?:[\n])/,/^(?:[^\{\}\n]*)/,/^(?:class\b)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::[^#\n;]+)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:[A-Za-z]+)/,/^(?:[!"#$%&'*+,-.`?\\_\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],
  1659. conditions: {"string":{"rules":[10,11],"inclusive":false},"struct":{"rules":[5,6,7],"inclusive":false},"INITIAL":{"rules":[0,1,2,3,4,8,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],"inclusive":true}}
  1660. });
  1661. return lexer;
  1662. })();
  1663. parser.lexer = lexer;
  1664. function Parser () {
  1665. this.yy = {};
  1666. }
  1667. Parser.prototype = parser;parser.Parser = Parser;
  1668. return new Parser;
  1669. })();
  1670. if (true) {
  1671. exports.parser = parser;
  1672. exports.Parser = parser.Parser;
  1673. exports.parse = function () { return parser.parse.apply(parser, arguments); };
  1674. exports.main = function commonjsMain (args) {
  1675. if (!args[1]) {
  1676. console.log('Usage: '+args[0]+' FILE');
  1677. process.exit(1);
  1678. }
  1679. var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
  1680. return exports.parser.parse(source);
  1681. };
  1682. if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
  1683. exports.main(process.argv.slice(1));
  1684. }
  1685. }
  1686. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
  1687. /***/ }),
  1688. /***/ "./src/diagrams/flowchart/flowDb.js":
  1689. /*!******************************************!*\
  1690. !*** ./src/diagrams/flowchart/flowDb.js ***!
  1691. \******************************************/
  1692. /*! exports provided: addVertex, addLink, updateLinkInterpolate, updateLink, addClass, setDirection, setClass, setLink, getTooltip, setClickEvent, bindFunctions, getDirection, getVertices, getEdges, getClasses, clear, defaultStyle, addSubGraph, getDepthFirstPos, indexNodes, getSubGraphs, default */
  1693. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1694. "use strict";
  1695. __webpack_require__.r(__webpack_exports__);
  1696. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addVertex", function() { return addVertex; });
  1697. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addLink", function() { return addLink; });
  1698. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateLinkInterpolate", function() { return updateLinkInterpolate; });
  1699. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateLink", function() { return updateLink; });
  1700. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addClass", function() { return addClass; });
  1701. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDirection", function() { return setDirection; });
  1702. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setClass", function() { return setClass; });
  1703. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLink", function() { return setLink; });
  1704. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTooltip", function() { return getTooltip; });
  1705. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setClickEvent", function() { return setClickEvent; });
  1706. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindFunctions", function() { return bindFunctions; });
  1707. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDirection", function() { return getDirection; });
  1708. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getVertices", function() { return getVertices; });
  1709. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getEdges", function() { return getEdges; });
  1710. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClasses", function() { return getClasses; });
  1711. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
  1712. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultStyle", function() { return defaultStyle; });
  1713. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addSubGraph", function() { return addSubGraph; });
  1714. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDepthFirstPos", function() { return getDepthFirstPos; });
  1715. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "indexNodes", function() { return indexNodes; });
  1716. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSubGraphs", function() { return getSubGraphs; });
  1717. /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
  1718. /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
  1719. /* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @braintree/sanitize-url */ "@braintree/sanitize-url");
  1720. /* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__);
  1721. /* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
  1722. /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils */ "./src/utils.js");
  1723. /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../config */ "./src/config.js");
  1724. const config = Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])();
  1725. let vertices = {};
  1726. let edges = [];
  1727. let classes = [];
  1728. let subGraphs = [];
  1729. let subGraphLookup = {};
  1730. let tooltips = {};
  1731. let subCount = 0;
  1732. let direction; // Functions to be run after graph rendering
  1733. let funs = [];
  1734. const sanitize = text => {
  1735. let txt = text;
  1736. if (config.securityLevel !== 'loose') {
  1737. txt = txt.replace(/<br>/g, '#br#');
  1738. txt = txt.replace(/<br\S*?\/>/g, '#br#');
  1739. txt = txt.replace(/</g, '&lt;').replace(/>/g, '&gt;');
  1740. txt = txt.replace(/=/g, '&equals;');
  1741. txt = txt.replace(/#br#/g, '<br/>');
  1742. }
  1743. return txt;
  1744. };
  1745. /**
  1746. * Function called by parser when a node definition has been found
  1747. * @param id
  1748. * @param text
  1749. * @param type
  1750. * @param style
  1751. * @param classes
  1752. */
  1753. const addVertex = function (_id, text, type, style, classes) {
  1754. let txt;
  1755. let id = _id;
  1756. if (typeof id === 'undefined') {
  1757. return;
  1758. }
  1759. if (id.trim().length === 0) {
  1760. return;
  1761. }
  1762. if (id[0].match(/\d/)) id = 's' + id;
  1763. if (typeof vertices[id] === 'undefined') {
  1764. vertices[id] = {
  1765. id: id,
  1766. styles: [],
  1767. classes: []
  1768. };
  1769. }
  1770. if (typeof text !== 'undefined') {
  1771. txt = sanitize(text.trim()); // strip quotes if string starts and exnds with a quote
  1772. if (txt[0] === '"' && txt[txt.length - 1] === '"') {
  1773. txt = txt.substring(1, txt.length - 1);
  1774. }
  1775. vertices[id].text = txt;
  1776. }
  1777. if (typeof type !== 'undefined') {
  1778. vertices[id].type = type;
  1779. }
  1780. if (typeof style !== 'undefined') {
  1781. if (style !== null) {
  1782. style.forEach(function (s) {
  1783. vertices[id].styles.push(s);
  1784. });
  1785. }
  1786. }
  1787. if (typeof classes !== 'undefined') {
  1788. if (classes !== null) {
  1789. classes.forEach(function (s) {
  1790. vertices[id].classes.push(s);
  1791. });
  1792. }
  1793. }
  1794. };
  1795. /**
  1796. * Function called by parser when a link/edge definition has been found
  1797. * @param start
  1798. * @param end
  1799. * @param type
  1800. * @param linktext
  1801. */
  1802. const addLink = function (_start, _end, type, linktext) {
  1803. let start = _start;
  1804. let end = _end;
  1805. if (start[0].match(/\d/)) start = 's' + start;
  1806. if (end[0].match(/\d/)) end = 's' + end;
  1807. _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].info('Got edge...', start, end);
  1808. const edge = {
  1809. start: start,
  1810. end: end,
  1811. type: undefined,
  1812. text: ''
  1813. };
  1814. linktext = type.text;
  1815. if (typeof linktext !== 'undefined') {
  1816. edge.text = sanitize(linktext.trim()); // strip quotes if string starts and exnds with a quote
  1817. if (edge.text[0] === '"' && edge.text[edge.text.length - 1] === '"') {
  1818. edge.text = edge.text.substring(1, edge.text.length - 1);
  1819. }
  1820. }
  1821. if (typeof type !== 'undefined') {
  1822. edge.type = type.type;
  1823. edge.stroke = type.stroke;
  1824. }
  1825. edges.push(edge);
  1826. };
  1827. /**
  1828. * Updates a link's line interpolation algorithm
  1829. * @param pos
  1830. * @param interpolate
  1831. */
  1832. const updateLinkInterpolate = function (positions, interp) {
  1833. positions.forEach(function (pos) {
  1834. if (pos === 'default') {
  1835. edges.defaultInterpolate = interp;
  1836. } else {
  1837. edges[pos].interpolate = interp;
  1838. }
  1839. });
  1840. };
  1841. /**
  1842. * Updates a link with a style
  1843. * @param pos
  1844. * @param style
  1845. */
  1846. const updateLink = function (positions, style) {
  1847. positions.forEach(function (pos) {
  1848. if (pos === 'default') {
  1849. edges.defaultStyle = style;
  1850. } else {
  1851. if (_utils__WEBPACK_IMPORTED_MODULE_3__["default"].isSubstringInArray('fill', style) === -1) {
  1852. style.push('fill:none');
  1853. }
  1854. edges[pos].style = style;
  1855. }
  1856. });
  1857. };
  1858. const addClass = function (id, style) {
  1859. if (typeof classes[id] === 'undefined') {
  1860. classes[id] = {
  1861. id: id,
  1862. styles: []
  1863. };
  1864. }
  1865. if (typeof style !== 'undefined') {
  1866. if (style !== null) {
  1867. style.forEach(function (s) {
  1868. classes[id].styles.push(s);
  1869. });
  1870. }
  1871. }
  1872. };
  1873. /**
  1874. * Called by parser when a graph definition is found, stores the direction of the chart.
  1875. * @param dir
  1876. */
  1877. const setDirection = function (dir) {
  1878. direction = dir;
  1879. };
  1880. /**
  1881. * Called by parser when a special node is found, e.g. a clickable element.
  1882. * @param ids Comma separated list of ids
  1883. * @param className Class to add
  1884. */
  1885. const setClass = function (ids, className) {
  1886. ids.split(',').forEach(function (id) {
  1887. if (typeof vertices[id] !== 'undefined') {
  1888. vertices[id].classes.push(className);
  1889. }
  1890. if (typeof subGraphLookup[id] !== 'undefined') {
  1891. subGraphLookup[id].classes.push(className);
  1892. }
  1893. });
  1894. };
  1895. const setTooltip = function (ids, tooltip) {
  1896. ids.split(',').forEach(function (id) {
  1897. if (typeof tooltip !== 'undefined') {
  1898. tooltips[id] = sanitize(tooltip);
  1899. }
  1900. });
  1901. };
  1902. const setClickFun = function (id, functionName) {
  1903. if (config.securityLevel !== 'loose') {
  1904. return;
  1905. }
  1906. if (typeof functionName === 'undefined') {
  1907. return;
  1908. }
  1909. if (typeof vertices[id] !== 'undefined') {
  1910. funs.push(function (element) {
  1911. const elem = document.querySelector(`[id="${id}"]`);
  1912. if (elem !== null) {
  1913. elem.addEventListener('click', function () {
  1914. window[functionName](id);
  1915. }, false);
  1916. }
  1917. });
  1918. }
  1919. };
  1920. /**
  1921. * Called by parser when a link is found. Adds the URL to the vertex data.
  1922. * @param ids Comma separated list of ids
  1923. * @param linkStr URL to create a link for
  1924. * @param tooltip Tooltip for the clickable element
  1925. */
  1926. const setLink = function (ids, linkStr, tooltip) {
  1927. ids.split(',').forEach(function (id) {
  1928. if (typeof vertices[id] !== 'undefined') {
  1929. if (config.securityLevel !== 'loose') {
  1930. vertices[id].link = Object(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__["sanitizeUrl"])(linkStr); // .replace(/javascript:.*/g, '')
  1931. } else {
  1932. vertices[id].link = linkStr;
  1933. }
  1934. }
  1935. });
  1936. setTooltip(ids, tooltip);
  1937. setClass(ids, 'clickable');
  1938. };
  1939. const getTooltip = function (id) {
  1940. return tooltips[id];
  1941. };
  1942. /**
  1943. * Called by parser when a click definition is found. Registers an event handler.
  1944. * @param ids Comma separated list of ids
  1945. * @param functionName Function to be called on click
  1946. * @param tooltip Tooltip for the clickable element
  1947. */
  1948. const setClickEvent = function (ids, functionName, tooltip) {
  1949. ids.split(',').forEach(function (id) {
  1950. setClickFun(id, functionName);
  1951. });
  1952. setTooltip(ids, tooltip);
  1953. setClass(ids, 'clickable');
  1954. };
  1955. const bindFunctions = function (element) {
  1956. funs.forEach(function (fun) {
  1957. fun(element);
  1958. });
  1959. };
  1960. const getDirection = function () {
  1961. return direction;
  1962. };
  1963. /**
  1964. * Retrieval function for fetching the found nodes after parsing has completed.
  1965. * @returns {{}|*|vertices}
  1966. */
  1967. const getVertices = function () {
  1968. return vertices;
  1969. };
  1970. /**
  1971. * Retrieval function for fetching the found links after parsing has completed.
  1972. * @returns {{}|*|edges}
  1973. */
  1974. const getEdges = function () {
  1975. return edges;
  1976. };
  1977. /**
  1978. * Retrieval function for fetching the found class definitions after parsing has completed.
  1979. * @returns {{}|*|classes}
  1980. */
  1981. const getClasses = function () {
  1982. return classes;
  1983. };
  1984. const setupToolTips = function (element) {
  1985. let tooltipElem = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('.mermaidTooltip');
  1986. if ((tooltipElem._groups || tooltipElem)[0][0] === null) {
  1987. tooltipElem = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('body').append('div').attr('class', 'mermaidTooltip').style('opacity', 0);
  1988. }
  1989. const svg = d3__WEBPACK_IMPORTED_MODULE_0__["select"](element).select('svg');
  1990. const nodes = svg.selectAll('g.node');
  1991. nodes.on('mouseover', function () {
  1992. const el = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this);
  1993. const title = el.attr('title'); // Dont try to draw a tooltip if no data is provided
  1994. if (title === null) {
  1995. return;
  1996. }
  1997. const rect = this.getBoundingClientRect();
  1998. tooltipElem.transition().duration(200).style('opacity', '.9');
  1999. tooltipElem.html(el.attr('title')).style('left', rect.left + (rect.right - rect.left) / 2 + 'px').style('top', rect.top - 14 + document.body.scrollTop + 'px');
  2000. el.classed('hover', true);
  2001. }).on('mouseout', function () {
  2002. tooltipElem.transition().duration(500).style('opacity', 0);
  2003. const el = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this);
  2004. el.classed('hover', false);
  2005. });
  2006. };
  2007. funs.push(setupToolTips);
  2008. /**
  2009. * Clears the internal graph db so that a new graph can be parsed.
  2010. */
  2011. const clear = function () {
  2012. vertices = {};
  2013. classes = {};
  2014. edges = [];
  2015. funs = [];
  2016. funs.push(setupToolTips);
  2017. subGraphs = [];
  2018. subGraphLookup = {};
  2019. subCount = 0;
  2020. tooltips = [];
  2021. };
  2022. /**
  2023. *
  2024. * @returns {string}
  2025. */
  2026. const defaultStyle = function () {
  2027. return 'fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;';
  2028. };
  2029. /**
  2030. * Clears the internal graph db so that a new graph can be parsed.
  2031. */
  2032. const addSubGraph = function (_id, list, _title) {
  2033. let id = _id;
  2034. let title = _title;
  2035. if (_id === _title && _title.match(/\s/)) {
  2036. id = undefined;
  2037. }
  2038. function uniq(a) {
  2039. const prims = {
  2040. 'boolean': {},
  2041. 'number': {},
  2042. 'string': {}
  2043. };
  2044. const objs = [];
  2045. return a.filter(function (item) {
  2046. const type = typeof item;
  2047. if (item.trim() === '') {
  2048. return false;
  2049. }
  2050. if (type in prims) {
  2051. return prims[type].hasOwnProperty(item) ? false : prims[type][item] = true;
  2052. } else {
  2053. return objs.indexOf(item) >= 0 ? false : objs.push(item);
  2054. }
  2055. });
  2056. }
  2057. let nodeList = [];
  2058. nodeList = uniq(nodeList.concat.apply(nodeList, list));
  2059. id = id || 'subGraph' + subCount;
  2060. if (id[0].match(/\d/)) id = 's' + id;
  2061. title = title || '';
  2062. title = sanitize(title);
  2063. subCount = subCount + 1;
  2064. const subGraph = {
  2065. id: id,
  2066. nodes: nodeList,
  2067. title: title.trim(),
  2068. classes: []
  2069. };
  2070. subGraphs.push(subGraph);
  2071. subGraphLookup[id] = subGraph;
  2072. return id;
  2073. };
  2074. const getPosForId = function (id) {
  2075. for (let i = 0; i < subGraphs.length; i++) {
  2076. if (subGraphs[i].id === id) {
  2077. return i;
  2078. }
  2079. }
  2080. return -1;
  2081. };
  2082. let secCount = -1;
  2083. const posCrossRef = [];
  2084. const indexNodes2 = function (id, pos) {
  2085. const nodes = subGraphs[pos].nodes;
  2086. secCount = secCount + 1;
  2087. if (secCount > 2000) {
  2088. return;
  2089. }
  2090. posCrossRef[secCount] = pos; // Check if match
  2091. if (subGraphs[pos].id === id) {
  2092. return {
  2093. result: true,
  2094. count: 0
  2095. };
  2096. }
  2097. let count = 0;
  2098. let posCount = 1;
  2099. while (count < nodes.length) {
  2100. const childPos = getPosForId(nodes[count]); // Ignore regular nodes (pos will be -1)
  2101. if (childPos >= 0) {
  2102. const res = indexNodes2(id, childPos);
  2103. if (res.result) {
  2104. return {
  2105. result: true,
  2106. count: posCount + res.count
  2107. };
  2108. } else {
  2109. posCount = posCount + res.count;
  2110. }
  2111. }
  2112. count = count + 1;
  2113. }
  2114. return {
  2115. result: false,
  2116. count: posCount
  2117. };
  2118. };
  2119. const getDepthFirstPos = function (pos) {
  2120. return posCrossRef[pos];
  2121. };
  2122. const indexNodes = function () {
  2123. secCount = -1;
  2124. if (subGraphs.length > 0) {
  2125. indexNodes2('none', subGraphs.length - 1, 0);
  2126. }
  2127. };
  2128. const getSubGraphs = function () {
  2129. return subGraphs;
  2130. };
  2131. /* harmony default export */ __webpack_exports__["default"] = ({
  2132. addVertex,
  2133. addLink,
  2134. updateLinkInterpolate,
  2135. updateLink,
  2136. addClass,
  2137. setDirection,
  2138. setClass,
  2139. getTooltip,
  2140. setClickEvent,
  2141. setLink,
  2142. bindFunctions,
  2143. getDirection,
  2144. getVertices,
  2145. getEdges,
  2146. getClasses,
  2147. clear,
  2148. defaultStyle,
  2149. addSubGraph,
  2150. getDepthFirstPos,
  2151. indexNodes,
  2152. getSubGraphs
  2153. });
  2154. /***/ }),
  2155. /***/ "./src/diagrams/flowchart/flowRenderer.js":
  2156. /*!************************************************!*\
  2157. !*** ./src/diagrams/flowchart/flowRenderer.js ***!
  2158. \************************************************/
  2159. /*! exports provided: setConf, addVertices, addEdges, getClasses, draw, default */
  2160. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2161. "use strict";
  2162. __webpack_require__.r(__webpack_exports__);
  2163. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
  2164. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addVertices", function() { return addVertices; });
  2165. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addEdges", function() { return addEdges; });
  2166. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClasses", function() { return getClasses; });
  2167. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
  2168. /* harmony import */ var graphlibrary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! graphlibrary */ "graphlibrary");
  2169. /* harmony import */ var graphlibrary__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphlibrary__WEBPACK_IMPORTED_MODULE_0__);
  2170. /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3 */ "d3");
  2171. /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_1__);
  2172. /* harmony import */ var _flowDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./flowDb */ "./src/diagrams/flowchart/flowDb.js");
  2173. /* harmony import */ var _parser_flow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/flow */ "./src/diagrams/flowchart/parser/flow.jison");
  2174. /* harmony import */ var _parser_flow__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_flow__WEBPACK_IMPORTED_MODULE_3__);
  2175. /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../config */ "./src/config.js");
  2176. /* harmony import */ var dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! dagre-d3-renderer */ "dagre-d3-renderer");
  2177. /* harmony import */ var dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5__);
  2178. /* harmony import */ var dagre_d3_renderer_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! dagre-d3-renderer/lib/label/add-html-label.js */ "dagre-d3-renderer/lib/label/add-html-label.js");
  2179. /* harmony import */ var dagre_d3_renderer_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(dagre_d3_renderer_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6__);
  2180. /* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
  2181. /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils */ "./src/utils.js");
  2182. const conf = {};
  2183. const setConf = function (cnf) {
  2184. const keys = Object.keys(cnf);
  2185. for (let i = 0; i < keys.length; i++) {
  2186. conf[keys[i]] = cnf[keys[i]];
  2187. }
  2188. };
  2189. /**
  2190. * Function that adds the vertices found in the graph definition to the graph to be rendered.
  2191. * @param vert Object containing the vertices.
  2192. * @param g The graph that is to be drawn.
  2193. */
  2194. const addVertices = function (vert, g, svgId) {
  2195. const svg = d3__WEBPACK_IMPORTED_MODULE_1__["select"](`[id="${svgId}"]`);
  2196. const keys = Object.keys(vert);
  2197. const styleFromStyleArr = function (styleStr, arr) {
  2198. // Create a compound style definition from the style definitions found for the node in the graph definition
  2199. for (let i = 0; i < arr.length; i++) {
  2200. if (typeof arr[i] !== 'undefined') {
  2201. styleStr = styleStr + arr[i] + ';';
  2202. }
  2203. }
  2204. return styleStr;
  2205. }; // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition
  2206. keys.forEach(function (id) {
  2207. const vertex = vert[id];
  2208. /**
  2209. * Variable for storing the classes for the vertex
  2210. * @type {string}
  2211. */
  2212. let classStr = '';
  2213. if (vertex.classes.length > 0) {
  2214. classStr = vertex.classes.join(' ');
  2215. }
  2216. /**
  2217. * Variable for storing the extracted style for the vertex
  2218. * @type {string}
  2219. */
  2220. let style = ''; // Create a compound style definition from the style definitions found for the node in the graph definition
  2221. style = styleFromStyleArr(style, vertex.styles); // Use vertex id as text in the box if no text is provided by the graph definition
  2222. let vertexText = vertex.text !== undefined ? vertex.text : vertex.id; // We create a SVG label, either by delegating to addHtmlLabel or manually
  2223. let vertexNode;
  2224. if (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels) {
  2225. // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?
  2226. const node = {
  2227. label: vertexText.replace(/fa[lrsb]?:fa-[\w-]+/g, s => `<i class='${s.replace(':', ' ')}'></i>`)
  2228. };
  2229. vertexNode = dagre_d3_renderer_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6___default()(svg, node).node();
  2230. vertexNode.parentNode.removeChild(vertexNode);
  2231. } else {
  2232. const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');
  2233. const rows = vertexText.split(/<br[/]{0,1}>/);
  2234. for (let j = 0; j < rows.length; j++) {
  2235. const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');
  2236. tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
  2237. tspan.setAttribute('dy', '1em');
  2238. tspan.setAttribute('x', '1');
  2239. tspan.textContent = rows[j];
  2240. svgLabel.appendChild(tspan);
  2241. }
  2242. vertexNode = svgLabel;
  2243. } // If the node has a link, we wrap it in a SVG link
  2244. if (vertex.link) {
  2245. const link = document.createElementNS('http://www.w3.org/2000/svg', 'a');
  2246. link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link);
  2247. link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener');
  2248. link.appendChild(vertexNode);
  2249. vertexNode = link;
  2250. }
  2251. let radious = 0;
  2252. let _shape = ''; // Set the shape based parameters
  2253. switch (vertex.type) {
  2254. case 'round':
  2255. radious = 5;
  2256. _shape = 'rect';
  2257. break;
  2258. case 'square':
  2259. _shape = 'rect';
  2260. break;
  2261. case 'diamond':
  2262. _shape = 'question';
  2263. break;
  2264. case 'odd':
  2265. _shape = 'rect_left_inv_arrow';
  2266. break;
  2267. case 'lean_right':
  2268. _shape = 'lean_right';
  2269. break;
  2270. case 'lean_left':
  2271. _shape = 'lean_left';
  2272. break;
  2273. case 'trapezoid':
  2274. _shape = 'trapezoid';
  2275. break;
  2276. case 'inv_trapezoid':
  2277. _shape = 'inv_trapezoid';
  2278. break;
  2279. case 'odd_right':
  2280. _shape = 'rect_left_inv_arrow';
  2281. break;
  2282. case 'circle':
  2283. _shape = 'circle';
  2284. break;
  2285. case 'ellipse':
  2286. _shape = 'ellipse';
  2287. break;
  2288. case 'group':
  2289. _shape = 'rect';
  2290. break;
  2291. default:
  2292. _shape = 'rect';
  2293. } // Add the node
  2294. g.setNode(vertex.id, {
  2295. labelType: 'svg',
  2296. shape: _shape,
  2297. label: vertexNode,
  2298. rx: radious,
  2299. ry: radious,
  2300. 'class': classStr,
  2301. style: style,
  2302. id: vertex.id
  2303. });
  2304. });
  2305. };
  2306. /**
  2307. * Add edges to graph based on parsed graph defninition
  2308. * @param {Object} edges The edges to add to the graph
  2309. * @param {Object} g The graph object
  2310. */
  2311. const addEdges = function (edges, g) {
  2312. let cnt = 0;
  2313. let defaultStyle;
  2314. if (typeof edges.defaultStyle !== 'undefined') {
  2315. defaultStyle = edges.defaultStyle.toString().replace(/,/g, ';');
  2316. }
  2317. edges.forEach(function (edge) {
  2318. cnt++;
  2319. const edgeData = {}; // Set link type for rendering
  2320. if (edge.type === 'arrow_open') {
  2321. edgeData.arrowhead = 'none';
  2322. } else {
  2323. edgeData.arrowhead = 'normal';
  2324. }
  2325. let style = '';
  2326. if (typeof edge.style !== 'undefined') {
  2327. edge.style.forEach(function (s) {
  2328. style = style + s + ';';
  2329. });
  2330. } else {
  2331. switch (edge.stroke) {
  2332. case 'normal':
  2333. style = 'fill:none';
  2334. if (typeof defaultStyle !== 'undefined') {
  2335. style = defaultStyle;
  2336. }
  2337. break;
  2338. case 'dotted':
  2339. style = 'stroke: #333; fill:none;stroke-width:2px;stroke-dasharray:3;';
  2340. break;
  2341. case 'thick':
  2342. style = 'stroke: #333; stroke-width: 3.5px;fill:none';
  2343. break;
  2344. }
  2345. }
  2346. edgeData.style = style;
  2347. if (typeof edge.interpolate !== 'undefined') {
  2348. edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_8__["interpolateToCurve"])(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]);
  2349. } else if (typeof edges.defaultInterpolate !== 'undefined') {
  2350. edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_8__["interpolateToCurve"])(edges.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]);
  2351. } else {
  2352. edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_8__["interpolateToCurve"])(conf.curve, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]);
  2353. }
  2354. if (typeof edge.text === 'undefined') {
  2355. if (typeof edge.style !== 'undefined') {
  2356. edgeData.arrowheadStyle = 'fill: #333';
  2357. }
  2358. } else {
  2359. edgeData.arrowheadStyle = 'fill: #333';
  2360. if (typeof edge.style === 'undefined') {
  2361. edgeData.labelpos = 'c';
  2362. if (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels) {
  2363. edgeData.labelType = 'html';
  2364. edgeData.label = '<span class="edgeLabel">' + edge.text + '</span>';
  2365. } else {
  2366. edgeData.labelType = 'text';
  2367. edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none';
  2368. edgeData.label = edge.text.replace(/<br>/g, '\n');
  2369. }
  2370. } else {
  2371. edgeData.label = edge.text.replace(/<br>/g, '\n');
  2372. }
  2373. } // Add the edge to the graph
  2374. g.setEdge(edge.start, edge.end, edgeData, cnt);
  2375. });
  2376. };
  2377. /**
  2378. * Returns the all the styles from classDef statements in the graph definition.
  2379. * @returns {object} classDef styles
  2380. */
  2381. const getClasses = function (text) {
  2382. _logger__WEBPACK_IMPORTED_MODULE_7__["logger"].info('Extracting classes');
  2383. _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].clear();
  2384. const parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser;
  2385. parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"]; // Parse the graph definition
  2386. parser.parse(text);
  2387. return _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getClasses();
  2388. };
  2389. /**
  2390. * Draws a flowchart in the tag with id: id based on the graph definition in text.
  2391. * @param text
  2392. * @param id
  2393. */
  2394. const draw = function (text, id) {
  2395. _logger__WEBPACK_IMPORTED_MODULE_7__["logger"].info('Drawing flowchart');
  2396. _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].clear();
  2397. const parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser;
  2398. parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"]; // Parse the graph definition
  2399. try {
  2400. parser.parse(text);
  2401. } catch (err) {
  2402. _logger__WEBPACK_IMPORTED_MODULE_7__["logger"].debug('Parsing failed');
  2403. } // Fetch the default direction, use TD if none was found
  2404. let dir = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getDirection();
  2405. if (typeof dir === 'undefined') {
  2406. dir = 'TD';
  2407. } // Create the input mermaid.graph
  2408. const g = new graphlibrary__WEBPACK_IMPORTED_MODULE_0___default.a.Graph({
  2409. multigraph: true,
  2410. compound: true
  2411. }).setGraph({
  2412. rankdir: dir,
  2413. marginx: 20,
  2414. marginy: 20
  2415. }).setDefaultEdgeLabel(function () {
  2416. return {};
  2417. });
  2418. let subG;
  2419. const subGraphs = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getSubGraphs();
  2420. for (let i = subGraphs.length - 1; i >= 0; i--) {
  2421. subG = subGraphs[i];
  2422. _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].addVertex(subG.id, subG.title, 'group', undefined, subG.classes);
  2423. } // Fetch the verices/nodes and edges/links from the parsed graph definition
  2424. const vert = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getVertices();
  2425. const edges = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getEdges();
  2426. let i = 0;
  2427. for (i = subGraphs.length - 1; i >= 0; i--) {
  2428. subG = subGraphs[i];
  2429. d3__WEBPACK_IMPORTED_MODULE_1__["selectAll"]('cluster').append('text');
  2430. for (let j = 0; j < subG.nodes.length; j++) {
  2431. g.setParent(subG.nodes[j], subG.id);
  2432. }
  2433. }
  2434. addVertices(vert, g, id);
  2435. addEdges(edges, g); // Create the renderer
  2436. const Render = dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.render;
  2437. const render = new Render(); // Add custom shape for rhombus type of boc (decision)
  2438. render.shapes().question = function (parent, bbox, node) {
  2439. const w = bbox.width;
  2440. const h = bbox.height;
  2441. const s = (w + h) * 0.9;
  2442. const points = [{
  2443. x: s / 2,
  2444. y: 0
  2445. }, {
  2446. x: s,
  2447. y: -s / 2
  2448. }, {
  2449. x: s / 2,
  2450. y: -s
  2451. }, {
  2452. x: 0,
  2453. y: -s / 2
  2454. }];
  2455. const shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
  2456. return d.x + ',' + d.y;
  2457. }).join(' ')).attr('rx', 5).attr('ry', 5).attr('transform', 'translate(' + -s / 2 + ',' + s * 2 / 4 + ')');
  2458. node.intersect = function (point) {
  2459. return dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.intersect.polygon(node, points, point);
  2460. };
  2461. return shapeSvg;
  2462. }; // Add custom shape for box with inverted arrow on left side
  2463. render.shapes().rect_left_inv_arrow = function (parent, bbox, node) {
  2464. const w = bbox.width;
  2465. const h = bbox.height;
  2466. const points = [{
  2467. x: -h / 2,
  2468. y: 0
  2469. }, {
  2470. x: w,
  2471. y: 0
  2472. }, {
  2473. x: w,
  2474. y: -h
  2475. }, {
  2476. x: -h / 2,
  2477. y: -h
  2478. }, {
  2479. x: 0,
  2480. y: -h / 2
  2481. }];
  2482. const shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
  2483. return d.x + ',' + d.y;
  2484. }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h * 2 / 4 + ')');
  2485. node.intersect = function (point) {
  2486. return dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.intersect.polygon(node, points, point);
  2487. };
  2488. return shapeSvg;
  2489. }; // Add custom shape for box with inverted arrow on left side
  2490. render.shapes().lean_right = function (parent, bbox, node) {
  2491. const w = bbox.width;
  2492. const h = bbox.height;
  2493. const points = [{
  2494. x: -2 * h / 6,
  2495. y: 0
  2496. }, {
  2497. x: w - h / 6,
  2498. y: 0
  2499. }, {
  2500. x: w + 2 * h / 6,
  2501. y: -h
  2502. }, {
  2503. x: h / 6,
  2504. y: -h
  2505. }];
  2506. const shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
  2507. return d.x + ',' + d.y;
  2508. }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h * 2 / 4 + ')');
  2509. node.intersect = function (point) {
  2510. return dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.intersect.polygon(node, points, point);
  2511. };
  2512. return shapeSvg;
  2513. }; // Add custom shape for box with inverted arrow on left side
  2514. render.shapes().lean_left = function (parent, bbox, node) {
  2515. const w = bbox.width;
  2516. const h = bbox.height;
  2517. const points = [{
  2518. x: 2 * h / 6,
  2519. y: 0
  2520. }, {
  2521. x: w + h / 6,
  2522. y: 0
  2523. }, {
  2524. x: w - 2 * h / 6,
  2525. y: -h
  2526. }, {
  2527. x: -h / 6,
  2528. y: -h
  2529. }];
  2530. const shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
  2531. return d.x + ',' + d.y;
  2532. }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h * 2 / 4 + ')');
  2533. node.intersect = function (point) {
  2534. return dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.intersect.polygon(node, points, point);
  2535. };
  2536. return shapeSvg;
  2537. }; // Add custom shape for box with inverted arrow on left side
  2538. render.shapes().trapezoid = function (parent, bbox, node) {
  2539. const w = bbox.width;
  2540. const h = bbox.height;
  2541. const points = [{
  2542. x: -2 * h / 6,
  2543. y: 0
  2544. }, {
  2545. x: w + 2 * h / 6,
  2546. y: 0
  2547. }, {
  2548. x: w - h / 6,
  2549. y: -h
  2550. }, {
  2551. x: h / 6,
  2552. y: -h
  2553. }];
  2554. const shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
  2555. return d.x + ',' + d.y;
  2556. }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h * 2 / 4 + ')');
  2557. node.intersect = function (point) {
  2558. return dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.intersect.polygon(node, points, point);
  2559. };
  2560. return shapeSvg;
  2561. }; // Add custom shape for box with inverted arrow on left side
  2562. render.shapes().inv_trapezoid = function (parent, bbox, node) {
  2563. const w = bbox.width;
  2564. const h = bbox.height;
  2565. const points = [{
  2566. x: h / 6,
  2567. y: 0
  2568. }, {
  2569. x: w - h / 6,
  2570. y: 0
  2571. }, {
  2572. x: w + 2 * h / 6,
  2573. y: -h
  2574. }, {
  2575. x: -2 * h / 6,
  2576. y: -h
  2577. }];
  2578. const shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
  2579. return d.x + ',' + d.y;
  2580. }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h * 2 / 4 + ')');
  2581. node.intersect = function (point) {
  2582. return dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.intersect.polygon(node, points, point);
  2583. };
  2584. return shapeSvg;
  2585. }; // Add custom shape for box with inverted arrow on right side
  2586. render.shapes().rect_right_inv_arrow = function (parent, bbox, node) {
  2587. const w = bbox.width;
  2588. const h = bbox.height;
  2589. const points = [{
  2590. x: 0,
  2591. y: 0
  2592. }, {
  2593. x: w + h / 2,
  2594. y: 0
  2595. }, {
  2596. x: w,
  2597. y: -h / 2
  2598. }, {
  2599. x: w + h / 2,
  2600. y: -h
  2601. }, {
  2602. x: 0,
  2603. y: -h
  2604. }];
  2605. const shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
  2606. return d.x + ',' + d.y;
  2607. }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h * 2 / 4 + ')');
  2608. node.intersect = function (point) {
  2609. return dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.intersect.polygon(node, points, point);
  2610. };
  2611. return shapeSvg;
  2612. }; // Add our custom arrow - an empty arrowhead
  2613. render.arrows().none = function normal(parent, id, edge, type) {
  2614. const marker = parent.append('marker').attr('id', id).attr('viewBox', '0 0 10 10').attr('refX', 9).attr('refY', 5).attr('markerUnits', 'strokeWidth').attr('markerWidth', 8).attr('markerHeight', 6).attr('orient', 'auto');
  2615. const path = marker.append('path').attr('d', 'M 0 0 L 0 0 L 0 0 z');
  2616. dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.util.applyStyle(path, edge[type + 'Style']);
  2617. }; // Override normal arrowhead defined in d3. Remove style & add class to allow css styling.
  2618. render.arrows().normal = function normal(parent, id, edge, type) {
  2619. const marker = parent.append('marker').attr('id', id).attr('viewBox', '0 0 10 10').attr('refX', 9).attr('refY', 5).attr('markerUnits', 'strokeWidth').attr('markerWidth', 8).attr('markerHeight', 6).attr('orient', 'auto');
  2620. marker.append('path').attr('d', 'M 0 0 L 10 5 L 0 10 z').attr('class', 'arrowheadPath').style('stroke-width', 1).style('stroke-dasharray', '1,0');
  2621. }; // Set up an SVG group so that we can translate the final graph.
  2622. const svg = d3__WEBPACK_IMPORTED_MODULE_1__["select"](`[id="${id}"]`); // Run the renderer. This is what draws the final graph.
  2623. const element = d3__WEBPACK_IMPORTED_MODULE_1__["select"]('#' + id + ' g');
  2624. render(element, g);
  2625. element.selectAll('g.node').attr('title', function () {
  2626. return _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getTooltip(this.id);
  2627. });
  2628. const padding = 8;
  2629. const width = g.maxX - g.minX + padding * 2;
  2630. const height = g.maxY - g.minY + padding * 2;
  2631. svg.attr('width', '100%');
  2632. svg.attr('style', `max-width: ${width}px;`);
  2633. svg.attr('viewBox', `0 0 ${width} ${height}`);
  2634. svg.select('g').attr('transform', `translate(${padding - g.minX}, ${padding - g.minY})`); // Index nodes
  2635. _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].indexNodes('subGraph' + i); // reposition labels
  2636. for (i = 0; i < subGraphs.length; i++) {
  2637. subG = subGraphs[i];
  2638. if (subG.title !== 'undefined') {
  2639. const clusterRects = document.querySelectorAll('#' + id + ' #' + subG.id + ' rect');
  2640. const clusterEl = document.querySelectorAll('#' + id + ' #' + subG.id);
  2641. const xPos = clusterRects[0].x.baseVal.value;
  2642. const yPos = clusterRects[0].y.baseVal.value;
  2643. const width = clusterRects[0].width.baseVal.value;
  2644. const cluster = d3__WEBPACK_IMPORTED_MODULE_1__["select"](clusterEl[0]);
  2645. const te = cluster.select('.label');
  2646. te.attr('transform', `translate(${xPos + width / 2}, ${yPos + 14})`);
  2647. te.attr('id', id + 'Text');
  2648. }
  2649. } // Add label rects for non html labels
  2650. if (!Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels) {
  2651. const labels = document.querySelectorAll('#' + id + ' .edgeLabel .label');
  2652. for (let k = 0; k < labels.length; k++) {
  2653. const label = labels[k]; // Get dimensions of label
  2654. const dim = label.getBBox();
  2655. const rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
  2656. rect.setAttribute('rx', 0);
  2657. rect.setAttribute('ry', 0);
  2658. rect.setAttribute('width', dim.width);
  2659. rect.setAttribute('height', dim.height);
  2660. rect.setAttribute('style', 'fill:#e8e8e8;');
  2661. label.insertBefore(rect, label.firstChild);
  2662. }
  2663. }
  2664. };
  2665. /* harmony default export */ __webpack_exports__["default"] = ({
  2666. setConf,
  2667. addVertices,
  2668. addEdges,
  2669. getClasses,
  2670. draw
  2671. });
  2672. /***/ }),
  2673. /***/ "./src/diagrams/flowchart/parser/flow.jison":
  2674. /*!**************************************************!*\
  2675. !*** ./src/diagrams/flowchart/parser/flow.jison ***!
  2676. \**************************************************/
  2677. /*! no static exports found */
  2678. /***/ (function(module, exports, __webpack_require__) {
  2679. /* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
  2680. /*
  2681. Returns a Parser object of the following structure:
  2682. Parser: {
  2683. yy: {}
  2684. }
  2685. Parser.prototype: {
  2686. yy: {},
  2687. trace: function(),
  2688. symbols_: {associative list: name ==> number},
  2689. terminals_: {associative list: number ==> name},
  2690. productions_: [...],
  2691. performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
  2692. table: [...],
  2693. defaultActions: {...},
  2694. parseError: function(str, hash),
  2695. parse: function(input),
  2696. lexer: {
  2697. EOF: 1,
  2698. parseError: function(str, hash),
  2699. setInput: function(input),
  2700. input: function(),
  2701. unput: function(str),
  2702. more: function(),
  2703. less: function(n),
  2704. pastInput: function(),
  2705. upcomingInput: function(),
  2706. showPosition: function(),
  2707. test_match: function(regex_match_array, rule_index),
  2708. next: function(),
  2709. lex: function(),
  2710. begin: function(condition),
  2711. popState: function(),
  2712. _currentRules: function(),
  2713. topState: function(),
  2714. pushState: function(condition),
  2715. options: {
  2716. ranges: boolean (optional: true ==> token location info will include a .range[] member)
  2717. flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
  2718. backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
  2719. },
  2720. performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
  2721. rules: [...],
  2722. conditions: {associative list: name ==> set},
  2723. }
  2724. }
  2725. token location info (@$, _$, etc.): {
  2726. first_line: n,
  2727. last_line: n,
  2728. first_column: n,
  2729. last_column: n,
  2730. range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
  2731. }
  2732. the parseError function receives a 'hash' object with these members for lexer and parser errors: {
  2733. text: (matched text)
  2734. token: (the produced terminal token, if any)
  2735. line: (yylineno)
  2736. }
  2737. while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
  2738. loc: (yylloc)
  2739. expected: (string describing the set of expected tokens)
  2740. recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
  2741. }
  2742. */
  2743. var parser = (function(){
  2744. var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,4],$V1=[1,3],$V2=[1,5],$V3=[1,8,9,10,11,18,30,91,92,93,94,95,106,107,110,111,112,114,120,121,122,123,124],$V4=[2,2],$V5=[1,12],$V6=[1,13],$V7=[1,14],$V8=[1,15],$V9=[1,39],$Va=[1,22],$Vb=[1,24],$Vc=[1,25],$Vd=[1,26],$Ve=[1,27],$Vf=[1,28],$Vg=[1,34],$Vh=[1,36],$Vi=[1,31],$Vj=[1,35],$Vk=[1,38],$Vl=[1,42],$Vm=[1,33],$Vn=[1,37],$Vo=[1,40],$Vp=[1,41],$Vq=[1,32],$Vr=[1,8,9,10,11,18,30,34,91,92,93,94,95,106,107,110,111,112,114,120,121,122,123,124],$Vs=[1,50],$Vt=[1,49],$Vu=[1,51],$Vv=[8,9,11],$Vw=[1,62],$Vx=[1,74],$Vy=[1,63],$Vz=[1,76],$VA=[1,64],$VB=[1,78],$VC=[1,65],$VD=[1,80],$VE=[1,66],$VF=[1,81],$VG=[1,67],$VH=[1,83],$VI=[1,68],$VJ=[1,85],$VK=[1,69],$VL=[1,87],$VM=[1,70],$VN=[1,88],$VO=[1,71],$VP=[1,90],$VQ=[1,72],$VR=[1,92],$VS=[1,73],$VT=[1,94],$VU=[1,75],$VV=[1,77],$VW=[1,79],$VX=[1,82],$VY=[1,84],$VZ=[1,86],$V_=[1,89],$V$=[1,91],$V01=[1,93],$V11=[8,9,11,37,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],$V21=[1,109],$V31=[8,9,10,11,15,18,32,37,39,41,43,45,47,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,106,107,110,111,112,114,120,121,122,123,124],$V41=[1,111],$V51=[1,112],$V61=[1,129],$V71=[1,148],$V81=[1,149],$V91=[1,123],$Va1=[1,122],$Vb1=[1,153],$Vc1=[1,152],$Vd1=[1,150],$Ve1=[1,151],$Vf1=[1,141],$Vg1=[1,125],$Vh1=[1,124],$Vi1=[1,120],$Vj1=[1,143],$Vk1=[1,144],$Vl1=[1,145],$Vm1=[1,146],$Vn1=[1,147],$Vo1=[1,127],$Vp1=[1,126],$Vq1=[1,134],$Vr1=[1,137],$Vs1=[1,135],$Vt1=[1,136],$Vu1=[1,130],$Vv1=[1,142],$Vw1=[1,132],$Vx1=[1,133],$Vy1=[1,138],$Vz1=[1,139],$VA1=[1,140],$VB1=[8,9,10,11,18,30,34,91,92,93,94,95,106,107,110,111,112,114,120,121,122,123,124],$VC1=[18,106,107,110,111,112,114,120,121,122,123,124],$VD1=[18,51,85,106,107,110,111,112,114,120,121,122,123,124],$VE1=[1,175],$VF1=[1,177],$VG1=[1,178],$VH1=[8,9,10,11,12,13,15,16,17,18,30,32,33,34,37,40,42,44,46,48,52,53,55,57,59,61,63,65,67,68,69,71,73,75,85,91,92,93,94,95,98,105,106,107,110,111,112,114,119,120,121,122,123],$VI1=[8,9,10,11,13,18,37,106,107,110,111,112,114,119,120,121,122,123],$VJ1=[10,107],$VK1=[1,259],$VL1=[1,262],$VM1=[1,263],$VN1=[1,260],$VO1=[1,264],$VP1=[1,257],$VQ1=[1,254],$VR1=[1,255],$VS1=[1,256],$VT1=[1,258],$VU1=[1,261],$VV1=[1,289],$VW1=[8,9,11,107],$VX1=[8,9,10,11,37,91,101,105,106,107,110,111,112,113,114];
  2745. var parser = {trace: function trace () { },
  2746. yy: {},
  2747. symbols_: {"error":2,"mermaidDoc":3,"graphConfig":4,"document":5,"line":6,"statement":7,"SEMI":8,"NEWLINE":9,"SPACE":10,"EOF":11,"GRAPH":12,"DIR":13,"FirstStmtSeperator":14,"TAGEND":15,"TAGSTART":16,"UP":17,"DOWN":18,"ending":19,"endToken":20,"spaceList":21,"spaceListNewline":22,"verticeStatement":23,"separator":24,"styleStatement":25,"linkStyleStatement":26,"classDefStatement":27,"classStatement":28,"clickStatement":29,"subgraph":30,"text":31,"SQS":32,"SQE":33,"end":34,"vertex":35,"link":36,"DOT":37,"idString":38,"PS":39,"PE":40,"(-":41,"-)":42,"DIAMOND_START":43,"DIAMOND_STOP":44,"TRAPSTART":45,"TRAPEND":46,"INVTRAPSTART":47,"INVTRAPEND":48,"linkStatement":49,"arrowText":50,"TESTSTR":51,"--":52,"ARROW_POINT":53,"START_DOUBLE_ARROW_POINT":54,"ARROW_CIRCLE":55,"START_DOUBLE_ARROW_CIRCLE":56,"ARROW_CROSS":57,"START_DOUBLE_ARROW_CROSS":58,"ARROW_OPEN":59,"-.":60,"DOTTED_ARROW_POINT":61,"START_DOUBLE_DOTTED_ARROW_POINT":62,"DOTTED_ARROW_CIRCLE":63,"START_DOUBLE_DOTTED_ARROW_CIRCLE":64,"DOTTED_ARROW_CROSS":65,"START_DOUBLE_DOTTED_ARROW_CROSS":66,"DOTTED_ARROW_OPEN":67,"==":68,"THICK_ARROW_POINT":69,"START_DOUBLE_THICK_ARROW_POINT":70,"THICK_ARROW_CIRCLE":71,"START_DOUBLE_THICK_ARROW_CIRCLE":72,"THICK_ARROW_CROSS":73,"START_DOUBLE_THICK_ARROW_CROSS":74,"THICK_ARROW_OPEN":75,"DOUBLE_ARROW_POINT":76,"DOUBLE_ARROW_CIRCLE":77,"DOUBLE_ARROW_CROSS":78,"DOUBLE_DOTTED_ARROW_POINT":79,"DOUBLE_DOTTED_ARROW_CIRCLE":80,"DOUBLE_DOTTED_ARROW_CROSS":81,"DOUBLE_THICK_ARROW_POINT":82,"DOUBLE_THICK_ARROW_CIRCLE":83,"DOUBLE_THICK_ARROW_CROSS":84,"PIPE":85,"textToken":86,"STR":87,"commentText":88,"commentToken":89,"keywords":90,"STYLE":91,"LINKSTYLE":92,"CLASSDEF":93,"CLASS":94,"CLICK":95,"textNoTags":96,"textNoTagsToken":97,"DEFAULT":98,"stylesOpt":99,"alphaNum":100,"HEX":101,"numList":102,"INTERPOLATE":103,"commentStatement":104,"PCT":105,"NUM":106,"COMMA":107,"style":108,"styleComponent":109,"ALPHA":110,"COLON":111,"MINUS":112,"UNIT":113,"BRKT":114,"graphCodeTokens":115,"alphaNumToken":116,"idStringToken":117,"alphaNumStatement":118,"PUNCTUATION":119,"UNICODE_TEXT":120,"PLUS":121,"EQUALS":122,"MULT":123,"UNDERSCORE":124,"QUOTE":125,"$accept":0,"$end":1},
  2748. terminals_: {2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"DIR",15:"TAGEND",16:"TAGSTART",17:"UP",18:"DOWN",30:"subgraph",32:"SQS",33:"SQE",34:"end",37:"DOT",39:"PS",40:"PE",41:"(-",42:"-)",43:"DIAMOND_START",44:"DIAMOND_STOP",45:"TRAPSTART",46:"TRAPEND",47:"INVTRAPSTART",48:"INVTRAPEND",51:"TESTSTR",52:"--",53:"ARROW_POINT",54:"START_DOUBLE_ARROW_POINT",55:"ARROW_CIRCLE",56:"START_DOUBLE_ARROW_CIRCLE",57:"ARROW_CROSS",58:"START_DOUBLE_ARROW_CROSS",59:"ARROW_OPEN",60:"-.",61:"DOTTED_ARROW_POINT",62:"START_DOUBLE_DOTTED_ARROW_POINT",63:"DOTTED_ARROW_CIRCLE",64:"START_DOUBLE_DOTTED_ARROW_CIRCLE",65:"DOTTED_ARROW_CROSS",66:"START_DOUBLE_DOTTED_ARROW_CROSS",67:"DOTTED_ARROW_OPEN",68:"==",69:"THICK_ARROW_POINT",70:"START_DOUBLE_THICK_ARROW_POINT",71:"THICK_ARROW_CIRCLE",72:"START_DOUBLE_THICK_ARROW_CIRCLE",73:"THICK_ARROW_CROSS",74:"START_DOUBLE_THICK_ARROW_CROSS",75:"THICK_ARROW_OPEN",76:"DOUBLE_ARROW_POINT",77:"DOUBLE_ARROW_CIRCLE",78:"DOUBLE_ARROW_CROSS",79:"DOUBLE_DOTTED_ARROW_POINT",80:"DOUBLE_DOTTED_ARROW_CIRCLE",81:"DOUBLE_DOTTED_ARROW_CROSS",82:"DOUBLE_THICK_ARROW_POINT",83:"DOUBLE_THICK_ARROW_CIRCLE",84:"DOUBLE_THICK_ARROW_CROSS",85:"PIPE",87:"STR",91:"STYLE",92:"LINKSTYLE",93:"CLASSDEF",94:"CLASS",95:"CLICK",98:"DEFAULT",101:"HEX",103:"INTERPOLATE",105:"PCT",106:"NUM",107:"COMMA",110:"ALPHA",111:"COLON",112:"MINUS",113:"UNIT",114:"BRKT",119:"PUNCTUATION",120:"UNICODE_TEXT",121:"PLUS",122:"EQUALS",123:"MULT",124:"UNDERSCORE",125:"QUOTE"},
  2749. productions_: [0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,4],[4,4],[4,4],[4,4],[4,4],[19,2],[19,1],[20,1],[20,1],[20,1],[14,1],[14,1],[14,2],[22,2],[22,2],[22,1],[22,1],[21,2],[21,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[24,1],[24,1],[24,1],[23,3],[23,5],[23,5],[23,7],[23,1],[23,3],[35,4],[35,5],[35,6],[35,7],[35,4],[35,5],[35,4],[35,5],[35,4],[35,5],[35,4],[35,5],[35,4],[35,5],[35,4],[35,5],[35,4],[35,5],[35,4],[35,5],[35,1],[35,2],[36,2],[36,3],[36,3],[36,1],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[49,1],[49,1],[49,1],[49,1],[49,1],[49,1],[49,1],[49,1],[49,1],[49,1],[49,1],[49,1],[49,1],[49,1],[49,1],[49,1],[49,1],[49,1],[49,1],[49,1],[49,1],[50,3],[31,1],[31,2],[31,1],[88,1],[88,2],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[96,1],[96,2],[27,5],[27,5],[28,5],[29,5],[29,7],[29,5],[29,7],[25,5],[25,5],[26,5],[26,5],[26,9],[26,9],[26,7],[26,7],[104,3],[102,1],[102,3],[99,1],[99,3],[108,1],[108,2],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[89,1],[89,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[97,1],[97,1],[97,1],[97,1],[38,1],[38,2],[100,1],[100,2],[118,1],[118,1],[118,1],[118,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1]],
  2750. performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
  2751. /* this == yyval */
  2752. var $0 = $$.length - 1;
  2753. switch (yystate) {
  2754. case 2:
  2755. this.$ = [];
  2756. break;
  2757. case 3:
  2758. if($$[$0] !== []){
  2759. $$[$0-1].push($$[$0]);
  2760. }
  2761. this.$=$$[$0-1];
  2762. break;
  2763. case 4: case 117: case 119: case 120: case 133: case 183: case 185: case 186:
  2764. this.$=$$[$0];
  2765. break;
  2766. case 11:
  2767. yy.setDirection($$[$0-1]);this.$ = $$[$0-1];
  2768. break;
  2769. case 12:
  2770. yy.setDirection("LR");this.$ = $$[$0-1];
  2771. break;
  2772. case 13:
  2773. yy.setDirection("RL");this.$ = $$[$0-1];
  2774. break;
  2775. case 14:
  2776. yy.setDirection("BT");this.$ = $$[$0-1];
  2777. break;
  2778. case 15:
  2779. yy.setDirection("TB");this.$ = $$[$0-1];
  2780. break;
  2781. case 30:
  2782. this.$=$$[$0-1]
  2783. break;
  2784. case 31: case 32: case 33: case 34: case 35:
  2785. this.$=[];
  2786. break;
  2787. case 36:
  2788. this.$=yy.addSubGraph($$[$0-6],$$[$0-1],$$[$0-4]);
  2789. break;
  2790. case 37:
  2791. this.$=yy.addSubGraph($$[$0-3],$$[$0-1],$$[$0-3]);
  2792. break;
  2793. case 38:
  2794. this.$=yy.addSubGraph(undefined,$$[$0-1],undefined);
  2795. break;
  2796. case 42:
  2797. yy.addLink($$[$0-2],$$[$0],$$[$0-1]);this.$ = [$$[$0-2],$$[$0]];
  2798. break;
  2799. case 43:
  2800. yy.addLink($$[$0-4],$$[$0-2],$$[$0-3]);this.$ = [$$[$0-4],$$[$0-2]];yy.setClass($$[$0-2],$$[$0]);
  2801. break;
  2802. case 44:
  2803. yy.addLink($$[$0-4],$$[$0],$$[$0-1]);this.$ = [$$[$0-4],$$[$0]];yy.setClass($$[$0-4],$$[$0-2]);
  2804. break;
  2805. case 45:
  2806. yy.addLink($$[$0-6],$$[$0-2],$$[$0-3]);this.$ = [$$[$0-6],$$[$0-2]];yy.setClass($$[$0-2],$$[$0]);yy.setClass($$[$0-6],$$[$0-4]);
  2807. break;
  2808. case 46:
  2809. this.$ = [$$[$0]];
  2810. break;
  2811. case 47:
  2812. this.$ = [$$[$0-2]];yy.setClass($$[$0-2],$$[$0])
  2813. break;
  2814. case 48:
  2815. this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'square');
  2816. break;
  2817. case 49:
  2818. this.$ = $$[$0-4];yy.addVertex($$[$0-4],$$[$0-2],'square');
  2819. break;
  2820. case 50:
  2821. this.$ = $$[$0-5];yy.addVertex($$[$0-5],$$[$0-2],'circle');
  2822. break;
  2823. case 51:
  2824. this.$ = $$[$0-6];yy.addVertex($$[$0-6],$$[$0-3],'circle');
  2825. break;
  2826. case 52:
  2827. this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'ellipse');
  2828. break;
  2829. case 53:
  2830. this.$ = $$[$0-4];yy.addVertex($$[$0-4],$$[$0-2],'ellipse');
  2831. break;
  2832. case 54:
  2833. this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'round');
  2834. break;
  2835. case 55:
  2836. this.$ = $$[$0-4];yy.addVertex($$[$0-4],$$[$0-2],'round');
  2837. break;
  2838. case 56:
  2839. this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'diamond');
  2840. break;
  2841. case 57:
  2842. this.$ = $$[$0-4];yy.addVertex($$[$0-4],$$[$0-2],'diamond');
  2843. break;
  2844. case 58:
  2845. this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'odd');
  2846. break;
  2847. case 59:
  2848. this.$ = $$[$0-4];yy.addVertex($$[$0-4],$$[$0-2],'odd');
  2849. break;
  2850. case 60:
  2851. this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'trapezoid');
  2852. break;
  2853. case 61:
  2854. this.$ = $$[$0-4];yy.addVertex($$[$0-4],$$[$0-2],'trapezoid');
  2855. break;
  2856. case 62:
  2857. this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'inv_trapezoid');
  2858. break;
  2859. case 63:
  2860. this.$ = $$[$0-4];yy.addVertex($$[$0-4],$$[$0-2],'inv_trapezoid');
  2861. break;
  2862. case 64:
  2863. this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'lean_right');
  2864. break;
  2865. case 65:
  2866. this.$ = $$[$0-4];yy.addVertex($$[$0-4],$$[$0-2],'lean_right');
  2867. break;
  2868. case 66:
  2869. this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'lean_left');
  2870. break;
  2871. case 67:
  2872. this.$ = $$[$0-4];yy.addVertex($$[$0-4],$$[$0-2],'lean_left');
  2873. break;
  2874. case 68:
  2875. this.$ = $$[$0];yy.addVertex($$[$0]);
  2876. break;
  2877. case 69:
  2878. this.$ = $$[$0-1];yy.addVertex($$[$0-1]);
  2879. break;
  2880. case 70:
  2881. $$[$0-1].text = $$[$0];this.$ = $$[$0-1];
  2882. break;
  2883. case 71: case 72:
  2884. $$[$0-2].text = $$[$0-1];this.$ = $$[$0-2];
  2885. break;
  2886. case 73:
  2887. this.$ = $$[$0];
  2888. break;
  2889. case 74:
  2890. this.$ = {"type":"arrow","stroke":"normal","text":$$[$0-1]};
  2891. break;
  2892. case 75:
  2893. this.$ = {"type":"double_arrow_point","stroke":"normal","text":$$[$0-1]};
  2894. break;
  2895. case 76:
  2896. this.$ = {"type":"arrow_circle","stroke":"normal","text":$$[$0-1]};
  2897. break;
  2898. case 77:
  2899. this.$ = {"type":"double_arrow_circle","stroke":"normal","text":$$[$0-1]};
  2900. break;
  2901. case 78:
  2902. this.$ = {"type":"arrow_cross","stroke":"normal","text":$$[$0-1]};
  2903. break;
  2904. case 79:
  2905. this.$ = {"type":"double_arrow_cross","stroke":"normal","text":$$[$0-1]};
  2906. break;
  2907. case 80:
  2908. this.$ = {"type":"arrow_open","stroke":"normal","text":$$[$0-1]};
  2909. break;
  2910. case 81:
  2911. this.$ = {"type":"arrow","stroke":"dotted","text":$$[$0-1]};
  2912. break;
  2913. case 82:
  2914. this.$ = {"type":"double_arrow_point","stroke":"dotted","text":$$[$0-1]};
  2915. break;
  2916. case 83:
  2917. this.$ = {"type":"arrow_circle","stroke":"dotted","text":$$[$0-1]};
  2918. break;
  2919. case 84:
  2920. this.$ = {"type":"double_arrow_circle","stroke":"dotted","text":$$[$0-1]};
  2921. break;
  2922. case 85:
  2923. this.$ = {"type":"arrow_cross","stroke":"dotted","text":$$[$0-1]};
  2924. break;
  2925. case 86:
  2926. this.$ = {"type":"double_arrow_cross","stroke":"dotted","text":$$[$0-1]};
  2927. break;
  2928. case 87:
  2929. this.$ = {"type":"arrow_open","stroke":"dotted","text":$$[$0-1]};
  2930. break;
  2931. case 88:
  2932. this.$ = {"type":"arrow","stroke":"thick","text":$$[$0-1]};
  2933. break;
  2934. case 89:
  2935. this.$ = {"type":"double_arrow_point","stroke":"thick","text":$$[$0-1]};
  2936. break;
  2937. case 90:
  2938. this.$ = {"type":"arrow_circle","stroke":"thick","text":$$[$0-1]};
  2939. break;
  2940. case 91:
  2941. this.$ = {"type":"double_arrow_circle","stroke":"thick","text":$$[$0-1]};
  2942. break;
  2943. case 92:
  2944. this.$ = {"type":"arrow_cross","stroke":"thick","text":$$[$0-1]};
  2945. break;
  2946. case 93:
  2947. this.$ = {"type":"double_arrow_cross","stroke":"thick","text":$$[$0-1]};
  2948. break;
  2949. case 94:
  2950. this.$ = {"type":"arrow_open","stroke":"thick","text":$$[$0-1]};
  2951. break;
  2952. case 95:
  2953. this.$ = {"type":"arrow","stroke":"normal"};
  2954. break;
  2955. case 96:
  2956. this.$ = {"type":"double_arrow_point","stroke":"normal"};
  2957. break;
  2958. case 97:
  2959. this.$ = {"type":"arrow_circle","stroke":"normal"};
  2960. break;
  2961. case 98:
  2962. this.$ = {"type":"double_arrow_circle","stroke":"normal"};
  2963. break;
  2964. case 99:
  2965. this.$ = {"type":"arrow_cross","stroke":"normal"};
  2966. break;
  2967. case 100:
  2968. this.$ = {"type":"double_arrow_cross","stroke":"normal"};
  2969. break;
  2970. case 101:
  2971. this.$ = {"type":"arrow_open","stroke":"normal"};
  2972. break;
  2973. case 102:
  2974. this.$ = {"type":"arrow","stroke":"dotted"};
  2975. break;
  2976. case 103:
  2977. this.$ = {"type":"double_arrow_point","stroke":"dotted"};
  2978. break;
  2979. case 104:
  2980. this.$ = {"type":"arrow_circle","stroke":"dotted"};
  2981. break;
  2982. case 105:
  2983. this.$ = {"type":"double_arrow_circle","stroke":"dotted"};
  2984. break;
  2985. case 106:
  2986. this.$ = {"type":"arrow_cross","stroke":"dotted"};
  2987. break;
  2988. case 107:
  2989. this.$ = {"type":"double_arrow_cross","stroke":"dotted"};
  2990. break;
  2991. case 108:
  2992. this.$ = {"type":"arrow_open","stroke":"dotted"};
  2993. break;
  2994. case 109:
  2995. this.$ = {"type":"arrow","stroke":"thick"};
  2996. break;
  2997. case 110:
  2998. this.$ = {"type":"double_arrow_point","stroke":"thick"};
  2999. break;
  3000. case 111:
  3001. this.$ = {"type":"arrow_circle","stroke":"thick"};
  3002. break;
  3003. case 112:
  3004. this.$ = {"type":"double_arrow_circle","stroke":"thick"};
  3005. break;
  3006. case 113:
  3007. this.$ = {"type":"arrow_cross","stroke":"thick"};
  3008. break;
  3009. case 114:
  3010. this.$ = {"type":"double_arrow_cross","stroke":"thick"};
  3011. break;
  3012. case 115:
  3013. this.$ = {"type":"arrow_open","stroke":"thick"};
  3014. break;
  3015. case 116:
  3016. this.$ = $$[$0-1];
  3017. break;
  3018. case 118: case 121: case 134: case 184:
  3019. this.$=$$[$0-1]+''+$$[$0];
  3020. break;
  3021. case 135: case 136:
  3022. this.$ = $$[$0-4];yy.addClass($$[$0-2],$$[$0]);
  3023. break;
  3024. case 137:
  3025. this.$ = $$[$0-4];yy.setClass($$[$0-2], $$[$0]);
  3026. break;
  3027. case 138:
  3028. this.$ = $$[$0-4];yy.setClickEvent($$[$0-2], $$[$0], undefined);
  3029. break;
  3030. case 139:
  3031. this.$ = $$[$0-6];yy.setClickEvent($$[$0-4], $$[$0-2], $$[$0]) ;
  3032. break;
  3033. case 140:
  3034. this.$ = $$[$0-4];yy.setLink($$[$0-2], $$[$0], undefined);
  3035. break;
  3036. case 141:
  3037. this.$ = $$[$0-6];yy.setLink($$[$0-4], $$[$0-2], $$[$0] );
  3038. break;
  3039. case 142:
  3040. this.$ = $$[$0-4];yy.addVertex($$[$0-2],undefined,undefined,$$[$0]);
  3041. break;
  3042. case 143: case 145:
  3043. this.$ = $$[$0-4];yy.updateLink($$[$0-2],$$[$0]);
  3044. break;
  3045. case 144:
  3046. this.$ = $$[$0-4];yy.updateLink([$$[$0-2]],$$[$0]);
  3047. break;
  3048. case 146:
  3049. this.$ = $$[$0-8];yy.updateLinkInterpolate([$$[$0-6]],$$[$0-2]);yy.updateLink([$$[$0-6]],$$[$0]);
  3050. break;
  3051. case 147:
  3052. this.$ = $$[$0-8];yy.updateLinkInterpolate($$[$0-6],$$[$0-2]);yy.updateLink($$[$0-6],$$[$0]);
  3053. break;
  3054. case 148:
  3055. this.$ = $$[$0-6];yy.updateLinkInterpolate([$$[$0-4]],$$[$0]);
  3056. break;
  3057. case 149:
  3058. this.$ = $$[$0-6];yy.updateLinkInterpolate($$[$0-4],$$[$0]);
  3059. break;
  3060. case 151: case 153:
  3061. this.$ = [$$[$0]]
  3062. break;
  3063. case 152: case 154:
  3064. $$[$0-2].push($$[$0]);this.$ = $$[$0-2];
  3065. break;
  3066. case 156:
  3067. this.$ = $$[$0-1] + $$[$0];
  3068. break;
  3069. case 181:
  3070. this.$=$$[$0]
  3071. break;
  3072. case 182:
  3073. this.$=$$[$0-1]+''+$$[$0]
  3074. break;
  3075. case 187:
  3076. this.$='v';
  3077. break;
  3078. case 188:
  3079. this.$='-';
  3080. break;
  3081. }
  3082. },
  3083. table: [{3:1,4:2,9:$V0,10:$V1,12:$V2},{1:[3]},o($V3,$V4,{5:6}),{4:7,9:$V0,10:$V1,12:$V2},{4:8,9:$V0,10:$V1,12:$V2},{10:[1,9]},{1:[2,1],6:10,7:11,8:$V5,9:$V6,10:$V7,11:$V8,18:$V9,23:16,25:17,26:18,27:19,28:20,29:21,30:$Va,35:23,38:29,91:$Vb,92:$Vc,93:$Vd,94:$Ve,95:$Vf,106:$Vg,107:$Vh,110:$Vi,111:$Vj,112:$Vk,114:$Vl,117:30,120:$Vm,121:$Vn,122:$Vo,123:$Vp,124:$Vq},o($V3,[2,9]),o($V3,[2,10]),{13:[1,43],15:[1,44],16:[1,45],17:[1,46],18:[1,47]},o($Vr,[2,3]),o($Vr,[2,4]),o($Vr,[2,5]),o($Vr,[2,6]),o($Vr,[2,7]),o($Vr,[2,8]),{8:$Vs,9:$Vt,11:$Vu,24:48},{8:$Vs,9:$Vt,11:$Vu,24:52},{8:$Vs,9:$Vt,11:$Vu,24:53},{8:$Vs,9:$Vt,11:$Vu,24:54},{8:$Vs,9:$Vt,11:$Vu,24:55},{8:$Vs,9:$Vt,11:$Vu,24:56},{8:$Vs,9:$Vt,10:[1,57],11:$Vu,24:58},o($Vv,[2,46],{36:59,49:61,37:[1,60],52:$Vw,53:$Vx,54:$Vy,55:$Vz,56:$VA,57:$VB,58:$VC,59:$VD,60:$VE,61:$VF,62:$VG,63:$VH,64:$VI,65:$VJ,66:$VK,67:$VL,68:$VM,69:$VN,70:$VO,71:$VP,72:$VQ,73:$VR,74:$VS,75:$VT,76:$VU,77:$VV,78:$VW,79:$VX,80:$VY,81:$VZ,82:$V_,83:$V$,84:$V01}),{10:[1,95]},{10:[1,96]},{10:[1,97]},{10:[1,98]},{10:[1,99]},o($V11,[2,68],{21:107,117:108,10:$V21,15:[1,104],18:$V9,32:[1,100],39:[1,101],41:[1,102],43:[1,103],45:[1,105],47:[1,106],106:$Vg,107:$Vh,110:$Vi,111:$Vj,112:$Vk,114:$Vl,120:$Vm,121:$Vn,122:$Vo,123:$Vp,124:$Vq}),o($V31,[2,181]),o($V31,[2,200]),o($V31,[2,201]),o($V31,[2,202]),o($V31,[2,203]),o($V31,[2,204]),o($V31,[2,205]),o($V31,[2,206]),o($V31,[2,207]),o($V31,[2,208]),o($V31,[2,209]),o($V31,[2,210]),o($V31,[2,211]),{8:$V41,9:$V51,10:$V21,14:110,21:113},{8:$V41,9:$V51,10:$V21,14:114,21:113},{8:$V41,9:$V51,10:$V21,14:115,21:113},{8:$V41,9:$V51,10:$V21,14:116,21:113},{8:$V41,9:$V51,10:$V21,14:117,21:113},o($Vr,[2,30]),o($Vr,[2,39]),o($Vr,[2,40]),o($Vr,[2,41]),o($Vr,[2,31]),o($Vr,[2,32]),o($Vr,[2,33]),o($Vr,[2,34]),o($Vr,[2,35]),{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,31:118,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:119,87:$Vi1,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},o($VB1,$V4,{5:154}),{18:$V9,35:155,38:29,106:$Vg,107:$Vh,110:$Vi,111:$Vj,112:$Vk,114:$Vl,117:30,120:$Vm,121:$Vn,122:$Vo,123:$Vp,124:$Vq},{18:$V9,38:156,106:$Vg,107:$Vh,110:$Vi,111:$Vj,112:$Vk,114:$Vl,117:30,120:$Vm,121:$Vn,122:$Vo,123:$Vp,124:$Vq},o($VC1,[2,73],{50:157,51:[1,158],85:[1,159]}),{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,31:160,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:119,87:$Vi1,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,31:161,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:119,87:$Vi1,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,31:162,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:119,87:$Vi1,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,31:163,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:119,87:$Vi1,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,31:164,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:119,87:$Vi1,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,31:165,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:119,87:$Vi1,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,31:166,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:119,87:$Vi1,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,31:167,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:119,87:$Vi1,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,31:168,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:119,87:$Vi1,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,31:169,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:119,87:$Vi1,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,31:170,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:119,87:$Vi1,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,31:171,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:119,87:$Vi1,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},o($VD1,[2,95]),o($VD1,[2,96]),o($VD1,[2,97]),o($VD1,[2,98]),o($VD1,[2,99]),o($VD1,[2,100]),o($VD1,[2,101]),o($VD1,[2,102]),o($VD1,[2,103]),o($VD1,[2,104]),o($VD1,[2,105]),o($VD1,[2,106]),o($VD1,[2,107]),o($VD1,[2,108]),o($VD1,[2,109]),o($VD1,[2,110]),o($VD1,[2,111]),o($VD1,[2,112]),o($VD1,[2,113]),o($VD1,[2,114]),o($VD1,[2,115]),{13:$VE1,18:$VF1,37:$Vf1,100:172,101:[1,173],106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$VG1,114:$Vv1,116:176,118:174,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{98:[1,179],102:180,106:[1,181]},{13:$VE1,18:$VF1,37:$Vf1,98:[1,182],100:183,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$VG1,114:$Vv1,116:176,118:174,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{13:$VE1,18:$VF1,37:$Vf1,100:184,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$VG1,114:$Vv1,116:176,118:174,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{13:$VE1,18:$VF1,37:$Vf1,100:185,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$VG1,114:$Vv1,116:176,118:174,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,31:186,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:119,87:$Vi1,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,31:188,34:$Ve1,37:$Vf1,39:[1,187],52:$Vg1,68:$Vh1,86:119,87:$Vi1,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,31:189,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:119,87:$Vi1,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,31:190,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:119,87:$Vi1,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,31:191,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:119,87:$Vi1,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,31:192,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:119,87:$Vi1,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,31:193,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:119,87:$Vi1,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},o($V11,[2,69]),o($V31,[2,182]),o($V11,[2,29],{21:194,10:$V21}),o($V3,[2,11]),o($V3,[2,21]),o($V3,[2,22]),{9:[1,195]},o($V3,[2,12]),o($V3,[2,13]),o($V3,[2,14]),o($V3,[2,15]),{8:$Vs,9:$Vt,10:$V61,11:$Vu,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,24:197,30:$Vd1,32:[1,196],34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:198,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},o($VH1,[2,117]),o($VH1,[2,119]),o($VH1,[2,170]),o($VH1,[2,171]),o($VH1,[2,172]),o($VH1,[2,173]),o($VH1,[2,174]),o($VH1,[2,175]),o($VH1,[2,176]),o($VH1,[2,177]),o($VH1,[2,178]),o($VH1,[2,179]),o($VH1,[2,180]),o($VH1,[2,189]),o($VH1,[2,190]),o($VH1,[2,191]),o($VH1,[2,192]),o($VH1,[2,193]),o($VH1,[2,194]),o($VH1,[2,195]),o($VH1,[2,196]),o($VH1,[2,197]),o($VH1,[2,198]),o($VH1,[2,199]),o($VH1,[2,122]),o($VH1,[2,123]),o($VH1,[2,124]),o($VH1,[2,125]),o($VH1,[2,126]),o($VH1,[2,127]),o($VH1,[2,128]),o($VH1,[2,129]),o($VH1,[2,130]),o($VH1,[2,131]),o($VH1,[2,132]),{6:10,7:11,8:$V5,9:$V6,10:$V7,11:$V8,18:$V9,23:16,25:17,26:18,27:19,28:20,29:21,30:$Va,34:[1,199],35:23,38:29,91:$Vb,92:$Vc,93:$Vd,94:$Ve,95:$Vf,106:$Vg,107:$Vh,110:$Vi,111:$Vj,112:$Vk,114:$Vl,117:30,120:$Vm,121:$Vn,122:$Vo,123:$Vp,124:$Vq},o($Vv,[2,42],{37:[1,200]}),o($Vv,[2,47],{49:61,117:108,36:201,18:$V9,52:$Vw,53:$Vx,54:$Vy,55:$Vz,56:$VA,57:$VB,58:$VC,59:$VD,60:$VE,61:$VF,62:$VG,63:$VH,64:$VI,65:$VJ,66:$VK,67:$VL,68:$VM,69:$VN,70:$VO,71:$VP,72:$VQ,73:$VR,74:$VS,75:$VT,76:$VU,77:$VV,78:$VW,79:$VX,80:$VY,81:$VZ,82:$V_,83:$V$,84:$V01,106:$Vg,107:$Vh,110:$Vi,111:$Vj,112:$Vk,114:$Vl,120:$Vm,121:$Vn,122:$Vo,123:$Vp,124:$Vq}),o($VC1,[2,70],{10:[1,202]}),{10:[1,203]},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,31:204,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:119,87:$Vi1,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,34:$Ve1,37:$Vf1,52:$Vg1,53:[1,205],55:[1,206],57:[1,207],59:[1,208],68:$Vh1,86:198,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,34:$Ve1,37:$Vf1,52:$Vg1,53:[1,209],68:$Vh1,86:198,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,34:$Ve1,37:$Vf1,52:$Vg1,55:[1,210],68:$Vh1,86:198,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,34:$Ve1,37:$Vf1,52:$Vg1,57:[1,211],68:$Vh1,86:198,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,34:$Ve1,37:$Vf1,52:$Vg1,61:[1,212],63:[1,213],65:[1,214],67:[1,215],68:$Vh1,86:198,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,34:$Ve1,37:$Vf1,52:$Vg1,61:[1,216],68:$Vh1,86:198,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,34:$Ve1,37:$Vf1,52:$Vg1,63:[1,217],68:$Vh1,86:198,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,34:$Ve1,37:$Vf1,52:$Vg1,65:[1,218],68:$Vh1,86:198,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,69:[1,219],71:[1,220],73:[1,221],75:[1,222],86:198,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,69:[1,223],86:198,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,71:[1,224],86:198,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,73:[1,225],86:198,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:[1,226],13:$VE1,18:$VF1,37:$Vf1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$VG1,114:$Vv1,116:176,118:227,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:[1,228]},o($VI1,[2,183]),o($VI1,[2,185]),o($VI1,[2,186]),o($VI1,[2,187]),o($VI1,[2,188]),{10:[1,229]},{10:[1,230],107:[1,231]},o($VJ1,[2,151]),{10:[1,232]},{10:[1,233],13:$VE1,18:$VF1,37:$Vf1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$VG1,114:$Vv1,116:176,118:227,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:[1,234],13:$VE1,18:$VF1,37:$Vf1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$VG1,114:$Vv1,116:176,118:227,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:[1,235],13:$VE1,18:$VF1,37:$Vf1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$VG1,114:$Vv1,116:176,118:227,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,33:[1,236],34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:198,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,31:237,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:119,87:$Vi1,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,34:$Ve1,37:$Vf1,40:[1,238],52:$Vg1,68:$Vh1,86:198,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,34:$Ve1,37:$Vf1,42:[1,239],52:$Vg1,68:$Vh1,86:198,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,34:$Ve1,37:$Vf1,44:[1,240],52:$Vg1,68:$Vh1,86:198,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,33:[1,241],34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:198,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,34:$Ve1,37:$Vf1,46:[1,242],48:[1,243],52:$Vg1,68:$Vh1,86:198,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,34:$Ve1,37:$Vf1,46:[1,245],48:[1,244],52:$Vg1,68:$Vh1,86:198,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},o($V11,[2,28]),o($V3,[2,23]),{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,31:246,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:119,87:$Vi1,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},o($VB1,$V4,{5:247}),o($VH1,[2,118]),o($Vr,[2,38]),{18:$V9,38:248,106:$Vg,107:$Vh,110:$Vi,111:$Vj,112:$Vk,114:$Vl,117:30,120:$Vm,121:$Vn,122:$Vo,123:$Vp,124:$Vq},{18:$V9,35:249,38:29,106:$Vg,107:$Vh,110:$Vi,111:$Vj,112:$Vk,114:$Vl,117:30,120:$Vm,121:$Vn,122:$Vo,123:$Vp,124:$Vq},o($VC1,[2,72]),o($VC1,[2,71]),{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,85:[1,250],86:198,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},o($VC1,[2,74]),o($VC1,[2,76]),o($VC1,[2,78]),o($VC1,[2,80]),o($VC1,[2,75]),o($VC1,[2,77]),o($VC1,[2,79]),o($VC1,[2,81]),o($VC1,[2,83]),o($VC1,[2,85]),o($VC1,[2,87]),o($VC1,[2,82]),o($VC1,[2,84]),o($VC1,[2,86]),o($VC1,[2,88]),o($VC1,[2,90]),o($VC1,[2,92]),o($VC1,[2,94]),o($VC1,[2,89]),o($VC1,[2,91]),o($VC1,[2,93]),{10:$VK1,37:$VL1,91:$VM1,99:251,101:$VN1,105:$VO1,106:$VP1,108:252,109:253,110:$VQ1,111:$VR1,112:$VS1,113:$VT1,114:$VU1},o($VI1,[2,184]),{10:$VK1,37:$VL1,91:$VM1,99:265,101:$VN1,105:$VO1,106:$VP1,108:252,109:253,110:$VQ1,111:$VR1,112:$VS1,113:$VT1,114:$VU1},{10:$VK1,37:$VL1,91:$VM1,99:266,101:$VN1,103:[1,267],105:$VO1,106:$VP1,108:252,109:253,110:$VQ1,111:$VR1,112:$VS1,113:$VT1,114:$VU1},{10:$VK1,37:$VL1,91:$VM1,99:268,101:$VN1,103:[1,269],105:$VO1,106:$VP1,108:252,109:253,110:$VQ1,111:$VR1,112:$VS1,113:$VT1,114:$VU1},{106:[1,270]},{10:$VK1,37:$VL1,91:$VM1,99:271,101:$VN1,105:$VO1,106:$VP1,108:252,109:253,110:$VQ1,111:$VR1,112:$VS1,113:$VT1,114:$VU1},{10:$VK1,37:$VL1,91:$VM1,99:272,101:$VN1,105:$VO1,106:$VP1,108:252,109:253,110:$VQ1,111:$VR1,112:$VS1,113:$VT1,114:$VU1},{13:$VE1,18:$VF1,37:$Vf1,100:273,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$VG1,114:$Vv1,116:176,118:174,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{13:$VE1,18:$VF1,37:$Vf1,87:[1,275],100:274,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$VG1,114:$Vv1,116:176,118:174,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},o($V11,[2,48],{21:276,10:$V21}),{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,34:$Ve1,37:$Vf1,40:[1,277],52:$Vg1,68:$Vh1,86:198,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},o($V11,[2,54],{21:278,10:$V21}),o($V11,[2,52],{21:279,10:$V21}),o($V11,[2,56],{21:280,10:$V21}),o($V11,[2,58],{21:281,10:$V21}),o($V11,[2,60],{21:282,10:$V21}),o($V11,[2,64],{21:283,10:$V21}),o($V11,[2,62],{21:284,10:$V21}),o($V11,[2,66],{21:285,10:$V21}),{10:$V61,12:$V71,13:$V81,15:$V91,16:$Va1,17:$Vb1,18:$Vc1,30:$Vd1,33:[1,286],34:$Ve1,37:$Vf1,52:$Vg1,68:$Vh1,86:198,90:131,91:$Vj1,92:$Vk1,93:$Vl1,94:$Vm1,95:$Vn1,97:121,98:$Vo1,105:$Vp1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$Vu1,114:$Vv1,116:128,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{6:10,7:11,8:$V5,9:$V6,10:$V7,11:$V8,18:$V9,23:16,25:17,26:18,27:19,28:20,29:21,30:$Va,34:[1,287],35:23,38:29,91:$Vb,92:$Vc,93:$Vd,94:$Ve,95:$Vf,106:$Vg,107:$Vh,110:$Vi,111:$Vj,112:$Vk,114:$Vl,117:30,120:$Vm,121:$Vn,122:$Vo,123:$Vp,124:$Vq},o($Vv,[2,43],{117:108,18:$V9,106:$Vg,107:$Vh,110:$Vi,111:$Vj,112:$Vk,114:$Vl,120:$Vm,121:$Vn,122:$Vo,123:$Vp,124:$Vq}),o($Vv,[2,44],{37:[1,288]}),o([10,18,106,107,110,111,112,114,120,121,122,123,124],[2,116]),o($Vv,[2,142],{107:$VV1}),o($VW1,[2,153],{109:290,10:$VK1,37:$VL1,91:$VM1,101:$VN1,105:$VO1,106:$VP1,110:$VQ1,111:$VR1,112:$VS1,113:$VT1,114:$VU1}),o($VX1,[2,155]),o($VX1,[2,157]),o($VX1,[2,158]),o($VX1,[2,159]),o($VX1,[2,160]),o($VX1,[2,161]),o($VX1,[2,162]),o($VX1,[2,163]),o($VX1,[2,164]),o($VX1,[2,165]),o($VX1,[2,166]),o($VX1,[2,167]),o($Vv,[2,143],{107:$VV1}),o($Vv,[2,144],{107:$VV1}),{10:[1,291]},o($Vv,[2,145],{107:$VV1}),{10:[1,292]},o($VJ1,[2,152]),o($Vv,[2,135],{107:$VV1}),o($Vv,[2,136],{107:$VV1}),o($Vv,[2,137],{116:176,118:227,13:$VE1,18:$VF1,37:$Vf1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$VG1,114:$Vv1,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1}),o($Vv,[2,138],{116:176,118:227,10:[1,293],13:$VE1,18:$VF1,37:$Vf1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$VG1,114:$Vv1,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1}),o($Vv,[2,140],{10:[1,294]}),o($V11,[2,49]),{40:[1,295]},o($V11,[2,55]),o($V11,[2,53]),o($V11,[2,57]),o($V11,[2,59]),o($V11,[2,61]),o($V11,[2,65]),o($V11,[2,63]),o($V11,[2,67]),{8:$Vs,9:$Vt,11:$Vu,24:296},o($Vr,[2,37]),{18:$V9,38:297,106:$Vg,107:$Vh,110:$Vi,111:$Vj,112:$Vk,114:$Vl,117:30,120:$Vm,121:$Vn,122:$Vo,123:$Vp,124:$Vq},{10:$VK1,37:$VL1,91:$VM1,101:$VN1,105:$VO1,106:$VP1,108:298,109:253,110:$VQ1,111:$VR1,112:$VS1,113:$VT1,114:$VU1},o($VX1,[2,156]),{13:$VE1,18:$VF1,37:$Vf1,100:299,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$VG1,114:$Vv1,116:176,118:174,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{13:$VE1,18:$VF1,37:$Vf1,100:300,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$VG1,114:$Vv1,116:176,118:174,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1},{87:[1,301]},{87:[1,302]},o($V11,[2,50],{21:303,10:$V21}),o($VB1,$V4,{5:304}),o($Vv,[2,45],{117:108,18:$V9,106:$Vg,107:$Vh,110:$Vi,111:$Vj,112:$Vk,114:$Vl,120:$Vm,121:$Vn,122:$Vo,123:$Vp,124:$Vq}),o($VW1,[2,154],{109:290,10:$VK1,37:$VL1,91:$VM1,101:$VN1,105:$VO1,106:$VP1,110:$VQ1,111:$VR1,112:$VS1,113:$VT1,114:$VU1}),o($Vv,[2,148],{116:176,118:227,10:[1,305],13:$VE1,18:$VF1,37:$Vf1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$VG1,114:$Vv1,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1}),o($Vv,[2,149],{116:176,118:227,10:[1,306],13:$VE1,18:$VF1,37:$Vf1,106:$Vq1,107:$Vr1,110:$Vs1,111:$Vt1,112:$VG1,114:$Vv1,119:$Vw1,120:$Vx1,121:$Vy1,122:$Vz1,123:$VA1}),o($Vv,[2,139]),o($Vv,[2,141]),o($V11,[2,51]),{6:10,7:11,8:$V5,9:$V6,10:$V7,11:$V8,18:$V9,23:16,25:17,26:18,27:19,28:20,29:21,30:$Va,34:[1,307],35:23,38:29,91:$Vb,92:$Vc,93:$Vd,94:$Ve,95:$Vf,106:$Vg,107:$Vh,110:$Vi,111:$Vj,112:$Vk,114:$Vl,117:30,120:$Vm,121:$Vn,122:$Vo,123:$Vp,124:$Vq},{10:$VK1,37:$VL1,91:$VM1,99:308,101:$VN1,105:$VO1,106:$VP1,108:252,109:253,110:$VQ1,111:$VR1,112:$VS1,113:$VT1,114:$VU1},{10:$VK1,37:$VL1,91:$VM1,99:309,101:$VN1,105:$VO1,106:$VP1,108:252,109:253,110:$VQ1,111:$VR1,112:$VS1,113:$VT1,114:$VU1},o($Vr,[2,36]),o($Vv,[2,146],{107:$VV1}),o($Vv,[2,147],{107:$VV1})],
  3084. defaultActions: {},
  3085. parseError: function parseError (str, hash) {
  3086. if (hash.recoverable) {
  3087. this.trace(str);
  3088. } else {
  3089. var error = new Error(str);
  3090. error.hash = hash;
  3091. throw error;
  3092. }
  3093. },
  3094. parse: function parse(input) {
  3095. var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
  3096. var args = lstack.slice.call(arguments, 1);
  3097. var lexer = Object.create(this.lexer);
  3098. var sharedState = { yy: {} };
  3099. for (var k in this.yy) {
  3100. if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
  3101. sharedState.yy[k] = this.yy[k];
  3102. }
  3103. }
  3104. lexer.setInput(input, sharedState.yy);
  3105. sharedState.yy.lexer = lexer;
  3106. sharedState.yy.parser = this;
  3107. if (typeof lexer.yylloc == 'undefined') {
  3108. lexer.yylloc = {};
  3109. }
  3110. var yyloc = lexer.yylloc;
  3111. lstack.push(yyloc);
  3112. var ranges = lexer.options && lexer.options.ranges;
  3113. if (typeof sharedState.yy.parseError === 'function') {
  3114. this.parseError = sharedState.yy.parseError;
  3115. } else {
  3116. this.parseError = Object.getPrototypeOf(this).parseError;
  3117. }
  3118. function popStack(n) {
  3119. stack.length = stack.length - 2 * n;
  3120. vstack.length = vstack.length - n;
  3121. lstack.length = lstack.length - n;
  3122. }
  3123. function lex() {
  3124. var token;
  3125. token = tstack.pop() || lexer.lex() || EOF;
  3126. if (typeof token !== 'number') {
  3127. if (token instanceof Array) {
  3128. tstack = token;
  3129. token = tstack.pop();
  3130. }
  3131. token = self.symbols_[token] || token;
  3132. }
  3133. return token;
  3134. }
  3135. var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
  3136. while (true) {
  3137. state = stack[stack.length - 1];
  3138. if (this.defaultActions[state]) {
  3139. action = this.defaultActions[state];
  3140. } else {
  3141. if (symbol === null || typeof symbol == 'undefined') {
  3142. symbol = lex();
  3143. }
  3144. action = table[state] && table[state][symbol];
  3145. }
  3146. if (typeof action === 'undefined' || !action.length || !action[0]) {
  3147. var errStr = '';
  3148. expected = [];
  3149. for (p in table[state]) {
  3150. if (this.terminals_[p] && p > TERROR) {
  3151. expected.push('\'' + this.terminals_[p] + '\'');
  3152. }
  3153. }
  3154. if (lexer.showPosition) {
  3155. errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
  3156. } else {
  3157. errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
  3158. }
  3159. this.parseError(errStr, {
  3160. text: lexer.match,
  3161. token: this.terminals_[symbol] || symbol,
  3162. line: lexer.yylineno,
  3163. loc: yyloc,
  3164. expected: expected
  3165. });
  3166. }
  3167. if (action[0] instanceof Array && action.length > 1) {
  3168. throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
  3169. }
  3170. switch (action[0]) {
  3171. case 1:
  3172. stack.push(symbol);
  3173. vstack.push(lexer.yytext);
  3174. lstack.push(lexer.yylloc);
  3175. stack.push(action[1]);
  3176. symbol = null;
  3177. if (!preErrorSymbol) {
  3178. yyleng = lexer.yyleng;
  3179. yytext = lexer.yytext;
  3180. yylineno = lexer.yylineno;
  3181. yyloc = lexer.yylloc;
  3182. if (recovering > 0) {
  3183. recovering--;
  3184. }
  3185. } else {
  3186. symbol = preErrorSymbol;
  3187. preErrorSymbol = null;
  3188. }
  3189. break;
  3190. case 2:
  3191. len = this.productions_[action[1]][1];
  3192. yyval.$ = vstack[vstack.length - len];
  3193. yyval._$ = {
  3194. first_line: lstack[lstack.length - (len || 1)].first_line,
  3195. last_line: lstack[lstack.length - 1].last_line,
  3196. first_column: lstack[lstack.length - (len || 1)].first_column,
  3197. last_column: lstack[lstack.length - 1].last_column
  3198. };
  3199. if (ranges) {
  3200. yyval._$.range = [
  3201. lstack[lstack.length - (len || 1)].range[0],
  3202. lstack[lstack.length - 1].range[1]
  3203. ];
  3204. }
  3205. r = this.performAction.apply(yyval, [
  3206. yytext,
  3207. yyleng,
  3208. yylineno,
  3209. sharedState.yy,
  3210. action[1],
  3211. vstack,
  3212. lstack
  3213. ].concat(args));
  3214. if (typeof r !== 'undefined') {
  3215. return r;
  3216. }
  3217. if (len) {
  3218. stack = stack.slice(0, -1 * len * 2);
  3219. vstack = vstack.slice(0, -1 * len);
  3220. lstack = lstack.slice(0, -1 * len);
  3221. }
  3222. stack.push(this.productions_[action[1]][0]);
  3223. vstack.push(yyval.$);
  3224. lstack.push(yyval._$);
  3225. newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
  3226. stack.push(newState);
  3227. break;
  3228. case 3:
  3229. return true;
  3230. }
  3231. }
  3232. return true;
  3233. }};
  3234. /* generated by jison-lex 0.3.4 */
  3235. var lexer = (function(){
  3236. var lexer = ({
  3237. EOF:1,
  3238. parseError:function parseError(str, hash) {
  3239. if (this.yy.parser) {
  3240. this.yy.parser.parseError(str, hash);
  3241. } else {
  3242. throw new Error(str);
  3243. }
  3244. },
  3245. // resets the lexer, sets new input
  3246. setInput:function (input, yy) {
  3247. this.yy = yy || this.yy || {};
  3248. this._input = input;
  3249. this._more = this._backtrack = this.done = false;
  3250. this.yylineno = this.yyleng = 0;
  3251. this.yytext = this.matched = this.match = '';
  3252. this.conditionStack = ['INITIAL'];
  3253. this.yylloc = {
  3254. first_line: 1,
  3255. first_column: 0,
  3256. last_line: 1,
  3257. last_column: 0
  3258. };
  3259. if (this.options.ranges) {
  3260. this.yylloc.range = [0,0];
  3261. }
  3262. this.offset = 0;
  3263. return this;
  3264. },
  3265. // consumes and returns one char from the input
  3266. input:function () {
  3267. var ch = this._input[0];
  3268. this.yytext += ch;
  3269. this.yyleng++;
  3270. this.offset++;
  3271. this.match += ch;
  3272. this.matched += ch;
  3273. var lines = ch.match(/(?:\r\n?|\n).*/g);
  3274. if (lines) {
  3275. this.yylineno++;
  3276. this.yylloc.last_line++;
  3277. } else {
  3278. this.yylloc.last_column++;
  3279. }
  3280. if (this.options.ranges) {
  3281. this.yylloc.range[1]++;
  3282. }
  3283. this._input = this._input.slice(1);
  3284. return ch;
  3285. },
  3286. // unshifts one char (or a string) into the input
  3287. unput:function (ch) {
  3288. var len = ch.length;
  3289. var lines = ch.split(/(?:\r\n?|\n)/g);
  3290. this._input = ch + this._input;
  3291. this.yytext = this.yytext.substr(0, this.yytext.length - len);
  3292. //this.yyleng -= len;
  3293. this.offset -= len;
  3294. var oldLines = this.match.split(/(?:\r\n?|\n)/g);
  3295. this.match = this.match.substr(0, this.match.length - 1);
  3296. this.matched = this.matched.substr(0, this.matched.length - 1);
  3297. if (lines.length - 1) {
  3298. this.yylineno -= lines.length - 1;
  3299. }
  3300. var r = this.yylloc.range;
  3301. this.yylloc = {
  3302. first_line: this.yylloc.first_line,
  3303. last_line: this.yylineno + 1,
  3304. first_column: this.yylloc.first_column,
  3305. last_column: lines ?
  3306. (lines.length === oldLines.length ? this.yylloc.first_column : 0)
  3307. + oldLines[oldLines.length - lines.length].length - lines[0].length :
  3308. this.yylloc.first_column - len
  3309. };
  3310. if (this.options.ranges) {
  3311. this.yylloc.range = [r[0], r[0] + this.yyleng - len];
  3312. }
  3313. this.yyleng = this.yytext.length;
  3314. return this;
  3315. },
  3316. // When called from action, caches matched text and appends it on next action
  3317. more:function () {
  3318. this._more = true;
  3319. return this;
  3320. },
  3321. // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
  3322. reject:function () {
  3323. if (this.options.backtrack_lexer) {
  3324. this._backtrack = true;
  3325. } else {
  3326. 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).\n' + this.showPosition(), {
  3327. text: "",
  3328. token: null,
  3329. line: this.yylineno
  3330. });
  3331. }
  3332. return this;
  3333. },
  3334. // retain first n characters of the match
  3335. less:function (n) {
  3336. this.unput(this.match.slice(n));
  3337. },
  3338. // displays already matched input, i.e. for error messages
  3339. pastInput:function () {
  3340. var past = this.matched.substr(0, this.matched.length - this.match.length);
  3341. return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
  3342. },
  3343. // displays upcoming input, i.e. for error messages
  3344. upcomingInput:function () {
  3345. var next = this.match;
  3346. if (next.length < 20) {
  3347. next += this._input.substr(0, 20-next.length);
  3348. }
  3349. return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
  3350. },
  3351. // displays the character position where the lexing error occurred, i.e. for error messages
  3352. showPosition:function () {
  3353. var pre = this.pastInput();
  3354. var c = new Array(pre.length + 1).join("-");
  3355. return pre + this.upcomingInput() + "\n" + c + "^";
  3356. },
  3357. // test the lexed token: return FALSE when not a match, otherwise return token
  3358. test_match:function(match, indexed_rule) {
  3359. var token,
  3360. lines,
  3361. backup;
  3362. if (this.options.backtrack_lexer) {
  3363. // save context
  3364. backup = {
  3365. yylineno: this.yylineno,
  3366. yylloc: {
  3367. first_line: this.yylloc.first_line,
  3368. last_line: this.last_line,
  3369. first_column: this.yylloc.first_column,
  3370. last_column: this.yylloc.last_column
  3371. },
  3372. yytext: this.yytext,
  3373. match: this.match,
  3374. matches: this.matches,
  3375. matched: this.matched,
  3376. yyleng: this.yyleng,
  3377. offset: this.offset,
  3378. _more: this._more,
  3379. _input: this._input,
  3380. yy: this.yy,
  3381. conditionStack: this.conditionStack.slice(0),
  3382. done: this.done
  3383. };
  3384. if (this.options.ranges) {
  3385. backup.yylloc.range = this.yylloc.range.slice(0);
  3386. }
  3387. }
  3388. lines = match[0].match(/(?:\r\n?|\n).*/g);
  3389. if (lines) {
  3390. this.yylineno += lines.length;
  3391. }
  3392. this.yylloc = {
  3393. first_line: this.yylloc.last_line,
  3394. last_line: this.yylineno + 1,
  3395. first_column: this.yylloc.last_column,
  3396. last_column: lines ?
  3397. lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
  3398. this.yylloc.last_column + match[0].length
  3399. };
  3400. this.yytext += match[0];
  3401. this.match += match[0];
  3402. this.matches = match;
  3403. this.yyleng = this.yytext.length;
  3404. if (this.options.ranges) {
  3405. this.yylloc.range = [this.offset, this.offset += this.yyleng];
  3406. }
  3407. this._more = false;
  3408. this._backtrack = false;
  3409. this._input = this._input.slice(match[0].length);
  3410. this.matched += match[0];
  3411. token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
  3412. if (this.done && this._input) {
  3413. this.done = false;
  3414. }
  3415. if (token) {
  3416. return token;
  3417. } else if (this._backtrack) {
  3418. // recover context
  3419. for (var k in backup) {
  3420. this[k] = backup[k];
  3421. }
  3422. return false; // rule action called reject() implying the next rule should be tested instead.
  3423. }
  3424. return false;
  3425. },
  3426. // return next match in input
  3427. next:function () {
  3428. if (this.done) {
  3429. return this.EOF;
  3430. }
  3431. if (!this._input) {
  3432. this.done = true;
  3433. }
  3434. var token,
  3435. match,
  3436. tempMatch,
  3437. index;
  3438. if (!this._more) {
  3439. this.yytext = '';
  3440. this.match = '';
  3441. }
  3442. var rules = this._currentRules();
  3443. for (var i = 0; i < rules.length; i++) {
  3444. tempMatch = this._input.match(this.rules[rules[i]]);
  3445. if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
  3446. match = tempMatch;
  3447. index = i;
  3448. if (this.options.backtrack_lexer) {
  3449. token = this.test_match(tempMatch, rules[i]);
  3450. if (token !== false) {
  3451. return token;
  3452. } else if (this._backtrack) {
  3453. match = false;
  3454. continue; // rule action called reject() implying a rule MISmatch.
  3455. } else {
  3456. // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
  3457. return false;
  3458. }
  3459. } else if (!this.options.flex) {
  3460. break;
  3461. }
  3462. }
  3463. }
  3464. if (match) {
  3465. token = this.test_match(match, rules[index]);
  3466. if (token !== false) {
  3467. return token;
  3468. }
  3469. // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
  3470. return false;
  3471. }
  3472. if (this._input === "") {
  3473. return this.EOF;
  3474. } else {
  3475. return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
  3476. text: "",
  3477. token: null,
  3478. line: this.yylineno
  3479. });
  3480. }
  3481. },
  3482. // return next match that has a token
  3483. lex:function lex () {
  3484. var r = this.next();
  3485. if (r) {
  3486. return r;
  3487. } else {
  3488. return this.lex();
  3489. }
  3490. },
  3491. // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
  3492. begin:function begin (condition) {
  3493. this.conditionStack.push(condition);
  3494. },
  3495. // pop the previously active lexer condition state off the condition stack
  3496. popState:function popState () {
  3497. var n = this.conditionStack.length - 1;
  3498. if (n > 0) {
  3499. return this.conditionStack.pop();
  3500. } else {
  3501. return this.conditionStack[0];
  3502. }
  3503. },
  3504. // produce the lexer rule set which is active for the currently active lexer condition state
  3505. _currentRules:function _currentRules () {
  3506. if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
  3507. return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
  3508. } else {
  3509. return this.conditions["INITIAL"].rules;
  3510. }
  3511. },
  3512. // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
  3513. topState:function topState (n) {
  3514. n = this.conditionStack.length - 1 - Math.abs(n || 0);
  3515. if (n >= 0) {
  3516. return this.conditionStack[n];
  3517. } else {
  3518. return "INITIAL";
  3519. }
  3520. },
  3521. // alias for begin(condition)
  3522. pushState:function pushState (condition) {
  3523. this.begin(condition);
  3524. },
  3525. // return the number of states currently on the stack
  3526. stateStackSize:function stateStackSize() {
  3527. return this.conditionStack.length;
  3528. },
  3529. options: {},
  3530. performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
  3531. var YYSTATE=YY_START;
  3532. switch($avoiding_name_collisions) {
  3533. case 0:/* do nothing */
  3534. break;
  3535. case 1:this.begin("string");
  3536. break;
  3537. case 2:this.popState();
  3538. break;
  3539. case 3:return "STR";
  3540. break;
  3541. case 4:return 91;
  3542. break;
  3543. case 5:return 98;
  3544. break;
  3545. case 6:return 92;
  3546. break;
  3547. case 7:return 103;
  3548. break;
  3549. case 8:return 93;
  3550. break;
  3551. case 9:return 94;
  3552. break;
  3553. case 10:return 95;
  3554. break;
  3555. case 11:return 12;
  3556. break;
  3557. case 12:return 30;
  3558. break;
  3559. case 13:return 34;
  3560. break;
  3561. case 14:return 13;
  3562. break;
  3563. case 15:return 13;
  3564. break;
  3565. case 16:return 13;
  3566. break;
  3567. case 17:return 13;
  3568. break;
  3569. case 18:return 13;
  3570. break;
  3571. case 19:return 13;
  3572. break;
  3573. case 20:return 106;
  3574. break;
  3575. case 21:return 114;
  3576. break;
  3577. case 22:return 111;
  3578. break;
  3579. case 23:return 8;
  3580. break;
  3581. case 24:return 107;
  3582. break;
  3583. case 25:return 123;
  3584. break;
  3585. case 26:return 57;
  3586. break;
  3587. case 27:return 53;
  3588. break;
  3589. case 28:return 76;
  3590. break;
  3591. case 29:return 78;
  3592. break;
  3593. case 30:return 77;
  3594. break;
  3595. case 31:return 80;
  3596. break;
  3597. case 32:return 82;
  3598. break;
  3599. case 33:return 83;
  3600. break;
  3601. case 34:return 84;
  3602. break;
  3603. case 35:return 81;
  3604. break;
  3605. case 36:return 81;
  3606. break;
  3607. case 37:return 79;
  3608. break;
  3609. case 38:return 79;
  3610. break;
  3611. case 39:return 80;
  3612. break;
  3613. case 40:return 55;
  3614. break;
  3615. case 41:return 59;
  3616. break;
  3617. case 42:return 65;
  3618. break;
  3619. case 43:return 61;
  3620. break;
  3621. case 44:return 63;
  3622. break;
  3623. case 45:return 67;
  3624. break;
  3625. case 46:return 65;
  3626. break;
  3627. case 47:return 61;
  3628. break;
  3629. case 48:return 63;
  3630. break;
  3631. case 49:return 67;
  3632. break;
  3633. case 50:return 73;
  3634. break;
  3635. case 51:return 69;
  3636. break;
  3637. case 52:return 71;
  3638. break;
  3639. case 53:return 75;
  3640. break;
  3641. case 54:return 54;
  3642. break;
  3643. case 55:return 58;
  3644. break;
  3645. case 56:return 56;
  3646. break;
  3647. case 57:return 62;
  3648. break;
  3649. case 58:return 66;
  3650. break;
  3651. case 59:return 64;
  3652. break;
  3653. case 60:return 70;
  3654. break;
  3655. case 61:return 74;
  3656. break;
  3657. case 62:return 72;
  3658. break;
  3659. case 63:return 52;
  3660. break;
  3661. case 64:return 60;
  3662. break;
  3663. case 65:return 68;
  3664. break;
  3665. case 66:return 41;
  3666. break;
  3667. case 67:return 42;
  3668. break;
  3669. case 68:return 112;
  3670. break;
  3671. case 69:return 37;
  3672. break;
  3673. case 70:return 124;
  3674. break;
  3675. case 71:return 121;
  3676. break;
  3677. case 72:return 105;
  3678. break;
  3679. case 73:return 122;
  3680. break;
  3681. case 74:return 122;
  3682. break;
  3683. case 75:return 16;
  3684. break;
  3685. case 76:return 15;
  3686. break;
  3687. case 77:return 17;
  3688. break;
  3689. case 78:return 18;
  3690. break;
  3691. case 79:return 110;
  3692. break;
  3693. case 80:return 46;
  3694. break;
  3695. case 81:return 45;
  3696. break;
  3697. case 82:return 48;
  3698. break;
  3699. case 83:return 47;
  3700. break;
  3701. case 84:return 119;
  3702. break;
  3703. case 85:return 120;
  3704. break;
  3705. case 86:return 85;
  3706. break;
  3707. case 87:return 39;
  3708. break;
  3709. case 88:return 40;
  3710. break;
  3711. case 89:return 32;
  3712. break;
  3713. case 90:return 33;
  3714. break;
  3715. case 91:return 43
  3716. break;
  3717. case 92:return 44
  3718. break;
  3719. case 93:return 125;
  3720. break;
  3721. case 94:return 9;
  3722. break;
  3723. case 95:return 10;
  3724. break;
  3725. case 96:return 11;
  3726. break;
  3727. }
  3728. },
  3729. rules: [/^(?:%%[^\n]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*--[x]\s*)/,/^(?:\s*-->\s*)/,/^(?:\s*<-->\s*)/,/^(?:\s*[x]--[x]\s*)/,/^(?:\s*[o]--[o]\s*)/,/^(?:\s*[o]\.-[o]\s*)/,/^(?:\s*<==>\s*)/,/^(?:\s*[o]==[o]\s*)/,/^(?:\s*[x]==[x]\s*)/,/^(?:\s*[x].-[x]\s*)/,/^(?:\s*[x]-\.-[x]\s*)/,/^(?:\s*<\.->\s*)/,/^(?:\s*<-\.->\s*)/,/^(?:\s*[o]-\.-[o]\s*)/,/^(?:\s*--[o]\s*)/,/^(?:\s*---\s*)/,/^(?:\s*-\.-[x]\s*)/,/^(?:\s*-\.->\s*)/,/^(?:\s*-\.-[o]\s*)/,/^(?:\s*-\.-\s*)/,/^(?:\s*.-[x]\s*)/,/^(?:\s*\.->\s*)/,/^(?:\s*\.-[o]\s*)/,/^(?:\s*\.-\s*)/,/^(?:\s*==[x]\s*)/,/^(?:\s*==>\s*)/,/^(?:\s*==[o]\s*)/,/^(?:\s*==[\=]\s*)/,/^(?:\s*<--\s*)/,/^(?:\s*[x]--\s*)/,/^(?:\s*[o]--\s*)/,/^(?:\s*<-\.\s*)/,/^(?:\s*[x]-\.\s*)/,/^(?:\s*[o]-\.\s*)/,/^(?:\s*<==\s*)/,/^(?:\s*[x]==\s*)/,/^(?:\s*[o]==\s*)/,/^(?:\s*--\s*)/,/^(?:\s*-\.\s*)/,/^(?:\s*==\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_\/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:\n+)/,/^(?:\s)/,/^(?:$)/],
  3730. conditions: {"string":{"rules":[2,3],"inclusive":false},"INITIAL":{"rules":[0,1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,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,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96],"inclusive":true}}
  3731. });
  3732. return lexer;
  3733. })();
  3734. parser.lexer = lexer;
  3735. function Parser () {
  3736. this.yy = {};
  3737. }
  3738. Parser.prototype = parser;parser.Parser = Parser;
  3739. return new Parser;
  3740. })();
  3741. if (true) {
  3742. exports.parser = parser;
  3743. exports.Parser = parser.Parser;
  3744. exports.parse = function () { return parser.parse.apply(parser, arguments); };
  3745. exports.main = function commonjsMain (args) {
  3746. if (!args[1]) {
  3747. console.log('Usage: '+args[0]+' FILE');
  3748. process.exit(1);
  3749. }
  3750. var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
  3751. return exports.parser.parse(source);
  3752. };
  3753. if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
  3754. exports.main(process.argv.slice(1));
  3755. }
  3756. }
  3757. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
  3758. /***/ }),
  3759. /***/ "./src/diagrams/gantt/ganttDb.js":
  3760. /*!***************************************!*\
  3761. !*** ./src/diagrams/gantt/ganttDb.js ***!
  3762. \***************************************/
  3763. /*! exports provided: clear, setAxisFormat, getAxisFormat, setDateFormat, enableInclusiveEndDates, endDatesAreInclusive, getDateFormat, setExcludes, getExcludes, setTitle, getTitle, addSection, getSections, getTasks, addTask, findTaskById, addTaskOrg, setLink, setClass, setClickEvent, bindFunctions, default */
  3764. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3765. "use strict";
  3766. __webpack_require__.r(__webpack_exports__);
  3767. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
  3768. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAxisFormat", function() { return setAxisFormat; });
  3769. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAxisFormat", function() { return getAxisFormat; });
  3770. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDateFormat", function() { return setDateFormat; });
  3771. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "enableInclusiveEndDates", function() { return enableInclusiveEndDates; });
  3772. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "endDatesAreInclusive", function() { return endDatesAreInclusive; });
  3773. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDateFormat", function() { return getDateFormat; });
  3774. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setExcludes", function() { return setExcludes; });
  3775. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getExcludes", function() { return getExcludes; });
  3776. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTitle", function() { return setTitle; });
  3777. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTitle", function() { return getTitle; });
  3778. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addSection", function() { return addSection; });
  3779. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSections", function() { return getSections; });
  3780. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTasks", function() { return getTasks; });
  3781. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addTask", function() { return addTask; });
  3782. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findTaskById", function() { return findTaskById; });
  3783. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addTaskOrg", function() { return addTaskOrg; });
  3784. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLink", function() { return setLink; });
  3785. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setClass", function() { return setClass; });
  3786. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setClickEvent", function() { return setClickEvent; });
  3787. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindFunctions", function() { return bindFunctions; });
  3788. /* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moment-mini */ "moment-mini");
  3789. /* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment_mini__WEBPACK_IMPORTED_MODULE_0__);
  3790. /* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @braintree/sanitize-url */ "@braintree/sanitize-url");
  3791. /* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__);
  3792. /* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
  3793. /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../config */ "./src/config.js");
  3794. const config = Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])();
  3795. let dateFormat = '';
  3796. let axisFormat = '';
  3797. let excludes = [];
  3798. let title = '';
  3799. let sections = [];
  3800. let tasks = [];
  3801. let currentSection = '';
  3802. const tags = ['active', 'done', 'crit', 'milestone'];
  3803. let funs = [];
  3804. let inclusiveEndDates = false;
  3805. const clear = function () {
  3806. sections = [];
  3807. tasks = [];
  3808. currentSection = '';
  3809. funs = [];
  3810. title = '';
  3811. taskCnt = 0;
  3812. lastTask = undefined;
  3813. lastTaskID = undefined;
  3814. rawTasks = [];
  3815. dateFormat = '';
  3816. axisFormat = '';
  3817. excludes = [];
  3818. inclusiveEndDates = false;
  3819. };
  3820. const setAxisFormat = function (txt) {
  3821. axisFormat = txt;
  3822. };
  3823. const getAxisFormat = function () {
  3824. return axisFormat;
  3825. };
  3826. const setDateFormat = function (txt) {
  3827. dateFormat = txt;
  3828. };
  3829. const enableInclusiveEndDates = function () {
  3830. inclusiveEndDates = true;
  3831. };
  3832. const endDatesAreInclusive = function () {
  3833. return inclusiveEndDates;
  3834. };
  3835. const getDateFormat = function () {
  3836. return dateFormat;
  3837. };
  3838. const setExcludes = function (txt) {
  3839. excludes = txt.toLowerCase().split(/[\s,]+/);
  3840. };
  3841. const getExcludes = function () {
  3842. return excludes;
  3843. };
  3844. const setTitle = function (txt) {
  3845. title = txt;
  3846. };
  3847. const getTitle = function () {
  3848. return title;
  3849. };
  3850. const addSection = function (txt) {
  3851. currentSection = txt;
  3852. sections.push(txt);
  3853. };
  3854. const getSections = function () {
  3855. return sections;
  3856. };
  3857. const getTasks = function () {
  3858. let allItemsPricessed = compileTasks();
  3859. const maxDepth = 10;
  3860. let iterationCount = 0;
  3861. while (!allItemsPricessed && iterationCount < maxDepth) {
  3862. allItemsPricessed = compileTasks();
  3863. iterationCount++;
  3864. }
  3865. tasks = rawTasks;
  3866. return tasks;
  3867. };
  3868. const isInvalidDate = function (date, dateFormat, excludes) {
  3869. if (date.isoWeekday() >= 6 && excludes.indexOf('weekends') >= 0) {
  3870. return true;
  3871. }
  3872. if (excludes.indexOf(date.format('dddd').toLowerCase()) >= 0) {
  3873. return true;
  3874. }
  3875. return excludes.indexOf(date.format(dateFormat.trim())) >= 0;
  3876. };
  3877. const checkTaskDates = function (task, dateFormat, excludes) {
  3878. if (!excludes.length || task.manualEndTime) return;
  3879. let startTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(task.startTime, dateFormat, true);
  3880. startTime.add(1, 'd');
  3881. let endTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(task.endTime, dateFormat, true);
  3882. let renderEndTime = fixTaskDates(startTime, endTime, dateFormat, excludes);
  3883. task.endTime = endTime.toDate();
  3884. task.renderEndTime = renderEndTime;
  3885. };
  3886. const fixTaskDates = function (startTime, endTime, dateFormat, excludes) {
  3887. let invalid = false;
  3888. let renderEndTime = null;
  3889. while (startTime.date() <= endTime.date()) {
  3890. if (!invalid) {
  3891. renderEndTime = endTime.toDate();
  3892. }
  3893. invalid = isInvalidDate(startTime, dateFormat, excludes);
  3894. if (invalid) {
  3895. endTime.add(1, 'd');
  3896. }
  3897. startTime.add(1, 'd');
  3898. }
  3899. return renderEndTime;
  3900. };
  3901. const getStartDate = function (prevTime, dateFormat, str) {
  3902. str = str.trim(); // Test for after
  3903. const re = /^after\s+([\d\w-]+)/;
  3904. const afterStatement = re.exec(str.trim());
  3905. if (afterStatement !== null) {
  3906. const task = findTaskById(afterStatement[1]);
  3907. if (typeof task === 'undefined') {
  3908. const dt = new Date();
  3909. dt.setHours(0, 0, 0, 0);
  3910. return dt;
  3911. }
  3912. return task.endTime;
  3913. } // Check for actual date set
  3914. let mDate = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(str, dateFormat.trim(), true);
  3915. if (mDate.isValid()) {
  3916. return mDate.toDate();
  3917. } else {
  3918. _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Invalid date:' + str);
  3919. _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('With date format:' + dateFormat.trim());
  3920. } // Default date - now
  3921. return new Date();
  3922. };
  3923. const durationToDate = function (durationStatement, relativeTime) {
  3924. if (durationStatement !== null) {
  3925. switch (durationStatement[2]) {
  3926. case 's':
  3927. relativeTime.add(durationStatement[1], 'seconds');
  3928. break;
  3929. case 'm':
  3930. relativeTime.add(durationStatement[1], 'minutes');
  3931. break;
  3932. case 'h':
  3933. relativeTime.add(durationStatement[1], 'hours');
  3934. break;
  3935. case 'd':
  3936. relativeTime.add(durationStatement[1], 'days');
  3937. break;
  3938. case 'w':
  3939. relativeTime.add(durationStatement[1], 'weeks');
  3940. break;
  3941. }
  3942. } // Default date - now
  3943. return relativeTime.toDate();
  3944. };
  3945. const getEndDate = function (prevTime, dateFormat, str, inclusive) {
  3946. inclusive = inclusive || false;
  3947. str = str.trim(); // Check for actual date
  3948. let mDate = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(str, dateFormat.trim(), true);
  3949. if (mDate.isValid()) {
  3950. if (inclusive) {
  3951. mDate.add(1, 'd');
  3952. }
  3953. return mDate.toDate();
  3954. }
  3955. return durationToDate(/^([\d]+)([wdhms])/.exec(str.trim()), moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(prevTime));
  3956. };
  3957. let taskCnt = 0;
  3958. const parseId = function (idStr) {
  3959. if (typeof idStr === 'undefined') {
  3960. taskCnt = taskCnt + 1;
  3961. return 'task' + taskCnt;
  3962. }
  3963. return idStr;
  3964. }; // id, startDate, endDate
  3965. // id, startDate, length
  3966. // id, after x, endDate
  3967. // id, after x, length
  3968. // startDate, endDate
  3969. // startDate, length
  3970. // after x, endDate
  3971. // after x, length
  3972. // endDate
  3973. // length
  3974. const compileData = function (prevTask, dataStr) {
  3975. let ds;
  3976. if (dataStr.substr(0, 1) === ':') {
  3977. ds = dataStr.substr(1, dataStr.length);
  3978. } else {
  3979. ds = dataStr;
  3980. }
  3981. const data = ds.split(',');
  3982. const task = {}; // Get tags like active, done, crit and milestone
  3983. getTaskTags(data, task, tags);
  3984. for (let i = 0; i < data.length; i++) {
  3985. data[i] = data[i].trim();
  3986. }
  3987. let endTimeData = '';
  3988. switch (data.length) {
  3989. case 1:
  3990. task.id = parseId();
  3991. task.startTime = prevTask.endTime;
  3992. endTimeData = data[0];
  3993. break;
  3994. case 2:
  3995. task.id = parseId();
  3996. task.startTime = getStartDate(undefined, dateFormat, data[0]);
  3997. endTimeData = data[1];
  3998. break;
  3999. case 3:
  4000. task.id = parseId(data[0]);
  4001. task.startTime = getStartDate(undefined, dateFormat, data[1]);
  4002. endTimeData = data[2];
  4003. break;
  4004. default:
  4005. }
  4006. if (endTimeData) {
  4007. task.endTime = getEndDate(task.startTime, dateFormat, endTimeData, inclusiveEndDates);
  4008. task.manualEndTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(endTimeData, 'YYYY-MM-DD', true).isValid();
  4009. checkTaskDates(task, dateFormat, excludes);
  4010. }
  4011. return task;
  4012. };
  4013. const parseData = function (prevTaskId, dataStr) {
  4014. let ds;
  4015. if (dataStr.substr(0, 1) === ':') {
  4016. ds = dataStr.substr(1, dataStr.length);
  4017. } else {
  4018. ds = dataStr;
  4019. }
  4020. const data = ds.split(',');
  4021. const task = {}; // Get tags like active, done, crit and milestone
  4022. getTaskTags(data, task, tags);
  4023. for (let i = 0; i < data.length; i++) {
  4024. data[i] = data[i].trim();
  4025. }
  4026. switch (data.length) {
  4027. case 1:
  4028. task.id = parseId();
  4029. task.startTime = {
  4030. type: 'prevTaskEnd',
  4031. id: prevTaskId
  4032. };
  4033. task.endTime = {
  4034. data: data[0]
  4035. };
  4036. break;
  4037. case 2:
  4038. task.id = parseId();
  4039. task.startTime = {
  4040. type: 'getStartDate',
  4041. startData: data[0]
  4042. };
  4043. task.endTime = {
  4044. data: data[1]
  4045. };
  4046. break;
  4047. case 3:
  4048. task.id = parseId(data[0]);
  4049. task.startTime = {
  4050. type: 'getStartDate',
  4051. startData: data[1]
  4052. };
  4053. task.endTime = {
  4054. data: data[2]
  4055. };
  4056. break;
  4057. default:
  4058. }
  4059. return task;
  4060. };
  4061. let lastTask;
  4062. let lastTaskID;
  4063. let rawTasks = [];
  4064. const taskDb = {};
  4065. const addTask = function (descr, data) {
  4066. const rawTask = {
  4067. section: currentSection,
  4068. type: currentSection,
  4069. processed: false,
  4070. manualEndTime: false,
  4071. renderEndTime: null,
  4072. raw: {
  4073. data: data
  4074. },
  4075. task: descr,
  4076. classes: []
  4077. };
  4078. const taskInfo = parseData(lastTaskID, data);
  4079. rawTask.raw.startTime = taskInfo.startTime;
  4080. rawTask.raw.endTime = taskInfo.endTime;
  4081. rawTask.id = taskInfo.id;
  4082. rawTask.prevTaskId = lastTaskID;
  4083. rawTask.active = taskInfo.active;
  4084. rawTask.done = taskInfo.done;
  4085. rawTask.crit = taskInfo.crit;
  4086. rawTask.milestone = taskInfo.milestone;
  4087. const pos = rawTasks.push(rawTask);
  4088. lastTaskID = rawTask.id; // Store cross ref
  4089. taskDb[rawTask.id] = pos - 1;
  4090. };
  4091. const findTaskById = function (id) {
  4092. const pos = taskDb[id];
  4093. return rawTasks[pos];
  4094. };
  4095. const addTaskOrg = function (descr, data) {
  4096. const newTask = {
  4097. section: currentSection,
  4098. type: currentSection,
  4099. description: descr,
  4100. task: descr,
  4101. classes: []
  4102. };
  4103. const taskInfo = compileData(lastTask, data);
  4104. newTask.startTime = taskInfo.startTime;
  4105. newTask.endTime = taskInfo.endTime;
  4106. newTask.id = taskInfo.id;
  4107. newTask.active = taskInfo.active;
  4108. newTask.done = taskInfo.done;
  4109. newTask.crit = taskInfo.crit;
  4110. newTask.milestone = taskInfo.milestone;
  4111. lastTask = newTask;
  4112. tasks.push(newTask);
  4113. };
  4114. const compileTasks = function () {
  4115. const compileTask = function (pos) {
  4116. const task = rawTasks[pos];
  4117. let startTime = '';
  4118. switch (rawTasks[pos].raw.startTime.type) {
  4119. case 'prevTaskEnd':
  4120. const prevTask = findTaskById(task.prevTaskId);
  4121. task.startTime = prevTask.endTime;
  4122. break;
  4123. case 'getStartDate':
  4124. startTime = getStartDate(undefined, dateFormat, rawTasks[pos].raw.startTime.startData);
  4125. if (startTime) {
  4126. rawTasks[pos].startTime = startTime;
  4127. }
  4128. break;
  4129. }
  4130. if (rawTasks[pos].startTime) {
  4131. rawTasks[pos].endTime = getEndDate(rawTasks[pos].startTime, dateFormat, rawTasks[pos].raw.endTime.data, inclusiveEndDates);
  4132. if (rawTasks[pos].endTime) {
  4133. rawTasks[pos].processed = true;
  4134. rawTasks[pos].manualEndTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(rawTasks[pos].raw.endTime.data, 'YYYY-MM-DD', true).isValid();
  4135. checkTaskDates(rawTasks[pos], dateFormat, excludes);
  4136. }
  4137. }
  4138. return rawTasks[pos].processed;
  4139. };
  4140. let allProcessed = true;
  4141. for (let i = 0; i < rawTasks.length; i++) {
  4142. compileTask(i);
  4143. allProcessed = allProcessed && rawTasks[i].processed;
  4144. }
  4145. return allProcessed;
  4146. };
  4147. /**
  4148. * Called by parser when a link is found. Adds the URL to the vertex data.
  4149. * @param ids Comma separated list of ids
  4150. * @param linkStr URL to create a link for
  4151. */
  4152. const setLink = function (ids, _linkStr) {
  4153. let linkStr = _linkStr;
  4154. if (config.securityLevel !== 'loose') {
  4155. linkStr = Object(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__["sanitizeUrl"])(_linkStr);
  4156. }
  4157. ids.split(',').forEach(function (id) {
  4158. let rawTask = findTaskById(id);
  4159. if (typeof rawTask !== 'undefined') {
  4160. pushFun(id, () => {
  4161. window.open(linkStr, '_self');
  4162. });
  4163. }
  4164. });
  4165. setClass(ids, 'clickable');
  4166. };
  4167. /**
  4168. * Called by parser when a special node is found, e.g. a clickable element.
  4169. * @param ids Comma separated list of ids
  4170. * @param className Class to add
  4171. */
  4172. const setClass = function (ids, className) {
  4173. ids.split(',').forEach(function (id) {
  4174. let rawTask = findTaskById(id);
  4175. if (typeof rawTask !== 'undefined') {
  4176. rawTask.classes.push(className);
  4177. }
  4178. });
  4179. };
  4180. const setClickFun = function (id, functionName, functionArgs) {
  4181. if (config.securityLevel !== 'loose') {
  4182. return;
  4183. }
  4184. if (typeof functionName === 'undefined') {
  4185. return;
  4186. }
  4187. let argList = [];
  4188. if (typeof functionArgs === 'string') {
  4189. /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */
  4190. argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
  4191. for (let i = 0; i < argList.length; i++) {
  4192. let item = argList[i].trim();
  4193. /* Removes all double quotes at the start and end of an argument */
  4194. /* This preserves all starting and ending whitespace inside */
  4195. if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') {
  4196. item = item.substr(1, item.length - 2);
  4197. }
  4198. argList[i] = item;
  4199. }
  4200. }
  4201. let rawTask = findTaskById(id);
  4202. if (typeof rawTask !== 'undefined') {
  4203. pushFun(id, () => {
  4204. window[functionName](...argList);
  4205. });
  4206. }
  4207. };
  4208. /**
  4209. * The callbackFunction is executed in a click event bound to the task with the specified id or the task's assigned text
  4210. * @param id The task's id
  4211. * @param callbackFunction A function to be executed when clicked on the task or the task's text
  4212. */
  4213. const pushFun = function (id, callbackFunction) {
  4214. funs.push(function (element) {
  4215. // const elem = d3.select(element).select(`[id="${id}"]`)
  4216. const elem = document.querySelector(`[id="${id}"]`);
  4217. if (elem !== null) {
  4218. elem.addEventListener('click', function () {
  4219. callbackFunction();
  4220. });
  4221. }
  4222. });
  4223. funs.push(function (element) {
  4224. // const elem = d3.select(element).select(`[id="${id}-text"]`)
  4225. const elem = document.querySelector(`[id="${id}-text"]`);
  4226. if (elem !== null) {
  4227. elem.addEventListener('click', function () {
  4228. callbackFunction();
  4229. });
  4230. }
  4231. });
  4232. };
  4233. /**
  4234. * Called by parser when a click definition is found. Registers an event handler.
  4235. * @param ids Comma separated list of ids
  4236. * @param functionName Function to be called on click
  4237. * @param functionArgs Function args the function should be called with
  4238. */
  4239. const setClickEvent = function (ids, functionName, functionArgs) {
  4240. ids.split(',').forEach(function (id) {
  4241. setClickFun(id, functionName, functionArgs);
  4242. });
  4243. setClass(ids, 'clickable');
  4244. };
  4245. /**
  4246. * Binds all functions previously added to fun (specified through click) to the element
  4247. * @param element
  4248. */
  4249. const bindFunctions = function (element) {
  4250. funs.forEach(function (fun) {
  4251. fun(element);
  4252. });
  4253. };
  4254. /* harmony default export */ __webpack_exports__["default"] = ({
  4255. clear,
  4256. setDateFormat,
  4257. getDateFormat,
  4258. enableInclusiveEndDates,
  4259. endDatesAreInclusive,
  4260. setAxisFormat,
  4261. getAxisFormat,
  4262. setTitle,
  4263. getTitle,
  4264. addSection,
  4265. getSections,
  4266. getTasks,
  4267. addTask,
  4268. findTaskById,
  4269. addTaskOrg,
  4270. setExcludes,
  4271. getExcludes,
  4272. setClickEvent,
  4273. setLink,
  4274. bindFunctions,
  4275. durationToDate
  4276. });
  4277. function getTaskTags(data, task, tags) {
  4278. let matchFound = true;
  4279. while (matchFound) {
  4280. matchFound = false;
  4281. tags.forEach(function (t) {
  4282. const pattern = '^\\s*' + t + '\\s*$';
  4283. const regex = new RegExp(pattern);
  4284. if (data[0].match(regex)) {
  4285. task[t] = true;
  4286. data.shift(1);
  4287. matchFound = true;
  4288. }
  4289. });
  4290. }
  4291. }
  4292. /***/ }),
  4293. /***/ "./src/diagrams/gantt/ganttRenderer.js":
  4294. /*!*********************************************!*\
  4295. !*** ./src/diagrams/gantt/ganttRenderer.js ***!
  4296. \*********************************************/
  4297. /*! exports provided: setConf, draw, default */
  4298. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4299. "use strict";
  4300. __webpack_require__.r(__webpack_exports__);
  4301. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
  4302. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
  4303. /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
  4304. /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
  4305. /* harmony import */ var _parser_gantt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parser/gantt */ "./src/diagrams/gantt/parser/gantt.jison");
  4306. /* harmony import */ var _parser_gantt__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_parser_gantt__WEBPACK_IMPORTED_MODULE_1__);
  4307. /* harmony import */ var _ganttDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ganttDb */ "./src/diagrams/gantt/ganttDb.js");
  4308. _parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy = _ganttDb__WEBPACK_IMPORTED_MODULE_2__["default"];
  4309. const conf = {
  4310. titleTopMargin: 25,
  4311. barHeight: 20,
  4312. barGap: 4,
  4313. topPadding: 50,
  4314. rightPadding: 75,
  4315. leftPadding: 75,
  4316. gridLineStartPadding: 35,
  4317. fontSize: 11,
  4318. fontFamily: '"Open-Sans", "sans-serif"'
  4319. };
  4320. const setConf = function (cnf) {
  4321. const keys = Object.keys(cnf);
  4322. keys.forEach(function (key) {
  4323. conf[key] = cnf[key];
  4324. });
  4325. };
  4326. let w;
  4327. const draw = function (text, id) {
  4328. _parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.clear();
  4329. _parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].parse(text);
  4330. const elem = document.getElementById(id);
  4331. w = elem.parentElement.offsetWidth;
  4332. if (typeof w === 'undefined') {
  4333. w = 1200;
  4334. }
  4335. if (typeof conf.useWidth !== 'undefined') {
  4336. w = conf.useWidth;
  4337. }
  4338. const taskArray = _parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.getTasks(); // Set height based on number of tasks
  4339. const h = taskArray.length * (conf.barHeight + conf.barGap) + 2 * conf.topPadding;
  4340. elem.setAttribute('height', '100%'); // Set viewBox
  4341. elem.setAttribute('viewBox', '0 0 ' + w + ' ' + h);
  4342. const svg = d3__WEBPACK_IMPORTED_MODULE_0__["select"](`[id="${id}"]`); // Set timescale
  4343. const timeScale = d3__WEBPACK_IMPORTED_MODULE_0__["scaleTime"]().domain([d3__WEBPACK_IMPORTED_MODULE_0__["min"](taskArray, function (d) {
  4344. return d.startTime;
  4345. }), d3__WEBPACK_IMPORTED_MODULE_0__["max"](taskArray, function (d) {
  4346. return d.endTime;
  4347. })]).rangeRound([0, w - conf.leftPadding - conf.rightPadding]);
  4348. let categories = [];
  4349. for (let i = 0; i < taskArray.length; i++) {
  4350. categories.push(taskArray[i].type);
  4351. }
  4352. const catsUnfiltered = categories; // for vert labels
  4353. categories = checkUnique(categories);
  4354. makeGant(taskArray, w, h);
  4355. if (typeof conf.useWidth !== 'undefined') {
  4356. elem.setAttribute('width', w);
  4357. }
  4358. svg.append('text').text(_parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.getTitle()).attr('x', w / 2).attr('y', conf.titleTopMargin).attr('class', 'titleText');
  4359. function makeGant(tasks, pageWidth, pageHeight) {
  4360. const barHeight = conf.barHeight;
  4361. const gap = barHeight + conf.barGap;
  4362. const topPadding = conf.topPadding;
  4363. const leftPadding = conf.leftPadding;
  4364. const colorScale = d3__WEBPACK_IMPORTED_MODULE_0__["scaleLinear"]().domain([0, categories.length]).range(['#00B9FA', '#F95002']).interpolate(d3__WEBPACK_IMPORTED_MODULE_0__["interpolateHcl"]);
  4365. makeGrid(leftPadding, topPadding, pageWidth, pageHeight);
  4366. drawRects(tasks, gap, topPadding, leftPadding, barHeight, colorScale, pageWidth, pageHeight);
  4367. vertLabels(gap, topPadding, leftPadding, barHeight, colorScale);
  4368. drawToday(leftPadding, topPadding, pageWidth, pageHeight);
  4369. }
  4370. function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w, h) {
  4371. // Draw background rects covering the entire width of the graph, these form the section rows.
  4372. svg.append('g').selectAll('rect').data(theArray).enter().append('rect').attr('x', 0).attr('y', function (d, i) {
  4373. return i * theGap + theTopPad - 2;
  4374. }).attr('width', function () {
  4375. return w - conf.rightPadding / 2;
  4376. }).attr('height', theGap).attr('class', function (d) {
  4377. for (let i = 0; i < categories.length; i++) {
  4378. if (d.type === categories[i]) {
  4379. return 'section section' + i % conf.numberSectionStyles;
  4380. }
  4381. }
  4382. return 'section section0';
  4383. }); // Draw the rects representing the tasks
  4384. const rectangles = svg.append('g').selectAll('rect').data(theArray).enter();
  4385. rectangles.append('rect').attr('id', function (d) {
  4386. return d.id;
  4387. }).attr('rx', 3).attr('ry', 3).attr('x', function (d) {
  4388. if (d.milestone) {
  4389. return timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;
  4390. }
  4391. return timeScale(d.startTime) + theSidePad;
  4392. }).attr('y', function (d, i) {
  4393. return i * theGap + theTopPad;
  4394. }).attr('width', function (d) {
  4395. if (d.milestone) {
  4396. return theBarHeight;
  4397. }
  4398. return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime);
  4399. }).attr('height', theBarHeight).attr('transform-origin', function (d, i) {
  4400. return (timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime))).toString() + 'px ' + (i * theGap + theTopPad + 0.5 * theBarHeight).toString() + 'px';
  4401. }).attr('class', function (d) {
  4402. const res = 'task';
  4403. let classStr = '';
  4404. if (d.classes.length > 0) {
  4405. classStr = d.classes.join(' ');
  4406. }
  4407. let secNum = 0;
  4408. for (let i = 0; i < categories.length; i++) {
  4409. if (d.type === categories[i]) {
  4410. secNum = i % conf.numberSectionStyles;
  4411. }
  4412. }
  4413. let taskClass = '';
  4414. if (d.active) {
  4415. if (d.crit) {
  4416. taskClass += ' activeCrit';
  4417. } else {
  4418. taskClass = ' active';
  4419. }
  4420. } else if (d.done) {
  4421. if (d.crit) {
  4422. taskClass = ' doneCrit';
  4423. } else {
  4424. taskClass = ' done';
  4425. }
  4426. } else {
  4427. if (d.crit) {
  4428. taskClass += ' crit';
  4429. }
  4430. }
  4431. if (taskClass.length === 0) {
  4432. taskClass = ' task';
  4433. }
  4434. if (d.milestone) {
  4435. taskClass = ' milestone ' + taskClass;
  4436. }
  4437. taskClass += secNum;
  4438. taskClass += ' ' + classStr;
  4439. return res + taskClass;
  4440. }); // Append task labels
  4441. rectangles.append('text').attr('id', function (d) {
  4442. return d.id + '-text';
  4443. }).text(function (d) {
  4444. return d.task;
  4445. }).attr('font-size', conf.fontSize).attr('x', function (d) {
  4446. let startX = timeScale(d.startTime);
  4447. let endX = timeScale(d.renderEndTime || d.endTime);
  4448. if (d.milestone) {
  4449. startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;
  4450. }
  4451. if (d.milestone) {
  4452. endX = startX + theBarHeight;
  4453. }
  4454. const textWidth = this.getBBox().width; // Check id text width > width of rectangle
  4455. if (textWidth > endX - startX) {
  4456. if (endX + textWidth + 1.5 * conf.leftPadding > w) {
  4457. return startX + theSidePad - 5;
  4458. } else {
  4459. return endX + theSidePad + 5;
  4460. }
  4461. } else {
  4462. return (endX - startX) / 2 + startX + theSidePad;
  4463. }
  4464. }).attr('y', function (d, i) {
  4465. return i * theGap + conf.barHeight / 2 + (conf.fontSize / 2 - 2) + theTopPad;
  4466. }).attr('text-height', theBarHeight).attr('class', function (d) {
  4467. const startX = timeScale(d.startTime);
  4468. let endX = timeScale(d.endTime);
  4469. if (d.milestone) {
  4470. endX = startX + theBarHeight;
  4471. }
  4472. const textWidth = this.getBBox().width;
  4473. let classStr = '';
  4474. if (d.classes.length > 0) {
  4475. classStr = d.classes.join(' ');
  4476. }
  4477. let secNum = 0;
  4478. for (let i = 0; i < categories.length; i++) {
  4479. if (d.type === categories[i]) {
  4480. secNum = i % conf.numberSectionStyles;
  4481. }
  4482. }
  4483. let taskType = '';
  4484. if (d.active) {
  4485. if (d.crit) {
  4486. taskType = 'activeCritText' + secNum;
  4487. } else {
  4488. taskType = 'activeText' + secNum;
  4489. }
  4490. }
  4491. if (d.done) {
  4492. if (d.crit) {
  4493. taskType = taskType + ' doneCritText' + secNum;
  4494. } else {
  4495. taskType = taskType + ' doneText' + secNum;
  4496. }
  4497. } else {
  4498. if (d.crit) {
  4499. taskType = taskType + ' critText' + secNum;
  4500. }
  4501. }
  4502. if (d.milestone) {
  4503. taskType += ' milestoneText';
  4504. } // Check id text width > width of rectangle
  4505. if (textWidth > endX - startX) {
  4506. if (endX + textWidth + 1.5 * conf.leftPadding > w) {
  4507. return classStr + ' taskTextOutsideLeft taskTextOutside' + secNum + ' ' + taskType;
  4508. } else {
  4509. return classStr + ' taskTextOutsideRight taskTextOutside' + secNum + ' ' + taskType;
  4510. }
  4511. } else {
  4512. return classStr + ' taskText taskText' + secNum + ' ' + taskType;
  4513. }
  4514. });
  4515. }
  4516. function makeGrid(theSidePad, theTopPad, w, h) {
  4517. let xAxis = d3__WEBPACK_IMPORTED_MODULE_0__["axisBottom"](timeScale).tickSize(-h + theTopPad + conf.gridLineStartPadding).tickFormat(d3__WEBPACK_IMPORTED_MODULE_0__["timeFormat"](_parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.getAxisFormat() || conf.axisFormat || '%Y-%m-%d'));
  4518. svg.append('g').attr('class', 'grid').attr('transform', 'translate(' + theSidePad + ', ' + (h - 50) + ')').call(xAxis).selectAll('text').style('text-anchor', 'middle').attr('fill', '#000').attr('stroke', 'none').attr('font-size', 10).attr('dy', '1em');
  4519. }
  4520. function vertLabels(theGap, theTopPad) {
  4521. const numOccurances = [];
  4522. let prevGap = 0;
  4523. for (let i = 0; i < categories.length; i++) {
  4524. numOccurances[i] = [categories[i], getCount(categories[i], catsUnfiltered)];
  4525. }
  4526. svg.append('g') // without doing this, impossible to put grid lines behind text
  4527. .selectAll('text').data(numOccurances).enter().append('text').text(function (d) {
  4528. return d[0];
  4529. }).attr('x', 10).attr('y', function (d, i) {
  4530. if (i > 0) {
  4531. for (let j = 0; j < i; j++) {
  4532. prevGap += numOccurances[i - 1][1];
  4533. return d[1] * theGap / 2 + prevGap * theGap + theTopPad;
  4534. }
  4535. } else {
  4536. return d[1] * theGap / 2 + theTopPad;
  4537. }
  4538. }).attr('class', function (d) {
  4539. for (let i = 0; i < categories.length; i++) {
  4540. if (d[0] === categories[i]) {
  4541. return 'sectionTitle sectionTitle' + i % conf.numberSectionStyles;
  4542. }
  4543. }
  4544. return 'sectionTitle';
  4545. });
  4546. }
  4547. function drawToday(theSidePad, theTopPad, w, h) {
  4548. const todayG = svg.append('g').attr('class', 'today');
  4549. const today = new Date();
  4550. todayG.append('line').attr('x1', timeScale(today) + theSidePad).attr('x2', timeScale(today) + theSidePad).attr('y1', conf.titleTopMargin).attr('y2', h - conf.titleTopMargin).attr('class', 'today');
  4551. } // from this stackexchange question: http://stackoverflow.com/questions/1890203/unique-for-arrays-in-javascript
  4552. function checkUnique(arr) {
  4553. const hash = {};
  4554. const result = [];
  4555. for (let i = 0, l = arr.length; i < l; ++i) {
  4556. if (!hash.hasOwnProperty(arr[i])) {
  4557. // it works with objects! in FF, at least
  4558. hash[arr[i]] = true;
  4559. result.push(arr[i]);
  4560. }
  4561. }
  4562. return result;
  4563. } // from this stackexchange question: http://stackoverflow.com/questions/14227981/count-how-many-strings-in-an-array-have-duplicates-in-the-same-array
  4564. function getCounts(arr) {
  4565. let i = arr.length; // const to loop over
  4566. const obj = {}; // obj to store results
  4567. while (i) {
  4568. obj[arr[--i]] = (obj[arr[i]] || 0) + 1; // count occurrences
  4569. }
  4570. return obj;
  4571. } // get specific from everything
  4572. function getCount(word, arr) {
  4573. return getCounts(arr)[word] || 0;
  4574. }
  4575. };
  4576. /* harmony default export */ __webpack_exports__["default"] = ({
  4577. setConf,
  4578. draw
  4579. });
  4580. /***/ }),
  4581. /***/ "./src/diagrams/gantt/parser/gantt.jison":
  4582. /*!***********************************************!*\
  4583. !*** ./src/diagrams/gantt/parser/gantt.jison ***!
  4584. \***********************************************/
  4585. /*! no static exports found */
  4586. /***/ (function(module, exports, __webpack_require__) {
  4587. /* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
  4588. /*
  4589. Returns a Parser object of the following structure:
  4590. Parser: {
  4591. yy: {}
  4592. }
  4593. Parser.prototype: {
  4594. yy: {},
  4595. trace: function(),
  4596. symbols_: {associative list: name ==> number},
  4597. terminals_: {associative list: number ==> name},
  4598. productions_: [...],
  4599. performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
  4600. table: [...],
  4601. defaultActions: {...},
  4602. parseError: function(str, hash),
  4603. parse: function(input),
  4604. lexer: {
  4605. EOF: 1,
  4606. parseError: function(str, hash),
  4607. setInput: function(input),
  4608. input: function(),
  4609. unput: function(str),
  4610. more: function(),
  4611. less: function(n),
  4612. pastInput: function(),
  4613. upcomingInput: function(),
  4614. showPosition: function(),
  4615. test_match: function(regex_match_array, rule_index),
  4616. next: function(),
  4617. lex: function(),
  4618. begin: function(condition),
  4619. popState: function(),
  4620. _currentRules: function(),
  4621. topState: function(),
  4622. pushState: function(condition),
  4623. options: {
  4624. ranges: boolean (optional: true ==> token location info will include a .range[] member)
  4625. flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
  4626. backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
  4627. },
  4628. performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
  4629. rules: [...],
  4630. conditions: {associative list: name ==> set},
  4631. }
  4632. }
  4633. token location info (@$, _$, etc.): {
  4634. first_line: n,
  4635. last_line: n,
  4636. first_column: n,
  4637. last_column: n,
  4638. range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
  4639. }
  4640. the parseError function receives a 'hash' object with these members for lexer and parser errors: {
  4641. text: (matched text)
  4642. token: (the produced terminal token, if any)
  4643. line: (yylineno)
  4644. }
  4645. while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
  4646. loc: (yylloc)
  4647. expected: (string describing the set of expected tokens)
  4648. recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
  4649. }
  4650. */
  4651. var parser = (function(){
  4652. var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,8,10,11,12,13,14,15,16,18,20],$V1=[1,9],$V2=[1,10],$V3=[1,11],$V4=[1,12],$V5=[1,13],$V6=[1,14],$V7=[1,16],$V8=[1,17];
  4653. var parser = {trace: function trace () { },
  4654. yy: {},
  4655. symbols_: {"error":2,"start":3,"gantt":4,"document":5,"EOF":6,"line":7,"SPACE":8,"statement":9,"NL":10,"dateFormat":11,"inclusiveEndDates":12,"axisFormat":13,"excludes":14,"title":15,"section":16,"clickStatement":17,"taskTxt":18,"taskData":19,"click":20,"callbackname":21,"callbackargs":22,"href":23,"clickStatementDebug":24,"$accept":0,"$end":1},
  4656. terminals_: {2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",11:"dateFormat",12:"inclusiveEndDates",13:"axisFormat",14:"excludes",15:"title",16:"section",18:"taskTxt",19:"taskData",20:"click",21:"callbackname",22:"callbackargs",23:"href"},
  4657. productions_: [0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[17,2],[17,3],[17,3],[17,4],[17,3],[17,4],[17,2],[24,2],[24,3],[24,3],[24,4],[24,3],[24,4],[24,2]],
  4658. performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
  4659. /* this == yyval */
  4660. var $0 = $$.length - 1;
  4661. switch (yystate) {
  4662. case 1:
  4663. return $$[$0-1];
  4664. break;
  4665. case 2:
  4666. this.$ = []
  4667. break;
  4668. case 3:
  4669. $$[$0-1].push($$[$0]);this.$ = $$[$0-1]
  4670. break;
  4671. case 4: case 5:
  4672. this.$ = $$[$0]
  4673. break;
  4674. case 6: case 7:
  4675. this.$=[];
  4676. break;
  4677. case 8:
  4678. yy.setDateFormat($$[$0].substr(11));this.$=$$[$0].substr(11);
  4679. break;
  4680. case 9:
  4681. yy.enableInclusiveEndDates();this.$=$$[$0].substr(18);
  4682. break;
  4683. case 10:
  4684. yy.setAxisFormat($$[$0].substr(11));this.$=$$[$0].substr(11);
  4685. break;
  4686. case 11:
  4687. yy.setExcludes($$[$0].substr(9));this.$=$$[$0].substr(9);
  4688. break;
  4689. case 12:
  4690. yy.setTitle($$[$0].substr(6));this.$=$$[$0].substr(6);
  4691. break;
  4692. case 13:
  4693. yy.addSection($$[$0].substr(8));this.$=$$[$0].substr(8);
  4694. break;
  4695. case 15:
  4696. yy.addTask($$[$0-1],$$[$0]);this.$='task';
  4697. break;
  4698. case 16:
  4699. this.$ = $$[$0-1];yy.setClickEvent($$[$0-1], $$[$0], null);
  4700. break;
  4701. case 17:
  4702. this.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0-1], $$[$0]);
  4703. break;
  4704. case 18:
  4705. this.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0-1], null);yy.setLink($$[$0-2],$$[$0]);
  4706. break;
  4707. case 19:
  4708. this.$ = $$[$0-3];yy.setClickEvent($$[$0-3], $$[$0-2], $$[$0-1]);yy.setLink($$[$0-3],$$[$0]);
  4709. break;
  4710. case 20:
  4711. this.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0], null);yy.setLink($$[$0-2],$$[$0-1]);
  4712. break;
  4713. case 21:
  4714. this.$ = $$[$0-3];yy.setClickEvent($$[$0-3], $$[$0-1], $$[$0]);yy.setLink($$[$0-3],$$[$0-2]);
  4715. break;
  4716. case 22:
  4717. this.$ = $$[$0-1];yy.setLink($$[$0-1], $$[$0]);
  4718. break;
  4719. case 23: case 29:
  4720. this.$=$$[$0-1] + ' ' + $$[$0];
  4721. break;
  4722. case 24: case 25: case 27:
  4723. this.$=$$[$0-2] + ' ' + $$[$0-1] + ' ' + $$[$0];
  4724. break;
  4725. case 26: case 28:
  4726. this.$=$$[$0-3] + ' ' + $$[$0-2] + ' ' + $$[$0-1] + ' ' + $$[$0];
  4727. break;
  4728. }
  4729. },
  4730. table: [{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:$V1,12:$V2,13:$V3,14:$V4,15:$V5,16:$V6,17:15,18:$V7,20:$V8},o($V0,[2,7],{1:[2,1]}),o($V0,[2,3]),{9:18,11:$V1,12:$V2,13:$V3,14:$V4,15:$V5,16:$V6,17:15,18:$V7,20:$V8},o($V0,[2,5]),o($V0,[2,6]),o($V0,[2,8]),o($V0,[2,9]),o($V0,[2,10]),o($V0,[2,11]),o($V0,[2,12]),o($V0,[2,13]),o($V0,[2,14]),{19:[1,19]},{21:[1,20],23:[1,21]},o($V0,[2,4]),o($V0,[2,15]),o($V0,[2,16],{22:[1,22],23:[1,23]}),o($V0,[2,22],{21:[1,24]}),o($V0,[2,17],{23:[1,25]}),o($V0,[2,18]),o($V0,[2,20],{22:[1,26]}),o($V0,[2,19]),o($V0,[2,21])],
  4731. defaultActions: {},
  4732. parseError: function parseError (str, hash) {
  4733. if (hash.recoverable) {
  4734. this.trace(str);
  4735. } else {
  4736. var error = new Error(str);
  4737. error.hash = hash;
  4738. throw error;
  4739. }
  4740. },
  4741. parse: function parse(input) {
  4742. var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
  4743. var args = lstack.slice.call(arguments, 1);
  4744. var lexer = Object.create(this.lexer);
  4745. var sharedState = { yy: {} };
  4746. for (var k in this.yy) {
  4747. if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
  4748. sharedState.yy[k] = this.yy[k];
  4749. }
  4750. }
  4751. lexer.setInput(input, sharedState.yy);
  4752. sharedState.yy.lexer = lexer;
  4753. sharedState.yy.parser = this;
  4754. if (typeof lexer.yylloc == 'undefined') {
  4755. lexer.yylloc = {};
  4756. }
  4757. var yyloc = lexer.yylloc;
  4758. lstack.push(yyloc);
  4759. var ranges = lexer.options && lexer.options.ranges;
  4760. if (typeof sharedState.yy.parseError === 'function') {
  4761. this.parseError = sharedState.yy.parseError;
  4762. } else {
  4763. this.parseError = Object.getPrototypeOf(this).parseError;
  4764. }
  4765. function popStack(n) {
  4766. stack.length = stack.length - 2 * n;
  4767. vstack.length = vstack.length - n;
  4768. lstack.length = lstack.length - n;
  4769. }
  4770. function lex() {
  4771. var token;
  4772. token = tstack.pop() || lexer.lex() || EOF;
  4773. if (typeof token !== 'number') {
  4774. if (token instanceof Array) {
  4775. tstack = token;
  4776. token = tstack.pop();
  4777. }
  4778. token = self.symbols_[token] || token;
  4779. }
  4780. return token;
  4781. }
  4782. var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
  4783. while (true) {
  4784. state = stack[stack.length - 1];
  4785. if (this.defaultActions[state]) {
  4786. action = this.defaultActions[state];
  4787. } else {
  4788. if (symbol === null || typeof symbol == 'undefined') {
  4789. symbol = lex();
  4790. }
  4791. action = table[state] && table[state][symbol];
  4792. }
  4793. if (typeof action === 'undefined' || !action.length || !action[0]) {
  4794. var errStr = '';
  4795. expected = [];
  4796. for (p in table[state]) {
  4797. if (this.terminals_[p] && p > TERROR) {
  4798. expected.push('\'' + this.terminals_[p] + '\'');
  4799. }
  4800. }
  4801. if (lexer.showPosition) {
  4802. errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
  4803. } else {
  4804. errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
  4805. }
  4806. this.parseError(errStr, {
  4807. text: lexer.match,
  4808. token: this.terminals_[symbol] || symbol,
  4809. line: lexer.yylineno,
  4810. loc: yyloc,
  4811. expected: expected
  4812. });
  4813. }
  4814. if (action[0] instanceof Array && action.length > 1) {
  4815. throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
  4816. }
  4817. switch (action[0]) {
  4818. case 1:
  4819. stack.push(symbol);
  4820. vstack.push(lexer.yytext);
  4821. lstack.push(lexer.yylloc);
  4822. stack.push(action[1]);
  4823. symbol = null;
  4824. if (!preErrorSymbol) {
  4825. yyleng = lexer.yyleng;
  4826. yytext = lexer.yytext;
  4827. yylineno = lexer.yylineno;
  4828. yyloc = lexer.yylloc;
  4829. if (recovering > 0) {
  4830. recovering--;
  4831. }
  4832. } else {
  4833. symbol = preErrorSymbol;
  4834. preErrorSymbol = null;
  4835. }
  4836. break;
  4837. case 2:
  4838. len = this.productions_[action[1]][1];
  4839. yyval.$ = vstack[vstack.length - len];
  4840. yyval._$ = {
  4841. first_line: lstack[lstack.length - (len || 1)].first_line,
  4842. last_line: lstack[lstack.length - 1].last_line,
  4843. first_column: lstack[lstack.length - (len || 1)].first_column,
  4844. last_column: lstack[lstack.length - 1].last_column
  4845. };
  4846. if (ranges) {
  4847. yyval._$.range = [
  4848. lstack[lstack.length - (len || 1)].range[0],
  4849. lstack[lstack.length - 1].range[1]
  4850. ];
  4851. }
  4852. r = this.performAction.apply(yyval, [
  4853. yytext,
  4854. yyleng,
  4855. yylineno,
  4856. sharedState.yy,
  4857. action[1],
  4858. vstack,
  4859. lstack
  4860. ].concat(args));
  4861. if (typeof r !== 'undefined') {
  4862. return r;
  4863. }
  4864. if (len) {
  4865. stack = stack.slice(0, -1 * len * 2);
  4866. vstack = vstack.slice(0, -1 * len);
  4867. lstack = lstack.slice(0, -1 * len);
  4868. }
  4869. stack.push(this.productions_[action[1]][0]);
  4870. vstack.push(yyval.$);
  4871. lstack.push(yyval._$);
  4872. newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
  4873. stack.push(newState);
  4874. break;
  4875. case 3:
  4876. return true;
  4877. }
  4878. }
  4879. return true;
  4880. }};
  4881. /* generated by jison-lex 0.3.4 */
  4882. var lexer = (function(){
  4883. var lexer = ({
  4884. EOF:1,
  4885. parseError:function parseError(str, hash) {
  4886. if (this.yy.parser) {
  4887. this.yy.parser.parseError(str, hash);
  4888. } else {
  4889. throw new Error(str);
  4890. }
  4891. },
  4892. // resets the lexer, sets new input
  4893. setInput:function (input, yy) {
  4894. this.yy = yy || this.yy || {};
  4895. this._input = input;
  4896. this._more = this._backtrack = this.done = false;
  4897. this.yylineno = this.yyleng = 0;
  4898. this.yytext = this.matched = this.match = '';
  4899. this.conditionStack = ['INITIAL'];
  4900. this.yylloc = {
  4901. first_line: 1,
  4902. first_column: 0,
  4903. last_line: 1,
  4904. last_column: 0
  4905. };
  4906. if (this.options.ranges) {
  4907. this.yylloc.range = [0,0];
  4908. }
  4909. this.offset = 0;
  4910. return this;
  4911. },
  4912. // consumes and returns one char from the input
  4913. input:function () {
  4914. var ch = this._input[0];
  4915. this.yytext += ch;
  4916. this.yyleng++;
  4917. this.offset++;
  4918. this.match += ch;
  4919. this.matched += ch;
  4920. var lines = ch.match(/(?:\r\n?|\n).*/g);
  4921. if (lines) {
  4922. this.yylineno++;
  4923. this.yylloc.last_line++;
  4924. } else {
  4925. this.yylloc.last_column++;
  4926. }
  4927. if (this.options.ranges) {
  4928. this.yylloc.range[1]++;
  4929. }
  4930. this._input = this._input.slice(1);
  4931. return ch;
  4932. },
  4933. // unshifts one char (or a string) into the input
  4934. unput:function (ch) {
  4935. var len = ch.length;
  4936. var lines = ch.split(/(?:\r\n?|\n)/g);
  4937. this._input = ch + this._input;
  4938. this.yytext = this.yytext.substr(0, this.yytext.length - len);
  4939. //this.yyleng -= len;
  4940. this.offset -= len;
  4941. var oldLines = this.match.split(/(?:\r\n?|\n)/g);
  4942. this.match = this.match.substr(0, this.match.length - 1);
  4943. this.matched = this.matched.substr(0, this.matched.length - 1);
  4944. if (lines.length - 1) {
  4945. this.yylineno -= lines.length - 1;
  4946. }
  4947. var r = this.yylloc.range;
  4948. this.yylloc = {
  4949. first_line: this.yylloc.first_line,
  4950. last_line: this.yylineno + 1,
  4951. first_column: this.yylloc.first_column,
  4952. last_column: lines ?
  4953. (lines.length === oldLines.length ? this.yylloc.first_column : 0)
  4954. + oldLines[oldLines.length - lines.length].length - lines[0].length :
  4955. this.yylloc.first_column - len
  4956. };
  4957. if (this.options.ranges) {
  4958. this.yylloc.range = [r[0], r[0] + this.yyleng - len];
  4959. }
  4960. this.yyleng = this.yytext.length;
  4961. return this;
  4962. },
  4963. // When called from action, caches matched text and appends it on next action
  4964. more:function () {
  4965. this._more = true;
  4966. return this;
  4967. },
  4968. // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
  4969. reject:function () {
  4970. if (this.options.backtrack_lexer) {
  4971. this._backtrack = true;
  4972. } else {
  4973. 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).\n' + this.showPosition(), {
  4974. text: "",
  4975. token: null,
  4976. line: this.yylineno
  4977. });
  4978. }
  4979. return this;
  4980. },
  4981. // retain first n characters of the match
  4982. less:function (n) {
  4983. this.unput(this.match.slice(n));
  4984. },
  4985. // displays already matched input, i.e. for error messages
  4986. pastInput:function () {
  4987. var past = this.matched.substr(0, this.matched.length - this.match.length);
  4988. return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
  4989. },
  4990. // displays upcoming input, i.e. for error messages
  4991. upcomingInput:function () {
  4992. var next = this.match;
  4993. if (next.length < 20) {
  4994. next += this._input.substr(0, 20-next.length);
  4995. }
  4996. return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
  4997. },
  4998. // displays the character position where the lexing error occurred, i.e. for error messages
  4999. showPosition:function () {
  5000. var pre = this.pastInput();
  5001. var c = new Array(pre.length + 1).join("-");
  5002. return pre + this.upcomingInput() + "\n" + c + "^";
  5003. },
  5004. // test the lexed token: return FALSE when not a match, otherwise return token
  5005. test_match:function(match, indexed_rule) {
  5006. var token,
  5007. lines,
  5008. backup;
  5009. if (this.options.backtrack_lexer) {
  5010. // save context
  5011. backup = {
  5012. yylineno: this.yylineno,
  5013. yylloc: {
  5014. first_line: this.yylloc.first_line,
  5015. last_line: this.last_line,
  5016. first_column: this.yylloc.first_column,
  5017. last_column: this.yylloc.last_column
  5018. },
  5019. yytext: this.yytext,
  5020. match: this.match,
  5021. matches: this.matches,
  5022. matched: this.matched,
  5023. yyleng: this.yyleng,
  5024. offset: this.offset,
  5025. _more: this._more,
  5026. _input: this._input,
  5027. yy: this.yy,
  5028. conditionStack: this.conditionStack.slice(0),
  5029. done: this.done
  5030. };
  5031. if (this.options.ranges) {
  5032. backup.yylloc.range = this.yylloc.range.slice(0);
  5033. }
  5034. }
  5035. lines = match[0].match(/(?:\r\n?|\n).*/g);
  5036. if (lines) {
  5037. this.yylineno += lines.length;
  5038. }
  5039. this.yylloc = {
  5040. first_line: this.yylloc.last_line,
  5041. last_line: this.yylineno + 1,
  5042. first_column: this.yylloc.last_column,
  5043. last_column: lines ?
  5044. lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
  5045. this.yylloc.last_column + match[0].length
  5046. };
  5047. this.yytext += match[0];
  5048. this.match += match[0];
  5049. this.matches = match;
  5050. this.yyleng = this.yytext.length;
  5051. if (this.options.ranges) {
  5052. this.yylloc.range = [this.offset, this.offset += this.yyleng];
  5053. }
  5054. this._more = false;
  5055. this._backtrack = false;
  5056. this._input = this._input.slice(match[0].length);
  5057. this.matched += match[0];
  5058. token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
  5059. if (this.done && this._input) {
  5060. this.done = false;
  5061. }
  5062. if (token) {
  5063. return token;
  5064. } else if (this._backtrack) {
  5065. // recover context
  5066. for (var k in backup) {
  5067. this[k] = backup[k];
  5068. }
  5069. return false; // rule action called reject() implying the next rule should be tested instead.
  5070. }
  5071. return false;
  5072. },
  5073. // return next match in input
  5074. next:function () {
  5075. if (this.done) {
  5076. return this.EOF;
  5077. }
  5078. if (!this._input) {
  5079. this.done = true;
  5080. }
  5081. var token,
  5082. match,
  5083. tempMatch,
  5084. index;
  5085. if (!this._more) {
  5086. this.yytext = '';
  5087. this.match = '';
  5088. }
  5089. var rules = this._currentRules();
  5090. for (var i = 0; i < rules.length; i++) {
  5091. tempMatch = this._input.match(this.rules[rules[i]]);
  5092. if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
  5093. match = tempMatch;
  5094. index = i;
  5095. if (this.options.backtrack_lexer) {
  5096. token = this.test_match(tempMatch, rules[i]);
  5097. if (token !== false) {
  5098. return token;
  5099. } else if (this._backtrack) {
  5100. match = false;
  5101. continue; // rule action called reject() implying a rule MISmatch.
  5102. } else {
  5103. // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
  5104. return false;
  5105. }
  5106. } else if (!this.options.flex) {
  5107. break;
  5108. }
  5109. }
  5110. }
  5111. if (match) {
  5112. token = this.test_match(match, rules[index]);
  5113. if (token !== false) {
  5114. return token;
  5115. }
  5116. // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
  5117. return false;
  5118. }
  5119. if (this._input === "") {
  5120. return this.EOF;
  5121. } else {
  5122. return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
  5123. text: "",
  5124. token: null,
  5125. line: this.yylineno
  5126. });
  5127. }
  5128. },
  5129. // return next match that has a token
  5130. lex:function lex () {
  5131. var r = this.next();
  5132. if (r) {
  5133. return r;
  5134. } else {
  5135. return this.lex();
  5136. }
  5137. },
  5138. // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
  5139. begin:function begin (condition) {
  5140. this.conditionStack.push(condition);
  5141. },
  5142. // pop the previously active lexer condition state off the condition stack
  5143. popState:function popState () {
  5144. var n = this.conditionStack.length - 1;
  5145. if (n > 0) {
  5146. return this.conditionStack.pop();
  5147. } else {
  5148. return this.conditionStack[0];
  5149. }
  5150. },
  5151. // produce the lexer rule set which is active for the currently active lexer condition state
  5152. _currentRules:function _currentRules () {
  5153. if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
  5154. return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
  5155. } else {
  5156. return this.conditions["INITIAL"].rules;
  5157. }
  5158. },
  5159. // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
  5160. topState:function topState (n) {
  5161. n = this.conditionStack.length - 1 - Math.abs(n || 0);
  5162. if (n >= 0) {
  5163. return this.conditionStack[n];
  5164. } else {
  5165. return "INITIAL";
  5166. }
  5167. },
  5168. // alias for begin(condition)
  5169. pushState:function pushState (condition) {
  5170. this.begin(condition);
  5171. },
  5172. // return the number of states currently on the stack
  5173. stateStackSize:function stateStackSize() {
  5174. return this.conditionStack.length;
  5175. },
  5176. options: {"case-insensitive":true},
  5177. performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
  5178. var YYSTATE=YY_START;
  5179. switch($avoiding_name_collisions) {
  5180. case 0:return 10;
  5181. break;
  5182. case 1:/* skip whitespace */
  5183. break;
  5184. case 2:/* skip comments */
  5185. break;
  5186. case 3:/* skip comments */
  5187. break;
  5188. case 4:this.begin("href");
  5189. break;
  5190. case 5:this.popState();
  5191. break;
  5192. case 6:return 23;
  5193. break;
  5194. case 7:this.begin("callbackname");
  5195. break;
  5196. case 8:this.popState();
  5197. break;
  5198. case 9:this.popState(); this.begin("callbackargs");
  5199. break;
  5200. case 10:return 21;
  5201. break;
  5202. case 11:this.popState();
  5203. break;
  5204. case 12:return 22;
  5205. break;
  5206. case 13:this.begin("click");
  5207. break;
  5208. case 14:this.popState();
  5209. break;
  5210. case 15:return 20;
  5211. break;
  5212. case 16:return 4;
  5213. break;
  5214. case 17:return 11;
  5215. break;
  5216. case 18:return 12;
  5217. break;
  5218. case 19:return 13;
  5219. break;
  5220. case 20:return 14;
  5221. break;
  5222. case 21:return 'date';
  5223. break;
  5224. case 22:return 15;
  5225. break;
  5226. case 23:return 16;
  5227. break;
  5228. case 24:return 18;
  5229. break;
  5230. case 25:return 19;
  5231. break;
  5232. case 26:return ':';
  5233. break;
  5234. case 27:return 6;
  5235. break;
  5236. case 28:return 'INVALID';
  5237. break;
  5238. }
  5239. },
  5240. rules: [/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],
  5241. conditions: {"callbackargs":{"rules":[11,12],"inclusive":false},"callbackname":{"rules":[8,9,10],"inclusive":false},"href":{"rules":[5,6],"inclusive":false},"click":{"rules":[14,15],"inclusive":false},"INITIAL":{"rules":[0,1,2,3,4,7,13,16,17,18,19,20,21,22,23,24,25,26,27,28],"inclusive":true}}
  5242. });
  5243. return lexer;
  5244. })();
  5245. parser.lexer = lexer;
  5246. function Parser () {
  5247. this.yy = {};
  5248. }
  5249. Parser.prototype = parser;parser.Parser = Parser;
  5250. return new Parser;
  5251. })();
  5252. if (true) {
  5253. exports.parser = parser;
  5254. exports.Parser = parser.Parser;
  5255. exports.parse = function () { return parser.parse.apply(parser, arguments); };
  5256. exports.main = function commonjsMain (args) {
  5257. if (!args[1]) {
  5258. console.log('Usage: '+args[0]+' FILE');
  5259. process.exit(1);
  5260. }
  5261. var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
  5262. return exports.parser.parse(source);
  5263. };
  5264. if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
  5265. exports.main(process.argv.slice(1));
  5266. }
  5267. }
  5268. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
  5269. /***/ }),
  5270. /***/ "./src/diagrams/git/gitGraphAst.js":
  5271. /*!*****************************************!*\
  5272. !*** ./src/diagrams/git/gitGraphAst.js ***!
  5273. \*****************************************/
  5274. /*! exports provided: setDirection, setOptions, getOptions, commit, branch, merge, checkout, reset, prettyPrint, clear, getBranchesAsObjArray, getBranches, getCommits, getCommitsArray, getCurrentBranch, getDirection, getHead, default */
  5275. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  5276. "use strict";
  5277. __webpack_require__.r(__webpack_exports__);
  5278. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDirection", function() { return setDirection; });
  5279. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setOptions", function() { return setOptions; });
  5280. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOptions", function() { return getOptions; });
  5281. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "commit", function() { return commit; });
  5282. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "branch", function() { return branch; });
  5283. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
  5284. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "checkout", function() { return checkout; });
  5285. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; });
  5286. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prettyPrint", function() { return prettyPrint; });
  5287. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
  5288. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBranchesAsObjArray", function() { return getBranchesAsObjArray; });
  5289. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBranches", function() { return getBranches; });
  5290. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCommits", function() { return getCommits; });
  5291. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCommitsArray", function() { return getCommitsArray; });
  5292. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCurrentBranch", function() { return getCurrentBranch; });
  5293. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDirection", function() { return getDirection; });
  5294. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getHead", function() { return getHead; });
  5295. /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash");
  5296. /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);
  5297. /* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
  5298. let commits = {};
  5299. let head = null;
  5300. let branches = {
  5301. 'master': head
  5302. };
  5303. let curBranch = 'master';
  5304. let direction = 'LR';
  5305. let seq = 0;
  5306. function getRandomInt(min, max) {
  5307. return Math.floor(Math.random() * (max - min)) + min;
  5308. }
  5309. function getId() {
  5310. const pool = '0123456789abcdef';
  5311. let id = '';
  5312. for (let i = 0; i < 7; i++) {
  5313. id += pool[getRandomInt(0, 16)];
  5314. }
  5315. return id;
  5316. }
  5317. function isfastforwardable(currentCommit, otherCommit) {
  5318. _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('Entering isfastforwardable:', currentCommit.id, otherCommit.id);
  5319. while (currentCommit.seq <= otherCommit.seq && currentCommit !== otherCommit) {
  5320. // only if other branch has more commits
  5321. if (otherCommit.parent == null) break;
  5322. if (Array.isArray(otherCommit.parent)) {
  5323. _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('In merge commit:', otherCommit.parent);
  5324. return isfastforwardable(currentCommit, commits[otherCommit.parent[0]]) || isfastforwardable(currentCommit, commits[otherCommit.parent[1]]);
  5325. } else {
  5326. otherCommit = commits[otherCommit.parent];
  5327. }
  5328. }
  5329. _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug(currentCommit.id, otherCommit.id);
  5330. return currentCommit.id === otherCommit.id;
  5331. }
  5332. function isReachableFrom(currentCommit, otherCommit) {
  5333. const currentSeq = currentCommit.seq;
  5334. const otherSeq = otherCommit.seq;
  5335. if (currentSeq > otherSeq) return isfastforwardable(otherCommit, currentCommit);
  5336. return false;
  5337. }
  5338. const setDirection = function (dir) {
  5339. direction = dir;
  5340. };
  5341. let options = {};
  5342. const setOptions = function (rawOptString) {
  5343. _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('options str', rawOptString);
  5344. rawOptString = rawOptString && rawOptString.trim();
  5345. rawOptString = rawOptString || '{}';
  5346. try {
  5347. options = JSON.parse(rawOptString);
  5348. } catch (e) {
  5349. _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].error('error while parsing gitGraph options', e.message);
  5350. }
  5351. };
  5352. const getOptions = function () {
  5353. return options;
  5354. };
  5355. const commit = function (msg) {
  5356. const commit = {
  5357. id: getId(),
  5358. message: msg,
  5359. seq: seq++,
  5360. parent: head == null ? null : head.id
  5361. };
  5362. head = commit;
  5363. commits[commit.id] = commit;
  5364. branches[curBranch] = commit.id;
  5365. _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('in pushCommit ' + commit.id);
  5366. };
  5367. const branch = function (name) {
  5368. branches[name] = head != null ? head.id : null;
  5369. _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('in createBranch');
  5370. };
  5371. const merge = function (otherBranch) {
  5372. const currentCommit = commits[branches[curBranch]];
  5373. const otherCommit = commits[branches[otherBranch]];
  5374. if (isReachableFrom(currentCommit, otherCommit)) {
  5375. _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('Already merged');
  5376. return;
  5377. }
  5378. if (isfastforwardable(currentCommit, otherCommit)) {
  5379. branches[curBranch] = branches[otherBranch];
  5380. head = commits[branches[curBranch]];
  5381. } else {
  5382. // create merge commit
  5383. const commit = {
  5384. id: getId(),
  5385. message: 'merged branch ' + otherBranch + ' into ' + curBranch,
  5386. seq: seq++,
  5387. parent: [head == null ? null : head.id, branches[otherBranch]]
  5388. };
  5389. head = commit;
  5390. commits[commit.id] = commit;
  5391. branches[curBranch] = commit.id;
  5392. }
  5393. _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug(branches);
  5394. _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('in mergeBranch');
  5395. };
  5396. const checkout = function (branch) {
  5397. _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('in checkout');
  5398. curBranch = branch;
  5399. const id = branches[curBranch];
  5400. head = commits[id];
  5401. };
  5402. const reset = function (commitRef) {
  5403. _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('in reset', commitRef);
  5404. const ref = commitRef.split(':')[0];
  5405. let parentCount = parseInt(commitRef.split(':')[1]);
  5406. let commit = ref === 'HEAD' ? head : commits[branches[ref]];
  5407. _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug(commit, parentCount);
  5408. while (parentCount > 0) {
  5409. commit = commits[commit.parent];
  5410. parentCount--;
  5411. if (!commit) {
  5412. const err = 'Critical error - unique parent commit not found during reset';
  5413. _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].error(err);
  5414. throw err;
  5415. }
  5416. }
  5417. head = commit;
  5418. branches[curBranch] = commit.id;
  5419. };
  5420. function upsert(arr, key, newval) {
  5421. const index = arr.indexOf(key);
  5422. if (index === -1) {
  5423. arr.push(newval);
  5424. } else {
  5425. arr.splice(index, 1, newval);
  5426. }
  5427. }
  5428. function prettyPrintCommitHistory(commitArr) {
  5429. const commit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.maxBy(commitArr, 'seq');
  5430. let line = '';
  5431. commitArr.forEach(function (c) {
  5432. if (c === commit) {
  5433. line += '\t*';
  5434. } else {
  5435. line += '\t|';
  5436. }
  5437. });
  5438. const label = [line, commit.id, commit.seq];
  5439. for (let branch in branches) {
  5440. if (branches[branch] === commit.id) label.push(branch);
  5441. }
  5442. _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug(label.join(' '));
  5443. if (Array.isArray(commit.parent)) {
  5444. const newCommit = commits[commit.parent[0]];
  5445. upsert(commitArr, commit, newCommit);
  5446. commitArr.push(commits[commit.parent[1]]);
  5447. } else if (commit.parent == null) {
  5448. return;
  5449. } else {
  5450. const nextCommit = commits[commit.parent];
  5451. upsert(commitArr, commit, nextCommit);
  5452. }
  5453. commitArr = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniqBy(commitArr, 'id');
  5454. prettyPrintCommitHistory(commitArr);
  5455. }
  5456. const prettyPrint = function () {
  5457. _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug(commits);
  5458. const node = getCommitsArray()[0];
  5459. prettyPrintCommitHistory([node]);
  5460. };
  5461. const clear = function () {
  5462. commits = {};
  5463. head = null;
  5464. branches = {
  5465. 'master': head
  5466. };
  5467. curBranch = 'master';
  5468. seq = 0;
  5469. };
  5470. const getBranchesAsObjArray = function () {
  5471. const branchArr = [];
  5472. for (let branch in branches) {
  5473. branchArr.push({
  5474. name: branch,
  5475. commit: commits[branches[branch]]
  5476. });
  5477. }
  5478. return branchArr;
  5479. };
  5480. const getBranches = function () {
  5481. return branches;
  5482. };
  5483. const getCommits = function () {
  5484. return commits;
  5485. };
  5486. const getCommitsArray = function () {
  5487. const commitArr = Object.keys(commits).map(function (key) {
  5488. return commits[key];
  5489. });
  5490. commitArr.forEach(function (o) {
  5491. _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug(o.id);
  5492. });
  5493. return lodash__WEBPACK_IMPORTED_MODULE_0___default.a.orderBy(commitArr, ['seq'], ['desc']);
  5494. };
  5495. const getCurrentBranch = function () {
  5496. return curBranch;
  5497. };
  5498. const getDirection = function () {
  5499. return direction;
  5500. };
  5501. const getHead = function () {
  5502. return head;
  5503. };
  5504. /* harmony default export */ __webpack_exports__["default"] = ({
  5505. setDirection,
  5506. setOptions,
  5507. getOptions,
  5508. commit,
  5509. branch,
  5510. merge,
  5511. checkout,
  5512. reset,
  5513. prettyPrint,
  5514. clear,
  5515. getBranchesAsObjArray,
  5516. getBranches,
  5517. getCommits,
  5518. getCommitsArray,
  5519. getCurrentBranch,
  5520. getDirection,
  5521. getHead
  5522. });
  5523. /***/ }),
  5524. /***/ "./src/diagrams/git/gitGraphRenderer.js":
  5525. /*!**********************************************!*\
  5526. !*** ./src/diagrams/git/gitGraphRenderer.js ***!
  5527. \**********************************************/
  5528. /*! exports provided: setConf, draw, default */
  5529. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  5530. "use strict";
  5531. __webpack_require__.r(__webpack_exports__);
  5532. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
  5533. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
  5534. /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
  5535. /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
  5536. /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "lodash");
  5537. /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);
  5538. /* harmony import */ var _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./gitGraphAst */ "./src/diagrams/git/gitGraphAst.js");
  5539. /* harmony import */ var _parser_gitGraph__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/gitGraph */ "./src/diagrams/git/parser/gitGraph.jison");
  5540. /* harmony import */ var _parser_gitGraph__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_gitGraph__WEBPACK_IMPORTED_MODULE_3__);
  5541. /* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
  5542. /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils */ "./src/utils.js");
  5543. let allCommitsDict = {};
  5544. let branchNum;
  5545. let config = {
  5546. nodeSpacing: 150,
  5547. nodeFillColor: 'yellow',
  5548. nodeStrokeWidth: 2,
  5549. nodeStrokeColor: 'grey',
  5550. lineStrokeWidth: 4,
  5551. branchOffset: 50,
  5552. lineColor: 'grey',
  5553. leftMargin: 50,
  5554. branchColors: ['#442f74', '#983351', '#609732', '#AA9A39'],
  5555. nodeRadius: 10,
  5556. nodeLabel: {
  5557. width: 75,
  5558. height: 100,
  5559. x: -25,
  5560. y: 0
  5561. }
  5562. };
  5563. let apiConfig = {};
  5564. const setConf = function (c) {
  5565. apiConfig = c;
  5566. };
  5567. function svgCreateDefs(svg) {
  5568. svg.append('defs').append('g').attr('id', 'def-commit').append('circle').attr('r', config.nodeRadius).attr('cx', 0).attr('cy', 0);
  5569. svg.select('#def-commit').append('foreignObject').attr('width', config.nodeLabel.width).attr('height', config.nodeLabel.height).attr('x', config.nodeLabel.x).attr('y', config.nodeLabel.y).attr('class', 'node-label').attr('requiredFeatures', 'http://www.w3.org/TR/SVG11/feature#Extensibility').append('p').html('');
  5570. }
  5571. function svgDrawLine(svg, points, colorIdx, interpolate) {
  5572. const curve = Object(_utils__WEBPACK_IMPORTED_MODULE_5__["interpolateToCurve"])(interpolate, d3__WEBPACK_IMPORTED_MODULE_0__["curveBasis"]);
  5573. const color = config.branchColors[colorIdx % config.branchColors.length];
  5574. const lineGen = d3__WEBPACK_IMPORTED_MODULE_0__["line"]().x(function (d) {
  5575. return Math.round(d.x);
  5576. }).y(function (d) {
  5577. return Math.round(d.y);
  5578. }).curve(curve);
  5579. svg.append('svg:path').attr('d', lineGen(points)).style('stroke', color).style('stroke-width', config.lineStrokeWidth).style('fill', 'none');
  5580. } // Pass in the element and its pre-transform coords
  5581. function getElementCoords(element, coords) {
  5582. coords = coords || element.node().getBBox();
  5583. const ctm = element.node().getCTM();
  5584. const xn = ctm.e + coords.x * ctm.a;
  5585. const yn = ctm.f + coords.y * ctm.d;
  5586. return {
  5587. left: xn,
  5588. top: yn,
  5589. width: coords.width,
  5590. height: coords.height
  5591. };
  5592. }
  5593. function svgDrawLineForCommits(svg, fromId, toId, direction, color) {
  5594. _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('svgDrawLineForCommits: ', fromId, toId);
  5595. const fromBbox = getElementCoords(svg.select('#node-' + fromId + ' circle'));
  5596. const toBbox = getElementCoords(svg.select('#node-' + toId + ' circle'));
  5597. switch (direction) {
  5598. case 'LR':
  5599. // (toBbox)
  5600. // +--------
  5601. // + (fromBbox)
  5602. if (fromBbox.left - toBbox.left > config.nodeSpacing) {
  5603. const lineStart = {
  5604. x: fromBbox.left - config.nodeSpacing,
  5605. y: toBbox.top + toBbox.height / 2
  5606. };
  5607. const lineEnd = {
  5608. x: toBbox.left + toBbox.width,
  5609. y: toBbox.top + toBbox.height / 2
  5610. };
  5611. svgDrawLine(svg, [lineStart, lineEnd], color, 'linear');
  5612. svgDrawLine(svg, [{
  5613. x: fromBbox.left,
  5614. y: fromBbox.top + fromBbox.height / 2
  5615. }, {
  5616. x: fromBbox.left - config.nodeSpacing / 2,
  5617. y: fromBbox.top + fromBbox.height / 2
  5618. }, {
  5619. x: fromBbox.left - config.nodeSpacing / 2,
  5620. y: lineStart.y
  5621. }, lineStart], color);
  5622. } else {
  5623. svgDrawLine(svg, [{
  5624. 'x': fromBbox.left,
  5625. 'y': fromBbox.top + fromBbox.height / 2
  5626. }, {
  5627. 'x': fromBbox.left - config.nodeSpacing / 2,
  5628. 'y': fromBbox.top + fromBbox.height / 2
  5629. }, {
  5630. 'x': fromBbox.left - config.nodeSpacing / 2,
  5631. 'y': toBbox.top + toBbox.height / 2
  5632. }, {
  5633. 'x': toBbox.left + toBbox.width,
  5634. 'y': toBbox.top + toBbox.height / 2
  5635. }], color);
  5636. }
  5637. break;
  5638. case 'BT':
  5639. // + (fromBbox)
  5640. // |
  5641. // |
  5642. // + (toBbox)
  5643. if (toBbox.top - fromBbox.top > config.nodeSpacing) {
  5644. const lineStart = {
  5645. x: toBbox.left + toBbox.width / 2,
  5646. y: fromBbox.top + fromBbox.height + config.nodeSpacing
  5647. };
  5648. const lineEnd = {
  5649. x: toBbox.left + toBbox.width / 2,
  5650. y: toBbox.top
  5651. };
  5652. svgDrawLine(svg, [lineStart, lineEnd], color, 'linear');
  5653. svgDrawLine(svg, [{
  5654. x: fromBbox.left + fromBbox.width / 2,
  5655. y: fromBbox.top + fromBbox.height
  5656. }, {
  5657. x: fromBbox.left + fromBbox.width / 2,
  5658. y: fromBbox.top + fromBbox.height + config.nodeSpacing / 2
  5659. }, {
  5660. x: toBbox.left + toBbox.width / 2,
  5661. y: lineStart.y - config.nodeSpacing / 2
  5662. }, lineStart], color);
  5663. } else {
  5664. svgDrawLine(svg, [{
  5665. 'x': fromBbox.left + fromBbox.width / 2,
  5666. 'y': fromBbox.top + fromBbox.height
  5667. }, {
  5668. 'x': fromBbox.left + fromBbox.width / 2,
  5669. 'y': fromBbox.top + config.nodeSpacing / 2
  5670. }, {
  5671. 'x': toBbox.left + toBbox.width / 2,
  5672. 'y': toBbox.top - config.nodeSpacing / 2
  5673. }, {
  5674. 'x': toBbox.left + toBbox.width / 2,
  5675. 'y': toBbox.top
  5676. }], color);
  5677. }
  5678. break;
  5679. }
  5680. }
  5681. function cloneNode(svg, selector) {
  5682. return svg.select(selector).node().cloneNode(true);
  5683. }
  5684. function renderCommitHistory(svg, commitid, branches, direction) {
  5685. let commit;
  5686. const numCommits = Object.keys(allCommitsDict).length;
  5687. if (typeof commitid === 'string') {
  5688. do {
  5689. commit = allCommitsDict[commitid];
  5690. _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('in renderCommitHistory', commit.id, commit.seq);
  5691. if (svg.select('#node-' + commitid).size() > 0) {
  5692. return;
  5693. }
  5694. svg.append(function () {
  5695. return cloneNode(svg, '#def-commit');
  5696. }).attr('class', 'commit').attr('id', function () {
  5697. return 'node-' + commit.id;
  5698. }).attr('transform', function () {
  5699. switch (direction) {
  5700. case 'LR':
  5701. return 'translate(' + (commit.seq * config.nodeSpacing + config.leftMargin) + ', ' + branchNum * config.branchOffset + ')';
  5702. case 'BT':
  5703. return 'translate(' + (branchNum * config.branchOffset + config.leftMargin) + ', ' + (numCommits - commit.seq) * config.nodeSpacing + ')';
  5704. }
  5705. }).attr('fill', config.nodeFillColor).attr('stroke', config.nodeStrokeColor).attr('stroke-width', config.nodeStrokeWidth);
  5706. let branch;
  5707. for (let branchName in branches) {
  5708. if (branches[branchName].commit === commit) {
  5709. branch = branches[branchName];
  5710. break;
  5711. }
  5712. }
  5713. if (branch) {
  5714. _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('found branch ', branch.name);
  5715. svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'branch-label').text(branch.name + ', ');
  5716. }
  5717. svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'commit-id').text(commit.id);
  5718. if (commit.message !== '' && direction === 'BT') {
  5719. svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'commit-msg').text(', ' + commit.message);
  5720. }
  5721. commitid = commit.parent;
  5722. } while (commitid && allCommitsDict[commitid]);
  5723. }
  5724. if (Array.isArray(commitid)) {
  5725. _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('found merge commmit', commitid);
  5726. renderCommitHistory(svg, commitid[0], branches, direction);
  5727. branchNum++;
  5728. renderCommitHistory(svg, commitid[1], branches, direction);
  5729. branchNum--;
  5730. }
  5731. }
  5732. function renderLines(svg, commit, direction, branchColor) {
  5733. branchColor = branchColor || 0;
  5734. while (commit.seq > 0 && !commit.lineDrawn) {
  5735. if (typeof commit.parent === 'string') {
  5736. svgDrawLineForCommits(svg, commit.id, commit.parent, direction, branchColor);
  5737. commit.lineDrawn = true;
  5738. commit = allCommitsDict[commit.parent];
  5739. } else if (Array.isArray(commit.parent)) {
  5740. svgDrawLineForCommits(svg, commit.id, commit.parent[0], direction, branchColor);
  5741. svgDrawLineForCommits(svg, commit.id, commit.parent[1], direction, branchColor + 1);
  5742. renderLines(svg, allCommitsDict[commit.parent[1]], direction, branchColor + 1);
  5743. commit.lineDrawn = true;
  5744. commit = allCommitsDict[commit.parent[0]];
  5745. }
  5746. }
  5747. }
  5748. const draw = function (txt, id, ver) {
  5749. try {
  5750. const parser = _parser_gitGraph__WEBPACK_IMPORTED_MODULE_3___default.a.parser;
  5751. parser.yy = _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"];
  5752. _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('in gitgraph renderer', txt, id, ver); // Parse the graph definition
  5753. parser.parse(txt + '\n');
  5754. config = lodash__WEBPACK_IMPORTED_MODULE_1___default.a.assign(config, apiConfig, _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"].getOptions());
  5755. _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('effective options', config);
  5756. const direction = _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"].getDirection();
  5757. allCommitsDict = _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"].getCommits();
  5758. const branches = _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"].getBranchesAsObjArray();
  5759. if (direction === 'BT') {
  5760. config.nodeLabel.x = branches.length * config.branchOffset;
  5761. config.nodeLabel.width = '100%';
  5762. config.nodeLabel.y = -1 * 2 * config.nodeRadius;
  5763. }
  5764. const svg = d3__WEBPACK_IMPORTED_MODULE_0__["select"](`[id="${id}"]`);
  5765. svgCreateDefs(svg);
  5766. branchNum = 1;
  5767. for (let branch in branches) {
  5768. const v = branches[branch];
  5769. renderCommitHistory(svg, v.commit.id, branches, direction);
  5770. renderLines(svg, v.commit, direction);
  5771. branchNum++;
  5772. }
  5773. svg.attr('height', function () {
  5774. if (direction === 'BT') return Object.keys(allCommitsDict).length * config.nodeSpacing;
  5775. return (branches.length + 1) * config.branchOffset;
  5776. });
  5777. } catch (e) {
  5778. _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].error('Error while rendering gitgraph');
  5779. _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].error(e.message);
  5780. }
  5781. };
  5782. /* harmony default export */ __webpack_exports__["default"] = ({
  5783. setConf,
  5784. draw
  5785. });
  5786. /***/ }),
  5787. /***/ "./src/diagrams/git/parser/gitGraph.jison":
  5788. /*!************************************************!*\
  5789. !*** ./src/diagrams/git/parser/gitGraph.jison ***!
  5790. \************************************************/
  5791. /*! no static exports found */
  5792. /***/ (function(module, exports, __webpack_require__) {
  5793. /* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
  5794. /*
  5795. Returns a Parser object of the following structure:
  5796. Parser: {
  5797. yy: {}
  5798. }
  5799. Parser.prototype: {
  5800. yy: {},
  5801. trace: function(),
  5802. symbols_: {associative list: name ==> number},
  5803. terminals_: {associative list: number ==> name},
  5804. productions_: [...],
  5805. performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
  5806. table: [...],
  5807. defaultActions: {...},
  5808. parseError: function(str, hash),
  5809. parse: function(input),
  5810. lexer: {
  5811. EOF: 1,
  5812. parseError: function(str, hash),
  5813. setInput: function(input),
  5814. input: function(),
  5815. unput: function(str),
  5816. more: function(),
  5817. less: function(n),
  5818. pastInput: function(),
  5819. upcomingInput: function(),
  5820. showPosition: function(),
  5821. test_match: function(regex_match_array, rule_index),
  5822. next: function(),
  5823. lex: function(),
  5824. begin: function(condition),
  5825. popState: function(),
  5826. _currentRules: function(),
  5827. topState: function(),
  5828. pushState: function(condition),
  5829. options: {
  5830. ranges: boolean (optional: true ==> token location info will include a .range[] member)
  5831. flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
  5832. backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
  5833. },
  5834. performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
  5835. rules: [...],
  5836. conditions: {associative list: name ==> set},
  5837. }
  5838. }
  5839. token location info (@$, _$, etc.): {
  5840. first_line: n,
  5841. last_line: n,
  5842. first_column: n,
  5843. last_column: n,
  5844. range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
  5845. }
  5846. the parseError function receives a 'hash' object with these members for lexer and parser errors: {
  5847. text: (matched text)
  5848. token: (the produced terminal token, if any)
  5849. line: (yylineno)
  5850. }
  5851. while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
  5852. loc: (yylloc)
  5853. expected: (string describing the set of expected tokens)
  5854. recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
  5855. }
  5856. */
  5857. var parser = (function(){
  5858. var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[2,3],$V1=[1,7],$V2=[7,12,15,17,19,20,21],$V3=[7,11,12,15,17,19,20,21],$V4=[2,20],$V5=[1,32];
  5859. var parser = {trace: function trace () { },
  5860. yy: {},
  5861. symbols_: {"error":2,"start":3,"GG":4,":":5,"document":6,"EOF":7,"DIR":8,"options":9,"body":10,"OPT":11,"NL":12,"line":13,"statement":14,"COMMIT":15,"commit_arg":16,"BRANCH":17,"ID":18,"CHECKOUT":19,"MERGE":20,"RESET":21,"reset_arg":22,"STR":23,"HEAD":24,"reset_parents":25,"CARET":26,"$accept":0,"$end":1},
  5862. terminals_: {2:"error",4:"GG",5:":",7:"EOF",8:"DIR",11:"OPT",12:"NL",15:"COMMIT",17:"BRANCH",18:"ID",19:"CHECKOUT",20:"MERGE",21:"RESET",23:"STR",24:"HEAD",26:"CARET"},
  5863. productions_: [0,[3,4],[3,5],[6,0],[6,2],[9,2],[9,1],[10,0],[10,2],[13,2],[13,1],[14,2],[14,2],[14,2],[14,2],[14,2],[16,0],[16,1],[22,2],[22,2],[25,0],[25,2]],
  5864. performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
  5865. /* this == yyval */
  5866. var $0 = $$.length - 1;
  5867. switch (yystate) {
  5868. case 1:
  5869. return $$[$0-1];
  5870. break;
  5871. case 2:
  5872. yy.setDirection($$[$0-3]); return $$[$0-1];
  5873. break;
  5874. case 4:
  5875. yy.setOptions($$[$0-1]); this.$ = $$[$0]
  5876. break;
  5877. case 5:
  5878. $$[$0-1] +=$$[$0]; this.$=$$[$0-1]
  5879. break;
  5880. case 7:
  5881. this.$ = []
  5882. break;
  5883. case 8:
  5884. $$[$0-1].push($$[$0]); this.$=$$[$0-1];
  5885. break;
  5886. case 9:
  5887. this.$ =$$[$0-1]
  5888. break;
  5889. case 11:
  5890. yy.commit($$[$0])
  5891. break;
  5892. case 12:
  5893. yy.branch($$[$0])
  5894. break;
  5895. case 13:
  5896. yy.checkout($$[$0])
  5897. break;
  5898. case 14:
  5899. yy.merge($$[$0])
  5900. break;
  5901. case 15:
  5902. yy.reset($$[$0])
  5903. break;
  5904. case 16:
  5905. this.$ = ""
  5906. break;
  5907. case 17:
  5908. this.$=$$[$0]
  5909. break;
  5910. case 18:
  5911. this.$ = $$[$0-1]+ ":" + $$[$0]
  5912. break;
  5913. case 19:
  5914. this.$ = $$[$0-1]+ ":" + yy.count; yy.count = 0
  5915. break;
  5916. case 20:
  5917. yy.count = 0
  5918. break;
  5919. case 21:
  5920. yy.count += 1
  5921. break;
  5922. }
  5923. },
  5924. table: [{3:1,4:[1,2]},{1:[3]},{5:[1,3],8:[1,4]},{6:5,7:$V0,9:6,12:$V1},{5:[1,8]},{7:[1,9]},o($V2,[2,7],{10:10,11:[1,11]}),o($V3,[2,6]),{6:12,7:$V0,9:6,12:$V1},{1:[2,1]},{7:[2,4],12:[1,15],13:13,14:14,15:[1,16],17:[1,17],19:[1,18],20:[1,19],21:[1,20]},o($V3,[2,5]),{7:[1,21]},o($V2,[2,8]),{12:[1,22]},o($V2,[2,10]),{12:[2,16],16:23,23:[1,24]},{18:[1,25]},{18:[1,26]},{18:[1,27]},{18:[1,30],22:28,24:[1,29]},{1:[2,2]},o($V2,[2,9]),{12:[2,11]},{12:[2,17]},{12:[2,12]},{12:[2,13]},{12:[2,14]},{12:[2,15]},{12:$V4,25:31,26:$V5},{12:$V4,25:33,26:$V5},{12:[2,18]},{12:$V4,25:34,26:$V5},{12:[2,19]},{12:[2,21]}],
  5925. defaultActions: {9:[2,1],21:[2,2],23:[2,11],24:[2,17],25:[2,12],26:[2,13],27:[2,14],28:[2,15],31:[2,18],33:[2,19],34:[2,21]},
  5926. parseError: function parseError (str, hash) {
  5927. if (hash.recoverable) {
  5928. this.trace(str);
  5929. } else {
  5930. var error = new Error(str);
  5931. error.hash = hash;
  5932. throw error;
  5933. }
  5934. },
  5935. parse: function parse(input) {
  5936. var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
  5937. var args = lstack.slice.call(arguments, 1);
  5938. var lexer = Object.create(this.lexer);
  5939. var sharedState = { yy: {} };
  5940. for (var k in this.yy) {
  5941. if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
  5942. sharedState.yy[k] = this.yy[k];
  5943. }
  5944. }
  5945. lexer.setInput(input, sharedState.yy);
  5946. sharedState.yy.lexer = lexer;
  5947. sharedState.yy.parser = this;
  5948. if (typeof lexer.yylloc == 'undefined') {
  5949. lexer.yylloc = {};
  5950. }
  5951. var yyloc = lexer.yylloc;
  5952. lstack.push(yyloc);
  5953. var ranges = lexer.options && lexer.options.ranges;
  5954. if (typeof sharedState.yy.parseError === 'function') {
  5955. this.parseError = sharedState.yy.parseError;
  5956. } else {
  5957. this.parseError = Object.getPrototypeOf(this).parseError;
  5958. }
  5959. function popStack(n) {
  5960. stack.length = stack.length - 2 * n;
  5961. vstack.length = vstack.length - n;
  5962. lstack.length = lstack.length - n;
  5963. }
  5964. function lex() {
  5965. var token;
  5966. token = tstack.pop() || lexer.lex() || EOF;
  5967. if (typeof token !== 'number') {
  5968. if (token instanceof Array) {
  5969. tstack = token;
  5970. token = tstack.pop();
  5971. }
  5972. token = self.symbols_[token] || token;
  5973. }
  5974. return token;
  5975. }
  5976. var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
  5977. while (true) {
  5978. state = stack[stack.length - 1];
  5979. if (this.defaultActions[state]) {
  5980. action = this.defaultActions[state];
  5981. } else {
  5982. if (symbol === null || typeof symbol == 'undefined') {
  5983. symbol = lex();
  5984. }
  5985. action = table[state] && table[state][symbol];
  5986. }
  5987. if (typeof action === 'undefined' || !action.length || !action[0]) {
  5988. var errStr = '';
  5989. expected = [];
  5990. for (p in table[state]) {
  5991. if (this.terminals_[p] && p > TERROR) {
  5992. expected.push('\'' + this.terminals_[p] + '\'');
  5993. }
  5994. }
  5995. if (lexer.showPosition) {
  5996. errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
  5997. } else {
  5998. errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
  5999. }
  6000. this.parseError(errStr, {
  6001. text: lexer.match,
  6002. token: this.terminals_[symbol] || symbol,
  6003. line: lexer.yylineno,
  6004. loc: yyloc,
  6005. expected: expected
  6006. });
  6007. }
  6008. if (action[0] instanceof Array && action.length > 1) {
  6009. throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
  6010. }
  6011. switch (action[0]) {
  6012. case 1:
  6013. stack.push(symbol);
  6014. vstack.push(lexer.yytext);
  6015. lstack.push(lexer.yylloc);
  6016. stack.push(action[1]);
  6017. symbol = null;
  6018. if (!preErrorSymbol) {
  6019. yyleng = lexer.yyleng;
  6020. yytext = lexer.yytext;
  6021. yylineno = lexer.yylineno;
  6022. yyloc = lexer.yylloc;
  6023. if (recovering > 0) {
  6024. recovering--;
  6025. }
  6026. } else {
  6027. symbol = preErrorSymbol;
  6028. preErrorSymbol = null;
  6029. }
  6030. break;
  6031. case 2:
  6032. len = this.productions_[action[1]][1];
  6033. yyval.$ = vstack[vstack.length - len];
  6034. yyval._$ = {
  6035. first_line: lstack[lstack.length - (len || 1)].first_line,
  6036. last_line: lstack[lstack.length - 1].last_line,
  6037. first_column: lstack[lstack.length - (len || 1)].first_column,
  6038. last_column: lstack[lstack.length - 1].last_column
  6039. };
  6040. if (ranges) {
  6041. yyval._$.range = [
  6042. lstack[lstack.length - (len || 1)].range[0],
  6043. lstack[lstack.length - 1].range[1]
  6044. ];
  6045. }
  6046. r = this.performAction.apply(yyval, [
  6047. yytext,
  6048. yyleng,
  6049. yylineno,
  6050. sharedState.yy,
  6051. action[1],
  6052. vstack,
  6053. lstack
  6054. ].concat(args));
  6055. if (typeof r !== 'undefined') {
  6056. return r;
  6057. }
  6058. if (len) {
  6059. stack = stack.slice(0, -1 * len * 2);
  6060. vstack = vstack.slice(0, -1 * len);
  6061. lstack = lstack.slice(0, -1 * len);
  6062. }
  6063. stack.push(this.productions_[action[1]][0]);
  6064. vstack.push(yyval.$);
  6065. lstack.push(yyval._$);
  6066. newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
  6067. stack.push(newState);
  6068. break;
  6069. case 3:
  6070. return true;
  6071. }
  6072. }
  6073. return true;
  6074. }};
  6075. /* generated by jison-lex 0.3.4 */
  6076. var lexer = (function(){
  6077. var lexer = ({
  6078. EOF:1,
  6079. parseError:function parseError(str, hash) {
  6080. if (this.yy.parser) {
  6081. this.yy.parser.parseError(str, hash);
  6082. } else {
  6083. throw new Error(str);
  6084. }
  6085. },
  6086. // resets the lexer, sets new input
  6087. setInput:function (input, yy) {
  6088. this.yy = yy || this.yy || {};
  6089. this._input = input;
  6090. this._more = this._backtrack = this.done = false;
  6091. this.yylineno = this.yyleng = 0;
  6092. this.yytext = this.matched = this.match = '';
  6093. this.conditionStack = ['INITIAL'];
  6094. this.yylloc = {
  6095. first_line: 1,
  6096. first_column: 0,
  6097. last_line: 1,
  6098. last_column: 0
  6099. };
  6100. if (this.options.ranges) {
  6101. this.yylloc.range = [0,0];
  6102. }
  6103. this.offset = 0;
  6104. return this;
  6105. },
  6106. // consumes and returns one char from the input
  6107. input:function () {
  6108. var ch = this._input[0];
  6109. this.yytext += ch;
  6110. this.yyleng++;
  6111. this.offset++;
  6112. this.match += ch;
  6113. this.matched += ch;
  6114. var lines = ch.match(/(?:\r\n?|\n).*/g);
  6115. if (lines) {
  6116. this.yylineno++;
  6117. this.yylloc.last_line++;
  6118. } else {
  6119. this.yylloc.last_column++;
  6120. }
  6121. if (this.options.ranges) {
  6122. this.yylloc.range[1]++;
  6123. }
  6124. this._input = this._input.slice(1);
  6125. return ch;
  6126. },
  6127. // unshifts one char (or a string) into the input
  6128. unput:function (ch) {
  6129. var len = ch.length;
  6130. var lines = ch.split(/(?:\r\n?|\n)/g);
  6131. this._input = ch + this._input;
  6132. this.yytext = this.yytext.substr(0, this.yytext.length - len);
  6133. //this.yyleng -= len;
  6134. this.offset -= len;
  6135. var oldLines = this.match.split(/(?:\r\n?|\n)/g);
  6136. this.match = this.match.substr(0, this.match.length - 1);
  6137. this.matched = this.matched.substr(0, this.matched.length - 1);
  6138. if (lines.length - 1) {
  6139. this.yylineno -= lines.length - 1;
  6140. }
  6141. var r = this.yylloc.range;
  6142. this.yylloc = {
  6143. first_line: this.yylloc.first_line,
  6144. last_line: this.yylineno + 1,
  6145. first_column: this.yylloc.first_column,
  6146. last_column: lines ?
  6147. (lines.length === oldLines.length ? this.yylloc.first_column : 0)
  6148. + oldLines[oldLines.length - lines.length].length - lines[0].length :
  6149. this.yylloc.first_column - len
  6150. };
  6151. if (this.options.ranges) {
  6152. this.yylloc.range = [r[0], r[0] + this.yyleng - len];
  6153. }
  6154. this.yyleng = this.yytext.length;
  6155. return this;
  6156. },
  6157. // When called from action, caches matched text and appends it on next action
  6158. more:function () {
  6159. this._more = true;
  6160. return this;
  6161. },
  6162. // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
  6163. reject:function () {
  6164. if (this.options.backtrack_lexer) {
  6165. this._backtrack = true;
  6166. } else {
  6167. 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).\n' + this.showPosition(), {
  6168. text: "",
  6169. token: null,
  6170. line: this.yylineno
  6171. });
  6172. }
  6173. return this;
  6174. },
  6175. // retain first n characters of the match
  6176. less:function (n) {
  6177. this.unput(this.match.slice(n));
  6178. },
  6179. // displays already matched input, i.e. for error messages
  6180. pastInput:function () {
  6181. var past = this.matched.substr(0, this.matched.length - this.match.length);
  6182. return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
  6183. },
  6184. // displays upcoming input, i.e. for error messages
  6185. upcomingInput:function () {
  6186. var next = this.match;
  6187. if (next.length < 20) {
  6188. next += this._input.substr(0, 20-next.length);
  6189. }
  6190. return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
  6191. },
  6192. // displays the character position where the lexing error occurred, i.e. for error messages
  6193. showPosition:function () {
  6194. var pre = this.pastInput();
  6195. var c = new Array(pre.length + 1).join("-");
  6196. return pre + this.upcomingInput() + "\n" + c + "^";
  6197. },
  6198. // test the lexed token: return FALSE when not a match, otherwise return token
  6199. test_match:function(match, indexed_rule) {
  6200. var token,
  6201. lines,
  6202. backup;
  6203. if (this.options.backtrack_lexer) {
  6204. // save context
  6205. backup = {
  6206. yylineno: this.yylineno,
  6207. yylloc: {
  6208. first_line: this.yylloc.first_line,
  6209. last_line: this.last_line,
  6210. first_column: this.yylloc.first_column,
  6211. last_column: this.yylloc.last_column
  6212. },
  6213. yytext: this.yytext,
  6214. match: this.match,
  6215. matches: this.matches,
  6216. matched: this.matched,
  6217. yyleng: this.yyleng,
  6218. offset: this.offset,
  6219. _more: this._more,
  6220. _input: this._input,
  6221. yy: this.yy,
  6222. conditionStack: this.conditionStack.slice(0),
  6223. done: this.done
  6224. };
  6225. if (this.options.ranges) {
  6226. backup.yylloc.range = this.yylloc.range.slice(0);
  6227. }
  6228. }
  6229. lines = match[0].match(/(?:\r\n?|\n).*/g);
  6230. if (lines) {
  6231. this.yylineno += lines.length;
  6232. }
  6233. this.yylloc = {
  6234. first_line: this.yylloc.last_line,
  6235. last_line: this.yylineno + 1,
  6236. first_column: this.yylloc.last_column,
  6237. last_column: lines ?
  6238. lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
  6239. this.yylloc.last_column + match[0].length
  6240. };
  6241. this.yytext += match[0];
  6242. this.match += match[0];
  6243. this.matches = match;
  6244. this.yyleng = this.yytext.length;
  6245. if (this.options.ranges) {
  6246. this.yylloc.range = [this.offset, this.offset += this.yyleng];
  6247. }
  6248. this._more = false;
  6249. this._backtrack = false;
  6250. this._input = this._input.slice(match[0].length);
  6251. this.matched += match[0];
  6252. token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
  6253. if (this.done && this._input) {
  6254. this.done = false;
  6255. }
  6256. if (token) {
  6257. return token;
  6258. } else if (this._backtrack) {
  6259. // recover context
  6260. for (var k in backup) {
  6261. this[k] = backup[k];
  6262. }
  6263. return false; // rule action called reject() implying the next rule should be tested instead.
  6264. }
  6265. return false;
  6266. },
  6267. // return next match in input
  6268. next:function () {
  6269. if (this.done) {
  6270. return this.EOF;
  6271. }
  6272. if (!this._input) {
  6273. this.done = true;
  6274. }
  6275. var token,
  6276. match,
  6277. tempMatch,
  6278. index;
  6279. if (!this._more) {
  6280. this.yytext = '';
  6281. this.match = '';
  6282. }
  6283. var rules = this._currentRules();
  6284. for (var i = 0; i < rules.length; i++) {
  6285. tempMatch = this._input.match(this.rules[rules[i]]);
  6286. if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
  6287. match = tempMatch;
  6288. index = i;
  6289. if (this.options.backtrack_lexer) {
  6290. token = this.test_match(tempMatch, rules[i]);
  6291. if (token !== false) {
  6292. return token;
  6293. } else if (this._backtrack) {
  6294. match = false;
  6295. continue; // rule action called reject() implying a rule MISmatch.
  6296. } else {
  6297. // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
  6298. return false;
  6299. }
  6300. } else if (!this.options.flex) {
  6301. break;
  6302. }
  6303. }
  6304. }
  6305. if (match) {
  6306. token = this.test_match(match, rules[index]);
  6307. if (token !== false) {
  6308. return token;
  6309. }
  6310. // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
  6311. return false;
  6312. }
  6313. if (this._input === "") {
  6314. return this.EOF;
  6315. } else {
  6316. return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
  6317. text: "",
  6318. token: null,
  6319. line: this.yylineno
  6320. });
  6321. }
  6322. },
  6323. // return next match that has a token
  6324. lex:function lex () {
  6325. var r = this.next();
  6326. if (r) {
  6327. return r;
  6328. } else {
  6329. return this.lex();
  6330. }
  6331. },
  6332. // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
  6333. begin:function begin (condition) {
  6334. this.conditionStack.push(condition);
  6335. },
  6336. // pop the previously active lexer condition state off the condition stack
  6337. popState:function popState () {
  6338. var n = this.conditionStack.length - 1;
  6339. if (n > 0) {
  6340. return this.conditionStack.pop();
  6341. } else {
  6342. return this.conditionStack[0];
  6343. }
  6344. },
  6345. // produce the lexer rule set which is active for the currently active lexer condition state
  6346. _currentRules:function _currentRules () {
  6347. if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
  6348. return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
  6349. } else {
  6350. return this.conditions["INITIAL"].rules;
  6351. }
  6352. },
  6353. // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
  6354. topState:function topState (n) {
  6355. n = this.conditionStack.length - 1 - Math.abs(n || 0);
  6356. if (n >= 0) {
  6357. return this.conditionStack[n];
  6358. } else {
  6359. return "INITIAL";
  6360. }
  6361. },
  6362. // alias for begin(condition)
  6363. pushState:function pushState (condition) {
  6364. this.begin(condition);
  6365. },
  6366. // return the number of states currently on the stack
  6367. stateStackSize:function stateStackSize() {
  6368. return this.conditionStack.length;
  6369. },
  6370. options: {"case-insensitive":true},
  6371. performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
  6372. var YYSTATE=YY_START;
  6373. switch($avoiding_name_collisions) {
  6374. case 0:return 12;
  6375. break;
  6376. case 1:/* skip all whitespace */
  6377. break;
  6378. case 2:/* skip comments */
  6379. break;
  6380. case 3:/* skip comments */
  6381. break;
  6382. case 4:return 4;
  6383. break;
  6384. case 5:return 15;
  6385. break;
  6386. case 6:return 17;
  6387. break;
  6388. case 7:return 20;
  6389. break;
  6390. case 8:return 21;
  6391. break;
  6392. case 9:return 19;
  6393. break;
  6394. case 10:return 8;
  6395. break;
  6396. case 11:return 8;
  6397. break;
  6398. case 12:return 5;
  6399. break;
  6400. case 13:return 26
  6401. break;
  6402. case 14:this.begin("options");
  6403. break;
  6404. case 15:this.popState();
  6405. break;
  6406. case 16:return 11;
  6407. break;
  6408. case 17:this.begin("string");
  6409. break;
  6410. case 18:this.popState();
  6411. break;
  6412. case 19:return 23;
  6413. break;
  6414. case 20:return 18;
  6415. break;
  6416. case 21:return 7;
  6417. break;
  6418. }
  6419. },
  6420. rules: [/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit\b)/i,/^(?:branch\b)/i,/^(?:merge\b)/i,/^(?:reset\b)/i,/^(?:checkout\b)/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:end\r?\n)/i,/^(?:[^\n]+\r?\n)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[a-zA-Z][a-zA-Z0-9_]+)/i,/^(?:$)/i],
  6421. conditions: {"options":{"rules":[15,16],"inclusive":false},"string":{"rules":[18,19],"inclusive":false},"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,20,21],"inclusive":true}}
  6422. });
  6423. return lexer;
  6424. })();
  6425. parser.lexer = lexer;
  6426. function Parser () {
  6427. this.yy = {};
  6428. }
  6429. Parser.prototype = parser;parser.Parser = Parser;
  6430. return new Parser;
  6431. })();
  6432. if (true) {
  6433. exports.parser = parser;
  6434. exports.Parser = parser.Parser;
  6435. exports.parse = function () { return parser.parse.apply(parser, arguments); };
  6436. exports.main = function commonjsMain (args) {
  6437. if (!args[1]) {
  6438. console.log('Usage: '+args[0]+' FILE');
  6439. process.exit(1);
  6440. }
  6441. var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
  6442. return exports.parser.parse(source);
  6443. };
  6444. if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
  6445. exports.main(process.argv.slice(1));
  6446. }
  6447. }
  6448. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
  6449. /***/ }),
  6450. /***/ "./src/diagrams/info/infoDb.js":
  6451. /*!*************************************!*\
  6452. !*** ./src/diagrams/info/infoDb.js ***!
  6453. \*************************************/
  6454. /*! exports provided: setMessage, getMessage, setInfo, getInfo, default */
  6455. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  6456. "use strict";
  6457. __webpack_require__.r(__webpack_exports__);
  6458. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setMessage", function() { return setMessage; });
  6459. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMessage", function() { return getMessage; });
  6460. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setInfo", function() { return setInfo; });
  6461. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getInfo", function() { return getInfo; });
  6462. /* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
  6463. /**
  6464. * Created by knut on 15-01-14.
  6465. */
  6466. var message = '';
  6467. var info = false;
  6468. const setMessage = txt => {
  6469. _logger__WEBPACK_IMPORTED_MODULE_0__["logger"].debug('Setting message to: ' + txt);
  6470. message = txt;
  6471. };
  6472. const getMessage = () => {
  6473. return message;
  6474. };
  6475. const setInfo = inf => {
  6476. info = inf;
  6477. };
  6478. const getInfo = () => {
  6479. return info;
  6480. }; // export const parseError = (err, hash) => {
  6481. // global.mermaidAPI.parseError(err, hash)
  6482. // }
  6483. /* harmony default export */ __webpack_exports__["default"] = ({
  6484. setMessage,
  6485. getMessage,
  6486. setInfo,
  6487. getInfo // parseError
  6488. });
  6489. /***/ }),
  6490. /***/ "./src/diagrams/info/infoRenderer.js":
  6491. /*!*******************************************!*\
  6492. !*** ./src/diagrams/info/infoRenderer.js ***!
  6493. \*******************************************/
  6494. /*! exports provided: setConf, draw, default */
  6495. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  6496. "use strict";
  6497. __webpack_require__.r(__webpack_exports__);
  6498. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
  6499. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
  6500. /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
  6501. /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
  6502. /* harmony import */ var _infoDb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./infoDb */ "./src/diagrams/info/infoDb.js");
  6503. /* harmony import */ var _parser_info__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parser/info */ "./src/diagrams/info/parser/info.jison");
  6504. /* harmony import */ var _parser_info__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_parser_info__WEBPACK_IMPORTED_MODULE_2__);
  6505. /* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
  6506. /**
  6507. * Created by knut on 14-12-11.
  6508. */
  6509. const conf = {};
  6510. const setConf = function (cnf) {
  6511. const keys = Object.keys(cnf);
  6512. keys.forEach(function (key) {
  6513. conf[key] = cnf[key];
  6514. });
  6515. };
  6516. /**
  6517. * Draws a an info picture in the tag with id: id based on the graph definition in text.
  6518. * @param text
  6519. * @param id
  6520. */
  6521. const draw = (txt, id, ver) => {
  6522. try {
  6523. const parser = _parser_info__WEBPACK_IMPORTED_MODULE_2___default.a.parser;
  6524. parser.yy = _infoDb__WEBPACK_IMPORTED_MODULE_1__["default"];
  6525. _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Renering info diagram\n' + txt); // Parse the graph definition
  6526. parser.parse(txt);
  6527. _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Parsed info diagram'); // Fetch the default direction, use TD if none was found
  6528. const svg = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#' + id);
  6529. const g = svg.append('g');
  6530. g.append('text') // text label for the x axis
  6531. .attr('x', 100).attr('y', 40).attr('class', 'version').attr('font-size', '32px').style('text-anchor', 'middle').text('v ' + ver);
  6532. svg.attr('height', 100);
  6533. svg.attr('width', 400); // svg.attr('viewBox', '0 0 300 150');
  6534. } catch (e) {
  6535. _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].error('Error while rendering info diagram');
  6536. _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].error(e.message);
  6537. }
  6538. };
  6539. /* harmony default export */ __webpack_exports__["default"] = ({
  6540. setConf,
  6541. draw
  6542. });
  6543. /***/ }),
  6544. /***/ "./src/diagrams/info/parser/info.jison":
  6545. /*!*********************************************!*\
  6546. !*** ./src/diagrams/info/parser/info.jison ***!
  6547. \*********************************************/
  6548. /*! no static exports found */
  6549. /***/ (function(module, exports, __webpack_require__) {
  6550. /* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
  6551. /*
  6552. Returns a Parser object of the following structure:
  6553. Parser: {
  6554. yy: {}
  6555. }
  6556. Parser.prototype: {
  6557. yy: {},
  6558. trace: function(),
  6559. symbols_: {associative list: name ==> number},
  6560. terminals_: {associative list: number ==> name},
  6561. productions_: [...],
  6562. performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
  6563. table: [...],
  6564. defaultActions: {...},
  6565. parseError: function(str, hash),
  6566. parse: function(input),
  6567. lexer: {
  6568. EOF: 1,
  6569. parseError: function(str, hash),
  6570. setInput: function(input),
  6571. input: function(),
  6572. unput: function(str),
  6573. more: function(),
  6574. less: function(n),
  6575. pastInput: function(),
  6576. upcomingInput: function(),
  6577. showPosition: function(),
  6578. test_match: function(regex_match_array, rule_index),
  6579. next: function(),
  6580. lex: function(),
  6581. begin: function(condition),
  6582. popState: function(),
  6583. _currentRules: function(),
  6584. topState: function(),
  6585. pushState: function(condition),
  6586. options: {
  6587. ranges: boolean (optional: true ==> token location info will include a .range[] member)
  6588. flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
  6589. backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
  6590. },
  6591. performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
  6592. rules: [...],
  6593. conditions: {associative list: name ==> set},
  6594. }
  6595. }
  6596. token location info (@$, _$, etc.): {
  6597. first_line: n,
  6598. last_line: n,
  6599. first_column: n,
  6600. last_column: n,
  6601. range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
  6602. }
  6603. the parseError function receives a 'hash' object with these members for lexer and parser errors: {
  6604. text: (matched text)
  6605. token: (the produced terminal token, if any)
  6606. line: (yylineno)
  6607. }
  6608. while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
  6609. loc: (yylloc)
  6610. expected: (string describing the set of expected tokens)
  6611. recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
  6612. }
  6613. */
  6614. var parser = (function(){
  6615. var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,9,10];
  6616. var parser = {trace: function trace () { },
  6617. yy: {},
  6618. symbols_: {"error":2,"start":3,"info":4,"document":5,"EOF":6,"line":7,"statement":8,"NL":9,"showInfo":10,"$accept":0,"$end":1},
  6619. terminals_: {2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},
  6620. productions_: [0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],
  6621. performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
  6622. /* this == yyval */
  6623. var $0 = $$.length - 1;
  6624. switch (yystate) {
  6625. case 1:
  6626. return yy;
  6627. break;
  6628. case 4:
  6629. break;
  6630. case 6:
  6631. yy.setInfo(true);
  6632. break;
  6633. }
  6634. },
  6635. table: [{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},o($V0,[2,3]),o($V0,[2,4]),o($V0,[2,5]),o($V0,[2,6])],
  6636. defaultActions: {4:[2,1]},
  6637. parseError: function parseError (str, hash) {
  6638. if (hash.recoverable) {
  6639. this.trace(str);
  6640. } else {
  6641. var error = new Error(str);
  6642. error.hash = hash;
  6643. throw error;
  6644. }
  6645. },
  6646. parse: function parse(input) {
  6647. var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
  6648. var args = lstack.slice.call(arguments, 1);
  6649. var lexer = Object.create(this.lexer);
  6650. var sharedState = { yy: {} };
  6651. for (var k in this.yy) {
  6652. if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
  6653. sharedState.yy[k] = this.yy[k];
  6654. }
  6655. }
  6656. lexer.setInput(input, sharedState.yy);
  6657. sharedState.yy.lexer = lexer;
  6658. sharedState.yy.parser = this;
  6659. if (typeof lexer.yylloc == 'undefined') {
  6660. lexer.yylloc = {};
  6661. }
  6662. var yyloc = lexer.yylloc;
  6663. lstack.push(yyloc);
  6664. var ranges = lexer.options && lexer.options.ranges;
  6665. if (typeof sharedState.yy.parseError === 'function') {
  6666. this.parseError = sharedState.yy.parseError;
  6667. } else {
  6668. this.parseError = Object.getPrototypeOf(this).parseError;
  6669. }
  6670. function popStack(n) {
  6671. stack.length = stack.length - 2 * n;
  6672. vstack.length = vstack.length - n;
  6673. lstack.length = lstack.length - n;
  6674. }
  6675. function lex() {
  6676. var token;
  6677. token = tstack.pop() || lexer.lex() || EOF;
  6678. if (typeof token !== 'number') {
  6679. if (token instanceof Array) {
  6680. tstack = token;
  6681. token = tstack.pop();
  6682. }
  6683. token = self.symbols_[token] || token;
  6684. }
  6685. return token;
  6686. }
  6687. var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
  6688. while (true) {
  6689. state = stack[stack.length - 1];
  6690. if (this.defaultActions[state]) {
  6691. action = this.defaultActions[state];
  6692. } else {
  6693. if (symbol === null || typeof symbol == 'undefined') {
  6694. symbol = lex();
  6695. }
  6696. action = table[state] && table[state][symbol];
  6697. }
  6698. if (typeof action === 'undefined' || !action.length || !action[0]) {
  6699. var errStr = '';
  6700. expected = [];
  6701. for (p in table[state]) {
  6702. if (this.terminals_[p] && p > TERROR) {
  6703. expected.push('\'' + this.terminals_[p] + '\'');
  6704. }
  6705. }
  6706. if (lexer.showPosition) {
  6707. errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
  6708. } else {
  6709. errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
  6710. }
  6711. this.parseError(errStr, {
  6712. text: lexer.match,
  6713. token: this.terminals_[symbol] || symbol,
  6714. line: lexer.yylineno,
  6715. loc: yyloc,
  6716. expected: expected
  6717. });
  6718. }
  6719. if (action[0] instanceof Array && action.length > 1) {
  6720. throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
  6721. }
  6722. switch (action[0]) {
  6723. case 1:
  6724. stack.push(symbol);
  6725. vstack.push(lexer.yytext);
  6726. lstack.push(lexer.yylloc);
  6727. stack.push(action[1]);
  6728. symbol = null;
  6729. if (!preErrorSymbol) {
  6730. yyleng = lexer.yyleng;
  6731. yytext = lexer.yytext;
  6732. yylineno = lexer.yylineno;
  6733. yyloc = lexer.yylloc;
  6734. if (recovering > 0) {
  6735. recovering--;
  6736. }
  6737. } else {
  6738. symbol = preErrorSymbol;
  6739. preErrorSymbol = null;
  6740. }
  6741. break;
  6742. case 2:
  6743. len = this.productions_[action[1]][1];
  6744. yyval.$ = vstack[vstack.length - len];
  6745. yyval._$ = {
  6746. first_line: lstack[lstack.length - (len || 1)].first_line,
  6747. last_line: lstack[lstack.length - 1].last_line,
  6748. first_column: lstack[lstack.length - (len || 1)].first_column,
  6749. last_column: lstack[lstack.length - 1].last_column
  6750. };
  6751. if (ranges) {
  6752. yyval._$.range = [
  6753. lstack[lstack.length - (len || 1)].range[0],
  6754. lstack[lstack.length - 1].range[1]
  6755. ];
  6756. }
  6757. r = this.performAction.apply(yyval, [
  6758. yytext,
  6759. yyleng,
  6760. yylineno,
  6761. sharedState.yy,
  6762. action[1],
  6763. vstack,
  6764. lstack
  6765. ].concat(args));
  6766. if (typeof r !== 'undefined') {
  6767. return r;
  6768. }
  6769. if (len) {
  6770. stack = stack.slice(0, -1 * len * 2);
  6771. vstack = vstack.slice(0, -1 * len);
  6772. lstack = lstack.slice(0, -1 * len);
  6773. }
  6774. stack.push(this.productions_[action[1]][0]);
  6775. vstack.push(yyval.$);
  6776. lstack.push(yyval._$);
  6777. newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
  6778. stack.push(newState);
  6779. break;
  6780. case 3:
  6781. return true;
  6782. }
  6783. }
  6784. return true;
  6785. }};
  6786. /* generated by jison-lex 0.3.4 */
  6787. var lexer = (function(){
  6788. var lexer = ({
  6789. EOF:1,
  6790. parseError:function parseError(str, hash) {
  6791. if (this.yy.parser) {
  6792. this.yy.parser.parseError(str, hash);
  6793. } else {
  6794. throw new Error(str);
  6795. }
  6796. },
  6797. // resets the lexer, sets new input
  6798. setInput:function (input, yy) {
  6799. this.yy = yy || this.yy || {};
  6800. this._input = input;
  6801. this._more = this._backtrack = this.done = false;
  6802. this.yylineno = this.yyleng = 0;
  6803. this.yytext = this.matched = this.match = '';
  6804. this.conditionStack = ['INITIAL'];
  6805. this.yylloc = {
  6806. first_line: 1,
  6807. first_column: 0,
  6808. last_line: 1,
  6809. last_column: 0
  6810. };
  6811. if (this.options.ranges) {
  6812. this.yylloc.range = [0,0];
  6813. }
  6814. this.offset = 0;
  6815. return this;
  6816. },
  6817. // consumes and returns one char from the input
  6818. input:function () {
  6819. var ch = this._input[0];
  6820. this.yytext += ch;
  6821. this.yyleng++;
  6822. this.offset++;
  6823. this.match += ch;
  6824. this.matched += ch;
  6825. var lines = ch.match(/(?:\r\n?|\n).*/g);
  6826. if (lines) {
  6827. this.yylineno++;
  6828. this.yylloc.last_line++;
  6829. } else {
  6830. this.yylloc.last_column++;
  6831. }
  6832. if (this.options.ranges) {
  6833. this.yylloc.range[1]++;
  6834. }
  6835. this._input = this._input.slice(1);
  6836. return ch;
  6837. },
  6838. // unshifts one char (or a string) into the input
  6839. unput:function (ch) {
  6840. var len = ch.length;
  6841. var lines = ch.split(/(?:\r\n?|\n)/g);
  6842. this._input = ch + this._input;
  6843. this.yytext = this.yytext.substr(0, this.yytext.length - len);
  6844. //this.yyleng -= len;
  6845. this.offset -= len;
  6846. var oldLines = this.match.split(/(?:\r\n?|\n)/g);
  6847. this.match = this.match.substr(0, this.match.length - 1);
  6848. this.matched = this.matched.substr(0, this.matched.length - 1);
  6849. if (lines.length - 1) {
  6850. this.yylineno -= lines.length - 1;
  6851. }
  6852. var r = this.yylloc.range;
  6853. this.yylloc = {
  6854. first_line: this.yylloc.first_line,
  6855. last_line: this.yylineno + 1,
  6856. first_column: this.yylloc.first_column,
  6857. last_column: lines ?
  6858. (lines.length === oldLines.length ? this.yylloc.first_column : 0)
  6859. + oldLines[oldLines.length - lines.length].length - lines[0].length :
  6860. this.yylloc.first_column - len
  6861. };
  6862. if (this.options.ranges) {
  6863. this.yylloc.range = [r[0], r[0] + this.yyleng - len];
  6864. }
  6865. this.yyleng = this.yytext.length;
  6866. return this;
  6867. },
  6868. // When called from action, caches matched text and appends it on next action
  6869. more:function () {
  6870. this._more = true;
  6871. return this;
  6872. },
  6873. // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
  6874. reject:function () {
  6875. if (this.options.backtrack_lexer) {
  6876. this._backtrack = true;
  6877. } else {
  6878. 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).\n' + this.showPosition(), {
  6879. text: "",
  6880. token: null,
  6881. line: this.yylineno
  6882. });
  6883. }
  6884. return this;
  6885. },
  6886. // retain first n characters of the match
  6887. less:function (n) {
  6888. this.unput(this.match.slice(n));
  6889. },
  6890. // displays already matched input, i.e. for error messages
  6891. pastInput:function () {
  6892. var past = this.matched.substr(0, this.matched.length - this.match.length);
  6893. return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
  6894. },
  6895. // displays upcoming input, i.e. for error messages
  6896. upcomingInput:function () {
  6897. var next = this.match;
  6898. if (next.length < 20) {
  6899. next += this._input.substr(0, 20-next.length);
  6900. }
  6901. return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
  6902. },
  6903. // displays the character position where the lexing error occurred, i.e. for error messages
  6904. showPosition:function () {
  6905. var pre = this.pastInput();
  6906. var c = new Array(pre.length + 1).join("-");
  6907. return pre + this.upcomingInput() + "\n" + c + "^";
  6908. },
  6909. // test the lexed token: return FALSE when not a match, otherwise return token
  6910. test_match:function(match, indexed_rule) {
  6911. var token,
  6912. lines,
  6913. backup;
  6914. if (this.options.backtrack_lexer) {
  6915. // save context
  6916. backup = {
  6917. yylineno: this.yylineno,
  6918. yylloc: {
  6919. first_line: this.yylloc.first_line,
  6920. last_line: this.last_line,
  6921. first_column: this.yylloc.first_column,
  6922. last_column: this.yylloc.last_column
  6923. },
  6924. yytext: this.yytext,
  6925. match: this.match,
  6926. matches: this.matches,
  6927. matched: this.matched,
  6928. yyleng: this.yyleng,
  6929. offset: this.offset,
  6930. _more: this._more,
  6931. _input: this._input,
  6932. yy: this.yy,
  6933. conditionStack: this.conditionStack.slice(0),
  6934. done: this.done
  6935. };
  6936. if (this.options.ranges) {
  6937. backup.yylloc.range = this.yylloc.range.slice(0);
  6938. }
  6939. }
  6940. lines = match[0].match(/(?:\r\n?|\n).*/g);
  6941. if (lines) {
  6942. this.yylineno += lines.length;
  6943. }
  6944. this.yylloc = {
  6945. first_line: this.yylloc.last_line,
  6946. last_line: this.yylineno + 1,
  6947. first_column: this.yylloc.last_column,
  6948. last_column: lines ?
  6949. lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
  6950. this.yylloc.last_column + match[0].length
  6951. };
  6952. this.yytext += match[0];
  6953. this.match += match[0];
  6954. this.matches = match;
  6955. this.yyleng = this.yytext.length;
  6956. if (this.options.ranges) {
  6957. this.yylloc.range = [this.offset, this.offset += this.yyleng];
  6958. }
  6959. this._more = false;
  6960. this._backtrack = false;
  6961. this._input = this._input.slice(match[0].length);
  6962. this.matched += match[0];
  6963. token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
  6964. if (this.done && this._input) {
  6965. this.done = false;
  6966. }
  6967. if (token) {
  6968. return token;
  6969. } else if (this._backtrack) {
  6970. // recover context
  6971. for (var k in backup) {
  6972. this[k] = backup[k];
  6973. }
  6974. return false; // rule action called reject() implying the next rule should be tested instead.
  6975. }
  6976. return false;
  6977. },
  6978. // return next match in input
  6979. next:function () {
  6980. if (this.done) {
  6981. return this.EOF;
  6982. }
  6983. if (!this._input) {
  6984. this.done = true;
  6985. }
  6986. var token,
  6987. match,
  6988. tempMatch,
  6989. index;
  6990. if (!this._more) {
  6991. this.yytext = '';
  6992. this.match = '';
  6993. }
  6994. var rules = this._currentRules();
  6995. for (var i = 0; i < rules.length; i++) {
  6996. tempMatch = this._input.match(this.rules[rules[i]]);
  6997. if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
  6998. match = tempMatch;
  6999. index = i;
  7000. if (this.options.backtrack_lexer) {
  7001. token = this.test_match(tempMatch, rules[i]);
  7002. if (token !== false) {
  7003. return token;
  7004. } else if (this._backtrack) {
  7005. match = false;
  7006. continue; // rule action called reject() implying a rule MISmatch.
  7007. } else {
  7008. // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
  7009. return false;
  7010. }
  7011. } else if (!this.options.flex) {
  7012. break;
  7013. }
  7014. }
  7015. }
  7016. if (match) {
  7017. token = this.test_match(match, rules[index]);
  7018. if (token !== false) {
  7019. return token;
  7020. }
  7021. // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
  7022. return false;
  7023. }
  7024. if (this._input === "") {
  7025. return this.EOF;
  7026. } else {
  7027. return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
  7028. text: "",
  7029. token: null,
  7030. line: this.yylineno
  7031. });
  7032. }
  7033. },
  7034. // return next match that has a token
  7035. lex:function lex () {
  7036. var r = this.next();
  7037. if (r) {
  7038. return r;
  7039. } else {
  7040. return this.lex();
  7041. }
  7042. },
  7043. // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
  7044. begin:function begin (condition) {
  7045. this.conditionStack.push(condition);
  7046. },
  7047. // pop the previously active lexer condition state off the condition stack
  7048. popState:function popState () {
  7049. var n = this.conditionStack.length - 1;
  7050. if (n > 0) {
  7051. return this.conditionStack.pop();
  7052. } else {
  7053. return this.conditionStack[0];
  7054. }
  7055. },
  7056. // produce the lexer rule set which is active for the currently active lexer condition state
  7057. _currentRules:function _currentRules () {
  7058. if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
  7059. return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
  7060. } else {
  7061. return this.conditions["INITIAL"].rules;
  7062. }
  7063. },
  7064. // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
  7065. topState:function topState (n) {
  7066. n = this.conditionStack.length - 1 - Math.abs(n || 0);
  7067. if (n >= 0) {
  7068. return this.conditionStack[n];
  7069. } else {
  7070. return "INITIAL";
  7071. }
  7072. },
  7073. // alias for begin(condition)
  7074. pushState:function pushState (condition) {
  7075. this.begin(condition);
  7076. },
  7077. // return the number of states currently on the stack
  7078. stateStackSize:function stateStackSize() {
  7079. return this.conditionStack.length;
  7080. },
  7081. options: {"case-insensitive":true},
  7082. performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
  7083. // Pre-lexer code can go here
  7084. var YYSTATE=YY_START;
  7085. switch($avoiding_name_collisions) {
  7086. case 0:return 4 ;
  7087. break;
  7088. case 1:return 9 ;
  7089. break;
  7090. case 2:return 'space';
  7091. break;
  7092. case 3:return 10;
  7093. break;
  7094. case 4:return 6 ;
  7095. break;
  7096. case 5:return 'TXT' ;
  7097. break;
  7098. }
  7099. },
  7100. rules: [/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],
  7101. conditions: {"INITIAL":{"rules":[0,1,2,3,4,5],"inclusive":true}}
  7102. });
  7103. return lexer;
  7104. })();
  7105. parser.lexer = lexer;
  7106. function Parser () {
  7107. this.yy = {};
  7108. }
  7109. Parser.prototype = parser;parser.Parser = Parser;
  7110. return new Parser;
  7111. })();
  7112. if (true) {
  7113. exports.parser = parser;
  7114. exports.Parser = parser.Parser;
  7115. exports.parse = function () { return parser.parse.apply(parser, arguments); };
  7116. exports.main = function commonjsMain (args) {
  7117. if (!args[1]) {
  7118. console.log('Usage: '+args[0]+' FILE');
  7119. process.exit(1);
  7120. }
  7121. var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
  7122. return exports.parser.parse(source);
  7123. };
  7124. if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
  7125. exports.main(process.argv.slice(1));
  7126. }
  7127. }
  7128. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
  7129. /***/ }),
  7130. /***/ "./src/diagrams/sequence/parser/sequenceDiagram.jison":
  7131. /*!************************************************************!*\
  7132. !*** ./src/diagrams/sequence/parser/sequenceDiagram.jison ***!
  7133. \************************************************************/
  7134. /*! no static exports found */
  7135. /***/ (function(module, exports, __webpack_require__) {
  7136. /* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
  7137. /*
  7138. Returns a Parser object of the following structure:
  7139. Parser: {
  7140. yy: {}
  7141. }
  7142. Parser.prototype: {
  7143. yy: {},
  7144. trace: function(),
  7145. symbols_: {associative list: name ==> number},
  7146. terminals_: {associative list: number ==> name},
  7147. productions_: [...],
  7148. performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
  7149. table: [...],
  7150. defaultActions: {...},
  7151. parseError: function(str, hash),
  7152. parse: function(input),
  7153. lexer: {
  7154. EOF: 1,
  7155. parseError: function(str, hash),
  7156. setInput: function(input),
  7157. input: function(),
  7158. unput: function(str),
  7159. more: function(),
  7160. less: function(n),
  7161. pastInput: function(),
  7162. upcomingInput: function(),
  7163. showPosition: function(),
  7164. test_match: function(regex_match_array, rule_index),
  7165. next: function(),
  7166. lex: function(),
  7167. begin: function(condition),
  7168. popState: function(),
  7169. _currentRules: function(),
  7170. topState: function(),
  7171. pushState: function(condition),
  7172. options: {
  7173. ranges: boolean (optional: true ==> token location info will include a .range[] member)
  7174. flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
  7175. backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
  7176. },
  7177. performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
  7178. rules: [...],
  7179. conditions: {associative list: name ==> set},
  7180. }
  7181. }
  7182. token location info (@$, _$, etc.): {
  7183. first_line: n,
  7184. last_line: n,
  7185. first_column: n,
  7186. last_column: n,
  7187. range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
  7188. }
  7189. the parseError function receives a 'hash' object with these members for lexer and parser errors: {
  7190. text: (matched text)
  7191. token: (the produced terminal token, if any)
  7192. line: (yylineno)
  7193. }
  7194. while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
  7195. loc: (yylloc)
  7196. expected: (string describing the set of expected tokens)
  7197. recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
  7198. }
  7199. */
  7200. var parser = (function(){
  7201. var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,2],$V1=[1,3],$V2=[1,4],$V3=[2,4],$V4=[1,9],$V5=[1,11],$V6=[1,12],$V7=[1,14],$V8=[1,15],$V9=[1,17],$Va=[1,18],$Vb=[1,19],$Vc=[1,20],$Vd=[1,21],$Ve=[1,22],$Vf=[1,24],$Vg=[1,25],$Vh=[1,4,5,10,15,16,18,20,21,22,23,24,26,28,29,30,41],$Vi=[1,33],$Vj=[4,5,10,15,16,18,20,21,22,23,24,26,30,41],$Vk=[4,5,10,15,16,18,20,21,22,23,24,26,29,30,41],$Vl=[4,5,10,15,16,18,20,21,22,23,24,26,28,30,41],$Vm=[39,40,41];
  7202. var parser = {trace: function trace () { },
  7203. yy: {},
  7204. symbols_: {"error":2,"start":3,"SPACE":4,"NL":5,"SD":6,"document":7,"line":8,"statement":9,"participant":10,"actor":11,"AS":12,"restOfLine":13,"signal":14,"activate":15,"deactivate":16,"note_statement":17,"title":18,"text2":19,"loop":20,"end":21,"rect":22,"opt":23,"alt":24,"else_sections":25,"par":26,"par_sections":27,"and":28,"else":29,"note":30,"placement":31,"over":32,"actor_pair":33,"spaceList":34,",":35,"left_of":36,"right_of":37,"signaltype":38,"+":39,"-":40,"ACTOR":41,"SOLID_OPEN_ARROW":42,"DOTTED_OPEN_ARROW":43,"SOLID_ARROW":44,"DOTTED_ARROW":45,"SOLID_CROSS":46,"DOTTED_CROSS":47,"TXT":48,"$accept":0,"$end":1},
  7205. terminals_: {2:"error",4:"SPACE",5:"NL",6:"SD",10:"participant",12:"AS",13:"restOfLine",15:"activate",16:"deactivate",18:"title",20:"loop",21:"end",22:"rect",23:"opt",24:"alt",26:"par",28:"and",29:"else",30:"note",32:"over",35:",",36:"left_of",37:"right_of",39:"+",40:"-",41:"ACTOR",42:"SOLID_OPEN_ARROW",43:"DOTTED_OPEN_ARROW",44:"SOLID_ARROW",45:"DOTTED_ARROW",46:"SOLID_CROSS",47:"DOTTED_CROSS",48:"TXT"},
  7206. productions_: [0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,5],[9,3],[9,2],[9,3],[9,3],[9,2],[9,3],[9,4],[9,4],[9,4],[9,4],[9,4],[27,1],[27,4],[25,1],[25,4],[17,4],[17,4],[34,2],[34,1],[33,3],[33,1],[31,1],[31,1],[14,5],[14,5],[14,4],[11,1],[38,1],[38,1],[38,1],[38,1],[38,1],[38,1],[19,1]],
  7207. performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
  7208. /* this == yyval */
  7209. var $0 = $$.length - 1;
  7210. switch (yystate) {
  7211. case 3:
  7212. yy.apply($$[$0]);return $$[$0];
  7213. break;
  7214. case 4:
  7215. this.$ = []
  7216. break;
  7217. case 5:
  7218. $$[$0-1].push($$[$0]);this.$ = $$[$0-1]
  7219. break;
  7220. case 6: case 7:
  7221. this.$ = $$[$0]
  7222. break;
  7223. case 8:
  7224. this.$=[];
  7225. break;
  7226. case 9:
  7227. $$[$0-3].description=$$[$0-1]; this.$=$$[$0-3];
  7228. break;
  7229. case 10:
  7230. this.$=$$[$0-1];
  7231. break;
  7232. case 12:
  7233. this.$={type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0-1]};
  7234. break;
  7235. case 13:
  7236. this.$={type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0-1]};
  7237. break;
  7238. case 15:
  7239. this.$=[{type:'setTitle', text:$$[$0-1]}]
  7240. break;
  7241. case 16:
  7242. $$[$0-1].unshift({type: 'loopStart', loopText:$$[$0-2], signalType: yy.LINETYPE.LOOP_START});
  7243. $$[$0-1].push({type: 'loopEnd', loopText:$$[$0-2], signalType: yy.LINETYPE.LOOP_END});
  7244. this.$=$$[$0-1];
  7245. break;
  7246. case 17:
  7247. $$[$0-1].unshift({type: 'rectStart', color:$$[$0-2], signalType: yy.LINETYPE.RECT_START });
  7248. $$[$0-1].push({type: 'rectEnd', color:$$[$0-2], signalType: yy.LINETYPE.RECT_END });
  7249. this.$=$$[$0-1];
  7250. break;
  7251. case 18:
  7252. $$[$0-1].unshift({type: 'optStart', optText:$$[$0-2], signalType: yy.LINETYPE.OPT_START});
  7253. $$[$0-1].push({type: 'optEnd', optText:$$[$0-2], signalType: yy.LINETYPE.OPT_END});
  7254. this.$=$$[$0-1];
  7255. break;
  7256. case 19:
  7257. // Alt start
  7258. $$[$0-1].unshift({type: 'altStart', altText:$$[$0-2], signalType: yy.LINETYPE.ALT_START});
  7259. // Content in alt is already in $$[$0-1]
  7260. // End
  7261. $$[$0-1].push({type: 'altEnd', signalType: yy.LINETYPE.ALT_END});
  7262. this.$=$$[$0-1];
  7263. break;
  7264. case 20:
  7265. // Parallel start
  7266. $$[$0-1].unshift({type: 'parStart', parText:$$[$0-2], signalType: yy.LINETYPE.PAR_START});
  7267. // Content in par is already in $$[$0-1]
  7268. // End
  7269. $$[$0-1].push({type: 'parEnd', signalType: yy.LINETYPE.PAR_END});
  7270. this.$=$$[$0-1];
  7271. break;
  7272. case 22:
  7273. this.$ = $$[$0-3].concat([{type: 'and', parText:$$[$0-1], signalType: yy.LINETYPE.PAR_AND}, $$[$0]]);
  7274. break;
  7275. case 24:
  7276. this.$ = $$[$0-3].concat([{type: 'else', altText:$$[$0-1], signalType: yy.LINETYPE.ALT_ELSE}, $$[$0]]);
  7277. break;
  7278. case 25:
  7279. this.$ = [$$[$0-1], {type:'addNote', placement:$$[$0-2], actor:$$[$0-1].actor, text:$$[$0]}];
  7280. break;
  7281. case 26:
  7282. // Coerce actor_pair into a [to, from, ...] array
  7283. $$[$0-2] = [].concat($$[$0-1], $$[$0-1]).slice(0, 2);
  7284. $$[$0-2][0] = $$[$0-2][0].actor;
  7285. $$[$0-2][1] = $$[$0-2][1].actor;
  7286. this.$ = [$$[$0-1], {type:'addNote', placement:yy.PLACEMENT.OVER, actor:$$[$0-2].slice(0, 2), text:$$[$0]}];
  7287. break;
  7288. case 29:
  7289. this.$ = [$$[$0-2], $$[$0]];
  7290. break;
  7291. case 30:
  7292. this.$ = $$[$0];
  7293. break;
  7294. case 31:
  7295. this.$ = yy.PLACEMENT.LEFTOF;
  7296. break;
  7297. case 32:
  7298. this.$ = yy.PLACEMENT.RIGHTOF;
  7299. break;
  7300. case 33:
  7301. this.$ = [$$[$0-4],$$[$0-1],{type: 'addMessage', from:$$[$0-4].actor, to:$$[$0-1].actor, signalType:$$[$0-3], msg:$$[$0]},
  7302. {type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0-1]}
  7303. ]
  7304. break;
  7305. case 34:
  7306. this.$ = [$$[$0-4],$$[$0-1],{type: 'addMessage', from:$$[$0-4].actor, to:$$[$0-1].actor, signalType:$$[$0-3], msg:$$[$0]},
  7307. {type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0-4]}
  7308. ]
  7309. break;
  7310. case 35:
  7311. this.$ = [$$[$0-3],$$[$0-1],{type: 'addMessage', from:$$[$0-3].actor, to:$$[$0-1].actor, signalType:$$[$0-2], msg:$$[$0]}]
  7312. break;
  7313. case 36:
  7314. this.$={type: 'addActor', actor:$$[$0]}
  7315. break;
  7316. case 37:
  7317. this.$ = yy.LINETYPE.SOLID_OPEN;
  7318. break;
  7319. case 38:
  7320. this.$ = yy.LINETYPE.DOTTED_OPEN;
  7321. break;
  7322. case 39:
  7323. this.$ = yy.LINETYPE.SOLID;
  7324. break;
  7325. case 40:
  7326. this.$ = yy.LINETYPE.DOTTED;
  7327. break;
  7328. case 41:
  7329. this.$ = yy.LINETYPE.SOLID_CROSS;
  7330. break;
  7331. case 42:
  7332. this.$ = yy.LINETYPE.DOTTED_CROSS;
  7333. break;
  7334. case 43:
  7335. this.$ = $$[$0].substring(1).trim().replace(/\\n/gm, "\n");
  7336. break;
  7337. }
  7338. },
  7339. table: [{3:1,4:$V0,5:$V1,6:$V2},{1:[3]},{3:5,4:$V0,5:$V1,6:$V2},{3:6,4:$V0,5:$V1,6:$V2},o([1,4,5,10,15,16,18,20,22,23,24,26,30,41],$V3,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:$V4,5:$V5,8:8,9:10,10:$V6,11:23,14:13,15:$V7,16:$V8,17:16,18:$V9,20:$Va,22:$Vb,23:$Vc,24:$Vd,26:$Ve,30:$Vf,41:$Vg},o($Vh,[2,5]),{9:26,10:$V6,11:23,14:13,15:$V7,16:$V8,17:16,18:$V9,20:$Va,22:$Vb,23:$Vc,24:$Vd,26:$Ve,30:$Vf,41:$Vg},o($Vh,[2,7]),o($Vh,[2,8]),{11:27,41:$Vg},{5:[1,28]},{11:29,41:$Vg},{11:30,41:$Vg},{5:[1,31]},{19:32,48:$Vi},{13:[1,34]},{13:[1,35]},{13:[1,36]},{13:[1,37]},{13:[1,38]},{38:39,42:[1,40],43:[1,41],44:[1,42],45:[1,43],46:[1,44],47:[1,45]},{31:46,32:[1,47],36:[1,48],37:[1,49]},o([5,12,35,42,43,44,45,46,47,48],[2,36]),o($Vh,[2,6]),{5:[1,51],12:[1,50]},o($Vh,[2,11]),{5:[1,52]},{5:[1,53]},o($Vh,[2,14]),{5:[1,54]},{5:[2,43]},o($Vj,$V3,{7:55}),o($Vj,$V3,{7:56}),o($Vj,$V3,{7:57}),o($Vk,$V3,{25:58,7:59}),o($Vl,$V3,{27:60,7:61}),{11:64,39:[1,62],40:[1,63],41:$Vg},o($Vm,[2,37]),o($Vm,[2,38]),o($Vm,[2,39]),o($Vm,[2,40]),o($Vm,[2,41]),o($Vm,[2,42]),{11:65,41:$Vg},{11:67,33:66,41:$Vg},{41:[2,31]},{41:[2,32]},{13:[1,68]},o($Vh,[2,10]),o($Vh,[2,12]),o($Vh,[2,13]),o($Vh,[2,15]),{4:$V4,5:$V5,8:8,9:10,10:$V6,11:23,14:13,15:$V7,16:$V8,17:16,18:$V9,20:$Va,21:[1,69],22:$Vb,23:$Vc,24:$Vd,26:$Ve,30:$Vf,41:$Vg},{4:$V4,5:$V5,8:8,9:10,10:$V6,11:23,14:13,15:$V7,16:$V8,17:16,18:$V9,20:$Va,21:[1,70],22:$Vb,23:$Vc,24:$Vd,26:$Ve,30:$Vf,41:$Vg},{4:$V4,5:$V5,8:8,9:10,10:$V6,11:23,14:13,15:$V7,16:$V8,17:16,18:$V9,20:$Va,21:[1,71],22:$Vb,23:$Vc,24:$Vd,26:$Ve,30:$Vf,41:$Vg},{21:[1,72]},{4:$V4,5:$V5,8:8,9:10,10:$V6,11:23,14:13,15:$V7,16:$V8,17:16,18:$V9,20:$Va,21:[2,23],22:$Vb,23:$Vc,24:$Vd,26:$Ve,29:[1,73],30:$Vf,41:$Vg},{21:[1,74]},{4:$V4,5:$V5,8:8,9:10,10:$V6,11:23,14:13,15:$V7,16:$V8,17:16,18:$V9,20:$Va,21:[2,21],22:$Vb,23:$Vc,24:$Vd,26:$Ve,28:[1,75],30:$Vf,41:$Vg},{11:76,41:$Vg},{11:77,41:$Vg},{19:78,48:$Vi},{19:79,48:$Vi},{19:80,48:$Vi},{35:[1,81],48:[2,30]},{5:[1,82]},o($Vh,[2,16]),o($Vh,[2,17]),o($Vh,[2,18]),o($Vh,[2,19]),{13:[1,83]},o($Vh,[2,20]),{13:[1,84]},{19:85,48:$Vi},{19:86,48:$Vi},{5:[2,35]},{5:[2,25]},{5:[2,26]},{11:87,41:$Vg},o($Vh,[2,9]),o($Vk,$V3,{7:59,25:88}),o($Vl,$V3,{7:61,27:89}),{5:[2,33]},{5:[2,34]},{48:[2,29]},{21:[2,24]},{21:[2,22]}],
  7340. defaultActions: {5:[2,1],6:[2,2],33:[2,43],48:[2,31],49:[2,32],78:[2,35],79:[2,25],80:[2,26],85:[2,33],86:[2,34],87:[2,29],88:[2,24],89:[2,22]},
  7341. parseError: function parseError (str, hash) {
  7342. if (hash.recoverable) {
  7343. this.trace(str);
  7344. } else {
  7345. var error = new Error(str);
  7346. error.hash = hash;
  7347. throw error;
  7348. }
  7349. },
  7350. parse: function parse(input) {
  7351. var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
  7352. var args = lstack.slice.call(arguments, 1);
  7353. var lexer = Object.create(this.lexer);
  7354. var sharedState = { yy: {} };
  7355. for (var k in this.yy) {
  7356. if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
  7357. sharedState.yy[k] = this.yy[k];
  7358. }
  7359. }
  7360. lexer.setInput(input, sharedState.yy);
  7361. sharedState.yy.lexer = lexer;
  7362. sharedState.yy.parser = this;
  7363. if (typeof lexer.yylloc == 'undefined') {
  7364. lexer.yylloc = {};
  7365. }
  7366. var yyloc = lexer.yylloc;
  7367. lstack.push(yyloc);
  7368. var ranges = lexer.options && lexer.options.ranges;
  7369. if (typeof sharedState.yy.parseError === 'function') {
  7370. this.parseError = sharedState.yy.parseError;
  7371. } else {
  7372. this.parseError = Object.getPrototypeOf(this).parseError;
  7373. }
  7374. function popStack(n) {
  7375. stack.length = stack.length - 2 * n;
  7376. vstack.length = vstack.length - n;
  7377. lstack.length = lstack.length - n;
  7378. }
  7379. function lex() {
  7380. var token;
  7381. token = tstack.pop() || lexer.lex() || EOF;
  7382. if (typeof token !== 'number') {
  7383. if (token instanceof Array) {
  7384. tstack = token;
  7385. token = tstack.pop();
  7386. }
  7387. token = self.symbols_[token] || token;
  7388. }
  7389. return token;
  7390. }
  7391. var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
  7392. while (true) {
  7393. state = stack[stack.length - 1];
  7394. if (this.defaultActions[state]) {
  7395. action = this.defaultActions[state];
  7396. } else {
  7397. if (symbol === null || typeof symbol == 'undefined') {
  7398. symbol = lex();
  7399. }
  7400. action = table[state] && table[state][symbol];
  7401. }
  7402. if (typeof action === 'undefined' || !action.length || !action[0]) {
  7403. var errStr = '';
  7404. expected = [];
  7405. for (p in table[state]) {
  7406. if (this.terminals_[p] && p > TERROR) {
  7407. expected.push('\'' + this.terminals_[p] + '\'');
  7408. }
  7409. }
  7410. if (lexer.showPosition) {
  7411. errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
  7412. } else {
  7413. errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
  7414. }
  7415. this.parseError(errStr, {
  7416. text: lexer.match,
  7417. token: this.terminals_[symbol] || symbol,
  7418. line: lexer.yylineno,
  7419. loc: yyloc,
  7420. expected: expected
  7421. });
  7422. }
  7423. if (action[0] instanceof Array && action.length > 1) {
  7424. throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
  7425. }
  7426. switch (action[0]) {
  7427. case 1:
  7428. stack.push(symbol);
  7429. vstack.push(lexer.yytext);
  7430. lstack.push(lexer.yylloc);
  7431. stack.push(action[1]);
  7432. symbol = null;
  7433. if (!preErrorSymbol) {
  7434. yyleng = lexer.yyleng;
  7435. yytext = lexer.yytext;
  7436. yylineno = lexer.yylineno;
  7437. yyloc = lexer.yylloc;
  7438. if (recovering > 0) {
  7439. recovering--;
  7440. }
  7441. } else {
  7442. symbol = preErrorSymbol;
  7443. preErrorSymbol = null;
  7444. }
  7445. break;
  7446. case 2:
  7447. len = this.productions_[action[1]][1];
  7448. yyval.$ = vstack[vstack.length - len];
  7449. yyval._$ = {
  7450. first_line: lstack[lstack.length - (len || 1)].first_line,
  7451. last_line: lstack[lstack.length - 1].last_line,
  7452. first_column: lstack[lstack.length - (len || 1)].first_column,
  7453. last_column: lstack[lstack.length - 1].last_column
  7454. };
  7455. if (ranges) {
  7456. yyval._$.range = [
  7457. lstack[lstack.length - (len || 1)].range[0],
  7458. lstack[lstack.length - 1].range[1]
  7459. ];
  7460. }
  7461. r = this.performAction.apply(yyval, [
  7462. yytext,
  7463. yyleng,
  7464. yylineno,
  7465. sharedState.yy,
  7466. action[1],
  7467. vstack,
  7468. lstack
  7469. ].concat(args));
  7470. if (typeof r !== 'undefined') {
  7471. return r;
  7472. }
  7473. if (len) {
  7474. stack = stack.slice(0, -1 * len * 2);
  7475. vstack = vstack.slice(0, -1 * len);
  7476. lstack = lstack.slice(0, -1 * len);
  7477. }
  7478. stack.push(this.productions_[action[1]][0]);
  7479. vstack.push(yyval.$);
  7480. lstack.push(yyval._$);
  7481. newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
  7482. stack.push(newState);
  7483. break;
  7484. case 3:
  7485. return true;
  7486. }
  7487. }
  7488. return true;
  7489. }};
  7490. /* generated by jison-lex 0.3.4 */
  7491. var lexer = (function(){
  7492. var lexer = ({
  7493. EOF:1,
  7494. parseError:function parseError(str, hash) {
  7495. if (this.yy.parser) {
  7496. this.yy.parser.parseError(str, hash);
  7497. } else {
  7498. throw new Error(str);
  7499. }
  7500. },
  7501. // resets the lexer, sets new input
  7502. setInput:function (input, yy) {
  7503. this.yy = yy || this.yy || {};
  7504. this._input = input;
  7505. this._more = this._backtrack = this.done = false;
  7506. this.yylineno = this.yyleng = 0;
  7507. this.yytext = this.matched = this.match = '';
  7508. this.conditionStack = ['INITIAL'];
  7509. this.yylloc = {
  7510. first_line: 1,
  7511. first_column: 0,
  7512. last_line: 1,
  7513. last_column: 0
  7514. };
  7515. if (this.options.ranges) {
  7516. this.yylloc.range = [0,0];
  7517. }
  7518. this.offset = 0;
  7519. return this;
  7520. },
  7521. // consumes and returns one char from the input
  7522. input:function () {
  7523. var ch = this._input[0];
  7524. this.yytext += ch;
  7525. this.yyleng++;
  7526. this.offset++;
  7527. this.match += ch;
  7528. this.matched += ch;
  7529. var lines = ch.match(/(?:\r\n?|\n).*/g);
  7530. if (lines) {
  7531. this.yylineno++;
  7532. this.yylloc.last_line++;
  7533. } else {
  7534. this.yylloc.last_column++;
  7535. }
  7536. if (this.options.ranges) {
  7537. this.yylloc.range[1]++;
  7538. }
  7539. this._input = this._input.slice(1);
  7540. return ch;
  7541. },
  7542. // unshifts one char (or a string) into the input
  7543. unput:function (ch) {
  7544. var len = ch.length;
  7545. var lines = ch.split(/(?:\r\n?|\n)/g);
  7546. this._input = ch + this._input;
  7547. this.yytext = this.yytext.substr(0, this.yytext.length - len);
  7548. //this.yyleng -= len;
  7549. this.offset -= len;
  7550. var oldLines = this.match.split(/(?:\r\n?|\n)/g);
  7551. this.match = this.match.substr(0, this.match.length - 1);
  7552. this.matched = this.matched.substr(0, this.matched.length - 1);
  7553. if (lines.length - 1) {
  7554. this.yylineno -= lines.length - 1;
  7555. }
  7556. var r = this.yylloc.range;
  7557. this.yylloc = {
  7558. first_line: this.yylloc.first_line,
  7559. last_line: this.yylineno + 1,
  7560. first_column: this.yylloc.first_column,
  7561. last_column: lines ?
  7562. (lines.length === oldLines.length ? this.yylloc.first_column : 0)
  7563. + oldLines[oldLines.length - lines.length].length - lines[0].length :
  7564. this.yylloc.first_column - len
  7565. };
  7566. if (this.options.ranges) {
  7567. this.yylloc.range = [r[0], r[0] + this.yyleng - len];
  7568. }
  7569. this.yyleng = this.yytext.length;
  7570. return this;
  7571. },
  7572. // When called from action, caches matched text and appends it on next action
  7573. more:function () {
  7574. this._more = true;
  7575. return this;
  7576. },
  7577. // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
  7578. reject:function () {
  7579. if (this.options.backtrack_lexer) {
  7580. this._backtrack = true;
  7581. } else {
  7582. 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).\n' + this.showPosition(), {
  7583. text: "",
  7584. token: null,
  7585. line: this.yylineno
  7586. });
  7587. }
  7588. return this;
  7589. },
  7590. // retain first n characters of the match
  7591. less:function (n) {
  7592. this.unput(this.match.slice(n));
  7593. },
  7594. // displays already matched input, i.e. for error messages
  7595. pastInput:function () {
  7596. var past = this.matched.substr(0, this.matched.length - this.match.length);
  7597. return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
  7598. },
  7599. // displays upcoming input, i.e. for error messages
  7600. upcomingInput:function () {
  7601. var next = this.match;
  7602. if (next.length < 20) {
  7603. next += this._input.substr(0, 20-next.length);
  7604. }
  7605. return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
  7606. },
  7607. // displays the character position where the lexing error occurred, i.e. for error messages
  7608. showPosition:function () {
  7609. var pre = this.pastInput();
  7610. var c = new Array(pre.length + 1).join("-");
  7611. return pre + this.upcomingInput() + "\n" + c + "^";
  7612. },
  7613. // test the lexed token: return FALSE when not a match, otherwise return token
  7614. test_match:function(match, indexed_rule) {
  7615. var token,
  7616. lines,
  7617. backup;
  7618. if (this.options.backtrack_lexer) {
  7619. // save context
  7620. backup = {
  7621. yylineno: this.yylineno,
  7622. yylloc: {
  7623. first_line: this.yylloc.first_line,
  7624. last_line: this.last_line,
  7625. first_column: this.yylloc.first_column,
  7626. last_column: this.yylloc.last_column
  7627. },
  7628. yytext: this.yytext,
  7629. match: this.match,
  7630. matches: this.matches,
  7631. matched: this.matched,
  7632. yyleng: this.yyleng,
  7633. offset: this.offset,
  7634. _more: this._more,
  7635. _input: this._input,
  7636. yy: this.yy,
  7637. conditionStack: this.conditionStack.slice(0),
  7638. done: this.done
  7639. };
  7640. if (this.options.ranges) {
  7641. backup.yylloc.range = this.yylloc.range.slice(0);
  7642. }
  7643. }
  7644. lines = match[0].match(/(?:\r\n?|\n).*/g);
  7645. if (lines) {
  7646. this.yylineno += lines.length;
  7647. }
  7648. this.yylloc = {
  7649. first_line: this.yylloc.last_line,
  7650. last_line: this.yylineno + 1,
  7651. first_column: this.yylloc.last_column,
  7652. last_column: lines ?
  7653. lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
  7654. this.yylloc.last_column + match[0].length
  7655. };
  7656. this.yytext += match[0];
  7657. this.match += match[0];
  7658. this.matches = match;
  7659. this.yyleng = this.yytext.length;
  7660. if (this.options.ranges) {
  7661. this.yylloc.range = [this.offset, this.offset += this.yyleng];
  7662. }
  7663. this._more = false;
  7664. this._backtrack = false;
  7665. this._input = this._input.slice(match[0].length);
  7666. this.matched += match[0];
  7667. token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
  7668. if (this.done && this._input) {
  7669. this.done = false;
  7670. }
  7671. if (token) {
  7672. return token;
  7673. } else if (this._backtrack) {
  7674. // recover context
  7675. for (var k in backup) {
  7676. this[k] = backup[k];
  7677. }
  7678. return false; // rule action called reject() implying the next rule should be tested instead.
  7679. }
  7680. return false;
  7681. },
  7682. // return next match in input
  7683. next:function () {
  7684. if (this.done) {
  7685. return this.EOF;
  7686. }
  7687. if (!this._input) {
  7688. this.done = true;
  7689. }
  7690. var token,
  7691. match,
  7692. tempMatch,
  7693. index;
  7694. if (!this._more) {
  7695. this.yytext = '';
  7696. this.match = '';
  7697. }
  7698. var rules = this._currentRules();
  7699. for (var i = 0; i < rules.length; i++) {
  7700. tempMatch = this._input.match(this.rules[rules[i]]);
  7701. if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
  7702. match = tempMatch;
  7703. index = i;
  7704. if (this.options.backtrack_lexer) {
  7705. token = this.test_match(tempMatch, rules[i]);
  7706. if (token !== false) {
  7707. return token;
  7708. } else if (this._backtrack) {
  7709. match = false;
  7710. continue; // rule action called reject() implying a rule MISmatch.
  7711. } else {
  7712. // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
  7713. return false;
  7714. }
  7715. } else if (!this.options.flex) {
  7716. break;
  7717. }
  7718. }
  7719. }
  7720. if (match) {
  7721. token = this.test_match(match, rules[index]);
  7722. if (token !== false) {
  7723. return token;
  7724. }
  7725. // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
  7726. return false;
  7727. }
  7728. if (this._input === "") {
  7729. return this.EOF;
  7730. } else {
  7731. return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
  7732. text: "",
  7733. token: null,
  7734. line: this.yylineno
  7735. });
  7736. }
  7737. },
  7738. // return next match that has a token
  7739. lex:function lex () {
  7740. var r = this.next();
  7741. if (r) {
  7742. return r;
  7743. } else {
  7744. return this.lex();
  7745. }
  7746. },
  7747. // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
  7748. begin:function begin (condition) {
  7749. this.conditionStack.push(condition);
  7750. },
  7751. // pop the previously active lexer condition state off the condition stack
  7752. popState:function popState () {
  7753. var n = this.conditionStack.length - 1;
  7754. if (n > 0) {
  7755. return this.conditionStack.pop();
  7756. } else {
  7757. return this.conditionStack[0];
  7758. }
  7759. },
  7760. // produce the lexer rule set which is active for the currently active lexer condition state
  7761. _currentRules:function _currentRules () {
  7762. if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
  7763. return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
  7764. } else {
  7765. return this.conditions["INITIAL"].rules;
  7766. }
  7767. },
  7768. // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
  7769. topState:function topState (n) {
  7770. n = this.conditionStack.length - 1 - Math.abs(n || 0);
  7771. if (n >= 0) {
  7772. return this.conditionStack[n];
  7773. } else {
  7774. return "INITIAL";
  7775. }
  7776. },
  7777. // alias for begin(condition)
  7778. pushState:function pushState (condition) {
  7779. this.begin(condition);
  7780. },
  7781. // return the number of states currently on the stack
  7782. stateStackSize:function stateStackSize() {
  7783. return this.conditionStack.length;
  7784. },
  7785. options: {"case-insensitive":true},
  7786. performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
  7787. var YYSTATE=YY_START;
  7788. switch($avoiding_name_collisions) {
  7789. case 0:return 5;
  7790. break;
  7791. case 1:/* skip all whitespace */
  7792. break;
  7793. case 2:/* skip same-line whitespace */
  7794. break;
  7795. case 3:/* skip comments */
  7796. break;
  7797. case 4:/* skip comments */
  7798. break;
  7799. case 5: this.begin('ID'); return 10;
  7800. break;
  7801. case 6: yy_.yytext = yy_.yytext.trim(); this.begin('ALIAS'); return 41;
  7802. break;
  7803. case 7: this.popState(); this.popState(); this.begin('LINE'); return 12;
  7804. break;
  7805. case 8: this.popState(); this.popState(); return 5;
  7806. break;
  7807. case 9: this.begin('LINE'); return 20;
  7808. break;
  7809. case 10: this.begin('LINE'); return 22;
  7810. break;
  7811. case 11: this.begin('LINE'); return 23;
  7812. break;
  7813. case 12: this.begin('LINE'); return 24;
  7814. break;
  7815. case 13: this.begin('LINE'); return 29;
  7816. break;
  7817. case 14: this.begin('LINE'); return 26;
  7818. break;
  7819. case 15: this.begin('LINE'); return 28;
  7820. break;
  7821. case 16: this.popState(); return 13;
  7822. break;
  7823. case 17:return 21;
  7824. break;
  7825. case 18:return 36;
  7826. break;
  7827. case 19:return 37;
  7828. break;
  7829. case 20:return 32;
  7830. break;
  7831. case 21:return 30;
  7832. break;
  7833. case 22: this.begin('ID'); return 15;
  7834. break;
  7835. case 23: this.begin('ID'); return 16;
  7836. break;
  7837. case 24:return 18;
  7838. break;
  7839. case 25:return 6;
  7840. break;
  7841. case 26:return 35;
  7842. break;
  7843. case 27:return 5;
  7844. break;
  7845. case 28: yy_.yytext = yy_.yytext.trim(); return 41;
  7846. break;
  7847. case 29:return 44;
  7848. break;
  7849. case 30:return 45;
  7850. break;
  7851. case 31:return 42;
  7852. break;
  7853. case 32:return 43;
  7854. break;
  7855. case 33:return 46;
  7856. break;
  7857. case 34:return 47;
  7858. break;
  7859. case 35:return 48;
  7860. break;
  7861. case 36:return 39;
  7862. break;
  7863. case 37:return 40;
  7864. break;
  7865. case 38:return 5;
  7866. break;
  7867. case 39:return 'INVALID';
  7868. break;
  7869. }
  7870. },
  7871. rules: [/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:participant\b)/i,/^(?:[^\->:\n,;]+?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?::[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],
  7872. conditions: {"LINE":{"rules":[2,3,16],"inclusive":false},"ALIAS":{"rules":[2,3,7,8],"inclusive":false},"ID":{"rules":[2,3,6],"inclusive":false},"INITIAL":{"rules":[0,1,3,4,5,9,10,11,12,13,14,15,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39],"inclusive":true}}
  7873. });
  7874. return lexer;
  7875. })();
  7876. parser.lexer = lexer;
  7877. function Parser () {
  7878. this.yy = {};
  7879. }
  7880. Parser.prototype = parser;parser.Parser = Parser;
  7881. return new Parser;
  7882. })();
  7883. if (true) {
  7884. exports.parser = parser;
  7885. exports.Parser = parser.Parser;
  7886. exports.parse = function () { return parser.parse.apply(parser, arguments); };
  7887. exports.main = function commonjsMain (args) {
  7888. if (!args[1]) {
  7889. console.log('Usage: '+args[0]+' FILE');
  7890. process.exit(1);
  7891. }
  7892. var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
  7893. return exports.parser.parse(source);
  7894. };
  7895. if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
  7896. exports.main(process.argv.slice(1));
  7897. }
  7898. }
  7899. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
  7900. /***/ }),
  7901. /***/ "./src/diagrams/sequence/sequenceDb.js":
  7902. /*!*********************************************!*\
  7903. !*** ./src/diagrams/sequence/sequenceDb.js ***!
  7904. \*********************************************/
  7905. /*! exports provided: addActor, addMessage, addSignal, getMessages, getActors, getActor, getActorKeys, getTitle, clear, LINETYPE, ARROWTYPE, PLACEMENT, addNote, setTitle, apply, default */
  7906. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  7907. "use strict";
  7908. __webpack_require__.r(__webpack_exports__);
  7909. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addActor", function() { return addActor; });
  7910. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addMessage", function() { return addMessage; });
  7911. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addSignal", function() { return addSignal; });
  7912. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMessages", function() { return getMessages; });
  7913. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActors", function() { return getActors; });
  7914. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActor", function() { return getActor; });
  7915. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActorKeys", function() { return getActorKeys; });
  7916. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTitle", function() { return getTitle; });
  7917. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
  7918. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LINETYPE", function() { return LINETYPE; });
  7919. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARROWTYPE", function() { return ARROWTYPE; });
  7920. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PLACEMENT", function() { return PLACEMENT; });
  7921. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addNote", function() { return addNote; });
  7922. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTitle", function() { return setTitle; });
  7923. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apply", function() { return apply; });
  7924. /* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
  7925. let actors = {};
  7926. let messages = [];
  7927. const notes = [];
  7928. let title = '';
  7929. const addActor = function (id, name, description) {
  7930. // Don't allow description nulling
  7931. const old = actors[id];
  7932. if (old && name === old.name && description == null) return; // Don't allow null descriptions, either
  7933. if (description == null) description = name;
  7934. actors[id] = {
  7935. name: name,
  7936. description: description
  7937. };
  7938. };
  7939. const addMessage = function (idFrom, idTo, message, answer) {
  7940. messages.push({
  7941. from: idFrom,
  7942. to: idTo,
  7943. message: message,
  7944. answer: answer
  7945. });
  7946. };
  7947. const addSignal = function (idFrom, idTo, message, messageType) {
  7948. _logger__WEBPACK_IMPORTED_MODULE_0__["logger"].debug('Adding message from=' + idFrom + ' to=' + idTo + ' message=' + message + ' type=' + messageType);
  7949. messages.push({
  7950. from: idFrom,
  7951. to: idTo,
  7952. message: message,
  7953. type: messageType
  7954. });
  7955. };
  7956. const getMessages = function () {
  7957. return messages;
  7958. };
  7959. const getActors = function () {
  7960. return actors;
  7961. };
  7962. const getActor = function (id) {
  7963. return actors[id];
  7964. };
  7965. const getActorKeys = function () {
  7966. return Object.keys(actors);
  7967. };
  7968. const getTitle = function () {
  7969. return title;
  7970. };
  7971. const clear = function () {
  7972. actors = {};
  7973. messages = [];
  7974. };
  7975. const LINETYPE = {
  7976. SOLID: 0,
  7977. DOTTED: 1,
  7978. NOTE: 2,
  7979. SOLID_CROSS: 3,
  7980. DOTTED_CROSS: 4,
  7981. SOLID_OPEN: 5,
  7982. DOTTED_OPEN: 6,
  7983. LOOP_START: 10,
  7984. LOOP_END: 11,
  7985. ALT_START: 12,
  7986. ALT_ELSE: 13,
  7987. ALT_END: 14,
  7988. OPT_START: 15,
  7989. OPT_END: 16,
  7990. ACTIVE_START: 17,
  7991. ACTIVE_END: 18,
  7992. PAR_START: 19,
  7993. PAR_AND: 20,
  7994. PAR_END: 21,
  7995. RECT_START: 22,
  7996. RECT_END: 23
  7997. };
  7998. const ARROWTYPE = {
  7999. FILLED: 0,
  8000. OPEN: 1
  8001. };
  8002. const PLACEMENT = {
  8003. LEFTOF: 0,
  8004. RIGHTOF: 1,
  8005. OVER: 2
  8006. };
  8007. const addNote = function (actor, placement, message) {
  8008. const note = {
  8009. actor: actor,
  8010. placement: placement,
  8011. message: message // Coerce actor into a [to, from, ...] array
  8012. };
  8013. const actors = [].concat(actor, actor);
  8014. notes.push(note);
  8015. messages.push({
  8016. from: actors[0],
  8017. to: actors[1],
  8018. message: message,
  8019. type: LINETYPE.NOTE,
  8020. placement: placement
  8021. });
  8022. };
  8023. const setTitle = function (titleText) {
  8024. title = titleText;
  8025. };
  8026. const apply = function (param) {
  8027. if (param instanceof Array) {
  8028. param.forEach(function (item) {
  8029. apply(item);
  8030. });
  8031. } else {
  8032. switch (param.type) {
  8033. case 'addActor':
  8034. addActor(param.actor, param.actor, param.description);
  8035. break;
  8036. case 'activeStart':
  8037. addSignal(param.actor, undefined, undefined, param.signalType);
  8038. break;
  8039. case 'activeEnd':
  8040. addSignal(param.actor, undefined, undefined, param.signalType);
  8041. break;
  8042. case 'addNote':
  8043. addNote(param.actor, param.placement, param.text);
  8044. break;
  8045. case 'addMessage':
  8046. addSignal(param.from, param.to, param.msg, param.signalType);
  8047. break;
  8048. case 'loopStart':
  8049. addSignal(undefined, undefined, param.loopText, param.signalType);
  8050. break;
  8051. case 'loopEnd':
  8052. addSignal(undefined, undefined, undefined, param.signalType);
  8053. break;
  8054. case 'rectStart':
  8055. addSignal(undefined, undefined, param.color, param.signalType);
  8056. break;
  8057. case 'rectEnd':
  8058. addSignal(undefined, undefined, undefined, param.signalType);
  8059. break;
  8060. case 'optStart':
  8061. addSignal(undefined, undefined, param.optText, param.signalType);
  8062. break;
  8063. case 'optEnd':
  8064. addSignal(undefined, undefined, undefined, param.signalType);
  8065. break;
  8066. case 'altStart':
  8067. addSignal(undefined, undefined, param.altText, param.signalType);
  8068. break;
  8069. case 'else':
  8070. addSignal(undefined, undefined, param.altText, param.signalType);
  8071. break;
  8072. case 'altEnd':
  8073. addSignal(undefined, undefined, undefined, param.signalType);
  8074. break;
  8075. case 'setTitle':
  8076. setTitle(param.text);
  8077. break;
  8078. case 'parStart':
  8079. addSignal(undefined, undefined, param.parText, param.signalType);
  8080. break;
  8081. case 'and':
  8082. addSignal(undefined, undefined, param.parText, param.signalType);
  8083. break;
  8084. case 'parEnd':
  8085. addSignal(undefined, undefined, undefined, param.signalType);
  8086. break;
  8087. }
  8088. }
  8089. };
  8090. /* harmony default export */ __webpack_exports__["default"] = ({
  8091. addActor,
  8092. addMessage,
  8093. addSignal,
  8094. getMessages,
  8095. getActors,
  8096. getActor,
  8097. getActorKeys,
  8098. getTitle,
  8099. clear,
  8100. LINETYPE,
  8101. ARROWTYPE,
  8102. PLACEMENT,
  8103. addNote,
  8104. setTitle,
  8105. apply
  8106. });
  8107. /***/ }),
  8108. /***/ "./src/diagrams/sequence/sequenceRenderer.js":
  8109. /*!***************************************************!*\
  8110. !*** ./src/diagrams/sequence/sequenceRenderer.js ***!
  8111. \***************************************************/
  8112. /*! exports provided: bounds, drawActors, setConf, draw, default */
  8113. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8114. "use strict";
  8115. __webpack_require__.r(__webpack_exports__);
  8116. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounds", function() { return bounds; });
  8117. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawActors", function() { return drawActors; });
  8118. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
  8119. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
  8120. /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
  8121. /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
  8122. /* harmony import */ var _svgDraw__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./svgDraw */ "./src/diagrams/sequence/svgDraw.js");
  8123. /* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
  8124. /* harmony import */ var _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/sequenceDiagram */ "./src/diagrams/sequence/parser/sequenceDiagram.jison");
  8125. /* harmony import */ var _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__);
  8126. /* harmony import */ var _sequenceDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sequenceDb */ "./src/diagrams/sequence/sequenceDb.js");
  8127. _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy = _sequenceDb__WEBPACK_IMPORTED_MODULE_4__["default"];
  8128. const conf = {
  8129. diagramMarginX: 50,
  8130. diagramMarginY: 30,
  8131. // Margin between actors
  8132. actorMargin: 50,
  8133. // Width of actor boxes
  8134. width: 150,
  8135. // Height of actor boxes
  8136. height: 65,
  8137. actorFontSize: 14,
  8138. actorFontFamily: '"Open-Sans", "sans-serif"',
  8139. // Margin around loop boxes
  8140. boxMargin: 10,
  8141. boxTextMargin: 5,
  8142. noteMargin: 10,
  8143. // Space between messages
  8144. messageMargin: 35,
  8145. // mirror actors under diagram
  8146. mirrorActors: false,
  8147. // Depending on css styling this might need adjustment
  8148. // Prolongs the edge of the diagram downwards
  8149. bottomMarginAdj: 1,
  8150. // width of activation box
  8151. activationWidth: 10,
  8152. // text placement as: tspan | fo | old only text as before
  8153. textPlacement: 'tspan',
  8154. showSequenceNumbers: false
  8155. };
  8156. const bounds = {
  8157. data: {
  8158. startx: undefined,
  8159. stopx: undefined,
  8160. starty: undefined,
  8161. stopy: undefined
  8162. },
  8163. verticalPos: 0,
  8164. sequenceItems: [],
  8165. activations: [],
  8166. init: function () {
  8167. this.sequenceItems = [];
  8168. this.activations = [];
  8169. this.data = {
  8170. startx: undefined,
  8171. stopx: undefined,
  8172. starty: undefined,
  8173. stopy: undefined
  8174. };
  8175. this.verticalPos = 0;
  8176. },
  8177. updateVal: function (obj, key, val, fun) {
  8178. if (typeof obj[key] === 'undefined') {
  8179. obj[key] = val;
  8180. } else {
  8181. obj[key] = fun(val, obj[key]);
  8182. }
  8183. },
  8184. updateBounds: function (startx, starty, stopx, stopy) {
  8185. const _self = this;
  8186. let cnt = 0;
  8187. function updateFn(type) {
  8188. return function updateItemBounds(item) {
  8189. cnt++; // The loop sequenceItems is a stack so the biggest margins in the beginning of the sequenceItems
  8190. const n = _self.sequenceItems.length - cnt + 1;
  8191. _self.updateVal(item, 'starty', starty - n * conf.boxMargin, Math.min);
  8192. _self.updateVal(item, 'stopy', stopy + n * conf.boxMargin, Math.max);
  8193. _self.updateVal(bounds.data, 'startx', startx - n * conf.boxMargin, Math.min);
  8194. _self.updateVal(bounds.data, 'stopx', stopx + n * conf.boxMargin, Math.max);
  8195. if (!(type === 'activation')) {
  8196. _self.updateVal(item, 'startx', startx - n * conf.boxMargin, Math.min);
  8197. _self.updateVal(item, 'stopx', stopx + n * conf.boxMargin, Math.max);
  8198. _self.updateVal(bounds.data, 'starty', starty - n * conf.boxMargin, Math.min);
  8199. _self.updateVal(bounds.data, 'stopy', stopy + n * conf.boxMargin, Math.max);
  8200. }
  8201. };
  8202. }
  8203. this.sequenceItems.forEach(updateFn());
  8204. this.activations.forEach(updateFn('activation'));
  8205. },
  8206. insert: function (startx, starty, stopx, stopy) {
  8207. const _startx = Math.min(startx, stopx);
  8208. const _stopx = Math.max(startx, stopx);
  8209. const _starty = Math.min(starty, stopy);
  8210. const _stopy = Math.max(starty, stopy);
  8211. this.updateVal(bounds.data, 'startx', _startx, Math.min);
  8212. this.updateVal(bounds.data, 'starty', _starty, Math.min);
  8213. this.updateVal(bounds.data, 'stopx', _stopx, Math.max);
  8214. this.updateVal(bounds.data, 'stopy', _stopy, Math.max);
  8215. this.updateBounds(_startx, _starty, _stopx, _stopy);
  8216. },
  8217. newActivation: function (message, diagram) {
  8218. const actorRect = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getActors()[message.from.actor];
  8219. const stackedSize = actorActivations(message.from.actor).length;
  8220. const x = actorRect.x + conf.width / 2 + (stackedSize - 1) * conf.activationWidth / 2;
  8221. this.activations.push({
  8222. startx: x,
  8223. starty: this.verticalPos + 2,
  8224. stopx: x + conf.activationWidth,
  8225. stopy: undefined,
  8226. actor: message.from.actor,
  8227. anchored: _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].anchorElement(diagram)
  8228. });
  8229. },
  8230. endActivation: function (message) {
  8231. // find most recent activation for given actor
  8232. const lastActorActivationIdx = this.activations.map(function (activation) {
  8233. return activation.actor;
  8234. }).lastIndexOf(message.from.actor);
  8235. const activation = this.activations.splice(lastActorActivationIdx, 1)[0];
  8236. return activation;
  8237. },
  8238. newLoop: function (title, fill) {
  8239. this.sequenceItems.push({
  8240. startx: undefined,
  8241. starty: this.verticalPos,
  8242. stopx: undefined,
  8243. stopy: undefined,
  8244. title: title,
  8245. fill: fill
  8246. });
  8247. },
  8248. endLoop: function () {
  8249. const loop = this.sequenceItems.pop();
  8250. return loop;
  8251. },
  8252. addSectionToLoop: function (message) {
  8253. const loop = this.sequenceItems.pop();
  8254. loop.sections = loop.sections || [];
  8255. loop.sectionTitles = loop.sectionTitles || [];
  8256. loop.sections.push(bounds.getVerticalPos());
  8257. loop.sectionTitles.push(message);
  8258. this.sequenceItems.push(loop);
  8259. },
  8260. bumpVerticalPos: function (bump) {
  8261. this.verticalPos = this.verticalPos + bump;
  8262. this.data.stopy = this.verticalPos;
  8263. },
  8264. getVerticalPos: function () {
  8265. return this.verticalPos;
  8266. },
  8267. getBounds: function () {
  8268. return this.data;
  8269. }
  8270. };
  8271. const _drawLongText = (text, x, y, g, width) => {
  8272. let textHeight = 0;
  8273. const lines = text.split(/<br\/?>/ig);
  8274. for (const line of lines) {
  8275. const textObj = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].getTextObj();
  8276. textObj.x = x;
  8277. textObj.y = y + textHeight;
  8278. textObj.textMargin = conf.noteMargin;
  8279. textObj.dy = '1em';
  8280. textObj.text = line;
  8281. textObj.class = 'noteText';
  8282. const textElem = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawText(g, textObj, width);
  8283. textHeight += (textElem._groups || textElem)[0][0].getBBox().height;
  8284. }
  8285. return textHeight;
  8286. };
  8287. /**
  8288. * Draws an actor in the diagram with the attaced line
  8289. * @param center - The center of the the actor
  8290. * @param pos The position if the actor in the liost of actors
  8291. * @param description The text in the box
  8292. */
  8293. const drawNote = function (elem, startx, verticalPos, msg, forceWidth) {
  8294. const rect = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].getNoteRect();
  8295. rect.x = startx;
  8296. rect.y = verticalPos;
  8297. rect.width = forceWidth || conf.width;
  8298. rect.class = 'note';
  8299. let g = elem.append('g');
  8300. const rectElem = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawRect(g, rect);
  8301. const textHeight = _drawLongText(msg.message, startx - 4, verticalPos + 24, g, rect.width - conf.noteMargin);
  8302. bounds.insert(startx, verticalPos, startx + rect.width, verticalPos + 2 * conf.noteMargin + textHeight);
  8303. rectElem.attr('height', textHeight + 2 * conf.noteMargin);
  8304. bounds.bumpVerticalPos(textHeight + 2 * conf.noteMargin);
  8305. };
  8306. /**
  8307. * Draws a message
  8308. * @param elem
  8309. * @param startx
  8310. * @param stopx
  8311. * @param verticalPos
  8312. * @param txtCenter
  8313. * @param msg
  8314. */
  8315. const drawMessage = function (elem, startx, stopx, verticalPos, msg, sequenceIndex) {
  8316. const g = elem.append('g');
  8317. const txtCenter = startx + (stopx - startx) / 2;
  8318. const textElem = g.append('text') // text label for the x axis
  8319. .attr('x', txtCenter).attr('y', verticalPos - 7).style('text-anchor', 'middle').attr('class', 'messageText').text(msg.message);
  8320. let textWidth = (textElem._groups || textElem)[0][0].getBBox().width;
  8321. let line;
  8322. if (startx === stopx) {
  8323. if (conf.rightAngles) {
  8324. line = g.append('path').attr('d', `M ${startx},${verticalPos} H ${startx + conf.width / 2} V ${verticalPos + 25} H ${startx}`);
  8325. } else {
  8326. line = g.append('path').attr('d', 'M ' + startx + ',' + verticalPos + ' C ' + (startx + 60) + ',' + (verticalPos - 10) + ' ' + (startx + 60) + ',' + (verticalPos + 30) + ' ' + startx + ',' + (verticalPos + 20));
  8327. }
  8328. bounds.bumpVerticalPos(30);
  8329. const dx = Math.max(textWidth / 2, 100);
  8330. bounds.insert(startx - dx, bounds.getVerticalPos() - 10, stopx + dx, bounds.getVerticalPos());
  8331. } else {
  8332. line = g.append('line');
  8333. line.attr('x1', startx);
  8334. line.attr('y1', verticalPos);
  8335. line.attr('x2', stopx);
  8336. line.attr('y2', verticalPos);
  8337. bounds.insert(startx, bounds.getVerticalPos() - 10, stopx, bounds.getVerticalPos());
  8338. } // Make an SVG Container
  8339. // Draw the line
  8340. if (msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED || msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_CROSS || msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_OPEN) {
  8341. line.style('stroke-dasharray', '3, 3');
  8342. line.attr('class', 'messageLine1');
  8343. } else {
  8344. line.attr('class', 'messageLine0');
  8345. }
  8346. let url = '';
  8347. if (conf.arrowMarkerAbsolute) {
  8348. url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;
  8349. url = url.replace(/\(/g, '\\(');
  8350. url = url.replace(/\)/g, '\\)');
  8351. }
  8352. line.attr('stroke-width', 2);
  8353. line.attr('stroke', 'black');
  8354. line.style('fill', 'none'); // remove any fill colour
  8355. if (msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID || msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED) {
  8356. line.attr('marker-end', 'url(' + url + '#arrowhead)');
  8357. }
  8358. if (msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_CROSS || msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_CROSS) {
  8359. line.attr('marker-end', 'url(' + url + '#crosshead)');
  8360. } // add node number
  8361. if (conf.showSequenceNumbers) {
  8362. line.attr('marker-start', 'url(' + url + '#sequencenumber)');
  8363. g.append('text').attr('x', startx).attr('y', verticalPos + 4).attr('font-family', 'sans-serif').attr('font-size', '12px').attr('text-anchor', 'middle').attr('textLength', '16px').attr('class', 'sequenceNumber').text(sequenceIndex);
  8364. }
  8365. };
  8366. const drawActors = function (diagram, actors, actorKeys, verticalPos) {
  8367. // Draw the actors
  8368. for (let i = 0; i < actorKeys.length; i++) {
  8369. const key = actorKeys[i]; // Add some rendering data to the object
  8370. actors[key].x = i * conf.actorMargin + i * conf.width;
  8371. actors[key].y = verticalPos;
  8372. actors[key].width = conf.diagramMarginX;
  8373. actors[key].height = conf.diagramMarginY; // Draw the box with the attached line
  8374. _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawActor(diagram, actors[key].x, verticalPos, actors[key].description, conf);
  8375. bounds.insert(actors[key].x, verticalPos, actors[key].x + conf.width, conf.height);
  8376. } // Add a margin between the actor boxes and the first arrow
  8377. bounds.bumpVerticalPos(conf.height);
  8378. };
  8379. const setConf = function (cnf) {
  8380. const keys = Object.keys(cnf);
  8381. keys.forEach(function (key) {
  8382. conf[key] = cnf[key];
  8383. });
  8384. };
  8385. const actorActivations = function (actor) {
  8386. return bounds.activations.filter(function (activation) {
  8387. return activation.actor === actor;
  8388. });
  8389. };
  8390. const actorFlowVerticaBounds = function (actor) {
  8391. // handle multiple stacked activations for same actor
  8392. const actors = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getActors();
  8393. const activations = actorActivations(actor);
  8394. const left = activations.reduce(function (acc, activation) {
  8395. return Math.min(acc, activation.startx);
  8396. }, actors[actor].x + conf.width / 2);
  8397. const right = activations.reduce(function (acc, activation) {
  8398. return Math.max(acc, activation.stopx);
  8399. }, actors[actor].x + conf.width / 2);
  8400. return [left, right];
  8401. };
  8402. /**
  8403. * Draws a flowchart in the tag with id: id based on the graph definition in text.
  8404. * @param text
  8405. * @param id
  8406. */
  8407. const draw = function (text, id) {
  8408. _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.clear();
  8409. _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].parse(text + '\n');
  8410. bounds.init();
  8411. const diagram = d3__WEBPACK_IMPORTED_MODULE_0__["select"](`[id="${id}"]`);
  8412. let startx;
  8413. let stopx;
  8414. let forceWidth; // Fetch data from the parsing
  8415. const actors = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getActors();
  8416. const actorKeys = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getActorKeys();
  8417. const messages = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getMessages();
  8418. const title = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getTitle();
  8419. drawActors(diagram, actors, actorKeys, 0); // The arrow head definition is attached to the svg once
  8420. _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].insertArrowHead(diagram);
  8421. _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].insertArrowCrossHead(diagram);
  8422. _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].insertSequenceNumber(diagram);
  8423. function activeEnd(msg, verticalPos) {
  8424. const activationData = bounds.endActivation(msg);
  8425. if (activationData.starty + 18 > verticalPos) {
  8426. activationData.starty = verticalPos - 6;
  8427. verticalPos += 12;
  8428. }
  8429. _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawActivation(diagram, activationData, verticalPos, conf, actorActivations(msg.from.actor).length);
  8430. bounds.insert(activationData.startx, verticalPos - 10, activationData.stopx, verticalPos);
  8431. } // const lastMsg
  8432. // Draw the messages/signals
  8433. let sequenceIndex = 1;
  8434. messages.forEach(function (msg) {
  8435. let loopData;
  8436. switch (msg.type) {
  8437. case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.NOTE:
  8438. bounds.bumpVerticalPos(conf.boxMargin);
  8439. startx = actors[msg.from].x;
  8440. stopx = actors[msg.to].x;
  8441. if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.PLACEMENT.RIGHTOF) {
  8442. drawNote(diagram, startx + (conf.width + conf.actorMargin) / 2, bounds.getVerticalPos(), msg);
  8443. } else if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.PLACEMENT.LEFTOF) {
  8444. drawNote(diagram, startx - (conf.width + conf.actorMargin) / 2, bounds.getVerticalPos(), msg);
  8445. } else if (msg.to === msg.from) {
  8446. // Single-actor over
  8447. drawNote(diagram, startx, bounds.getVerticalPos(), msg);
  8448. } else {
  8449. // Multi-actor over
  8450. forceWidth = Math.abs(startx - stopx) + conf.actorMargin;
  8451. drawNote(diagram, (startx + stopx + conf.width - forceWidth) / 2, bounds.getVerticalPos(), msg, forceWidth);
  8452. }
  8453. break;
  8454. case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ACTIVE_START:
  8455. bounds.newActivation(msg, diagram);
  8456. break;
  8457. case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ACTIVE_END:
  8458. activeEnd(msg, bounds.getVerticalPos());
  8459. break;
  8460. case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.LOOP_START:
  8461. bounds.bumpVerticalPos(conf.boxMargin);
  8462. bounds.newLoop(msg.message);
  8463. bounds.bumpVerticalPos(conf.boxMargin + conf.boxTextMargin);
  8464. break;
  8465. case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.LOOP_END:
  8466. loopData = bounds.endLoop();
  8467. _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopData, 'loop', conf);
  8468. bounds.bumpVerticalPos(conf.boxMargin);
  8469. break;
  8470. case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.RECT_START:
  8471. bounds.bumpVerticalPos(conf.boxMargin);
  8472. bounds.newLoop(undefined, msg.message);
  8473. bounds.bumpVerticalPos(conf.boxMargin);
  8474. break;
  8475. case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.RECT_END:
  8476. const rectData = bounds.endLoop();
  8477. _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawBackgroundRect(diagram, rectData);
  8478. bounds.bumpVerticalPos(conf.boxMargin);
  8479. break;
  8480. case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.OPT_START:
  8481. bounds.bumpVerticalPos(conf.boxMargin);
  8482. bounds.newLoop(msg.message);
  8483. bounds.bumpVerticalPos(conf.boxMargin + conf.boxTextMargin);
  8484. break;
  8485. case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.OPT_END:
  8486. loopData = bounds.endLoop();
  8487. _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopData, 'opt', conf);
  8488. bounds.bumpVerticalPos(conf.boxMargin);
  8489. break;
  8490. case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_START:
  8491. bounds.bumpVerticalPos(conf.boxMargin);
  8492. bounds.newLoop(msg.message);
  8493. bounds.bumpVerticalPos(conf.boxMargin + conf.boxTextMargin);
  8494. break;
  8495. case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_ELSE:
  8496. bounds.bumpVerticalPos(conf.boxMargin);
  8497. loopData = bounds.addSectionToLoop(msg.message);
  8498. bounds.bumpVerticalPos(conf.boxMargin);
  8499. break;
  8500. case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_END:
  8501. loopData = bounds.endLoop();
  8502. _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopData, 'alt', conf);
  8503. bounds.bumpVerticalPos(conf.boxMargin);
  8504. break;
  8505. case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_START:
  8506. bounds.bumpVerticalPos(conf.boxMargin);
  8507. bounds.newLoop(msg.message);
  8508. bounds.bumpVerticalPos(conf.boxMargin + conf.boxTextMargin);
  8509. break;
  8510. case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_AND:
  8511. bounds.bumpVerticalPos(conf.boxMargin);
  8512. loopData = bounds.addSectionToLoop(msg.message);
  8513. bounds.bumpVerticalPos(conf.boxMargin);
  8514. break;
  8515. case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_END:
  8516. loopData = bounds.endLoop();
  8517. _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopData, 'par', conf);
  8518. bounds.bumpVerticalPos(conf.boxMargin);
  8519. break;
  8520. default:
  8521. try {
  8522. // lastMsg = msg
  8523. bounds.bumpVerticalPos(conf.messageMargin);
  8524. const fromBounds = actorFlowVerticaBounds(msg.from);
  8525. const toBounds = actorFlowVerticaBounds(msg.to);
  8526. const fromIdx = fromBounds[0] <= toBounds[0] ? 1 : 0;
  8527. const toIdx = fromBounds[0] < toBounds[0] ? 0 : 1;
  8528. startx = fromBounds[fromIdx];
  8529. stopx = toBounds[toIdx];
  8530. const verticalPos = bounds.getVerticalPos();
  8531. drawMessage(diagram, startx, stopx, verticalPos, msg, sequenceIndex);
  8532. const allBounds = fromBounds.concat(toBounds);
  8533. bounds.insert(Math.min.apply(null, allBounds), verticalPos, Math.max.apply(null, allBounds), verticalPos);
  8534. } catch (e) {
  8535. _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].error('error while drawing message', e);
  8536. }
  8537. } // Increment sequence counter if msg.type is a line (and not another event like activation or note, etc)
  8538. if ([_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_OPEN, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_OPEN, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_CROSS, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_CROSS].includes(msg.type)) {
  8539. sequenceIndex++;
  8540. }
  8541. });
  8542. if (conf.mirrorActors) {
  8543. // Draw actors below diagram
  8544. bounds.bumpVerticalPos(conf.boxMargin * 2);
  8545. drawActors(diagram, actors, actorKeys, bounds.getVerticalPos());
  8546. }
  8547. const box = bounds.getBounds(); // Adjust line height of actor lines now that the height of the diagram is known
  8548. _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('For line height fix Querying: #' + id + ' .actor-line');
  8549. const actorLines = d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"]('#' + id + ' .actor-line');
  8550. actorLines.attr('y2', box.stopy);
  8551. let height = box.stopy - box.starty + 2 * conf.diagramMarginY;
  8552. if (conf.mirrorActors) {
  8553. height = height - conf.boxMargin + conf.bottomMarginAdj;
  8554. }
  8555. const width = box.stopx - box.startx + 2 * conf.diagramMarginX;
  8556. if (title) {
  8557. diagram.append('text').text(title).attr('x', (box.stopx - box.startx) / 2 - 2 * conf.diagramMarginX).attr('y', -25);
  8558. }
  8559. if (conf.useMaxWidth) {
  8560. diagram.attr('height', '100%');
  8561. diagram.attr('width', '100%');
  8562. diagram.attr('style', 'max-width:' + width + 'px;');
  8563. } else {
  8564. diagram.attr('height', height);
  8565. diagram.attr('width', width);
  8566. }
  8567. const extraVertForTitle = title ? 40 : 0;
  8568. diagram.attr('viewBox', box.startx - conf.diagramMarginX + ' -' + (conf.diagramMarginY + extraVertForTitle) + ' ' + width + ' ' + (height + extraVertForTitle));
  8569. };
  8570. /* harmony default export */ __webpack_exports__["default"] = ({
  8571. bounds,
  8572. drawActors,
  8573. setConf,
  8574. draw
  8575. });
  8576. /***/ }),
  8577. /***/ "./src/diagrams/sequence/svgDraw.js":
  8578. /*!******************************************!*\
  8579. !*** ./src/diagrams/sequence/svgDraw.js ***!
  8580. \******************************************/
  8581. /*! exports provided: drawRect, drawText, drawLabel, drawActor, anchorElement, drawActivation, drawLoop, drawBackgroundRect, insertArrowHead, insertSequenceNumber, insertArrowCrossHead, getTextObj, getNoteRect, default */
  8582. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8583. "use strict";
  8584. __webpack_require__.r(__webpack_exports__);
  8585. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawRect", function() { return drawRect; });
  8586. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawText", function() { return drawText; });
  8587. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawLabel", function() { return drawLabel; });
  8588. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawActor", function() { return drawActor; });
  8589. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "anchorElement", function() { return anchorElement; });
  8590. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawActivation", function() { return drawActivation; });
  8591. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawLoop", function() { return drawLoop; });
  8592. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawBackgroundRect", function() { return drawBackgroundRect; });
  8593. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertArrowHead", function() { return insertArrowHead; });
  8594. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertSequenceNumber", function() { return insertSequenceNumber; });
  8595. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertArrowCrossHead", function() { return insertArrowCrossHead; });
  8596. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTextObj", function() { return getTextObj; });
  8597. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNoteRect", function() { return getNoteRect; });
  8598. const drawRect = function (elem, rectData) {
  8599. const rectElem = elem.append('rect');
  8600. rectElem.attr('x', rectData.x);
  8601. rectElem.attr('y', rectData.y);
  8602. rectElem.attr('fill', rectData.fill);
  8603. rectElem.attr('stroke', rectData.stroke);
  8604. rectElem.attr('width', rectData.width);
  8605. rectElem.attr('height', rectData.height);
  8606. rectElem.attr('rx', rectData.rx);
  8607. rectElem.attr('ry', rectData.ry);
  8608. if (typeof rectData.class !== 'undefined') {
  8609. rectElem.attr('class', rectData.class);
  8610. }
  8611. return rectElem;
  8612. };
  8613. const drawText = function (elem, textData, width) {
  8614. // Remove and ignore br:s
  8615. const nText = textData.text.replace(/<br\/?>/ig, ' ');
  8616. const textElem = elem.append('text');
  8617. textElem.attr('x', textData.x);
  8618. textElem.attr('y', textData.y);
  8619. textElem.style('text-anchor', textData.anchor);
  8620. textElem.attr('fill', textData.fill);
  8621. if (typeof textData.class !== 'undefined') {
  8622. textElem.attr('class', textData.class);
  8623. }
  8624. const span = textElem.append('tspan');
  8625. span.attr('x', textData.x + textData.textMargin * 2);
  8626. span.attr('fill', textData.fill);
  8627. span.text(nText);
  8628. return textElem;
  8629. };
  8630. const drawLabel = function (elem, txtObject) {
  8631. function genPoints(x, y, width, height, cut) {
  8632. return x + ',' + y + ' ' + (x + width) + ',' + y + ' ' + (x + width) + ',' + (y + height - cut) + ' ' + (x + width - cut * 1.2) + ',' + (y + height) + ' ' + x + ',' + (y + height);
  8633. }
  8634. const polygon = elem.append('polygon');
  8635. polygon.attr('points', genPoints(txtObject.x, txtObject.y, 50, 20, 7));
  8636. polygon.attr('class', 'labelBox');
  8637. txtObject.y = txtObject.y + txtObject.labelMargin;
  8638. txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;
  8639. drawText(elem, txtObject);
  8640. };
  8641. let actorCnt = -1;
  8642. /**
  8643. * Draws an actor in the diagram with the attaced line
  8644. * @param center - The center of the the actor
  8645. * @param pos The position if the actor in the liost of actors
  8646. * @param description The text in the box
  8647. */
  8648. const drawActor = function (elem, left, verticalPos, description, conf) {
  8649. const center = left + conf.width / 2;
  8650. const g = elem.append('g');
  8651. if (verticalPos === 0) {
  8652. actorCnt++;
  8653. g.append('line').attr('id', 'actor' + actorCnt).attr('x1', center).attr('y1', 5).attr('x2', center).attr('y2', 2000).attr('class', 'actor-line').attr('stroke-width', '0.5px').attr('stroke', '#999');
  8654. }
  8655. const rect = getNoteRect();
  8656. rect.x = left;
  8657. rect.y = verticalPos;
  8658. rect.fill = '#eaeaea';
  8659. rect.width = conf.width;
  8660. rect.height = conf.height;
  8661. rect.class = 'actor';
  8662. rect.rx = 3;
  8663. rect.ry = 3;
  8664. drawRect(g, rect);
  8665. _drawTextCandidateFunc(conf)(description, g, rect.x, rect.y, rect.width, rect.height, {
  8666. 'class': 'actor'
  8667. }, conf);
  8668. };
  8669. const anchorElement = function (elem) {
  8670. return elem.append('g');
  8671. };
  8672. /**
  8673. * Draws an actor in the diagram with the attaced line
  8674. * @param elem - element to append activation rect
  8675. * @param bounds - activation box bounds
  8676. * @param verticalPos - precise y cooridnate of bottom activation box edge
  8677. */
  8678. const drawActivation = function (elem, bounds, verticalPos, conf, actorActivations) {
  8679. const rect = getNoteRect();
  8680. const g = bounds.anchored;
  8681. rect.x = bounds.startx;
  8682. rect.y = bounds.starty;
  8683. rect.class = 'activation' + actorActivations % 3; // Will evaluate to 0, 1 or 2
  8684. rect.width = bounds.stopx - bounds.startx;
  8685. rect.height = verticalPos - bounds.starty;
  8686. drawRect(g, rect);
  8687. };
  8688. /**
  8689. * Draws an actor in the diagram with the attaced line
  8690. * @param center - The center of the the actor
  8691. * @param pos The position if the actor in the list of actors
  8692. * @param description The text in the box
  8693. */
  8694. const drawLoop = function (elem, bounds, labelText, conf) {
  8695. const g = elem.append('g');
  8696. const drawLoopLine = function (startx, starty, stopx, stopy) {
  8697. return g.append('line').attr('x1', startx).attr('y1', starty).attr('x2', stopx).attr('y2', stopy).attr('class', 'loopLine');
  8698. };
  8699. drawLoopLine(bounds.startx, bounds.starty, bounds.stopx, bounds.starty);
  8700. drawLoopLine(bounds.stopx, bounds.starty, bounds.stopx, bounds.stopy);
  8701. drawLoopLine(bounds.startx, bounds.stopy, bounds.stopx, bounds.stopy);
  8702. drawLoopLine(bounds.startx, bounds.starty, bounds.startx, bounds.stopy);
  8703. if (typeof bounds.sections !== 'undefined') {
  8704. bounds.sections.forEach(function (item) {
  8705. drawLoopLine(bounds.startx, item, bounds.stopx, item).style('stroke-dasharray', '3, 3');
  8706. });
  8707. }
  8708. let txt = getTextObj();
  8709. txt.text = labelText;
  8710. txt.x = bounds.startx;
  8711. txt.y = bounds.starty;
  8712. txt.labelMargin = 1.5 * 10; // This is the small box that says "loop"
  8713. txt.class = 'labelText'; // Its size & position are fixed.
  8714. drawLabel(g, txt);
  8715. txt = getTextObj();
  8716. txt.text = '[ ' + bounds.title + ' ]';
  8717. txt.x = bounds.startx + (bounds.stopx - bounds.startx) / 2;
  8718. txt.y = bounds.starty + 1.5 * conf.boxMargin;
  8719. txt.anchor = 'middle';
  8720. txt.class = 'loopText';
  8721. drawText(g, txt);
  8722. if (typeof bounds.sectionTitles !== 'undefined') {
  8723. bounds.sectionTitles.forEach(function (item, idx) {
  8724. if (item !== '') {
  8725. txt.text = '[ ' + item + ' ]';
  8726. txt.y = bounds.sections[idx] + 1.5 * conf.boxMargin;
  8727. drawText(g, txt);
  8728. }
  8729. });
  8730. }
  8731. };
  8732. /**
  8733. * Draws a background rectangle
  8734. * @param color - The fill color for the background
  8735. */
  8736. const drawBackgroundRect = function (elem, bounds) {
  8737. const rectElem = drawRect(elem, {
  8738. x: bounds.startx,
  8739. y: bounds.starty,
  8740. width: bounds.stopx - bounds.startx,
  8741. height: bounds.stopy - bounds.starty,
  8742. fill: bounds.fill,
  8743. class: 'rect'
  8744. });
  8745. rectElem.lower();
  8746. };
  8747. /**
  8748. * Setup arrow head and define the marker. The result is appended to the svg.
  8749. */
  8750. const insertArrowHead = function (elem) {
  8751. elem.append('defs').append('marker').attr('id', 'arrowhead').attr('refX', 5).attr('refY', 2).attr('markerWidth', 6).attr('markerHeight', 4).attr('orient', 'auto').append('path').attr('d', 'M 0,0 V 4 L6,2 Z'); // this is actual shape for arrowhead
  8752. };
  8753. /**
  8754. * Setup node number. The result is appended to the svg.
  8755. */
  8756. const insertSequenceNumber = function (elem) {
  8757. elem.append('defs').append('marker').attr('id', 'sequencenumber').attr('refX', 15).attr('refY', 15).attr('markerWidth', 60).attr('markerHeight', 40).attr('orient', 'auto').append('circle').attr('cx', 15).attr('cy', 15).attr('r', 6); // .style("fill", '#f00');
  8758. };
  8759. /**
  8760. * Setup arrow head and define the marker. The result is appended to the svg.
  8761. */
  8762. const insertArrowCrossHead = function (elem) {
  8763. const defs = elem.append('defs');
  8764. const marker = defs.append('marker').attr('id', 'crosshead').attr('markerWidth', 15).attr('markerHeight', 8).attr('orient', 'auto').attr('refX', 16).attr('refY', 4); // The arrow
  8765. marker.append('path').attr('fill', 'black').attr('stroke', '#000000').style('stroke-dasharray', '0, 0').attr('stroke-width', '1px').attr('d', 'M 9,2 V 6 L16,4 Z'); // The cross
  8766. marker.append('path').attr('fill', 'none').attr('stroke', '#000000').style('stroke-dasharray', '0, 0').attr('stroke-width', '1px').attr('d', 'M 0,1 L 6,7 M 6,1 L 0,7'); // this is actual shape for arrowhead
  8767. };
  8768. const getTextObj = function () {
  8769. const txt = {
  8770. x: 0,
  8771. y: 0,
  8772. 'fill': undefined,
  8773. 'text-anchor': 'start',
  8774. style: '#666',
  8775. width: 100,
  8776. height: 100,
  8777. textMargin: 0,
  8778. rx: 0,
  8779. ry: 0
  8780. };
  8781. return txt;
  8782. };
  8783. const getNoteRect = function () {
  8784. const rect = {
  8785. x: 0,
  8786. y: 0,
  8787. fill: '#EDF2AE',
  8788. stroke: '#666',
  8789. width: 100,
  8790. anchor: 'start',
  8791. height: 100,
  8792. rx: 0,
  8793. ry: 0
  8794. };
  8795. return rect;
  8796. };
  8797. const _drawTextCandidateFunc = function () {
  8798. function byText(content, g, x, y, width, height, textAttrs) {
  8799. const text = g.append('text').attr('x', x + width / 2).attr('y', y + height / 2 + 5).style('text-anchor', 'middle').text(content);
  8800. _setTextAttrs(text, textAttrs);
  8801. }
  8802. function byTspan(content, g, x, y, width, height, textAttrs, conf) {
  8803. const {
  8804. actorFontSize,
  8805. actorFontFamily
  8806. } = conf;
  8807. const lines = content.split(/<br\/?>/ig);
  8808. for (let i = 0; i < lines.length; i++) {
  8809. const dy = i * actorFontSize - actorFontSize * (lines.length - 1) / 2;
  8810. const text = g.append('text').attr('x', x + width / 2).attr('y', y).style('text-anchor', 'middle').style('font-size', actorFontSize).style('font-family', actorFontFamily);
  8811. text.append('tspan').attr('x', x + width / 2).attr('dy', dy).text(lines[i]);
  8812. text.attr('y', y + height / 2.0).attr('dominant-baseline', 'central').attr('alignment-baseline', 'central');
  8813. _setTextAttrs(text, textAttrs);
  8814. }
  8815. }
  8816. function byFo(content, g, x, y, width, height, textAttrs, conf) {
  8817. const s = g.append('switch');
  8818. const f = s.append('foreignObject').attr('x', x).attr('y', y).attr('width', width).attr('height', height);
  8819. const text = f.append('div').style('display', 'table').style('height', '100%').style('width', '100%');
  8820. text.append('div').style('display', 'table-cell').style('text-align', 'center').style('vertical-align', 'middle').text(content);
  8821. byTspan(content, s, x, y, width, height, textAttrs, conf);
  8822. _setTextAttrs(text, textAttrs);
  8823. }
  8824. function _setTextAttrs(toText, fromTextAttrsDict) {
  8825. for (const key in fromTextAttrsDict) {
  8826. if (fromTextAttrsDict.hasOwnProperty(key)) {
  8827. toText.attr(key, fromTextAttrsDict[key]);
  8828. }
  8829. }
  8830. }
  8831. return function (conf) {
  8832. return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;
  8833. };
  8834. }();
  8835. /* harmony default export */ __webpack_exports__["default"] = ({
  8836. drawRect,
  8837. drawText,
  8838. drawLabel,
  8839. drawActor,
  8840. anchorElement,
  8841. drawActivation,
  8842. drawLoop,
  8843. drawBackgroundRect,
  8844. insertArrowHead,
  8845. insertSequenceNumber,
  8846. insertArrowCrossHead,
  8847. getTextObj,
  8848. getNoteRect
  8849. });
  8850. /***/ }),
  8851. /***/ "./src/logger.js":
  8852. /*!***********************!*\
  8853. !*** ./src/logger.js ***!
  8854. \***********************/
  8855. /*! exports provided: LEVELS, logger, setLogLevel */
  8856. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8857. "use strict";
  8858. __webpack_require__.r(__webpack_exports__);
  8859. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LEVELS", function() { return LEVELS; });
  8860. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logger", function() { return logger; });
  8861. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLogLevel", function() { return setLogLevel; });
  8862. /* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moment-mini */ "moment-mini");
  8863. /* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment_mini__WEBPACK_IMPORTED_MODULE_0__);
  8864. const LEVELS = {
  8865. debug: 1,
  8866. info: 2,
  8867. warn: 3,
  8868. error: 4,
  8869. fatal: 5
  8870. };
  8871. const logger = {
  8872. debug: () => {},
  8873. info: () => {},
  8874. warn: () => {},
  8875. error: () => {},
  8876. fatal: () => {}
  8877. };
  8878. const setLogLevel = function (level) {
  8879. logger.debug = () => {};
  8880. logger.info = () => {};
  8881. logger.warn = () => {};
  8882. logger.error = () => {};
  8883. logger.fatal = () => {};
  8884. if (level <= LEVELS.fatal) {
  8885. logger.fatal = console.log.bind(console, '\x1b[35m', format('FATAL'));
  8886. }
  8887. if (level <= LEVELS.error) {
  8888. logger.error = console.log.bind(console, '\x1b[31m', format('ERROR'));
  8889. }
  8890. if (level <= LEVELS.warn) {
  8891. logger.warn = console.log.bind(console, `\x1b[33m`, format('WARN'));
  8892. }
  8893. if (level <= LEVELS.info) {
  8894. logger.info = console.log.bind(console, '\x1b[34m', format('INFO'));
  8895. }
  8896. if (level <= LEVELS.debug) {
  8897. logger.debug = console.log.bind(console, '\x1b[32m', format('DEBUG'));
  8898. }
  8899. };
  8900. const format = level => {
  8901. const time = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()().format('HH:mm:ss.SSS');
  8902. return `${time} : ${level} : `;
  8903. };
  8904. /***/ }),
  8905. /***/ "./src/mermaid.js":
  8906. /*!************************!*\
  8907. !*** ./src/mermaid.js ***!
  8908. \************************/
  8909. /*! exports provided: default */
  8910. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8911. "use strict";
  8912. __webpack_require__.r(__webpack_exports__);
  8913. /* harmony import */ var he__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! he */ "he");
  8914. /* harmony import */ var he__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(he__WEBPACK_IMPORTED_MODULE_0__);
  8915. /* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mermaidAPI */ "./src/mermaidAPI.js");
  8916. /* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./logger */ "./src/logger.js");
  8917. /**
  8918. * Web page integration module for the mermaid framework. It uses the mermaidAPI for mermaid functionality and to render
  8919. * the diagrams to svg code.
  8920. */
  8921. /**
  8922. * ## init
  8923. * Function that goes through the document to find the chart definitions in there and render them.
  8924. *
  8925. * The function tags the processed attributes with the attribute data-processed and ignores found elements with the
  8926. * attribute already set. This way the init function can be triggered several times.
  8927. *
  8928. * Optionally, `init` can accept in the second argument one of the following:
  8929. * - a DOM Node
  8930. * - an array of DOM nodes (as would come from a jQuery selector)
  8931. * - a W3C selector, a la `.mermaid`
  8932. *
  8933. * ```mermaid
  8934. * graph LR;
  8935. * a(Find elements)-->b{Processed}
  8936. * b-->|Yes|c(Leave element)
  8937. * b-->|No |d(Transform)
  8938. * ```
  8939. * Renders the mermaid diagrams
  8940. * @param nodes a css selector or an array of nodes
  8941. */
  8942. const init = function () {
  8943. const conf = _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].getConfig();
  8944. _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Starting rendering diagrams');
  8945. let nodes;
  8946. if (arguments.length >= 2) {
  8947. /*! sequence config was passed as #1 */
  8948. if (typeof arguments[0] !== 'undefined') {
  8949. mermaid.sequenceConfig = arguments[0];
  8950. }
  8951. nodes = arguments[1];
  8952. } else {
  8953. nodes = arguments[0];
  8954. } // if last argument is a function this is the callback function
  8955. let callback;
  8956. if (typeof arguments[arguments.length - 1] === 'function') {
  8957. callback = arguments[arguments.length - 1];
  8958. _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Callback function found');
  8959. } else {
  8960. if (typeof conf.mermaid !== 'undefined') {
  8961. if (typeof conf.mermaid.callback === 'function') {
  8962. callback = conf.mermaid.callback;
  8963. _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Callback function found');
  8964. } else {
  8965. _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('No Callback function found');
  8966. }
  8967. }
  8968. }
  8969. nodes = nodes === undefined ? document.querySelectorAll('.mermaid') : typeof nodes === 'string' ? document.querySelectorAll(nodes) : nodes instanceof window.Node ? [nodes] : nodes; // Last case - sequence config was passed pick next
  8970. _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Start On Load before: ' + mermaid.startOnLoad);
  8971. if (typeof mermaid.startOnLoad !== 'undefined') {
  8972. _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Start On Load inner: ' + mermaid.startOnLoad);
  8973. _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].initialize({
  8974. startOnLoad: mermaid.startOnLoad
  8975. });
  8976. }
  8977. if (typeof mermaid.ganttConfig !== 'undefined') {
  8978. _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].initialize({
  8979. gantt: mermaid.ganttConfig
  8980. });
  8981. }
  8982. let txt;
  8983. for (let i = 0; i < nodes.length; i++) {
  8984. const element = nodes[i];
  8985. /*! Check if previously processed */
  8986. if (!element.getAttribute('data-processed')) {
  8987. element.setAttribute('data-processed', true);
  8988. } else {
  8989. continue;
  8990. }
  8991. const id = `mermaid-${Date.now()}`; // Fetch the graph definition including tags
  8992. txt = element.innerHTML; // transforms the html to pure text
  8993. txt = he__WEBPACK_IMPORTED_MODULE_0___default.a.decode(txt).trim().replace(/<br>/ig, '<br/>');
  8994. _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].render(id, txt, (svgCode, bindFunctions) => {
  8995. element.innerHTML = svgCode;
  8996. if (typeof callback !== 'undefined') {
  8997. callback(id);
  8998. }
  8999. if (bindFunctions) bindFunctions(element);
  9000. }, element);
  9001. }
  9002. };
  9003. const initialize = function (config) {
  9004. _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Initializing mermaid ');
  9005. if (typeof config.mermaid !== 'undefined') {
  9006. if (typeof config.mermaid.startOnLoad !== 'undefined') {
  9007. mermaid.startOnLoad = config.mermaid.startOnLoad;
  9008. }
  9009. if (typeof config.mermaid.htmlLabels !== 'undefined') {
  9010. mermaid.htmlLabels = config.mermaid.htmlLabels;
  9011. }
  9012. }
  9013. _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].initialize(config);
  9014. };
  9015. /**
  9016. * ##contentLoaded
  9017. * Callback function that is called when page is loaded. This functions fetches configuration for mermaid rendering and
  9018. * calls init for rendering the mermaid diagrams on the page.
  9019. */
  9020. const contentLoaded = function () {
  9021. let config;
  9022. if (mermaid.startOnLoad) {
  9023. // No config found, do check API config
  9024. config = _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].getConfig();
  9025. if (config.startOnLoad) {
  9026. mermaid.init();
  9027. }
  9028. } else {
  9029. if (typeof mermaid.startOnLoad === 'undefined') {
  9030. _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('In start, no config');
  9031. config = _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].getConfig();
  9032. if (config.startOnLoad) {
  9033. mermaid.init();
  9034. }
  9035. }
  9036. }
  9037. };
  9038. if (typeof document !== 'undefined') {
  9039. /*!
  9040. * Wait for document loaded before starting the execution
  9041. */
  9042. window.addEventListener('load', function () {
  9043. contentLoaded();
  9044. }, false);
  9045. }
  9046. const mermaid = {
  9047. startOnLoad: true,
  9048. htmlLabels: true,
  9049. mermaidAPI: _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"],
  9050. parse: _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].parse,
  9051. render: _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].render,
  9052. init,
  9053. initialize,
  9054. contentLoaded
  9055. };
  9056. /* harmony default export */ __webpack_exports__["default"] = (mermaid);
  9057. /***/ }),
  9058. /***/ "./src/mermaidAPI.js":
  9059. /*!***************************!*\
  9060. !*** ./src/mermaidAPI.js ***!
  9061. \***************************/
  9062. /*! exports provided: encodeEntities, decodeEntities, default */
  9063. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  9064. "use strict";
  9065. __webpack_require__.r(__webpack_exports__);
  9066. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "encodeEntities", function() { return encodeEntities; });
  9067. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "decodeEntities", function() { return decodeEntities; });
  9068. /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
  9069. /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
  9070. /* harmony import */ var scope_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! scope-css */ "scope-css");
  9071. /* harmony import */ var scope_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(scope_css__WEBPACK_IMPORTED_MODULE_1__);
  9072. /* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../package.json */ "./package.json");
  9073. var _package_json__WEBPACK_IMPORTED_MODULE_2___namespace = /*#__PURE__*/__webpack_require__.t(/*! ../package.json */ "./package.json", 1);
  9074. /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./config */ "./src/config.js");
  9075. /* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./logger */ "./src/logger.js");
  9076. /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils */ "./src/utils.js");
  9077. /* harmony import */ var _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./diagrams/flowchart/flowRenderer */ "./src/diagrams/flowchart/flowRenderer.js");
  9078. /* harmony import */ var _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./diagrams/flowchart/parser/flow */ "./src/diagrams/flowchart/parser/flow.jison");
  9079. /* harmony import */ var _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7__);
  9080. /* harmony import */ var _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./diagrams/flowchart/flowDb */ "./src/diagrams/flowchart/flowDb.js");
  9081. /* harmony import */ var _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./diagrams/sequence/sequenceRenderer */ "./src/diagrams/sequence/sequenceRenderer.js");
  9082. /* harmony import */ var _diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./diagrams/sequence/parser/sequenceDiagram */ "./src/diagrams/sequence/parser/sequenceDiagram.jison");
  9083. /* harmony import */ var _diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_10__);
  9084. /* harmony import */ var _diagrams_sequence_sequenceDb__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./diagrams/sequence/sequenceDb */ "./src/diagrams/sequence/sequenceDb.js");
  9085. /* harmony import */ var _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./diagrams/gantt/ganttRenderer */ "./src/diagrams/gantt/ganttRenderer.js");
  9086. /* harmony import */ var _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./diagrams/gantt/parser/gantt */ "./src/diagrams/gantt/parser/gantt.jison");
  9087. /* harmony import */ var _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_13__);
  9088. /* harmony import */ var _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./diagrams/gantt/ganttDb */ "./src/diagrams/gantt/ganttDb.js");
  9089. /* harmony import */ var _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./diagrams/class/classRenderer */ "./src/diagrams/class/classRenderer.js");
  9090. /* harmony import */ var _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./diagrams/class/parser/classDiagram */ "./src/diagrams/class/parser/classDiagram.jison");
  9091. /* harmony import */ var _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_16__);
  9092. /* harmony import */ var _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./diagrams/class/classDb */ "./src/diagrams/class/classDb.js");
  9093. /* harmony import */ var _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./diagrams/git/gitGraphRenderer */ "./src/diagrams/git/gitGraphRenderer.js");
  9094. /* harmony import */ var _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./diagrams/git/parser/gitGraph */ "./src/diagrams/git/parser/gitGraph.jison");
  9095. /* harmony import */ var _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_19__);
  9096. /* harmony import */ var _diagrams_git_gitGraphAst__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./diagrams/git/gitGraphAst */ "./src/diagrams/git/gitGraphAst.js");
  9097. /* harmony import */ var _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./diagrams/info/infoRenderer */ "./src/diagrams/info/infoRenderer.js");
  9098. /* harmony import */ var _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./diagrams/info/parser/info */ "./src/diagrams/info/parser/info.jison");
  9099. /* harmony import */ var _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_22__);
  9100. /* harmony import */ var _diagrams_info_infoDb__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./diagrams/info/infoDb */ "./src/diagrams/info/infoDb.js");
  9101. /**
  9102. * This is the api to be used when handling the integration with the web page instead of using the default integration
  9103. * (mermaid.js).
  9104. *
  9105. * The core of this api is the **render** function that given a graph definitionas text renders the graph/diagram and
  9106. * returns a svg element for the graph. It is is then up to the user of the API to make use of the svg, either insert it
  9107. * somewhere in the page or something completely different.
  9108. * @name mermaidAPI
  9109. */
  9110. const themes = {};
  9111. for (const themeName of ['default', 'forest', 'dark', 'neutral']) {
  9112. themes[themeName] = __webpack_require__("./src/themes sync recursive ^\\.\\/.*\\/index\\.scss$")(`./${themeName}/index.scss`);
  9113. }
  9114. /**
  9115. * These are the default options which can be overridden with the initialization call as in the example below:
  9116. * ```
  9117. * mermaid.initialize({
  9118. * flowchart:{
  9119. * htmlLabels: false
  9120. * }
  9121. * });
  9122. * ```
  9123. * @name Configuration
  9124. */
  9125. const config = {
  9126. /** theme , the CSS style sheet
  9127. *
  9128. * **theme** - Choose one of the built-in themes: default, forest, dark or neutral. To disable any pre-defined mermaid theme, use "null".
  9129. * **themeCSS** - Use your own CSS. This overrides **theme**.
  9130. *```
  9131. * "theme": "forest",
  9132. * "themeCSS": ".node rect { fill: red; }"
  9133. *```
  9134. */
  9135. theme: 'default',
  9136. themeCSS: undefined,
  9137. /**
  9138. * This option decides the amount of logging to be used.
  9139. * * debug: 1
  9140. * * info: 2
  9141. * * warn: 3
  9142. * * error: 4
  9143. * * fatal: (**default**) 5
  9144. */
  9145. logLevel: 5,
  9146. /**
  9147. * Sets the level of trust to be used on the parsed diagrams.
  9148. * * **true**: (**default**) tags in text are encoded, click functionality is disabeled
  9149. * * **false**: tags in text are allowed, click functionality is enabled
  9150. */
  9151. securityLevel: 'strict',
  9152. /**
  9153. * This options controls whether or mermaid starts when the page loads
  9154. * **Default value true**.
  9155. */
  9156. startOnLoad: true,
  9157. /**
  9158. * This options controls whether or arrow markers in html code will be absolute paths or
  9159. * an anchor, #. This matters if you are using base tag settings.
  9160. * **Default value false**.
  9161. */
  9162. arrowMarkerAbsolute: false,
  9163. /**
  9164. * The object containing configurations specific for flowcharts
  9165. */
  9166. flowchart: {
  9167. /**
  9168. * Flag for setting whether or not a html tag should be used for rendering labels
  9169. * on the edges.
  9170. * **Default value true**.
  9171. */
  9172. htmlLabels: true,
  9173. /**
  9174. * How mermaid renders curves for flowcharts. Possibel values are basis, linear and cardinal. **Default value linear**.
  9175. */
  9176. curve: 'linear'
  9177. },
  9178. /**
  9179. * The object containing configurations specific for sequence diagrams
  9180. */
  9181. sequence: {
  9182. /**
  9183. * margin to the right and left of the sequence diagram
  9184. * **Default value 50**.
  9185. */
  9186. diagramMarginX: 50,
  9187. /**
  9188. * margin to the over and under the sequence diagram.
  9189. * **Default value 10**.
  9190. */
  9191. diagramMarginY: 10,
  9192. /**
  9193. * Margin between actors.
  9194. * **Default value 50**.
  9195. */
  9196. actorMargin: 50,
  9197. /**
  9198. * Width of actor boxes
  9199. * **Default value 150**.
  9200. */
  9201. width: 150,
  9202. /**
  9203. * Height of actor boxes
  9204. * **Default value 65**.
  9205. */
  9206. height: 65,
  9207. /**
  9208. * Margin around loop boxes
  9209. * **Default value 10**.
  9210. */
  9211. boxMargin: 10,
  9212. /**
  9213. * margin around the text in loop/alt/opt boxes
  9214. * **Default value 5**.
  9215. */
  9216. boxTextMargin: 5,
  9217. /**
  9218. * margin around notes.
  9219. * **Default value 10**.
  9220. */
  9221. noteMargin: 10,
  9222. /**
  9223. * Space between messages.
  9224. * **Default value 35**.
  9225. */
  9226. messageMargin: 35,
  9227. /**
  9228. * mirror actors under diagram.
  9229. * **Default value true**.
  9230. */
  9231. mirrorActors: true,
  9232. /**
  9233. * Depending on css styling this might need adjustment.
  9234. * Prolongs the edge of the diagram downwards.
  9235. * **Default value 1**.
  9236. */
  9237. bottomMarginAdj: 1,
  9238. /**
  9239. * when this flag is set the height and width is set to 100% and is then scaling with the
  9240. * available space if not the absolute space required is used.
  9241. * **Default value true**.
  9242. */
  9243. useMaxWidth: true,
  9244. /**
  9245. * This will display arrows that start and begin at the same node as right angles, rather than a curve
  9246. * **Default value false**.
  9247. */
  9248. rightAngles: false,
  9249. /**
  9250. * This will show the node numbers
  9251. * **Default value false**.
  9252. */
  9253. showSequenceNumbers: false
  9254. },
  9255. /**
  9256. * The object containing configurations specific for gantt diagrams*
  9257. */
  9258. gantt: {
  9259. /**
  9260. * Margin top for the text over the gantt diagram
  9261. * **Default value 25**.
  9262. */
  9263. titleTopMargin: 25,
  9264. /**
  9265. * The height of the bars in the graph
  9266. * **Default value 20**.
  9267. */
  9268. barHeight: 20,
  9269. /**
  9270. * The margin between the different activities in the gantt diagram.
  9271. * **Default value 4**.
  9272. */
  9273. barGap: 4,
  9274. /**
  9275. * Margin between title and gantt diagram and between axis and gantt diagram.
  9276. * **Default value 50**.
  9277. */
  9278. topPadding: 50,
  9279. /**
  9280. * The space allocated for the section name to the left of the activities.
  9281. * **Default value 75**.
  9282. */
  9283. leftPadding: 75,
  9284. /**
  9285. * Vertical starting position of the grid lines.
  9286. * **Default value 35**.
  9287. */
  9288. gridLineStartPadding: 35,
  9289. /**
  9290. * Font size ...
  9291. * **Default value 11**.
  9292. */
  9293. fontSize: 11,
  9294. /**
  9295. * font family ...
  9296. * **Default value '"Open-Sans", "sans-serif"'**.
  9297. */
  9298. fontFamily: '"Open-Sans", "sans-serif"',
  9299. /**
  9300. * The number of alternating section styles.
  9301. * **Default value 4**.
  9302. */
  9303. numberSectionStyles: 4,
  9304. /**
  9305. * Datetime format of the axis, this might need adjustment to match your locale and preferences
  9306. * **Default value '%Y-%m-%d'**.
  9307. */
  9308. axisFormat: '%Y-%m-%d'
  9309. },
  9310. class: {},
  9311. git: {}
  9312. };
  9313. Object(_logger__WEBPACK_IMPORTED_MODULE_4__["setLogLevel"])(config.logLevel);
  9314. Object(_config__WEBPACK_IMPORTED_MODULE_3__["setConfig"])(config);
  9315. function parse(text) {
  9316. const graphType = _utils__WEBPACK_IMPORTED_MODULE_5__["default"].detectType(text);
  9317. let parser;
  9318. _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('Type ' + graphType);
  9319. switch (graphType) {
  9320. case 'git':
  9321. parser = _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_19___default.a;
  9322. parser.parser.yy = _diagrams_git_gitGraphAst__WEBPACK_IMPORTED_MODULE_20__["default"];
  9323. break;
  9324. case 'flowchart':
  9325. parser = _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7___default.a;
  9326. parser.parser.yy = _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__["default"];
  9327. break;
  9328. case 'sequence':
  9329. parser = _diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_10___default.a;
  9330. parser.parser.yy = _diagrams_sequence_sequenceDb__WEBPACK_IMPORTED_MODULE_11__["default"];
  9331. break;
  9332. case 'gantt':
  9333. parser = _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_13___default.a;
  9334. parser.parser.yy = _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_14__["default"];
  9335. break;
  9336. case 'class':
  9337. parser = _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_16___default.a;
  9338. parser.parser.yy = _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_17__["default"];
  9339. break;
  9340. case 'info':
  9341. _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('info info info');
  9342. console.warn('In API', _package_json__WEBPACK_IMPORTED_MODULE_2__.version);
  9343. parser = _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_22___default.a;
  9344. parser.parser.yy = _diagrams_info_infoDb__WEBPACK_IMPORTED_MODULE_23__["default"];
  9345. break;
  9346. }
  9347. parser.parser.yy.parseError = (str, hash) => {
  9348. const error = {
  9349. str,
  9350. hash
  9351. };
  9352. throw error;
  9353. };
  9354. parser.parse(text);
  9355. }
  9356. const encodeEntities = function (text) {
  9357. let txt = text;
  9358. txt = txt.replace(/style.*:\S*#.*;/g, function (s) {
  9359. const innerTxt = s.substring(0, s.length - 1);
  9360. return innerTxt;
  9361. });
  9362. txt = txt.replace(/classDef.*:\S*#.*;/g, function (s) {
  9363. const innerTxt = s.substring(0, s.length - 1);
  9364. return innerTxt;
  9365. });
  9366. txt = txt.replace(/#\w+;/g, function (s) {
  9367. const innerTxt = s.substring(1, s.length - 1);
  9368. const isInt = /^\+?\d+$/.test(innerTxt);
  9369. if (isInt) {
  9370. return 'fl°°' + innerTxt + '¶ß';
  9371. } else {
  9372. return 'fl°' + innerTxt + '¶ß';
  9373. }
  9374. });
  9375. return txt;
  9376. };
  9377. const decodeEntities = function (text) {
  9378. let txt = text;
  9379. txt = txt.replace(/fl°°/g, function () {
  9380. return '&#';
  9381. });
  9382. txt = txt.replace(/fl°/g, function () {
  9383. return '&';
  9384. });
  9385. txt = txt.replace(/¶ß/g, function () {
  9386. return ';';
  9387. });
  9388. return txt;
  9389. };
  9390. /**
  9391. * Function that renders an svg with a graph from a chart definition. Usage example below.
  9392. *
  9393. * ```js
  9394. * mermaidAPI.initialize({
  9395. * startOnLoad:true
  9396. * });
  9397. * $(function(){
  9398. * const graphDefinition = 'graph TB\na-->b';
  9399. * const cb = function(svgGraph){
  9400. * console.log(svgGraph);
  9401. * };
  9402. * mermaidAPI.render('id1',graphDefinition,cb);
  9403. * });
  9404. *```
  9405. * @param id the id of the element to be rendered
  9406. * @param txt the graph definition
  9407. * @param cb callback which is called after rendering is finished with the svg code as inparam.
  9408. * @param container selector to element in which a div with the graph temporarily will be inserted. In one is
  9409. * provided a hidden div will be inserted in the body of the page instead. The element will be removed when rendering is
  9410. * completed.
  9411. */
  9412. const render = function (id, txt, cb, container) {
  9413. if (typeof container !== 'undefined') {
  9414. container.innerHTML = '';
  9415. d3__WEBPACK_IMPORTED_MODULE_0__["select"](container).append('div').attr('id', 'd' + id).append('svg').attr('id', id).attr('width', '100%').attr('xmlns', 'http://www.w3.org/2000/svg').append('g');
  9416. } else {
  9417. const element = document.querySelector('#' + 'd' + id);
  9418. if (element) {
  9419. element.innerHTML = '';
  9420. }
  9421. d3__WEBPACK_IMPORTED_MODULE_0__["select"]('body').append('div').attr('id', 'd' + id).append('svg').attr('id', id).attr('width', '100%').attr('xmlns', 'http://www.w3.org/2000/svg').append('g');
  9422. }
  9423. window.txt = txt;
  9424. txt = encodeEntities(txt);
  9425. const element = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#d' + id).node();
  9426. const graphType = _utils__WEBPACK_IMPORTED_MODULE_5__["default"].detectType(txt); // insert inline style into svg
  9427. const svg = element.firstChild;
  9428. const firstChild = svg.firstChild; // pre-defined theme
  9429. let style = themes[config.theme];
  9430. if (style === undefined) {
  9431. style = '';
  9432. } // user provided theme CSS
  9433. if (config.themeCSS !== undefined) {
  9434. style += `\n${config.themeCSS}`;
  9435. } // classDef
  9436. if (graphType === 'flowchart') {
  9437. const classes = _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_6__["default"].getClasses(txt);
  9438. for (const className in classes) {
  9439. style += `\n.${className} > * { ${classes[className].styles.join(' !important; ')} !important; }`;
  9440. }
  9441. }
  9442. const style1 = document.createElement('style');
  9443. style1.innerHTML = scope_css__WEBPACK_IMPORTED_MODULE_1___default()(style, `#${id}`);
  9444. svg.insertBefore(style1, firstChild);
  9445. const style2 = document.createElement('style');
  9446. const cs = window.getComputedStyle(svg);
  9447. style2.innerHTML = `#${id} {
  9448. color: ${cs.color};
  9449. font: ${cs.font};
  9450. }`;
  9451. svg.insertBefore(style2, firstChild);
  9452. switch (graphType) {
  9453. case 'git':
  9454. config.flowchart.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
  9455. _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_18__["default"].setConf(config.git);
  9456. _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_18__["default"].draw(txt, id, false);
  9457. break;
  9458. case 'flowchart':
  9459. config.flowchart.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
  9460. _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_6__["default"].setConf(config.flowchart);
  9461. _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_6__["default"].draw(txt, id, false);
  9462. break;
  9463. case 'sequence':
  9464. config.sequence.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
  9465. if (config.sequenceDiagram) {
  9466. // backwards compatibility
  9467. _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__["default"].setConf(Object.assign(config.sequence, config.sequenceDiagram));
  9468. console.error('`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.');
  9469. } else {
  9470. _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__["default"].setConf(config.sequence);
  9471. }
  9472. _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__["default"].draw(txt, id);
  9473. break;
  9474. case 'gantt':
  9475. config.gantt.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
  9476. _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_12__["default"].setConf(config.gantt);
  9477. _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_12__["default"].draw(txt, id);
  9478. break;
  9479. case 'class':
  9480. config.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
  9481. _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_15__["default"].setConf(config.class);
  9482. _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_15__["default"].draw(txt, id);
  9483. break;
  9484. case 'info':
  9485. config.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
  9486. _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_21__["default"].setConf(config.class);
  9487. _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_21__["default"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);
  9488. break;
  9489. }
  9490. d3__WEBPACK_IMPORTED_MODULE_0__["select"](`[id="${id}"]`).selectAll('foreignobject > *').attr('xmlns', 'http://www.w3.org/1999/xhtml');
  9491. let url = '';
  9492. if (config.arrowMarkerAbsolute) {
  9493. url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;
  9494. url = url.replace(/\(/g, '\\(');
  9495. url = url.replace(/\)/g, '\\)');
  9496. } // Fix for when the base tag is used
  9497. let svgCode = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#d' + id).node().innerHTML.replace(/url\(#arrowhead/g, 'url(' + url + '#arrowhead', 'g');
  9498. svgCode = decodeEntities(svgCode);
  9499. if (typeof cb !== 'undefined') {
  9500. switch (graphType) {
  9501. case 'flowchart':
  9502. cb(svgCode, _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__["default"].bindFunctions);
  9503. break;
  9504. case 'gantt':
  9505. cb(svgCode, _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_14__["default"].bindFunctions);
  9506. break;
  9507. default:
  9508. cb(svgCode);
  9509. }
  9510. } else {
  9511. _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('CB = undefined!');
  9512. }
  9513. const node = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#d' + id).node();
  9514. if (node !== null && typeof node.remove === 'function') {
  9515. d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#d' + id).node().remove();
  9516. }
  9517. return svgCode;
  9518. };
  9519. const setConf = function (cnf) {
  9520. // Top level initially mermaid, gflow, sequenceDiagram and gantt
  9521. const lvl1Keys = Object.keys(cnf);
  9522. for (let i = 0; i < lvl1Keys.length; i++) {
  9523. if (typeof cnf[lvl1Keys[i]] === 'object' && cnf[lvl1Keys[i]] != null) {
  9524. const lvl2Keys = Object.keys(cnf[lvl1Keys[i]]);
  9525. for (let j = 0; j < lvl2Keys.length; j++) {
  9526. _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('Setting conf ', lvl1Keys[i], '-', lvl2Keys[j]);
  9527. if (typeof config[lvl1Keys[i]] === 'undefined') {
  9528. config[lvl1Keys[i]] = {};
  9529. }
  9530. _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('Setting config: ' + lvl1Keys[i] + ' ' + lvl2Keys[j] + ' to ' + cnf[lvl1Keys[i]][lvl2Keys[j]]);
  9531. config[lvl1Keys[i]][lvl2Keys[j]] = cnf[lvl1Keys[i]][lvl2Keys[j]];
  9532. }
  9533. } else {
  9534. config[lvl1Keys[i]] = cnf[lvl1Keys[i]];
  9535. }
  9536. }
  9537. };
  9538. function initialize(options) {
  9539. _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('Initializing mermaidAPI ', _package_json__WEBPACK_IMPORTED_MODULE_2__.version); // Update default config with options supplied at initialization
  9540. if (typeof options === 'object') {
  9541. setConf(options);
  9542. }
  9543. Object(_config__WEBPACK_IMPORTED_MODULE_3__["setConfig"])(config);
  9544. Object(_logger__WEBPACK_IMPORTED_MODULE_4__["setLogLevel"])(config.logLevel);
  9545. } // function getConfig () {
  9546. // console.warn('get config')
  9547. // return config
  9548. // }
  9549. const mermaidAPI = {
  9550. render,
  9551. parse,
  9552. initialize,
  9553. getConfig: _config__WEBPACK_IMPORTED_MODULE_3__["getConfig"]
  9554. };
  9555. /* harmony default export */ __webpack_exports__["default"] = (mermaidAPI);
  9556. /***/ }),
  9557. /***/ "./src/themes sync recursive ^\\.\\/.*\\/index\\.scss$":
  9558. /*!***********************************************!*\
  9559. !*** ./src/themes sync ^\.\/.*\/index\.scss$ ***!
  9560. \***********************************************/
  9561. /*! no static exports found */
  9562. /***/ (function(module, exports, __webpack_require__) {
  9563. var map = {
  9564. "./dark/index.scss": "./src/themes/dark/index.scss",
  9565. "./default/index.scss": "./src/themes/default/index.scss",
  9566. "./forest/index.scss": "./src/themes/forest/index.scss",
  9567. "./neutral/index.scss": "./src/themes/neutral/index.scss"
  9568. };
  9569. function webpackContext(req) {
  9570. var id = webpackContextResolve(req);
  9571. return __webpack_require__(id);
  9572. }
  9573. function webpackContextResolve(req) {
  9574. var id = map[req];
  9575. if(!(id + 1)) { // check for number or string
  9576. var e = new Error("Cannot find module '" + req + "'");
  9577. e.code = 'MODULE_NOT_FOUND';
  9578. throw e;
  9579. }
  9580. return id;
  9581. }
  9582. webpackContext.keys = function webpackContextKeys() {
  9583. return Object.keys(map);
  9584. };
  9585. webpackContext.resolve = webpackContextResolve;
  9586. module.exports = webpackContext;
  9587. webpackContext.id = "./src/themes sync recursive ^\\.\\/.*\\/index\\.scss$";
  9588. /***/ }),
  9589. /***/ "./src/themes/dark/index.scss":
  9590. /*!************************************!*\
  9591. !*** ./src/themes/dark/index.scss ***!
  9592. \************************************/
  9593. /*! no static exports found */
  9594. /***/ (function(module, exports, __webpack_require__) {
  9595. // css-to-string-loader: transforms styles from css-loader to a string output
  9596. // Get the styles
  9597. var styles = __webpack_require__(/*! !../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./index.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/dark/index.scss");
  9598. if (typeof styles === 'string') {
  9599. // Return an existing string
  9600. module.exports = styles;
  9601. } else {
  9602. // Call the custom toString method from css-loader module
  9603. module.exports = styles.toString();
  9604. }
  9605. /***/ }),
  9606. /***/ "./src/themes/default/index.scss":
  9607. /*!***************************************!*\
  9608. !*** ./src/themes/default/index.scss ***!
  9609. \***************************************/
  9610. /*! no static exports found */
  9611. /***/ (function(module, exports, __webpack_require__) {
  9612. // css-to-string-loader: transforms styles from css-loader to a string output
  9613. // Get the styles
  9614. var styles = __webpack_require__(/*! !../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./index.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/default/index.scss");
  9615. if (typeof styles === 'string') {
  9616. // Return an existing string
  9617. module.exports = styles;
  9618. } else {
  9619. // Call the custom toString method from css-loader module
  9620. module.exports = styles.toString();
  9621. }
  9622. /***/ }),
  9623. /***/ "./src/themes/forest/index.scss":
  9624. /*!**************************************!*\
  9625. !*** ./src/themes/forest/index.scss ***!
  9626. \**************************************/
  9627. /*! no static exports found */
  9628. /***/ (function(module, exports, __webpack_require__) {
  9629. // css-to-string-loader: transforms styles from css-loader to a string output
  9630. // Get the styles
  9631. var styles = __webpack_require__(/*! !../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./index.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/forest/index.scss");
  9632. if (typeof styles === 'string') {
  9633. // Return an existing string
  9634. module.exports = styles;
  9635. } else {
  9636. // Call the custom toString method from css-loader module
  9637. module.exports = styles.toString();
  9638. }
  9639. /***/ }),
  9640. /***/ "./src/themes/neutral/index.scss":
  9641. /*!***************************************!*\
  9642. !*** ./src/themes/neutral/index.scss ***!
  9643. \***************************************/
  9644. /*! no static exports found */
  9645. /***/ (function(module, exports, __webpack_require__) {
  9646. // css-to-string-loader: transforms styles from css-loader to a string output
  9647. // Get the styles
  9648. var styles = __webpack_require__(/*! !../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./index.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/neutral/index.scss");
  9649. if (typeof styles === 'string') {
  9650. // Return an existing string
  9651. module.exports = styles;
  9652. } else {
  9653. // Call the custom toString method from css-loader module
  9654. module.exports = styles.toString();
  9655. }
  9656. /***/ }),
  9657. /***/ "./src/utils.js":
  9658. /*!**********************!*\
  9659. !*** ./src/utils.js ***!
  9660. \**********************/
  9661. /*! exports provided: detectType, isSubstringInArray, interpolateToCurve, default */
  9662. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  9663. "use strict";
  9664. __webpack_require__.r(__webpack_exports__);
  9665. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detectType", function() { return detectType; });
  9666. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSubstringInArray", function() { return isSubstringInArray; });
  9667. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpolateToCurve", function() { return interpolateToCurve; });
  9668. /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
  9669. /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
  9670. /* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./logger */ "./src/logger.js");
  9671. /**
  9672. * @function detectType
  9673. * Detects the type of the graph text.
  9674. * ```mermaid
  9675. * graph LR
  9676. * a-->b
  9677. * b-->c
  9678. * c-->d
  9679. * d-->e
  9680. * e-->f
  9681. * f-->g
  9682. * g-->h
  9683. * ```
  9684. *
  9685. * @param {string} text The text defining the graph
  9686. * @returns {string} A graph definition key
  9687. */
  9688. const detectType = function (text) {
  9689. text = text.replace(/^\s*%%.*\n/g, '\n');
  9690. _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('Detecting diagram type based on the text ' + text);
  9691. if (text.match(/^\s*sequenceDiagram/)) {
  9692. return 'sequence';
  9693. }
  9694. if (text.match(/^\s*gantt/)) {
  9695. return 'gantt';
  9696. }
  9697. if (text.match(/^\s*classDiagram/)) {
  9698. return 'class';
  9699. }
  9700. if (text.match(/^\s*gitGraph/)) {
  9701. return 'git';
  9702. }
  9703. if (text.match(/^\s*info/)) {
  9704. return 'info';
  9705. }
  9706. return 'flowchart';
  9707. };
  9708. /**
  9709. * @function isSubstringInArray
  9710. * Detects whether a substring in present in a given array
  9711. * @param {string} str The substring to detect
  9712. * @param {array} arr The array to search
  9713. * @returns {number} the array index containing the substring or -1 if not present
  9714. **/
  9715. const isSubstringInArray = function (str, arr) {
  9716. for (let i = 0; i < arr.length; i++) {
  9717. if (arr[i].match(str)) return i;
  9718. }
  9719. return -1;
  9720. };
  9721. const interpolateToCurve = (interpolate, defaultCurve) => {
  9722. if (!interpolate) {
  9723. return defaultCurve;
  9724. }
  9725. const curveName = `curve${interpolate.charAt(0).toUpperCase() + interpolate.slice(1)}`;
  9726. return d3__WEBPACK_IMPORTED_MODULE_0__[curveName] || defaultCurve;
  9727. };
  9728. /* harmony default export */ __webpack_exports__["default"] = ({
  9729. detectType,
  9730. isSubstringInArray,
  9731. interpolateToCurve
  9732. });
  9733. /***/ }),
  9734. /***/ "@braintree/sanitize-url":
  9735. /*!******************************************!*\
  9736. !*** external "@braintree/sanitize-url" ***!
  9737. \******************************************/
  9738. /*! no static exports found */
  9739. /***/ (function(module, exports) {
  9740. module.exports = require("@braintree/sanitize-url");
  9741. /***/ }),
  9742. /***/ "d3":
  9743. /*!*********************!*\
  9744. !*** external "d3" ***!
  9745. \*********************/
  9746. /*! no static exports found */
  9747. /***/ (function(module, exports) {
  9748. module.exports = require("d3");
  9749. /***/ }),
  9750. /***/ "dagre-d3-renderer":
  9751. /*!************************************!*\
  9752. !*** external "dagre-d3-renderer" ***!
  9753. \************************************/
  9754. /*! no static exports found */
  9755. /***/ (function(module, exports) {
  9756. module.exports = require("dagre-d3-renderer");
  9757. /***/ }),
  9758. /***/ "dagre-d3-renderer/lib/label/add-html-label.js":
  9759. /*!****************************************************************!*\
  9760. !*** external "dagre-d3-renderer/lib/label/add-html-label.js" ***!
  9761. \****************************************************************/
  9762. /*! no static exports found */
  9763. /***/ (function(module, exports) {
  9764. module.exports = require("dagre-d3-renderer/lib/label/add-html-label.js");
  9765. /***/ }),
  9766. /***/ "dagre-layout":
  9767. /*!*******************************!*\
  9768. !*** external "dagre-layout" ***!
  9769. \*******************************/
  9770. /*! no static exports found */
  9771. /***/ (function(module, exports) {
  9772. module.exports = require("dagre-layout");
  9773. /***/ }),
  9774. /***/ "graphlibrary":
  9775. /*!*******************************!*\
  9776. !*** external "graphlibrary" ***!
  9777. \*******************************/
  9778. /*! no static exports found */
  9779. /***/ (function(module, exports) {
  9780. module.exports = require("graphlibrary");
  9781. /***/ }),
  9782. /***/ "he":
  9783. /*!*********************!*\
  9784. !*** external "he" ***!
  9785. \*********************/
  9786. /*! no static exports found */
  9787. /***/ (function(module, exports) {
  9788. module.exports = require("he");
  9789. /***/ }),
  9790. /***/ "lodash":
  9791. /*!*************************!*\
  9792. !*** external "lodash" ***!
  9793. \*************************/
  9794. /*! no static exports found */
  9795. /***/ (function(module, exports) {
  9796. module.exports = require("lodash");
  9797. /***/ }),
  9798. /***/ "moment-mini":
  9799. /*!******************************!*\
  9800. !*** external "moment-mini" ***!
  9801. \******************************/
  9802. /*! no static exports found */
  9803. /***/ (function(module, exports) {
  9804. module.exports = require("moment-mini");
  9805. /***/ }),
  9806. /***/ "scope-css":
  9807. /*!****************************!*\
  9808. !*** external "scope-css" ***!
  9809. \****************************/
  9810. /*! no static exports found */
  9811. /***/ (function(module, exports) {
  9812. module.exports = require("scope-css");
  9813. /***/ })
  9814. /******/ })["default"];
  9815. });
  9816. //# sourceMappingURL=mermaid.core.js.map