1 | (function webpackUniversalModuleDefinition(root, factory) {
|
2 | if(typeof exports === 'object' && typeof module === 'object')
|
3 | module.exports = factory(require("moment"), require("lodash/each"), require("he"), require("d3"), require("dagre-d3-renderer"), require("dagre-layout"), require("lodash/extend"), require("lodash/isArray"), require("lodash/find"), require("lodash/isString"), require("lodash/orderBy"), require("lodash/map"), require("lodash/uniqBy"), require("lodash/maxBy"));
|
4 | else if(typeof define === 'function' && define.amd)
|
5 | define(["moment", "lodash/each", "he", "d3", "dagre-d3-renderer", "dagre-layout", "lodash/extend", "lodash/isArray", "lodash/find", "lodash/isString", "lodash/orderBy", "lodash/map", "lodash/uniqBy", "lodash/maxBy"], factory);
|
6 | else if(typeof exports === 'object')
|
7 | exports["mermaid"] = factory(require("moment"), require("lodash/each"), require("he"), require("d3"), require("dagre-d3-renderer"), require("dagre-layout"), require("lodash/extend"), require("lodash/isArray"), require("lodash/find"), require("lodash/isString"), require("lodash/orderBy"), require("lodash/map"), require("lodash/uniqBy"), require("lodash/maxBy"));
|
8 | else
|
9 | root["mermaid"] = factory(root["moment"], root["lodash/each"], root["he"], root["d3"], root["dagre-d3-renderer"], root["dagre-layout"], root["lodash/extend"], root["lodash/isArray"], root["lodash/find"], root["lodash/isString"], root["lodash/orderBy"], root["lodash/map"], root["lodash/uniqBy"], root["lodash/maxBy"]);
|
10 | })(this, function(__WEBPACK_EXTERNAL_MODULE_7__, __WEBPACK_EXTERNAL_MODULE_21__, __WEBPACK_EXTERNAL_MODULE_26__, __WEBPACK_EXTERNAL_MODULE_28__, __WEBPACK_EXTERNAL_MODULE_30__, __WEBPACK_EXTERNAL_MODULE_36__, __WEBPACK_EXTERNAL_MODULE_38__, __WEBPACK_EXTERNAL_MODULE_39__, __WEBPACK_EXTERNAL_MODULE_40__, __WEBPACK_EXTERNAL_MODULE_41__, __WEBPACK_EXTERNAL_MODULE_42__, __WEBPACK_EXTERNAL_MODULE_43__, __WEBPACK_EXTERNAL_MODULE_44__, __WEBPACK_EXTERNAL_MODULE_45__) {
|
11 | return (function(modules) {
|
12 |
|
13 | var installedModules = {};
|
14 |
|
15 |
|
16 | function __webpack_require__(moduleId) {
|
17 |
|
18 |
|
19 | if(installedModules[moduleId]) {
|
20 | return installedModules[moduleId].exports;
|
21 | }
|
22 |
|
23 | var module = installedModules[moduleId] = {
|
24 | i: moduleId,
|
25 | l: false,
|
26 | exports: {}
|
27 | };
|
28 |
|
29 |
|
30 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
31 |
|
32 |
|
33 | module.l = true;
|
34 |
|
35 |
|
36 | return module.exports;
|
37 | }
|
38 |
|
39 |
|
40 |
|
41 | __webpack_require__.m = modules;
|
42 |
|
43 |
|
44 | __webpack_require__.c = installedModules;
|
45 |
|
46 |
|
47 | __webpack_require__.d = function(exports, name, getter) {
|
48 | if(!__webpack_require__.o(exports, name)) {
|
49 | Object.defineProperty(exports, name, {
|
50 | configurable: false,
|
51 | enumerable: true,
|
52 | get: getter
|
53 | /******/ });
|
54 | /******/ }
|
55 | /******/ };
|
56 | /******/
|
57 | /******/ // getDefaultExport function for compatibility with non-harmony modules
|
58 | /******/ __webpack_require__.n = function(module) {
|
59 | var getter = module && module.__esModule ?
|
60 | function getDefault() { return module['default']; } :
|
61 | function getModuleExports() { return module; };
|
62 | __webpack_require__.d(getter, 'a', getter);
|
63 | return getter;
|
64 | };
|
65 |
|
66 |
|
67 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
68 |
|
69 |
|
70 | __webpack_require__.p = "";
|
71 |
|
72 |
|
73 | return __webpack_require__(__webpack_require__.s = 24);
|
74 | })
|
75 |
|
76 | ([
|
77 |
|
78 | (function(module, exports, __webpack_require__) {
|
79 |
|
80 | "use strict";
|
81 |
|
82 |
|
83 | Object.defineProperty(exports, "__esModule", {
|
84 | value: true
|
85 | });
|
86 | exports.setLogLevel = exports.logger = exports.LEVELS = undefined;
|
87 |
|
88 | var _moment = __webpack_require__(7);
|
89 |
|
90 | var _moment2 = _interopRequireDefault(_moment);
|
91 |
|
92 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
93 |
|
94 | var LEVELS = exports.LEVELS = {
|
95 | debug: 1,
|
96 | info: 2,
|
97 | warn: 3,
|
98 | error: 4,
|
99 | fatal: 5
|
100 | };
|
101 |
|
102 | var logger = exports.logger = {
|
103 | debug: function debug() {},
|
104 | info: function info() {},
|
105 | warn: function warn() {},
|
106 | error: function error() {},
|
107 | fatal: function fatal() {}
|
108 | };
|
109 |
|
110 | var setLogLevel = exports.setLogLevel = function setLogLevel(level) {
|
111 | logger.debug = function () {};
|
112 | logger.info = function () {};
|
113 | logger.warn = function () {};
|
114 | logger.error = function () {};
|
115 | logger.fatal = function () {};
|
116 | if (level <= LEVELS.fatal) {
|
117 | logger.fatal = console.log.bind(console, '\x1b[35m', format('FATAL'));
|
118 | }
|
119 | if (level <= LEVELS.error) {
|
120 | logger.error = console.log.bind(console, '\x1b[31m', format('ERROR'));
|
121 | }
|
122 | if (level <= LEVELS.warn) {
|
123 | logger.warn = console.log.bind(console, '\x1B[33m', format('WARN'));
|
124 | }
|
125 | if (level <= LEVELS.info) {
|
126 | logger.info = console.log.bind(console, '\x1b[34m', format('INFO'));
|
127 | }
|
128 | if (level <= LEVELS.debug) {
|
129 | logger.debug = console.log.bind(console, '\x1b[32m', format('DEBUG'));
|
130 | }
|
131 | };
|
132 |
|
133 | var format = function format(level) {
|
134 | var time = (0, _moment2.default)().format('HH:mm:ss.SSS');
|
135 | return time + ' : ' + level + ' : ';
|
136 | };
|
137 |
|
138 | }),
|
139 |
|
140 | (function(module, exports, __webpack_require__) {
|
141 |
|
142 | "use strict";
|
143 |
|
144 |
|
145 | Object.defineProperty(exports, "__esModule", {
|
146 | value: true
|
147 | });
|
148 |
|
149 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
150 |
|
151 | var _d = __webpack_require__(28);
|
152 |
|
153 | var _d2 = _interopRequireDefault(_d);
|
154 |
|
155 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
156 |
|
157 |
|
158 |
|
159 |
|
160 |
|
161 |
|
162 |
|
163 |
|
164 |
|
165 |
|
166 |
|
167 | (function () {
|
168 |
|
169 |
|
170 |
|
171 |
|
172 | var forceWrapMethod = false;
|
173 | forceWrapMethod = 'tspans';
|
174 |
|
175 |
|
176 |
|
177 |
|
178 |
|
179 | if (_d2.default.selection.prototype.textwrap) {
|
180 | return false;
|
181 | }
|
182 |
|
183 |
|
184 |
|
185 |
|
186 | if (typeof forceWrapMethod === 'undefined') {
|
187 | forceWrapMethod = false;
|
188 | }
|
189 |
|
190 |
|
191 |
|
192 | _d2.default.selection.prototype.textwrap = _d2.default.selection.enter.prototype.textwrap = function (bounds, padding) {
|
193 |
|
194 | padding = parseInt(padding) || 0;
|
195 |
|
196 |
|
197 |
|
198 | var selection = this;
|
199 |
|
200 |
|
201 | var returnValue;
|
202 |
|
203 |
|
204 |
|
205 | var extractBounds = function extractBounds(bounds) {
|
206 |
|
207 | var boundingRect = bounds[0][0];
|
208 |
|
209 | var elementType = boundingRect.tagName.toString();
|
210 |
|
211 | if (elementType !== 'rect') {
|
212 | return false;
|
213 |
|
214 | } else {
|
215 | var boundsExtracted = {};
|
216 | boundsExtracted.x = _d2.default.select(boundingRect).attr('x') || 0;
|
217 | boundsExtracted.y = _d2.default.select(boundingRect).attr('y') || 0;
|
218 | boundsExtracted.width = _d2.default.select(boundingRect).attr('width') || 0;
|
219 | boundsExtracted.height = _d2.default.select(boundingRect).attr('height') || 0;
|
220 |
|
221 | boundsExtracted.attr = bounds.attr;
|
222 | }
|
223 | return boundsExtracted;
|
224 | };
|
225 |
|
226 |
|
227 |
|
228 |
|
229 | var verifyBounds = function verifyBounds(bounds) {
|
230 |
|
231 |
|
232 |
|
233 |
|
234 | if (!bounds.attr) {
|
235 | bounds.attr = function (property) {
|
236 | if (this[property]) {
|
237 | return this[property];
|
238 | }
|
239 | };
|
240 | }
|
241 |
|
242 |
|
243 | if ((typeof bounds === 'undefined' ? 'undefined' : _typeof(bounds)) === 'object' && typeof bounds.x !== 'undefined' && typeof bounds.y !== 'undefined' && typeof bounds.width !== 'undefined' && typeof bounds.height !== 'undefined'
|
244 |
|
245 | ) {
|
246 |
|
247 | return bounds;
|
248 |
|
249 |
|
250 | } else if (
|
251 |
|
252 | typeof Array.isArray === 'function' && Array.isArray(bounds) ||
|
253 |
|
254 |
|
255 | Object.prototype.toString.call(bounds) === '[object Array]') {
|
256 |
|
257 |
|
258 | var extractedBounds = extractBounds(bounds);
|
259 | return extractedBounds;
|
260 | } else {
|
261 |
|
262 |
|
263 |
|
264 | return false;
|
265 | }
|
266 | };
|
267 |
|
268 | var applyPadding = function applyPadding(bounds, padding) {
|
269 | var paddedBounds = bounds;
|
270 | if (padding !== 0) {
|
271 | paddedBounds.x = parseInt(paddedBounds.x) + padding;
|
272 | paddedBounds.y = parseInt(paddedBounds.y) + padding;
|
273 | paddedBounds.width -= padding * 2;
|
274 | paddedBounds.height -= padding * 2;
|
275 | }
|
276 | return paddedBounds;
|
277 | };
|
278 |
|
279 |
|
280 | var verifiedBounds = verifyBounds(bounds);
|
281 |
|
282 |
|
283 | if (padding) {
|
284 | verifiedBounds = applyPadding(verifiedBounds, padding);
|
285 | }
|
286 |
|
287 |
|
288 | if (
|
289 |
|
290 | selection.length === 0 ||
|
291 |
|
292 | !_d2.default ||
|
293 |
|
294 | !bounds ||
|
295 |
|
296 | !verifiedBounds) {
|
297 |
|
298 |
|
299 |
|
300 | if (selection) {
|
301 | return selection;
|
302 |
|
303 |
|
304 |
|
305 | } else {
|
306 | return false;
|
307 | }
|
308 |
|
309 |
|
310 | } else {
|
311 |
|
312 |
|
313 |
|
314 |
|
315 |
|
316 | bounds = verifiedBounds;
|
317 |
|
318 |
|
319 | var wrapWithForeignobjects = function wrapWithForeignobjects(item) {
|
320 |
|
321 | var parent = _d2.default.select(item[0].parentNode);
|
322 | var textNode = parent.select('text');
|
323 | var styledLineHeight = textNode.style('line-height');
|
324 |
|
325 | var textToWrap = textNode.text();
|
326 |
|
327 | textNode.remove();
|
328 | var foreignObject = parent.append('foreignObject');
|
329 |
|
330 | foreignObject.attr('requiredFeatures', 'http://www.w3.org/TR/SVG11/feature#Extensibility').attr('x', bounds.x).attr('y', bounds.y).attr('width', bounds.width).attr('height', bounds.height);
|
331 |
|
332 | var wrapDiv = foreignObject.append('xhtml:div')
|
333 |
|
334 |
|
335 |
|
336 |
|
337 |
|
338 | .attr('class', 'wrapped');
|
339 |
|
340 | wrapDiv.style('height', bounds.height).style('width', bounds.width)
|
341 |
|
342 | .html(textToWrap);
|
343 | if (styledLineHeight) {
|
344 | wrapDiv.style('line-height', styledLineHeight);
|
345 | }
|
346 | returnValue = parent.select('foreignObject');
|
347 | };
|
348 |
|
349 |
|
350 | var wrapWithTspans = function wrapWithTspans(item) {
|
351 |
|
352 | var textNode = item[0];
|
353 | var parent = textNode.parentNode;
|
354 | var textNodeSelected = _d2.default.select(textNode);
|
355 |
|
356 | var textNodeHeight = textNode.getBBox().height;
|
357 | var textNodeWidth = textNode.getBBox().width;
|
358 |
|
359 |
|
360 | var lineHeight;
|
361 | var renderedLineHeight = textNodeHeight;
|
362 | var styledLineHeight = textNodeSelected.style('line-height');
|
363 | if (styledLineHeight && parseInt(styledLineHeight)) {
|
364 | lineHeight = parseInt(styledLineHeight.replace('px', ''));
|
365 | } else {
|
366 | lineHeight = renderedLineHeight;
|
367 | }
|
368 |
|
369 |
|
370 | if (textNodeWidth > bounds.width) {
|
371 |
|
372 |
|
373 |
|
374 |
|
375 | var textToWrap = textNodeSelected.text();
|
376 | textNodeSelected.text('');
|
377 | if (textToWrap) {
|
378 |
|
379 |
|
380 | var breakDelimiter;
|
381 |
|
382 | var textToWrapArray;
|
383 | if (textToWrap.indexOf(' ') !== -1) {
|
384 | breakDelimiter = ' ';
|
385 | textToWrapArray = textToWrap.split(' ');
|
386 | } else {
|
387 |
|
388 |
|
389 |
|
390 |
|
391 | breakDelimiter = '';
|
392 | var stringLength = textToWrap.length;
|
393 | var numberOfSubstrings = Math.ceil(textNodeWidth / bounds.width);
|
394 | var spliceInterval = Math.floor(stringLength / numberOfSubstrings);
|
395 | if (!(spliceInterval * numberOfSubstrings >= stringLength)) {
|
396 | numberOfSubstrings++;
|
397 | }
|
398 | textToWrapArray = [];
|
399 | var substring;
|
400 | var startPosition;
|
401 | for (var i = 0; i < numberOfSubstrings; i++) {
|
402 | startPosition = i * spliceInterval;
|
403 | substring = textToWrap.substr(startPosition, spliceInterval);
|
404 | textToWrapArray.push(substring);
|
405 | }
|
406 | }
|
407 |
|
408 |
|
409 |
|
410 |
|
411 | var substrings = [];
|
412 |
|
413 |
|
414 |
|
415 |
|
416 |
|
417 |
|
418 |
|
419 | var totalOffset = 0;
|
420 |
|
421 | var temp = {};
|
422 |
|
423 |
|
424 | for (i = 0; i < textToWrapArray.length; i++) {
|
425 | var word = textToWrapArray[i];
|
426 | var previousString = textNodeSelected.text();
|
427 | var previousWidth = textNode.getComputedTextLength();
|
428 |
|
429 |
|
430 | var newstring;
|
431 | if (previousString) {
|
432 | newstring = previousString + breakDelimiter + word;
|
433 | } else {
|
434 | newstring = word;
|
435 | }
|
436 |
|
437 |
|
438 | textNodeSelected.text(newstring);
|
439 | var newWidth = textNode.getComputedTextLength();
|
440 |
|
441 |
|
442 |
|
443 |
|
444 |
|
445 |
|
446 |
|
447 |
|
448 | if (newWidth > bounds.width) {
|
449 | if (previousString && previousString !== '') {
|
450 | totalOffset = totalOffset + previousWidth;
|
451 | temp = { string: previousString, width: previousWidth, offset: totalOffset };
|
452 | substrings.push(temp);
|
453 | textNodeSelected.text('');
|
454 | textNodeSelected.text(word);
|
455 |
|
456 | if (i === textToWrapArray.length - 1) {
|
457 | newstring = word;
|
458 | textNodeSelected.text(newstring);
|
459 | newWidth = textNode.getComputedTextLength();
|
460 | }
|
461 | }
|
462 | }
|
463 |
|
464 |
|
465 |
|
466 | if (i === textToWrapArray.length - 1) {
|
467 | textNodeSelected.text('');
|
468 | var finalString = newstring;
|
469 | if (finalString && finalString !== '') {
|
470 | if (newWidth - totalOffset > 0) {
|
471 | newWidth = newWidth - totalOffset;
|
472 | }
|
473 | temp = { string: finalString, width: newWidth, offset: totalOffset };
|
474 | substrings.push(temp);
|
475 | }
|
476 | }
|
477 | }
|
478 |
|
479 |
|
480 | var currentTspan;
|
481 |
|
482 |
|
483 |
|
484 | textNodeSelected.text('');
|
485 | for (i = 0; i < substrings.length; i++) {
|
486 | substring = substrings[i].string;
|
487 |
|
488 |
|
489 | if (i * lineHeight < bounds.height - lineHeight * 1.5) {
|
490 | currentTspan = textNodeSelected.append('tspan').text(substring);
|
491 |
|
492 | currentTspan.attr('dy', function (d) {
|
493 | if (i > 0) {
|
494 | return lineHeight;
|
495 | }
|
496 | });
|
497 |
|
498 |
|
499 |
|
500 | currentTspan.attr('x', function () {
|
501 | var xOffset = bounds.x;
|
502 | if (padding) {
|
503 | xOffset += padding;
|
504 | }
|
505 | return xOffset;
|
506 | });
|
507 | }
|
508 | }
|
509 | }
|
510 | }
|
511 |
|
512 | textNodeSelected.attr('y', function () {
|
513 | var yOffset = bounds.y;
|
514 |
|
515 |
|
516 |
|
517 | if (lineHeight) {
|
518 | yOffset += lineHeight;
|
519 | }
|
520 |
|
521 | if (padding) {
|
522 | yOffset += padding;
|
523 | }
|
524 | return yOffset;
|
525 | });
|
526 |
|
527 | textNodeSelected.attr('x', function () {
|
528 | var xOffset = bounds.x;
|
529 | if (padding) {
|
530 | xOffset += padding;
|
531 | }
|
532 | return xOffset;
|
533 | });
|
534 |
|
535 |
|
536 |
|
537 | returnValue = _d2.default.select(parent).selectAll('text');
|
538 | };
|
539 |
|
540 |
|
541 |
|
542 | var wrapMethod;
|
543 |
|
544 |
|
545 |
|
546 | if (forceWrapMethod) {
|
547 | if (forceWrapMethod === 'foreignobjects') {
|
548 | wrapMethod = wrapWithForeignobjects;
|
549 | } else if (forceWrapMethod === 'tspans') {
|
550 | wrapMethod = wrapWithTspans;
|
551 | }
|
552 | }
|
553 |
|
554 |
|
555 |
|
556 |
|
557 | if (!forceWrapMethod) {
|
558 | if (typeof SVGForeignObjectElement !== 'undefined') {
|
559 | wrapMethod = wrapWithForeignobjects;
|
560 | } else {
|
561 | wrapMethod = wrapWithTspans;
|
562 | }
|
563 | }
|
564 |
|
565 |
|
566 |
|
567 | for (var i = 0; i < selection.length; i++) {
|
568 | var item = selection[i];
|
569 | wrapMethod(item);
|
570 | }
|
571 |
|
572 |
|
573 |
|
574 | return returnValue;
|
575 | }
|
576 | };
|
577 | })();
|
578 |
|
579 | exports.default = _d2.default;
|
580 |
|
581 | }),
|
582 |
|
583 | (function(module, exports) {
|
584 |
|
585 |
|
586 | var process = module.exports = {};
|
587 |
|
588 |
|
589 |
|
590 |
|
591 |
|
592 |
|
593 | var cachedSetTimeout;
|
594 | var cachedClearTimeout;
|
595 |
|
596 | function defaultSetTimout() {
|
597 | throw new Error('setTimeout has not been defined');
|
598 | }
|
599 | function defaultClearTimeout () {
|
600 | throw new Error('clearTimeout has not been defined');
|
601 | }
|
602 | (function () {
|
603 | try {
|
604 | if (typeof setTimeout === 'function') {
|
605 | cachedSetTimeout = setTimeout;
|
606 | } else {
|
607 | cachedSetTimeout = defaultSetTimout;
|
608 | }
|
609 | } catch (e) {
|
610 | cachedSetTimeout = defaultSetTimout;
|
611 | }
|
612 | try {
|
613 | if (typeof clearTimeout === 'function') {
|
614 | cachedClearTimeout = clearTimeout;
|
615 | } else {
|
616 | cachedClearTimeout = defaultClearTimeout;
|
617 | }
|
618 | } catch (e) {
|
619 | cachedClearTimeout = defaultClearTimeout;
|
620 | }
|
621 | } ())
|
622 | function runTimeout(fun) {
|
623 | if (cachedSetTimeout === setTimeout) {
|
624 |
|
625 | return setTimeout(fun, 0);
|
626 | }
|
627 |
|
628 | if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
629 | cachedSetTimeout = setTimeout;
|
630 | return setTimeout(fun, 0);
|
631 | }
|
632 | try {
|
633 |
|
634 | return cachedSetTimeout(fun, 0);
|
635 | } catch(e){
|
636 | try {
|
637 |
|
638 | return cachedSetTimeout.call(null, fun, 0);
|
639 | } catch(e){
|
640 |
|
641 | return cachedSetTimeout.call(this, fun, 0);
|
642 | }
|
643 | }
|
644 |
|
645 |
|
646 | }
|
647 | function runClearTimeout(marker) {
|
648 | if (cachedClearTimeout === clearTimeout) {
|
649 |
|
650 | return clearTimeout(marker);
|
651 | }
|
652 |
|
653 | if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
654 | cachedClearTimeout = clearTimeout;
|
655 | return clearTimeout(marker);
|
656 | }
|
657 | try {
|
658 |
|
659 | return cachedClearTimeout(marker);
|
660 | } catch (e){
|
661 | try {
|
662 |
|
663 | return cachedClearTimeout.call(null, marker);
|
664 | } catch (e){
|
665 |
|
666 |
|
667 | return cachedClearTimeout.call(this, marker);
|
668 | }
|
669 | }
|
670 |
|
671 |
|
672 |
|
673 | }
|
674 | var queue = [];
|
675 | var draining = false;
|
676 | var currentQueue;
|
677 | var queueIndex = -1;
|
678 |
|
679 | function cleanUpNextTick() {
|
680 | if (!draining || !currentQueue) {
|
681 | return;
|
682 | }
|
683 | draining = false;
|
684 | if (currentQueue.length) {
|
685 | queue = currentQueue.concat(queue);
|
686 | } else {
|
687 | queueIndex = -1;
|
688 | }
|
689 | if (queue.length) {
|
690 | drainQueue();
|
691 | }
|
692 | }
|
693 |
|
694 | function drainQueue() {
|
695 | if (draining) {
|
696 | return;
|
697 | }
|
698 | var timeout = runTimeout(cleanUpNextTick);
|
699 | draining = true;
|
700 |
|
701 | var len = queue.length;
|
702 | while(len) {
|
703 | currentQueue = queue;
|
704 | queue = [];
|
705 | while (++queueIndex < len) {
|
706 | if (currentQueue) {
|
707 | currentQueue[queueIndex].run();
|
708 | }
|
709 | }
|
710 | queueIndex = -1;
|
711 | len = queue.length;
|
712 | }
|
713 | currentQueue = null;
|
714 | draining = false;
|
715 | runClearTimeout(timeout);
|
716 | }
|
717 |
|
718 | process.nextTick = function (fun) {
|
719 | var args = new Array(arguments.length - 1);
|
720 | if (arguments.length > 1) {
|
721 | for (var i = 1; i < arguments.length; i++) {
|
722 | args[i - 1] = arguments[i];
|
723 | }
|
724 | }
|
725 | queue.push(new Item(fun, args));
|
726 | if (queue.length === 1 && !draining) {
|
727 | runTimeout(drainQueue);
|
728 | }
|
729 | };
|
730 |
|
731 |
|
732 | function Item(fun, array) {
|
733 | this.fun = fun;
|
734 | this.array = array;
|
735 | }
|
736 | Item.prototype.run = function () {
|
737 | this.fun.apply(null, this.array);
|
738 | };
|
739 | process.title = 'browser';
|
740 | process.browser = true;
|
741 | process.env = {};
|
742 | process.argv = [];
|
743 | process.version = '';
|
744 | process.versions = {};
|
745 |
|
746 | function noop() {}
|
747 |
|
748 | process.on = noop;
|
749 | process.addListener = noop;
|
750 | process.once = noop;
|
751 | process.off = noop;
|
752 | process.removeListener = noop;
|
753 | process.removeAllListeners = noop;
|
754 | process.emit = noop;
|
755 | process.prependListener = noop;
|
756 | process.prependOnceListener = noop;
|
757 |
|
758 | process.listeners = function (name) { return [] }
|
759 |
|
760 | process.binding = function (name) {
|
761 | throw new Error('process.binding is not supported');
|
762 | };
|
763 |
|
764 | process.cwd = function () { return '/' };
|
765 | process.chdir = function (dir) {
|
766 | throw new Error('process.chdir is not supported');
|
767 | };
|
768 | process.umask = function() { return 0; };
|
769 |
|
770 |
|
771 | }),
|
772 |
|
773 | (function(module, exports) {
|
774 |
|
775 | module.exports = function(module) {
|
776 | if(!module.webpackPolyfill) {
|
777 | module.deprecate = function() {};
|
778 | module.paths = [];
|
779 |
|
780 | if(!module.children) module.children = [];
|
781 | Object.defineProperty(module, "loaded", {
|
782 | enumerable: true,
|
783 | get: function() {
|
784 | return module.l;
|
785 | }
|
786 | });
|
787 | Object.defineProperty(module, "id", {
|
788 | enumerable: true,
|
789 | get: function() {
|
790 | return module.i;
|
791 | }
|
792 | });
|
793 | module.webpackPolyfill = 1;
|
794 | }
|
795 | return module;
|
796 | };
|
797 |
|
798 |
|
799 | }),
|
800 |
|
801 | (function(module, exports) {
|
802 |
|
803 |
|
804 |
|
805 | }),
|
806 |
|
807 | (function(module, exports, __webpack_require__) {
|
808 |
|
809 | (function(process) {
|
810 |
|
811 |
|
812 |
|
813 |
|
814 |
|
815 |
|
816 |
|
817 |
|
818 |
|
819 |
|
820 |
|
821 |
|
822 |
|
823 |
|
824 |
|
825 |
|
826 |
|
827 |
|
828 |
|
829 |
|
830 |
|
831 |
|
832 |
|
833 |
|
834 | function normalizeArray(parts, allowAboveRoot) {
|
835 |
|
836 | var up = 0;
|
837 | for (var i = parts.length - 1; i >= 0; i--) {
|
838 | var last = parts[i];
|
839 | if (last === '.') {
|
840 | parts.splice(i, 1);
|
841 | } else if (last === '..') {
|
842 | parts.splice(i, 1);
|
843 | up++;
|
844 | } else if (up) {
|
845 | parts.splice(i, 1);
|
846 | up--;
|
847 | }
|
848 | }
|
849 |
|
850 |
|
851 | if (allowAboveRoot) {
|
852 | for (; up--; up) {
|
853 | parts.unshift('..');
|
854 | }
|
855 | }
|
856 |
|
857 | return parts;
|
858 | }
|
859 |
|
860 |
|
861 |
|
862 | var splitPathRe =
|
863 | /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
|
864 | var splitPath = function(filename) {
|
865 | return splitPathRe.exec(filename).slice(1);
|
866 | };
|
867 |
|
868 |
|
869 |
|
870 | exports.resolve = function() {
|
871 | var resolvedPath = '',
|
872 | resolvedAbsolute = false;
|
873 |
|
874 | for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
875 | var path = (i >= 0) ? arguments[i] : process.cwd();
|
876 |
|
877 |
|
878 | if (typeof path !== 'string') {
|
879 | throw new TypeError('Arguments to path.resolve must be strings');
|
880 | } else if (!path) {
|
881 | continue;
|
882 | }
|
883 |
|
884 | resolvedPath = path + '/' + resolvedPath;
|
885 | resolvedAbsolute = path.charAt(0) === '/';
|
886 | }
|
887 |
|
888 |
|
889 |
|
890 |
|
891 |
|
892 | resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
|
893 | return !!p;
|
894 | }), !resolvedAbsolute).join('/');
|
895 |
|
896 | return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
|
897 | };
|
898 |
|
899 |
|
900 |
|
901 | exports.normalize = function(path) {
|
902 | var isAbsolute = exports.isAbsolute(path),
|
903 | trailingSlash = substr(path, -1) === '/';
|
904 |
|
905 |
|
906 | path = normalizeArray(filter(path.split('/'), function(p) {
|
907 | return !!p;
|
908 | }), !isAbsolute).join('/');
|
909 |
|
910 | if (!path && !isAbsolute) {
|
911 | path = '.';
|
912 | }
|
913 | if (path && trailingSlash) {
|
914 | path += '/';
|
915 | }
|
916 |
|
917 | return (isAbsolute ? '/' : '') + path;
|
918 | };
|
919 |
|
920 |
|
921 | exports.isAbsolute = function(path) {
|
922 | return path.charAt(0) === '/';
|
923 | };
|
924 |
|
925 |
|
926 | exports.join = function() {
|
927 | var paths = Array.prototype.slice.call(arguments, 0);
|
928 | return exports.normalize(filter(paths, function(p, index) {
|
929 | if (typeof p !== 'string') {
|
930 | throw new TypeError('Arguments to path.join must be strings');
|
931 | }
|
932 | return p;
|
933 | }).join('/'));
|
934 | };
|
935 |
|
936 |
|
937 |
|
938 |
|
939 | exports.relative = function(from, to) {
|
940 | from = exports.resolve(from).substr(1);
|
941 | to = exports.resolve(to).substr(1);
|
942 |
|
943 | function trim(arr) {
|
944 | var start = 0;
|
945 | for (; start < arr.length; start++) {
|
946 | if (arr[start] !== '') break;
|
947 | }
|
948 |
|
949 | var end = arr.length - 1;
|
950 | for (; end >= 0; end--) {
|
951 | if (arr[end] !== '') break;
|
952 | }
|
953 |
|
954 | if (start > end) return [];
|
955 | return arr.slice(start, end - start + 1);
|
956 | }
|
957 |
|
958 | var fromParts = trim(from.split('/'));
|
959 | var toParts = trim(to.split('/'));
|
960 |
|
961 | var length = Math.min(fromParts.length, toParts.length);
|
962 | var samePartsLength = length;
|
963 | for (var i = 0; i < length; i++) {
|
964 | if (fromParts[i] !== toParts[i]) {
|
965 | samePartsLength = i;
|
966 | break;
|
967 | }
|
968 | }
|
969 |
|
970 | var outputParts = [];
|
971 | for (var i = samePartsLength; i < fromParts.length; i++) {
|
972 | outputParts.push('..');
|
973 | }
|
974 |
|
975 | outputParts = outputParts.concat(toParts.slice(samePartsLength));
|
976 |
|
977 | return outputParts.join('/');
|
978 | };
|
979 |
|
980 | exports.sep = '/';
|
981 | exports.delimiter = ':';
|
982 |
|
983 | exports.dirname = function(path) {
|
984 | var result = splitPath(path),
|
985 | root = result[0],
|
986 | dir = result[1];
|
987 |
|
988 | if (!root && !dir) {
|
989 |
|
990 | return '.';
|
991 | }
|
992 |
|
993 | if (dir) {
|
994 |
|
995 | dir = dir.substr(0, dir.length - 1);
|
996 | }
|
997 |
|
998 | return root + dir;
|
999 | };
|
1000 |
|
1001 |
|
1002 | exports.basename = function(path, ext) {
|
1003 | var f = splitPath(path)[2];
|
1004 |
|
1005 | if (ext && f.substr(-1 * ext.length) === ext) {
|
1006 | f = f.substr(0, f.length - ext.length);
|
1007 | }
|
1008 | return f;
|
1009 | };
|
1010 |
|
1011 |
|
1012 | exports.extname = function(path) {
|
1013 | return splitPath(path)[3];
|
1014 | };
|
1015 |
|
1016 | function filter (xs, f) {
|
1017 | if (xs.filter) return xs.filter(f);
|
1018 | var res = [];
|
1019 | for (var i = 0; i < xs.length; i++) {
|
1020 | if (f(xs[i], i, xs)) res.push(xs[i]);
|
1021 | }
|
1022 | return res;
|
1023 | }
|
1024 |
|
1025 |
|
1026 | var substr = 'ab'.substr(-1) === 'b'
|
1027 | ? function (str, start, len) { return str.substr(start, len) }
|
1028 | : function (str, start, len) {
|
1029 | if (start < 0) start = str.length + start;
|
1030 | return str.substr(start, len);
|
1031 | }
|
1032 | ;
|
1033 |
|
1034 | }.call(exports, __webpack_require__(2)))
|
1035 |
|
1036 | }),
|
1037 |
|
1038 | (function(module, exports) {
|
1039 |
|
1040 |
|
1041 |
|
1042 |
|
1043 |
|
1044 |
|
1045 | module.exports = function(useSourceMap) {
|
1046 | var list = [];
|
1047 |
|
1048 |
|
1049 | list.toString = function toString() {
|
1050 | return this.map(function (item) {
|
1051 | var content = cssWithMappingToString(item, useSourceMap);
|
1052 | if(item[2]) {
|
1053 | return "@media " + item[2] + "{" + content + "}";
|
1054 | } else {
|
1055 | return content;
|
1056 | }
|
1057 | }).join("");
|
1058 | };
|
1059 |
|
1060 |
|
1061 | list.i = function(modules, mediaQuery) {
|
1062 | if(typeof modules === "string")
|
1063 | modules = [[null, modules, ""]];
|
1064 | var alreadyImportedModules = {};
|
1065 | for(var i = 0; i < this.length; i++) {
|
1066 | var id = this[i][0];
|
1067 | if(typeof id === "number")
|
1068 | alreadyImportedModules[id] = true;
|
1069 | }
|
1070 | for(i = 0; i < modules.length; i++) {
|
1071 | var item = modules[i];
|
1072 |
|
1073 |
|
1074 |
|
1075 |
|
1076 | if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
|
1077 | if(mediaQuery && !item[2]) {
|
1078 | item[2] = mediaQuery;
|
1079 | } else if(mediaQuery) {
|
1080 | item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
|
1081 | }
|
1082 | list.push(item);
|
1083 | }
|
1084 | }
|
1085 | };
|
1086 | return list;
|
1087 | };
|
1088 |
|
1089 | function cssWithMappingToString(item, useSourceMap) {
|
1090 | var content = item[1] || '';
|
1091 | var cssMapping = item[3];
|
1092 | if (!cssMapping) {
|
1093 | return content;
|
1094 | }
|
1095 |
|
1096 | if (useSourceMap && typeof btoa === 'function') {
|
1097 | var sourceMapping = toComment(cssMapping);
|
1098 | var sourceURLs = cssMapping.sources.map(function (source) {
|
1099 | return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'
|
1100 | });
|
1101 |
|
1102 | return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
|
1103 | }
|
1104 |
|
1105 | return [content].join('\n');
|
1106 | }
|
1107 |
|
1108 |
|
1109 | function toComment(sourceMap) {
|
1110 |
|
1111 | var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
|
1112 | var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
|
1113 |
|
1114 | return '/*# ' + data + ' */';
|
1115 | }
|
1116 |
|
1117 |
|
1118 | }),
|
1119 |
|
1120 | (function(module, exports) {
|
1121 |
|
1122 | module.exports = require("moment");
|
1123 |
|
1124 | }),
|
1125 |
|
1126 | (function(module, exports, __webpack_require__) {
|
1127 |
|
1128 | "use strict";
|
1129 |
|
1130 |
|
1131 | Object.defineProperty(exports, "__esModule", {
|
1132 | value: true
|
1133 | });
|
1134 | exports.getSubGraphs = exports.indexNodes = exports.getDepthFirstPos = exports.addSubGraph = exports.defaultStyle = exports.clear = exports.getClasses = exports.getEdges = exports.getVertices = exports.getDirection = exports.bindFunctions = exports.setClickEvent = exports.getTooltip = exports.setClass = exports.setDirection = exports.addClass = exports.updateLink = exports.updateLinkInterpolate = exports.addLink = exports.addVertex = undefined;
|
1135 |
|
1136 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
1137 |
|
1138 | var _logger = __webpack_require__(0);
|
1139 |
|
1140 | var _utils = __webpack_require__(9);
|
1141 |
|
1142 | var _utils2 = _interopRequireDefault(_utils);
|
1143 |
|
1144 | var _d = __webpack_require__(1);
|
1145 |
|
1146 | var _d2 = _interopRequireDefault(_d);
|
1147 |
|
1148 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
1149 |
|
1150 | var vertices = {};
|
1151 | var edges = [];
|
1152 | var classes = [];
|
1153 | var subGraphs = [];
|
1154 | var tooltips = {};
|
1155 | var subCount = 0;
|
1156 | var direction;
|
1157 |
|
1158 | var funs = [];
|
1159 |
|
1160 |
|
1161 |
|
1162 |
|
1163 |
|
1164 |
|
1165 |
|
1166 | var addVertex = exports.addVertex = function addVertex(id, text, type, style) {
|
1167 | var txt;
|
1168 |
|
1169 | if (typeof id === 'undefined') {
|
1170 | return;
|
1171 | }
|
1172 | if (id.trim().length === 0) {
|
1173 | return;
|
1174 | }
|
1175 |
|
1176 | if (typeof vertices[id] === 'undefined') {
|
1177 | vertices[id] = { id: id, styles: [], classes: [] };
|
1178 | }
|
1179 | if (typeof text !== 'undefined') {
|
1180 | txt = text.trim();
|
1181 |
|
1182 |
|
1183 | if (txt[0] === '"' && txt[txt.length - 1] === '"') {
|
1184 | txt = txt.substring(1, txt.length - 1);
|
1185 | }
|
1186 |
|
1187 | vertices[id].text = txt;
|
1188 | }
|
1189 | if (typeof type !== 'undefined') {
|
1190 | vertices[id].type = type;
|
1191 | }
|
1192 | if (typeof type !== 'undefined') {
|
1193 | vertices[id].type = type;
|
1194 | }
|
1195 | if (typeof style !== 'undefined') {
|
1196 | if (style !== null) {
|
1197 | style.forEach(function (s) {
|
1198 | vertices[id].styles.push(s);
|
1199 | });
|
1200 | }
|
1201 | }
|
1202 | };
|
1203 |
|
1204 |
|
1205 |
|
1206 |
|
1207 |
|
1208 |
|
1209 |
|
1210 |
|
1211 | var addLink = exports.addLink = function addLink(start, end, type, linktext) {
|
1212 | _logger.logger.info('Got edge...', start, end);
|
1213 | var edge = { start: start, end: end, type: undefined, text: '' };
|
1214 | linktext = type.text;
|
1215 |
|
1216 | if (typeof linktext !== 'undefined') {
|
1217 | edge.text = linktext.trim();
|
1218 |
|
1219 |
|
1220 | if (edge.text[0] === '"' && edge.text[edge.text.length - 1] === '"') {
|
1221 | edge.text = edge.text.substring(1, edge.text.length - 1);
|
1222 | }
|
1223 | }
|
1224 |
|
1225 | if (typeof type !== 'undefined') {
|
1226 | edge.type = type.type;
|
1227 | edge.stroke = type.stroke;
|
1228 | }
|
1229 | edges.push(edge);
|
1230 | };
|
1231 |
|
1232 |
|
1233 |
|
1234 |
|
1235 |
|
1236 |
|
1237 | var updateLinkInterpolate = exports.updateLinkInterpolate = function updateLinkInterpolate(pos, interp) {
|
1238 | if (pos === 'default') {
|
1239 | edges.defaultInterpolate = interp;
|
1240 | } else {
|
1241 | edges[pos].interpolate = interp;
|
1242 | }
|
1243 | };
|
1244 |
|
1245 |
|
1246 |
|
1247 |
|
1248 |
|
1249 |
|
1250 | var updateLink = exports.updateLink = function updateLink(pos, style) {
|
1251 | if (pos === 'default') {
|
1252 | edges.defaultStyle = style;
|
1253 | } else {
|
1254 | if (_utils2.default.isSubstringInArray('fill', style) === -1) {
|
1255 | style.push('fill:none');
|
1256 | }
|
1257 | edges[pos].style = style;
|
1258 | }
|
1259 | };
|
1260 |
|
1261 | var addClass = exports.addClass = function addClass(id, style) {
|
1262 | if (typeof classes[id] === 'undefined') {
|
1263 | classes[id] = { id: id, styles: [] };
|
1264 | }
|
1265 |
|
1266 | if (typeof style !== 'undefined') {
|
1267 | if (style !== null) {
|
1268 | style.forEach(function (s) {
|
1269 | classes[id].styles.push(s);
|
1270 | });
|
1271 | }
|
1272 | }
|
1273 | };
|
1274 |
|
1275 |
|
1276 |
|
1277 |
|
1278 |
|
1279 | var setDirection = exports.setDirection = function setDirection(dir) {
|
1280 | direction = dir;
|
1281 | };
|
1282 |
|
1283 |
|
1284 |
|
1285 |
|
1286 |
|
1287 | var setClass = exports.setClass = function setClass(id, className) {
|
1288 | if (id.indexOf(',') > 0) {
|
1289 | id.split(',').forEach(function (id2) {
|
1290 | if (typeof vertices[id2] !== 'undefined') {
|
1291 | vertices[id2].classes.push(className);
|
1292 | }
|
1293 | });
|
1294 | } else {
|
1295 | if (typeof vertices[id] !== 'undefined') {
|
1296 | vertices[id].classes.push(className);
|
1297 | }
|
1298 | }
|
1299 | };
|
1300 |
|
1301 | var setTooltip = function setTooltip(id, tooltip) {
|
1302 | if (typeof tooltip !== 'undefined') {
|
1303 | tooltips[id] = tooltip;
|
1304 | }
|
1305 | };
|
1306 |
|
1307 | var setClickFun = function setClickFun(id, functionName) {
|
1308 | if (typeof functionName === 'undefined') {
|
1309 | return;
|
1310 | }
|
1311 | if (typeof vertices[id] !== 'undefined') {
|
1312 | funs.push(function (element) {
|
1313 | var elem = _d2.default.select(element).select('#' + id);
|
1314 | if (elem !== null) {
|
1315 | elem.on('click', function () {
|
1316 | window[functionName](id);
|
1317 | });
|
1318 | }
|
1319 | });
|
1320 | }
|
1321 | };
|
1322 |
|
1323 | var setLink = function setLink(id, linkStr) {
|
1324 | if (typeof linkStr === 'undefined') {
|
1325 | return;
|
1326 | }
|
1327 | if (typeof vertices[id] !== 'undefined') {
|
1328 | funs.push(function (element) {
|
1329 | var elem = _d2.default.select(element).select('#' + id);
|
1330 | if (elem !== null) {
|
1331 | elem.on('click', function () {
|
1332 | window.open(linkStr, 'newTab');
|
1333 | });
|
1334 | }
|
1335 | });
|
1336 | }
|
1337 | };
|
1338 | var getTooltip = exports.getTooltip = function getTooltip(id) {
|
1339 | return tooltips[id];
|
1340 | };
|
1341 |
|
1342 |
|
1343 |
|
1344 |
|
1345 |
|
1346 | var setClickEvent = exports.setClickEvent = function setClickEvent(id, functionName, link, tooltip) {
|
1347 | if (id.indexOf(',') > 0) {
|
1348 | id.split(',').forEach(function (id2) {
|
1349 | setTooltip(id2, tooltip);
|
1350 | setClickFun(id2, functionName);
|
1351 | setLink(id2, link);
|
1352 | });
|
1353 | } else {
|
1354 | setTooltip(id, tooltip);
|
1355 | setClickFun(id, functionName);
|
1356 | setLink(id, link);
|
1357 | }
|
1358 | };
|
1359 |
|
1360 | var bindFunctions = exports.bindFunctions = function bindFunctions(element) {
|
1361 | funs.forEach(function (fun) {
|
1362 | fun(element);
|
1363 | });
|
1364 | };
|
1365 | var getDirection = exports.getDirection = function getDirection() {
|
1366 | return direction;
|
1367 | };
|
1368 |
|
1369 |
|
1370 |
|
1371 |
|
1372 | var getVertices = exports.getVertices = function getVertices() {
|
1373 | return vertices;
|
1374 | };
|
1375 |
|
1376 |
|
1377 |
|
1378 |
|
1379 |
|
1380 | var getEdges = exports.getEdges = function getEdges() {
|
1381 | return edges;
|
1382 | };
|
1383 |
|
1384 |
|
1385 |
|
1386 |
|
1387 |
|
1388 | var getClasses = exports.getClasses = function getClasses() {
|
1389 | return classes;
|
1390 | };
|
1391 |
|
1392 | var setupToolTips = function setupToolTips(element) {
|
1393 | var tooltipElem = _d2.default.select('.mermaidTooltip');
|
1394 | if (tooltipElem[0][0] === null) {
|
1395 | tooltipElem = _d2.default.select('body').append('div').attr('class', 'mermaidTooltip').style('opacity', 0);
|
1396 | }
|
1397 |
|
1398 | var svg = _d2.default.select(element).select('svg');
|
1399 |
|
1400 | var nodes = svg.selectAll('g.node');
|
1401 | nodes.on('mouseover', function () {
|
1402 | var el = _d2.default.select(this);
|
1403 | var title = el.attr('title');
|
1404 |
|
1405 | if (title === null) {
|
1406 | return;
|
1407 | }
|
1408 | var rect = this.getBoundingClientRect();
|
1409 |
|
1410 | tooltipElem.transition().duration(200).style('opacity', '.9');
|
1411 | tooltipElem.html(el.attr('title')).style('left', rect.left + (rect.right - rect.left) / 2 + 'px').style('top', rect.top - 14 + document.body.scrollTop + 'px');
|
1412 | el.classed('hover', true);
|
1413 | }).on('mouseout', function () {
|
1414 | tooltipElem.transition().duration(500).style('opacity', 0);
|
1415 | var el = _d2.default.select(this);
|
1416 | el.classed('hover', false);
|
1417 | });
|
1418 | };
|
1419 | funs.push(setupToolTips);
|
1420 |
|
1421 |
|
1422 |
|
1423 |
|
1424 | var clear = exports.clear = function clear() {
|
1425 | vertices = {};
|
1426 | classes = {};
|
1427 | edges = [];
|
1428 | funs = [];
|
1429 | funs.push(setupToolTips);
|
1430 | subGraphs = [];
|
1431 | subCount = 0;
|
1432 | tooltips = [];
|
1433 | };
|
1434 |
|
1435 |
|
1436 |
|
1437 |
|
1438 | var defaultStyle = exports.defaultStyle = function defaultStyle() {
|
1439 | return 'fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;';
|
1440 | };
|
1441 |
|
1442 |
|
1443 |
|
1444 |
|
1445 | var addSubGraph = exports.addSubGraph = function addSubGraph(list, title) {
|
1446 | function uniq(a) {
|
1447 | var prims = { 'boolean': {}, 'number': {}, 'string': {} };
|
1448 | var objs = [];
|
1449 |
|
1450 | return a.filter(function (item) {
|
1451 | var type = typeof item === 'undefined' ? 'undefined' : _typeof(item);
|
1452 | if (item === ' ') {
|
1453 | return false;
|
1454 | }
|
1455 | if (type in prims) {
|
1456 | return prims[type].hasOwnProperty(item) ? false : prims[type][item] = true;
|
1457 | } else {
|
1458 | return objs.indexOf(item) >= 0 ? false : objs.push(item);
|
1459 | }
|
1460 | });
|
1461 | }
|
1462 |
|
1463 | var nodeList = [];
|
1464 |
|
1465 | nodeList = uniq(nodeList.concat.apply(nodeList, list));
|
1466 |
|
1467 | var subGraph = { id: 'subGraph' + subCount, nodes: nodeList, title: title };
|
1468 | subGraphs.push(subGraph);
|
1469 | subCount = subCount + 1;
|
1470 | return subGraph.id;
|
1471 | };
|
1472 |
|
1473 | var getPosForId = function getPosForId(id) {
|
1474 | var i;
|
1475 | for (i = 0; i < subGraphs.length; i++) {
|
1476 | if (subGraphs[i].id === id) {
|
1477 | return i;
|
1478 | }
|
1479 | }
|
1480 | return -1;
|
1481 | };
|
1482 | var secCount = -1;
|
1483 | var posCrossRef = [];
|
1484 | var indexNodes2 = function indexNodes2(id, pos) {
|
1485 | var nodes = subGraphs[pos].nodes;
|
1486 | secCount = secCount + 1;
|
1487 | if (secCount > 2000) {
|
1488 | return;
|
1489 | }
|
1490 | posCrossRef[secCount] = pos;
|
1491 |
|
1492 | if (subGraphs[pos].id === id) {
|
1493 | return {
|
1494 | result: true,
|
1495 | count: 0
|
1496 | };
|
1497 | }
|
1498 |
|
1499 | var count = 0;
|
1500 | var posCount = 1;
|
1501 | while (count < nodes.length) {
|
1502 | var childPos = getPosForId(nodes[count]);
|
1503 |
|
1504 | if (childPos >= 0) {
|
1505 | var res = indexNodes2(id, childPos);
|
1506 | if (res.result) {
|
1507 | return {
|
1508 | result: true,
|
1509 | count: posCount + res.count
|
1510 | };
|
1511 | } else {
|
1512 | posCount = posCount + res.count;
|
1513 | }
|
1514 | }
|
1515 | count = count + 1;
|
1516 | }
|
1517 |
|
1518 | return {
|
1519 | result: false,
|
1520 | count: posCount
|
1521 | };
|
1522 | };
|
1523 |
|
1524 | var getDepthFirstPos = exports.getDepthFirstPos = function getDepthFirstPos(pos) {
|
1525 | return posCrossRef[pos];
|
1526 | };
|
1527 | var indexNodes = exports.indexNodes = function indexNodes() {
|
1528 | secCount = -1;
|
1529 | if (subGraphs.length > 0) {
|
1530 | indexNodes2('none', subGraphs.length - 1, 0);
|
1531 | }
|
1532 | };
|
1533 |
|
1534 | var getSubGraphs = exports.getSubGraphs = function getSubGraphs() {
|
1535 | return subGraphs;
|
1536 | };
|
1537 |
|
1538 | exports.default = {
|
1539 | addVertex: addVertex,
|
1540 | addLink: addLink,
|
1541 | updateLinkInterpolate: updateLinkInterpolate,
|
1542 | updateLink: updateLink,
|
1543 | addClass: addClass,
|
1544 | setDirection: setDirection,
|
1545 | setClass: setClass,
|
1546 | getTooltip: getTooltip,
|
1547 | setClickEvent: setClickEvent,
|
1548 | bindFunctions: bindFunctions,
|
1549 | getDirection: getDirection,
|
1550 | getVertices: getVertices,
|
1551 | getEdges: getEdges,
|
1552 | getClasses: getClasses,
|
1553 | clear: clear,
|
1554 | defaultStyle: defaultStyle,
|
1555 | addSubGraph: addSubGraph,
|
1556 | getDepthFirstPos: getDepthFirstPos,
|
1557 | indexNodes: indexNodes,
|
1558 | getSubGraphs: getSubGraphs
|
1559 | };
|
1560 |
|
1561 | }),
|
1562 |
|
1563 | (function(module, exports, __webpack_require__) {
|
1564 |
|
1565 | "use strict";
|
1566 |
|
1567 |
|
1568 | Object.defineProperty(exports, "__esModule", {
|
1569 | value: true
|
1570 | });
|
1571 | exports.isSubstringInArray = exports.detectType = undefined;
|
1572 |
|
1573 | var _logger = __webpack_require__(0);
|
1574 |
|
1575 |
|
1576 |
|
1577 |
|
1578 |
|
1579 |
|
1580 |
|
1581 |
|
1582 |
|
1583 |
|
1584 |
|
1585 |
|
1586 |
|
1587 |
|
1588 |
|
1589 |
|
1590 |
|
1591 |
|
1592 | var detectType = exports.detectType = function detectType(text) {
|
1593 | text = text.replace(/^\s*%%.*\n/g, '\n');
|
1594 | if (text.match(/^\s*sequenceDiagram/)) {
|
1595 | return 'sequenceDiagram';
|
1596 | }
|
1597 |
|
1598 | if (text.match(/^\s*digraph/)) {
|
1599 | return 'dotGraph';
|
1600 | }
|
1601 |
|
1602 | if (text.match(/^\s*info/)) {
|
1603 | return 'info';
|
1604 | }
|
1605 |
|
1606 | if (text.match(/^\s*gantt/)) {
|
1607 | return 'gantt';
|
1608 | }
|
1609 |
|
1610 | if (text.match(/^\s*classDiagram/)) {
|
1611 | _logger.logger.debug('Detected classDiagram syntax');
|
1612 | return 'classDiagram';
|
1613 | }
|
1614 |
|
1615 | if (text.match(/^\s*gitGraph/)) {
|
1616 | _logger.logger.debug('Detected gitGraph syntax');
|
1617 | return 'gitGraph';
|
1618 | }
|
1619 | return 'graph';
|
1620 | };
|
1621 |
|
1622 |
|
1623 |
|
1624 |
|
1625 |
|
1626 |
|
1627 |
|
1628 |
|
1629 | var isSubstringInArray = exports.isSubstringInArray = function isSubstringInArray(str, arr) {
|
1630 | for (var i = 0; i < arr.length; i++) {
|
1631 | if (arr[i].match(str)) return i;
|
1632 | }
|
1633 | return -1;
|
1634 | };
|
1635 |
|
1636 | exports.default = {
|
1637 | detectType: detectType,
|
1638 | isSubstringInArray: isSubstringInArray
|
1639 | };
|
1640 |
|
1641 | }),
|
1642 |
|
1643 | (function(module, exports, __webpack_require__) {
|
1644 |
|
1645 | "use strict";
|
1646 | (function(process, module) {
|
1647 |
|
1648 |
|
1649 |
|
1650 |
|
1651 |
|
1652 |
|
1653 |
|
1654 |
|
1655 |
|
1656 |
|
1657 |
|
1658 |
|
1659 |
|
1660 |
|
1661 |
|
1662 |
|
1663 |
|
1664 |
|
1665 |
|
1666 |
|
1667 |
|
1668 |
|
1669 |
|
1670 |
|
1671 |
|
1672 |
|
1673 |
|
1674 |
|
1675 |
|
1676 |
|
1677 |
|
1678 |
|
1679 |
|
1680 |
|
1681 |
|
1682 |
|
1683 |
|
1684 |
|
1685 |
|
1686 |
|
1687 |
|
1688 |
|
1689 |
|
1690 |
|
1691 |
|
1692 |
|
1693 |
|
1694 |
|
1695 |
|
1696 |
|
1697 |
|
1698 |
|
1699 |
|
1700 |
|
1701 |
|
1702 |
|
1703 |
|
1704 |
|
1705 |
|
1706 |
|
1707 |
|
1708 |
|
1709 |
|
1710 |
|
1711 |
|
1712 |
|
1713 |
|
1714 |
|
1715 |
|
1716 |
|
1717 |
|
1718 |
|
1719 |
|
1720 |
|
1721 | var parser = function () {
|
1722 | var o = function o(k, v, _o, l) {
|
1723 | for (_o = _o || {}, l = k.length; l--; _o[k[l]] = v) {}return _o;
|
1724 | },
|
1725 | $V0 = [1, 4],
|
1726 | $V1 = [1, 3],
|
1727 | $V2 = [1, 5],
|
1728 | $V3 = [1, 8, 9, 10, 11, 13, 18, 30, 46, 71, 72, 73, 74, 75, 81, 86, 88, 89, 91, 92, 94, 95, 96, 97, 98],
|
1729 | $V4 = [2, 2],
|
1730 | $V5 = [1, 12],
|
1731 | $V6 = [1, 13],
|
1732 | $V7 = [1, 14],
|
1733 | $V8 = [1, 15],
|
1734 | $V9 = [1, 31],
|
1735 | $Va = [1, 33],
|
1736 | $Vb = [1, 22],
|
1737 | $Vc = [1, 34],
|
1738 | $Vd = [1, 24],
|
1739 | $Ve = [1, 25],
|
1740 | $Vf = [1, 26],
|
1741 | $Vg = [1, 27],
|
1742 | $Vh = [1, 28],
|
1743 | $Vi = [1, 38],
|
1744 | $Vj = [1, 40],
|
1745 | $Vk = [1, 35],
|
1746 | $Vl = [1, 39],
|
1747 | $Vm = [1, 45],
|
1748 | $Vn = [1, 44],
|
1749 | $Vo = [1, 36],
|
1750 | $Vp = [1, 37],
|
1751 | $Vq = [1, 41],
|
1752 | $Vr = [1, 42],
|
1753 | $Vs = [1, 43],
|
1754 | $Vt = [1, 8, 9, 10, 11, 13, 18, 30, 32, 46, 71, 72, 73, 74, 75, 81, 86, 88, 89, 91, 92, 94, 95, 96, 97, 98],
|
1755 | $Vu = [1, 53],
|
1756 | $Vv = [1, 52],
|
1757 | $Vw = [1, 54],
|
1758 | $Vx = [1, 72],
|
1759 | $Vy = [1, 80],
|
1760 | $Vz = [1, 81],
|
1761 | $VA = [1, 66],
|
1762 | $VB = [1, 65],
|
1763 | $VC = [1, 85],
|
1764 | $VD = [1, 84],
|
1765 | $VE = [1, 82],
|
1766 | $VF = [1, 83],
|
1767 | $VG = [1, 73],
|
1768 | $VH = [1, 68],
|
1769 | $VI = [1, 67],
|
1770 | $VJ = [1, 63],
|
1771 | $VK = [1, 75],
|
1772 | $VL = [1, 76],
|
1773 | $VM = [1, 77],
|
1774 | $VN = [1, 78],
|
1775 | $VO = [1, 79],
|
1776 | $VP = [1, 70],
|
1777 | $VQ = [1, 69],
|
1778 | $VR = [8, 9, 11],
|
1779 | $VS = [8, 9, 11, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64],
|
1780 | $VT = [1, 115],
|
1781 | $VU = [8, 9, 10, 11, 13, 15, 18, 36, 38, 40, 42, 46, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 81, 86, 88, 89, 91, 92, 94, 95, 96, 97, 98],
|
1782 | $VV = [8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 30, 32, 36, 37, 38, 39, 40, 41, 42, 43, 46, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 71, 72, 73, 74, 75, 78, 81, 84, 86, 88, 89, 91, 92, 94, 95, 96, 97, 98],
|
1783 | $VW = [1, 117],
|
1784 | $VX = [1, 118],
|
1785 | $VY = [8, 9, 10, 11, 13, 18, 30, 32, 46, 71, 72, 73, 74, 75, 81, 86, 88, 89, 91, 92, 94, 95, 96, 97, 98],
|
1786 | $VZ = [8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 30, 32, 37, 39, 41, 43, 46, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 71, 72, 73, 74, 75, 78, 81, 84, 86, 88, 89, 91, 92, 94, 95, 96, 97, 98],
|
1787 | $V_ = [13, 18, 46, 81, 86, 88, 89, 91, 92, 94, 95, 96, 97, 98],
|
1788 | $V$ = [13, 18, 46, 49, 65, 81, 86, 88, 89, 91, 92, 94, 95, 96, 97, 98],
|
1789 | $V01 = [1, 191],
|
1790 | $V11 = [1, 188],
|
1791 | $V21 = [1, 195],
|
1792 | $V31 = [1, 192],
|
1793 | $V41 = [1, 189],
|
1794 | $V51 = [1, 196],
|
1795 | $V61 = [1, 186],
|
1796 | $V71 = [1, 187],
|
1797 | $V81 = [1, 190],
|
1798 | $V91 = [1, 193],
|
1799 | $Va1 = [1, 194],
|
1800 | $Vb1 = [1, 213],
|
1801 | $Vc1 = [8, 9, 11, 86],
|
1802 | $Vd1 = [8, 9, 10, 11, 46, 71, 80, 81, 84, 86, 88, 89, 90, 91, 92];
|
1803 | var parser = { trace: function trace() {},
|
1804 | yy: {},
|
1805 | 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, "end": 32, "vertex": 33, "link": 34, "alphaNum": 35, "SQS": 36, "SQE": 37, "PS": 38, "PE": 39, "(-": 40, "-)": 41, "DIAMOND_START": 42, "DIAMOND_STOP": 43, "alphaNumStatement": 44, "alphaNumToken": 45, "MINUS": 46, "linkStatement": 47, "arrowText": 48, "TESTSTR": 49, "--": 50, "ARROW_POINT": 51, "ARROW_CIRCLE": 52, "ARROW_CROSS": 53, "ARROW_OPEN": 54, "-.": 55, "DOTTED_ARROW_POINT": 56, "DOTTED_ARROW_CIRCLE": 57, "DOTTED_ARROW_CROSS": 58, "DOTTED_ARROW_OPEN": 59, "==": 60, "THICK_ARROW_POINT": 61, "THICK_ARROW_CIRCLE": 62, "THICK_ARROW_CROSS": 63, "THICK_ARROW_OPEN": 64, "PIPE": 65, "textToken": 66, "STR": 67, "commentText": 68, "commentToken": 69, "keywords": 70, "STYLE": 71, "LINKSTYLE": 72, "CLASSDEF": 73, "CLASS": 74, "CLICK": 75, "textNoTags": 76, "textNoTagsToken": 77, "DEFAULT": 78, "stylesOpt": 79, "HEX": 80, "NUM": 81, "INTERPOLATE": 82, "commentStatement": 83, "PCT": 84, "style": 85, "COMMA": 86, "styleComponent": 87, "ALPHA": 88, "COLON": 89, "UNIT": 90, "BRKT": 91, "DOT": 92, "graphCodeTokens": 93, "PUNCTUATION": 94, "UNICODE_TEXT": 95, "PLUS": 96, "EQUALS": 97, "MULT": 98, "TAG_START": 99, "TAG_END": 100, "QUOTE": 101, "$accept": 0, "$end": 1 },
|
1806 | 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: "end", 36: "SQS", 37: "SQE", 38: "PS", 39: "PE", 40: "(-", 41: "-)", 42: "DIAMOND_START", 43: "DIAMOND_STOP", 46: "MINUS", 49: "TESTSTR", 50: "--", 51: "ARROW_POINT", 52: "ARROW_CIRCLE", 53: "ARROW_CROSS", 54: "ARROW_OPEN", 55: "-.", 56: "DOTTED_ARROW_POINT", 57: "DOTTED_ARROW_CIRCLE", 58: "DOTTED_ARROW_CROSS", 59: "DOTTED_ARROW_OPEN", 60: "==", 61: "THICK_ARROW_POINT", 62: "THICK_ARROW_CIRCLE", 63: "THICK_ARROW_CROSS", 64: "THICK_ARROW_OPEN", 65: "PIPE", 67: "STR", 71: "STYLE", 72: "LINKSTYLE", 73: "CLASSDEF", 74: "CLASS", 75: "CLICK", 78: "DEFAULT", 80: "HEX", 81: "NUM", 82: "INTERPOLATE", 84: "PCT", 86: "COMMA", 88: "ALPHA", 89: "COLON", 90: "UNIT", 91: "BRKT", 92: "DOT", 94: "PUNCTUATION", 95: "UNICODE_TEXT", 96: "PLUS", 97: "EQUALS", 98: "MULT", 99: "TAG_START", 100: "TAG_END", 101: "QUOTE" },
|
1807 | 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, 5], [7, 4], [24, 1], [24, 1], [24, 1], [23, 3], [23, 1], [33, 4], [33, 5], [33, 6], [33, 7], [33, 4], [33, 5], [33, 4], [33, 5], [33, 4], [33, 5], [33, 4], [33, 5], [33, 1], [33, 2], [35, 1], [35, 2], [44, 1], [44, 1], [44, 1], [44, 1], [34, 2], [34, 3], [34, 3], [34, 1], [34, 3], [34, 3], [34, 3], [34, 3], [34, 3], [34, 3], [34, 3], [34, 3], [34, 3], [34, 3], [34, 3], [34, 3], [47, 1], [47, 1], [47, 1], [47, 1], [47, 1], [47, 1], [47, 1], [47, 1], [47, 1], [47, 1], [47, 1], [47, 1], [48, 3], [31, 1], [31, 2], [31, 1], [68, 1], [68, 2], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [76, 1], [76, 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], [83, 3], [79, 1], [79, 3], [85, 1], [85, 2], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [69, 1], [69, 1], [66, 1], [66, 1], [66, 1], [66, 1], [66, 1], [66, 1], [66, 1], [77, 1], [77, 1], [77, 1], [77, 1], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [93, 1], [93, 1], [93, 1], [93, 1], [93, 1], [93, 1], [93, 1], [93, 1], [93, 1], [93, 1], [93, 1], [93, 1], [93, 1], [93, 1], [93, 1]],
|
1808 | performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
|
1809 |
|
1810 |
|
1811 | var $0 = $$.length - 1;
|
1812 | switch (yystate) {
|
1813 | case 2:
|
1814 | this.$ = [];
|
1815 | break;
|
1816 | case 3:
|
1817 |
|
1818 | if ($$[$0] !== []) {
|
1819 | $$[$0 - 1].push($$[$0]);
|
1820 | }
|
1821 | this.$ = $$[$0 - 1];
|
1822 | break;
|
1823 | case 4:case 57:case 59:case 60:case 92:case 94:case 95:case 108:
|
1824 | this.$ = $$[$0];
|
1825 | break;
|
1826 | case 11:
|
1827 | yy.setDirection($$[$0 - 1]);this.$ = $$[$0 - 1];
|
1828 | break;
|
1829 | case 12:
|
1830 | yy.setDirection("LR");this.$ = $$[$0 - 1];
|
1831 | break;
|
1832 | case 13:
|
1833 | yy.setDirection("RL");this.$ = $$[$0 - 1];
|
1834 | break;
|
1835 | case 14:
|
1836 | yy.setDirection("BT");this.$ = $$[$0 - 1];
|
1837 | break;
|
1838 | case 15:
|
1839 | yy.setDirection("TB");this.$ = $$[$0 - 1];
|
1840 | break;
|
1841 | case 30:
|
1842 | this.$ = $$[$0 - 1];
|
1843 | break;
|
1844 | case 31:case 32:case 33:case 34:case 35:
|
1845 | this.$ = [];
|
1846 | break;
|
1847 | case 36:
|
1848 | this.$ = yy.addSubGraph($$[$0 - 1], $$[$0 - 3]);
|
1849 | break;
|
1850 | case 37:
|
1851 | this.$ = yy.addSubGraph($$[$0 - 1], undefined);
|
1852 | break;
|
1853 | case 41:
|
1854 | yy.addLink($$[$0 - 2], $$[$0], $$[$0 - 1]);this.$ = [$$[$0 - 2], $$[$0]];
|
1855 | break;
|
1856 | case 42:
|
1857 | this.$ = [$$[$0]];
|
1858 | break;
|
1859 | case 43:
|
1860 | this.$ = $$[$0 - 3];yy.addVertex($$[$0 - 3], $$[$0 - 1], 'square');
|
1861 | break;
|
1862 | case 44:
|
1863 | this.$ = $$[$0 - 4];yy.addVertex($$[$0 - 4], $$[$0 - 2], 'square');
|
1864 | break;
|
1865 | case 45:
|
1866 | this.$ = $$[$0 - 5];yy.addVertex($$[$0 - 5], $$[$0 - 2], 'circle');
|
1867 | break;
|
1868 | case 46:
|
1869 | this.$ = $$[$0 - 6];yy.addVertex($$[$0 - 6], $$[$0 - 3], 'circle');
|
1870 | break;
|
1871 | case 47:
|
1872 | this.$ = $$[$0 - 3];yy.addVertex($$[$0 - 3], $$[$0 - 1], 'ellipse');
|
1873 | break;
|
1874 | case 48:
|
1875 | this.$ = $$[$0 - 4];yy.addVertex($$[$0 - 4], $$[$0 - 2], 'ellipse');
|
1876 | break;
|
1877 | case 49:
|
1878 | this.$ = $$[$0 - 3];yy.addVertex($$[$0 - 3], $$[$0 - 1], 'round');
|
1879 | break;
|
1880 | case 50:
|
1881 | this.$ = $$[$0 - 4];yy.addVertex($$[$0 - 4], $$[$0 - 2], 'round');
|
1882 | break;
|
1883 | case 51:
|
1884 | this.$ = $$[$0 - 3];yy.addVertex($$[$0 - 3], $$[$0 - 1], 'diamond');
|
1885 | break;
|
1886 | case 52:
|
1887 | this.$ = $$[$0 - 4];yy.addVertex($$[$0 - 4], $$[$0 - 2], 'diamond');
|
1888 | break;
|
1889 | case 53:
|
1890 | this.$ = $$[$0 - 3];yy.addVertex($$[$0 - 3], $$[$0 - 1], 'odd');
|
1891 | break;
|
1892 | case 54:
|
1893 | this.$ = $$[$0 - 4];yy.addVertex($$[$0 - 4], $$[$0 - 2], 'odd');
|
1894 | break;
|
1895 | case 55:
|
1896 | this.$ = $$[$0];yy.addVertex($$[$0]);
|
1897 | break;
|
1898 | case 56:
|
1899 | this.$ = $$[$0 - 1];yy.addVertex($$[$0 - 1]);
|
1900 | break;
|
1901 | case 58:case 93:case 96:case 109:
|
1902 | this.$ = $$[$0 - 1] + '' + $$[$0];
|
1903 | break;
|
1904 | case 61:
|
1905 | this.$ = 'v';
|
1906 | break;
|
1907 | case 62:
|
1908 | this.$ = '-';
|
1909 | break;
|
1910 | case 63:
|
1911 | $$[$0 - 1].text = $$[$0];this.$ = $$[$0 - 1];
|
1912 | break;
|
1913 | case 64:case 65:
|
1914 | $$[$0 - 2].text = $$[$0 - 1];this.$ = $$[$0 - 2];
|
1915 | break;
|
1916 | case 66:
|
1917 | this.$ = $$[$0];
|
1918 | break;
|
1919 | case 67:
|
1920 | this.$ = { "type": "arrow", "stroke": "normal", "text": $$[$0 - 1] };
|
1921 | break;
|
1922 | case 68:
|
1923 | this.$ = { "type": "arrow_circle", "stroke": "normal", "text": $$[$0 - 1] };
|
1924 | break;
|
1925 | case 69:
|
1926 | this.$ = { "type": "arrow_cross", "stroke": "normal", "text": $$[$0 - 1] };
|
1927 | break;
|
1928 | case 70:
|
1929 | this.$ = { "type": "arrow_open", "stroke": "normal", "text": $$[$0 - 1] };
|
1930 | break;
|
1931 | case 71:
|
1932 | this.$ = { "type": "arrow", "stroke": "dotted", "text": $$[$0 - 1] };
|
1933 | break;
|
1934 | case 72:
|
1935 | this.$ = { "type": "arrow_circle", "stroke": "dotted", "text": $$[$0 - 1] };
|
1936 | break;
|
1937 | case 73:
|
1938 | this.$ = { "type": "arrow_cross", "stroke": "dotted", "text": $$[$0 - 1] };
|
1939 | break;
|
1940 | case 74:
|
1941 | this.$ = { "type": "arrow_open", "stroke": "dotted", "text": $$[$0 - 1] };
|
1942 | break;
|
1943 | case 75:
|
1944 | this.$ = { "type": "arrow", "stroke": "thick", "text": $$[$0 - 1] };
|
1945 | break;
|
1946 | case 76:
|
1947 | this.$ = { "type": "arrow_circle", "stroke": "thick", "text": $$[$0 - 1] };
|
1948 | break;
|
1949 | case 77:
|
1950 | this.$ = { "type": "arrow_cross", "stroke": "thick", "text": $$[$0 - 1] };
|
1951 | break;
|
1952 | case 78:
|
1953 | this.$ = { "type": "arrow_open", "stroke": "thick", "text": $$[$0 - 1] };
|
1954 | break;
|
1955 | case 79:
|
1956 | this.$ = { "type": "arrow", "stroke": "normal" };
|
1957 | break;
|
1958 | case 80:
|
1959 | this.$ = { "type": "arrow_circle", "stroke": "normal" };
|
1960 | break;
|
1961 | case 81:
|
1962 | this.$ = { "type": "arrow_cross", "stroke": "normal" };
|
1963 | break;
|
1964 | case 82:
|
1965 | this.$ = { "type": "arrow_open", "stroke": "normal" };
|
1966 | break;
|
1967 | case 83:
|
1968 | this.$ = { "type": "arrow", "stroke": "dotted" };
|
1969 | break;
|
1970 | case 84:
|
1971 | this.$ = { "type": "arrow_circle", "stroke": "dotted" };
|
1972 | break;
|
1973 | case 85:
|
1974 | this.$ = { "type": "arrow_cross", "stroke": "dotted" };
|
1975 | break;
|
1976 | case 86:
|
1977 | this.$ = { "type": "arrow_open", "stroke": "dotted" };
|
1978 | break;
|
1979 | case 87:
|
1980 | this.$ = { "type": "arrow", "stroke": "thick" };
|
1981 | break;
|
1982 | case 88:
|
1983 | this.$ = { "type": "arrow_circle", "stroke": "thick" };
|
1984 | break;
|
1985 | case 89:
|
1986 | this.$ = { "type": "arrow_cross", "stroke": "thick" };
|
1987 | break;
|
1988 | case 90:
|
1989 | this.$ = { "type": "arrow_open", "stroke": "thick" };
|
1990 | break;
|
1991 | case 91:
|
1992 | this.$ = $$[$0 - 1];
|
1993 | break;
|
1994 | case 110:case 111:
|
1995 | this.$ = $$[$0 - 4];yy.addClass($$[$0 - 2], $$[$0]);
|
1996 | break;
|
1997 | case 112:
|
1998 | this.$ = $$[$0 - 4];yy.setClass($$[$0 - 2], $$[$0]);
|
1999 | break;
|
2000 | case 113:
|
2001 | this.$ = $$[$0 - 4];yy.setClickEvent($$[$0 - 2], $$[$0], undefined, undefined);
|
2002 | break;
|
2003 | case 114:
|
2004 | this.$ = $$[$0 - 6];yy.setClickEvent($$[$0 - 4], $$[$0 - 2], undefined, $$[$0]);
|
2005 | break;
|
2006 | case 115:
|
2007 | this.$ = $$[$0 - 4];yy.setClickEvent($$[$0 - 2], undefined, $$[$0], undefined);
|
2008 | break;
|
2009 | case 116:
|
2010 | this.$ = $$[$0 - 6];yy.setClickEvent($$[$0 - 4], undefined, $$[$0 - 2], $$[$0]);
|
2011 | break;
|
2012 | case 117:
|
2013 | this.$ = $$[$0 - 4];yy.addVertex($$[$0 - 2], undefined, undefined, $$[$0]);
|
2014 | break;
|
2015 | case 118:case 119:case 120:
|
2016 | this.$ = $$[$0 - 4];yy.updateLink($$[$0 - 2], $$[$0]);
|
2017 | break;
|
2018 | case 121:case 122:
|
2019 | this.$ = $$[$0 - 8];yy.updateLinkInterpolate($$[$0 - 6], $$[$0 - 2]);yy.updateLink($$[$0 - 6], $$[$0]);
|
2020 | break;
|
2021 | case 123:case 124:
|
2022 | this.$ = $$[$0 - 6];yy.updateLinkInterpolate($$[$0 - 4], $$[$0]);
|
2023 | break;
|
2024 | case 126:
|
2025 | this.$ = [$$[$0]];
|
2026 | break;
|
2027 | case 127:
|
2028 | $$[$0 - 2].push($$[$0]);this.$ = $$[$0 - 2];
|
2029 | break;
|
2030 | case 129:
|
2031 | this.$ = $$[$0 - 1] + $$[$0];
|
2032 | break;
|
2033 | }
|
2034 | },
|
2035 | 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, 13: $V9, 18: $Va, 23: 16, 25: 17, 26: 18, 27: 19, 28: 20, 29: 21, 30: $Vb, 33: 23, 35: 29, 44: 30, 45: 32, 46: $Vc, 71: $Vd, 72: $Ve, 73: $Vf, 74: $Vg, 75: $Vh, 81: $Vi, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, o($V3, [2, 9]), o($V3, [2, 10]), { 13: [1, 46], 15: [1, 47], 16: [1, 48], 17: [1, 49], 18: [1, 50] }, o($Vt, [2, 3]), o($Vt, [2, 4]), o($Vt, [2, 5]), o($Vt, [2, 6]), o($Vt, [2, 7]), o($Vt, [2, 8]), { 8: $Vu, 9: $Vv, 11: $Vw, 24: 51 }, { 8: $Vu, 9: $Vv, 11: $Vw, 24: 55 }, { 8: $Vu, 9: $Vv, 11: $Vw, 24: 56 }, { 8: $Vu, 9: $Vv, 11: $Vw, 24: 57 }, { 8: $Vu, 9: $Vv, 11: $Vw, 24: 58 }, { 8: $Vu, 9: $Vv, 11: $Vw, 24: 59 }, { 8: $Vu, 9: $Vv, 10: $Vx, 11: $Vw, 12: $Vy, 13: $Vz, 15: $VA, 16: $VB, 17: $VC, 18: $VD, 24: 61, 30: $VE, 31: 60, 32: $VF, 45: 71, 46: $VG, 50: $VH, 60: $VI, 66: 62, 67: $VJ, 70: 74, 71: $VK, 72: $VL, 73: $VM, 74: $VN, 75: $VO, 77: 64, 78: $VP, 81: $Vi, 84: $VQ, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, o($VR, [2, 42], { 34: 86, 47: 87, 50: [1, 88], 51: [1, 91], 52: [1, 92], 53: [1, 93], 54: [1, 94], 55: [1, 89], 56: [1, 95], 57: [1, 96], 58: [1, 97], 59: [1, 98], 60: [1, 90], 61: [1, 99], 62: [1, 100], 63: [1, 101], 64: [1, 102] }), { 10: [1, 103] }, { 10: [1, 104] }, { 10: [1, 105] }, { 10: [1, 106] }, { 10: [1, 107] }, o($VS, [2, 55], { 45: 32, 21: 113, 44: 114, 10: $VT, 13: $V9, 15: [1, 112], 18: $Va, 36: [1, 108], 38: [1, 109], 40: [1, 110], 42: [1, 111], 46: $Vc, 81: $Vi, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }), o($VU, [2, 57]), o($VU, [2, 59]), o($VU, [2, 60]), o($VU, [2, 61]), o($VU, [2, 62]), o($VV, [2, 154]), o($VV, [2, 155]), o($VV, [2, 156]), o($VV, [2, 157]), o($VV, [2, 158]), o($VV, [2, 159]), o($VV, [2, 160]), o($VV, [2, 161]), o($VV, [2, 162]), o($VV, [2, 163]), o($VV, [2, 164]), { 8: $VW, 9: $VX, 10: $VT, 14: 116, 21: 119 }, { 8: $VW, 9: $VX, 10: $VT, 14: 120, 21: 119 }, { 8: $VW, 9: $VX, 10: $VT, 14: 121, 21: 119 }, { 8: $VW, 9: $VX, 10: $VT, 14: 122, 21: 119 }, { 8: $VW, 9: $VX, 10: $VT, 14: 123, 21: 119 }, o($Vt, [2, 30]), o($Vt, [2, 38]), o($Vt, [2, 39]), o($Vt, [2, 40]), o($Vt, [2, 31]), o($Vt, [2, 32]), o($Vt, [2, 33]), o($Vt, [2, 34]), o($Vt, [2, 35]), { 8: $Vu, 9: $Vv, 10: $Vx, 11: $Vw, 12: $Vy, 13: $Vz, 15: $VA, 16: $VB, 17: $VC, 18: $VD, 24: 124, 30: $VE, 32: $VF, 45: 71, 46: $VG, 50: $VH, 60: $VI, 66: 125, 70: 74, 71: $VK, 72: $VL, 73: $VM, 74: $VN, 75: $VO, 77: 64, 78: $VP, 81: $Vi, 84: $VQ, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, o($VY, $V4, { 5: 126 }), o($VZ, [2, 92]), o($VZ, [2, 94]), o($VZ, [2, 143]), o($VZ, [2, 144]), o($VZ, [2, 145]), o($VZ, [2, 146]), o($VZ, [2, 147]), o($VZ, [2, 148]), o($VZ, [2, 149]), o($VZ, [2, 150]), o($VZ, [2, 151]), o($VZ, [2, 152]), o($VZ, [2, 153]), o($VZ, [2, 97]), o($VZ, [2, 98]), o($VZ, [2, 99]), o($VZ, [2, 100]), o($VZ, [2, 101]), o($VZ, [2, 102]), o($VZ, [2, 103]), o($VZ, [2, 104]), o($VZ, [2, 105]), o($VZ, [2, 106]), o($VZ, [2, 107]), { 13: $V9, 18: $Va, 33: 127, 35: 29, 44: 30, 45: 32, 46: $Vc, 81: $Vi, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, o($V_, [2, 66], { 48: 128, 49: [1, 129], 65: [1, 130] }), { 10: $Vx, 12: $Vy, 13: $Vz, 15: $VA, 16: $VB, 17: $VC, 18: $VD, 30: $VE, 31: 131, 32: $VF, 45: 71, 46: $VG, 50: $VH, 60: $VI, 66: 62, 67: $VJ, 70: 74, 71: $VK, 72: $VL, 73: $VM, 74: $VN, 75: $VO, 77: 64, 78: $VP, 81: $Vi, 84: $VQ, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 10: $Vx, 12: $Vy, 13: $Vz, 15: $VA, 16: $VB, 17: $VC, 18: $VD, 30: $VE, 31: 132, 32: $VF, 45: 71, 46: $VG, 50: $VH, 60: $VI, 66: 62, 67: $VJ, 70: 74, 71: $VK, 72: $VL, 73: $VM, 74: $VN, 75: $VO, 77: 64, 78: $VP, 81: $Vi, 84: $VQ, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 10: $Vx, 12: $Vy, 13: $Vz, 15: $VA, 16: $VB, 17: $VC, 18: $VD, 30: $VE, 31: 133, 32: $VF, 45: 71, 46: $VG, 50: $VH, 60: $VI, 66: 62, 67: $VJ, 70: 74, 71: $VK, 72: $VL, 73: $VM, 74: $VN, 75: $VO, 77: 64, 78: $VP, 81: $Vi, 84: $VQ, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, o($V$, [2, 79]), o($V$, [2, 80]), o($V$, [2, 81]), o($V$, [2, 82]), o($V$, [2, 83]), o($V$, [2, 84]), o($V$, [2, 85]), o($V$, [2, 86]), o($V$, [2, 87]), o($V$, [2, 88]), o($V$, [2, 89]), o($V$, [2, 90]), { 13: $V9, 18: $Va, 35: 134, 44: 30, 45: 32, 46: $Vc, 80: [1, 135], 81: $Vi, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 78: [1, 136], 81: [1, 137] }, { 13: $V9, 18: $Va, 35: 139, 44: 30, 45: 32, 46: $Vc, 78: [1, 138], 81: $Vi, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 13: $V9, 18: $Va, 35: 140, 44: 30, 45: 32, 46: $Vc, 81: $Vi, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 13: $V9, 18: $Va, 35: 141, 44: 30, 45: 32, 46: $Vc, 81: $Vi, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 10: $Vx, 12: $Vy, 13: $Vz, 15: $VA, 16: $VB, 17: $VC, 18: $VD, 30: $VE, 31: 142, 32: $VF, 45: 71, 46: $VG, 50: $VH, 60: $VI, 66: 62, 67: $VJ, 70: 74, 71: $VK, 72: $VL, 73: $VM, 74: $VN, 75: $VO, 77: 64, 78: $VP, 81: $Vi, 84: $VQ, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 10: $Vx, 12: $Vy, 13: $Vz, 15: $VA, 16: $VB, 17: $VC, 18: $VD, 30: $VE, 31: 144, 32: $VF, 38: [1, 143], 45: 71, 46: $VG, 50: $VH, 60: $VI, 66: 62, 67: $VJ, 70: 74, 71: $VK, 72: $VL, 73: $VM, 74: $VN, 75: $VO, 77: 64, 78: $VP, 81: $Vi, 84: $VQ, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 10: $Vx, 12: $Vy, 13: $Vz, 15: $VA, 16: $VB, 17: $VC, 18: $VD, 30: $VE, 31: 145, 32: $VF, 45: 71, 46: $VG, 50: $VH, 60: $VI, 66: 62, 67: $VJ, 70: 74, 71: $VK, 72: $VL, 73: $VM, 74: $VN, 75: $VO, 77: 64, 78: $VP, 81: $Vi, 84: $VQ, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 10: $Vx, 12: $Vy, 13: $Vz, 15: $VA, 16: $VB, 17: $VC, 18: $VD, 30: $VE, 31: 146, 32: $VF, 45: 71, 46: $VG, 50: $VH, 60: $VI, 66: 62, 67: $VJ, 70: 74, 71: $VK, 72: $VL, 73: $VM, 74: $VN, 75: $VO, 77: 64, 78: $VP, 81: $Vi, 84: $VQ, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 10: $Vx, 12: $Vy, 13: $Vz, 15: $VA, 16: $VB, 17: $VC, 18: $VD, 30: $VE, 31: 147, 32: $VF, 45: 71, 46: $VG, 50: $VH, 60: $VI, 66: 62, 67: $VJ, 70: 74, 71: $VK, 72: $VL, 73: $VM, 74: $VN, 75: $VO, 77: 64, 78: $VP, 81: $Vi, 84: $VQ, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, o($VS, [2, 56]), o($VU, [2, 58]), o($VS, [2, 29], { 21: 148, 10: $VT }), o($V3, [2, 11]), o($V3, [2, 21]), o($V3, [2, 22]), { 9: [1, 149] }, o($V3, [2, 12]), o($V3, [2, 13]), o($V3, [2, 14]), o($V3, [2, 15]), o($VY, $V4, { 5: 150 }), o($VZ, [2, 93]), { 6: 10, 7: 11, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 13: $V9, 18: $Va, 23: 16, 25: 17, 26: 18, 27: 19, 28: 20, 29: 21, 30: $Vb, 32: [1, 151], 33: 23, 35: 29, 44: 30, 45: 32, 46: $Vc, 71: $Vd, 72: $Ve, 73: $Vf, 74: $Vg, 75: $Vh, 81: $Vi, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, o($VR, [2, 41]), o($V_, [2, 63], { 10: [1, 152] }), { 10: [1, 153] }, { 10: $Vx, 12: $Vy, 13: $Vz, 15: $VA, 16: $VB, 17: $VC, 18: $VD, 30: $VE, 31: 154, 32: $VF, 45: 71, 46: $VG, 50: $VH, 60: $VI, 66: 62, 67: $VJ, 70: 74, 71: $VK, 72: $VL, 73: $VM, 74: $VN, 75: $VO, 77: 64, 78: $VP, 81: $Vi, 84: $VQ, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 10: $Vx, 12: $Vy, 13: $Vz, 15: $VA, 16: $VB, 17: $VC, 18: $VD, 30: $VE, 32: $VF, 45: 71, 46: $VG, 50: $VH, 51: [1, 155], 52: [1, 156], 53: [1, 157], 54: [1, 158], 60: $VI, 66: 125, 70: 74, 71: $VK, 72: $VL, 73: $VM, 74: $VN, 75: $VO, 77: 64, 78: $VP, 81: $Vi, 84: $VQ, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 10: $Vx, 12: $Vy, 13: $Vz, 15: $VA, 16: $VB, 17: $VC, 18: $VD, 30: $VE, 32: $VF, 45: 71, 46: $VG, 50: $VH, 56: [1, 159], 57: [1, 160], 58: [1, 161], 59: [1, 162], 60: $VI, 66: 125, 70: 74, 71: $VK, 72: $VL, 73: $VM, 74: $VN, 75: $VO, 77: 64, 78: $VP, 81: $Vi, 84: $VQ, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 10: $Vx, 12: $Vy, 13: $Vz, 15: $VA, 16: $VB, 17: $VC, 18: $VD, 30: $VE, 32: $VF, 45: 71, 46: $VG, 50: $VH, 60: $VI, 61: [1, 163], 62: [1, 164], 63: [1, 165], 64: [1, 166], 66: 125, 70: 74, 71: $VK, 72: $VL, 73: $VM, 74: $VN, 75: $VO, 77: 64, 78: $VP, 81: $Vi, 84: $VQ, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 10: [1, 167], 13: $V9, 18: $Va, 44: 114, 45: 32, 46: $Vc, 81: $Vi, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 10: [1, 168] }, { 10: [1, 169] }, { 10: [1, 170] }, { 10: [1, 171] }, { 10: [1, 172], 13: $V9, 18: $Va, 44: 114, 45: 32, 46: $Vc, 81: $Vi, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 10: [1, 173], 13: $V9, 18: $Va, 44: 114, 45: 32, 46: $Vc, 81: $Vi, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 10: [1, 174], 13: $V9, 18: $Va, 44: 114, 45: 32, 46: $Vc, 81: $Vi, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 10: $Vx, 12: $Vy, 13: $Vz, 15: $VA, 16: $VB, 17: $VC, 18: $VD, 30: $VE, 32: $VF, 37: [1, 175], 45: 71, 46: $VG, 50: $VH, 60: $VI, 66: 125, 70: 74, 71: $VK, 72: $VL, 73: $VM, 74: $VN, 75: $VO, 77: 64, 78: $VP, 81: $Vi, 84: $VQ, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 10: $Vx, 12: $Vy, 13: $Vz, 15: $VA, 16: $VB, 17: $VC, 18: $VD, 30: $VE, 31: 176, 32: $VF, 45: 71, 46: $VG, 50: $VH, 60: $VI, 66: 62, 67: $VJ, 70: 74, 71: $VK, 72: $VL, 73: $VM, 74: $VN, 75: $VO, 77: 64, 78: $VP, 81: $Vi, 84: $VQ, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 10: $Vx, 12: $Vy, 13: $Vz, 15: $VA, 16: $VB, 17: $VC, 18: $VD, 30: $VE, 32: $VF, 39: [1, 177], 45: 71, 46: $VG, 50: $VH, 60: $VI, 66: 125, 70: 74, 71: $VK, 72: $VL, 73: $VM, 74: $VN, 75: $VO, 77: 64, 78: $VP, 81: $Vi, 84: $VQ, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 10: $Vx, 12: $Vy, 13: $Vz, 15: $VA, 16: $VB, 17: $VC, 18: $VD, 30: $VE, 32: $VF, 41: [1, 178], 45: 71, 46: $VG, 50: $VH, 60: $VI, 66: 125, 70: 74, 71: $VK, 72: $VL, 73: $VM, 74: $VN, 75: $VO, 77: 64, 78: $VP, 81: $Vi, 84: $VQ, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 10: $Vx, 12: $Vy, 13: $Vz, 15: $VA, 16: $VB, 17: $VC, 18: $VD, 30: $VE, 32: $VF, 43: [1, 179], 45: 71, 46: $VG, 50: $VH, 60: $VI, 66: 125, 70: 74, 71: $VK, 72: $VL, 73: $VM, 74: $VN, 75: $VO, 77: 64, 78: $VP, 81: $Vi, 84: $VQ, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 10: $Vx, 12: $Vy, 13: $Vz, 15: $VA, 16: $VB, 17: $VC, 18: $VD, 30: $VE, 32: $VF, 37: [1, 180], 45: 71, 46: $VG, 50: $VH, 60: $VI, 66: 125, 70: 74, 71: $VK, 72: $VL, 73: $VM, 74: $VN, 75: $VO, 77: 64, 78: $VP, 81: $Vi, 84: $VQ, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, o($VS, [2, 28]), o($V3, [2, 23]), { 6: 10, 7: 11, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 13: $V9, 18: $Va, 23: 16, 25: 17, 26: 18, 27: 19, 28: 20, 29: 21, 30: $Vb, 32: [1, 181], 33: 23, 35: 29, 44: 30, 45: 32, 46: $Vc, 71: $Vd, 72: $Ve, 73: $Vf, 74: $Vg, 75: $Vh, 81: $Vi, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, o($Vt, [2, 37]), o($V_, [2, 65]), o($V_, [2, 64]), { 10: $Vx, 12: $Vy, 13: $Vz, 15: $VA, 16: $VB, 17: $VC, 18: $VD, 30: $VE, 32: $VF, 45: 71, 46: $VG, 50: $VH, 60: $VI, 65: [1, 182], 66: 125, 70: 74, 71: $VK, 72: $VL, 73: $VM, 74: $VN, 75: $VO, 77: 64, 78: $VP, 81: $Vi, 84: $VQ, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, o($V_, [2, 67]), o($V_, [2, 68]), o($V_, [2, 69]), o($V_, [2, 70]), o($V_, [2, 71]), o($V_, [2, 72]), o($V_, [2, 73]), o($V_, [2, 74]), o($V_, [2, 75]), o($V_, [2, 76]), o($V_, [2, 77]), o($V_, [2, 78]), { 10: $V01, 46: $V11, 71: $V21, 79: 183, 80: $V31, 81: $V41, 84: $V51, 85: 184, 87: 185, 88: $V61, 89: $V71, 90: $V81, 91: $V91, 92: $Va1 }, { 10: $V01, 46: $V11, 71: $V21, 79: 197, 80: $V31, 81: $V41, 84: $V51, 85: 184, 87: 185, 88: $V61, 89: $V71, 90: $V81, 91: $V91, 92: $Va1 }, { 10: $V01, 46: $V11, 71: $V21, 79: 198, 80: $V31, 81: $V41, 82: [1, 199], 84: $V51, 85: 184, 87: 185, 88: $V61, 89: $V71, 90: $V81, 91: $V91, 92: $Va1 }, { 10: $V01, 46: $V11, 71: $V21, 79: 200, 80: $V31, 81: $V41, 82: [1, 201], 84: $V51, 85: 184, 87: 185, 88: $V61, 89: $V71, 90: $V81, 91: $V91, 92: $Va1 }, { 10: $V01, 46: $V11, 71: $V21, 79: 202, 80: $V31, 81: $V41, 84: $V51, 85: 184, 87: 185, 88: $V61, 89: $V71, 90: $V81, 91: $V91, 92: $Va1 }, { 10: $V01, 46: $V11, 71: $V21, 79: 203, 80: $V31, 81: $V41, 84: $V51, 85: 184, 87: 185, 88: $V61, 89: $V71, 90: $V81, 91: $V91, 92: $Va1 }, { 13: $V9, 18: $Va, 35: 204, 44: 30, 45: 32, 46: $Vc, 81: $Vi, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 13: $V9, 18: $Va, 35: 205, 44: 30, 45: 32, 46: $Vc, 67: [1, 206], 81: $Vi, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, o($VS, [2, 43], { 21: 207, 10: $VT }), { 10: $Vx, 12: $Vy, 13: $Vz, 15: $VA, 16: $VB, 17: $VC, 18: $VD, 30: $VE, 32: $VF, 39: [1, 208], 45: 71, 46: $VG, 50: $VH, 60: $VI, 66: 125, 70: 74, 71: $VK, 72: $VL, 73: $VM, 74: $VN, 75: $VO, 77: 64, 78: $VP, 81: $Vi, 84: $VQ, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, o($VS, [2, 49], { 21: 209, 10: $VT }), o($VS, [2, 47], { 21: 210, 10: $VT }), o($VS, [2, 51], { 21: 211, 10: $VT }), o($VS, [2, 53], { 21: 212, 10: $VT }), o($Vt, [2, 36]), o([10, 13, 18, 46, 81, 86, 88, 89, 91, 92, 94, 95, 96, 97, 98], [2, 91]), o($VR, [2, 117], { 86: $Vb1 }), o($Vc1, [2, 126], { 87: 214, 10: $V01, 46: $V11, 71: $V21, 80: $V31, 81: $V41, 84: $V51, 88: $V61, 89: $V71, 90: $V81, 91: $V91, 92: $Va1 }), o($Vd1, [2, 128]), o($Vd1, [2, 130]), o($Vd1, [2, 131]), o($Vd1, [2, 132]), o($Vd1, [2, 133]), o($Vd1, [2, 134]), o($Vd1, [2, 135]), o($Vd1, [2, 136]), o($Vd1, [2, 137]), o($Vd1, [2, 138]), o($Vd1, [2, 139]), o($Vd1, [2, 140]), o($VR, [2, 118], { 86: $Vb1 }), o($VR, [2, 119], { 86: $Vb1 }), { 10: [1, 215] }, o($VR, [2, 120], { 86: $Vb1 }), { 10: [1, 216] }, o($VR, [2, 110], { 86: $Vb1 }), o($VR, [2, 111], { 86: $Vb1 }), o($VR, [2, 112], { 45: 32, 44: 114, 13: $V9, 18: $Va, 46: $Vc, 81: $Vi, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }), o($VR, [2, 113], { 45: 32, 44: 114, 10: [1, 217], 13: $V9, 18: $Va, 46: $Vc, 81: $Vi, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }), o($VR, [2, 115], { 10: [1, 218] }), o($VS, [2, 44]), { 39: [1, 219] }, o($VS, [2, 50]), o($VS, [2, 48]), o($VS, [2, 52]), o($VS, [2, 54]), { 10: $V01, 46: $V11, 71: $V21, 80: $V31, 81: $V41, 84: $V51, 85: 220, 87: 185, 88: $V61, 89: $V71, 90: $V81, 91: $V91, 92: $Va1 }, o($Vd1, [2, 129]), { 13: $V9, 18: $Va, 35: 221, 44: 30, 45: 32, 46: $Vc, 81: $Vi, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 13: $V9, 18: $Va, 35: 222, 44: 30, 45: 32, 46: $Vc, 81: $Vi, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }, { 67: [1, 223] }, { 67: [1, 224] }, o($VS, [2, 45], { 21: 225, 10: $VT }), o($Vc1, [2, 127], { 87: 214, 10: $V01, 46: $V11, 71: $V21, 80: $V31, 81: $V41, 84: $V51, 88: $V61, 89: $V71, 90: $V81, 91: $V91, 92: $Va1 }), o($VR, [2, 123], { 45: 32, 44: 114, 10: [1, 226], 13: $V9, 18: $Va, 46: $Vc, 81: $Vi, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }), o($VR, [2, 124], { 45: 32, 44: 114, 10: [1, 227], 13: $V9, 18: $Va, 46: $Vc, 81: $Vi, 86: $Vj, 88: $Vk, 89: $Vl, 91: $Vm, 92: $Vn, 94: $Vo, 95: $Vp, 96: $Vq, 97: $Vr, 98: $Vs }), o($VR, [2, 114]), o($VR, [2, 116]), o($VS, [2, 46]), { 10: $V01, 46: $V11, 71: $V21, 79: 228, 80: $V31, 81: $V41, 84: $V51, 85: 184, 87: 185, 88: $V61, 89: $V71, 90: $V81, 91: $V91, 92: $Va1 }, { 10: $V01, 46: $V11, 71: $V21, 79: 229, 80: $V31, 81: $V41, 84: $V51, 85: 184, 87: 185, 88: $V61, 89: $V71, 90: $V81, 91: $V91, 92: $Va1 }, o($VR, [2, 121], { 86: $Vb1 }), o($VR, [2, 122], { 86: $Vb1 })],
|
2036 | defaultActions: {},
|
2037 | parseError: function parseError(str, hash) {
|
2038 | if (hash.recoverable) {
|
2039 | this.trace(str);
|
2040 | } else {
|
2041 | var _parseError = function _parseError(msg, hash) {
|
2042 | this.message = msg;
|
2043 | this.hash = hash;
|
2044 | };
|
2045 |
|
2046 | _parseError.prototype = Error;
|
2047 |
|
2048 | throw new _parseError(str, hash);
|
2049 | }
|
2050 | },
|
2051 | parse: function parse(input) {
|
2052 | var self = this,
|
2053 | stack = [0],
|
2054 | tstack = [],
|
2055 | vstack = [null],
|
2056 | lstack = [],
|
2057 | table = this.table,
|
2058 | yytext = '',
|
2059 | yylineno = 0,
|
2060 | yyleng = 0,
|
2061 | recovering = 0,
|
2062 | TERROR = 2,
|
2063 | EOF = 1;
|
2064 | var args = lstack.slice.call(arguments, 1);
|
2065 | var lexer = Object.create(this.lexer);
|
2066 | var sharedState = { yy: {} };
|
2067 | for (var k in this.yy) {
|
2068 | if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
2069 | sharedState.yy[k] = this.yy[k];
|
2070 | }
|
2071 | }
|
2072 | lexer.setInput(input, sharedState.yy);
|
2073 | sharedState.yy.lexer = lexer;
|
2074 | sharedState.yy.parser = this;
|
2075 | if (typeof lexer.yylloc == 'undefined') {
|
2076 | lexer.yylloc = {};
|
2077 | }
|
2078 | var yyloc = lexer.yylloc;
|
2079 | lstack.push(yyloc);
|
2080 | var ranges = lexer.options && lexer.options.ranges;
|
2081 | if (typeof sharedState.yy.parseError === 'function') {
|
2082 | this.parseError = sharedState.yy.parseError;
|
2083 | } else {
|
2084 | this.parseError = Object.getPrototypeOf(this).parseError;
|
2085 | }
|
2086 | function popStack(n) {
|
2087 | stack.length = stack.length - 2 * n;
|
2088 | vstack.length = vstack.length - n;
|
2089 | lstack.length = lstack.length - n;
|
2090 | }
|
2091 | function lex() {
|
2092 | var token;
|
2093 | token = tstack.pop() || lexer.lex() || EOF;
|
2094 | if (typeof token !== 'number') {
|
2095 | if (token instanceof Array) {
|
2096 | tstack = token;
|
2097 | token = tstack.pop();
|
2098 | }
|
2099 | token = self.symbols_[token] || token;
|
2100 | }
|
2101 | return token;
|
2102 | }
|
2103 | var symbol,
|
2104 | preErrorSymbol,
|
2105 | state,
|
2106 | action,
|
2107 | a,
|
2108 | r,
|
2109 | yyval = {},
|
2110 | p,
|
2111 | len,
|
2112 | newState,
|
2113 | expected;
|
2114 | while (true) {
|
2115 | state = stack[stack.length - 1];
|
2116 | if (this.defaultActions[state]) {
|
2117 | action = this.defaultActions[state];
|
2118 | } else {
|
2119 | if (symbol === null || typeof symbol == 'undefined') {
|
2120 | symbol = lex();
|
2121 | }
|
2122 | action = table[state] && table[state][symbol];
|
2123 | }
|
2124 | if (typeof action === 'undefined' || !action.length || !action[0]) {
|
2125 | var errStr = '';
|
2126 | expected = [];
|
2127 | for (p in table[state]) {
|
2128 | if (this.terminals_[p] && p > TERROR) {
|
2129 | expected.push('\'' + this.terminals_[p] + '\'');
|
2130 | }
|
2131 | }
|
2132 | if (lexer.showPosition) {
|
2133 | errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
|
2134 | } else {
|
2135 | errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
|
2136 | }
|
2137 | this.parseError(errStr, {
|
2138 | text: lexer.match,
|
2139 | token: this.terminals_[symbol] || symbol,
|
2140 | line: lexer.yylineno,
|
2141 | loc: yyloc,
|
2142 | expected: expected
|
2143 | });
|
2144 | }
|
2145 | if (action[0] instanceof Array && action.length > 1) {
|
2146 | throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
|
2147 | }
|
2148 | switch (action[0]) {
|
2149 | case 1:
|
2150 | stack.push(symbol);
|
2151 | vstack.push(lexer.yytext);
|
2152 | lstack.push(lexer.yylloc);
|
2153 | stack.push(action[1]);
|
2154 | symbol = null;
|
2155 | if (!preErrorSymbol) {
|
2156 | yyleng = lexer.yyleng;
|
2157 | yytext = lexer.yytext;
|
2158 | yylineno = lexer.yylineno;
|
2159 | yyloc = lexer.yylloc;
|
2160 | if (recovering > 0) {
|
2161 | recovering--;
|
2162 | }
|
2163 | } else {
|
2164 | symbol = preErrorSymbol;
|
2165 | preErrorSymbol = null;
|
2166 | }
|
2167 | break;
|
2168 | case 2:
|
2169 | len = this.productions_[action[1]][1];
|
2170 | yyval.$ = vstack[vstack.length - len];
|
2171 | yyval._$ = {
|
2172 | first_line: lstack[lstack.length - (len || 1)].first_line,
|
2173 | last_line: lstack[lstack.length - 1].last_line,
|
2174 | first_column: lstack[lstack.length - (len || 1)].first_column,
|
2175 | last_column: lstack[lstack.length - 1].last_column
|
2176 | };
|
2177 | if (ranges) {
|
2178 | yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
|
2179 | }
|
2180 | r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));
|
2181 | if (typeof r !== 'undefined') {
|
2182 | return r;
|
2183 | }
|
2184 | if (len) {
|
2185 | stack = stack.slice(0, -1 * len * 2);
|
2186 | vstack = vstack.slice(0, -1 * len);
|
2187 | lstack = lstack.slice(0, -1 * len);
|
2188 | }
|
2189 | stack.push(this.productions_[action[1]][0]);
|
2190 | vstack.push(yyval.$);
|
2191 | lstack.push(yyval._$);
|
2192 | newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
2193 | stack.push(newState);
|
2194 | break;
|
2195 | case 3:
|
2196 | return true;
|
2197 | }
|
2198 | }
|
2199 | return true;
|
2200 | } };
|
2201 |
|
2202 |
|
2203 | var lexer = function () {
|
2204 | var lexer = {
|
2205 |
|
2206 | EOF: 1,
|
2207 |
|
2208 | parseError: function parseError(str, hash) {
|
2209 | if (this.yy.parser) {
|
2210 | this.yy.parser.parseError(str, hash);
|
2211 | } else {
|
2212 | throw new Error(str);
|
2213 | }
|
2214 | },
|
2215 |
|
2216 |
|
2217 | setInput: function setInput(input, yy) {
|
2218 | this.yy = yy || this.yy || {};
|
2219 | this._input = input;
|
2220 | this._more = this._backtrack = this.done = false;
|
2221 | this.yylineno = this.yyleng = 0;
|
2222 | this.yytext = this.matched = this.match = '';
|
2223 | this.conditionStack = ['INITIAL'];
|
2224 | this.yylloc = {
|
2225 | first_line: 1,
|
2226 | first_column: 0,
|
2227 | last_line: 1,
|
2228 | last_column: 0
|
2229 | };
|
2230 | if (this.options.ranges) {
|
2231 | this.yylloc.range = [0, 0];
|
2232 | }
|
2233 | this.offset = 0;
|
2234 | return this;
|
2235 | },
|
2236 |
|
2237 |
|
2238 | input: function input() {
|
2239 | var ch = this._input[0];
|
2240 | this.yytext += ch;
|
2241 | this.yyleng++;
|
2242 | this.offset++;
|
2243 | this.match += ch;
|
2244 | this.matched += ch;
|
2245 | var lines = ch.match(/(?:\r\n?|\n).*/g);
|
2246 | if (lines) {
|
2247 | this.yylineno++;
|
2248 | this.yylloc.last_line++;
|
2249 | } else {
|
2250 | this.yylloc.last_column++;
|
2251 | }
|
2252 | if (this.options.ranges) {
|
2253 | this.yylloc.range[1]++;
|
2254 | }
|
2255 |
|
2256 | this._input = this._input.slice(1);
|
2257 | return ch;
|
2258 | },
|
2259 |
|
2260 |
|
2261 | unput: function unput(ch) {
|
2262 | var len = ch.length;
|
2263 | var lines = ch.split(/(?:\r\n?|\n)/g);
|
2264 |
|
2265 | this._input = ch + this._input;
|
2266 | this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
2267 |
|
2268 | this.offset -= len;
|
2269 | var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
2270 | this.match = this.match.substr(0, this.match.length - 1);
|
2271 | this.matched = this.matched.substr(0, this.matched.length - 1);
|
2272 |
|
2273 | if (lines.length - 1) {
|
2274 | this.yylineno -= lines.length - 1;
|
2275 | }
|
2276 | var r = this.yylloc.range;
|
2277 |
|
2278 | this.yylloc = {
|
2279 | first_line: this.yylloc.first_line,
|
2280 | last_line: this.yylineno + 1,
|
2281 | first_column: this.yylloc.first_column,
|
2282 | last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
|
2283 | };
|
2284 |
|
2285 | if (this.options.ranges) {
|
2286 | this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
2287 | }
|
2288 | this.yyleng = this.yytext.length;
|
2289 | return this;
|
2290 | },
|
2291 |
|
2292 |
|
2293 | more: function more() {
|
2294 | this._more = true;
|
2295 | return this;
|
2296 | },
|
2297 |
|
2298 |
|
2299 | reject: function reject() {
|
2300 | if (this.options.backtrack_lexer) {
|
2301 | this._backtrack = true;
|
2302 | } else {
|
2303 | 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(), {
|
2304 | text: "",
|
2305 | token: null,
|
2306 | line: this.yylineno
|
2307 | });
|
2308 | }
|
2309 | return this;
|
2310 | },
|
2311 |
|
2312 |
|
2313 | less: function less(n) {
|
2314 | this.unput(this.match.slice(n));
|
2315 | },
|
2316 |
|
2317 |
|
2318 | pastInput: function pastInput() {
|
2319 | var past = this.matched.substr(0, this.matched.length - this.match.length);
|
2320 | return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
|
2321 | },
|
2322 |
|
2323 |
|
2324 | upcomingInput: function upcomingInput() {
|
2325 | var next = this.match;
|
2326 | if (next.length < 20) {
|
2327 | next += this._input.substr(0, 20 - next.length);
|
2328 | }
|
2329 | return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
|
2330 | },
|
2331 |
|
2332 |
|
2333 | showPosition: function showPosition() {
|
2334 | var pre = this.pastInput();
|
2335 | var c = new Array(pre.length + 1).join("-");
|
2336 | return pre + this.upcomingInput() + "\n" + c + "^";
|
2337 | },
|
2338 |
|
2339 |
|
2340 | test_match: function test_match(match, indexed_rule) {
|
2341 | var token, lines, backup;
|
2342 |
|
2343 | if (this.options.backtrack_lexer) {
|
2344 |
|
2345 | backup = {
|
2346 | yylineno: this.yylineno,
|
2347 | yylloc: {
|
2348 | first_line: this.yylloc.first_line,
|
2349 | last_line: this.last_line,
|
2350 | first_column: this.yylloc.first_column,
|
2351 | last_column: this.yylloc.last_column
|
2352 | },
|
2353 | yytext: this.yytext,
|
2354 | match: this.match,
|
2355 | matches: this.matches,
|
2356 | matched: this.matched,
|
2357 | yyleng: this.yyleng,
|
2358 | offset: this.offset,
|
2359 | _more: this._more,
|
2360 | _input: this._input,
|
2361 | yy: this.yy,
|
2362 | conditionStack: this.conditionStack.slice(0),
|
2363 | done: this.done
|
2364 | };
|
2365 | if (this.options.ranges) {
|
2366 | backup.yylloc.range = this.yylloc.range.slice(0);
|
2367 | }
|
2368 | }
|
2369 |
|
2370 | lines = match[0].match(/(?:\r\n?|\n).*/g);
|
2371 | if (lines) {
|
2372 | this.yylineno += lines.length;
|
2373 | }
|
2374 | this.yylloc = {
|
2375 | first_line: this.yylloc.last_line,
|
2376 | last_line: this.yylineno + 1,
|
2377 | first_column: this.yylloc.last_column,
|
2378 | last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
|
2379 | };
|
2380 | this.yytext += match[0];
|
2381 | this.match += match[0];
|
2382 | this.matches = match;
|
2383 | this.yyleng = this.yytext.length;
|
2384 | if (this.options.ranges) {
|
2385 | this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
2386 | }
|
2387 | this._more = false;
|
2388 | this._backtrack = false;
|
2389 | this._input = this._input.slice(match[0].length);
|
2390 | this.matched += match[0];
|
2391 | token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
2392 | if (this.done && this._input) {
|
2393 | this.done = false;
|
2394 | }
|
2395 | if (token) {
|
2396 | return token;
|
2397 | } else if (this._backtrack) {
|
2398 |
|
2399 | for (var k in backup) {
|
2400 | this[k] = backup[k];
|
2401 | }
|
2402 | return false;
|
2403 | }
|
2404 | return false;
|
2405 | },
|
2406 |
|
2407 |
|
2408 | next: function next() {
|
2409 | if (this.done) {
|
2410 | return this.EOF;
|
2411 | }
|
2412 | if (!this._input) {
|
2413 | this.done = true;
|
2414 | }
|
2415 |
|
2416 | var token, match, tempMatch, index;
|
2417 | if (!this._more) {
|
2418 | this.yytext = '';
|
2419 | this.match = '';
|
2420 | }
|
2421 | var rules = this._currentRules();
|
2422 | for (var i = 0; i < rules.length; i++) {
|
2423 | tempMatch = this._input.match(this.rules[rules[i]]);
|
2424 | if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
2425 | match = tempMatch;
|
2426 | index = i;
|
2427 | if (this.options.backtrack_lexer) {
|
2428 | token = this.test_match(tempMatch, rules[i]);
|
2429 | if (token !== false) {
|
2430 | return token;
|
2431 | } else if (this._backtrack) {
|
2432 | match = false;
|
2433 | continue;
|
2434 | } else {
|
2435 |
|
2436 | return false;
|
2437 | }
|
2438 | } else if (!this.options.flex) {
|
2439 | break;
|
2440 | }
|
2441 | }
|
2442 | }
|
2443 | if (match) {
|
2444 | token = this.test_match(match, rules[index]);
|
2445 | if (token !== false) {
|
2446 | return token;
|
2447 | }
|
2448 |
|
2449 | return false;
|
2450 | }
|
2451 | if (this._input === "") {
|
2452 | return this.EOF;
|
2453 | } else {
|
2454 | return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
|
2455 | text: "",
|
2456 | token: null,
|
2457 | line: this.yylineno
|
2458 | });
|
2459 | }
|
2460 | },
|
2461 |
|
2462 |
|
2463 | lex: function lex() {
|
2464 | var r = this.next();
|
2465 | if (r) {
|
2466 | return r;
|
2467 | } else {
|
2468 | return this.lex();
|
2469 | }
|
2470 | },
|
2471 |
|
2472 |
|
2473 | begin: function begin(condition) {
|
2474 | this.conditionStack.push(condition);
|
2475 | },
|
2476 |
|
2477 |
|
2478 | popState: function popState() {
|
2479 | var n = this.conditionStack.length - 1;
|
2480 | if (n > 0) {
|
2481 | return this.conditionStack.pop();
|
2482 | } else {
|
2483 | return this.conditionStack[0];
|
2484 | }
|
2485 | },
|
2486 |
|
2487 |
|
2488 | _currentRules: function _currentRules() {
|
2489 | if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
2490 | return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
2491 | } else {
|
2492 | return this.conditions["INITIAL"].rules;
|
2493 | }
|
2494 | },
|
2495 |
|
2496 |
|
2497 | topState: function topState(n) {
|
2498 | n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
2499 | if (n >= 0) {
|
2500 | return this.conditionStack[n];
|
2501 | } else {
|
2502 | return "INITIAL";
|
2503 | }
|
2504 | },
|
2505 |
|
2506 |
|
2507 | pushState: function pushState(condition) {
|
2508 | this.begin(condition);
|
2509 | },
|
2510 |
|
2511 |
|
2512 | stateStackSize: function stateStackSize() {
|
2513 | return this.conditionStack.length;
|
2514 | },
|
2515 | options: {},
|
2516 | performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
2517 | var YYSTATE = YY_START;
|
2518 | switch ($avoiding_name_collisions) {
|
2519 | case 0:
|
2520 |
|
2521 | break;
|
2522 | case 1:
|
2523 | this.begin("string");
|
2524 | break;
|
2525 | case 2:
|
2526 | this.popState();
|
2527 | break;
|
2528 | case 3:
|
2529 | return "STR";
|
2530 | break;
|
2531 | case 4:
|
2532 | return 71;
|
2533 | break;
|
2534 | case 5:
|
2535 | return 78;
|
2536 | break;
|
2537 | case 6:
|
2538 | return 72;
|
2539 | break;
|
2540 | case 7:
|
2541 | return 82;
|
2542 | break;
|
2543 | case 8:
|
2544 | return 73;
|
2545 | break;
|
2546 | case 9:
|
2547 | return 74;
|
2548 | break;
|
2549 | case 10:
|
2550 | return 75;
|
2551 | break;
|
2552 | case 11:
|
2553 | return 12;
|
2554 | break;
|
2555 | case 12:
|
2556 | return 30;
|
2557 | break;
|
2558 | case 13:
|
2559 | return 32;
|
2560 | break;
|
2561 | case 14:
|
2562 | return 13;
|
2563 | break;
|
2564 | case 15:
|
2565 | return 13;
|
2566 | break;
|
2567 | case 16:
|
2568 | return 13;
|
2569 | break;
|
2570 | case 17:
|
2571 | return 13;
|
2572 | break;
|
2573 | case 18:
|
2574 | return 13;
|
2575 | break;
|
2576 | case 19:
|
2577 | return 13;
|
2578 | break;
|
2579 | case 20:
|
2580 | return 81;
|
2581 | break;
|
2582 | case 21:
|
2583 | return 91;
|
2584 | break;
|
2585 | case 22:
|
2586 | return 89;
|
2587 | break;
|
2588 | case 23:
|
2589 | return 8;
|
2590 | break;
|
2591 | case 24:
|
2592 | return 86;
|
2593 | break;
|
2594 | case 25:
|
2595 | return 98;
|
2596 | break;
|
2597 | case 26:
|
2598 | return 16;
|
2599 | break;
|
2600 | case 27:
|
2601 | return 15;
|
2602 | break;
|
2603 | case 28:
|
2604 | return 17;
|
2605 | break;
|
2606 | case 29:
|
2607 | return 18;
|
2608 | break;
|
2609 | case 30:
|
2610 | return 53;
|
2611 | break;
|
2612 | case 31:
|
2613 | return 51;
|
2614 | break;
|
2615 | case 32:
|
2616 | return 52;
|
2617 | break;
|
2618 | case 33:
|
2619 | return 54;
|
2620 | break;
|
2621 | case 34:
|
2622 | return 58;
|
2623 | break;
|
2624 | case 35:
|
2625 | return 56;
|
2626 | break;
|
2627 | case 36:
|
2628 | return 57;
|
2629 | break;
|
2630 | case 37:
|
2631 | return 59;
|
2632 | break;
|
2633 | case 38:
|
2634 | return 58;
|
2635 | break;
|
2636 | case 39:
|
2637 | return 56;
|
2638 | break;
|
2639 | case 40:
|
2640 | return 57;
|
2641 | break;
|
2642 | case 41:
|
2643 | return 59;
|
2644 | break;
|
2645 | case 42:
|
2646 | return 63;
|
2647 | break;
|
2648 | case 43:
|
2649 | return 61;
|
2650 | break;
|
2651 | case 44:
|
2652 | return 62;
|
2653 | break;
|
2654 | case 45:
|
2655 | return 64;
|
2656 | break;
|
2657 | case 46:
|
2658 | return 50;
|
2659 | break;
|
2660 | case 47:
|
2661 | return 55;
|
2662 | break;
|
2663 | case 48:
|
2664 | return 60;
|
2665 | break;
|
2666 | case 49:
|
2667 | return 40;
|
2668 | break;
|
2669 | case 50:
|
2670 | return 41;
|
2671 | break;
|
2672 | case 51:
|
2673 | return 46;
|
2674 | break;
|
2675 | case 52:
|
2676 | return 92;
|
2677 | break;
|
2678 | case 53:
|
2679 | return 96;
|
2680 | break;
|
2681 | case 54:
|
2682 | return 84;
|
2683 | break;
|
2684 | case 55:
|
2685 | return 97;
|
2686 | break;
|
2687 | case 56:
|
2688 | return 97;
|
2689 | break;
|
2690 | case 57:
|
2691 | return 88;
|
2692 | break;
|
2693 | case 58:
|
2694 | return 94;
|
2695 | break;
|
2696 | case 59:
|
2697 | return 95;
|
2698 | break;
|
2699 | case 60:
|
2700 | return 65;
|
2701 | break;
|
2702 | case 61:
|
2703 | return 38;
|
2704 | break;
|
2705 | case 62:
|
2706 | return 39;
|
2707 | break;
|
2708 | case 63:
|
2709 | return 36;
|
2710 | break;
|
2711 | case 64:
|
2712 | return 37;
|
2713 | break;
|
2714 | case 65:
|
2715 | return 42;
|
2716 | break;
|
2717 | case 66:
|
2718 | return 43;
|
2719 | break;
|
2720 | case 67:
|
2721 | return 101;
|
2722 | break;
|
2723 | case 68:
|
2724 | return 9;
|
2725 | break;
|
2726 | case 69:
|
2727 | return 10;
|
2728 | break;
|
2729 | case 70:
|
2730 | return 11;
|
2731 | break;
|
2732 | }
|
2733 | },
|
2734 | 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]+)/, /^(?:#)/, /^(?::)/, /^(?:;)/, /^(?:,)/, /^(?:\*)/, /^(?:<)/, /^(?:>)/, /^(?:\^)/, /^(?:v\b)/, /^(?:\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*==[x]\s*)/, /^(?:\s*==>\s*)/, /^(?:\s*==[o]\s*)/, /^(?:\s*==[\=]\s*)/, /^(?:\s*--\s*)/, /^(?:\s*-\.\s*)/, /^(?:\s*==\s*)/, /^(?:\(-)/, /^(?:-\))/, /^(?:-)/, /^(?:\.)/, /^(?:\+)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:[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)/, /^(?:$)/],
|
2735 | 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], "inclusive": true } }
|
2736 | };
|
2737 | return lexer;
|
2738 | }();
|
2739 | parser.lexer = lexer;
|
2740 | function Parser() {
|
2741 | this.yy = {};
|
2742 | }
|
2743 | Parser.prototype = parser;parser.Parser = Parser;
|
2744 | return new Parser();
|
2745 | }();
|
2746 |
|
2747 | if (true) {
|
2748 | exports.parser = parser;
|
2749 | exports.Parser = parser.Parser;
|
2750 | exports.parse = function () {
|
2751 | return parser.parse.apply(parser, arguments);
|
2752 | };
|
2753 | exports.main = function commonjsMain(args) {
|
2754 | if (!args[1]) {
|
2755 | console.log('Usage: ' + args[0] + ' FILE');
|
2756 | process.exit(1);
|
2757 | }
|
2758 | var source = __webpack_require__(4).readFileSync(__webpack_require__(5).normalize(args[1]), "utf8");
|
2759 | return exports.parser.parse(source);
|
2760 | };
|
2761 | if (typeof module !== 'undefined' && __webpack_require__.c[__webpack_require__.s] === module) {
|
2762 | exports.main(process.argv.slice(1));
|
2763 | }
|
2764 | }
|
2765 | }.call(exports, __webpack_require__(2), __webpack_require__(3)(module)))
|
2766 |
|
2767 | }),
|
2768 |
|
2769 | (function(module, exports, __webpack_require__) {
|
2770 |
|
2771 | "use strict";
|
2772 | (function(process, module) {
|
2773 |
|
2774 |
|
2775 |
|
2776 |
|
2777 |
|
2778 |
|
2779 |
|
2780 |
|
2781 |
|
2782 |
|
2783 |
|
2784 |
|
2785 |
|
2786 |
|
2787 |
|
2788 |
|
2789 |
|
2790 |
|
2791 |
|
2792 |
|
2793 |
|
2794 |
|
2795 |
|
2796 |
|
2797 |
|
2798 |
|
2799 |
|
2800 |
|
2801 |
|
2802 |
|
2803 |
|
2804 |
|
2805 |
|
2806 |
|
2807 |
|
2808 |
|
2809 |
|
2810 |
|
2811 |
|
2812 |
|
2813 |
|
2814 |
|
2815 |
|
2816 |
|
2817 |
|
2818 |
|
2819 |
|
2820 |
|
2821 |
|
2822 |
|
2823 |
|
2824 |
|
2825 |
|
2826 |
|
2827 |
|
2828 |
|
2829 |
|
2830 |
|
2831 |
|
2832 |
|
2833 |
|
2834 |
|
2835 |
|
2836 |
|
2837 |
|
2838 |
|
2839 |
|
2840 |
|
2841 |
|
2842 |
|
2843 |
|
2844 |
|
2845 |
|
2846 |
|
2847 | var parser = function () {
|
2848 | var o = function o(k, v, _o, l) {
|
2849 | for (_o = _o || {}, l = k.length; l--; _o[k[l]] = v) {}return _o;
|
2850 | },
|
2851 | $V0 = [1, 5],
|
2852 | $V1 = [1, 6],
|
2853 | $V2 = [1, 12],
|
2854 | $V3 = [1, 13],
|
2855 | $V4 = [1, 14],
|
2856 | $V5 = [1, 15],
|
2857 | $V6 = [1, 16],
|
2858 | $V7 = [1, 17],
|
2859 | $V8 = [1, 18],
|
2860 | $V9 = [1, 19],
|
2861 | $Va = [1, 20],
|
2862 | $Vb = [1, 21],
|
2863 | $Vc = [1, 22],
|
2864 | $Vd = [8, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26],
|
2865 | $Ve = [1, 37],
|
2866 | $Vf = [1, 33],
|
2867 | $Vg = [1, 34],
|
2868 | $Vh = [1, 35],
|
2869 | $Vi = [1, 36],
|
2870 | $Vj = [8, 10, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 32, 37, 39, 40, 45, 57, 58],
|
2871 | $Vk = [10, 28],
|
2872 | $Vl = [10, 28, 37, 57, 58],
|
2873 | $Vm = [2, 49],
|
2874 | $Vn = [1, 45],
|
2875 | $Vo = [1, 48],
|
2876 | $Vp = [1, 49],
|
2877 | $Vq = [1, 52],
|
2878 | $Vr = [2, 65],
|
2879 | $Vs = [1, 65],
|
2880 | $Vt = [1, 66],
|
2881 | $Vu = [1, 67],
|
2882 | $Vv = [1, 68],
|
2883 | $Vw = [1, 69],
|
2884 | $Vx = [1, 70],
|
2885 | $Vy = [1, 71],
|
2886 | $Vz = [1, 72],
|
2887 | $VA = [1, 73],
|
2888 | $VB = [8, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 47],
|
2889 | $VC = [10, 28, 37];
|
2890 | var parser = { trace: function trace() {},
|
2891 | yy: {},
|
2892 | symbols_: { "error": 2, "expressions": 3, "graph": 4, "EOF": 5, "graphStatement": 6, "idStatement": 7, "{": 8, "stmt_list": 9, "}": 10, "strict": 11, "GRAPH": 12, "DIGRAPH": 13, "textNoTags": 14, "textNoTagsToken": 15, "ALPHA": 16, "NUM": 17, "COLON": 18, "PLUS": 19, "EQUALS": 20, "MULT": 21, "DOT": 22, "BRKT": 23, "SPACE": 24, "MINUS": 25, "keywords": 26, "stmt": 27, ";": 28, "node_stmt": 29, "edge_stmt": 30, "attr_stmt": 31, "=": 32, "subgraph": 33, "attr_list": 34, "NODE": 35, "EDGE": 36, "[": 37, "a_list": 38, "]": 39, ",": 40, "edgeRHS": 41, "node_id": 42, "edgeop": 43, "port": 44, ":": 45, "compass_pt": 46, "SUBGRAPH": 47, "n": 48, "ne": 49, "e": 50, "se": 51, "s": 52, "sw": 53, "w": 54, "nw": 55, "c": 56, "ARROW_POINT": 57, "ARROW_OPEN": 58, "$accept": 0, "$end": 1 },
|
2893 | terminals_: { 2: "error", 5: "EOF", 8: "{", 10: "}", 11: "strict", 12: "GRAPH", 13: "DIGRAPH", 16: "ALPHA", 17: "NUM", 18: "COLON", 19: "PLUS", 20: "EQUALS", 21: "MULT", 22: "DOT", 23: "BRKT", 24: "SPACE", 25: "MINUS", 26: "keywords", 28: ";", 32: "=", 35: "NODE", 36: "EDGE", 37: "[", 39: "]", 40: ",", 45: ":", 47: "SUBGRAPH", 48: "n", 49: "ne", 50: "e", 51: "se", 52: "s", 53: "sw", 54: "w", 55: "nw", 56: "c", 57: "ARROW_POINT", 58: "ARROW_OPEN" },
|
2894 | productions_: [0, [3, 2], [4, 5], [4, 6], [4, 4], [6, 1], [6, 1], [7, 1], [14, 1], [14, 2], [15, 1], [15, 1], [15, 1], [15, 1], [15, 1], [15, 1], [15, 1], [15, 1], [15, 1], [15, 1], [15, 1], [9, 1], [9, 3], [27, 1], [27, 1], [27, 1], [27, 3], [27, 1], [31, 2], [31, 2], [31, 2], [34, 4], [34, 3], [34, 3], [34, 2], [38, 5], [38, 5], [38, 3], [30, 3], [30, 3], [30, 2], [30, 2], [41, 3], [41, 3], [41, 2], [41, 2], [29, 2], [29, 1], [42, 2], [42, 1], [44, 4], [44, 2], [44, 2], [33, 5], [33, 4], [33, 3], [46, 1], [46, 1], [46, 1], [46, 1], [46, 1], [46, 1], [46, 1], [46, 1], [46, 1], [46, 0], [43, 1], [43, 1]],
|
2895 | performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
|
2896 |
|
2897 |
|
2898 | var $0 = $$.length - 1;
|
2899 | switch (yystate) {
|
2900 | case 1:
|
2901 | this.$ = $$[$0 - 1];
|
2902 | break;
|
2903 | case 2:
|
2904 | this.$ = $$[$0 - 4];
|
2905 | break;
|
2906 | case 3:
|
2907 | this.$ = $$[$0 - 5];
|
2908 | break;
|
2909 | case 4:
|
2910 | this.$ = $$[$0 - 3];
|
2911 | break;
|
2912 | case 8:case 10:case 11:
|
2913 | this.$ = $$[$0];
|
2914 | break;
|
2915 | case 9:
|
2916 | this.$ = $$[$0 - 1] + '' + $$[$0];
|
2917 | break;
|
2918 | case 12:case 13:case 14:case 15:case 16:case 18:case 19:case 20:
|
2919 | this.$ = $$[$0];
|
2920 | break;
|
2921 | case 17:
|
2922 | this.$ = '<br>';
|
2923 | break;
|
2924 | case 39:
|
2925 | this.$ = 'oy';
|
2926 | break;
|
2927 | case 40:
|
2928 |
|
2929 | yy.addLink($$[$0 - 1], $$[$0].id, $$[$0].op);
|
2930 | this.$ = 'oy';
|
2931 | break;
|
2932 | case 42:
|
2933 |
|
2934 | yy.addLink($$[$0 - 1], $$[$0].id, $$[$0].op);
|
2935 | this.$ = { op: $$[$0 - 2], id: $$[$0 - 1] };
|
2936 |
|
2937 | break;
|
2938 | case 44:
|
2939 |
|
2940 | this.$ = { op: $$[$0 - 1], id: $$[$0] };
|
2941 |
|
2942 | break;
|
2943 | case 48:
|
2944 | yy.addVertex($$[$0 - 1]);this.$ = $$[$0 - 1];
|
2945 | break;
|
2946 | case 49:
|
2947 | yy.addVertex($$[$0]);this.$ = $$[$0];
|
2948 | break;
|
2949 | case 66:
|
2950 | this.$ = 'arrow';
|
2951 | break;
|
2952 | case 67:
|
2953 | this.$ = 'arrow_open';
|
2954 | break;
|
2955 | }
|
2956 | },
|
2957 | table: [{ 3: 1, 4: 2, 6: 3, 11: [1, 4], 12: $V0, 13: $V1 }, { 1: [3] }, { 5: [1, 7] }, { 7: 8, 8: [1, 9], 14: 10, 15: 11, 16: $V2, 17: $V3, 18: $V4, 19: $V5, 20: $V6, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: $Vb, 26: $Vc }, { 6: 23, 12: $V0, 13: $V1 }, o($Vd, [2, 5]), o($Vd, [2, 6]), { 1: [2, 1] }, { 8: [1, 24] }, { 7: 30, 8: $Ve, 9: 25, 12: $Vf, 14: 10, 15: 11, 16: $V2, 17: $V3, 18: $V4, 19: $V5, 20: $V6, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: $Vb, 26: $Vc, 27: 26, 29: 27, 30: 28, 31: 29, 33: 31, 35: $Vg, 36: $Vh, 42: 32, 47: $Vi }, o([8, 10, 28, 32, 37, 39, 40, 45, 57, 58], [2, 7], { 15: 38, 16: $V2, 17: $V3, 18: $V4, 19: $V5, 20: $V6, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: $Vb, 26: $Vc }), o($Vj, [2, 8]), o($Vj, [2, 10]), o($Vj, [2, 11]), o($Vj, [2, 12]), o($Vj, [2, 13]), o($Vj, [2, 14]), o($Vj, [2, 15]), o($Vj, [2, 16]), o($Vj, [2, 17]), o($Vj, [2, 18]), o($Vj, [2, 19]), o($Vj, [2, 20]), { 7: 39, 14: 10, 15: 11, 16: $V2, 17: $V3, 18: $V4, 19: $V5, 20: $V6, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: $Vb, 26: $Vc }, { 7: 30, 8: $Ve, 9: 40, 12: $Vf, 14: 10, 15: 11, 16: $V2, 17: $V3, 18: $V4, 19: $V5, 20: $V6, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: $Vb, 26: $Vc, 27: 26, 29: 27, 30: 28, 31: 29, 33: 31, 35: $Vg, 36: $Vh, 42: 32, 47: $Vi }, { 10: [1, 41] }, { 10: [2, 21], 28: [1, 42] }, o($Vk, [2, 23]), o($Vk, [2, 24]), o($Vk, [2, 25]), o($Vl, $Vm, { 44: 44, 32: [1, 43], 45: $Vn }), o($Vk, [2, 27], { 41: 46, 43: 47, 57: $Vo, 58: $Vp }), o($Vk, [2, 47], { 43: 47, 34: 50, 41: 51, 37: $Vq, 57: $Vo, 58: $Vp }), { 34: 53, 37: $Vq }, { 34: 54, 37: $Vq }, { 34: 55, 37: $Vq }, { 7: 56, 8: [1, 57], 14: 10, 15: 11, 16: $V2, 17: $V3, 18: $V4, 19: $V5, 20: $V6, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: $Vb, 26: $Vc }, { 7: 30, 8: $Ve, 9: 58, 12: $Vf, 14: 10, 15: 11, 16: $V2, 17: $V3, 18: $V4, 19: $V5, 20: $V6, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: $Vb, 26: $Vc, 27: 26, 29: 27, 30: 28, 31: 29, 33: 31, 35: $Vg, 36: $Vh, 42: 32, 47: $Vi }, o($Vj, [2, 9]), { 8: [1, 59] }, { 10: [1, 60] }, { 5: [2, 4] }, { 7: 30, 8: $Ve, 9: 61, 12: $Vf, 14: 10, 15: 11, 16: $V2, 17: $V3, 18: $V4, 19: $V5, 20: $V6, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: $Vb, 26: $Vc, 27: 26, 29: 27, 30: 28, 31: 29, 33: 31, 35: $Vg, 36: $Vh, 42: 32, 47: $Vi }, { 7: 62, 14: 10, 15: 11, 16: $V2, 17: $V3, 18: $V4, 19: $V5, 20: $V6, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: $Vb, 26: $Vc }, o($Vl, [2, 48]), o($Vl, $Vr, { 14: 10, 15: 11, 7: 63, 46: 64, 16: $V2, 17: $V3, 18: $V4, 19: $V5, 20: $V6, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: $Vb, 26: $Vc, 48: $Vs, 49: $Vt, 50: $Vu, 51: $Vv, 52: $Vw, 53: $Vx, 54: $Vy, 55: $Vz, 56: $VA }), o($Vk, [2, 41], { 34: 74, 37: $Vq }), { 7: 77, 8: $Ve, 14: 10, 15: 11, 16: $V2, 17: $V3, 18: $V4, 19: $V5, 20: $V6, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: $Vb, 26: $Vc, 33: 76, 42: 75, 47: $Vi }, o($VB, [2, 66]), o($VB, [2, 67]), o($Vk, [2, 46]), o($Vk, [2, 40], { 34: 78, 37: $Vq }), { 7: 81, 14: 10, 15: 11, 16: $V2, 17: $V3, 18: $V4, 19: $V5, 20: $V6, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: $Vb, 26: $Vc, 38: 79, 39: [1, 80] }, o($Vk, [2, 28]), o($Vk, [2, 29]), o($Vk, [2, 30]), { 8: [1, 82] }, { 7: 30, 8: $Ve, 9: 83, 12: $Vf, 14: 10, 15: 11, 16: $V2, 17: $V3, 18: $V4, 19: $V5, 20: $V6, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: $Vb, 26: $Vc, 27: 26, 29: 27, 30: 28, 31: 29, 33: 31, 35: $Vg, 36: $Vh, 42: 32, 47: $Vi }, { 10: [1, 84] }, { 7: 30, 8: $Ve, 9: 85, 12: $Vf, 14: 10, 15: 11, 16: $V2, 17: $V3, 18: $V4, 19: $V5, 20: $V6, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: $Vb, 26: $Vc, 27: 26, 29: 27, 30: 28, 31: 29, 33: 31, 35: $Vg, 36: $Vh, 42: 32, 47: $Vi }, { 5: [2, 2] }, { 10: [2, 22] }, o($Vk, [2, 26]), o($Vl, [2, 51], { 45: [1, 86] }), o($Vl, [2, 52]), o($Vl, [2, 56]), o($Vl, [2, 57]), o($Vl, [2, 58]), o($Vl, [2, 59]), o($Vl, [2, 60]), o($Vl, [2, 61]), o($Vl, [2, 62]), o($Vl, [2, 63]), o($Vl, [2, 64]), o($Vk, [2, 38]), o($VC, [2, 44], { 43: 47, 41: 87, 57: $Vo, 58: $Vp }), o($VC, [2, 45], { 43: 47, 41: 88, 57: $Vo, 58: $Vp }), o($Vl, $Vm, { 44: 44, 45: $Vn }), o($Vk, [2, 39]), { 39: [1, 89] }, o($Vk, [2, 34], { 34: 90, 37: $Vq }), { 32: [1, 91] }, { 7: 30, 8: $Ve, 9: 92, 12: $Vf, 14: 10, 15: 11, 16: $V2, 17: $V3, 18: $V4, 19: $V5, 20: $V6, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: $Vb, 26: $Vc, 27: 26, 29: 27, 30: 28, 31: 29, 33: 31, 35: $Vg, 36: $Vh, 42: 32, 47: $Vi }, { 10: [1, 93] }, o($Vl, [2, 55]), { 10: [1, 94] }, o($Vl, $Vr, { 46: 95, 48: $Vs, 49: $Vt, 50: $Vu, 51: $Vv, 52: $Vw, 53: $Vx, 54: $Vy, 55: $Vz, 56: $VA }), o($VC, [2, 42]), o($VC, [2, 43]), o($Vk, [2, 33], { 34: 96, 37: $Vq }), o($Vk, [2, 32]), { 7: 97, 14: 10, 15: 11, 16: $V2, 17: $V3, 18: $V4, 19: $V5, 20: $V6, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: $Vb, 26: $Vc }, { 10: [1, 98] }, o($Vl, [2, 54]), { 5: [2, 3] }, o($Vl, [2, 50]), o($Vk, [2, 31]), { 28: [1, 99], 39: [2, 37], 40: [1, 100] }, o($Vl, [2, 53]), { 7: 81, 14: 10, 15: 11, 16: $V2, 17: $V3, 18: $V4, 19: $V5, 20: $V6, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: $Vb, 26: $Vc, 38: 101 }, { 7: 81, 14: 10, 15: 11, 16: $V2, 17: $V3, 18: $V4, 19: $V5, 20: $V6, 21: $V7, 22: $V8, 23: $V9, 24: $Va, 25: $Vb, 26: $Vc, 38: 102 }, { 39: [2, 35] }, { 39: [2, 36] }],
|
2958 | defaultActions: { 7: [2, 1], 41: [2, 4], 60: [2, 2], 61: [2, 22], 94: [2, 3], 101: [2, 35], 102: [2, 36] },
|
2959 | parseError: function parseError(str, hash) {
|
2960 | if (hash.recoverable) {
|
2961 | this.trace(str);
|
2962 | } else {
|
2963 | var _parseError = function _parseError(msg, hash) {
|
2964 | this.message = msg;
|
2965 | this.hash = hash;
|
2966 | };
|
2967 |
|
2968 | _parseError.prototype = Error;
|
2969 |
|
2970 | throw new _parseError(str, hash);
|
2971 | }
|
2972 | },
|
2973 | parse: function parse(input) {
|
2974 | var self = this,
|
2975 | stack = [0],
|
2976 | tstack = [],
|
2977 | vstack = [null],
|
2978 | lstack = [],
|
2979 | table = this.table,
|
2980 | yytext = '',
|
2981 | yylineno = 0,
|
2982 | yyleng = 0,
|
2983 | recovering = 0,
|
2984 | TERROR = 2,
|
2985 | EOF = 1;
|
2986 | var args = lstack.slice.call(arguments, 1);
|
2987 | var lexer = Object.create(this.lexer);
|
2988 | var sharedState = { yy: {} };
|
2989 | for (var k in this.yy) {
|
2990 | if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
2991 | sharedState.yy[k] = this.yy[k];
|
2992 | }
|
2993 | }
|
2994 | lexer.setInput(input, sharedState.yy);
|
2995 | sharedState.yy.lexer = lexer;
|
2996 | sharedState.yy.parser = this;
|
2997 | if (typeof lexer.yylloc == 'undefined') {
|
2998 | lexer.yylloc = {};
|
2999 | }
|
3000 | var yyloc = lexer.yylloc;
|
3001 | lstack.push(yyloc);
|
3002 | var ranges = lexer.options && lexer.options.ranges;
|
3003 | if (typeof sharedState.yy.parseError === 'function') {
|
3004 | this.parseError = sharedState.yy.parseError;
|
3005 | } else {
|
3006 | this.parseError = Object.getPrototypeOf(this).parseError;
|
3007 | }
|
3008 | function popStack(n) {
|
3009 | stack.length = stack.length - 2 * n;
|
3010 | vstack.length = vstack.length - n;
|
3011 | lstack.length = lstack.length - n;
|
3012 | }
|
3013 | function lex() {
|
3014 | var token;
|
3015 | token = tstack.pop() || lexer.lex() || EOF;
|
3016 | if (typeof token !== 'number') {
|
3017 | if (token instanceof Array) {
|
3018 | tstack = token;
|
3019 | token = tstack.pop();
|
3020 | }
|
3021 | token = self.symbols_[token] || token;
|
3022 | }
|
3023 | return token;
|
3024 | }
|
3025 | var symbol,
|
3026 | preErrorSymbol,
|
3027 | state,
|
3028 | action,
|
3029 | a,
|
3030 | r,
|
3031 | yyval = {},
|
3032 | p,
|
3033 | len,
|
3034 | newState,
|
3035 | expected;
|
3036 | while (true) {
|
3037 | state = stack[stack.length - 1];
|
3038 | if (this.defaultActions[state]) {
|
3039 | action = this.defaultActions[state];
|
3040 | } else {
|
3041 | if (symbol === null || typeof symbol == 'undefined') {
|
3042 | symbol = lex();
|
3043 | }
|
3044 | action = table[state] && table[state][symbol];
|
3045 | }
|
3046 | if (typeof action === 'undefined' || !action.length || !action[0]) {
|
3047 | var errStr = '';
|
3048 | expected = [];
|
3049 | for (p in table[state]) {
|
3050 | if (this.terminals_[p] && p > TERROR) {
|
3051 | expected.push('\'' + this.terminals_[p] + '\'');
|
3052 | }
|
3053 | }
|
3054 | if (lexer.showPosition) {
|
3055 | errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
|
3056 | } else {
|
3057 | errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
|
3058 | }
|
3059 | this.parseError(errStr, {
|
3060 | text: lexer.match,
|
3061 | token: this.terminals_[symbol] || symbol,
|
3062 | line: lexer.yylineno,
|
3063 | loc: yyloc,
|
3064 | expected: expected
|
3065 | });
|
3066 | }
|
3067 | if (action[0] instanceof Array && action.length > 1) {
|
3068 | throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
|
3069 | }
|
3070 | switch (action[0]) {
|
3071 | case 1:
|
3072 | stack.push(symbol);
|
3073 | vstack.push(lexer.yytext);
|
3074 | lstack.push(lexer.yylloc);
|
3075 | stack.push(action[1]);
|
3076 | symbol = null;
|
3077 | if (!preErrorSymbol) {
|
3078 | yyleng = lexer.yyleng;
|
3079 | yytext = lexer.yytext;
|
3080 | yylineno = lexer.yylineno;
|
3081 | yyloc = lexer.yylloc;
|
3082 | if (recovering > 0) {
|
3083 | recovering--;
|
3084 | }
|
3085 | } else {
|
3086 | symbol = preErrorSymbol;
|
3087 | preErrorSymbol = null;
|
3088 | }
|
3089 | break;
|
3090 | case 2:
|
3091 | len = this.productions_[action[1]][1];
|
3092 | yyval.$ = vstack[vstack.length - len];
|
3093 | yyval._$ = {
|
3094 | first_line: lstack[lstack.length - (len || 1)].first_line,
|
3095 | last_line: lstack[lstack.length - 1].last_line,
|
3096 | first_column: lstack[lstack.length - (len || 1)].first_column,
|
3097 | last_column: lstack[lstack.length - 1].last_column
|
3098 | };
|
3099 | if (ranges) {
|
3100 | yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
|
3101 | }
|
3102 | r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));
|
3103 | if (typeof r !== 'undefined') {
|
3104 | return r;
|
3105 | }
|
3106 | if (len) {
|
3107 | stack = stack.slice(0, -1 * len * 2);
|
3108 | vstack = vstack.slice(0, -1 * len);
|
3109 | lstack = lstack.slice(0, -1 * len);
|
3110 | }
|
3111 | stack.push(this.productions_[action[1]][0]);
|
3112 | vstack.push(yyval.$);
|
3113 | lstack.push(yyval._$);
|
3114 | newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
3115 | stack.push(newState);
|
3116 | break;
|
3117 | case 3:
|
3118 | return true;
|
3119 | }
|
3120 | }
|
3121 | return true;
|
3122 | } };
|
3123 |
|
3124 |
|
3125 | var lexer = function () {
|
3126 | var lexer = {
|
3127 |
|
3128 | EOF: 1,
|
3129 |
|
3130 | parseError: function parseError(str, hash) {
|
3131 | if (this.yy.parser) {
|
3132 | this.yy.parser.parseError(str, hash);
|
3133 | } else {
|
3134 | throw new Error(str);
|
3135 | }
|
3136 | },
|
3137 |
|
3138 |
|
3139 | setInput: function setInput(input, yy) {
|
3140 | this.yy = yy || this.yy || {};
|
3141 | this._input = input;
|
3142 | this._more = this._backtrack = this.done = false;
|
3143 | this.yylineno = this.yyleng = 0;
|
3144 | this.yytext = this.matched = this.match = '';
|
3145 | this.conditionStack = ['INITIAL'];
|
3146 | this.yylloc = {
|
3147 | first_line: 1,
|
3148 | first_column: 0,
|
3149 | last_line: 1,
|
3150 | last_column: 0
|
3151 | };
|
3152 | if (this.options.ranges) {
|
3153 | this.yylloc.range = [0, 0];
|
3154 | }
|
3155 | this.offset = 0;
|
3156 | return this;
|
3157 | },
|
3158 |
|
3159 |
|
3160 | input: function input() {
|
3161 | var ch = this._input[0];
|
3162 | this.yytext += ch;
|
3163 | this.yyleng++;
|
3164 | this.offset++;
|
3165 | this.match += ch;
|
3166 | this.matched += ch;
|
3167 | var lines = ch.match(/(?:\r\n?|\n).*/g);
|
3168 | if (lines) {
|
3169 | this.yylineno++;
|
3170 | this.yylloc.last_line++;
|
3171 | } else {
|
3172 | this.yylloc.last_column++;
|
3173 | }
|
3174 | if (this.options.ranges) {
|
3175 | this.yylloc.range[1]++;
|
3176 | }
|
3177 |
|
3178 | this._input = this._input.slice(1);
|
3179 | return ch;
|
3180 | },
|
3181 |
|
3182 |
|
3183 | unput: function unput(ch) {
|
3184 | var len = ch.length;
|
3185 | var lines = ch.split(/(?:\r\n?|\n)/g);
|
3186 |
|
3187 | this._input = ch + this._input;
|
3188 | this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
3189 |
|
3190 | this.offset -= len;
|
3191 | var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
3192 | this.match = this.match.substr(0, this.match.length - 1);
|
3193 | this.matched = this.matched.substr(0, this.matched.length - 1);
|
3194 |
|
3195 | if (lines.length - 1) {
|
3196 | this.yylineno -= lines.length - 1;
|
3197 | }
|
3198 | var r = this.yylloc.range;
|
3199 |
|
3200 | this.yylloc = {
|
3201 | first_line: this.yylloc.first_line,
|
3202 | last_line: this.yylineno + 1,
|
3203 | first_column: this.yylloc.first_column,
|
3204 | last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
|
3205 | };
|
3206 |
|
3207 | if (this.options.ranges) {
|
3208 | this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
3209 | }
|
3210 | this.yyleng = this.yytext.length;
|
3211 | return this;
|
3212 | },
|
3213 |
|
3214 |
|
3215 | more: function more() {
|
3216 | this._more = true;
|
3217 | return this;
|
3218 | },
|
3219 |
|
3220 |
|
3221 | reject: function reject() {
|
3222 | if (this.options.backtrack_lexer) {
|
3223 | this._backtrack = true;
|
3224 | } else {
|
3225 | 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(), {
|
3226 | text: "",
|
3227 | token: null,
|
3228 | line: this.yylineno
|
3229 | });
|
3230 | }
|
3231 | return this;
|
3232 | },
|
3233 |
|
3234 |
|
3235 | less: function less(n) {
|
3236 | this.unput(this.match.slice(n));
|
3237 | },
|
3238 |
|
3239 |
|
3240 | pastInput: function pastInput() {
|
3241 | var past = this.matched.substr(0, this.matched.length - this.match.length);
|
3242 | return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
|
3243 | },
|
3244 |
|
3245 |
|
3246 | upcomingInput: function upcomingInput() {
|
3247 | var next = this.match;
|
3248 | if (next.length < 20) {
|
3249 | next += this._input.substr(0, 20 - next.length);
|
3250 | }
|
3251 | return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
|
3252 | },
|
3253 |
|
3254 |
|
3255 | showPosition: function showPosition() {
|
3256 | var pre = this.pastInput();
|
3257 | var c = new Array(pre.length + 1).join("-");
|
3258 | return pre + this.upcomingInput() + "\n" + c + "^";
|
3259 | },
|
3260 |
|
3261 |
|
3262 | test_match: function test_match(match, indexed_rule) {
|
3263 | var token, lines, backup;
|
3264 |
|
3265 | if (this.options.backtrack_lexer) {
|
3266 |
|
3267 | backup = {
|
3268 | yylineno: this.yylineno,
|
3269 | yylloc: {
|
3270 | first_line: this.yylloc.first_line,
|
3271 | last_line: this.last_line,
|
3272 | first_column: this.yylloc.first_column,
|
3273 | last_column: this.yylloc.last_column
|
3274 | },
|
3275 | yytext: this.yytext,
|
3276 | match: this.match,
|
3277 | matches: this.matches,
|
3278 | matched: this.matched,
|
3279 | yyleng: this.yyleng,
|
3280 | offset: this.offset,
|
3281 | _more: this._more,
|
3282 | _input: this._input,
|
3283 | yy: this.yy,
|
3284 | conditionStack: this.conditionStack.slice(0),
|
3285 | done: this.done
|
3286 | };
|
3287 | if (this.options.ranges) {
|
3288 | backup.yylloc.range = this.yylloc.range.slice(0);
|
3289 | }
|
3290 | }
|
3291 |
|
3292 | lines = match[0].match(/(?:\r\n?|\n).*/g);
|
3293 | if (lines) {
|
3294 | this.yylineno += lines.length;
|
3295 | }
|
3296 | this.yylloc = {
|
3297 | first_line: this.yylloc.last_line,
|
3298 | last_line: this.yylineno + 1,
|
3299 | first_column: this.yylloc.last_column,
|
3300 | last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
|
3301 | };
|
3302 | this.yytext += match[0];
|
3303 | this.match += match[0];
|
3304 | this.matches = match;
|
3305 | this.yyleng = this.yytext.length;
|
3306 | if (this.options.ranges) {
|
3307 | this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
3308 | }
|
3309 | this._more = false;
|
3310 | this._backtrack = false;
|
3311 | this._input = this._input.slice(match[0].length);
|
3312 | this.matched += match[0];
|
3313 | token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
3314 | if (this.done && this._input) {
|
3315 | this.done = false;
|
3316 | }
|
3317 | if (token) {
|
3318 | return token;
|
3319 | } else if (this._backtrack) {
|
3320 |
|
3321 | for (var k in backup) {
|
3322 | this[k] = backup[k];
|
3323 | }
|
3324 | return false;
|
3325 | }
|
3326 | return false;
|
3327 | },
|
3328 |
|
3329 |
|
3330 | next: function next() {
|
3331 | if (this.done) {
|
3332 | return this.EOF;
|
3333 | }
|
3334 | if (!this._input) {
|
3335 | this.done = true;
|
3336 | }
|
3337 |
|
3338 | var token, match, tempMatch, index;
|
3339 | if (!this._more) {
|
3340 | this.yytext = '';
|
3341 | this.match = '';
|
3342 | }
|
3343 | var rules = this._currentRules();
|
3344 | for (var i = 0; i < rules.length; i++) {
|
3345 | tempMatch = this._input.match(this.rules[rules[i]]);
|
3346 | if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
3347 | match = tempMatch;
|
3348 | index = i;
|
3349 | if (this.options.backtrack_lexer) {
|
3350 | token = this.test_match(tempMatch, rules[i]);
|
3351 | if (token !== false) {
|
3352 | return token;
|
3353 | } else if (this._backtrack) {
|
3354 | match = false;
|
3355 | continue;
|
3356 | } else {
|
3357 |
|
3358 | return false;
|
3359 | }
|
3360 | } else if (!this.options.flex) {
|
3361 | break;
|
3362 | }
|
3363 | }
|
3364 | }
|
3365 | if (match) {
|
3366 | token = this.test_match(match, rules[index]);
|
3367 | if (token !== false) {
|
3368 | return token;
|
3369 | }
|
3370 |
|
3371 | return false;
|
3372 | }
|
3373 | if (this._input === "") {
|
3374 | return this.EOF;
|
3375 | } else {
|
3376 | return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
|
3377 | text: "",
|
3378 | token: null,
|
3379 | line: this.yylineno
|
3380 | });
|
3381 | }
|
3382 | },
|
3383 |
|
3384 |
|
3385 | lex: function lex() {
|
3386 | var r = this.next();
|
3387 | if (r) {
|
3388 | return r;
|
3389 | } else {
|
3390 | return this.lex();
|
3391 | }
|
3392 | },
|
3393 |
|
3394 |
|
3395 | begin: function begin(condition) {
|
3396 | this.conditionStack.push(condition);
|
3397 | },
|
3398 |
|
3399 |
|
3400 | popState: function popState() {
|
3401 | var n = this.conditionStack.length - 1;
|
3402 | if (n > 0) {
|
3403 | return this.conditionStack.pop();
|
3404 | } else {
|
3405 | return this.conditionStack[0];
|
3406 | }
|
3407 | },
|
3408 |
|
3409 |
|
3410 | _currentRules: function _currentRules() {
|
3411 | if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
3412 | return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
3413 | } else {
|
3414 | return this.conditions["INITIAL"].rules;
|
3415 | }
|
3416 | },
|
3417 |
|
3418 |
|
3419 | topState: function topState(n) {
|
3420 | n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
3421 | if (n >= 0) {
|
3422 | return this.conditionStack[n];
|
3423 | } else {
|
3424 | return "INITIAL";
|
3425 | }
|
3426 | },
|
3427 |
|
3428 |
|
3429 | pushState: function pushState(condition) {
|
3430 | this.begin(condition);
|
3431 | },
|
3432 |
|
3433 |
|
3434 | stateStackSize: function stateStackSize() {
|
3435 | return this.conditionStack.length;
|
3436 | },
|
3437 | options: {},
|
3438 | performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
3439 | var YYSTATE = YY_START;
|
3440 | switch ($avoiding_name_collisions) {
|
3441 | case 0:
|
3442 | return 'STYLE';
|
3443 | break;
|
3444 | case 1:
|
3445 | return 'LINKSTYLE';
|
3446 | break;
|
3447 | case 2:
|
3448 | return 'CLASSDEF';
|
3449 | break;
|
3450 | case 3:
|
3451 | return 'CLASS';
|
3452 | break;
|
3453 | case 4:
|
3454 | return 'CLICK';
|
3455 | break;
|
3456 | case 5:
|
3457 | return 12;
|
3458 | break;
|
3459 | case 6:
|
3460 | return 13;
|
3461 | break;
|
3462 | case 7:
|
3463 | return 47;
|
3464 | break;
|
3465 | case 8:
|
3466 | return 35;
|
3467 | break;
|
3468 | case 9:
|
3469 | return 36;
|
3470 | break;
|
3471 | case 10:
|
3472 | return 'DIR';
|
3473 | break;
|
3474 | case 11:
|
3475 | return 'DIR';
|
3476 | break;
|
3477 | case 12:
|
3478 | return 'DIR';
|
3479 | break;
|
3480 | case 13:
|
3481 | return 'DIR';
|
3482 | break;
|
3483 | case 14:
|
3484 | return 'DIR';
|
3485 | break;
|
3486 | case 15:
|
3487 | return 'DIR';
|
3488 | break;
|
3489 | case 16:
|
3490 | return 17;
|
3491 | break;
|
3492 | case 17:
|
3493 | return 23;
|
3494 | break;
|
3495 | case 18:
|
3496 | return 18;
|
3497 | break;
|
3498 | case 19:
|
3499 | return 28;
|
3500 | break;
|
3501 | case 20:
|
3502 | return 40;
|
3503 | break;
|
3504 | case 21:
|
3505 | return 32;
|
3506 | break;
|
3507 | case 22:
|
3508 | return 21;
|
3509 | break;
|
3510 | case 23:
|
3511 | return 22;
|
3512 | break;
|
3513 | case 24:
|
3514 | return 'ARROW_CROSS';
|
3515 | break;
|
3516 | case 25:
|
3517 | return 57;
|
3518 | break;
|
3519 | case 26:
|
3520 | return 'ARROW_CIRCLE';
|
3521 | break;
|
3522 | case 27:
|
3523 | return 58;
|
3524 | break;
|
3525 | case 28:
|
3526 | return 25;
|
3527 | break;
|
3528 | case 29:
|
3529 | return 19;
|
3530 | break;
|
3531 | case 30:
|
3532 | return 20;
|
3533 | break;
|
3534 | case 31:
|
3535 | return 16;
|
3536 | break;
|
3537 | case 32:
|
3538 | return 'PIPE';
|
3539 | break;
|
3540 | case 33:
|
3541 | return 'PS';
|
3542 | break;
|
3543 | case 34:
|
3544 | return 'PE';
|
3545 | break;
|
3546 | case 35:
|
3547 | return 37;
|
3548 | break;
|
3549 | case 36:
|
3550 | return 39;
|
3551 | break;
|
3552 | case 37:
|
3553 | return 8;
|
3554 | break;
|
3555 | case 38:
|
3556 | return 10;
|
3557 | break;
|
3558 | case 39:
|
3559 | return 'QUOTE';
|
3560 | break;
|
3561 | case 40:
|
3562 | return 24;
|
3563 | break;
|
3564 | case 41:
|
3565 | return 'NEWLINE';
|
3566 | break;
|
3567 | case 42:
|
3568 | return 5;
|
3569 | break;
|
3570 | }
|
3571 | },
|
3572 | rules: [/^(?:style\b)/, /^(?:linkStyle\b)/, /^(?:classDef\b)/, /^(?:class\b)/, /^(?:click\b)/, /^(?:graph\b)/, /^(?:digraph\b)/, /^(?:subgraph\b)/, /^(?:node\b)/, /^(?:edge\b)/, /^(?:LR\b)/, /^(?:RL\b)/, /^(?:TB\b)/, /^(?:BT\b)/, /^(?:TD\b)/, /^(?:BR\b)/, /^(?:[0-9])/, /^(?:#)/, /^(?::)/, /^(?:;)/, /^(?:,)/, /^(?:=)/, /^(?:\*)/, /^(?:\.)/, /^(?:--[x])/, /^(?:->)/, /^(?:--[o])/, /^(?:--)/, /^(?:-)/, /^(?:\+)/, /^(?:=)/, /^(?:[\u0021-\u0027\u002A-\u002E\u003F\u0041-\u005A\u0061-\u007A\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)/, /^(?:\n)/, /^(?:$)/],
|
3573 | conditions: { "INITIAL": { "rules": [0, 1, 2, 3, 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], "inclusive": true } }
|
3574 | };
|
3575 | return lexer;
|
3576 | }();
|
3577 | parser.lexer = lexer;
|
3578 | function Parser() {
|
3579 | this.yy = {};
|
3580 | }
|
3581 | Parser.prototype = parser;parser.Parser = Parser;
|
3582 | return new Parser();
|
3583 | }();
|
3584 |
|
3585 | if (true) {
|
3586 | exports.parser = parser;
|
3587 | exports.Parser = parser.Parser;
|
3588 | exports.parse = function () {
|
3589 | return parser.parse.apply(parser, arguments);
|
3590 | };
|
3591 | exports.main = function commonjsMain(args) {
|
3592 | if (!args[1]) {
|
3593 | console.log('Usage: ' + args[0] + ' FILE');
|
3594 | process.exit(1);
|
3595 | }
|
3596 | var source = __webpack_require__(4).readFileSync(__webpack_require__(5).normalize(args[1]), "utf8");
|
3597 | return exports.parser.parse(source);
|
3598 | };
|
3599 | if (typeof module !== 'undefined' && __webpack_require__.c[__webpack_require__.s] === module) {
|
3600 | exports.main(process.argv.slice(1));
|
3601 | }
|
3602 | }
|
3603 | }.call(exports, __webpack_require__(2), __webpack_require__(3)(module)))
|
3604 |
|
3605 | }),
|
3606 |
|
3607 | (function(module, exports, __webpack_require__) {
|
3608 |
|
3609 | "use strict";
|
3610 | (function(process, module) {
|
3611 |
|
3612 |
|
3613 |
|
3614 |
|
3615 |
|
3616 |
|
3617 |
|
3618 |
|
3619 |
|
3620 |
|
3621 |
|
3622 |
|
3623 |
|
3624 |
|
3625 |
|
3626 |
|
3627 |
|
3628 |
|
3629 |
|
3630 |
|
3631 |
|
3632 |
|
3633 |
|
3634 |
|
3635 |
|
3636 |
|
3637 |
|
3638 |
|
3639 |
|
3640 |
|
3641 |
|
3642 |
|
3643 |
|
3644 |
|
3645 |
|
3646 |
|
3647 |
|
3648 |
|
3649 |
|
3650 |
|
3651 |
|
3652 |
|
3653 |
|
3654 |
|
3655 |
|
3656 |
|
3657 |
|
3658 |
|
3659 |
|
3660 |
|
3661 |
|
3662 |
|
3663 |
|
3664 |
|
3665 |
|
3666 |
|
3667 |
|
3668 |
|
3669 |
|
3670 |
|
3671 |
|
3672 |
|
3673 |
|
3674 |
|
3675 |
|
3676 |
|
3677 |
|
3678 |
|
3679 |
|
3680 |
|
3681 |
|
3682 |
|
3683 |
|
3684 |
|
3685 | var parser = function () {
|
3686 | var o = function o(k, v, _o, l) {
|
3687 | for (_o = _o || {}, l = k.length; l--; _o[k[l]] = v) {}return _o;
|
3688 | },
|
3689 | $V0 = [1, 2],
|
3690 | $V1 = [1, 3],
|
3691 | $V2 = [1, 4],
|
3692 | $V3 = [2, 4],
|
3693 | $V4 = [1, 9],
|
3694 | $V5 = [1, 11],
|
3695 | $V6 = [1, 12],
|
3696 | $V7 = [1, 14],
|
3697 | $V8 = [1, 15],
|
3698 | $V9 = [1, 17],
|
3699 | $Va = [1, 18],
|
3700 | $Vb = [1, 19],
|
3701 | $Vc = [1, 20],
|
3702 | $Vd = [1, 21],
|
3703 | $Ve = [1, 23],
|
3704 | $Vf = [1, 24],
|
3705 | $Vg = [1, 4, 5, 10, 15, 16, 18, 20, 21, 22, 23, 24, 25, 27, 28, 39],
|
3706 | $Vh = [1, 32],
|
3707 | $Vi = [4, 5, 10, 15, 16, 18, 20, 21, 22, 23, 25, 28, 39],
|
3708 | $Vj = [4, 5, 10, 15, 16, 18, 20, 21, 22, 23, 25, 27, 28, 39],
|
3709 | $Vk = [37, 38, 39];
|
3710 | var parser = { trace: function trace() {},
|
3711 | yy: {},
|
3712 | 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, "opt": 22, "alt": 23, "else": 24, "par": 25, "par_sections": 26, "and": 27, "note": 28, "placement": 29, "over": 30, "actor_pair": 31, "spaceList": 32, ",": 33, "left_of": 34, "right_of": 35, "signaltype": 36, "+": 37, "-": 38, "ACTOR": 39, "SOLID_OPEN_ARROW": 40, "DOTTED_OPEN_ARROW": 41, "SOLID_ARROW": 42, "DOTTED_ARROW": 43, "SOLID_CROSS": 44, "DOTTED_CROSS": 45, "TXT": 46, "$accept": 0, "$end": 1 },
|
3713 | 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: "opt", 23: "alt", 24: "else", 25: "par", 27: "and", 28: "note", 30: "over", 33: ",", 34: "left_of", 35: "right_of", 37: "+", 38: "-", 39: "ACTOR", 40: "SOLID_OPEN_ARROW", 41: "DOTTED_OPEN_ARROW", 42: "SOLID_ARROW", 43: "DOTTED_ARROW", 44: "SOLID_CROSS", 45: "DOTTED_CROSS", 46: "TXT" },
|
3714 | 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, 7], [9, 4], [26, 1], [26, 4], [17, 4], [17, 4], [32, 2], [32, 1], [31, 3], [31, 1], [29, 1], [29, 1], [14, 5], [14, 5], [14, 4], [11, 1], [36, 1], [36, 1], [36, 1], [36, 1], [36, 1], [36, 1], [19, 1]],
|
3715 | performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
|
3716 |
|
3717 |
|
3718 | var $0 = $$.length - 1;
|
3719 | switch (yystate) {
|
3720 | case 3:
|
3721 | yy.apply($$[$0]);return $$[$0];
|
3722 | break;
|
3723 | case 4:
|
3724 | this.$ = [];
|
3725 | break;
|
3726 | case 5:
|
3727 | $$[$0 - 1].push($$[$0]);this.$ = $$[$0 - 1];
|
3728 | break;
|
3729 | case 6:case 7:
|
3730 | this.$ = $$[$0];
|
3731 | break;
|
3732 | case 8:
|
3733 | this.$ = [];
|
3734 | break;
|
3735 | case 9:
|
3736 | $$[$0 - 3].description = $$[$0 - 1];this.$ = $$[$0 - 3];
|
3737 | break;
|
3738 | case 10:
|
3739 | this.$ = $$[$0 - 1];
|
3740 | break;
|
3741 | case 12:
|
3742 | this.$ = { type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0 - 1] };
|
3743 | break;
|
3744 | case 13:
|
3745 | this.$ = { type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0 - 1] };
|
3746 | break;
|
3747 | case 15:
|
3748 | this.$ = [{ type: 'setTitle', text: $$[$0 - 1] }];
|
3749 | break;
|
3750 | case 16:
|
3751 |
|
3752 | $$[$0 - 1].unshift({ type: 'loopStart', loopText: $$[$0 - 2], signalType: yy.LINETYPE.LOOP_START });
|
3753 | $$[$0 - 1].push({ type: 'loopEnd', loopText: $$[$0 - 2], signalType: yy.LINETYPE.LOOP_END });
|
3754 | this.$ = $$[$0 - 1];
|
3755 | break;
|
3756 | case 17:
|
3757 |
|
3758 | $$[$0 - 1].unshift({ type: 'optStart', optText: $$[$0 - 2], signalType: yy.LINETYPE.OPT_START });
|
3759 | $$[$0 - 1].push({ type: 'optEnd', optText: $$[$0 - 2], signalType: yy.LINETYPE.OPT_END });
|
3760 | this.$ = $$[$0 - 1];
|
3761 | break;
|
3762 | case 18:
|
3763 |
|
3764 |
|
3765 | $$[$0 - 4].unshift({ type: 'altStart', altText: $$[$0 - 5], signalType: yy.LINETYPE.ALT_START });
|
3766 |
|
3767 |
|
3768 | $$[$0 - 4].push({ type: 'else', altText: $$[$0 - 2], signalType: yy.LINETYPE.ALT_ELSE });
|
3769 |
|
3770 | $$[$0 - 4] = $$[$0 - 4].concat($$[$0 - 1]);
|
3771 |
|
3772 | $$[$0 - 4].push({ type: 'altEnd', signalType: yy.LINETYPE.ALT_END });
|
3773 |
|
3774 | this.$ = $$[$0 - 4];
|
3775 | break;
|
3776 | case 19:
|
3777 |
|
3778 |
|
3779 | $$[$0 - 1].unshift({ type: 'parStart', parText: $$[$0 - 2], signalType: yy.LINETYPE.PAR_START });
|
3780 |
|
3781 |
|
3782 | $$[$0 - 1].push({ type: 'parEnd', signalType: yy.LINETYPE.PAR_END });
|
3783 | this.$ = $$[$0 - 1];
|
3784 | break;
|
3785 | case 21:
|
3786 | this.$ = $$[$0 - 3].concat([{ type: 'and', parText: $$[$0 - 1], signalType: yy.LINETYPE.PAR_AND }, $$[$0]]);
|
3787 | break;
|
3788 | case 22:
|
3789 |
|
3790 | this.$ = [$$[$0 - 1], { type: 'addNote', placement: $$[$0 - 2], actor: $$[$0 - 1].actor, text: $$[$0] }];
|
3791 | break;
|
3792 | case 23:
|
3793 |
|
3794 |
|
3795 | $$[$0 - 2] = [].concat($$[$0 - 1], $$[$0 - 1]).slice(0, 2);
|
3796 | $$[$0 - 2][0] = $$[$0 - 2][0].actor;
|
3797 | $$[$0 - 2][1] = $$[$0 - 2][1].actor;
|
3798 | this.$ = [$$[$0 - 1], { type: 'addNote', placement: yy.PLACEMENT.OVER, actor: $$[$0 - 2].slice(0, 2), text: $$[$0] }];
|
3799 | break;
|
3800 | case 26:
|
3801 | this.$ = [$$[$0 - 2], $$[$0]];
|
3802 | break;
|
3803 | case 27:
|
3804 | this.$ = $$[$0];
|
3805 | break;
|
3806 | case 28:
|
3807 | this.$ = yy.PLACEMENT.LEFTOF;
|
3808 | break;
|
3809 | case 29:
|
3810 | this.$ = yy.PLACEMENT.RIGHTOF;
|
3811 | break;
|
3812 | case 30:
|
3813 | this.$ = [$$[$0 - 4], $$[$0 - 1], { type: 'addMessage', from: $$[$0 - 4].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 3], msg: $$[$0] }, { type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0 - 1] }];
|
3814 | break;
|
3815 | case 31:
|
3816 | this.$ = [$$[$0 - 4], $$[$0 - 1], { type: 'addMessage', from: $$[$0 - 4].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 3], msg: $$[$0] }, { type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0 - 4] }];
|
3817 | break;
|
3818 | case 32:
|
3819 | this.$ = [$$[$0 - 3], $$[$0 - 1], { type: 'addMessage', from: $$[$0 - 3].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 2], msg: $$[$0] }];
|
3820 | break;
|
3821 | case 33:
|
3822 | this.$ = { type: 'addActor', actor: $$[$0] };
|
3823 | break;
|
3824 | case 34:
|
3825 | this.$ = yy.LINETYPE.SOLID_OPEN;
|
3826 | break;
|
3827 | case 35:
|
3828 | this.$ = yy.LINETYPE.DOTTED_OPEN;
|
3829 | break;
|
3830 | case 36:
|
3831 | this.$ = yy.LINETYPE.SOLID;
|
3832 | break;
|
3833 | case 37:
|
3834 | this.$ = yy.LINETYPE.DOTTED;
|
3835 | break;
|
3836 | case 38:
|
3837 | this.$ = yy.LINETYPE.SOLID_CROSS;
|
3838 | break;
|
3839 | case 39:
|
3840 | this.$ = yy.LINETYPE.DOTTED_CROSS;
|
3841 | break;
|
3842 | case 40:
|
3843 | this.$ = $$[$0].substring(1).trim().replace(/\\n/gm, "\n");
|
3844 | break;
|
3845 | }
|
3846 | },
|
3847 | 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, 25, 28, 39], $V3, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: $V4, 5: $V5, 8: 8, 9: 10, 10: $V6, 11: 22, 14: 13, 15: $V7, 16: $V8, 17: 16, 18: $V9, 20: $Va, 22: $Vb, 23: $Vc, 25: $Vd, 28: $Ve, 39: $Vf }, o($Vg, [2, 5]), { 9: 25, 10: $V6, 11: 22, 14: 13, 15: $V7, 16: $V8, 17: 16, 18: $V9, 20: $Va, 22: $Vb, 23: $Vc, 25: $Vd, 28: $Ve, 39: $Vf }, o($Vg, [2, 7]), o($Vg, [2, 8]), { 11: 26, 39: $Vf }, { 5: [1, 27] }, { 11: 28, 39: $Vf }, { 11: 29, 39: $Vf }, { 5: [1, 30] }, { 19: 31, 46: $Vh }, { 13: [1, 33] }, { 13: [1, 34] }, { 13: [1, 35] }, { 13: [1, 36] }, { 36: 37, 40: [1, 38], 41: [1, 39], 42: [1, 40], 43: [1, 41], 44: [1, 42], 45: [1, 43] }, { 29: 44, 30: [1, 45], 34: [1, 46], 35: [1, 47] }, o([5, 12, 33, 40, 41, 42, 43, 44, 45, 46], [2, 33]), o($Vg, [2, 6]), { 5: [1, 49], 12: [1, 48] }, o($Vg, [2, 11]), { 5: [1, 50] }, { 5: [1, 51] }, o($Vg, [2, 14]), { 5: [1, 52] }, { 5: [2, 40] }, o($Vi, $V3, { 7: 53 }), o($Vi, $V3, { 7: 54 }), o([4, 5, 10, 15, 16, 18, 20, 22, 23, 24, 25, 28, 39], $V3, { 7: 55 }), o($Vj, $V3, { 26: 56, 7: 57 }), { 11: 60, 37: [1, 58], 38: [1, 59], 39: $Vf }, o($Vk, [2, 34]), o($Vk, [2, 35]), o($Vk, [2, 36]), o($Vk, [2, 37]), o($Vk, [2, 38]), o($Vk, [2, 39]), { 11: 61, 39: $Vf }, { 11: 63, 31: 62, 39: $Vf }, { 39: [2, 28] }, { 39: [2, 29] }, { 13: [1, 64] }, o($Vg, [2, 10]), o($Vg, [2, 12]), o($Vg, [2, 13]), o($Vg, [2, 15]), { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: $V6, 11: 22, 14: 13, 15: $V7, 16: $V8, 17: 16, 18: $V9, 20: $Va, 21: [1, 65], 22: $Vb, 23: $Vc, 25: $Vd, 28: $Ve, 39: $Vf }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: $V6, 11: 22, 14: 13, 15: $V7, 16: $V8, 17: 16, 18: $V9, 20: $Va, 21: [1, 66], 22: $Vb, 23: $Vc, 25: $Vd, 28: $Ve, 39: $Vf }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: $V6, 11: 22, 14: 13, 15: $V7, 16: $V8, 17: 16, 18: $V9, 20: $Va, 22: $Vb, 23: $Vc, 24: [1, 67], 25: $Vd, 28: $Ve, 39: $Vf }, { 21: [1, 68] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: $V6, 11: 22, 14: 13, 15: $V7, 16: $V8, 17: 16, 18: $V9, 20: $Va, 21: [2, 20], 22: $Vb, 23: $Vc, 25: $Vd, 27: [1, 69], 28: $Ve, 39: $Vf }, { 11: 70, 39: $Vf }, { 11: 71, 39: $Vf }, { 19: 72, 46: $Vh }, { 19: 73, 46: $Vh }, { 19: 74, 46: $Vh }, { 33: [1, 75], 46: [2, 27] }, { 5: [1, 76] }, o($Vg, [2, 16]), o($Vg, [2, 17]), { 13: [1, 77] }, o($Vg, [2, 19]), { 13: [1, 78] }, { 19: 79, 46: $Vh }, { 19: 80, 46: $Vh }, { 5: [2, 32] }, { 5: [2, 22] }, { 5: [2, 23] }, { 11: 81, 39: $Vf }, o($Vg, [2, 9]), o($Vi, $V3, { 7: 82 }), o($Vj, $V3, { 7: 57, 26: 83 }), { 5: [2, 30] }, { 5: [2, 31] }, { 46: [2, 26] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: $V6, 11: 22, 14: 13, 15: $V7, 16: $V8, 17: 16, 18: $V9, 20: $Va, 21: [1, 84], 22: $Vb, 23: $Vc, 25: $Vd, 28: $Ve, 39: $Vf }, { 21: [2, 21] }, o($Vg, [2, 18])],
|
3848 | defaultActions: { 5: [2, 1], 6: [2, 2], 32: [2, 40], 46: [2, 28], 47: [2, 29], 72: [2, 32], 73: [2, 22], 74: [2, 23], 79: [2, 30], 80: [2, 31], 81: [2, 26], 83: [2, 21] },
|
3849 | parseError: function parseError(str, hash) {
|
3850 | if (hash.recoverable) {
|
3851 | this.trace(str);
|
3852 | } else {
|
3853 | var _parseError = function _parseError(msg, hash) {
|
3854 | this.message = msg;
|
3855 | this.hash = hash;
|
3856 | };
|
3857 |
|
3858 | _parseError.prototype = Error;
|
3859 |
|
3860 | throw new _parseError(str, hash);
|
3861 | }
|
3862 | },
|
3863 | parse: function parse(input) {
|
3864 | var self = this,
|
3865 | stack = [0],
|
3866 | tstack = [],
|
3867 | vstack = [null],
|
3868 | lstack = [],
|
3869 | table = this.table,
|
3870 | yytext = '',
|
3871 | yylineno = 0,
|
3872 | yyleng = 0,
|
3873 | recovering = 0,
|
3874 | TERROR = 2,
|
3875 | EOF = 1;
|
3876 | var args = lstack.slice.call(arguments, 1);
|
3877 | var lexer = Object.create(this.lexer);
|
3878 | var sharedState = { yy: {} };
|
3879 | for (var k in this.yy) {
|
3880 | if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
3881 | sharedState.yy[k] = this.yy[k];
|
3882 | }
|
3883 | }
|
3884 | lexer.setInput(input, sharedState.yy);
|
3885 | sharedState.yy.lexer = lexer;
|
3886 | sharedState.yy.parser = this;
|
3887 | if (typeof lexer.yylloc == 'undefined') {
|
3888 | lexer.yylloc = {};
|
3889 | }
|
3890 | var yyloc = lexer.yylloc;
|
3891 | lstack.push(yyloc);
|
3892 | var ranges = lexer.options && lexer.options.ranges;
|
3893 | if (typeof sharedState.yy.parseError === 'function') {
|
3894 | this.parseError = sharedState.yy.parseError;
|
3895 | } else {
|
3896 | this.parseError = Object.getPrototypeOf(this).parseError;
|
3897 | }
|
3898 | function popStack(n) {
|
3899 | stack.length = stack.length - 2 * n;
|
3900 | vstack.length = vstack.length - n;
|
3901 | lstack.length = lstack.length - n;
|
3902 | }
|
3903 | function lex() {
|
3904 | var token;
|
3905 | token = tstack.pop() || lexer.lex() || EOF;
|
3906 | if (typeof token !== 'number') {
|
3907 | if (token instanceof Array) {
|
3908 | tstack = token;
|
3909 | token = tstack.pop();
|
3910 | }
|
3911 | token = self.symbols_[token] || token;
|
3912 | }
|
3913 | return token;
|
3914 | }
|
3915 | var symbol,
|
3916 | preErrorSymbol,
|
3917 | state,
|
3918 | action,
|
3919 | a,
|
3920 | r,
|
3921 | yyval = {},
|
3922 | p,
|
3923 | len,
|
3924 | newState,
|
3925 | expected;
|
3926 | while (true) {
|
3927 | state = stack[stack.length - 1];
|
3928 | if (this.defaultActions[state]) {
|
3929 | action = this.defaultActions[state];
|
3930 | } else {
|
3931 | if (symbol === null || typeof symbol == 'undefined') {
|
3932 | symbol = lex();
|
3933 | }
|
3934 | action = table[state] && table[state][symbol];
|
3935 | }
|
3936 | if (typeof action === 'undefined' || !action.length || !action[0]) {
|
3937 | var errStr = '';
|
3938 | expected = [];
|
3939 | for (p in table[state]) {
|
3940 | if (this.terminals_[p] && p > TERROR) {
|
3941 | expected.push('\'' + this.terminals_[p] + '\'');
|
3942 | }
|
3943 | }
|
3944 | if (lexer.showPosition) {
|
3945 | errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
|
3946 | } else {
|
3947 | errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
|
3948 | }
|
3949 | this.parseError(errStr, {
|
3950 | text: lexer.match,
|
3951 | token: this.terminals_[symbol] || symbol,
|
3952 | line: lexer.yylineno,
|
3953 | loc: yyloc,
|
3954 | expected: expected
|
3955 | });
|
3956 | }
|
3957 | if (action[0] instanceof Array && action.length > 1) {
|
3958 | throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
|
3959 | }
|
3960 | switch (action[0]) {
|
3961 | case 1:
|
3962 | stack.push(symbol);
|
3963 | vstack.push(lexer.yytext);
|
3964 | lstack.push(lexer.yylloc);
|
3965 | stack.push(action[1]);
|
3966 | symbol = null;
|
3967 | if (!preErrorSymbol) {
|
3968 | yyleng = lexer.yyleng;
|
3969 | yytext = lexer.yytext;
|
3970 | yylineno = lexer.yylineno;
|
3971 | yyloc = lexer.yylloc;
|
3972 | if (recovering > 0) {
|
3973 | recovering--;
|
3974 | }
|
3975 | } else {
|
3976 | symbol = preErrorSymbol;
|
3977 | preErrorSymbol = null;
|
3978 | }
|
3979 | break;
|
3980 | case 2:
|
3981 | len = this.productions_[action[1]][1];
|
3982 | yyval.$ = vstack[vstack.length - len];
|
3983 | yyval._$ = {
|
3984 | first_line: lstack[lstack.length - (len || 1)].first_line,
|
3985 | last_line: lstack[lstack.length - 1].last_line,
|
3986 | first_column: lstack[lstack.length - (len || 1)].first_column,
|
3987 | last_column: lstack[lstack.length - 1].last_column
|
3988 | };
|
3989 | if (ranges) {
|
3990 | yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
|
3991 | }
|
3992 | r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));
|
3993 | if (typeof r !== 'undefined') {
|
3994 | return r;
|
3995 | }
|
3996 | if (len) {
|
3997 | stack = stack.slice(0, -1 * len * 2);
|
3998 | vstack = vstack.slice(0, -1 * len);
|
3999 | lstack = lstack.slice(0, -1 * len);
|
4000 | }
|
4001 | stack.push(this.productions_[action[1]][0]);
|
4002 | vstack.push(yyval.$);
|
4003 | lstack.push(yyval._$);
|
4004 | newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
4005 | stack.push(newState);
|
4006 | break;
|
4007 | case 3:
|
4008 | return true;
|
4009 | }
|
4010 | }
|
4011 | return true;
|
4012 | } };
|
4013 |
|
4014 |
|
4015 | var lexer = function () {
|
4016 | var lexer = {
|
4017 |
|
4018 | EOF: 1,
|
4019 |
|
4020 | parseError: function parseError(str, hash) {
|
4021 | if (this.yy.parser) {
|
4022 | this.yy.parser.parseError(str, hash);
|
4023 | } else {
|
4024 | throw new Error(str);
|
4025 | }
|
4026 | },
|
4027 |
|
4028 |
|
4029 | setInput: function setInput(input, yy) {
|
4030 | this.yy = yy || this.yy || {};
|
4031 | this._input = input;
|
4032 | this._more = this._backtrack = this.done = false;
|
4033 | this.yylineno = this.yyleng = 0;
|
4034 | this.yytext = this.matched = this.match = '';
|
4035 | this.conditionStack = ['INITIAL'];
|
4036 | this.yylloc = {
|
4037 | first_line: 1,
|
4038 | first_column: 0,
|
4039 | last_line: 1,
|
4040 | last_column: 0
|
4041 | };
|
4042 | if (this.options.ranges) {
|
4043 | this.yylloc.range = [0, 0];
|
4044 | }
|
4045 | this.offset = 0;
|
4046 | return this;
|
4047 | },
|
4048 |
|
4049 |
|
4050 | input: function input() {
|
4051 | var ch = this._input[0];
|
4052 | this.yytext += ch;
|
4053 | this.yyleng++;
|
4054 | this.offset++;
|
4055 | this.match += ch;
|
4056 | this.matched += ch;
|
4057 | var lines = ch.match(/(?:\r\n?|\n).*/g);
|
4058 | if (lines) {
|
4059 | this.yylineno++;
|
4060 | this.yylloc.last_line++;
|
4061 | } else {
|
4062 | this.yylloc.last_column++;
|
4063 | }
|
4064 | if (this.options.ranges) {
|
4065 | this.yylloc.range[1]++;
|
4066 | }
|
4067 |
|
4068 | this._input = this._input.slice(1);
|
4069 | return ch;
|
4070 | },
|
4071 |
|
4072 |
|
4073 | unput: function unput(ch) {
|
4074 | var len = ch.length;
|
4075 | var lines = ch.split(/(?:\r\n?|\n)/g);
|
4076 |
|
4077 | this._input = ch + this._input;
|
4078 | this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
4079 |
|
4080 | this.offset -= len;
|
4081 | var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
4082 | this.match = this.match.substr(0, this.match.length - 1);
|
4083 | this.matched = this.matched.substr(0, this.matched.length - 1);
|
4084 |
|
4085 | if (lines.length - 1) {
|
4086 | this.yylineno -= lines.length - 1;
|
4087 | }
|
4088 | var r = this.yylloc.range;
|
4089 |
|
4090 | this.yylloc = {
|
4091 | first_line: this.yylloc.first_line,
|
4092 | last_line: this.yylineno + 1,
|
4093 | first_column: this.yylloc.first_column,
|
4094 | last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
|
4095 | };
|
4096 |
|
4097 | if (this.options.ranges) {
|
4098 | this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
4099 | }
|
4100 | this.yyleng = this.yytext.length;
|
4101 | return this;
|
4102 | },
|
4103 |
|
4104 |
|
4105 | more: function more() {
|
4106 | this._more = true;
|
4107 | return this;
|
4108 | },
|
4109 |
|
4110 |
|
4111 | reject: function reject() {
|
4112 | if (this.options.backtrack_lexer) {
|
4113 | this._backtrack = true;
|
4114 | } else {
|
4115 | 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(), {
|
4116 | text: "",
|
4117 | token: null,
|
4118 | line: this.yylineno
|
4119 | });
|
4120 | }
|
4121 | return this;
|
4122 | },
|
4123 |
|
4124 |
|
4125 | less: function less(n) {
|
4126 | this.unput(this.match.slice(n));
|
4127 | },
|
4128 |
|
4129 |
|
4130 | pastInput: function pastInput() {
|
4131 | var past = this.matched.substr(0, this.matched.length - this.match.length);
|
4132 | return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
|
4133 | },
|
4134 |
|
4135 |
|
4136 | upcomingInput: function upcomingInput() {
|
4137 | var next = this.match;
|
4138 | if (next.length < 20) {
|
4139 | next += this._input.substr(0, 20 - next.length);
|
4140 | }
|
4141 | return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
|
4142 | },
|
4143 |
|
4144 |
|
4145 | showPosition: function showPosition() {
|
4146 | var pre = this.pastInput();
|
4147 | var c = new Array(pre.length + 1).join("-");
|
4148 | return pre + this.upcomingInput() + "\n" + c + "^";
|
4149 | },
|
4150 |
|
4151 |
|
4152 | test_match: function test_match(match, indexed_rule) {
|
4153 | var token, lines, backup;
|
4154 |
|
4155 | if (this.options.backtrack_lexer) {
|
4156 |
|
4157 | backup = {
|
4158 | yylineno: this.yylineno,
|
4159 | yylloc: {
|
4160 | first_line: this.yylloc.first_line,
|
4161 | last_line: this.last_line,
|
4162 | first_column: this.yylloc.first_column,
|
4163 | last_column: this.yylloc.last_column
|
4164 | },
|
4165 | yytext: this.yytext,
|
4166 | match: this.match,
|
4167 | matches: this.matches,
|
4168 | matched: this.matched,
|
4169 | yyleng: this.yyleng,
|
4170 | offset: this.offset,
|
4171 | _more: this._more,
|
4172 | _input: this._input,
|
4173 | yy: this.yy,
|
4174 | conditionStack: this.conditionStack.slice(0),
|
4175 | done: this.done
|
4176 | };
|
4177 | if (this.options.ranges) {
|
4178 | backup.yylloc.range = this.yylloc.range.slice(0);
|
4179 | }
|
4180 | }
|
4181 |
|
4182 | lines = match[0].match(/(?:\r\n?|\n).*/g);
|
4183 | if (lines) {
|
4184 | this.yylineno += lines.length;
|
4185 | }
|
4186 | this.yylloc = {
|
4187 | first_line: this.yylloc.last_line,
|
4188 | last_line: this.yylineno + 1,
|
4189 | first_column: this.yylloc.last_column,
|
4190 | last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
|
4191 | };
|
4192 | this.yytext += match[0];
|
4193 | this.match += match[0];
|
4194 | this.matches = match;
|
4195 | this.yyleng = this.yytext.length;
|
4196 | if (this.options.ranges) {
|
4197 | this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
4198 | }
|
4199 | this._more = false;
|
4200 | this._backtrack = false;
|
4201 | this._input = this._input.slice(match[0].length);
|
4202 | this.matched += match[0];
|
4203 | token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
4204 | if (this.done && this._input) {
|
4205 | this.done = false;
|
4206 | }
|
4207 | if (token) {
|
4208 | return token;
|
4209 | } else if (this._backtrack) {
|
4210 |
|
4211 | for (var k in backup) {
|
4212 | this[k] = backup[k];
|
4213 | }
|
4214 | return false;
|
4215 | }
|
4216 | return false;
|
4217 | },
|
4218 |
|
4219 |
|
4220 | next: function next() {
|
4221 | if (this.done) {
|
4222 | return this.EOF;
|
4223 | }
|
4224 | if (!this._input) {
|
4225 | this.done = true;
|
4226 | }
|
4227 |
|
4228 | var token, match, tempMatch, index;
|
4229 | if (!this._more) {
|
4230 | this.yytext = '';
|
4231 | this.match = '';
|
4232 | }
|
4233 | var rules = this._currentRules();
|
4234 | for (var i = 0; i < rules.length; i++) {
|
4235 | tempMatch = this._input.match(this.rules[rules[i]]);
|
4236 | if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
4237 | match = tempMatch;
|
4238 | index = i;
|
4239 | if (this.options.backtrack_lexer) {
|
4240 | token = this.test_match(tempMatch, rules[i]);
|
4241 | if (token !== false) {
|
4242 | return token;
|
4243 | } else if (this._backtrack) {
|
4244 | match = false;
|
4245 | continue;
|
4246 | } else {
|
4247 |
|
4248 | return false;
|
4249 | }
|
4250 | } else if (!this.options.flex) {
|
4251 | break;
|
4252 | }
|
4253 | }
|
4254 | }
|
4255 | if (match) {
|
4256 | token = this.test_match(match, rules[index]);
|
4257 | if (token !== false) {
|
4258 | return token;
|
4259 | }
|
4260 |
|
4261 | return false;
|
4262 | }
|
4263 | if (this._input === "") {
|
4264 | return this.EOF;
|
4265 | } else {
|
4266 | return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
|
4267 | text: "",
|
4268 | token: null,
|
4269 | line: this.yylineno
|
4270 | });
|
4271 | }
|
4272 | },
|
4273 |
|
4274 |
|
4275 | lex: function lex() {
|
4276 | var r = this.next();
|
4277 | if (r) {
|
4278 | return r;
|
4279 | } else {
|
4280 | return this.lex();
|
4281 | }
|
4282 | },
|
4283 |
|
4284 |
|
4285 | begin: function begin(condition) {
|
4286 | this.conditionStack.push(condition);
|
4287 | },
|
4288 |
|
4289 |
|
4290 | popState: function popState() {
|
4291 | var n = this.conditionStack.length - 1;
|
4292 | if (n > 0) {
|
4293 | return this.conditionStack.pop();
|
4294 | } else {
|
4295 | return this.conditionStack[0];
|
4296 | }
|
4297 | },
|
4298 |
|
4299 |
|
4300 | _currentRules: function _currentRules() {
|
4301 | if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
4302 | return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
4303 | } else {
|
4304 | return this.conditions["INITIAL"].rules;
|
4305 | }
|
4306 | },
|
4307 |
|
4308 |
|
4309 | topState: function topState(n) {
|
4310 | n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
4311 | if (n >= 0) {
|
4312 | return this.conditionStack[n];
|
4313 | } else {
|
4314 | return "INITIAL";
|
4315 | }
|
4316 | },
|
4317 |
|
4318 |
|
4319 | pushState: function pushState(condition) {
|
4320 | this.begin(condition);
|
4321 | },
|
4322 |
|
4323 |
|
4324 | stateStackSize: function stateStackSize() {
|
4325 | return this.conditionStack.length;
|
4326 | },
|
4327 | options: { "case-insensitive": true },
|
4328 | performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
4329 | var YYSTATE = YY_START;
|
4330 | switch ($avoiding_name_collisions) {
|
4331 | case 0:
|
4332 | return 5;
|
4333 | break;
|
4334 | case 1:
|
4335 |
|
4336 | break;
|
4337 | case 2:
|
4338 |
|
4339 | break;
|
4340 | case 3:
|
4341 |
|
4342 | break;
|
4343 | case 4:
|
4344 |
|
4345 | break;
|
4346 | case 5:
|
4347 | this.begin('ID');return 10;
|
4348 | break;
|
4349 | case 6:
|
4350 | this.begin('ALIAS');return 39;
|
4351 | break;
|
4352 | case 7:
|
4353 | this.popState();this.popState();this.begin('LINE');return 12;
|
4354 | break;
|
4355 | case 8:
|
4356 | this.popState();this.popState();return 5;
|
4357 | break;
|
4358 | case 9:
|
4359 | this.begin('LINE');return 20;
|
4360 | break;
|
4361 | case 10:
|
4362 | this.begin('LINE');return 22;
|
4363 | break;
|
4364 | case 11:
|
4365 | this.begin('LINE');return 23;
|
4366 | break;
|
4367 | case 12:
|
4368 | this.begin('LINE');return 24;
|
4369 | break;
|
4370 | case 13:
|
4371 | this.begin('LINE');return 25;
|
4372 | break;
|
4373 | case 14:
|
4374 | this.begin('LINE');return 27;
|
4375 | break;
|
4376 | case 15:
|
4377 | this.popState();return 13;
|
4378 | break;
|
4379 | case 16:
|
4380 | return 21;
|
4381 | break;
|
4382 | case 17:
|
4383 | return 34;
|
4384 | break;
|
4385 | case 18:
|
4386 | return 35;
|
4387 | break;
|
4388 | case 19:
|
4389 | return 30;
|
4390 | break;
|
4391 | case 20:
|
4392 | return 28;
|
4393 | break;
|
4394 | case 21:
|
4395 | this.begin('ID');return 15;
|
4396 | break;
|
4397 | case 22:
|
4398 | this.begin('ID');return 16;
|
4399 | break;
|
4400 | case 23:
|
4401 | return 18;
|
4402 | break;
|
4403 | case 24:
|
4404 | return 6;
|
4405 | break;
|
4406 | case 25:
|
4407 | return 33;
|
4408 | break;
|
4409 | case 26:
|
4410 | return 5;
|
4411 | break;
|
4412 | case 27:
|
4413 | yy_.yytext = yy_.yytext.trim();return 39;
|
4414 | break;
|
4415 | case 28:
|
4416 | return 42;
|
4417 | break;
|
4418 | case 29:
|
4419 | return 43;
|
4420 | break;
|
4421 | case 30:
|
4422 | return 40;
|
4423 | break;
|
4424 | case 31:
|
4425 | return 41;
|
4426 | break;
|
4427 | case 32:
|
4428 | return 44;
|
4429 | break;
|
4430 | case 33:
|
4431 | return 45;
|
4432 | break;
|
4433 | case 34:
|
4434 | return 46;
|
4435 | break;
|
4436 | case 35:
|
4437 | return 37;
|
4438 | break;
|
4439 | case 36:
|
4440 | return 38;
|
4441 | break;
|
4442 | case 37:
|
4443 | return 5;
|
4444 | break;
|
4445 | case 38:
|
4446 | return 'INVALID';
|
4447 | break;
|
4448 | }
|
4449 | },
|
4450 | 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, /^(?: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],
|
4451 | conditions: { "LINE": { "rules": [2, 3, 15], "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, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38], "inclusive": true } }
|
4452 | };
|
4453 | return lexer;
|
4454 | }();
|
4455 | parser.lexer = lexer;
|
4456 | function Parser() {
|
4457 | this.yy = {};
|
4458 | }
|
4459 | Parser.prototype = parser;parser.Parser = Parser;
|
4460 | return new Parser();
|
4461 | }();
|
4462 |
|
4463 | if (true) {
|
4464 | exports.parser = parser;
|
4465 | exports.Parser = parser.Parser;
|
4466 | exports.parse = function () {
|
4467 | return parser.parse.apply(parser, arguments);
|
4468 | };
|
4469 | exports.main = function commonjsMain(args) {
|
4470 | if (!args[1]) {
|
4471 | console.log('Usage: ' + args[0] + ' FILE');
|
4472 | process.exit(1);
|
4473 | }
|
4474 | var source = __webpack_require__(4).readFileSync(__webpack_require__(5).normalize(args[1]), "utf8");
|
4475 | return exports.parser.parse(source);
|
4476 | };
|
4477 | if (typeof module !== 'undefined' && __webpack_require__.c[__webpack_require__.s] === module) {
|
4478 | exports.main(process.argv.slice(1));
|
4479 | }
|
4480 | }
|
4481 | }.call(exports, __webpack_require__(2), __webpack_require__(3)(module)))
|
4482 |
|
4483 | }),
|
4484 |
|
4485 | (function(module, exports, __webpack_require__) {
|
4486 |
|
4487 | "use strict";
|
4488 |
|
4489 |
|
4490 | Object.defineProperty(exports, "__esModule", {
|
4491 | value: true
|
4492 | });
|
4493 | exports.apply = exports.setTitle = exports.addNote = exports.PLACEMENT = exports.ARROWTYPE = exports.LINETYPE = exports.clear = exports.getTitle = exports.getActorKeys = exports.getActor = exports.getActors = exports.getMessages = exports.addSignal = exports.addMessage = exports.addActor = undefined;
|
4494 |
|
4495 | var _logger = __webpack_require__(0);
|
4496 |
|
4497 | var actors = {};
|
4498 | var messages = [];
|
4499 | var notes = [];
|
4500 | var title = '';
|
4501 |
|
4502 | var addActor = exports.addActor = function addActor(id, name, description) {
|
4503 |
|
4504 | var old = actors[id];
|
4505 | if (old && name === old.name && description == null) return;
|
4506 |
|
4507 |
|
4508 | if (description == null) description = name;
|
4509 |
|
4510 | actors[id] = { name: name, description: description };
|
4511 | };
|
4512 |
|
4513 | var addMessage = exports.addMessage = function addMessage(idFrom, idTo, message, answer) {
|
4514 | messages.push({ from: idFrom, to: idTo, message: message, answer: answer });
|
4515 | };
|
4516 |
|
4517 | var addSignal = exports.addSignal = function addSignal(idFrom, idTo, message, messageType) {
|
4518 | _logger.logger.debug('Adding message from=' + idFrom + ' to=' + idTo + ' message=' + message + ' type=' + messageType);
|
4519 | messages.push({ from: idFrom, to: idTo, message: message, type: messageType });
|
4520 | };
|
4521 |
|
4522 | var getMessages = exports.getMessages = function getMessages() {
|
4523 | return messages;
|
4524 | };
|
4525 |
|
4526 | var getActors = exports.getActors = function getActors() {
|
4527 | return actors;
|
4528 | };
|
4529 | var getActor = exports.getActor = function getActor(id) {
|
4530 | return actors[id];
|
4531 | };
|
4532 | var getActorKeys = exports.getActorKeys = function getActorKeys() {
|
4533 | return Object.keys(actors);
|
4534 | };
|
4535 | var getTitle = exports.getTitle = function getTitle() {
|
4536 | return title;
|
4537 | };
|
4538 |
|
4539 | var clear = exports.clear = function clear() {
|
4540 | actors = {};
|
4541 | messages = [];
|
4542 | };
|
4543 |
|
4544 | var LINETYPE = exports.LINETYPE = {
|
4545 | SOLID: 0,
|
4546 | DOTTED: 1,
|
4547 | NOTE: 2,
|
4548 | SOLID_CROSS: 3,
|
4549 | DOTTED_CROSS: 4,
|
4550 | SOLID_OPEN: 5,
|
4551 | DOTTED_OPEN: 6,
|
4552 | LOOP_START: 10,
|
4553 | LOOP_END: 11,
|
4554 | ALT_START: 12,
|
4555 | ALT_ELSE: 13,
|
4556 | ALT_END: 14,
|
4557 | OPT_START: 15,
|
4558 | OPT_END: 16,
|
4559 | ACTIVE_START: 17,
|
4560 | ACTIVE_END: 18,
|
4561 | PAR_START: 19,
|
4562 | PAR_AND: 20,
|
4563 | PAR_END: 21
|
4564 | };
|
4565 |
|
4566 | var ARROWTYPE = exports.ARROWTYPE = {
|
4567 | FILLED: 0,
|
4568 | OPEN: 1
|
4569 | };
|
4570 |
|
4571 | var PLACEMENT = exports.PLACEMENT = {
|
4572 | LEFTOF: 0,
|
4573 | RIGHTOF: 1,
|
4574 | OVER: 2
|
4575 | };
|
4576 |
|
4577 | var addNote = exports.addNote = function addNote(actor, placement, message) {
|
4578 | var note = { actor: actor, placement: placement, message: message
|
4579 |
|
4580 |
|
4581 | };var actors = [].concat(actor, actor);
|
4582 |
|
4583 | notes.push(note);
|
4584 | messages.push({ from: actors[0], to: actors[1], message: message, type: LINETYPE.NOTE, placement: placement });
|
4585 | };
|
4586 |
|
4587 | var setTitle = exports.setTitle = function setTitle(titleText) {
|
4588 | title = titleText;
|
4589 | };
|
4590 |
|
4591 | var apply = exports.apply = function apply(param) {
|
4592 | if (param instanceof Array) {
|
4593 | param.forEach(function (item) {
|
4594 | apply(item);
|
4595 | });
|
4596 | } else {
|
4597 | switch (param.type) {
|
4598 | case 'addActor':
|
4599 | addActor(param.actor, param.actor, param.description);
|
4600 | break;
|
4601 | case 'activeStart':
|
4602 | addSignal(param.actor, undefined, undefined, param.signalType);
|
4603 | break;
|
4604 | case 'activeEnd':
|
4605 | addSignal(param.actor, undefined, undefined, param.signalType);
|
4606 | break;
|
4607 | case 'addNote':
|
4608 | addNote(param.actor, param.placement, param.text);
|
4609 | break;
|
4610 | case 'addMessage':
|
4611 | addSignal(param.from, param.to, param.msg, param.signalType);
|
4612 | break;
|
4613 | case 'loopStart':
|
4614 | addSignal(undefined, undefined, param.loopText, param.signalType);
|
4615 | break;
|
4616 | case 'loopEnd':
|
4617 | addSignal(undefined, undefined, undefined, param.signalType);
|
4618 | break;
|
4619 | case 'optStart':
|
4620 | addSignal(undefined, undefined, param.optText, param.signalType);
|
4621 | break;
|
4622 | case 'optEnd':
|
4623 | addSignal(undefined, undefined, undefined, param.signalType);
|
4624 | break;
|
4625 | case 'altStart':
|
4626 | addSignal(undefined, undefined, param.altText, param.signalType);
|
4627 | break;
|
4628 | case 'else':
|
4629 | addSignal(undefined, undefined, param.altText, param.signalType);
|
4630 | break;
|
4631 | case 'altEnd':
|
4632 | addSignal(undefined, undefined, undefined, param.signalType);
|
4633 | break;
|
4634 | case 'setTitle':
|
4635 | setTitle(param.text);
|
4636 | break;
|
4637 | case 'parStart':
|
4638 | addSignal(undefined, undefined, param.parText, param.signalType);
|
4639 | break;
|
4640 | case 'and':
|
4641 | addSignal(undefined, undefined, param.parText, param.signalType);
|
4642 | break;
|
4643 | case 'parEnd':
|
4644 | addSignal(undefined, undefined, undefined, param.signalType);
|
4645 | break;
|
4646 | }
|
4647 | }
|
4648 | };
|
4649 |
|
4650 | exports.default = {
|
4651 | addActor: addActor,
|
4652 | addMessage: addMessage,
|
4653 | addSignal: addSignal,
|
4654 | getMessages: getMessages,
|
4655 | getActors: getActors,
|
4656 | getActor: getActor,
|
4657 | getActorKeys: getActorKeys,
|
4658 | getTitle: getTitle,
|
4659 | clear: clear,
|
4660 | LINETYPE: LINETYPE,
|
4661 | ARROWTYPE: ARROWTYPE,
|
4662 | PLACEMENT: PLACEMENT,
|
4663 | addNote: addNote,
|
4664 | setTitle: setTitle,
|
4665 | apply: apply
|
4666 | };
|
4667 |
|
4668 | }),
|
4669 |
|
4670 | (function(module, exports, __webpack_require__) {
|
4671 |
|
4672 | "use strict";
|
4673 |
|
4674 |
|
4675 | Object.defineProperty(exports, "__esModule", {
|
4676 | value: true
|
4677 | });
|
4678 | exports.getInfo = exports.setInfo = exports.getMessage = exports.setMessage = undefined;
|
4679 |
|
4680 | var _logger = __webpack_require__(0);
|
4681 |
|
4682 | var message = '';
|
4683 | var info = false;
|
4684 |
|
4685 | var setMessage = exports.setMessage = function setMessage(txt) {
|
4686 | _logger.logger.debug('Setting message to: ' + txt);
|
4687 | message = txt;
|
4688 | };
|
4689 |
|
4690 | var getMessage = exports.getMessage = function getMessage() {
|
4691 | return message;
|
4692 | };
|
4693 |
|
4694 | var setInfo = exports.setInfo = function setInfo(inf) {
|
4695 | info = inf;
|
4696 | };
|
4697 |
|
4698 | var getInfo = exports.getInfo = function getInfo() {
|
4699 | return info;
|
4700 | };
|
4701 |
|
4702 | exports.default = {
|
4703 | setMessage: setMessage,
|
4704 | getMessage: getMessage,
|
4705 | setInfo: setInfo,
|
4706 | getInfo: getInfo
|
4707 | };
|
4708 |
|
4709 | }),
|
4710 |
|
4711 | (function(module, exports, __webpack_require__) {
|
4712 |
|
4713 | "use strict";
|
4714 | (function(process, module) {
|
4715 |
|
4716 |
|
4717 |
|
4718 |
|
4719 |
|
4720 |
|
4721 |
|
4722 |
|
4723 |
|
4724 |
|
4725 |
|
4726 |
|
4727 |
|
4728 |
|
4729 |
|
4730 |
|
4731 |
|
4732 |
|
4733 |
|
4734 |
|
4735 |
|
4736 |
|
4737 |
|
4738 |
|
4739 |
|
4740 |
|
4741 |
|
4742 |
|
4743 |
|
4744 |
|
4745 |
|
4746 |
|
4747 |
|
4748 |
|
4749 |
|
4750 |
|
4751 |
|
4752 |
|
4753 |
|
4754 |
|
4755 |
|
4756 |
|
4757 |
|
4758 |
|
4759 |
|
4760 |
|
4761 |
|
4762 |
|
4763 |
|
4764 |
|
4765 |
|
4766 |
|
4767 |
|
4768 |
|
4769 |
|
4770 |
|
4771 |
|
4772 |
|
4773 |
|
4774 |
|
4775 |
|
4776 |
|
4777 |
|
4778 |
|
4779 |
|
4780 |
|
4781 |
|
4782 |
|
4783 |
|
4784 |
|
4785 |
|
4786 |
|
4787 |
|
4788 |
|
4789 | var parser = function () {
|
4790 | var o = function o(k, v, _o, l) {
|
4791 | for (_o = _o || {}, l = k.length; l--; _o[k[l]] = v) {}return _o;
|
4792 | },
|
4793 | $V0 = [6, 9, 10, 12];
|
4794 | var parser = { trace: function trace() {},
|
4795 | yy: {},
|
4796 | symbols_: { "error": 2, "start": 3, "info": 4, "document": 5, "EOF": 6, "line": 7, "statement": 8, "NL": 9, "showInfo": 10, "message": 11, "say": 12, "TXT": 13, "$accept": 0, "$end": 1 },
|
4797 | terminals_: { 2: "error", 4: "info", 6: "EOF", 9: "NL", 10: "showInfo", 12: "say", 13: "TXT" },
|
4798 | productions_: [0, [3, 3], [5, 0], [5, 2], [7, 1], [7, 1], [8, 1], [8, 1], [11, 2]],
|
4799 | performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
|
4800 |
|
4801 |
|
4802 | var $0 = $$.length - 1;
|
4803 | switch (yystate) {
|
4804 | case 1:
|
4805 | return yy;
|
4806 | break;
|
4807 | case 4:
|
4808 |
|
4809 | break;
|
4810 | case 6:
|
4811 | yy.setInfo(true);
|
4812 | break;
|
4813 | case 7:
|
4814 | yy.setMessage($$[$0]);
|
4815 | break;
|
4816 | case 8:
|
4817 | this.$ = $$[$0 - 1].substring(1).trim().replace(/\\n/gm, "\n");
|
4818 | break;
|
4819 | }
|
4820 | },
|
4821 | 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], 11: 9, 12: [1, 10] }, { 1: [2, 1] }, o($V0, [2, 3]), o($V0, [2, 4]), o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 7]), { 13: [1, 11] }, o($V0, [2, 8])],
|
4822 | defaultActions: { 4: [2, 1] },
|
4823 | parseError: function parseError(str, hash) {
|
4824 | if (hash.recoverable) {
|
4825 | this.trace(str);
|
4826 | } else {
|
4827 | var _parseError = function _parseError(msg, hash) {
|
4828 | this.message = msg;
|
4829 | this.hash = hash;
|
4830 | };
|
4831 |
|
4832 | _parseError.prototype = Error;
|
4833 |
|
4834 | throw new _parseError(str, hash);
|
4835 | }
|
4836 | },
|
4837 | parse: function parse(input) {
|
4838 | var self = this,
|
4839 | stack = [0],
|
4840 | tstack = [],
|
4841 | vstack = [null],
|
4842 | lstack = [],
|
4843 | table = this.table,
|
4844 | yytext = '',
|
4845 | yylineno = 0,
|
4846 | yyleng = 0,
|
4847 | recovering = 0,
|
4848 | TERROR = 2,
|
4849 | EOF = 1;
|
4850 | var args = lstack.slice.call(arguments, 1);
|
4851 | var lexer = Object.create(this.lexer);
|
4852 | var sharedState = { yy: {} };
|
4853 | for (var k in this.yy) {
|
4854 | if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
4855 | sharedState.yy[k] = this.yy[k];
|
4856 | }
|
4857 | }
|
4858 | lexer.setInput(input, sharedState.yy);
|
4859 | sharedState.yy.lexer = lexer;
|
4860 | sharedState.yy.parser = this;
|
4861 | if (typeof lexer.yylloc == 'undefined') {
|
4862 | lexer.yylloc = {};
|
4863 | }
|
4864 | var yyloc = lexer.yylloc;
|
4865 | lstack.push(yyloc);
|
4866 | var ranges = lexer.options && lexer.options.ranges;
|
4867 | if (typeof sharedState.yy.parseError === 'function') {
|
4868 | this.parseError = sharedState.yy.parseError;
|
4869 | } else {
|
4870 | this.parseError = Object.getPrototypeOf(this).parseError;
|
4871 | }
|
4872 | function popStack(n) {
|
4873 | stack.length = stack.length - 2 * n;
|
4874 | vstack.length = vstack.length - n;
|
4875 | lstack.length = lstack.length - n;
|
4876 | }
|
4877 | function lex() {
|
4878 | var token;
|
4879 | token = tstack.pop() || lexer.lex() || EOF;
|
4880 | if (typeof token !== 'number') {
|
4881 | if (token instanceof Array) {
|
4882 | tstack = token;
|
4883 | token = tstack.pop();
|
4884 | }
|
4885 | token = self.symbols_[token] || token;
|
4886 | }
|
4887 | return token;
|
4888 | }
|
4889 | var symbol,
|
4890 | preErrorSymbol,
|
4891 | state,
|
4892 | action,
|
4893 | a,
|
4894 | r,
|
4895 | yyval = {},
|
4896 | p,
|
4897 | len,
|
4898 | newState,
|
4899 | expected;
|
4900 | while (true) {
|
4901 | state = stack[stack.length - 1];
|
4902 | if (this.defaultActions[state]) {
|
4903 | action = this.defaultActions[state];
|
4904 | } else {
|
4905 | if (symbol === null || typeof symbol == 'undefined') {
|
4906 | symbol = lex();
|
4907 | }
|
4908 | action = table[state] && table[state][symbol];
|
4909 | }
|
4910 | if (typeof action === 'undefined' || !action.length || !action[0]) {
|
4911 | var errStr = '';
|
4912 | expected = [];
|
4913 | for (p in table[state]) {
|
4914 | if (this.terminals_[p] && p > TERROR) {
|
4915 | expected.push('\'' + this.terminals_[p] + '\'');
|
4916 | }
|
4917 | }
|
4918 | if (lexer.showPosition) {
|
4919 | errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
|
4920 | } else {
|
4921 | errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
|
4922 | }
|
4923 | this.parseError(errStr, {
|
4924 | text: lexer.match,
|
4925 | token: this.terminals_[symbol] || symbol,
|
4926 | line: lexer.yylineno,
|
4927 | loc: yyloc,
|
4928 | expected: expected
|
4929 | });
|
4930 | }
|
4931 | if (action[0] instanceof Array && action.length > 1) {
|
4932 | throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
|
4933 | }
|
4934 | switch (action[0]) {
|
4935 | case 1:
|
4936 | stack.push(symbol);
|
4937 | vstack.push(lexer.yytext);
|
4938 | lstack.push(lexer.yylloc);
|
4939 | stack.push(action[1]);
|
4940 | symbol = null;
|
4941 | if (!preErrorSymbol) {
|
4942 | yyleng = lexer.yyleng;
|
4943 | yytext = lexer.yytext;
|
4944 | yylineno = lexer.yylineno;
|
4945 | yyloc = lexer.yylloc;
|
4946 | if (recovering > 0) {
|
4947 | recovering--;
|
4948 | }
|
4949 | } else {
|
4950 | symbol = preErrorSymbol;
|
4951 | preErrorSymbol = null;
|
4952 | }
|
4953 | break;
|
4954 | case 2:
|
4955 | len = this.productions_[action[1]][1];
|
4956 | yyval.$ = vstack[vstack.length - len];
|
4957 | yyval._$ = {
|
4958 | first_line: lstack[lstack.length - (len || 1)].first_line,
|
4959 | last_line: lstack[lstack.length - 1].last_line,
|
4960 | first_column: lstack[lstack.length - (len || 1)].first_column,
|
4961 | last_column: lstack[lstack.length - 1].last_column
|
4962 | };
|
4963 | if (ranges) {
|
4964 | yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
|
4965 | }
|
4966 | r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));
|
4967 | if (typeof r !== 'undefined') {
|
4968 | return r;
|
4969 | }
|
4970 | if (len) {
|
4971 | stack = stack.slice(0, -1 * len * 2);
|
4972 | vstack = vstack.slice(0, -1 * len);
|
4973 | lstack = lstack.slice(0, -1 * len);
|
4974 | }
|
4975 | stack.push(this.productions_[action[1]][0]);
|
4976 | vstack.push(yyval.$);
|
4977 | lstack.push(yyval._$);
|
4978 | newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
4979 | stack.push(newState);
|
4980 | break;
|
4981 | case 3:
|
4982 | return true;
|
4983 | }
|
4984 | }
|
4985 | return true;
|
4986 | } };
|
4987 |
|
4988 |
|
4989 | var lexer = function () {
|
4990 | var lexer = {
|
4991 |
|
4992 | EOF: 1,
|
4993 |
|
4994 | parseError: function parseError(str, hash) {
|
4995 | if (this.yy.parser) {
|
4996 | this.yy.parser.parseError(str, hash);
|
4997 | } else {
|
4998 | throw new Error(str);
|
4999 | }
|
5000 | },
|
5001 |
|
5002 |
|
5003 | setInput: function setInput(input, yy) {
|
5004 | this.yy = yy || this.yy || {};
|
5005 | this._input = input;
|
5006 | this._more = this._backtrack = this.done = false;
|
5007 | this.yylineno = this.yyleng = 0;
|
5008 | this.yytext = this.matched = this.match = '';
|
5009 | this.conditionStack = ['INITIAL'];
|
5010 | this.yylloc = {
|
5011 | first_line: 1,
|
5012 | first_column: 0,
|
5013 | last_line: 1,
|
5014 | last_column: 0
|
5015 | };
|
5016 | if (this.options.ranges) {
|
5017 | this.yylloc.range = [0, 0];
|
5018 | }
|
5019 | this.offset = 0;
|
5020 | return this;
|
5021 | },
|
5022 |
|
5023 |
|
5024 | input: function input() {
|
5025 | var ch = this._input[0];
|
5026 | this.yytext += ch;
|
5027 | this.yyleng++;
|
5028 | this.offset++;
|
5029 | this.match += ch;
|
5030 | this.matched += ch;
|
5031 | var lines = ch.match(/(?:\r\n?|\n).*/g);
|
5032 | if (lines) {
|
5033 | this.yylineno++;
|
5034 | this.yylloc.last_line++;
|
5035 | } else {
|
5036 | this.yylloc.last_column++;
|
5037 | }
|
5038 | if (this.options.ranges) {
|
5039 | this.yylloc.range[1]++;
|
5040 | }
|
5041 |
|
5042 | this._input = this._input.slice(1);
|
5043 | return ch;
|
5044 | },
|
5045 |
|
5046 |
|
5047 | unput: function unput(ch) {
|
5048 | var len = ch.length;
|
5049 | var lines = ch.split(/(?:\r\n?|\n)/g);
|
5050 |
|
5051 | this._input = ch + this._input;
|
5052 | this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
5053 |
|
5054 | this.offset -= len;
|
5055 | var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
5056 | this.match = this.match.substr(0, this.match.length - 1);
|
5057 | this.matched = this.matched.substr(0, this.matched.length - 1);
|
5058 |
|
5059 | if (lines.length - 1) {
|
5060 | this.yylineno -= lines.length - 1;
|
5061 | }
|
5062 | var r = this.yylloc.range;
|
5063 |
|
5064 | this.yylloc = {
|
5065 | first_line: this.yylloc.first_line,
|
5066 | last_line: this.yylineno + 1,
|
5067 | first_column: this.yylloc.first_column,
|
5068 | last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
|
5069 | };
|
5070 |
|
5071 | if (this.options.ranges) {
|
5072 | this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
5073 | }
|
5074 | this.yyleng = this.yytext.length;
|
5075 | return this;
|
5076 | },
|
5077 |
|
5078 |
|
5079 | more: function more() {
|
5080 | this._more = true;
|
5081 | return this;
|
5082 | },
|
5083 |
|
5084 |
|
5085 | reject: function reject() {
|
5086 | if (this.options.backtrack_lexer) {
|
5087 | this._backtrack = true;
|
5088 | } else {
|
5089 | 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(), {
|
5090 | text: "",
|
5091 | token: null,
|
5092 | line: this.yylineno
|
5093 | });
|
5094 | }
|
5095 | return this;
|
5096 | },
|
5097 |
|
5098 |
|
5099 | less: function less(n) {
|
5100 | this.unput(this.match.slice(n));
|
5101 | },
|
5102 |
|
5103 |
|
5104 | pastInput: function pastInput() {
|
5105 | var past = this.matched.substr(0, this.matched.length - this.match.length);
|
5106 | return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
|
5107 | },
|
5108 |
|
5109 |
|
5110 | upcomingInput: function upcomingInput() {
|
5111 | var next = this.match;
|
5112 | if (next.length < 20) {
|
5113 | next += this._input.substr(0, 20 - next.length);
|
5114 | }
|
5115 | return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
|
5116 | },
|
5117 |
|
5118 |
|
5119 | showPosition: function showPosition() {
|
5120 | var pre = this.pastInput();
|
5121 | var c = new Array(pre.length + 1).join("-");
|
5122 | return pre + this.upcomingInput() + "\n" + c + "^";
|
5123 | },
|
5124 |
|
5125 |
|
5126 | test_match: function test_match(match, indexed_rule) {
|
5127 | var token, lines, backup;
|
5128 |
|
5129 | if (this.options.backtrack_lexer) {
|
5130 |
|
5131 | backup = {
|
5132 | yylineno: this.yylineno,
|
5133 | yylloc: {
|
5134 | first_line: this.yylloc.first_line,
|
5135 | last_line: this.last_line,
|
5136 | first_column: this.yylloc.first_column,
|
5137 | last_column: this.yylloc.last_column
|
5138 | },
|
5139 | yytext: this.yytext,
|
5140 | match: this.match,
|
5141 | matches: this.matches,
|
5142 | matched: this.matched,
|
5143 | yyleng: this.yyleng,
|
5144 | offset: this.offset,
|
5145 | _more: this._more,
|
5146 | _input: this._input,
|
5147 | yy: this.yy,
|
5148 | conditionStack: this.conditionStack.slice(0),
|
5149 | done: this.done
|
5150 | };
|
5151 | if (this.options.ranges) {
|
5152 | backup.yylloc.range = this.yylloc.range.slice(0);
|
5153 | }
|
5154 | }
|
5155 |
|
5156 | lines = match[0].match(/(?:\r\n?|\n).*/g);
|
5157 | if (lines) {
|
5158 | this.yylineno += lines.length;
|
5159 | }
|
5160 | this.yylloc = {
|
5161 | first_line: this.yylloc.last_line,
|
5162 | last_line: this.yylineno + 1,
|
5163 | first_column: this.yylloc.last_column,
|
5164 | last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
|
5165 | };
|
5166 | this.yytext += match[0];
|
5167 | this.match += match[0];
|
5168 | this.matches = match;
|
5169 | this.yyleng = this.yytext.length;
|
5170 | if (this.options.ranges) {
|
5171 | this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
5172 | }
|
5173 | this._more = false;
|
5174 | this._backtrack = false;
|
5175 | this._input = this._input.slice(match[0].length);
|
5176 | this.matched += match[0];
|
5177 | token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
5178 | if (this.done && this._input) {
|
5179 | this.done = false;
|
5180 | }
|
5181 | if (token) {
|
5182 | return token;
|
5183 | } else if (this._backtrack) {
|
5184 |
|
5185 | for (var k in backup) {
|
5186 | this[k] = backup[k];
|
5187 | }
|
5188 | return false;
|
5189 | }
|
5190 | return false;
|
5191 | },
|
5192 |
|
5193 |
|
5194 | next: function next() {
|
5195 | if (this.done) {
|
5196 | return this.EOF;
|
5197 | }
|
5198 | if (!this._input) {
|
5199 | this.done = true;
|
5200 | }
|
5201 |
|
5202 | var token, match, tempMatch, index;
|
5203 | if (!this._more) {
|
5204 | this.yytext = '';
|
5205 | this.match = '';
|
5206 | }
|
5207 | var rules = this._currentRules();
|
5208 | for (var i = 0; i < rules.length; i++) {
|
5209 | tempMatch = this._input.match(this.rules[rules[i]]);
|
5210 | if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
5211 | match = tempMatch;
|
5212 | index = i;
|
5213 | if (this.options.backtrack_lexer) {
|
5214 | token = this.test_match(tempMatch, rules[i]);
|
5215 | if (token !== false) {
|
5216 | return token;
|
5217 | } else if (this._backtrack) {
|
5218 | match = false;
|
5219 | continue;
|
5220 | } else {
|
5221 |
|
5222 | return false;
|
5223 | }
|
5224 | } else if (!this.options.flex) {
|
5225 | break;
|
5226 | }
|
5227 | }
|
5228 | }
|
5229 | if (match) {
|
5230 | token = this.test_match(match, rules[index]);
|
5231 | if (token !== false) {
|
5232 | return token;
|
5233 | }
|
5234 |
|
5235 | return false;
|
5236 | }
|
5237 | if (this._input === "") {
|
5238 | return this.EOF;
|
5239 | } else {
|
5240 | return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
|
5241 | text: "",
|
5242 | token: null,
|
5243 | line: this.yylineno
|
5244 | });
|
5245 | }
|
5246 | },
|
5247 |
|
5248 |
|
5249 | lex: function lex() {
|
5250 | var r = this.next();
|
5251 | if (r) {
|
5252 | return r;
|
5253 | } else {
|
5254 | return this.lex();
|
5255 | }
|
5256 | },
|
5257 |
|
5258 |
|
5259 | begin: function begin(condition) {
|
5260 | this.conditionStack.push(condition);
|
5261 | },
|
5262 |
|
5263 |
|
5264 | popState: function popState() {
|
5265 | var n = this.conditionStack.length - 1;
|
5266 | if (n > 0) {
|
5267 | return this.conditionStack.pop();
|
5268 | } else {
|
5269 | return this.conditionStack[0];
|
5270 | }
|
5271 | },
|
5272 |
|
5273 |
|
5274 | _currentRules: function _currentRules() {
|
5275 | if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
5276 | return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
5277 | } else {
|
5278 | return this.conditions["INITIAL"].rules;
|
5279 | }
|
5280 | },
|
5281 |
|
5282 |
|
5283 | topState: function topState(n) {
|
5284 | n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
5285 | if (n >= 0) {
|
5286 | return this.conditionStack[n];
|
5287 | } else {
|
5288 | return "INITIAL";
|
5289 | }
|
5290 | },
|
5291 |
|
5292 |
|
5293 | pushState: function pushState(condition) {
|
5294 | this.begin(condition);
|
5295 | },
|
5296 |
|
5297 |
|
5298 | stateStackSize: function stateStackSize() {
|
5299 | return this.conditionStack.length;
|
5300 | },
|
5301 | options: { "case-insensitive": true },
|
5302 | performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
5303 |
|
5304 |
|
5305 | var YYSTATE = YY_START;
|
5306 | switch ($avoiding_name_collisions) {
|
5307 | case 0:
|
5308 | return 9;
|
5309 | break;
|
5310 | case 1:
|
5311 | return 10;
|
5312 | break;
|
5313 | case 2:
|
5314 | return 4;
|
5315 | break;
|
5316 | case 3:
|
5317 | return 12;
|
5318 | break;
|
5319 | case 4:
|
5320 | return 13;
|
5321 | break;
|
5322 | case 5:
|
5323 | return 6;
|
5324 | break;
|
5325 | case 6:
|
5326 | return 'INVALID';
|
5327 | break;
|
5328 | }
|
5329 | },
|
5330 | rules: [/^(?:[\n]+)/i, /^(?:showInfo\b)/i, /^(?:info\b)/i, /^(?:say\b)/i, /^(?::[^#\n;]+)/i, /^(?:$)/i, /^(?:.)/i],
|
5331 | conditions: { "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6], "inclusive": true } }
|
5332 | };
|
5333 | return lexer;
|
5334 | }();
|
5335 | parser.lexer = lexer;
|
5336 | function Parser() {
|
5337 | this.yy = {};
|
5338 | }
|
5339 | Parser.prototype = parser;parser.Parser = Parser;
|
5340 | return new Parser();
|
5341 | }();
|
5342 |
|
5343 | if (true) {
|
5344 | exports.parser = parser;
|
5345 | exports.Parser = parser.Parser;
|
5346 | exports.parse = function () {
|
5347 | return parser.parse.apply(parser, arguments);
|
5348 | };
|
5349 | exports.main = function commonjsMain(args) {
|
5350 | if (!args[1]) {
|
5351 | console.log('Usage: ' + args[0] + ' FILE');
|
5352 | process.exit(1);
|
5353 | }
|
5354 | var source = __webpack_require__(4).readFileSync(__webpack_require__(5).normalize(args[1]), "utf8");
|
5355 | return exports.parser.parse(source);
|
5356 | };
|
5357 | if (typeof module !== 'undefined' && __webpack_require__.c[__webpack_require__.s] === module) {
|
5358 | exports.main(process.argv.slice(1));
|
5359 | }
|
5360 | }
|
5361 | }.call(exports, __webpack_require__(2), __webpack_require__(3)(module)))
|
5362 |
|
5363 | }),
|
5364 |
|
5365 | (function(module, exports, __webpack_require__) {
|
5366 |
|
5367 | "use strict";
|
5368 | (function(process, module) {
|
5369 |
|
5370 |
|
5371 |
|
5372 |
|
5373 |
|
5374 |
|
5375 |
|
5376 |
|
5377 |
|
5378 |
|
5379 |
|
5380 |
|
5381 |
|
5382 |
|
5383 |
|
5384 |
|
5385 |
|
5386 |
|
5387 |
|
5388 |
|
5389 |
|
5390 |
|
5391 |
|
5392 |
|
5393 |
|
5394 |
|
5395 |
|
5396 |
|
5397 |
|
5398 |
|
5399 |
|
5400 |
|
5401 |
|
5402 |
|
5403 |
|
5404 |
|
5405 |
|
5406 |
|
5407 |
|
5408 |
|
5409 |
|
5410 |
|
5411 |
|
5412 |
|
5413 |
|
5414 |
|
5415 |
|
5416 |
|
5417 |
|
5418 |
|
5419 |
|
5420 |
|
5421 |
|
5422 |
|
5423 |
|
5424 |
|
5425 |
|
5426 |
|
5427 |
|
5428 |
|
5429 |
|
5430 |
|
5431 |
|
5432 |
|
5433 |
|
5434 |
|
5435 |
|
5436 |
|
5437 |
|
5438 |
|
5439 |
|
5440 |
|
5441 |
|
5442 |
|
5443 | var parser = function () {
|
5444 | var o = function o(k, v, _o, l) {
|
5445 | for (_o = _o || {}, l = k.length; l--; _o[k[l]] = v) {}return _o;
|
5446 | },
|
5447 | $V0 = [6, 8, 10, 11, 12, 13, 14],
|
5448 | $V1 = [1, 9],
|
5449 | $V2 = [1, 10],
|
5450 | $V3 = [1, 11],
|
5451 | $V4 = [1, 12];
|
5452 | var parser = { trace: function trace() {},
|
5453 | yy: {},
|
5454 | symbols_: { "error": 2, "start": 3, "gantt": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NL": 10, "dateFormat": 11, "title": 12, "section": 13, "taskTxt": 14, "taskData": 15, "$accept": 0, "$end": 1 },
|
5455 | terminals_: { 2: "error", 4: "gantt", 6: "EOF", 8: "SPACE", 10: "NL", 11: "dateFormat", 12: "title", 13: "section", 14: "taskTxt", 15: "taskData" },
|
5456 | productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 1], [9, 1], [9, 2]],
|
5457 | performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
|
5458 |
|
5459 |
|
5460 | var $0 = $$.length - 1;
|
5461 | switch (yystate) {
|
5462 | case 1:
|
5463 | return $$[$0 - 1];
|
5464 | break;
|
5465 | case 2:
|
5466 | this.$ = [];
|
5467 | break;
|
5468 | case 3:
|
5469 | $$[$0 - 1].push($$[$0]);this.$ = $$[$0 - 1];
|
5470 | break;
|
5471 | case 4:case 5:
|
5472 | this.$ = $$[$0];
|
5473 | break;
|
5474 | case 6:case 7:
|
5475 | this.$ = [];
|
5476 | break;
|
5477 | case 8:
|
5478 | yy.setDateFormat($$[$0].substr(11));this.$ = $$[$0].substr(11);
|
5479 | break;
|
5480 | case 9:
|
5481 | yy.setTitle($$[$0].substr(6));this.$ = $$[$0].substr(6);
|
5482 | break;
|
5483 | case 10:
|
5484 | yy.addSection($$[$0].substr(8));this.$ = $$[$0].substr(8);
|
5485 | break;
|
5486 | case 11:
|
5487 | yy.addTask($$[$0 - 1], $$[$0]);this.$ = 'task';
|
5488 | break;
|
5489 | }
|
5490 | },
|
5491 | 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 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 13, 11: $V1, 12: $V2, 13: $V3, 14: $V4 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 8]), o($V0, [2, 9]), o($V0, [2, 10]), { 15: [1, 14] }, o($V0, [2, 4]), o($V0, [2, 11])],
|
5492 | defaultActions: {},
|
5493 | parseError: function parseError(str, hash) {
|
5494 | if (hash.recoverable) {
|
5495 | this.trace(str);
|
5496 | } else {
|
5497 | var _parseError = function _parseError(msg, hash) {
|
5498 | this.message = msg;
|
5499 | this.hash = hash;
|
5500 | };
|
5501 |
|
5502 | _parseError.prototype = Error;
|
5503 |
|
5504 | throw new _parseError(str, hash);
|
5505 | }
|
5506 | },
|
5507 | parse: function parse(input) {
|
5508 | var self = this,
|
5509 | stack = [0],
|
5510 | tstack = [],
|
5511 | vstack = [null],
|
5512 | lstack = [],
|
5513 | table = this.table,
|
5514 | yytext = '',
|
5515 | yylineno = 0,
|
5516 | yyleng = 0,
|
5517 | recovering = 0,
|
5518 | TERROR = 2,
|
5519 | EOF = 1;
|
5520 | var args = lstack.slice.call(arguments, 1);
|
5521 | var lexer = Object.create(this.lexer);
|
5522 | var sharedState = { yy: {} };
|
5523 | for (var k in this.yy) {
|
5524 | if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
5525 | sharedState.yy[k] = this.yy[k];
|
5526 | }
|
5527 | }
|
5528 | lexer.setInput(input, sharedState.yy);
|
5529 | sharedState.yy.lexer = lexer;
|
5530 | sharedState.yy.parser = this;
|
5531 | if (typeof lexer.yylloc == 'undefined') {
|
5532 | lexer.yylloc = {};
|
5533 | }
|
5534 | var yyloc = lexer.yylloc;
|
5535 | lstack.push(yyloc);
|
5536 | var ranges = lexer.options && lexer.options.ranges;
|
5537 | if (typeof sharedState.yy.parseError === 'function') {
|
5538 | this.parseError = sharedState.yy.parseError;
|
5539 | } else {
|
5540 | this.parseError = Object.getPrototypeOf(this).parseError;
|
5541 | }
|
5542 | function popStack(n) {
|
5543 | stack.length = stack.length - 2 * n;
|
5544 | vstack.length = vstack.length - n;
|
5545 | lstack.length = lstack.length - n;
|
5546 | }
|
5547 | function lex() {
|
5548 | var token;
|
5549 | token = tstack.pop() || lexer.lex() || EOF;
|
5550 | if (typeof token !== 'number') {
|
5551 | if (token instanceof Array) {
|
5552 | tstack = token;
|
5553 | token = tstack.pop();
|
5554 | }
|
5555 | token = self.symbols_[token] || token;
|
5556 | }
|
5557 | return token;
|
5558 | }
|
5559 | var symbol,
|
5560 | preErrorSymbol,
|
5561 | state,
|
5562 | action,
|
5563 | a,
|
5564 | r,
|
5565 | yyval = {},
|
5566 | p,
|
5567 | len,
|
5568 | newState,
|
5569 | expected;
|
5570 | while (true) {
|
5571 | state = stack[stack.length - 1];
|
5572 | if (this.defaultActions[state]) {
|
5573 | action = this.defaultActions[state];
|
5574 | } else {
|
5575 | if (symbol === null || typeof symbol == 'undefined') {
|
5576 | symbol = lex();
|
5577 | }
|
5578 | action = table[state] && table[state][symbol];
|
5579 | }
|
5580 | if (typeof action === 'undefined' || !action.length || !action[0]) {
|
5581 | var errStr = '';
|
5582 | expected = [];
|
5583 | for (p in table[state]) {
|
5584 | if (this.terminals_[p] && p > TERROR) {
|
5585 | expected.push('\'' + this.terminals_[p] + '\'');
|
5586 | }
|
5587 | }
|
5588 | if (lexer.showPosition) {
|
5589 | errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
|
5590 | } else {
|
5591 | errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
|
5592 | }
|
5593 | this.parseError(errStr, {
|
5594 | text: lexer.match,
|
5595 | token: this.terminals_[symbol] || symbol,
|
5596 | line: lexer.yylineno,
|
5597 | loc: yyloc,
|
5598 | expected: expected
|
5599 | });
|
5600 | }
|
5601 | if (action[0] instanceof Array && action.length > 1) {
|
5602 | throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
|
5603 | }
|
5604 | switch (action[0]) {
|
5605 | case 1:
|
5606 | stack.push(symbol);
|
5607 | vstack.push(lexer.yytext);
|
5608 | lstack.push(lexer.yylloc);
|
5609 | stack.push(action[1]);
|
5610 | symbol = null;
|
5611 | if (!preErrorSymbol) {
|
5612 | yyleng = lexer.yyleng;
|
5613 | yytext = lexer.yytext;
|
5614 | yylineno = lexer.yylineno;
|
5615 | yyloc = lexer.yylloc;
|
5616 | if (recovering > 0) {
|
5617 | recovering--;
|
5618 | }
|
5619 | } else {
|
5620 | symbol = preErrorSymbol;
|
5621 | preErrorSymbol = null;
|
5622 | }
|
5623 | break;
|
5624 | case 2:
|
5625 | len = this.productions_[action[1]][1];
|
5626 | yyval.$ = vstack[vstack.length - len];
|
5627 | yyval._$ = {
|
5628 | first_line: lstack[lstack.length - (len || 1)].first_line,
|
5629 | last_line: lstack[lstack.length - 1].last_line,
|
5630 | first_column: lstack[lstack.length - (len || 1)].first_column,
|
5631 | last_column: lstack[lstack.length - 1].last_column
|
5632 | };
|
5633 | if (ranges) {
|
5634 | yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
|
5635 | }
|
5636 | r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));
|
5637 | if (typeof r !== 'undefined') {
|
5638 | return r;
|
5639 | }
|
5640 | if (len) {
|
5641 | stack = stack.slice(0, -1 * len * 2);
|
5642 | vstack = vstack.slice(0, -1 * len);
|
5643 | lstack = lstack.slice(0, -1 * len);
|
5644 | }
|
5645 | stack.push(this.productions_[action[1]][0]);
|
5646 | vstack.push(yyval.$);
|
5647 | lstack.push(yyval._$);
|
5648 | newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
5649 | stack.push(newState);
|
5650 | break;
|
5651 | case 3:
|
5652 | return true;
|
5653 | }
|
5654 | }
|
5655 | return true;
|
5656 | } };
|
5657 |
|
5658 |
|
5659 | var lexer = function () {
|
5660 | var lexer = {
|
5661 |
|
5662 | EOF: 1,
|
5663 |
|
5664 | parseError: function parseError(str, hash) {
|
5665 | if (this.yy.parser) {
|
5666 | this.yy.parser.parseError(str, hash);
|
5667 | } else {
|
5668 | throw new Error(str);
|
5669 | }
|
5670 | },
|
5671 |
|
5672 |
|
5673 | setInput: function setInput(input, yy) {
|
5674 | this.yy = yy || this.yy || {};
|
5675 | this._input = input;
|
5676 | this._more = this._backtrack = this.done = false;
|
5677 | this.yylineno = this.yyleng = 0;
|
5678 | this.yytext = this.matched = this.match = '';
|
5679 | this.conditionStack = ['INITIAL'];
|
5680 | this.yylloc = {
|
5681 | first_line: 1,
|
5682 | first_column: 0,
|
5683 | last_line: 1,
|
5684 | last_column: 0
|
5685 | };
|
5686 | if (this.options.ranges) {
|
5687 | this.yylloc.range = [0, 0];
|
5688 | }
|
5689 | this.offset = 0;
|
5690 | return this;
|
5691 | },
|
5692 |
|
5693 |
|
5694 | input: function input() {
|
5695 | var ch = this._input[0];
|
5696 | this.yytext += ch;
|
5697 | this.yyleng++;
|
5698 | this.offset++;
|
5699 | this.match += ch;
|
5700 | this.matched += ch;
|
5701 | var lines = ch.match(/(?:\r\n?|\n).*/g);
|
5702 | if (lines) {
|
5703 | this.yylineno++;
|
5704 | this.yylloc.last_line++;
|
5705 | } else {
|
5706 | this.yylloc.last_column++;
|
5707 | }
|
5708 | if (this.options.ranges) {
|
5709 | this.yylloc.range[1]++;
|
5710 | }
|
5711 |
|
5712 | this._input = this._input.slice(1);
|
5713 | return ch;
|
5714 | },
|
5715 |
|
5716 |
|
5717 | unput: function unput(ch) {
|
5718 | var len = ch.length;
|
5719 | var lines = ch.split(/(?:\r\n?|\n)/g);
|
5720 |
|
5721 | this._input = ch + this._input;
|
5722 | this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
5723 |
|
5724 | this.offset -= len;
|
5725 | var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
5726 | this.match = this.match.substr(0, this.match.length - 1);
|
5727 | this.matched = this.matched.substr(0, this.matched.length - 1);
|
5728 |
|
5729 | if (lines.length - 1) {
|
5730 | this.yylineno -= lines.length - 1;
|
5731 | }
|
5732 | var r = this.yylloc.range;
|
5733 |
|
5734 | this.yylloc = {
|
5735 | first_line: this.yylloc.first_line,
|
5736 | last_line: this.yylineno + 1,
|
5737 | first_column: this.yylloc.first_column,
|
5738 | last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
|
5739 | };
|
5740 |
|
5741 | if (this.options.ranges) {
|
5742 | this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
5743 | }
|
5744 | this.yyleng = this.yytext.length;
|
5745 | return this;
|
5746 | },
|
5747 |
|
5748 |
|
5749 | more: function more() {
|
5750 | this._more = true;
|
5751 | return this;
|
5752 | },
|
5753 |
|
5754 |
|
5755 | reject: function reject() {
|
5756 | if (this.options.backtrack_lexer) {
|
5757 | this._backtrack = true;
|
5758 | } else {
|
5759 | 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(), {
|
5760 | text: "",
|
5761 | token: null,
|
5762 | line: this.yylineno
|
5763 | });
|
5764 | }
|
5765 | return this;
|
5766 | },
|
5767 |
|
5768 |
|
5769 | less: function less(n) {
|
5770 | this.unput(this.match.slice(n));
|
5771 | },
|
5772 |
|
5773 |
|
5774 | pastInput: function pastInput() {
|
5775 | var past = this.matched.substr(0, this.matched.length - this.match.length);
|
5776 | return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
|
5777 | },
|
5778 |
|
5779 |
|
5780 | upcomingInput: function upcomingInput() {
|
5781 | var next = this.match;
|
5782 | if (next.length < 20) {
|
5783 | next += this._input.substr(0, 20 - next.length);
|
5784 | }
|
5785 | return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
|
5786 | },
|
5787 |
|
5788 |
|
5789 | showPosition: function showPosition() {
|
5790 | var pre = this.pastInput();
|
5791 | var c = new Array(pre.length + 1).join("-");
|
5792 | return pre + this.upcomingInput() + "\n" + c + "^";
|
5793 | },
|
5794 |
|
5795 |
|
5796 | test_match: function test_match(match, indexed_rule) {
|
5797 | var token, lines, backup;
|
5798 |
|
5799 | if (this.options.backtrack_lexer) {
|
5800 |
|
5801 | backup = {
|
5802 | yylineno: this.yylineno,
|
5803 | yylloc: {
|
5804 | first_line: this.yylloc.first_line,
|
5805 | last_line: this.last_line,
|
5806 | first_column: this.yylloc.first_column,
|
5807 | last_column: this.yylloc.last_column
|
5808 | },
|
5809 | yytext: this.yytext,
|
5810 | match: this.match,
|
5811 | matches: this.matches,
|
5812 | matched: this.matched,
|
5813 | yyleng: this.yyleng,
|
5814 | offset: this.offset,
|
5815 | _more: this._more,
|
5816 | _input: this._input,
|
5817 | yy: this.yy,
|
5818 | conditionStack: this.conditionStack.slice(0),
|
5819 | done: this.done
|
5820 | };
|
5821 | if (this.options.ranges) {
|
5822 | backup.yylloc.range = this.yylloc.range.slice(0);
|
5823 | }
|
5824 | }
|
5825 |
|
5826 | lines = match[0].match(/(?:\r\n?|\n).*/g);
|
5827 | if (lines) {
|
5828 | this.yylineno += lines.length;
|
5829 | }
|
5830 | this.yylloc = {
|
5831 | first_line: this.yylloc.last_line,
|
5832 | last_line: this.yylineno + 1,
|
5833 | first_column: this.yylloc.last_column,
|
5834 | last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
|
5835 | };
|
5836 | this.yytext += match[0];
|
5837 | this.match += match[0];
|
5838 | this.matches = match;
|
5839 | this.yyleng = this.yytext.length;
|
5840 | if (this.options.ranges) {
|
5841 | this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
5842 | }
|
5843 | this._more = false;
|
5844 | this._backtrack = false;
|
5845 | this._input = this._input.slice(match[0].length);
|
5846 | this.matched += match[0];
|
5847 | token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
5848 | if (this.done && this._input) {
|
5849 | this.done = false;
|
5850 | }
|
5851 | if (token) {
|
5852 | return token;
|
5853 | } else if (this._backtrack) {
|
5854 |
|
5855 | for (var k in backup) {
|
5856 | this[k] = backup[k];
|
5857 | }
|
5858 | return false;
|
5859 | }
|
5860 | return false;
|
5861 | },
|
5862 |
|
5863 |
|
5864 | next: function next() {
|
5865 | if (this.done) {
|
5866 | return this.EOF;
|
5867 | }
|
5868 | if (!this._input) {
|
5869 | this.done = true;
|
5870 | }
|
5871 |
|
5872 | var token, match, tempMatch, index;
|
5873 | if (!this._more) {
|
5874 | this.yytext = '';
|
5875 | this.match = '';
|
5876 | }
|
5877 | var rules = this._currentRules();
|
5878 | for (var i = 0; i < rules.length; i++) {
|
5879 | tempMatch = this._input.match(this.rules[rules[i]]);
|
5880 | if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
5881 | match = tempMatch;
|
5882 | index = i;
|
5883 | if (this.options.backtrack_lexer) {
|
5884 | token = this.test_match(tempMatch, rules[i]);
|
5885 | if (token !== false) {
|
5886 | return token;
|
5887 | } else if (this._backtrack) {
|
5888 | match = false;
|
5889 | continue;
|
5890 | } else {
|
5891 |
|
5892 | return false;
|
5893 | }
|
5894 | } else if (!this.options.flex) {
|
5895 | break;
|
5896 | }
|
5897 | }
|
5898 | }
|
5899 | if (match) {
|
5900 | token = this.test_match(match, rules[index]);
|
5901 | if (token !== false) {
|
5902 | return token;
|
5903 | }
|
5904 |
|
5905 | return false;
|
5906 | }
|
5907 | if (this._input === "") {
|
5908 | return this.EOF;
|
5909 | } else {
|
5910 | return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
|
5911 | text: "",
|
5912 | token: null,
|
5913 | line: this.yylineno
|
5914 | });
|
5915 | }
|
5916 | },
|
5917 |
|
5918 |
|
5919 | lex: function lex() {
|
5920 | var r = this.next();
|
5921 | if (r) {
|
5922 | return r;
|
5923 | } else {
|
5924 | return this.lex();
|
5925 | }
|
5926 | },
|
5927 |
|
5928 |
|
5929 | begin: function begin(condition) {
|
5930 | this.conditionStack.push(condition);
|
5931 | },
|
5932 |
|
5933 |
|
5934 | popState: function popState() {
|
5935 | var n = this.conditionStack.length - 1;
|
5936 | if (n > 0) {
|
5937 | return this.conditionStack.pop();
|
5938 | } else {
|
5939 | return this.conditionStack[0];
|
5940 | }
|
5941 | },
|
5942 |
|
5943 |
|
5944 | _currentRules: function _currentRules() {
|
5945 | if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
5946 | return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
5947 | } else {
|
5948 | return this.conditions["INITIAL"].rules;
|
5949 | }
|
5950 | },
|
5951 |
|
5952 |
|
5953 | topState: function topState(n) {
|
5954 | n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
5955 | if (n >= 0) {
|
5956 | return this.conditionStack[n];
|
5957 | } else {
|
5958 | return "INITIAL";
|
5959 | }
|
5960 | },
|
5961 |
|
5962 |
|
5963 | pushState: function pushState(condition) {
|
5964 | this.begin(condition);
|
5965 | },
|
5966 |
|
5967 |
|
5968 | stateStackSize: function stateStackSize() {
|
5969 | return this.conditionStack.length;
|
5970 | },
|
5971 | options: { "case-insensitive": true },
|
5972 | performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
5973 |
|
5974 |
|
5975 | var YYSTATE = YY_START;
|
5976 | switch ($avoiding_name_collisions) {
|
5977 | case 0:
|
5978 | return 10;
|
5979 | break;
|
5980 | case 1:
|
5981 |
|
5982 | break;
|
5983 | case 2:
|
5984 |
|
5985 | break;
|
5986 | case 3:
|
5987 |
|
5988 | break;
|
5989 | case 4:
|
5990 | return 4;
|
5991 | break;
|
5992 | case 5:
|
5993 | return 11;
|
5994 | break;
|
5995 | case 6:
|
5996 | return 'date';
|
5997 | break;
|
5998 | case 7:
|
5999 | return 12;
|
6000 | break;
|
6001 | case 8:
|
6002 | return 13;
|
6003 | break;
|
6004 | case 9:
|
6005 | return 14;
|
6006 | break;
|
6007 | case 10:
|
6008 | return 15;
|
6009 | break;
|
6010 | case 11:
|
6011 | return ':';
|
6012 | break;
|
6013 | case 12:
|
6014 | return 6;
|
6015 | break;
|
6016 | case 13:
|
6017 | return 'INVALID';
|
6018 | break;
|
6019 | }
|
6020 | },
|
6021 | rules: [/^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:gantt\b)/i, /^(?:dateFormat\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],
|
6022 | conditions: { "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], "inclusive": true } }
|
6023 | };
|
6024 | return lexer;
|
6025 | }();
|
6026 | parser.lexer = lexer;
|
6027 | function Parser() {
|
6028 | this.yy = {};
|
6029 | }
|
6030 | Parser.prototype = parser;parser.Parser = Parser;
|
6031 | return new Parser();
|
6032 | }();
|
6033 |
|
6034 | if (true) {
|
6035 | exports.parser = parser;
|
6036 | exports.Parser = parser.Parser;
|
6037 | exports.parse = function () {
|
6038 | return parser.parse.apply(parser, arguments);
|
6039 | };
|
6040 | exports.main = function commonjsMain(args) {
|
6041 | if (!args[1]) {
|
6042 | console.log('Usage: ' + args[0] + ' FILE');
|
6043 | process.exit(1);
|
6044 | }
|
6045 | var source = __webpack_require__(4).readFileSync(__webpack_require__(5).normalize(args[1]), "utf8");
|
6046 | return exports.parser.parse(source);
|
6047 | };
|
6048 | if (typeof module !== 'undefined' && __webpack_require__.c[__webpack_require__.s] === module) {
|
6049 | exports.main(process.argv.slice(1));
|
6050 | }
|
6051 | }
|
6052 | }.call(exports, __webpack_require__(2), __webpack_require__(3)(module)))
|
6053 |
|
6054 | }),
|
6055 |
|
6056 | (function(module, exports, __webpack_require__) {
|
6057 |
|
6058 | "use strict";
|
6059 |
|
6060 |
|
6061 | Object.defineProperty(exports, "__esModule", {
|
6062 | value: true
|
6063 | });
|
6064 | exports.addTaskOrg = exports.findTaskById = exports.addTask = exports.getTasks = exports.addSection = exports.getTitle = exports.setTitle = exports.getDateFormat = exports.setDateFormat = exports.clear = undefined;
|
6065 |
|
6066 | var _moment = __webpack_require__(7);
|
6067 |
|
6068 | var _moment2 = _interopRequireDefault(_moment);
|
6069 |
|
6070 | var _logger = __webpack_require__(0);
|
6071 |
|
6072 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
6073 |
|
6074 | var dateFormat = '';
|
6075 | var title = '';
|
6076 | var sections = [];
|
6077 | var tasks = [];
|
6078 | var currentSection = '';
|
6079 |
|
6080 | var clear = exports.clear = function clear() {
|
6081 | sections = [];
|
6082 | tasks = [];
|
6083 | currentSection = '';
|
6084 | title = '';
|
6085 | taskCnt = 0;
|
6086 | lastTask = undefined;
|
6087 | lastTaskID = undefined;
|
6088 | rawTasks = [];
|
6089 | };
|
6090 |
|
6091 | var setDateFormat = exports.setDateFormat = function setDateFormat(txt) {
|
6092 | dateFormat = txt;
|
6093 | };
|
6094 |
|
6095 | var getDateFormat = exports.getDateFormat = function getDateFormat() {
|
6096 | return dateFormat;
|
6097 | };
|
6098 | var setTitle = exports.setTitle = function setTitle(txt) {
|
6099 | title = txt;
|
6100 | };
|
6101 |
|
6102 | var getTitle = exports.getTitle = function getTitle() {
|
6103 | return title;
|
6104 | };
|
6105 |
|
6106 | var addSection = exports.addSection = function addSection(txt) {
|
6107 | currentSection = txt;
|
6108 | sections.push(txt);
|
6109 | };
|
6110 |
|
6111 | var getTasks = exports.getTasks = function getTasks() {
|
6112 | var allItemsPricessed = compileTasks();
|
6113 | var maxDepth = 10;
|
6114 | var iterationCount = 0;
|
6115 | while (!allItemsPricessed && iterationCount < maxDepth) {
|
6116 | allItemsPricessed = compileTasks();
|
6117 | iterationCount++;
|
6118 | }
|
6119 |
|
6120 | tasks = rawTasks;
|
6121 |
|
6122 | return tasks;
|
6123 | };
|
6124 |
|
6125 | var getStartDate = function getStartDate(prevTime, dateFormat, str) {
|
6126 | str = str.trim();
|
6127 |
|
6128 |
|
6129 | var re = /^after\s+([\d\w-]+)/;
|
6130 | var afterStatement = re.exec(str.trim());
|
6131 |
|
6132 | if (afterStatement !== null) {
|
6133 | var task = findTaskById(afterStatement[1]);
|
6134 |
|
6135 | if (typeof task === 'undefined') {
|
6136 | var dt = new Date();
|
6137 | dt.setHours(0, 0, 0, 0);
|
6138 | return dt;
|
6139 | }
|
6140 | return task.endTime;
|
6141 | }
|
6142 |
|
6143 |
|
6144 | if ((0, _moment2.default)(str, dateFormat.trim(), true).isValid()) {
|
6145 | return (0, _moment2.default)(str, dateFormat.trim(), true).toDate();
|
6146 | } else {
|
6147 | _logger.logger.debug('Invalid date:' + str);
|
6148 | _logger.logger.debug('With date format:' + dateFormat.trim());
|
6149 | }
|
6150 |
|
6151 |
|
6152 | return new Date();
|
6153 | };
|
6154 |
|
6155 | var getEndDate = function getEndDate(prevTime, dateFormat, str) {
|
6156 | str = str.trim();
|
6157 |
|
6158 |
|
6159 | if ((0, _moment2.default)(str, dateFormat.trim(), true).isValid()) {
|
6160 | return (0, _moment2.default)(str, dateFormat.trim()).toDate();
|
6161 | }
|
6162 |
|
6163 | var d = (0, _moment2.default)(prevTime);
|
6164 |
|
6165 | var re = /^([\d]+)([wdhms])/;
|
6166 | var durationStatement = re.exec(str.trim());
|
6167 |
|
6168 | if (durationStatement !== null) {
|
6169 | switch (durationStatement[2]) {
|
6170 | case 's':
|
6171 | d.add(durationStatement[1], 'seconds');
|
6172 | break;
|
6173 | case 'm':
|
6174 | d.add(durationStatement[1], 'minutes');
|
6175 | break;
|
6176 | case 'h':
|
6177 | d.add(durationStatement[1], 'hours');
|
6178 | break;
|
6179 | case 'd':
|
6180 | d.add(durationStatement[1], 'days');
|
6181 | break;
|
6182 | case 'w':
|
6183 | d.add(durationStatement[1], 'weeks');
|
6184 | break;
|
6185 | }
|
6186 | return d.toDate();
|
6187 | }
|
6188 |
|
6189 | return d.toDate();
|
6190 | };
|
6191 |
|
6192 | var taskCnt = 0;
|
6193 | var parseId = function parseId(idStr) {
|
6194 | if (typeof idStr === 'undefined') {
|
6195 | taskCnt = taskCnt + 1;
|
6196 | return 'task' + taskCnt;
|
6197 | }
|
6198 | return idStr;
|
6199 | };
|
6200 |
|
6201 |
|
6202 |
|
6203 |
|
6204 |
|
6205 |
|
6206 |
|
6207 |
|
6208 |
|
6209 |
|
6210 |
|
6211 | var compileData = function compileData(prevTask, dataStr) {
|
6212 | var ds;
|
6213 |
|
6214 | if (dataStr.substr(0, 1) === ':') {
|
6215 | ds = dataStr.substr(1, dataStr.length);
|
6216 | } else {
|
6217 | ds = dataStr;
|
6218 | }
|
6219 |
|
6220 | var data = ds.split(',');
|
6221 |
|
6222 | var task = {};
|
6223 | var df = getDateFormat();
|
6224 |
|
6225 |
|
6226 | var matchFound = true;
|
6227 | while (matchFound) {
|
6228 | matchFound = false;
|
6229 | if (data[0].match(/^\s*active\s*$/)) {
|
6230 | task.active = true;
|
6231 | data.shift(1);
|
6232 | matchFound = true;
|
6233 | }
|
6234 | if (data[0].match(/^\s*done\s*$/)) {
|
6235 | task.done = true;
|
6236 | data.shift(1);
|
6237 | matchFound = true;
|
6238 | }
|
6239 | if (data[0].match(/^\s*crit\s*$/)) {
|
6240 | task.crit = true;
|
6241 | data.shift(1);
|
6242 | matchFound = true;
|
6243 | }
|
6244 | }
|
6245 | var i;
|
6246 | for (i = 0; i < data.length; i++) {
|
6247 | data[i] = data[i].trim();
|
6248 | }
|
6249 |
|
6250 | switch (data.length) {
|
6251 | case 1:
|
6252 | task.id = parseId();
|
6253 | task.startTime = prevTask.endTime;
|
6254 | task.endTime = getEndDate(task.startTime, df, data[0]);
|
6255 | break;
|
6256 | case 2:
|
6257 | task.id = parseId();
|
6258 | task.startTime = getStartDate(undefined, df, data[0]);
|
6259 | task.endTime = getEndDate(task.startTime, df, data[1]);
|
6260 | break;
|
6261 | case 3:
|
6262 | task.id = parseId(data[0]);
|
6263 | task.startTime = getStartDate(undefined, df, data[1]);
|
6264 | task.endTime = getEndDate(task.startTime, df, data[2]);
|
6265 | break;
|
6266 | default:
|
6267 | }
|
6268 |
|
6269 | return task;
|
6270 | };
|
6271 |
|
6272 | var parseData = function parseData(prevTaskId, dataStr) {
|
6273 | var ds;
|
6274 |
|
6275 | if (dataStr.substr(0, 1) === ':') {
|
6276 | ds = dataStr.substr(1, dataStr.length);
|
6277 | } else {
|
6278 | ds = dataStr;
|
6279 | }
|
6280 |
|
6281 | var data = ds.split(',');
|
6282 |
|
6283 | var task = {};
|
6284 |
|
6285 |
|
6286 | var matchFound = true;
|
6287 | while (matchFound) {
|
6288 | matchFound = false;
|
6289 | if (data[0].match(/^\s*active\s*$/)) {
|
6290 | task.active = true;
|
6291 | data.shift(1);
|
6292 | matchFound = true;
|
6293 | }
|
6294 | if (data[0].match(/^\s*done\s*$/)) {
|
6295 | task.done = true;
|
6296 | data.shift(1);
|
6297 | matchFound = true;
|
6298 | }
|
6299 | if (data[0].match(/^\s*crit\s*$/)) {
|
6300 | task.crit = true;
|
6301 | data.shift(1);
|
6302 | matchFound = true;
|
6303 | }
|
6304 | }
|
6305 | var i;
|
6306 | for (i = 0; i < data.length; i++) {
|
6307 | data[i] = data[i].trim();
|
6308 | }
|
6309 |
|
6310 | switch (data.length) {
|
6311 | case 1:
|
6312 | task.id = parseId();
|
6313 | task.startTime = { type: 'prevTaskEnd', id: prevTaskId };
|
6314 | task.endTime = { data: data[0] };
|
6315 | break;
|
6316 | case 2:
|
6317 | task.id = parseId();
|
6318 | task.startTime = { type: 'getStartDate', startData: data[0] };
|
6319 | task.endTime = { data: data[1] };
|
6320 | break;
|
6321 | case 3:
|
6322 | task.id = parseId(data[0]);
|
6323 | task.startTime = { type: 'getStartDate', startData: data[1] };
|
6324 | task.endTime = { data: data[2] };
|
6325 | break;
|
6326 | default:
|
6327 | }
|
6328 |
|
6329 | return task;
|
6330 | };
|
6331 |
|
6332 | var lastTask;
|
6333 | var lastTaskID;
|
6334 | var rawTasks = [];
|
6335 | var taskDb = {};
|
6336 | var addTask = exports.addTask = function addTask(descr, data) {
|
6337 | var rawTask = {
|
6338 | section: currentSection,
|
6339 | type: currentSection,
|
6340 | processed: false,
|
6341 | raw: { data: data },
|
6342 | task: descr
|
6343 | };
|
6344 | var taskInfo = parseData(lastTaskID, data);
|
6345 | rawTask.raw.startTime = taskInfo.startTime;
|
6346 | rawTask.raw.endTime = taskInfo.endTime;
|
6347 | rawTask.id = taskInfo.id;
|
6348 | rawTask.prevTaskId = lastTaskID;
|
6349 | rawTask.active = taskInfo.active;
|
6350 | rawTask.done = taskInfo.done;
|
6351 | rawTask.crit = taskInfo.crit;
|
6352 |
|
6353 | var pos = rawTasks.push(rawTask);
|
6354 |
|
6355 | lastTaskID = rawTask.id;
|
6356 |
|
6357 | taskDb[rawTask.id] = pos - 1;
|
6358 | };
|
6359 |
|
6360 | var findTaskById = exports.findTaskById = function findTaskById(id) {
|
6361 | var pos = taskDb[id];
|
6362 | return rawTasks[pos];
|
6363 | };
|
6364 |
|
6365 | var addTaskOrg = exports.addTaskOrg = function addTaskOrg(descr, data) {
|
6366 | var newTask = {
|
6367 | section: currentSection,
|
6368 | type: currentSection,
|
6369 | description: descr,
|
6370 | task: descr
|
6371 | };
|
6372 | var taskInfo = compileData(lastTask, data);
|
6373 | newTask.startTime = taskInfo.startTime;
|
6374 | newTask.endTime = taskInfo.endTime;
|
6375 | newTask.id = taskInfo.id;
|
6376 | newTask.active = taskInfo.active;
|
6377 | newTask.done = taskInfo.done;
|
6378 | newTask.crit = taskInfo.crit;
|
6379 | lastTask = newTask;
|
6380 | tasks.push(newTask);
|
6381 | };
|
6382 |
|
6383 | var compileTasks = function compileTasks() {
|
6384 | var df = getDateFormat();
|
6385 |
|
6386 | var compileTask = function compileTask(pos) {
|
6387 | var task = rawTasks[pos];
|
6388 | var startTime = '';
|
6389 | switch (rawTasks[pos].raw.startTime.type) {
|
6390 | case 'prevTaskEnd':
|
6391 | var prevTask = findTaskById(task.prevTaskId);
|
6392 | task.startTime = prevTask.endTime;
|
6393 | break;
|
6394 | case 'getStartDate':
|
6395 | startTime = getStartDate(undefined, df, rawTasks[pos].raw.startTime.startData);
|
6396 | if (startTime) {
|
6397 | rawTasks[pos].startTime = startTime;
|
6398 | }
|
6399 | break;
|
6400 | }
|
6401 |
|
6402 | if (rawTasks[pos].startTime) {
|
6403 | rawTasks[pos].endTime = getEndDate(rawTasks[pos].startTime, df, rawTasks[pos].raw.endTime.data);
|
6404 | if (rawTasks[pos].endTime) {
|
6405 | rawTasks[pos].processed = true;
|
6406 | }
|
6407 | }
|
6408 |
|
6409 | return rawTasks[pos].processed;
|
6410 | };
|
6411 |
|
6412 | var i;
|
6413 | var allProcessed = true;
|
6414 | for (i = 0; i < rawTasks.length; i++) {
|
6415 | compileTask(i);
|
6416 |
|
6417 | allProcessed = allProcessed && rawTasks[i].processed;
|
6418 | }
|
6419 | return allProcessed;
|
6420 | };
|
6421 |
|
6422 | exports.default = {
|
6423 | clear: clear,
|
6424 | setDateFormat: setDateFormat,
|
6425 | getDateFormat: getDateFormat,
|
6426 | setTitle: setTitle,
|
6427 | getTitle: getTitle,
|
6428 | addSection: addSection,
|
6429 | getTasks: getTasks,
|
6430 | addTask: addTask,
|
6431 | findTaskById: findTaskById,
|
6432 | addTaskOrg: addTaskOrg
|
6433 | };
|
6434 |
|
6435 | }),
|
6436 |
|
6437 | (function(module, exports, __webpack_require__) {
|
6438 |
|
6439 | "use strict";
|
6440 | (function(process, module) {
|
6441 |
|
6442 |
|
6443 |
|
6444 |
|
6445 |
|
6446 |
|
6447 |
|
6448 |
|
6449 |
|
6450 |
|
6451 |
|
6452 |
|
6453 |
|
6454 |
|
6455 |
|
6456 |
|
6457 |
|
6458 |
|
6459 |
|
6460 |
|
6461 |
|
6462 |
|
6463 |
|
6464 |
|
6465 |
|
6466 |
|
6467 |
|
6468 |
|
6469 |
|
6470 |
|
6471 |
|
6472 |
|
6473 |
|
6474 |
|
6475 |
|
6476 |
|
6477 |
|
6478 |
|
6479 |
|
6480 |
|
6481 |
|
6482 |
|
6483 |
|
6484 |
|
6485 |
|
6486 |
|
6487 |
|
6488 |
|
6489 |
|
6490 |
|
6491 |
|
6492 |
|
6493 |
|
6494 |
|
6495 |
|
6496 |
|
6497 |
|
6498 |
|
6499 |
|
6500 |
|
6501 |
|
6502 |
|
6503 |
|
6504 |
|
6505 |
|
6506 |
|
6507 |
|
6508 |
|
6509 |
|
6510 |
|
6511 |
|
6512 |
|
6513 |
|
6514 |
|
6515 | var parser = function () {
|
6516 | var o = function o(k, v, _o, l) {
|
6517 | for (_o = _o || {}, l = k.length; l--; _o[k[l]] = v) {}return _o;
|
6518 | },
|
6519 | $V0 = [1, 11],
|
6520 | $V1 = [1, 12],
|
6521 | $V2 = [1, 13],
|
6522 | $V3 = [1, 15],
|
6523 | $V4 = [1, 16],
|
6524 | $V5 = [1, 17],
|
6525 | $V6 = [6, 8],
|
6526 | $V7 = [1, 26],
|
6527 | $V8 = [1, 27],
|
6528 | $V9 = [1, 28],
|
6529 | $Va = [1, 29],
|
6530 | $Vb = [1, 30],
|
6531 | $Vc = [1, 31],
|
6532 | $Vd = [6, 8, 13, 17, 23, 26, 27, 28, 29, 30, 31],
|
6533 | $Ve = [6, 8, 13, 17, 23, 26, 27, 28, 29, 30, 31, 45, 46, 47],
|
6534 | $Vf = [23, 45, 46, 47],
|
6535 | $Vg = [23, 30, 31, 45, 46, 47],
|
6536 | $Vh = [23, 26, 27, 28, 29, 45, 46, 47],
|
6537 | $Vi = [6, 8, 13],
|
6538 | $Vj = [1, 46];
|
6539 | var parser = { trace: function trace() {},
|
6540 | yy: {},
|
6541 | 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 },
|
6542 | 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" },
|
6543 | productions_: [0, [3, 1], [4, 4], [7, 1], [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]],
|
6544 | performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
|
6545 |
|
6546 |
|
6547 | var $0 = $$.length - 1;
|
6548 | switch (yystate) {
|
6549 | case 5:
|
6550 | this.$ = $$[$0 - 1] + $$[$0];
|
6551 | break;
|
6552 | case 6:
|
6553 | this.$ = $$[$0];
|
6554 | break;
|
6555 | case 7:
|
6556 | yy.addRelation($$[$0]);
|
6557 | break;
|
6558 | case 8:
|
6559 | $$[$0 - 1].title = yy.cleanupLabel($$[$0]);yy.addRelation($$[$0 - 1]);
|
6560 | break;
|
6561 | case 12:
|
6562 | yy.addMembers($$[$0 - 3], $$[$0 - 1]);
|
6563 | break;
|
6564 | case 13:
|
6565 | this.$ = [$$[$0]];
|
6566 | break;
|
6567 | case 14:
|
6568 | $$[$0].push($$[$0 - 1]);this.$ = $$[$0];
|
6569 | break;
|
6570 | case 15:
|
6571 |
|
6572 | break;
|
6573 | case 16:
|
6574 | yy.addMembers($$[$0 - 1], yy.cleanupLabel($$[$0]));
|
6575 | break;
|
6576 | case 17:
|
6577 | console.warn('Member', $$[$0]);
|
6578 | break;
|
6579 | case 18:
|
6580 |
|
6581 | break;
|
6582 | case 19:
|
6583 | this.$ = { 'id1': $$[$0 - 2], 'id2': $$[$0], relation: $$[$0 - 1], relationTitle1: 'none', relationTitle2: 'none' };
|
6584 | break;
|
6585 | case 20:
|
6586 | this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 1], relationTitle1: $$[$0 - 2], relationTitle2: 'none' };
|
6587 | break;
|
6588 | case 21:
|
6589 | this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: 'none', relationTitle2: $$[$0 - 1] };
|
6590 | break;
|
6591 | case 22:
|
6592 | this.$ = { id1: $$[$0 - 4], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: $$[$0 - 3], relationTitle2: $$[$0 - 1] };
|
6593 | break;
|
6594 | case 23:
|
6595 | this.$ = { type1: $$[$0 - 2], type2: $$[$0], lineType: $$[$0 - 1] };
|
6596 | break;
|
6597 | case 24:
|
6598 | this.$ = { type1: 'none', type2: $$[$0], lineType: $$[$0 - 1] };
|
6599 | break;
|
6600 | case 25:
|
6601 | this.$ = { type1: $$[$0 - 1], type2: 'none', lineType: $$[$0] };
|
6602 | break;
|
6603 | case 26:
|
6604 | this.$ = { type1: 'none', type2: 'none', lineType: $$[$0] };
|
6605 | break;
|
6606 | case 27:
|
6607 | this.$ = yy.relationType.AGGREGATION;
|
6608 | break;
|
6609 | case 28:
|
6610 | this.$ = yy.relationType.EXTENSION;
|
6611 | break;
|
6612 | case 29:
|
6613 | this.$ = yy.relationType.COMPOSITION;
|
6614 | break;
|
6615 | case 30:
|
6616 | this.$ = yy.relationType.DEPENDENCY;
|
6617 | break;
|
6618 | case 31:
|
6619 | this.$ = yy.lineType.LINE;
|
6620 | break;
|
6621 | case 32:
|
6622 | this.$ = yy.lineType.DOTTED_LINE;
|
6623 | break;
|
6624 | }
|
6625 | },
|
6626 | 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, 7], { 13: [1, 20] }), o($V6, [2, 9]), o($V6, [2, 10]), o($V6, [2, 15], { 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, 17]), o($V6, [2, 18]), o($Vd, [2, 6], { 11: 14, 10: 33, 45: $V3, 46: $V4, 47: $V5 }), o($Ve, [2, 46]), o($Ve, [2, 47]), o($Ve, [2, 48]), { 1: [2, 2] }, { 7: 34, 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, 8]), { 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, 16]), { 25: 38, 30: $Vb, 31: $Vc }, o($Vf, [2, 26], { 24: 39, 26: $V7, 27: $V8, 28: $V9, 29: $Va }), o($Vg, [2, 27]), o($Vg, [2, 28]), o($Vg, [2, 29]), o($Vg, [2, 30]), o($Vh, [2, 31]), o($Vh, [2, 32]), o($V6, [2, 11], { 17: [1, 40] }), o($Vd, [2, 5]), { 8: [2, 4] }, o($Vi, [2, 19]), { 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, 25], { 24: 44, 26: $V7, 27: $V8, 28: $V9, 29: $Va }), o($Vf, [2, 24]), { 18: 45, 20: $Vj }, o($Vi, [2, 21]), o($Vi, [2, 20]), { 10: 47, 11: 14, 45: $V3, 46: $V4, 47: $V5 }, o($Vf, [2, 23]), { 19: [1, 48] }, { 18: 49, 19: [2, 13], 20: $Vj }, o($Vi, [2, 22]), o($V6, [2, 12]), { 19: [2, 14] }],
|
6627 | defaultActions: { 2: [2, 1], 18: [2, 2], 34: [2, 4], 49: [2, 14] },
|
6628 | parseError: function parseError(str, hash) {
|
6629 | if (hash.recoverable) {
|
6630 | this.trace(str);
|
6631 | } else {
|
6632 | var _parseError = function _parseError(msg, hash) {
|
6633 | this.message = msg;
|
6634 | this.hash = hash;
|
6635 | };
|
6636 |
|
6637 | _parseError.prototype = Error;
|
6638 |
|
6639 | throw new _parseError(str, hash);
|
6640 | }
|
6641 | },
|
6642 | parse: function parse(input) {
|
6643 | var self = this,
|
6644 | stack = [0],
|
6645 | tstack = [],
|
6646 | vstack = [null],
|
6647 | lstack = [],
|
6648 | table = this.table,
|
6649 | yytext = '',
|
6650 | yylineno = 0,
|
6651 | yyleng = 0,
|
6652 | recovering = 0,
|
6653 | TERROR = 2,
|
6654 | EOF = 1;
|
6655 | var args = lstack.slice.call(arguments, 1);
|
6656 | var lexer = Object.create(this.lexer);
|
6657 | var sharedState = { yy: {} };
|
6658 | for (var k in this.yy) {
|
6659 | if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
6660 | sharedState.yy[k] = this.yy[k];
|
6661 | }
|
6662 | }
|
6663 | lexer.setInput(input, sharedState.yy);
|
6664 | sharedState.yy.lexer = lexer;
|
6665 | sharedState.yy.parser = this;
|
6666 | if (typeof lexer.yylloc == 'undefined') {
|
6667 | lexer.yylloc = {};
|
6668 | }
|
6669 | var yyloc = lexer.yylloc;
|
6670 | lstack.push(yyloc);
|
6671 | var ranges = lexer.options && lexer.options.ranges;
|
6672 | if (typeof sharedState.yy.parseError === 'function') {
|
6673 | this.parseError = sharedState.yy.parseError;
|
6674 | } else {
|
6675 | this.parseError = Object.getPrototypeOf(this).parseError;
|
6676 | }
|
6677 | function popStack(n) {
|
6678 | stack.length = stack.length - 2 * n;
|
6679 | vstack.length = vstack.length - n;
|
6680 | lstack.length = lstack.length - n;
|
6681 | }
|
6682 | function lex() {
|
6683 | var token;
|
6684 | token = tstack.pop() || lexer.lex() || EOF;
|
6685 | if (typeof token !== 'number') {
|
6686 | if (token instanceof Array) {
|
6687 | tstack = token;
|
6688 | token = tstack.pop();
|
6689 | }
|
6690 | token = self.symbols_[token] || token;
|
6691 | }
|
6692 | return token;
|
6693 | }
|
6694 | var symbol,
|
6695 | preErrorSymbol,
|
6696 | state,
|
6697 | action,
|
6698 | a,
|
6699 | r,
|
6700 | yyval = {},
|
6701 | p,
|
6702 | len,
|
6703 | newState,
|
6704 | expected;
|
6705 | while (true) {
|
6706 | state = stack[stack.length - 1];
|
6707 | if (this.defaultActions[state]) {
|
6708 | action = this.defaultActions[state];
|
6709 | } else {
|
6710 | if (symbol === null || typeof symbol == 'undefined') {
|
6711 | symbol = lex();
|
6712 | }
|
6713 | action = table[state] && table[state][symbol];
|
6714 | }
|
6715 | if (typeof action === 'undefined' || !action.length || !action[0]) {
|
6716 | var errStr = '';
|
6717 | expected = [];
|
6718 | for (p in table[state]) {
|
6719 | if (this.terminals_[p] && p > TERROR) {
|
6720 | expected.push('\'' + this.terminals_[p] + '\'');
|
6721 | }
|
6722 | }
|
6723 | if (lexer.showPosition) {
|
6724 | errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
|
6725 | } else {
|
6726 | errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
|
6727 | }
|
6728 | this.parseError(errStr, {
|
6729 | text: lexer.match,
|
6730 | token: this.terminals_[symbol] || symbol,
|
6731 | line: lexer.yylineno,
|
6732 | loc: yyloc,
|
6733 | expected: expected
|
6734 | });
|
6735 | }
|
6736 | if (action[0] instanceof Array && action.length > 1) {
|
6737 | throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
|
6738 | }
|
6739 | switch (action[0]) {
|
6740 | case 1:
|
6741 | stack.push(symbol);
|
6742 | vstack.push(lexer.yytext);
|
6743 | lstack.push(lexer.yylloc);
|
6744 | stack.push(action[1]);
|
6745 | symbol = null;
|
6746 | if (!preErrorSymbol) {
|
6747 | yyleng = lexer.yyleng;
|
6748 | yytext = lexer.yytext;
|
6749 | yylineno = lexer.yylineno;
|
6750 | yyloc = lexer.yylloc;
|
6751 | if (recovering > 0) {
|
6752 | recovering--;
|
6753 | }
|
6754 | } else {
|
6755 | symbol = preErrorSymbol;
|
6756 | preErrorSymbol = null;
|
6757 | }
|
6758 | break;
|
6759 | case 2:
|
6760 | len = this.productions_[action[1]][1];
|
6761 | yyval.$ = vstack[vstack.length - len];
|
6762 | yyval._$ = {
|
6763 | first_line: lstack[lstack.length - (len || 1)].first_line,
|
6764 | last_line: lstack[lstack.length - 1].last_line,
|
6765 | first_column: lstack[lstack.length - (len || 1)].first_column,
|
6766 | last_column: lstack[lstack.length - 1].last_column
|
6767 | };
|
6768 | if (ranges) {
|
6769 | yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
|
6770 | }
|
6771 | r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));
|
6772 | if (typeof r !== 'undefined') {
|
6773 | return r;
|
6774 | }
|
6775 | if (len) {
|
6776 | stack = stack.slice(0, -1 * len * 2);
|
6777 | vstack = vstack.slice(0, -1 * len);
|
6778 | lstack = lstack.slice(0, -1 * len);
|
6779 | }
|
6780 | stack.push(this.productions_[action[1]][0]);
|
6781 | vstack.push(yyval.$);
|
6782 | lstack.push(yyval._$);
|
6783 | newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
6784 | stack.push(newState);
|
6785 | break;
|
6786 | case 3:
|
6787 | return true;
|
6788 | }
|
6789 | }
|
6790 | return true;
|
6791 | } };
|
6792 |
|
6793 |
|
6794 | var lexer = function () {
|
6795 | var lexer = {
|
6796 |
|
6797 | EOF: 1,
|
6798 |
|
6799 | parseError: function parseError(str, hash) {
|
6800 | if (this.yy.parser) {
|
6801 | this.yy.parser.parseError(str, hash);
|
6802 | } else {
|
6803 | throw new Error(str);
|
6804 | }
|
6805 | },
|
6806 |
|
6807 |
|
6808 | setInput: function setInput(input, yy) {
|
6809 | this.yy = yy || this.yy || {};
|
6810 | this._input = input;
|
6811 | this._more = this._backtrack = this.done = false;
|
6812 | this.yylineno = this.yyleng = 0;
|
6813 | this.yytext = this.matched = this.match = '';
|
6814 | this.conditionStack = ['INITIAL'];
|
6815 | this.yylloc = {
|
6816 | first_line: 1,
|
6817 | first_column: 0,
|
6818 | last_line: 1,
|
6819 | last_column: 0
|
6820 | };
|
6821 | if (this.options.ranges) {
|
6822 | this.yylloc.range = [0, 0];
|
6823 | }
|
6824 | this.offset = 0;
|
6825 | return this;
|
6826 | },
|
6827 |
|
6828 |
|
6829 | input: function input() {
|
6830 | var ch = this._input[0];
|
6831 | this.yytext += ch;
|
6832 | this.yyleng++;
|
6833 | this.offset++;
|
6834 | this.match += ch;
|
6835 | this.matched += ch;
|
6836 | var lines = ch.match(/(?:\r\n?|\n).*/g);
|
6837 | if (lines) {
|
6838 | this.yylineno++;
|
6839 | this.yylloc.last_line++;
|
6840 | } else {
|
6841 | this.yylloc.last_column++;
|
6842 | }
|
6843 | if (this.options.ranges) {
|
6844 | this.yylloc.range[1]++;
|
6845 | }
|
6846 |
|
6847 | this._input = this._input.slice(1);
|
6848 | return ch;
|
6849 | },
|
6850 |
|
6851 |
|
6852 | unput: function unput(ch) {
|
6853 | var len = ch.length;
|
6854 | var lines = ch.split(/(?:\r\n?|\n)/g);
|
6855 |
|
6856 | this._input = ch + this._input;
|
6857 | this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
6858 |
|
6859 | this.offset -= len;
|
6860 | var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
6861 | this.match = this.match.substr(0, this.match.length - 1);
|
6862 | this.matched = this.matched.substr(0, this.matched.length - 1);
|
6863 |
|
6864 | if (lines.length - 1) {
|
6865 | this.yylineno -= lines.length - 1;
|
6866 | }
|
6867 | var r = this.yylloc.range;
|
6868 |
|
6869 | this.yylloc = {
|
6870 | first_line: this.yylloc.first_line,
|
6871 | last_line: this.yylineno + 1,
|
6872 | first_column: this.yylloc.first_column,
|
6873 | last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
|
6874 | };
|
6875 |
|
6876 | if (this.options.ranges) {
|
6877 | this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
6878 | }
|
6879 | this.yyleng = this.yytext.length;
|
6880 | return this;
|
6881 | },
|
6882 |
|
6883 |
|
6884 | more: function more() {
|
6885 | this._more = true;
|
6886 | return this;
|
6887 | },
|
6888 |
|
6889 |
|
6890 | reject: function reject() {
|
6891 | if (this.options.backtrack_lexer) {
|
6892 | this._backtrack = true;
|
6893 | } else {
|
6894 | 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(), {
|
6895 | text: "",
|
6896 | token: null,
|
6897 | line: this.yylineno
|
6898 | });
|
6899 | }
|
6900 | return this;
|
6901 | },
|
6902 |
|
6903 |
|
6904 | less: function less(n) {
|
6905 | this.unput(this.match.slice(n));
|
6906 | },
|
6907 |
|
6908 |
|
6909 | pastInput: function pastInput() {
|
6910 | var past = this.matched.substr(0, this.matched.length - this.match.length);
|
6911 | return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
|
6912 | },
|
6913 |
|
6914 |
|
6915 | upcomingInput: function upcomingInput() {
|
6916 | var next = this.match;
|
6917 | if (next.length < 20) {
|
6918 | next += this._input.substr(0, 20 - next.length);
|
6919 | }
|
6920 | return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
|
6921 | },
|
6922 |
|
6923 |
|
6924 | showPosition: function showPosition() {
|
6925 | var pre = this.pastInput();
|
6926 | var c = new Array(pre.length + 1).join("-");
|
6927 | return pre + this.upcomingInput() + "\n" + c + "^";
|
6928 | },
|
6929 |
|
6930 |
|
6931 | test_match: function test_match(match, indexed_rule) {
|
6932 | var token, lines, backup;
|
6933 |
|
6934 | if (this.options.backtrack_lexer) {
|
6935 |
|
6936 | backup = {
|
6937 | yylineno: this.yylineno,
|
6938 | yylloc: {
|
6939 | first_line: this.yylloc.first_line,
|
6940 | last_line: this.last_line,
|
6941 | first_column: this.yylloc.first_column,
|
6942 | last_column: this.yylloc.last_column
|
6943 | },
|
6944 | yytext: this.yytext,
|
6945 | match: this.match,
|
6946 | matches: this.matches,
|
6947 | matched: this.matched,
|
6948 | yyleng: this.yyleng,
|
6949 | offset: this.offset,
|
6950 | _more: this._more,
|
6951 | _input: this._input,
|
6952 | yy: this.yy,
|
6953 | conditionStack: this.conditionStack.slice(0),
|
6954 | done: this.done
|
6955 | };
|
6956 | if (this.options.ranges) {
|
6957 | backup.yylloc.range = this.yylloc.range.slice(0);
|
6958 | }
|
6959 | }
|
6960 |
|
6961 | lines = match[0].match(/(?:\r\n?|\n).*/g);
|
6962 | if (lines) {
|
6963 | this.yylineno += lines.length;
|
6964 | }
|
6965 | this.yylloc = {
|
6966 | first_line: this.yylloc.last_line,
|
6967 | last_line: this.yylineno + 1,
|
6968 | first_column: this.yylloc.last_column,
|
6969 | last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
|
6970 | };
|
6971 | this.yytext += match[0];
|
6972 | this.match += match[0];
|
6973 | this.matches = match;
|
6974 | this.yyleng = this.yytext.length;
|
6975 | if (this.options.ranges) {
|
6976 | this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
6977 | }
|
6978 | this._more = false;
|
6979 | this._backtrack = false;
|
6980 | this._input = this._input.slice(match[0].length);
|
6981 | this.matched += match[0];
|
6982 | token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
6983 | if (this.done && this._input) {
|
6984 | this.done = false;
|
6985 | }
|
6986 | if (token) {
|
6987 | return token;
|
6988 | } else if (this._backtrack) {
|
6989 |
|
6990 | for (var k in backup) {
|
6991 | this[k] = backup[k];
|
6992 | }
|
6993 | return false;
|
6994 | }
|
6995 | return false;
|
6996 | },
|
6997 |
|
6998 |
|
6999 | next: function next() {
|
7000 | if (this.done) {
|
7001 | return this.EOF;
|
7002 | }
|
7003 | if (!this._input) {
|
7004 | this.done = true;
|
7005 | }
|
7006 |
|
7007 | var token, match, tempMatch, index;
|
7008 | if (!this._more) {
|
7009 | this.yytext = '';
|
7010 | this.match = '';
|
7011 | }
|
7012 | var rules = this._currentRules();
|
7013 | for (var i = 0; i < rules.length; i++) {
|
7014 | tempMatch = this._input.match(this.rules[rules[i]]);
|
7015 | if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
7016 | match = tempMatch;
|
7017 | index = i;
|
7018 | if (this.options.backtrack_lexer) {
|
7019 | token = this.test_match(tempMatch, rules[i]);
|
7020 | if (token !== false) {
|
7021 | return token;
|
7022 | } else if (this._backtrack) {
|
7023 | match = false;
|
7024 | continue;
|
7025 | } else {
|
7026 |
|
7027 | return false;
|
7028 | }
|
7029 | } else if (!this.options.flex) {
|
7030 | break;
|
7031 | }
|
7032 | }
|
7033 | }
|
7034 | if (match) {
|
7035 | token = this.test_match(match, rules[index]);
|
7036 | if (token !== false) {
|
7037 | return token;
|
7038 | }
|
7039 |
|
7040 | return false;
|
7041 | }
|
7042 | if (this._input === "") {
|
7043 | return this.EOF;
|
7044 | } else {
|
7045 | return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
|
7046 | text: "",
|
7047 | token: null,
|
7048 | line: this.yylineno
|
7049 | });
|
7050 | }
|
7051 | },
|
7052 |
|
7053 |
|
7054 | lex: function lex() {
|
7055 | var r = this.next();
|
7056 | if (r) {
|
7057 | return r;
|
7058 | } else {
|
7059 | return this.lex();
|
7060 | }
|
7061 | },
|
7062 |
|
7063 |
|
7064 | begin: function begin(condition) {
|
7065 | this.conditionStack.push(condition);
|
7066 | },
|
7067 |
|
7068 |
|
7069 | popState: function popState() {
|
7070 | var n = this.conditionStack.length - 1;
|
7071 | if (n > 0) {
|
7072 | return this.conditionStack.pop();
|
7073 | } else {
|
7074 | return this.conditionStack[0];
|
7075 | }
|
7076 | },
|
7077 |
|
7078 |
|
7079 | _currentRules: function _currentRules() {
|
7080 | if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
7081 | return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
7082 | } else {
|
7083 | return this.conditions["INITIAL"].rules;
|
7084 | }
|
7085 | },
|
7086 |
|
7087 |
|
7088 | topState: function topState(n) {
|
7089 | n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
7090 | if (n >= 0) {
|
7091 | return this.conditionStack[n];
|
7092 | } else {
|
7093 | return "INITIAL";
|
7094 | }
|
7095 | },
|
7096 |
|
7097 |
|
7098 | pushState: function pushState(condition) {
|
7099 | this.begin(condition);
|
7100 | },
|
7101 |
|
7102 |
|
7103 | stateStackSize: function stateStackSize() {
|
7104 | return this.conditionStack.length;
|
7105 | },
|
7106 | options: {},
|
7107 | performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
7108 | var YYSTATE = YY_START;
|
7109 | switch ($avoiding_name_collisions) {
|
7110 | case 0:
|
7111 |
|
7112 | break;
|
7113 | case 1:
|
7114 | return 6;
|
7115 | break;
|
7116 | case 2:
|
7117 |
|
7118 | break;
|
7119 | case 3:
|
7120 | return 5;
|
7121 | break;
|
7122 | case 4:
|
7123 | this.begin("struct"); return 17;
|
7124 | break;
|
7125 | case 5:
|
7126 | this.popState();return 19;
|
7127 | break;
|
7128 | case 6:
|
7129 |
|
7130 | break;
|
7131 | case 7:
|
7132 | return "MEMBER";
|
7133 | break;
|
7134 | case 8:
|
7135 | return 16;
|
7136 | break;
|
7137 | case 9:
|
7138 | this.begin("string");
|
7139 | break;
|
7140 | case 10:
|
7141 | this.popState();
|
7142 | break;
|
7143 | case 11:
|
7144 | return "STR";
|
7145 | break;
|
7146 | case 12:
|
7147 | return 27;
|
7148 | break;
|
7149 | case 13:
|
7150 | return 27;
|
7151 | break;
|
7152 | case 14:
|
7153 | return 29;
|
7154 | break;
|
7155 | case 15:
|
7156 | return 29;
|
7157 | break;
|
7158 | case 16:
|
7159 | return 28;
|
7160 | break;
|
7161 | case 17:
|
7162 | return 26;
|
7163 | break;
|
7164 | case 18:
|
7165 | return 30;
|
7166 | break;
|
7167 | case 19:
|
7168 | return 31;
|
7169 | break;
|
7170 | case 20:
|
7171 | return 13;
|
7172 | break;
|
7173 | case 21:
|
7174 | return 43;
|
7175 | break;
|
7176 | case 22:
|
7177 | return 'DOT';
|
7178 | break;
|
7179 | case 23:
|
7180 | return 'PLUS';
|
7181 | break;
|
7182 | case 24:
|
7183 | return 40;
|
7184 | break;
|
7185 | case 25:
|
7186 | return 'EQUALS';
|
7187 | break;
|
7188 | case 26:
|
7189 | return 'EQUALS';
|
7190 | break;
|
7191 | case 27:
|
7192 | return 47;
|
7193 | break;
|
7194 | case 28:
|
7195 | return 'PUNCTUATION';
|
7196 | break;
|
7197 | case 29:
|
7198 | return 46;
|
7199 | break;
|
7200 | case 30:
|
7201 | return 45;
|
7202 | break;
|
7203 | case 31:
|
7204 | return 42;
|
7205 | break;
|
7206 | case 32:
|
7207 | return 8;
|
7208 | break;
|
7209 | }
|
7210 | },
|
7211 | 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)/, /^(?:$)/],
|
7212 | 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 } }
|
7213 | };
|
7214 | return lexer;
|
7215 | }();
|
7216 | parser.lexer = lexer;
|
7217 | function Parser() {
|
7218 | this.yy = {};
|
7219 | }
|
7220 | Parser.prototype = parser;parser.Parser = Parser;
|
7221 | return new Parser();
|
7222 | }();
|
7223 |
|
7224 | if (true) {
|
7225 | exports.parser = parser;
|
7226 | exports.Parser = parser.Parser;
|
7227 | exports.parse = function () {
|
7228 | return parser.parse.apply(parser, arguments);
|
7229 | };
|
7230 | exports.main = function commonjsMain(args) {
|
7231 | if (!args[1]) {
|
7232 | console.log('Usage: ' + args[0] + ' FILE');
|
7233 | process.exit(1);
|
7234 | }
|
7235 | var source = __webpack_require__(4).readFileSync(__webpack_require__(5).normalize(args[1]), "utf8");
|
7236 | return exports.parser.parse(source);
|
7237 | };
|
7238 | if (typeof module !== 'undefined' && __webpack_require__.c[__webpack_require__.s] === module) {
|
7239 | exports.main(process.argv.slice(1));
|
7240 | }
|
7241 | }
|
7242 | }.call(exports, __webpack_require__(2), __webpack_require__(3)(module)))
|
7243 |
|
7244 | }),
|
7245 |
|
7246 | (function(module, exports, __webpack_require__) {
|
7247 |
|
7248 | "use strict";
|
7249 |
|
7250 |
|
7251 | Object.defineProperty(exports, "__esModule", {
|
7252 | value: true
|
7253 | });
|
7254 | exports.relationType = exports.lineType = exports.cleanupLabel = exports.addMembers = exports.addRelation = exports.getRelations = exports.getClasses = exports.getClass = exports.clear = exports.addClass = undefined;
|
7255 |
|
7256 | var _logger = __webpack_require__(0);
|
7257 |
|
7258 | var relations = [];
|
7259 |
|
7260 | var classes;
|
7261 | classes = {};
|
7262 |
|
7263 |
|
7264 |
|
7265 |
|
7266 |
|
7267 |
|
7268 |
|
7269 |
|
7270 | var addClass = exports.addClass = function addClass(id) {
|
7271 | if (typeof classes[id] === 'undefined') {
|
7272 | classes[id] = {
|
7273 | id: id,
|
7274 | methods: [],
|
7275 | members: []
|
7276 | };
|
7277 | }
|
7278 | };
|
7279 |
|
7280 | var clear = exports.clear = function clear() {
|
7281 | relations = [];
|
7282 | classes = {};
|
7283 | };
|
7284 |
|
7285 | var getClass = exports.getClass = function getClass(id) {
|
7286 | return classes[id];
|
7287 | };
|
7288 | var getClasses = exports.getClasses = function getClasses() {
|
7289 | return classes;
|
7290 | };
|
7291 |
|
7292 | var getRelations = exports.getRelations = function getRelations() {
|
7293 | return relations;
|
7294 | };
|
7295 |
|
7296 | var addRelation = exports.addRelation = function addRelation(relation) {
|
7297 | _logger.logger.warn('Adding relation: ' + JSON.stringify(relation));
|
7298 | addClass(relation.id1);
|
7299 | addClass(relation.id2);
|
7300 | relations.push(relation);
|
7301 | };
|
7302 |
|
7303 | var addMembers = exports.addMembers = function addMembers(className, MembersArr) {
|
7304 | var theClass = classes[className];
|
7305 | if (typeof MembersArr === 'string') {
|
7306 | if (MembersArr.substr(-1) === ')') {
|
7307 | theClass.methods.push(MembersArr);
|
7308 | } else {
|
7309 | theClass.members.push(MembersArr);
|
7310 | }
|
7311 | }
|
7312 | };
|
7313 |
|
7314 | var cleanupLabel = exports.cleanupLabel = function cleanupLabel(label) {
|
7315 | if (label.substring(0, 1) === ':') {
|
7316 | return label.substr(2).trim();
|
7317 | } else {
|
7318 | return label.trim();
|
7319 | }
|
7320 | };
|
7321 |
|
7322 | var lineType = exports.lineType = {
|
7323 | LINE: 0,
|
7324 | DOTTED_LINE: 1
|
7325 | };
|
7326 |
|
7327 | var relationType = exports.relationType = {
|
7328 | AGGREGATION: 0,
|
7329 | EXTENSION: 1,
|
7330 | COMPOSITION: 2,
|
7331 | DEPENDENCY: 3
|
7332 | };
|
7333 |
|
7334 | exports.default = {
|
7335 | addClass: addClass,
|
7336 | clear: clear,
|
7337 | getClass: getClass,
|
7338 | getClasses: getClasses,
|
7339 | getRelations: getRelations,
|
7340 | addRelation: addRelation,
|
7341 | addMembers: addMembers,
|
7342 | cleanupLabel: cleanupLabel,
|
7343 | lineType: lineType,
|
7344 | relationType: relationType
|
7345 | };
|
7346 |
|
7347 | }),
|
7348 |
|
7349 | (function(module, exports, __webpack_require__) {
|
7350 |
|
7351 | "use strict";
|
7352 | (function(process, module) {
|
7353 |
|
7354 |
|
7355 |
|
7356 |
|
7357 |
|
7358 |
|
7359 |
|
7360 |
|
7361 |
|
7362 |
|
7363 |
|
7364 |
|
7365 |
|
7366 |
|
7367 |
|
7368 |
|
7369 |
|
7370 |
|
7371 |
|
7372 |
|
7373 |
|
7374 |
|
7375 |
|
7376 |
|
7377 |
|
7378 |
|
7379 |
|
7380 |
|
7381 |
|
7382 |
|
7383 |
|
7384 |
|
7385 |
|
7386 |
|
7387 |
|
7388 |
|
7389 |
|
7390 |
|
7391 |
|
7392 |
|
7393 |
|
7394 |
|
7395 |
|
7396 |
|
7397 |
|
7398 |
|
7399 |
|
7400 |
|
7401 |
|
7402 |
|
7403 |
|
7404 |
|
7405 |
|
7406 |
|
7407 |
|
7408 |
|
7409 |
|
7410 |
|
7411 |
|
7412 |
|
7413 |
|
7414 |
|
7415 |
|
7416 |
|
7417 |
|
7418 |
|
7419 |
|
7420 |
|
7421 |
|
7422 |
|
7423 |
|
7424 |
|
7425 |
|
7426 |
|
7427 | var parser = function () {
|
7428 | var o = function o(k, v, _o, l) {
|
7429 | for (_o = _o || {}, l = k.length; l--; _o[k[l]] = v) {}return _o;
|
7430 | },
|
7431 | $V0 = [2, 3],
|
7432 | $V1 = [1, 7],
|
7433 | $V2 = [7, 12, 15, 17, 19, 20, 21],
|
7434 | $V3 = [7, 11, 12, 15, 17, 19, 20, 21],
|
7435 | $V4 = [2, 20],
|
7436 | $V5 = [1, 32];
|
7437 | var parser = { trace: function trace() {},
|
7438 | yy: {},
|
7439 | 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 },
|
7440 | 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" },
|
7441 | 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]],
|
7442 | performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
|
7443 |
|
7444 |
|
7445 | var $0 = $$.length - 1;
|
7446 | switch (yystate) {
|
7447 | case 1:
|
7448 | return $$[$0 - 1];
|
7449 | break;
|
7450 | case 2:
|
7451 | yy.setDirection($$[$0 - 3]);return $$[$0 - 1];
|
7452 | break;
|
7453 | case 4:
|
7454 | yy.setOptions($$[$0 - 1]);this.$ = $$[$0];
|
7455 | break;
|
7456 | case 5:
|
7457 | $$[$0 - 1] += $$[$0];this.$ = $$[$0 - 1];
|
7458 | break;
|
7459 | case 7:
|
7460 | this.$ = [];
|
7461 | break;
|
7462 | case 8:
|
7463 | $$[$0 - 1].push($$[$0]);this.$ = $$[$0 - 1];
|
7464 | break;
|
7465 | case 9:
|
7466 | this.$ = $$[$0 - 1];
|
7467 | break;
|
7468 | case 11:
|
7469 | yy.commit($$[$0]);
|
7470 | break;
|
7471 | case 12:
|
7472 | yy.branch($$[$0]);
|
7473 | break;
|
7474 | case 13:
|
7475 | yy.checkout($$[$0]);
|
7476 | break;
|
7477 | case 14:
|
7478 | yy.merge($$[$0]);
|
7479 | break;
|
7480 | case 15:
|
7481 | yy.reset($$[$0]);
|
7482 | break;
|
7483 | case 16:
|
7484 | this.$ = "";
|
7485 | break;
|
7486 | case 17:
|
7487 | this.$ = $$[$0];
|
7488 | break;
|
7489 | case 18:
|
7490 | this.$ = $$[$0 - 1] + ":" + $$[$0];
|
7491 | break;
|
7492 | case 19:
|
7493 | this.$ = $$[$0 - 1] + ":" + yy.count;yy.count = 0;
|
7494 | break;
|
7495 | case 20:
|
7496 | yy.count = 0;
|
7497 | break;
|
7498 | case 21:
|
7499 | yy.count += 1;
|
7500 | break;
|
7501 | }
|
7502 | },
|
7503 | 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] }],
|
7504 | 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] },
|
7505 | parseError: function parseError(str, hash) {
|
7506 | if (hash.recoverable) {
|
7507 | this.trace(str);
|
7508 | } else {
|
7509 | var _parseError = function _parseError(msg, hash) {
|
7510 | this.message = msg;
|
7511 | this.hash = hash;
|
7512 | };
|
7513 |
|
7514 | _parseError.prototype = Error;
|
7515 |
|
7516 | throw new _parseError(str, hash);
|
7517 | }
|
7518 | },
|
7519 | parse: function parse(input) {
|
7520 | var self = this,
|
7521 | stack = [0],
|
7522 | tstack = [],
|
7523 | vstack = [null],
|
7524 | lstack = [],
|
7525 | table = this.table,
|
7526 | yytext = '',
|
7527 | yylineno = 0,
|
7528 | yyleng = 0,
|
7529 | recovering = 0,
|
7530 | TERROR = 2,
|
7531 | EOF = 1;
|
7532 | var args = lstack.slice.call(arguments, 1);
|
7533 | var lexer = Object.create(this.lexer);
|
7534 | var sharedState = { yy: {} };
|
7535 | for (var k in this.yy) {
|
7536 | if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
7537 | sharedState.yy[k] = this.yy[k];
|
7538 | }
|
7539 | }
|
7540 | lexer.setInput(input, sharedState.yy);
|
7541 | sharedState.yy.lexer = lexer;
|
7542 | sharedState.yy.parser = this;
|
7543 | if (typeof lexer.yylloc == 'undefined') {
|
7544 | lexer.yylloc = {};
|
7545 | }
|
7546 | var yyloc = lexer.yylloc;
|
7547 | lstack.push(yyloc);
|
7548 | var ranges = lexer.options && lexer.options.ranges;
|
7549 | if (typeof sharedState.yy.parseError === 'function') {
|
7550 | this.parseError = sharedState.yy.parseError;
|
7551 | } else {
|
7552 | this.parseError = Object.getPrototypeOf(this).parseError;
|
7553 | }
|
7554 | function popStack(n) {
|
7555 | stack.length = stack.length - 2 * n;
|
7556 | vstack.length = vstack.length - n;
|
7557 | lstack.length = lstack.length - n;
|
7558 | }
|
7559 | function lex() {
|
7560 | var token;
|
7561 | token = tstack.pop() || lexer.lex() || EOF;
|
7562 | if (typeof token !== 'number') {
|
7563 | if (token instanceof Array) {
|
7564 | tstack = token;
|
7565 | token = tstack.pop();
|
7566 | }
|
7567 | token = self.symbols_[token] || token;
|
7568 | }
|
7569 | return token;
|
7570 | }
|
7571 | var symbol,
|
7572 | preErrorSymbol,
|
7573 | state,
|
7574 | action,
|
7575 | a,
|
7576 | r,
|
7577 | yyval = {},
|
7578 | p,
|
7579 | len,
|
7580 | newState,
|
7581 | expected;
|
7582 | while (true) {
|
7583 | state = stack[stack.length - 1];
|
7584 | if (this.defaultActions[state]) {
|
7585 | action = this.defaultActions[state];
|
7586 | } else {
|
7587 | if (symbol === null || typeof symbol == 'undefined') {
|
7588 | symbol = lex();
|
7589 | }
|
7590 | action = table[state] && table[state][symbol];
|
7591 | }
|
7592 | if (typeof action === 'undefined' || !action.length || !action[0]) {
|
7593 | var errStr = '';
|
7594 | expected = [];
|
7595 | for (p in table[state]) {
|
7596 | if (this.terminals_[p] && p > TERROR) {
|
7597 | expected.push('\'' + this.terminals_[p] + '\'');
|
7598 | }
|
7599 | }
|
7600 | if (lexer.showPosition) {
|
7601 | errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
|
7602 | } else {
|
7603 | errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
|
7604 | }
|
7605 | this.parseError(errStr, {
|
7606 | text: lexer.match,
|
7607 | token: this.terminals_[symbol] || symbol,
|
7608 | line: lexer.yylineno,
|
7609 | loc: yyloc,
|
7610 | expected: expected
|
7611 | });
|
7612 | }
|
7613 | if (action[0] instanceof Array && action.length > 1) {
|
7614 | throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
|
7615 | }
|
7616 | switch (action[0]) {
|
7617 | case 1:
|
7618 | stack.push(symbol);
|
7619 | vstack.push(lexer.yytext);
|
7620 | lstack.push(lexer.yylloc);
|
7621 | stack.push(action[1]);
|
7622 | symbol = null;
|
7623 | if (!preErrorSymbol) {
|
7624 | yyleng = lexer.yyleng;
|
7625 | yytext = lexer.yytext;
|
7626 | yylineno = lexer.yylineno;
|
7627 | yyloc = lexer.yylloc;
|
7628 | if (recovering > 0) {
|
7629 | recovering--;
|
7630 | }
|
7631 | } else {
|
7632 | symbol = preErrorSymbol;
|
7633 | preErrorSymbol = null;
|
7634 | }
|
7635 | break;
|
7636 | case 2:
|
7637 | len = this.productions_[action[1]][1];
|
7638 | yyval.$ = vstack[vstack.length - len];
|
7639 | yyval._$ = {
|
7640 | first_line: lstack[lstack.length - (len || 1)].first_line,
|
7641 | last_line: lstack[lstack.length - 1].last_line,
|
7642 | first_column: lstack[lstack.length - (len || 1)].first_column,
|
7643 | last_column: lstack[lstack.length - 1].last_column
|
7644 | };
|
7645 | if (ranges) {
|
7646 | yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
|
7647 | }
|
7648 | r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));
|
7649 | if (typeof r !== 'undefined') {
|
7650 | return r;
|
7651 | }
|
7652 | if (len) {
|
7653 | stack = stack.slice(0, -1 * len * 2);
|
7654 | vstack = vstack.slice(0, -1 * len);
|
7655 | lstack = lstack.slice(0, -1 * len);
|
7656 | }
|
7657 | stack.push(this.productions_[action[1]][0]);
|
7658 | vstack.push(yyval.$);
|
7659 | lstack.push(yyval._$);
|
7660 | newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
7661 | stack.push(newState);
|
7662 | break;
|
7663 | case 3:
|
7664 | return true;
|
7665 | }
|
7666 | }
|
7667 | return true;
|
7668 | } };
|
7669 |
|
7670 | var lexer = function () {
|
7671 | var lexer = {
|
7672 |
|
7673 | EOF: 1,
|
7674 |
|
7675 | parseError: function parseError(str, hash) {
|
7676 | if (this.yy.parser) {
|
7677 | this.yy.parser.parseError(str, hash);
|
7678 | } else {
|
7679 | throw new Error(str);
|
7680 | }
|
7681 | },
|
7682 |
|
7683 |
|
7684 | setInput: function setInput(input, yy) {
|
7685 | this.yy = yy || this.yy || {};
|
7686 | this._input = input;
|
7687 | this._more = this._backtrack = this.done = false;
|
7688 | this.yylineno = this.yyleng = 0;
|
7689 | this.yytext = this.matched = this.match = '';
|
7690 | this.conditionStack = ['INITIAL'];
|
7691 | this.yylloc = {
|
7692 | first_line: 1,
|
7693 | first_column: 0,
|
7694 | last_line: 1,
|
7695 | last_column: 0
|
7696 | };
|
7697 | if (this.options.ranges) {
|
7698 | this.yylloc.range = [0, 0];
|
7699 | }
|
7700 | this.offset = 0;
|
7701 | return this;
|
7702 | },
|
7703 |
|
7704 |
|
7705 | input: function input() {
|
7706 | var ch = this._input[0];
|
7707 | this.yytext += ch;
|
7708 | this.yyleng++;
|
7709 | this.offset++;
|
7710 | this.match += ch;
|
7711 | this.matched += ch;
|
7712 | var lines = ch.match(/(?:\r\n?|\n).*/g);
|
7713 | if (lines) {
|
7714 | this.yylineno++;
|
7715 | this.yylloc.last_line++;
|
7716 | } else {
|
7717 | this.yylloc.last_column++;
|
7718 | }
|
7719 | if (this.options.ranges) {
|
7720 | this.yylloc.range[1]++;
|
7721 | }
|
7722 |
|
7723 | this._input = this._input.slice(1);
|
7724 | return ch;
|
7725 | },
|
7726 |
|
7727 |
|
7728 | unput: function unput(ch) {
|
7729 | var len = ch.length;
|
7730 | var lines = ch.split(/(?:\r\n?|\n)/g);
|
7731 |
|
7732 | this._input = ch + this._input;
|
7733 | this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
7734 |
|
7735 | this.offset -= len;
|
7736 | var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
7737 | this.match = this.match.substr(0, this.match.length - 1);
|
7738 | this.matched = this.matched.substr(0, this.matched.length - 1);
|
7739 |
|
7740 | if (lines.length - 1) {
|
7741 | this.yylineno -= lines.length - 1;
|
7742 | }
|
7743 | var r = this.yylloc.range;
|
7744 |
|
7745 | this.yylloc = {
|
7746 | first_line: this.yylloc.first_line,
|
7747 | last_line: this.yylineno + 1,
|
7748 | first_column: this.yylloc.first_column,
|
7749 | last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
|
7750 | };
|
7751 |
|
7752 | if (this.options.ranges) {
|
7753 | this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
7754 | }
|
7755 | this.yyleng = this.yytext.length;
|
7756 | return this;
|
7757 | },
|
7758 |
|
7759 |
|
7760 | more: function more() {
|
7761 | this._more = true;
|
7762 | return this;
|
7763 | },
|
7764 |
|
7765 |
|
7766 | reject: function reject() {
|
7767 | if (this.options.backtrack_lexer) {
|
7768 | this._backtrack = true;
|
7769 | } else {
|
7770 | 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(), {
|
7771 | text: "",
|
7772 | token: null,
|
7773 | line: this.yylineno
|
7774 | });
|
7775 | }
|
7776 | return this;
|
7777 | },
|
7778 |
|
7779 |
|
7780 | less: function less(n) {
|
7781 | this.unput(this.match.slice(n));
|
7782 | },
|
7783 |
|
7784 |
|
7785 | pastInput: function pastInput() {
|
7786 | var past = this.matched.substr(0, this.matched.length - this.match.length);
|
7787 | return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
|
7788 | },
|
7789 |
|
7790 |
|
7791 | upcomingInput: function upcomingInput() {
|
7792 | var next = this.match;
|
7793 | if (next.length < 20) {
|
7794 | next += this._input.substr(0, 20 - next.length);
|
7795 | }
|
7796 | return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
|
7797 | },
|
7798 |
|
7799 |
|
7800 | showPosition: function showPosition() {
|
7801 | var pre = this.pastInput();
|
7802 | var c = new Array(pre.length + 1).join("-");
|
7803 | return pre + this.upcomingInput() + "\n" + c + "^";
|
7804 | },
|
7805 |
|
7806 |
|
7807 | test_match: function test_match(match, indexed_rule) {
|
7808 | var token, lines, backup;
|
7809 |
|
7810 | if (this.options.backtrack_lexer) {
|
7811 |
|
7812 | backup = {
|
7813 | yylineno: this.yylineno,
|
7814 | yylloc: {
|
7815 | first_line: this.yylloc.first_line,
|
7816 | last_line: this.last_line,
|
7817 | first_column: this.yylloc.first_column,
|
7818 | last_column: this.yylloc.last_column
|
7819 | },
|
7820 | yytext: this.yytext,
|
7821 | match: this.match,
|
7822 | matches: this.matches,
|
7823 | matched: this.matched,
|
7824 | yyleng: this.yyleng,
|
7825 | offset: this.offset,
|
7826 | _more: this._more,
|
7827 | _input: this._input,
|
7828 | yy: this.yy,
|
7829 | conditionStack: this.conditionStack.slice(0),
|
7830 | done: this.done
|
7831 | };
|
7832 | if (this.options.ranges) {
|
7833 | backup.yylloc.range = this.yylloc.range.slice(0);
|
7834 | }
|
7835 | }
|
7836 |
|
7837 | lines = match[0].match(/(?:\r\n?|\n).*/g);
|
7838 | if (lines) {
|
7839 | this.yylineno += lines.length;
|
7840 | }
|
7841 | this.yylloc = {
|
7842 | first_line: this.yylloc.last_line,
|
7843 | last_line: this.yylineno + 1,
|
7844 | first_column: this.yylloc.last_column,
|
7845 | last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
|
7846 | };
|
7847 | this.yytext += match[0];
|
7848 | this.match += match[0];
|
7849 | this.matches = match;
|
7850 | this.yyleng = this.yytext.length;
|
7851 | if (this.options.ranges) {
|
7852 | this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
7853 | }
|
7854 | this._more = false;
|
7855 | this._backtrack = false;
|
7856 | this._input = this._input.slice(match[0].length);
|
7857 | this.matched += match[0];
|
7858 | token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
7859 | if (this.done && this._input) {
|
7860 | this.done = false;
|
7861 | }
|
7862 | if (token) {
|
7863 | return token;
|
7864 | } else if (this._backtrack) {
|
7865 |
|
7866 | for (var k in backup) {
|
7867 | this[k] = backup[k];
|
7868 | }
|
7869 | return false;
|
7870 | }
|
7871 | return false;
|
7872 | },
|
7873 |
|
7874 |
|
7875 | next: function next() {
|
7876 | if (this.done) {
|
7877 | return this.EOF;
|
7878 | }
|
7879 | if (!this._input) {
|
7880 | this.done = true;
|
7881 | }
|
7882 |
|
7883 | var token, match, tempMatch, index;
|
7884 | if (!this._more) {
|
7885 | this.yytext = '';
|
7886 | this.match = '';
|
7887 | }
|
7888 | var rules = this._currentRules();
|
7889 | for (var i = 0; i < rules.length; i++) {
|
7890 | tempMatch = this._input.match(this.rules[rules[i]]);
|
7891 | if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
7892 | match = tempMatch;
|
7893 | index = i;
|
7894 | if (this.options.backtrack_lexer) {
|
7895 | token = this.test_match(tempMatch, rules[i]);
|
7896 | if (token !== false) {
|
7897 | return token;
|
7898 | } else if (this._backtrack) {
|
7899 | match = false;
|
7900 | continue;
|
7901 | } else {
|
7902 |
|
7903 | return false;
|
7904 | }
|
7905 | } else if (!this.options.flex) {
|
7906 | break;
|
7907 | }
|
7908 | }
|
7909 | }
|
7910 | if (match) {
|
7911 | token = this.test_match(match, rules[index]);
|
7912 | if (token !== false) {
|
7913 | return token;
|
7914 | }
|
7915 |
|
7916 | return false;
|
7917 | }
|
7918 | if (this._input === "") {
|
7919 | return this.EOF;
|
7920 | } else {
|
7921 | return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
|
7922 | text: "",
|
7923 | token: null,
|
7924 | line: this.yylineno
|
7925 | });
|
7926 | }
|
7927 | },
|
7928 |
|
7929 |
|
7930 | lex: function lex() {
|
7931 | var r = this.next();
|
7932 | if (r) {
|
7933 | return r;
|
7934 | } else {
|
7935 | return this.lex();
|
7936 | }
|
7937 | },
|
7938 |
|
7939 |
|
7940 | begin: function begin(condition) {
|
7941 | this.conditionStack.push(condition);
|
7942 | },
|
7943 |
|
7944 |
|
7945 | popState: function popState() {
|
7946 | var n = this.conditionStack.length - 1;
|
7947 | if (n > 0) {
|
7948 | return this.conditionStack.pop();
|
7949 | } else {
|
7950 | return this.conditionStack[0];
|
7951 | }
|
7952 | },
|
7953 |
|
7954 |
|
7955 | _currentRules: function _currentRules() {
|
7956 | if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
7957 | return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
7958 | } else {
|
7959 | return this.conditions["INITIAL"].rules;
|
7960 | }
|
7961 | },
|
7962 |
|
7963 |
|
7964 | topState: function topState(n) {
|
7965 | n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
7966 | if (n >= 0) {
|
7967 | return this.conditionStack[n];
|
7968 | } else {
|
7969 | return "INITIAL";
|
7970 | }
|
7971 | },
|
7972 |
|
7973 |
|
7974 | pushState: function pushState(condition) {
|
7975 | this.begin(condition);
|
7976 | },
|
7977 |
|
7978 |
|
7979 | stateStackSize: function stateStackSize() {
|
7980 | return this.conditionStack.length;
|
7981 | },
|
7982 | options: { "case-insensitive": true },
|
7983 | performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
7984 | var YYSTATE = YY_START;
|
7985 | switch ($avoiding_name_collisions) {
|
7986 | case 0:
|
7987 | return 12;
|
7988 | break;
|
7989 | case 1:
|
7990 |
|
7991 | break;
|
7992 | case 2:
|
7993 |
|
7994 | break;
|
7995 | case 3:
|
7996 |
|
7997 | break;
|
7998 | case 4:
|
7999 | return 4;
|
8000 | break;
|
8001 | case 5:
|
8002 | return 15;
|
8003 | break;
|
8004 | case 6:
|
8005 | return 17;
|
8006 | break;
|
8007 | case 7:
|
8008 | return 20;
|
8009 | break;
|
8010 | case 8:
|
8011 | return 21;
|
8012 | break;
|
8013 | case 9:
|
8014 | return 19;
|
8015 | break;
|
8016 | case 10:
|
8017 | return 8;
|
8018 | break;
|
8019 | case 11:
|
8020 | return 8;
|
8021 | break;
|
8022 | case 12:
|
8023 | return 5;
|
8024 | break;
|
8025 | case 13:
|
8026 | return 26;
|
8027 | break;
|
8028 | case 14:
|
8029 | this.begin("options");
|
8030 | break;
|
8031 | case 15:
|
8032 | this.popState();
|
8033 | break;
|
8034 | case 16:
|
8035 | return 11;
|
8036 | break;
|
8037 | case 17:
|
8038 | this.begin("string");
|
8039 | break;
|
8040 | case 18:
|
8041 | this.popState();
|
8042 | break;
|
8043 | case 19:
|
8044 | return 23;
|
8045 | break;
|
8046 | case 20:
|
8047 | return 18;
|
8048 | break;
|
8049 | case 21:
|
8050 | return 7;
|
8051 | break;
|
8052 | }
|
8053 | },
|
8054 | 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],
|
8055 | 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 } }
|
8056 | };
|
8057 | return lexer;
|
8058 | }();
|
8059 | parser.lexer = lexer;
|
8060 | function Parser() {
|
8061 | this.yy = {};
|
8062 | }
|
8063 | Parser.prototype = parser;parser.Parser = Parser;
|
8064 | return new Parser();
|
8065 | }();
|
8066 |
|
8067 | if (true) {
|
8068 | exports.parser = parser;
|
8069 | exports.Parser = parser.Parser;
|
8070 | exports.parse = function () {
|
8071 | return parser.parse.apply(parser, arguments);
|
8072 | };
|
8073 | exports.main = function commonjsMain(args) {
|
8074 | if (!args[1]) {
|
8075 | console.log('Usage: ' + args[0] + ' FILE');
|
8076 | process.exit(1);
|
8077 | }
|
8078 | var source = __webpack_require__(4).readFileSync(__webpack_require__(5).normalize(args[1]), "utf8");
|
8079 | return exports.parser.parse(source);
|
8080 | };
|
8081 | if (typeof module !== 'undefined' && __webpack_require__.c[__webpack_require__.s] === module) {
|
8082 | exports.main(process.argv.slice(1));
|
8083 | }
|
8084 | }
|
8085 | }.call(exports, __webpack_require__(2), __webpack_require__(3)(module)))
|
8086 |
|
8087 | }),
|
8088 |
|
8089 | (function(module, exports) {
|
8090 |
|
8091 | module.exports = require("lodash/each");
|
8092 |
|
8093 | }),
|
8094 |
|
8095 | (function(module, exports, __webpack_require__) {
|
8096 |
|
8097 | "use strict";
|
8098 |
|
8099 |
|
8100 | Object.defineProperty(exports, "__esModule", {
|
8101 | value: true
|
8102 | });
|
8103 | exports.getHead = exports.getDirection = exports.getCurrentBranch = exports.getCommitsArray = exports.getCommits = exports.getBranches = exports.getBranchesAsObjArray = exports.clear = exports.prettyPrint = exports.reset = exports.checkout = exports.merge = exports.branch = exports.commit = exports.getOptions = exports.setOptions = exports.setDirection = undefined;
|
8104 |
|
8105 | var _orderBy2 = __webpack_require__(42);
|
8106 |
|
8107 | var _orderBy3 = _interopRequireDefault(_orderBy2);
|
8108 |
|
8109 | var _map2 = __webpack_require__(43);
|
8110 |
|
8111 | var _map3 = _interopRequireDefault(_map2);
|
8112 |
|
8113 | var _uniqBy2 = __webpack_require__(44);
|
8114 |
|
8115 | var _uniqBy3 = _interopRequireDefault(_uniqBy2);
|
8116 |
|
8117 | var _each2 = __webpack_require__(21);
|
8118 |
|
8119 | var _each3 = _interopRequireDefault(_each2);
|
8120 |
|
8121 | var _maxBy2 = __webpack_require__(45);
|
8122 |
|
8123 | var _maxBy3 = _interopRequireDefault(_maxBy2);
|
8124 |
|
8125 | var _logger = __webpack_require__(0);
|
8126 |
|
8127 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
8128 |
|
8129 | var commits = {};
|
8130 | var head = null;
|
8131 | var branches = { 'master': head };
|
8132 | var curBranch = 'master';
|
8133 | var direction = 'LR';
|
8134 | var seq = 0;
|
8135 |
|
8136 | function getRandomInt(min, max) {
|
8137 | return Math.floor(Math.random() * (max - min)) + min;
|
8138 | }
|
8139 |
|
8140 | function getId() {
|
8141 | var pool = '0123456789abcdef';
|
8142 | var id = '';
|
8143 | for (var i = 0; i < 7; i++) {
|
8144 | id += pool[getRandomInt(0, 16)];
|
8145 | }
|
8146 | return id;
|
8147 | }
|
8148 |
|
8149 | function isfastforwardable(currentCommit, otherCommit) {
|
8150 | _logger.logger.debug('Entering isfastforwardable:', currentCommit.id, otherCommit.id);
|
8151 | while (currentCommit.seq <= otherCommit.seq && currentCommit !== otherCommit) {
|
8152 |
|
8153 | if (otherCommit.parent == null) break;
|
8154 | if (Array.isArray(otherCommit.parent)) {
|
8155 | _logger.logger.debug('In merge commit:', otherCommit.parent);
|
8156 | return isfastforwardable(currentCommit, commits[otherCommit.parent[0]]) || isfastforwardable(currentCommit, commits[otherCommit.parent[1]]);
|
8157 | } else {
|
8158 | otherCommit = commits[otherCommit.parent];
|
8159 | }
|
8160 | }
|
8161 | _logger.logger.debug(currentCommit.id, otherCommit.id);
|
8162 | return currentCommit.id === otherCommit.id;
|
8163 | }
|
8164 |
|
8165 | function isReachableFrom(currentCommit, otherCommit) {
|
8166 | var currentSeq = currentCommit.seq;
|
8167 | var otherSeq = otherCommit.seq;
|
8168 | if (currentSeq > otherSeq) return isfastforwardable(otherCommit, currentCommit);
|
8169 | return false;
|
8170 | }
|
8171 |
|
8172 | var setDirection = exports.setDirection = function setDirection(dir) {
|
8173 | direction = dir;
|
8174 | };
|
8175 | var options = {};
|
8176 | var setOptions = exports.setOptions = function setOptions(rawOptString) {
|
8177 | _logger.logger.debug('options str', rawOptString);
|
8178 | rawOptString = rawOptString && rawOptString.trim();
|
8179 | rawOptString = rawOptString || '{}';
|
8180 | try {
|
8181 | options = JSON.parse(rawOptString);
|
8182 | } catch (e) {
|
8183 | _logger.logger.error('error while parsing gitGraph options', e.message);
|
8184 | }
|
8185 | };
|
8186 |
|
8187 | var getOptions = exports.getOptions = function getOptions() {
|
8188 | return options;
|
8189 | };
|
8190 |
|
8191 | var commit = exports.commit = function commit(msg) {
|
8192 | var commit = {
|
8193 | id: getId(),
|
8194 | message: msg,
|
8195 | seq: seq++,
|
8196 | parent: head == null ? null : head.id
|
8197 | };
|
8198 | head = commit;
|
8199 | commits[commit.id] = commit;
|
8200 | branches[curBranch] = commit.id;
|
8201 | _logger.logger.debug('in pushCommit ' + commit.id);
|
8202 | };
|
8203 |
|
8204 | var branch = exports.branch = function branch(name) {
|
8205 | branches[name] = head != null ? head.id : null;
|
8206 | _logger.logger.debug('in createBranch');
|
8207 | };
|
8208 |
|
8209 | var merge = exports.merge = function merge(otherBranch) {
|
8210 | var currentCommit = commits[branches[curBranch]];
|
8211 | var otherCommit = commits[branches[otherBranch]];
|
8212 | if (isReachableFrom(currentCommit, otherCommit)) {
|
8213 | _logger.logger.debug('Already merged');
|
8214 | return;
|
8215 | }
|
8216 | if (isfastforwardable(currentCommit, otherCommit)) {
|
8217 | branches[curBranch] = branches[otherBranch];
|
8218 | head = commits[branches[curBranch]];
|
8219 | } else {
|
8220 |
|
8221 | var commit = {
|
8222 | id: getId(),
|
8223 | message: 'merged branch ' + otherBranch + ' into ' + curBranch,
|
8224 | seq: seq++,
|
8225 | parent: [head == null ? null : head.id, branches[otherBranch]]
|
8226 | };
|
8227 | head = commit;
|
8228 | commits[commit.id] = commit;
|
8229 | branches[curBranch] = commit.id;
|
8230 | }
|
8231 | _logger.logger.debug(branches);
|
8232 | _logger.logger.debug('in mergeBranch');
|
8233 | };
|
8234 |
|
8235 | var checkout = exports.checkout = function checkout(branch) {
|
8236 | _logger.logger.debug('in checkout');
|
8237 | curBranch = branch;
|
8238 | var id = branches[curBranch];
|
8239 | head = commits[id];
|
8240 | };
|
8241 |
|
8242 | var reset = exports.reset = function reset(commitRef) {
|
8243 | _logger.logger.debug('in reset', commitRef);
|
8244 | var ref = commitRef.split(':')[0];
|
8245 | var parentCount = parseInt(commitRef.split(':')[1]);
|
8246 | var commit = ref === 'HEAD' ? head : commits[branches[ref]];
|
8247 | _logger.logger.debug(commit, parentCount);
|
8248 | while (parentCount > 0) {
|
8249 | commit = commits[commit.parent];
|
8250 | parentCount--;
|
8251 | if (!commit) {
|
8252 | var err = 'Critical error - unique parent commit not found during reset';
|
8253 | _logger.logger.error(err);
|
8254 | throw err;
|
8255 | }
|
8256 | }
|
8257 | head = commit;
|
8258 | branches[curBranch] = commit.id;
|
8259 | };
|
8260 |
|
8261 | function upsert(arr, key, newval) {
|
8262 | var index = arr.indexOf(key);
|
8263 | if (index === -1) {
|
8264 | arr.push(newval);
|
8265 | } else {
|
8266 | arr.splice(index, 1, newval);
|
8267 | }
|
8268 | }
|
8269 |
|
8270 | function prettyPrintCommitHistory(commitArr) {
|
8271 | var commit = (0, _maxBy3.default)(commitArr, 'seq');
|
8272 | var line = '';
|
8273 | commitArr.forEach(function (c) {
|
8274 | if (c === commit) {
|
8275 | line += '\t*';
|
8276 | } else {
|
8277 | line += '\t|';
|
8278 | }
|
8279 | });
|
8280 | var label = [line, commit.id, commit.seq];
|
8281 | (0, _each3.default)(branches, function (value, key) {
|
8282 | if (value === commit.id) label.push(key);
|
8283 | });
|
8284 | _logger.logger.debug(label.join(' '));
|
8285 | if (Array.isArray(commit.parent)) {
|
8286 | var newCommit = commits[commit.parent[0]];
|
8287 | upsert(commitArr, commit, newCommit);
|
8288 | commitArr.push(commits[commit.parent[1]]);
|
8289 | } else if (commit.parent == null) {
|
8290 | return;
|
8291 | } else {
|
8292 | var nextCommit = commits[commit.parent];
|
8293 | upsert(commitArr, commit, nextCommit);
|
8294 | }
|
8295 | commitArr = (0, _uniqBy3.default)(commitArr, 'id');
|
8296 | prettyPrintCommitHistory(commitArr);
|
8297 | }
|
8298 |
|
8299 | var prettyPrint = exports.prettyPrint = function prettyPrint() {
|
8300 | _logger.logger.debug(commits);
|
8301 | var node = getCommitsArray()[0];
|
8302 | prettyPrintCommitHistory([node]);
|
8303 | };
|
8304 |
|
8305 | var clear = exports.clear = function clear() {
|
8306 | commits = {};
|
8307 | head = null;
|
8308 | branches = { 'master': head };
|
8309 | curBranch = 'master';
|
8310 | seq = 0;
|
8311 | };
|
8312 |
|
8313 | var getBranchesAsObjArray = exports.getBranchesAsObjArray = function getBranchesAsObjArray() {
|
8314 | var branchArr = (0, _map3.default)(branches, function (value, key) {
|
8315 | return { 'name': key, 'commit': commits[value] };
|
8316 | });
|
8317 | return branchArr;
|
8318 | };
|
8319 |
|
8320 | var getBranches = exports.getBranches = function getBranches() {
|
8321 | return branches;
|
8322 | };
|
8323 | var getCommits = exports.getCommits = function getCommits() {
|
8324 | return commits;
|
8325 | };
|
8326 | var getCommitsArray = exports.getCommitsArray = function getCommitsArray() {
|
8327 | var commitArr = Object.keys(commits).map(function (key) {
|
8328 | return commits[key];
|
8329 | });
|
8330 | commitArr.forEach(function (o) {
|
8331 | _logger.logger.debug(o.id);
|
8332 | });
|
8333 | return (0, _orderBy3.default)(commitArr, ['seq'], ['desc']);
|
8334 | };
|
8335 | var getCurrentBranch = exports.getCurrentBranch = function getCurrentBranch() {
|
8336 | return curBranch;
|
8337 | };
|
8338 | var getDirection = exports.getDirection = function getDirection() {
|
8339 | return direction;
|
8340 | };
|
8341 | var getHead = exports.getHead = function getHead() {
|
8342 | return head;
|
8343 | };
|
8344 |
|
8345 | exports.default = {
|
8346 | setDirection: setDirection,
|
8347 | setOptions: setOptions,
|
8348 | getOptions: getOptions,
|
8349 | commit: commit,
|
8350 | branch: branch,
|
8351 | merge: merge,
|
8352 | checkout: checkout,
|
8353 | reset: reset,
|
8354 | prettyPrint: prettyPrint,
|
8355 | clear: clear,
|
8356 | getBranchesAsObjArray: getBranchesAsObjArray,
|
8357 | getBranches: getBranches,
|
8358 | getCommits: getCommits,
|
8359 | getCommitsArray: getCommitsArray,
|
8360 | getCurrentBranch: getCurrentBranch,
|
8361 | getDirection: getDirection,
|
8362 | getHead: getHead
|
8363 | };
|
8364 |
|
8365 | }),
|
8366 |
|
8367 | (function(module, exports) {
|
8368 |
|
8369 | module.exports = {"name":"mermaid","version":"7.1.0","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":"node -r babel-register ./node_modules/.bin/webpack --progress --colors","build:watch":"yarn build --watch","release":"yarn build -p --config webpack.config.prod.js","upgrade":"yarn upgrade --latest && yarn remove d3 && yarn add d3@3.5.17","lint":"standard","karma":"node -r babel-register node_modules/.bin/karma start karma.conf.js --single-run","test":"yarn lint && yarn karma","jison":"node -r babel-register node_modules/.bin/gulp jison","prepublishOnly":"yarn build && yarn release && yarn test"},"repository":{"type":"git","url":"https://github.com/knsv/mermaid"},"author":"Knut Sveidqvist","license":"MIT","standard":{"ignore":["**/parser/*.js","dist/**/*.js"]},"dependencies":{"d3":"3.5.17","dagre-d3-renderer":"^0.4.24","dagre-layout":"^0.8.0","he":"^1.1.1","lodash":"^4.17.4","moment":"^2.18.1"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.2","babel-plugin-lodash":"^3.2.11","babel-preset-env":"^1.6.0","babel-preset-es2015":"^6.24.1","codeclimate-test-reporter":"^0.5.0","css-loader":"^0.28.7","css-to-string-loader":"^0.1.3","extract-text-webpack-plugin":"^3.0.0","gulp":"^3.9.1","gulp-filelog":"^0.4.1","gulp-jison":"^1.2.0","inject-loader":"^3.0.1","jasmine":"^2.8.0","jasmine-es6":"^0.4.1","jison":"^0.4.18","karma":"^1.7.1","karma-chrome-launcher":"^2.2.0","karma-jasmine":"^1.1.0","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^2.0.4","less":"^2.7.2","less-loader":"^4.0.5","puppeteer":"^0.10.2","standard":"^10.0.3","style-loader":"^0.18.2","webpack":"^3.5.6","webpack-node-externals":"^1.6.0"},"files":["dist","src"]}
|
8370 |
|
8371 | }),
|
8372 |
|
8373 | (function(module, exports, __webpack_require__) {
|
8374 |
|
8375 | "use strict";
|
8376 | (function(global) {
|
8377 |
|
8378 | Object.defineProperty(exports, "__esModule", {
|
8379 | value: true
|
8380 | });
|
8381 |
|
8382 | var _he = __webpack_require__(26);
|
8383 |
|
8384 | var _he2 = _interopRequireDefault(_he);
|
8385 |
|
8386 | var _mermaidAPI = __webpack_require__(27);
|
8387 |
|
8388 | var _mermaidAPI2 = _interopRequireDefault(_mermaidAPI);
|
8389 |
|
8390 | var _logger = __webpack_require__(0);
|
8391 |
|
8392 | var _package = __webpack_require__(23);
|
8393 |
|
8394 | var _package2 = _interopRequireDefault(_package);
|
8395 |
|
8396 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
8397 |
|
8398 |
|
8399 |
|
8400 |
|
8401 |
|
8402 | var nextId = 0;
|
8403 |
|
8404 |
|
8405 |
|
8406 |
|
8407 |
|
8408 |
|
8409 |
|
8410 |
|
8411 |
|
8412 |
|
8413 |
|
8414 |
|
8415 |
|
8416 |
|
8417 |
|
8418 |
|
8419 |
|
8420 |
|
8421 |
|
8422 |
|
8423 |
|
8424 |
|
8425 | var init = function init() {
|
8426 | var conf = _mermaidAPI2.default.getConfig();
|
8427 | _logger.logger.debug('Starting rendering diagrams');
|
8428 | var nodes;
|
8429 | if (arguments.length >= 2) {
|
8430 |
|
8431 | if (typeof arguments[0] !== 'undefined') {
|
8432 | mermaid.sequenceConfig = arguments[0];
|
8433 | }
|
8434 |
|
8435 | nodes = arguments[1];
|
8436 | } else {
|
8437 | nodes = arguments[0];
|
8438 | }
|
8439 |
|
8440 |
|
8441 | var callback;
|
8442 | if (typeof arguments[arguments.length - 1] === 'function') {
|
8443 | callback = arguments[arguments.length - 1];
|
8444 | _logger.logger.debug('Callback function found');
|
8445 | } else {
|
8446 | if (typeof conf.mermaid !== 'undefined') {
|
8447 | if (typeof conf.mermaid.callback === 'function') {
|
8448 | callback = conf.mermaid.callback;
|
8449 | _logger.logger.debug('Callback function found');
|
8450 | } else {
|
8451 | _logger.logger.debug('No Callback function found');
|
8452 | }
|
8453 | }
|
8454 | }
|
8455 | nodes = nodes === undefined ? document.querySelectorAll('.mermaid') : typeof nodes === 'string' ? document.querySelectorAll(nodes) : nodes instanceof window.Node ? [nodes] : nodes;
|
8456 |
|
8457 | if (typeof global.mermaid_config !== 'undefined') {
|
8458 | _mermaidAPI2.default.initialize(global.mermaid_config);
|
8459 | }
|
8460 | _logger.logger.debug('Start On Load before: ' + mermaid.startOnLoad);
|
8461 | if (typeof mermaid.startOnLoad !== 'undefined') {
|
8462 | _logger.logger.debug('Start On Load inner: ' + mermaid.startOnLoad);
|
8463 | _mermaidAPI2.default.initialize({ startOnLoad: mermaid.startOnLoad });
|
8464 | }
|
8465 |
|
8466 | if (typeof mermaid.ganttConfig !== 'undefined') {
|
8467 | _mermaidAPI2.default.initialize({ gantt: mermaid.ganttConfig });
|
8468 | }
|
8469 |
|
8470 | var txt;
|
8471 | var insertSvg = function insertSvg(svgCode, bindFunctions) {
|
8472 | element.innerHTML = svgCode;
|
8473 | if (typeof callback !== 'undefined') {
|
8474 | callback(id);
|
8475 | }
|
8476 | bindFunctions(element);
|
8477 | };
|
8478 |
|
8479 | for (var i = 0; i < nodes.length; i++) {
|
8480 | var element = nodes[i];
|
8481 |
|
8482 |
|
8483 | if (!element.getAttribute('data-processed')) {
|
8484 | element.setAttribute('data-processed', true);
|
8485 | } else {
|
8486 | continue;
|
8487 | }
|
8488 |
|
8489 | var id = 'mermaidChart' + nextId++;
|
8490 |
|
8491 |
|
8492 | txt = element.innerHTML;
|
8493 |
|
8494 |
|
8495 | txt = _he2.default.decode(txt).trim();
|
8496 |
|
8497 | _mermaidAPI2.default.render(id, txt, insertSvg, element);
|
8498 | }
|
8499 | };
|
8500 |
|
8501 | var version = function version() {
|
8502 | return 'v' + _package2.default.version;
|
8503 | };
|
8504 |
|
8505 | var initialize = function initialize(config) {
|
8506 | _logger.logger.debug('Initializing mermaid');
|
8507 | if (typeof config.mermaid !== 'undefined') {
|
8508 | if (typeof config.mermaid.startOnLoad !== 'undefined') {
|
8509 | mermaid.startOnLoad = config.mermaid.startOnLoad;
|
8510 | }
|
8511 | if (typeof config.mermaid.htmlLabels !== 'undefined') {
|
8512 | mermaid.htmlLabels = config.mermaid.htmlLabels;
|
8513 | }
|
8514 | }
|
8515 | _mermaidAPI2.default.initialize(config);
|
8516 | };
|
8517 |
|
8518 |
|
8519 |
|
8520 |
|
8521 |
|
8522 |
|
8523 | var contentLoaded = function contentLoaded() {
|
8524 | var config;
|
8525 |
|
8526 | if (typeof global.mermaid_config !== 'undefined') {
|
8527 | if (global.mermaid_config.htmlLabels === false) {
|
8528 | mermaid.htmlLabels = false;
|
8529 | }
|
8530 | }
|
8531 |
|
8532 | if (mermaid.startOnLoad) {
|
8533 |
|
8534 | if (typeof global.mermaid_config !== 'undefined') {
|
8535 |
|
8536 | if (global.mermaid_config.startOnLoad === true) {
|
8537 | mermaid.init();
|
8538 | }
|
8539 | } else {
|
8540 |
|
8541 | config = _mermaidAPI2.default.getConfig();
|
8542 | if (config.startOnLoad) {
|
8543 | mermaid.init();
|
8544 | }
|
8545 | }
|
8546 | } else {
|
8547 | if (typeof mermaid.startOnLoad === 'undefined') {
|
8548 | _logger.logger.debug('In start, no config');
|
8549 | config = _mermaidAPI2.default.getConfig();
|
8550 | if (config.startOnLoad) {
|
8551 | mermaid.init();
|
8552 | }
|
8553 | }
|
8554 | }
|
8555 | };
|
8556 |
|
8557 | if (typeof document !== 'undefined') {
|
8558 | |
8559 |
|
8560 |
|
8561 | window.addEventListener('load', function () {
|
8562 | contentLoaded();
|
8563 | }, false);
|
8564 | }
|
8565 |
|
8566 | var mermaid = {
|
8567 | startOnLoad: true,
|
8568 | htmlLabels: true,
|
8569 |
|
8570 | mermaidAPI: _mermaidAPI2.default,
|
8571 | parse: _mermaidAPI2.default.parse,
|
8572 | render: _mermaidAPI2.default.render,
|
8573 |
|
8574 | init: init,
|
8575 | initialize: initialize,
|
8576 | version: version,
|
8577 |
|
8578 | contentLoaded: contentLoaded
|
8579 | };
|
8580 |
|
8581 | exports.default = mermaid;
|
8582 | }.call(exports, __webpack_require__(25)))
|
8583 |
|
8584 | }),
|
8585 |
|
8586 | (function(module, exports) {
|
8587 |
|
8588 | var g;
|
8589 |
|
8590 |
|
8591 | g = (function() {
|
8592 | return this;
|
8593 | })();
|
8594 |
|
8595 | try {
|
8596 |
|
8597 | g = g || Function("return this")() || (1,eval)("this");
|
8598 | } catch(e) {
|
8599 |
|
8600 | if(typeof window === "object")
|
8601 | g = window;
|
8602 | }
|
8603 |
|
8604 |
|
8605 |
|
8606 |
|
8607 |
|
8608 | module.exports = g;
|
8609 |
|
8610 |
|
8611 | }),
|
8612 |
|
8613 | (function(module, exports) {
|
8614 |
|
8615 | module.exports = require("he");
|
8616 |
|
8617 | }),
|
8618 |
|
8619 | (function(module, exports, __webpack_require__) {
|
8620 |
|
8621 | "use strict";
|
8622 |
|
8623 |
|
8624 | Object.defineProperty(exports, "__esModule", {
|
8625 | value: true
|
8626 | });
|
8627 | exports.decodeEntities = exports.encodeEntities = exports.version = undefined;
|
8628 |
|
8629 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; |
8630 |
|
8631 |
|
8632 |
|
8633 |
|
8634 |
|
8635 |
|
8636 |
|
8637 |
|
8638 |
|
8639 |
|
8640 |
|
8641 |
|
8642 |
|
8643 |
|
8644 | var _logger = __webpack_require__(0);
|
8645 |
|
8646 | var _graphDb = __webpack_require__(8);
|
8647 |
|
8648 | var _graphDb2 = _interopRequireDefault(_graphDb);
|
8649 |
|
8650 | var _utils = __webpack_require__(9);
|
8651 |
|
8652 | var _utils2 = _interopRequireDefault(_utils);
|
8653 |
|
8654 | var _flowRenderer = __webpack_require__(29);
|
8655 |
|
8656 | var _flowRenderer2 = _interopRequireDefault(_flowRenderer);
|
8657 |
|
8658 | var _sequenceRenderer = __webpack_require__(31);
|
8659 |
|
8660 | var _sequenceRenderer2 = _interopRequireDefault(_sequenceRenderer);
|
8661 |
|
8662 | var _exampleRenderer = __webpack_require__(33);
|
8663 |
|
8664 | var _exampleRenderer2 = _interopRequireDefault(_exampleRenderer);
|
8665 |
|
8666 | var _example = __webpack_require__(15);
|
8667 |
|
8668 | var _example2 = _interopRequireDefault(_example);
|
8669 |
|
8670 | var _flow = __webpack_require__(10);
|
8671 |
|
8672 | var _flow2 = _interopRequireDefault(_flow);
|
8673 |
|
8674 | var _dot = __webpack_require__(11);
|
8675 |
|
8676 | var _dot2 = _interopRequireDefault(_dot);
|
8677 |
|
8678 | var _sequenceDiagram = __webpack_require__(12);
|
8679 |
|
8680 | var _sequenceDiagram2 = _interopRequireDefault(_sequenceDiagram);
|
8681 |
|
8682 | var _sequenceDb = __webpack_require__(13);
|
8683 |
|
8684 | var _sequenceDb2 = _interopRequireDefault(_sequenceDb);
|
8685 |
|
8686 | var _exampleDb = __webpack_require__(14);
|
8687 |
|
8688 | var _exampleDb2 = _interopRequireDefault(_exampleDb);
|
8689 |
|
8690 | var _ganttRenderer = __webpack_require__(34);
|
8691 |
|
8692 | var _ganttRenderer2 = _interopRequireDefault(_ganttRenderer);
|
8693 |
|
8694 | var _gantt = __webpack_require__(16);
|
8695 |
|
8696 | var _gantt2 = _interopRequireDefault(_gantt);
|
8697 |
|
8698 | var _ganttDb = __webpack_require__(17);
|
8699 |
|
8700 | var _ganttDb2 = _interopRequireDefault(_ganttDb);
|
8701 |
|
8702 | var _classDiagram = __webpack_require__(18);
|
8703 |
|
8704 | var _classDiagram2 = _interopRequireDefault(_classDiagram);
|
8705 |
|
8706 | var _classRenderer = __webpack_require__(35);
|
8707 |
|
8708 | var _classRenderer2 = _interopRequireDefault(_classRenderer);
|
8709 |
|
8710 | var _classDb = __webpack_require__(19);
|
8711 |
|
8712 | var _classDb2 = _interopRequireDefault(_classDb);
|
8713 |
|
8714 | var _gitGraph = __webpack_require__(20);
|
8715 |
|
8716 | var _gitGraph2 = _interopRequireDefault(_gitGraph);
|
8717 |
|
8718 | var _gitGraphRenderer = __webpack_require__(37);
|
8719 |
|
8720 | var _gitGraphRenderer2 = _interopRequireDefault(_gitGraphRenderer);
|
8721 |
|
8722 | var _gitGraphAst = __webpack_require__(22);
|
8723 |
|
8724 | var _gitGraphAst2 = _interopRequireDefault(_gitGraphAst);
|
8725 |
|
8726 | var _d = __webpack_require__(1);
|
8727 |
|
8728 | var _d2 = _interopRequireDefault(_d);
|
8729 |
|
8730 | var _package = __webpack_require__(23);
|
8731 |
|
8732 | var _package2 = _interopRequireDefault(_package);
|
8733 |
|
8734 | var _mermaid = __webpack_require__(46);
|
8735 |
|
8736 | var _mermaid2 = _interopRequireDefault(_mermaid);
|
8737 |
|
8738 | var _mermaid3 = __webpack_require__(48);
|
8739 |
|
8740 | var _mermaid4 = _interopRequireDefault(_mermaid3);
|
8741 |
|
8742 | var _mermaid5 = __webpack_require__(50);
|
8743 |
|
8744 | var _mermaid6 = _interopRequireDefault(_mermaid5);
|
8745 |
|
8746 | var _mermaid7 = __webpack_require__(52);
|
8747 |
|
8748 | var _mermaid8 = _interopRequireDefault(_mermaid7);
|
8749 |
|
8750 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
8751 |
|
8752 | var themes = {
|
8753 | dark: _mermaid2.default,
|
8754 | default: _mermaid4.default,
|
8755 | forest: _mermaid6.default,
|
8756 | neutral: _mermaid8.default
|
8757 |
|
8758 | |
8759 |
|
8760 |
|
8761 |
|
8762 |
|
8763 |
|
8764 |
|
8765 |
|
8766 |
|
8767 |
|
8768 |
|
8769 | };var config = {
|
8770 | theme: _mermaid4.default,
|
8771 |
|
8772 | |
8773 |
|
8774 |
|
8775 |
|
8776 |
|
8777 |
|
8778 |
|
8779 |
|
8780 | logLevel: 5,
|
8781 |
|
8782 | |
8783 |
|
8784 |
|
8785 | startOnLoad: true,
|
8786 |
|
8787 | |
8788 |
|
8789 |
|
8790 |
|
8791 | arrowMarkerAbsolute: false,
|
8792 |
|
8793 | |
8794 |
|
8795 |
|
8796 |
|
8797 | flowchart: {
|
8798 | |
8799 |
|
8800 |
|
8801 |
|
8802 | htmlLabels: true,
|
8803 | |
8804 |
|
8805 |
|
8806 |
|
8807 | useMaxWidth: true
|
8808 | },
|
8809 |
|
8810 | |
8811 |
|
8812 |
|
8813 |
|
8814 | sequenceDiagram: {
|
8815 |
|
8816 | |
8817 |
|
8818 |
|
8819 | diagramMarginX: 50,
|
8820 |
|
8821 | |
8822 |
|
8823 |
|
8824 | diagramMarginY: 10,
|
8825 |
|
8826 | |
8827 |
|
8828 |
|
8829 | actorMargin: 50,
|
8830 |
|
8831 | |
8832 |
|
8833 |
|
8834 | width: 150,
|
8835 |
|
8836 | |
8837 |
|
8838 |
|
8839 | height: 65,
|
8840 |
|
8841 | |
8842 |
|
8843 |
|
8844 | boxMargin: 10,
|
8845 |
|
8846 | |
8847 |
|
8848 |
|
8849 | boxTextMargin: 5,
|
8850 |
|
8851 | |
8852 |
|
8853 |
|
8854 | noteMargin: 10,
|
8855 |
|
8856 | |
8857 |
|
8858 |
|
8859 | messageMargin: 35,
|
8860 |
|
8861 | |
8862 |
|
8863 |
|
8864 | mirrorActors: true,
|
8865 |
|
8866 | |
8867 |
|
8868 |
|
8869 |
|
8870 | bottomMarginAdj: 1,
|
8871 |
|
8872 | |
8873 |
|
8874 |
|
8875 |
|
8876 | useMaxWidth: true
|
8877 | },
|
8878 |
|
8879 | |
8880 |
|
8881 |
|
8882 | gantt: {
|
8883 | |
8884 |
|
8885 |
|
8886 | titleTopMargin: 25,
|
8887 |
|
8888 | |
8889 |
|
8890 |
|
8891 | barHeight: 20,
|
8892 |
|
8893 | |
8894 |
|
8895 |
|
8896 | barGap: 4,
|
8897 |
|
8898 | |
8899 |
|
8900 |
|
8901 | topPadding: 50,
|
8902 |
|
8903 | |
8904 |
|
8905 |
|
8906 | leftPadding: 75,
|
8907 |
|
8908 | |
8909 |
|
8910 |
|
8911 | gridLineStartPadding: 35,
|
8912 |
|
8913 | |
8914 |
|
8915 |
|
8916 | fontSize: 11,
|
8917 |
|
8918 | |
8919 |
|
8920 |
|
8921 | fontFamily: '"Open-Sans", "sans-serif"',
|
8922 |
|
8923 | |
8924 |
|
8925 |
|
8926 | numberSectionStyles: 3,
|
8927 |
|
8928 | |
8929 |
|
8930 |
|
8931 | axisFormatter: [
|
8932 |
|
8933 | ['%I:%M', function (d) {
|
8934 | return d.getHours();
|
8935 | }],
|
8936 |
|
8937 | ['w. %U', function (d) {
|
8938 | return d.getDay() === 1;
|
8939 | }],
|
8940 |
|
8941 | ['%a %d', function (d) {
|
8942 | return d.getDay() && d.getDate() !== 1;
|
8943 | }],
|
8944 |
|
8945 | ['%b %d', function (d) {
|
8946 | return d.getDate() !== 1;
|
8947 | }],
|
8948 |
|
8949 | ['%m-%y', function (d) {
|
8950 | return d.getMonth();
|
8951 | }]]
|
8952 | },
|
8953 | classDiagram: {},
|
8954 | gitGraph: {},
|
8955 | info: {}
|
8956 | };
|
8957 |
|
8958 | (0, _logger.setLogLevel)(config.logLevel);
|
8959 |
|
8960 | function parse(text) {
|
8961 | var graphType = _utils2.default.detectType(text);
|
8962 | var parser;
|
8963 |
|
8964 | switch (graphType) {
|
8965 | case 'gitGraph':
|
8966 | parser = _gitGraph2.default;
|
8967 | parser.parser.yy = _gitGraphAst2.default;
|
8968 | break;
|
8969 | case 'graph':
|
8970 | parser = _flow2.default;
|
8971 | parser.parser.yy = _graphDb2.default;
|
8972 | break;
|
8973 | case 'dotGraph':
|
8974 | parser = _dot2.default;
|
8975 | parser.parser.yy = _graphDb2.default;
|
8976 | break;
|
8977 | case 'sequenceDiagram':
|
8978 | parser = _sequenceDiagram2.default;
|
8979 | parser.parser.yy = _sequenceDb2.default;
|
8980 | break;
|
8981 | case 'info':
|
8982 | parser = _example2.default;
|
8983 | parser.parser.yy = _exampleDb2.default;
|
8984 | break;
|
8985 | case 'gantt':
|
8986 | parser = _gantt2.default;
|
8987 | parser.parser.yy = _ganttDb2.default;
|
8988 | break;
|
8989 | case 'classDiagram':
|
8990 | parser = _classDiagram2.default;
|
8991 | parser.parser.yy = _classDb2.default;
|
8992 | break;
|
8993 | }
|
8994 |
|
8995 | parser.parser.yy.parseError = function (str, hash) {
|
8996 | var error = { str: str, hash: hash };
|
8997 | throw error;
|
8998 | };
|
8999 |
|
9000 | parser.parse(text);
|
9001 | }
|
9002 |
|
9003 |
|
9004 |
|
9005 |
|
9006 |
|
9007 |
|
9008 | var version = exports.version = function version() {
|
9009 | return _package2.default.version;
|
9010 | };
|
9011 |
|
9012 | var encodeEntities = exports.encodeEntities = function encodeEntities(text) {
|
9013 | var txt = text;
|
9014 |
|
9015 | txt = txt.replace(/style.*:\S*#.*;/g, function (s) {
|
9016 | var innerTxt = s.substring(0, s.length - 1);
|
9017 | return innerTxt;
|
9018 | });
|
9019 | txt = txt.replace(/classDef.*:\S*#.*;/g, function (s) {
|
9020 | var innerTxt = s.substring(0, s.length - 1);
|
9021 | return innerTxt;
|
9022 | });
|
9023 |
|
9024 | txt = txt.replace(/#\w+;/g, function (s) {
|
9025 | var innerTxt = s.substring(1, s.length - 1);
|
9026 |
|
9027 | var isInt = /^\+?\d+$/.test(innerTxt);
|
9028 | if (isInt) {
|
9029 | return 'fl°°' + innerTxt + '¶ß';
|
9030 | } else {
|
9031 | return 'fl°' + innerTxt + '¶ß';
|
9032 | }
|
9033 | });
|
9034 |
|
9035 | return txt;
|
9036 | };
|
9037 |
|
9038 | var decodeEntities = exports.decodeEntities = function decodeEntities(text) {
|
9039 | var txt = text;
|
9040 |
|
9041 | txt = txt.replace(/fl°°/g, function () {
|
9042 | return '&#';
|
9043 | });
|
9044 | txt = txt.replace(/fl°/g, function () {
|
9045 | return '&';
|
9046 | });
|
9047 | txt = txt.replace(/¶ß/g, function () {
|
9048 | return ';';
|
9049 | });
|
9050 |
|
9051 | return txt;
|
9052 | };
|
9053 |
|
9054 |
|
9055 |
|
9056 |
|
9057 |
|
9058 |
|
9059 |
|
9060 |
|
9061 |
|
9062 |
|
9063 |
|
9064 |
|
9065 |
|
9066 |
|
9067 |
|
9068 |
|
9069 |
|
9070 |
|
9071 |
|
9072 |
|
9073 |
|
9074 |
|
9075 |
|
9076 | var render = function render(id, txt, cb, container) {
|
9077 | if (typeof container !== 'undefined') {
|
9078 | container.innerHTML = '';
|
9079 |
|
9080 | _d2.default.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');
|
9081 | } else {
|
9082 | var _element = document.querySelector('#' + 'd' + id);
|
9083 | if (_element) {
|
9084 | _element.innerHTML = '';
|
9085 | }
|
9086 |
|
9087 | _d2.default.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');
|
9088 | }
|
9089 |
|
9090 | window.txt = txt;
|
9091 | txt = encodeEntities(txt);
|
9092 |
|
9093 | var element = _d2.default.select('#d' + id).node();
|
9094 | var graphType = _utils2.default.detectType(txt);
|
9095 | switch (graphType) {
|
9096 | case 'gitGraph':
|
9097 | config.flowchart.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
|
9098 | _gitGraphRenderer2.default.setConf(config.gitGraph);
|
9099 | _gitGraphRenderer2.default.draw(txt, id, false);
|
9100 | break;
|
9101 | case 'graph':
|
9102 | config.flowchart.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
|
9103 | _flowRenderer2.default.setConf(config.flowchart);
|
9104 | _flowRenderer2.default.draw(txt, id, false);
|
9105 | break;
|
9106 | case 'dotGraph':
|
9107 | config.flowchart.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
|
9108 | _flowRenderer2.default.setConf(config.flowchart);
|
9109 | _flowRenderer2.default.draw(txt, id, true);
|
9110 | break;
|
9111 | case 'sequenceDiagram':
|
9112 | config.sequenceDiagram.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
|
9113 | _sequenceRenderer2.default.setConf(config.sequenceDiagram);
|
9114 | _sequenceRenderer2.default.draw(txt, id);
|
9115 | break;
|
9116 | case 'gantt':
|
9117 | config.gantt.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
|
9118 | _ganttRenderer2.default.setConf(config.gantt);
|
9119 | _ganttRenderer2.default.draw(txt, id);
|
9120 | break;
|
9121 | case 'classDiagram':
|
9122 | config.classDiagram.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
|
9123 | _classRenderer2.default.setConf(config.classDiagram);
|
9124 | _classRenderer2.default.draw(txt, id);
|
9125 | break;
|
9126 | case 'info':
|
9127 | config.info.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
|
9128 | _exampleRenderer2.default.draw(txt, id, version());
|
9129 | break;
|
9130 | }
|
9131 |
|
9132 |
|
9133 | var svg = element.firstChild;
|
9134 | var s = document.createElement('style');
|
9135 | var cs = window.getComputedStyle(svg);
|
9136 | s.innerHTML = '\n ' + (themes[config.theme] || _mermaid4.default) + '\nsvg {\n color: ' + cs.color + ';\n font: ' + cs.font + ';\n}\n ';
|
9137 | svg.insertBefore(s, svg.firstChild);
|
9138 |
|
9139 | _d2.default.select('#d' + id).selectAll('foreignobject div').attr('xmlns', 'http://www.w3.org/1999/xhtml');
|
9140 |
|
9141 | var url = '';
|
9142 | if (config.arrowMarkerAbsolute) {
|
9143 | url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;
|
9144 | url = url.replace(/\(/g, '\\(');
|
9145 | url = url.replace(/\)/g, '\\)');
|
9146 | }
|
9147 |
|
9148 |
|
9149 | var svgCode = _d2.default.select('#d' + id).node().innerHTML.replace(/url\(#arrowhead/g, 'url(' + url + '#arrowhead', 'g');
|
9150 |
|
9151 | svgCode = decodeEntities(svgCode);
|
9152 |
|
9153 | if (typeof cb !== 'undefined') {
|
9154 | cb(svgCode, _graphDb2.default.bindFunctions);
|
9155 | } else {
|
9156 | _logger.logger.warn('CB = undefined!');
|
9157 | }
|
9158 |
|
9159 | var node = _d2.default.select('#d' + id).node();
|
9160 | if (node !== null && typeof node.remove === 'function') {
|
9161 | _d2.default.select('#d' + id).node().remove();
|
9162 | }
|
9163 |
|
9164 | return svgCode;
|
9165 | };
|
9166 |
|
9167 | function render2(id, text, cb, containerElement) {
|
9168 | try {
|
9169 | if (arguments.length === 1) {
|
9170 | text = id;
|
9171 | id = 'mermaidId0';
|
9172 | }
|
9173 |
|
9174 | if (typeof document === 'undefined') {
|
9175 |
|
9176 | } else {
|
9177 |
|
9178 | return render(id, text, cb, containerElement);
|
9179 | }
|
9180 | } catch (e) {
|
9181 | _logger.logger.warn(e);
|
9182 | }
|
9183 | }
|
9184 |
|
9185 | var setConf = function setConf(cnf) {
|
9186 |
|
9187 | var lvl1Keys = Object.keys(cnf);
|
9188 | var i;
|
9189 | for (i = 0; i < lvl1Keys.length; i++) {
|
9190 | if (_typeof(cnf[lvl1Keys[i]]) === 'object') {
|
9191 | var lvl2Keys = Object.keys(cnf[lvl1Keys[i]]);
|
9192 |
|
9193 | var j;
|
9194 | for (j = 0; j < lvl2Keys.length; j++) {
|
9195 | _logger.logger.debug('Setting conf ', lvl1Keys[i], '-', lvl2Keys[j]);
|
9196 | if (typeof config[lvl1Keys[i]] === 'undefined') {
|
9197 | config[lvl1Keys[i]] = {};
|
9198 | }
|
9199 | _logger.logger.debug('Setting config: ' + lvl1Keys[i] + ' ' + lvl2Keys[j] + ' to ' + cnf[lvl1Keys[i]][lvl2Keys[j]]);
|
9200 | config[lvl1Keys[i]][lvl2Keys[j]] = cnf[lvl1Keys[i]][lvl2Keys[j]];
|
9201 | }
|
9202 | } else {
|
9203 | config[lvl1Keys[i]] = cnf[lvl1Keys[i]];
|
9204 | }
|
9205 | }
|
9206 | };
|
9207 |
|
9208 | function initialize(options) {
|
9209 | _logger.logger.debug('Initializing mermaidAPI');
|
9210 |
|
9211 | if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') {
|
9212 | setConf(options);
|
9213 | }
|
9214 | (0, _logger.setLogLevel)(config.logLevel);
|
9215 | }
|
9216 |
|
9217 | function getConfig() {
|
9218 | return config;
|
9219 | }
|
9220 |
|
9221 | var mermaidAPI = {
|
9222 | render: render2,
|
9223 | parse: parse,
|
9224 | initialize: initialize,
|
9225 | detectType: _utils2.default.detectType,
|
9226 | getConfig: getConfig
|
9227 | };
|
9228 |
|
9229 | exports.default = mermaidAPI;
|
9230 |
|
9231 | }),
|
9232 |
|
9233 | (function(module, exports) {
|
9234 |
|
9235 | module.exports = require("d3");
|
9236 |
|
9237 | }),
|
9238 |
|
9239 | (function(module, exports, __webpack_require__) {
|
9240 |
|
9241 | "use strict";
|
9242 |
|
9243 |
|
9244 | Object.defineProperty(exports, "__esModule", {
|
9245 | value: true
|
9246 | });
|
9247 | exports.draw = exports.getClasses = exports.addEdges = exports.addVertices = exports.setConf = undefined;
|
9248 |
|
9249 | var _graphDb = __webpack_require__(8);
|
9250 |
|
9251 | var _graphDb2 = _interopRequireDefault(_graphDb);
|
9252 |
|
9253 | var _flow = __webpack_require__(10);
|
9254 |
|
9255 | var _flow2 = _interopRequireDefault(_flow);
|
9256 |
|
9257 | var _dot = __webpack_require__(11);
|
9258 |
|
9259 | var _dot2 = _interopRequireDefault(_dot);
|
9260 |
|
9261 | var _d = __webpack_require__(1);
|
9262 |
|
9263 | var _d2 = _interopRequireDefault(_d);
|
9264 |
|
9265 | var _dagreD3Renderer = __webpack_require__(30);
|
9266 |
|
9267 | var _dagreD3Renderer2 = _interopRequireDefault(_dagreD3Renderer);
|
9268 |
|
9269 | var _logger = __webpack_require__(0);
|
9270 |
|
9271 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9272 |
|
9273 | var conf = {};
|
9274 | var setConf = exports.setConf = function setConf(cnf) {
|
9275 | var keys = Object.keys(cnf);
|
9276 | var i;
|
9277 | for (i = 0; i < keys.length; i++) {
|
9278 | conf[keys[i]] = cnf[keys[i]];
|
9279 | }
|
9280 | };
|
9281 |
|
9282 |
|
9283 |
|
9284 |
|
9285 |
|
9286 |
|
9287 | var addVertices = exports.addVertices = function addVertices(vert, g) {
|
9288 | var keys = Object.keys(vert);
|
9289 |
|
9290 | var styleFromStyleArr = function styleFromStyleArr(styleStr, arr) {
|
9291 | var i;
|
9292 |
|
9293 | for (i = 0; i < arr.length; i++) {
|
9294 | if (typeof arr[i] !== 'undefined') {
|
9295 | styleStr = styleStr + arr[i] + ';';
|
9296 | }
|
9297 | }
|
9298 |
|
9299 | return styleStr;
|
9300 | };
|
9301 |
|
9302 |
|
9303 | keys.forEach(function (id) {
|
9304 | var vertice = vert[id];
|
9305 | var verticeText;
|
9306 |
|
9307 | |
9308 |
|
9309 |
|
9310 |
|
9311 | var classStr = '';
|
9312 |
|
9313 | if (vertice.classes.length > 0) {
|
9314 | classStr = vertice.classes.join(' ');
|
9315 | }
|
9316 |
|
9317 | |
9318 |
|
9319 |
|
9320 |
|
9321 | var style = '';
|
9322 |
|
9323 | style = styleFromStyleArr(style, vertice.styles);
|
9324 |
|
9325 |
|
9326 | if (typeof vertice.text === 'undefined') {
|
9327 | verticeText = vertice.id;
|
9328 | } else {
|
9329 | verticeText = vertice.text;
|
9330 | }
|
9331 |
|
9332 | var labelTypeStr = '';
|
9333 | if (conf.htmlLabels) {
|
9334 | labelTypeStr = 'html';
|
9335 | verticeText = verticeText.replace(/fa:fa[\w-]+/g, function (s) {
|
9336 | return '<i class="fa ' + s.substring(3) + '"></i>';
|
9337 | });
|
9338 | } else {
|
9339 | var svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');
|
9340 |
|
9341 | var rows = verticeText.split(/<br>/);
|
9342 |
|
9343 | var j = 0;
|
9344 | for (j = 0; j < rows.length; j++) {
|
9345 | var tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');
|
9346 | tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
|
9347 | tspan.setAttribute('dy', '1em');
|
9348 | tspan.setAttribute('x', '1');
|
9349 | tspan.textContent = rows[j];
|
9350 | svgLabel.appendChild(tspan);
|
9351 | }
|
9352 |
|
9353 | labelTypeStr = 'svg';
|
9354 | verticeText = svgLabel;
|
9355 | }
|
9356 |
|
9357 | var radious = 0;
|
9358 | var _shape = '';
|
9359 |
|
9360 |
|
9361 | switch (vertice.type) {
|
9362 | case 'round':
|
9363 | radious = 5;
|
9364 | _shape = 'rect';
|
9365 | break;
|
9366 | case 'square':
|
9367 | _shape = 'rect';
|
9368 | break;
|
9369 | case 'diamond':
|
9370 | _shape = 'question';
|
9371 | break;
|
9372 | case 'odd':
|
9373 | _shape = 'rect_left_inv_arrow';
|
9374 | break;
|
9375 | case 'odd_right':
|
9376 | _shape = 'rect_left_inv_arrow';
|
9377 | break;
|
9378 | case 'circle':
|
9379 | _shape = 'circle';
|
9380 | break;
|
9381 | case 'ellipse':
|
9382 | _shape = 'ellipse';
|
9383 | break;
|
9384 | case 'group':
|
9385 | _shape = 'rect';
|
9386 |
|
9387 | verticeText = conf.htmlLabels ? '' : document.createElementNS('http://www.w3.org/2000/svg', 'text');
|
9388 | break;
|
9389 | default:
|
9390 | _shape = 'rect';
|
9391 | }
|
9392 |
|
9393 | g.setNode(vertice.id, { labelType: labelTypeStr, shape: _shape, label: verticeText, rx: radious, ry: radious, 'class': classStr, style: style, id: vertice.id });
|
9394 | });
|
9395 | };
|
9396 |
|
9397 |
|
9398 |
|
9399 |
|
9400 |
|
9401 |
|
9402 | var addEdges = exports.addEdges = function addEdges(edges, g) {
|
9403 | var cnt = 0;
|
9404 |
|
9405 | var defaultStyle;
|
9406 | if (typeof edges.defaultStyle !== 'undefined') {
|
9407 | defaultStyle = edges.defaultStyle.toString().replace(/,/g, ';');
|
9408 | }
|
9409 |
|
9410 | edges.forEach(function (edge) {
|
9411 | cnt++;
|
9412 | var edgeData = {};
|
9413 |
|
9414 |
|
9415 | if (edge.type === 'arrow_open') {
|
9416 | edgeData.arrowhead = 'none';
|
9417 | } else {
|
9418 | edgeData.arrowhead = 'normal';
|
9419 | }
|
9420 |
|
9421 | var style = '';
|
9422 |
|
9423 | if (typeof edge.style !== 'undefined') {
|
9424 | edge.style.forEach(function (s) {
|
9425 | style = style + s + ';';
|
9426 | });
|
9427 | } else {
|
9428 | switch (edge.stroke) {
|
9429 | case 'normal':
|
9430 | style = 'fill:none';
|
9431 | if (typeof defaultStyle !== 'undefined') {
|
9432 | style = defaultStyle;
|
9433 | }
|
9434 | break;
|
9435 | case 'dotted':
|
9436 | style = 'stroke: #333; fill:none;stroke-width:2px;stroke-dasharray:3;';
|
9437 | break;
|
9438 | case 'thick':
|
9439 | style = 'stroke: #333; stroke-width: 3.5px;fill:none';
|
9440 | break;
|
9441 | }
|
9442 | }
|
9443 | edgeData.style = style;
|
9444 |
|
9445 | if (typeof edge.interpolate !== 'undefined') {
|
9446 | edgeData.lineInterpolate = edge.interpolate;
|
9447 | } else {
|
9448 | if (typeof edges.defaultInterpolate !== 'undefined') {
|
9449 | edgeData.lineInterpolate = edges.defaultInterpolate;
|
9450 | }
|
9451 | }
|
9452 |
|
9453 | if (typeof edge.text === 'undefined') {
|
9454 | if (typeof edge.style !== 'undefined') {
|
9455 | edgeData.arrowheadStyle = 'fill: #333';
|
9456 | }
|
9457 | } else {
|
9458 | edgeData.arrowheadStyle = 'fill: #333';
|
9459 | if (typeof edge.style === 'undefined') {
|
9460 | edgeData.labelpos = 'c';
|
9461 | if (conf.htmlLabels) {
|
9462 | edgeData.labelType = 'html';
|
9463 | edgeData.label = '<span class="edgeLabel">' + edge.text + '</span>';
|
9464 | } else {
|
9465 | edgeData.labelType = 'text';
|
9466 | edgeData.style = 'stroke: #333; stroke-width: 1.5px;fill:none';
|
9467 | edgeData.label = edge.text.replace(/<br>/g, '\n');
|
9468 | }
|
9469 | } else {
|
9470 | edgeData.label = edge.text.replace(/<br>/g, '\n');
|
9471 | }
|
9472 | }
|
9473 |
|
9474 | g.setEdge(edge.start, edge.end, edgeData, cnt);
|
9475 | });
|
9476 | };
|
9477 |
|
9478 |
|
9479 |
|
9480 |
|
9481 |
|
9482 | var getClasses = exports.getClasses = function getClasses(text, isDot) {
|
9483 | var parser;
|
9484 | _graphDb2.default.clear();
|
9485 | if (isDot) {
|
9486 | parser = _dot2.default.parser;
|
9487 | } else {
|
9488 | parser = _flow2.default.parser;
|
9489 | }
|
9490 | parser.yy = _graphDb2.default;
|
9491 |
|
9492 |
|
9493 | parser.parse(text);
|
9494 |
|
9495 | var classes = _graphDb2.default.getClasses();
|
9496 |
|
9497 |
|
9498 | if (typeof classes.default === 'undefined') {
|
9499 | classes.default = { id: 'default' };
|
9500 | classes.default.styles = [];
|
9501 | classes.default.clusterStyles = ['rx:4px', 'fill: rgb(255, 255, 222)', 'rx: 4px', 'stroke: rgb(170, 170, 51)', 'stroke-width: 1px'];
|
9502 | classes.default.nodeLabelStyles = ['fill:#000', 'stroke:none', 'font-weight:300', 'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf', 'font-size:14px'];
|
9503 | classes.default.edgeLabelStyles = ['fill:#000', 'stroke:none', 'font-weight:300', 'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf', 'font-size:14px'];
|
9504 | }
|
9505 | return classes;
|
9506 | };
|
9507 |
|
9508 |
|
9509 |
|
9510 |
|
9511 |
|
9512 |
|
9513 | var draw = exports.draw = function draw(text, id, isDot) {
|
9514 | _logger.logger.debug('Drawing flowchart');
|
9515 | var parser;
|
9516 | _graphDb2.default.clear();
|
9517 | if (isDot) {
|
9518 | parser = _dot2.default.parser;
|
9519 | } else {
|
9520 | parser = _flow2.default.parser;
|
9521 | }
|
9522 | parser.yy = _graphDb2.default;
|
9523 |
|
9524 |
|
9525 | try {
|
9526 | parser.parse(text);
|
9527 | } catch (err) {
|
9528 | _logger.logger.debug('Parsing failed');
|
9529 | }
|
9530 |
|
9531 |
|
9532 | var dir;
|
9533 | dir = _graphDb2.default.getDirection();
|
9534 | if (typeof dir === 'undefined') {
|
9535 | dir = 'TD';
|
9536 | }
|
9537 |
|
9538 |
|
9539 | var g = new _dagreD3Renderer2.default.graphlib.Graph({
|
9540 | multigraph: true,
|
9541 | compound: true
|
9542 | }).setGraph({
|
9543 | rankdir: dir,
|
9544 | marginx: 20,
|
9545 | marginy: 20
|
9546 |
|
9547 | }).setDefaultEdgeLabel(function () {
|
9548 | return {};
|
9549 | });
|
9550 |
|
9551 | var subG;
|
9552 | var subGraphs = _graphDb2.default.getSubGraphs();
|
9553 | var i = 0;
|
9554 | for (i = subGraphs.length - 1; i >= 0; i--) {
|
9555 | subG = subGraphs[i];
|
9556 | _graphDb2.default.addVertex(subG.id, subG.title, 'group', undefined);
|
9557 | }
|
9558 |
|
9559 |
|
9560 | var vert = _graphDb2.default.getVertices();
|
9561 |
|
9562 | var edges = _graphDb2.default.getEdges();
|
9563 |
|
9564 | i = 0;
|
9565 | var j;
|
9566 | for (i = subGraphs.length - 1; i >= 0; i--) {
|
9567 | subG = subGraphs[i];
|
9568 |
|
9569 | _d2.default.selectAll('cluster').append('text');
|
9570 |
|
9571 | for (j = 0; j < subG.nodes.length; j++) {
|
9572 | g.setParent(subG.nodes[j], subG.id);
|
9573 | }
|
9574 | }
|
9575 | addVertices(vert, g);
|
9576 | addEdges(edges, g);
|
9577 |
|
9578 |
|
9579 | var Render = _dagreD3Renderer2.default.render;
|
9580 | var render = new Render();
|
9581 |
|
9582 |
|
9583 | render.shapes().question = function (parent, bbox, node) {
|
9584 | var w = bbox.width;
|
9585 | var h = bbox.height;
|
9586 | var s = (w + h) * 0.8;
|
9587 | var points = [{ x: s / 2, y: 0 }, { x: s, y: -s / 2 }, { x: s / 2, y: -s }, { x: 0, y: -s / 2 }];
|
9588 | var shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
|
9589 | return d.x + ',' + d.y;
|
9590 | }).join(' ')).attr('rx', 5).attr('ry', 5).attr('transform', 'translate(' + -s / 2 + ',' + s * 2 / 4 + ')');
|
9591 | node.intersect = function (point) {
|
9592 | return _dagreD3Renderer2.default.intersect.polygon(node, points, point);
|
9593 | };
|
9594 | return shapeSvg;
|
9595 | };
|
9596 |
|
9597 |
|
9598 | render.shapes().rect_left_inv_arrow = function (parent, bbox, node) {
|
9599 | var w = bbox.width;
|
9600 | var h = bbox.height;
|
9601 | var points = [{ x: -h / 2, y: 0 }, { x: w, y: 0 }, { x: w, y: -h }, { x: -h / 2, y: -h }, { x: 0, y: -h / 2 }];
|
9602 | var shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
|
9603 | return d.x + ',' + d.y;
|
9604 | }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h * 2 / 4 + ')');
|
9605 | node.intersect = function (point) {
|
9606 | return _dagreD3Renderer2.default.intersect.polygon(node, points, point);
|
9607 | };
|
9608 | return shapeSvg;
|
9609 | };
|
9610 |
|
9611 |
|
9612 | render.shapes().rect_right_inv_arrow = function (parent, bbox, node) {
|
9613 | var w = bbox.width;
|
9614 | var h = bbox.height;
|
9615 | var points = [{ x: 0, y: 0 }, { x: w + h / 2, y: 0 }, { x: w, y: -h / 2 }, { x: w + h / 2, y: -h }, { x: 0, y: -h }];
|
9616 | var shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
|
9617 | return d.x + ',' + d.y;
|
9618 | }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h * 2 / 4 + ')');
|
9619 | node.intersect = function (point) {
|
9620 | return _dagreD3Renderer2.default.intersect.polygon(node, points, point);
|
9621 | };
|
9622 | return shapeSvg;
|
9623 | };
|
9624 |
|
9625 |
|
9626 | render.arrows().none = function normal(parent, id, edge, type) {
|
9627 | var 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');
|
9628 |
|
9629 | var path = marker.append('path').attr('d', 'M 0 0 L 0 0 L 0 0 z');
|
9630 | _dagreD3Renderer2.default.util.applyStyle(path, edge[type + 'Style']);
|
9631 | };
|
9632 |
|
9633 |
|
9634 | render.arrows().normal = function normal(parent, id, edge, type) {
|
9635 | var 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');
|
9636 |
|
9637 | 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');
|
9638 | };
|
9639 |
|
9640 |
|
9641 | var svg = _d2.default.select('#' + id);
|
9642 |
|
9643 |
|
9644 | var element = _d2.default.select('#' + id + ' g');
|
9645 | render(element, g);
|
9646 |
|
9647 | element.selectAll('g.node').attr('title', function () {
|
9648 | return _graphDb2.default.getTooltip(this.id);
|
9649 | });
|
9650 |
|
9651 | if (conf.useMaxWidth) {
|
9652 |
|
9653 | svg.attr('height', '100%');
|
9654 | svg.attr('width', conf.width);
|
9655 | svg.attr('viewBox', '0 0 ' + (g.graph().width + 20) + ' ' + (g.graph().height + 20));
|
9656 | svg.attr('style', 'max-width:' + (g.graph().width + 20) + 'px;');
|
9657 | } else {
|
9658 |
|
9659 | svg.attr('height', g.graph().height);
|
9660 | if (typeof conf.width === 'undefined') {
|
9661 | svg.attr('width', g.graph().width);
|
9662 | } else {
|
9663 | svg.attr('width', conf.width);
|
9664 | }
|
9665 | svg.attr('viewBox', '0 0 ' + (g.graph().width + 20) + ' ' + (g.graph().height + 20));
|
9666 | }
|
9667 |
|
9668 |
|
9669 | _graphDb2.default.indexNodes('subGraph' + i);
|
9670 |
|
9671 | for (i = 0; i < subGraphs.length; i++) {
|
9672 | subG = subGraphs[i];
|
9673 |
|
9674 | if (subG.title !== 'undefined') {
|
9675 | var clusterRects = document.querySelectorAll('#' + id + ' #' + subG.id + ' rect');
|
9676 | var clusterEl = document.querySelectorAll('#' + id + ' #' + subG.id);
|
9677 |
|
9678 | var xPos = clusterRects[0].x.baseVal.value;
|
9679 | var yPos = clusterRects[0].y.baseVal.value;
|
9680 | var width = clusterRects[0].width.baseVal.value;
|
9681 | var cluster = _d2.default.select(clusterEl[0]);
|
9682 | var te = cluster.append('text');
|
9683 | te.attr('x', xPos + width / 2);
|
9684 | te.attr('y', yPos + 14);
|
9685 | te.attr('fill', 'black');
|
9686 | te.attr('stroke', 'none');
|
9687 | te.attr('id', id + 'Text');
|
9688 | te.style('text-anchor', 'middle');
|
9689 |
|
9690 | if (typeof subG.title === 'undefined') {
|
9691 | te.text('Undef');
|
9692 | } else {
|
9693 | te.text(subG.title);
|
9694 | }
|
9695 | }
|
9696 | }
|
9697 |
|
9698 |
|
9699 | if (!conf.htmlLabels) {
|
9700 | var labels = document.querySelectorAll('#' + id + ' .edgeLabel .label');
|
9701 | var k;
|
9702 | for (k = 0; k < labels.length; k++) {
|
9703 | var label = labels[i];
|
9704 |
|
9705 |
|
9706 | var dim = label.getBBox();
|
9707 |
|
9708 | var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
|
9709 | rect.setAttribute('rx', 0);
|
9710 | rect.setAttribute('ry', 0);
|
9711 | rect.setAttribute('width', dim.width);
|
9712 | rect.setAttribute('height', dim.height);
|
9713 | rect.setAttribute('style', 'fill:#e8e8e8;');
|
9714 |
|
9715 | label.insertBefore(rect, label.firstChild);
|
9716 | }
|
9717 | }
|
9718 | };
|
9719 |
|
9720 | exports.default = {
|
9721 | setConf: setConf,
|
9722 | addVertices: addVertices,
|
9723 | addEdges: addEdges,
|
9724 | getClasses: getClasses,
|
9725 | draw: draw
|
9726 | };
|
9727 |
|
9728 | }),
|
9729 |
|
9730 | (function(module, exports) {
|
9731 |
|
9732 | module.exports = require("dagre-d3-renderer");
|
9733 |
|
9734 | }),
|
9735 |
|
9736 | (function(module, exports, __webpack_require__) {
|
9737 |
|
9738 | "use strict";
|
9739 |
|
9740 |
|
9741 | Object.defineProperty(exports, "__esModule", {
|
9742 | value: true
|
9743 | });
|
9744 | exports.draw = exports.setConf = exports.drawActors = exports.bounds = undefined;
|
9745 |
|
9746 | var _svgDraw = __webpack_require__(32);
|
9747 |
|
9748 | var _svgDraw2 = _interopRequireDefault(_svgDraw);
|
9749 |
|
9750 | var _logger = __webpack_require__(0);
|
9751 |
|
9752 | var _d = __webpack_require__(1);
|
9753 |
|
9754 | var _d2 = _interopRequireDefault(_d);
|
9755 |
|
9756 | var _sequenceDiagram = __webpack_require__(12);
|
9757 |
|
9758 | var _sequenceDb = __webpack_require__(13);
|
9759 |
|
9760 | var _sequenceDb2 = _interopRequireDefault(_sequenceDb);
|
9761 |
|
9762 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9763 |
|
9764 | _sequenceDiagram.parser.yy = _sequenceDb2.default;
|
9765 |
|
9766 | var conf = {
|
9767 |
|
9768 | diagramMarginX: 50,
|
9769 | diagramMarginY: 30,
|
9770 |
|
9771 | actorMargin: 50,
|
9772 |
|
9773 | width: 150,
|
9774 |
|
9775 | height: 65,
|
9776 |
|
9777 | boxMargin: 10,
|
9778 | boxTextMargin: 5,
|
9779 | noteMargin: 10,
|
9780 |
|
9781 | messageMargin: 35,
|
9782 |
|
9783 | mirrorActors: false,
|
9784 |
|
9785 |
|
9786 | bottomMarginAdj: 1,
|
9787 |
|
9788 |
|
9789 | activationWidth: 10,
|
9790 |
|
9791 |
|
9792 | textPlacement: 'tspan'
|
9793 | };
|
9794 |
|
9795 | var bounds = exports.bounds = {
|
9796 | data: {
|
9797 | startx: undefined,
|
9798 | stopx: undefined,
|
9799 | starty: undefined,
|
9800 | stopy: undefined
|
9801 | },
|
9802 | verticalPos: 0,
|
9803 |
|
9804 | sequenceItems: [],
|
9805 | activations: [],
|
9806 | init: function init() {
|
9807 | this.sequenceItems = [];
|
9808 | this.activations = [];
|
9809 | this.data = {
|
9810 | startx: undefined,
|
9811 | stopx: undefined,
|
9812 | starty: undefined,
|
9813 | stopy: undefined
|
9814 | };
|
9815 | this.verticalPos = 0;
|
9816 | },
|
9817 | updateVal: function updateVal(obj, key, val, fun) {
|
9818 | if (typeof obj[key] === 'undefined') {
|
9819 | obj[key] = val;
|
9820 | } else {
|
9821 | obj[key] = fun(val, obj[key]);
|
9822 | }
|
9823 | },
|
9824 | updateBounds: function updateBounds(startx, starty, stopx, stopy) {
|
9825 | var _self = this;
|
9826 | var cnt = 0;
|
9827 | function updateFn(type) {
|
9828 | return function updateItemBounds(item) {
|
9829 | cnt++;
|
9830 |
|
9831 | var n = _self.sequenceItems.length - cnt + 1;
|
9832 |
|
9833 | _self.updateVal(item, 'starty', starty - n * conf.boxMargin, Math.min);
|
9834 | _self.updateVal(item, 'stopy', stopy + n * conf.boxMargin, Math.max);
|
9835 |
|
9836 | _self.updateVal(bounds.data, 'startx', startx - n * conf.boxMargin, Math.min);
|
9837 | _self.updateVal(bounds.data, 'stopx', stopx + n * conf.boxMargin, Math.max);
|
9838 |
|
9839 | if (!(type === 'activation')) {
|
9840 | _self.updateVal(item, 'startx', startx - n * conf.boxMargin, Math.min);
|
9841 | _self.updateVal(item, 'stopx', stopx + n * conf.boxMargin, Math.max);
|
9842 |
|
9843 | _self.updateVal(bounds.data, 'starty', starty - n * conf.boxMargin, Math.min);
|
9844 | _self.updateVal(bounds.data, 'stopy', stopy + n * conf.boxMargin, Math.max);
|
9845 | }
|
9846 | };
|
9847 | }
|
9848 |
|
9849 | this.sequenceItems.forEach(updateFn());
|
9850 | this.activations.forEach(updateFn('activation'));
|
9851 | },
|
9852 | insert: function insert(startx, starty, stopx, stopy) {
|
9853 | var _startx, _starty, _stopx, _stopy;
|
9854 |
|
9855 | _startx = Math.min(startx, stopx);
|
9856 | _stopx = Math.max(startx, stopx);
|
9857 | _starty = Math.min(starty, stopy);
|
9858 | _stopy = Math.max(starty, stopy);
|
9859 |
|
9860 | this.updateVal(bounds.data, 'startx', _startx, Math.min);
|
9861 | this.updateVal(bounds.data, 'starty', _starty, Math.min);
|
9862 | this.updateVal(bounds.data, 'stopx', _stopx, Math.max);
|
9863 | this.updateVal(bounds.data, 'stopy', _stopy, Math.max);
|
9864 |
|
9865 | this.updateBounds(_startx, _starty, _stopx, _stopy);
|
9866 | },
|
9867 | newActivation: function newActivation(message, diagram) {
|
9868 | var actorRect = _sequenceDiagram.parser.yy.getActors()[message.from.actor];
|
9869 | var stackedSize = actorActivations(message.from.actor).length;
|
9870 | var x = actorRect.x + conf.width / 2 + (stackedSize - 1) * conf.activationWidth / 2;
|
9871 | this.activations.push({
|
9872 | startx: x,
|
9873 | starty: this.verticalPos + 2,
|
9874 | stopx: x + conf.activationWidth,
|
9875 | stopy: undefined,
|
9876 | actor: message.from.actor,
|
9877 | anchored: _svgDraw2.default.anchorElement(diagram)
|
9878 | });
|
9879 | },
|
9880 | endActivation: function endActivation(message) {
|
9881 |
|
9882 | var lastActorActivationIdx = this.activations.map(function (activation) {
|
9883 | return activation.actor;
|
9884 | }).lastIndexOf(message.from.actor);
|
9885 | var activation = this.activations.splice(lastActorActivationIdx, 1)[0];
|
9886 | return activation;
|
9887 | },
|
9888 | newLoop: function newLoop(title) {
|
9889 | this.sequenceItems.push({ startx: undefined, starty: this.verticalPos, stopx: undefined, stopy: undefined, title: title });
|
9890 | },
|
9891 | endLoop: function endLoop() {
|
9892 | var loop = this.sequenceItems.pop();
|
9893 | return loop;
|
9894 | },
|
9895 | addSectionToLoop: function addSectionToLoop(message) {
|
9896 | var loop = this.sequenceItems.pop();
|
9897 | loop.sections = loop.sections || [];
|
9898 | loop.sectionTitles = loop.sectionTitles || [];
|
9899 | loop.sections.push(bounds.getVerticalPos());
|
9900 | loop.sectionTitles.push(message);
|
9901 | this.sequenceItems.push(loop);
|
9902 | },
|
9903 | bumpVerticalPos: function bumpVerticalPos(bump) {
|
9904 | this.verticalPos = this.verticalPos + bump;
|
9905 | this.data.stopy = this.verticalPos;
|
9906 | },
|
9907 | getVerticalPos: function getVerticalPos() {
|
9908 | return this.verticalPos;
|
9909 | },
|
9910 | getBounds: function getBounds() {
|
9911 | return this.data;
|
9912 | }
|
9913 |
|
9914 | |
9915 |
|
9916 |
|
9917 |
|
9918 |
|
9919 |
|
9920 | };var drawNote = function drawNote(elem, startx, verticalPos, msg, forceWidth) {
|
9921 | var rect = _svgDraw2.default.getNoteRect();
|
9922 | rect.x = startx;
|
9923 | rect.y = verticalPos;
|
9924 | rect.width = forceWidth || conf.width;
|
9925 | rect.class = 'note';
|
9926 |
|
9927 | var g = elem.append('g');
|
9928 | var rectElem = _svgDraw2.default.drawRect(g, rect);
|
9929 |
|
9930 | var textObj = _svgDraw2.default.getTextObj();
|
9931 | textObj.x = startx - 4;
|
9932 | textObj.y = verticalPos - 13;
|
9933 | textObj.textMargin = conf.noteMargin;
|
9934 | textObj.dy = '1em';
|
9935 | textObj.text = msg.message;
|
9936 | textObj.class = 'noteText';
|
9937 |
|
9938 | var textElem = _svgDraw2.default.drawText(g, textObj, rect.width - conf.noteMargin);
|
9939 |
|
9940 | var textHeight = textElem[0][0].getBBox().height;
|
9941 | if (!forceWidth && textHeight > conf.width) {
|
9942 | textElem.remove();
|
9943 | g = elem.append('g');
|
9944 |
|
9945 | textElem = _svgDraw2.default.drawText(g, textObj, 2 * rect.width - conf.noteMargin);
|
9946 | textHeight = textElem[0][0].getBBox().height;
|
9947 | rectElem.attr('width', 2 * rect.width);
|
9948 | bounds.insert(startx, verticalPos, startx + 2 * rect.width, verticalPos + 2 * conf.noteMargin + textHeight);
|
9949 | } else {
|
9950 | bounds.insert(startx, verticalPos, startx + rect.width, verticalPos + 2 * conf.noteMargin + textHeight);
|
9951 | }
|
9952 |
|
9953 | rectElem.attr('height', textHeight + 2 * conf.noteMargin);
|
9954 | bounds.bumpVerticalPos(textHeight + 2 * conf.noteMargin);
|
9955 | };
|
9956 |
|
9957 |
|
9958 |
|
9959 |
|
9960 |
|
9961 |
|
9962 |
|
9963 |
|
9964 |
|
9965 |
|
9966 | var drawMessage = function drawMessage(elem, startx, stopx, verticalPos, msg) {
|
9967 | var g = elem.append('g');
|
9968 | var txtCenter = startx + (stopx - startx) / 2;
|
9969 |
|
9970 | var textElem = g.append('text')
|
9971 | .attr('x', txtCenter).attr('y', verticalPos - 7).style('text-anchor', 'middle').attr('class', 'messageText').text(msg.message);
|
9972 |
|
9973 | var textWidth;
|
9974 |
|
9975 | if (typeof textElem[0][0].getBBox !== 'undefined') {
|
9976 | textWidth = textElem[0][0].getBBox().width;
|
9977 | } else {
|
9978 | textWidth = textElem[0][0].getBoundingClientRect();
|
9979 | }
|
9980 |
|
9981 | var line;
|
9982 |
|
9983 | if (startx === stopx) {
|
9984 | line = g.append('path').attr('d', 'M ' + startx + ',' + verticalPos + ' C ' + (startx + 60) + ',' + (verticalPos - 10) + ' ' + (startx + 60) + ',' + (verticalPos + 30) + ' ' + startx + ',' + (verticalPos + 20));
|
9985 |
|
9986 | bounds.bumpVerticalPos(30);
|
9987 | var dx = Math.max(textWidth / 2, 100);
|
9988 | bounds.insert(startx - dx, bounds.getVerticalPos() - 10, stopx + dx, bounds.getVerticalPos());
|
9989 | } else {
|
9990 | line = g.append('line');
|
9991 | line.attr('x1', startx);
|
9992 | line.attr('y1', verticalPos);
|
9993 | line.attr('x2', stopx);
|
9994 | line.attr('y2', verticalPos);
|
9995 | bounds.insert(startx, bounds.getVerticalPos() - 10, stopx, bounds.getVerticalPos());
|
9996 | }
|
9997 |
|
9998 |
|
9999 | if (msg.type === _sequenceDiagram.parser.yy.LINETYPE.DOTTED || msg.type === _sequenceDiagram.parser.yy.LINETYPE.DOTTED_CROSS || msg.type === _sequenceDiagram.parser.yy.LINETYPE.DOTTED_OPEN) {
|
10000 | line.style('stroke-dasharray', '3, 3');
|
10001 | line.attr('class', 'messageLine1');
|
10002 | } else {
|
10003 | line.attr('class', 'messageLine0');
|
10004 | }
|
10005 |
|
10006 | var url = '';
|
10007 | if (conf.arrowMarkerAbsolute) {
|
10008 | url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;
|
10009 | url = url.replace(/\(/g, '\\(');
|
10010 | url = url.replace(/\)/g, '\\)');
|
10011 | }
|
10012 |
|
10013 | line.attr('stroke-width', 2);
|
10014 | line.attr('stroke', 'black');
|
10015 | line.style('fill', 'none');
|
10016 | if (msg.type === _sequenceDiagram.parser.yy.LINETYPE.SOLID || msg.type === _sequenceDiagram.parser.yy.LINETYPE.DOTTED) {
|
10017 | line.attr('marker-end', 'url(' + url + '#arrowhead)');
|
10018 | }
|
10019 |
|
10020 | if (msg.type === _sequenceDiagram.parser.yy.LINETYPE.SOLID_CROSS || msg.type === _sequenceDiagram.parser.yy.LINETYPE.DOTTED_CROSS) {
|
10021 | line.attr('marker-end', 'url(' + url + '#crosshead)');
|
10022 | }
|
10023 | };
|
10024 |
|
10025 | var drawActors = exports.drawActors = function drawActors(diagram, actors, actorKeys, verticalPos) {
|
10026 | var i;
|
10027 |
|
10028 | for (i = 0; i < actorKeys.length; i++) {
|
10029 | var key = actorKeys[i];
|
10030 |
|
10031 |
|
10032 | actors[key].x = i * conf.actorMargin + i * conf.width;
|
10033 | actors[key].y = verticalPos;
|
10034 | actors[key].width = conf.diagramMarginX;
|
10035 | actors[key].height = conf.diagramMarginY;
|
10036 |
|
10037 |
|
10038 | _svgDraw2.default.drawActor(diagram, actors[key].x, verticalPos, actors[key].description, conf);
|
10039 | bounds.insert(actors[key].x, verticalPos, actors[key].x + conf.width, conf.height);
|
10040 | }
|
10041 |
|
10042 |
|
10043 | bounds.bumpVerticalPos(conf.height);
|
10044 | };
|
10045 |
|
10046 | var setConf = exports.setConf = function setConf(cnf) {
|
10047 | var keys = Object.keys(cnf);
|
10048 |
|
10049 | keys.forEach(function (key) {
|
10050 | conf[key] = cnf[key];
|
10051 | });
|
10052 | };
|
10053 |
|
10054 | var actorActivations = function actorActivations(actor) {
|
10055 | return bounds.activations.filter(function (activation) {
|
10056 | return activation.actor === actor;
|
10057 | });
|
10058 | };
|
10059 |
|
10060 | var actorFlowVerticaBounds = function actorFlowVerticaBounds(actor) {
|
10061 |
|
10062 | var actors = _sequenceDiagram.parser.yy.getActors();
|
10063 | var activations = actorActivations(actor);
|
10064 |
|
10065 | var left = activations.reduce(function (acc, activation) {
|
10066 | return Math.min(acc, activation.startx);
|
10067 | }, actors[actor].x + conf.width / 2);
|
10068 | var right = activations.reduce(function (acc, activation) {
|
10069 | return Math.max(acc, activation.stopx);
|
10070 | }, actors[actor].x + conf.width / 2);
|
10071 | return [left, right];
|
10072 | };
|
10073 |
|
10074 |
|
10075 |
|
10076 |
|
10077 |
|
10078 |
|
10079 | var draw = exports.draw = function draw(text, id) {
|
10080 | _sequenceDiagram.parser.yy.clear();
|
10081 | _sequenceDiagram.parser.parse(text + '\n');
|
10082 |
|
10083 | bounds.init();
|
10084 | var diagram = _d2.default.select('#' + id);
|
10085 |
|
10086 | var startx;
|
10087 | var stopx;
|
10088 | var forceWidth;
|
10089 |
|
10090 |
|
10091 | var actors = _sequenceDiagram.parser.yy.getActors();
|
10092 | var actorKeys = _sequenceDiagram.parser.yy.getActorKeys();
|
10093 | var messages = _sequenceDiagram.parser.yy.getMessages();
|
10094 | var title = _sequenceDiagram.parser.yy.getTitle();
|
10095 | drawActors(diagram, actors, actorKeys, 0);
|
10096 |
|
10097 |
|
10098 | _svgDraw2.default.insertArrowHead(diagram);
|
10099 | _svgDraw2.default.insertArrowCrossHead(diagram);
|
10100 |
|
10101 | function activeEnd(msg, verticalPos) {
|
10102 | var activationData = bounds.endActivation(msg);
|
10103 | if (activationData.starty + 18 > verticalPos) {
|
10104 | activationData.starty = verticalPos - 6;
|
10105 | verticalPos += 12;
|
10106 | }
|
10107 | _svgDraw2.default.drawActivation(diagram, activationData, verticalPos, conf);
|
10108 |
|
10109 | bounds.insert(activationData.startx, verticalPos - 10, activationData.stopx, verticalPos);
|
10110 | }
|
10111 |
|
10112 |
|
10113 |
|
10114 |
|
10115 | messages.forEach(function (msg) {
|
10116 | var loopData;
|
10117 |
|
10118 | switch (msg.type) {
|
10119 | case _sequenceDiagram.parser.yy.LINETYPE.NOTE:
|
10120 | bounds.bumpVerticalPos(conf.boxMargin);
|
10121 |
|
10122 | startx = actors[msg.from].x;
|
10123 | stopx = actors[msg.to].x;
|
10124 |
|
10125 | if (msg.placement === _sequenceDiagram.parser.yy.PLACEMENT.RIGHTOF) {
|
10126 | drawNote(diagram, startx + (conf.width + conf.actorMargin) / 2, bounds.getVerticalPos(), msg);
|
10127 | } else if (msg.placement === _sequenceDiagram.parser.yy.PLACEMENT.LEFTOF) {
|
10128 | drawNote(diagram, startx - (conf.width + conf.actorMargin) / 2, bounds.getVerticalPos(), msg);
|
10129 | } else if (msg.to === msg.from) {
|
10130 |
|
10131 | drawNote(diagram, startx, bounds.getVerticalPos(), msg);
|
10132 | } else {
|
10133 |
|
10134 | forceWidth = Math.abs(startx - stopx) + conf.actorMargin;
|
10135 | drawNote(diagram, (startx + stopx + conf.width - forceWidth) / 2, bounds.getVerticalPos(), msg, forceWidth);
|
10136 | }
|
10137 | break;
|
10138 | case _sequenceDiagram.parser.yy.LINETYPE.ACTIVE_START:
|
10139 | bounds.newActivation(msg, diagram);
|
10140 | break;
|
10141 | case _sequenceDiagram.parser.yy.LINETYPE.ACTIVE_END:
|
10142 | activeEnd(msg, bounds.getVerticalPos());
|
10143 | break;
|
10144 | case _sequenceDiagram.parser.yy.LINETYPE.LOOP_START:
|
10145 | bounds.bumpVerticalPos(conf.boxMargin);
|
10146 | bounds.newLoop(msg.message);
|
10147 | bounds.bumpVerticalPos(conf.boxMargin + conf.boxTextMargin);
|
10148 | break;
|
10149 | case _sequenceDiagram.parser.yy.LINETYPE.LOOP_END:
|
10150 | loopData = bounds.endLoop();
|
10151 |
|
10152 | _svgDraw2.default.drawLoop(diagram, loopData, 'loop', conf);
|
10153 | bounds.bumpVerticalPos(conf.boxMargin);
|
10154 | break;
|
10155 | case _sequenceDiagram.parser.yy.LINETYPE.OPT_START:
|
10156 | bounds.bumpVerticalPos(conf.boxMargin);
|
10157 | bounds.newLoop(msg.message);
|
10158 | bounds.bumpVerticalPos(conf.boxMargin + conf.boxTextMargin);
|
10159 | break;
|
10160 | case _sequenceDiagram.parser.yy.LINETYPE.OPT_END:
|
10161 | loopData = bounds.endLoop();
|
10162 |
|
10163 | _svgDraw2.default.drawLoop(diagram, loopData, 'opt', conf);
|
10164 | bounds.bumpVerticalPos(conf.boxMargin);
|
10165 | break;
|
10166 | case _sequenceDiagram.parser.yy.LINETYPE.ALT_START:
|
10167 | bounds.bumpVerticalPos(conf.boxMargin);
|
10168 | bounds.newLoop(msg.message);
|
10169 | bounds.bumpVerticalPos(conf.boxMargin + conf.boxTextMargin);
|
10170 | break;
|
10171 | case _sequenceDiagram.parser.yy.LINETYPE.ALT_ELSE:
|
10172 | bounds.bumpVerticalPos(conf.boxMargin);
|
10173 | loopData = bounds.addSectionToLoop(msg.message);
|
10174 | bounds.bumpVerticalPos(conf.boxMargin);
|
10175 | break;
|
10176 | case _sequenceDiagram.parser.yy.LINETYPE.ALT_END:
|
10177 | loopData = bounds.endLoop();
|
10178 |
|
10179 | _svgDraw2.default.drawLoop(diagram, loopData, 'alt', conf);
|
10180 | bounds.bumpVerticalPos(conf.boxMargin);
|
10181 | break;
|
10182 | case _sequenceDiagram.parser.yy.LINETYPE.PAR_START:
|
10183 | bounds.bumpVerticalPos(conf.boxMargin);
|
10184 | bounds.newLoop(msg.message);
|
10185 | bounds.bumpVerticalPos(conf.boxMargin + conf.boxTextMargin);
|
10186 | break;
|
10187 | case _sequenceDiagram.parser.yy.LINETYPE.PAR_AND:
|
10188 | bounds.bumpVerticalPos(conf.boxMargin);
|
10189 | loopData = bounds.addSectionToLoop(msg.message);
|
10190 | bounds.bumpVerticalPos(conf.boxMargin);
|
10191 | break;
|
10192 | case _sequenceDiagram.parser.yy.LINETYPE.PAR_END:
|
10193 | loopData = bounds.endLoop();
|
10194 | _svgDraw2.default.drawLoop(diagram, loopData, 'par', conf);
|
10195 | bounds.bumpVerticalPos(conf.boxMargin);
|
10196 | break;
|
10197 | default:
|
10198 | try {
|
10199 |
|
10200 | bounds.bumpVerticalPos(conf.messageMargin);
|
10201 | var fromBounds = actorFlowVerticaBounds(msg.from);
|
10202 | var toBounds = actorFlowVerticaBounds(msg.to);
|
10203 | var fromIdx = fromBounds[0] <= toBounds[0] ? 1 : 0;
|
10204 | var toIdx = fromBounds[0] < toBounds[0] ? 0 : 1;
|
10205 | startx = fromBounds[fromIdx];
|
10206 | stopx = toBounds[toIdx];
|
10207 |
|
10208 | var verticalPos = bounds.getVerticalPos();
|
10209 | drawMessage(diagram, startx, stopx, verticalPos, msg);
|
10210 | var allBounds = fromBounds.concat(toBounds);
|
10211 | bounds.insert(Math.min.apply(null, allBounds), verticalPos, Math.max.apply(null, allBounds), verticalPos);
|
10212 | } catch (e) {
|
10213 | console.error('error while drawing message', e);
|
10214 | }
|
10215 | }
|
10216 | });
|
10217 |
|
10218 | if (conf.mirrorActors) {
|
10219 |
|
10220 | bounds.bumpVerticalPos(conf.boxMargin * 2);
|
10221 | drawActors(diagram, actors, actorKeys, bounds.getVerticalPos());
|
10222 | }
|
10223 |
|
10224 | var box = bounds.getBounds();
|
10225 |
|
10226 |
|
10227 | _logger.logger.debug('For line height fix Querying: #' + id + ' .actor-line');
|
10228 | var actorLines = _d2.default.selectAll('#' + id + ' .actor-line');
|
10229 | actorLines.attr('y2', box.stopy);
|
10230 |
|
10231 | var height = box.stopy - box.starty + 2 * conf.diagramMarginY;
|
10232 |
|
10233 | if (conf.mirrorActors) {
|
10234 | height = height - conf.boxMargin + conf.bottomMarginAdj;
|
10235 | }
|
10236 |
|
10237 | var width = box.stopx - box.startx + 2 * conf.diagramMarginX;
|
10238 |
|
10239 | if (title) {
|
10240 | diagram.append('text').text(title).attr('x', (box.stopx - box.startx) / 2 - 2 * conf.diagramMarginX).attr('y', -25);
|
10241 | }
|
10242 |
|
10243 | if (conf.useMaxWidth) {
|
10244 | diagram.attr('height', '100%');
|
10245 | diagram.attr('width', '100%');
|
10246 | diagram.attr('style', 'max-width:' + width + 'px;');
|
10247 | } else {
|
10248 | diagram.attr('height', height);
|
10249 | diagram.attr('width', width);
|
10250 | }
|
10251 | var extraVertForTitle = title ? 40 : 0;
|
10252 | diagram.attr('viewBox', box.startx - conf.diagramMarginX + ' -' + (conf.diagramMarginY + extraVertForTitle) + ' ' + width + ' ' + (height + extraVertForTitle));
|
10253 | };
|
10254 |
|
10255 | exports.default = {
|
10256 | bounds: bounds,
|
10257 | drawActors: drawActors,
|
10258 | setConf: setConf,
|
10259 | draw: draw
|
10260 | };
|
10261 |
|
10262 | }),
|
10263 |
|
10264 | (function(module, exports, __webpack_require__) {
|
10265 |
|
10266 | "use strict";
|
10267 |
|
10268 |
|
10269 | Object.defineProperty(exports, "__esModule", {
|
10270 | value: true
|
10271 | });
|
10272 | var drawRect = exports.drawRect = function drawRect(elem, rectData) {
|
10273 | var rectElem = elem.append('rect');
|
10274 | rectElem.attr('x', rectData.x);
|
10275 | rectElem.attr('y', rectData.y);
|
10276 | rectElem.attr('fill', rectData.fill);
|
10277 | rectElem.attr('stroke', rectData.stroke);
|
10278 | rectElem.attr('width', rectData.width);
|
10279 | rectElem.attr('height', rectData.height);
|
10280 | rectElem.attr('rx', rectData.rx);
|
10281 | rectElem.attr('ry', rectData.ry);
|
10282 |
|
10283 | if (typeof rectData.class !== 'undefined') {
|
10284 | rectElem.attr('class', rectData.class);
|
10285 | }
|
10286 |
|
10287 | return rectElem;
|
10288 | };
|
10289 |
|
10290 | var drawText = exports.drawText = function drawText(elem, textData, width) {
|
10291 |
|
10292 | var nText = textData.text.replace(/<br\/?>/ig, ' ');
|
10293 |
|
10294 | var textElem = elem.append('text');
|
10295 | textElem.attr('x', textData.x);
|
10296 | textElem.attr('y', textData.y);
|
10297 | textElem.style('text-anchor', textData.anchor);
|
10298 | textElem.attr('fill', textData.fill);
|
10299 | if (typeof textData.class !== 'undefined') {
|
10300 | textElem.attr('class', textData.class);
|
10301 | }
|
10302 |
|
10303 | var span = textElem.append('tspan');
|
10304 | span.attr('x', textData.x + textData.textMargin * 2);
|
10305 | span.attr('fill', textData.fill);
|
10306 | span.text(nText);
|
10307 | if (typeof textElem.textwrap !== 'undefined') {
|
10308 | textElem.textwrap({
|
10309 | x: textData.x,
|
10310 | y: textData.y,
|
10311 | width: width,
|
10312 | height: 1800
|
10313 | }, textData.textMargin);
|
10314 | }
|
10315 |
|
10316 | return textElem;
|
10317 | };
|
10318 |
|
10319 | var drawLabel = exports.drawLabel = function drawLabel(elem, txtObject) {
|
10320 | function genPoints(x, y, width, height, cut) {
|
10321 | return x + ',' + y + ' ' + (x + width) + ',' + y + ' ' + (x + width) + ',' + (y + height - cut) + ' ' + (x + width - cut * 1.2) + ',' + (y + height) + ' ' + x + ',' + (y + height);
|
10322 | }
|
10323 | var polygon = elem.append('polygon');
|
10324 | polygon.attr('points', genPoints(txtObject.x, txtObject.y, 50, 20, 7));
|
10325 | polygon.attr('class', 'labelBox');
|
10326 |
|
10327 | txtObject.y = txtObject.y + txtObject.labelMargin;
|
10328 | txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;
|
10329 | drawText(elem, txtObject);
|
10330 | };
|
10331 | var actorCnt = -1;
|
10332 |
|
10333 |
|
10334 |
|
10335 |
|
10336 |
|
10337 |
|
10338 | var drawActor = exports.drawActor = function drawActor(elem, left, verticalPos, description, conf) {
|
10339 | var center = left + conf.width / 2;
|
10340 | var g = elem.append('g');
|
10341 | if (verticalPos === 0) {
|
10342 | actorCnt++;
|
10343 | 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');
|
10344 | }
|
10345 |
|
10346 | var rect = getNoteRect();
|
10347 | rect.x = left;
|
10348 | rect.y = verticalPos;
|
10349 | rect.fill = '#eaeaea';
|
10350 | rect.width = conf.width;
|
10351 | rect.height = conf.height;
|
10352 | rect.class = 'actor';
|
10353 | rect.rx = 3;
|
10354 | rect.ry = 3;
|
10355 | drawRect(g, rect);
|
10356 |
|
10357 | _drawTextCandidateFunc(conf)(description, g, rect.x, rect.y, rect.width, rect.height, { 'class': 'actor' });
|
10358 | };
|
10359 |
|
10360 | var anchorElement = exports.anchorElement = function anchorElement(elem) {
|
10361 | return elem.append('g');
|
10362 | };
|
10363 |
|
10364 |
|
10365 |
|
10366 |
|
10367 |
|
10368 |
|
10369 | var drawActivation = exports.drawActivation = function drawActivation(elem, bounds, verticalPos) {
|
10370 | var rect = getNoteRect();
|
10371 | var g = bounds.anchored;
|
10372 | rect.x = bounds.startx;
|
10373 | rect.y = bounds.starty;
|
10374 | rect.fill = '#f4f4f4';
|
10375 | rect.width = bounds.stopx - bounds.startx;
|
10376 | rect.height = verticalPos - bounds.starty;
|
10377 | drawRect(g, rect);
|
10378 | };
|
10379 |
|
10380 |
|
10381 |
|
10382 |
|
10383 |
|
10384 |
|
10385 |
|
10386 | var drawLoop = exports.drawLoop = function drawLoop(elem, bounds, labelText, conf) {
|
10387 | var g = elem.append('g');
|
10388 | var drawLoopLine = function drawLoopLine(startx, starty, stopx, stopy) {
|
10389 | return g.append('line').attr('x1', startx).attr('y1', starty).attr('x2', stopx).attr('y2', stopy).attr('class', 'loopLine');
|
10390 | };
|
10391 | drawLoopLine(bounds.startx, bounds.starty, bounds.stopx, bounds.starty);
|
10392 | drawLoopLine(bounds.stopx, bounds.starty, bounds.stopx, bounds.stopy);
|
10393 | drawLoopLine(bounds.startx, bounds.stopy, bounds.stopx, bounds.stopy);
|
10394 | drawLoopLine(bounds.startx, bounds.starty, bounds.startx, bounds.stopy);
|
10395 | if (typeof bounds.sections !== 'undefined') {
|
10396 | bounds.sections.forEach(function (item) {
|
10397 | drawLoopLine(bounds.startx, item, bounds.stopx, item).style('stroke-dasharray', '3, 3');
|
10398 | });
|
10399 | }
|
10400 |
|
10401 | var txt = getTextObj();
|
10402 | txt.text = labelText;
|
10403 | txt.x = bounds.startx;
|
10404 | txt.y = bounds.starty;
|
10405 | txt.labelMargin = 1.5 * 10;
|
10406 | txt.class = 'labelText';
|
10407 |
|
10408 | drawLabel(g, txt);
|
10409 |
|
10410 | txt = getTextObj();
|
10411 | txt.text = '[ ' + bounds.title + ' ]';
|
10412 | txt.x = bounds.startx + (bounds.stopx - bounds.startx) / 2;
|
10413 | txt.y = bounds.starty + 1.5 * conf.boxMargin;
|
10414 | txt.anchor = 'middle';
|
10415 | txt.class = 'loopText';
|
10416 |
|
10417 | drawText(g, txt);
|
10418 |
|
10419 | if (typeof bounds.sectionTitles !== 'undefined') {
|
10420 | bounds.sectionTitles.forEach(function (item, idx) {
|
10421 | if (item !== '') {
|
10422 | txt.text = '[ ' + item + ' ]';
|
10423 | txt.y = bounds.sections[idx] + 1.5 * conf.boxMargin;
|
10424 | drawText(g, txt);
|
10425 | }
|
10426 | });
|
10427 | }
|
10428 | };
|
10429 |
|
10430 |
|
10431 |
|
10432 |
|
10433 | var insertArrowHead = exports.insertArrowHead = function insertArrowHead(elem) {
|
10434 | 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');
|
10435 | };
|
10436 |
|
10437 |
|
10438 |
|
10439 | var insertArrowCrossHead = exports.insertArrowCrossHead = function insertArrowCrossHead(elem) {
|
10440 | var defs = elem.append('defs');
|
10441 | var marker = defs.append('marker').attr('id', 'crosshead').attr('markerWidth', 15).attr('markerHeight', 8).attr('orient', 'auto').attr('refX', 16).attr('refY', 4);
|
10442 |
|
10443 |
|
10444 | 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');
|
10445 |
|
10446 |
|
10447 | 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');
|
10448 |
|
10449 | };
|
10450 |
|
10451 | var getTextObj = exports.getTextObj = function getTextObj() {
|
10452 | var txt = {
|
10453 | x: 0,
|
10454 | y: 0,
|
10455 | 'fill': 'black',
|
10456 | 'text-anchor': 'start',
|
10457 | style: '#666',
|
10458 | width: 100,
|
10459 | height: 100,
|
10460 | textMargin: 0,
|
10461 | rx: 0,
|
10462 | ry: 0
|
10463 | };
|
10464 | return txt;
|
10465 | };
|
10466 |
|
10467 | var getNoteRect = exports.getNoteRect = function getNoteRect() {
|
10468 | var rect = {
|
10469 | x: 0,
|
10470 | y: 0,
|
10471 | fill: '#EDF2AE',
|
10472 | stroke: '#666',
|
10473 | width: 100,
|
10474 | anchor: 'start',
|
10475 | height: 100,
|
10476 | rx: 0,
|
10477 | ry: 0
|
10478 | };
|
10479 | return rect;
|
10480 | };
|
10481 |
|
10482 | var _drawTextCandidateFunc = function () {
|
10483 | function byText(content, g, x, y, width, height, textAttrs) {
|
10484 | var text = g.append('text').attr('x', x + width / 2).attr('y', y + height / 2 + 5).style('text-anchor', 'middle').text(content);
|
10485 | _setTextAttrs(text, textAttrs);
|
10486 | }
|
10487 |
|
10488 | function byTspan(content, g, x, y, width, height, textAttrs) {
|
10489 | var text = g.append('text').attr('x', x + width / 2).attr('y', y).style('text-anchor', 'middle');
|
10490 | text.append('tspan').attr('x', x + width / 2).attr('dy', '0').text(content);
|
10491 |
|
10492 | if (typeof text.textwrap !== 'undefined') {
|
10493 | text.textwrap({
|
10494 | x: x + width / 2, y: y, width: width, height: height
|
10495 | }, 0);
|
10496 |
|
10497 | var tspans = text.selectAll('tspan');
|
10498 | if (tspans.length > 0 && tspans[0].length > 0) {
|
10499 | tspans = tspans[0];
|
10500 |
|
10501 | text.attr('y', y + (height / 2.0 - text[0][0].getBBox().height * (1 - 1.0 / tspans.length) / 2.0)).attr('dominant-baseline', 'central').attr('alignment-baseline', 'central');
|
10502 | }
|
10503 | }
|
10504 | _setTextAttrs(text, textAttrs);
|
10505 | }
|
10506 |
|
10507 | function byFo(content, g, x, y, width, height, textAttrs) {
|
10508 | var s = g.append('switch');
|
10509 | var f = s.append('foreignObject').attr('x', x).attr('y', y).attr('width', width).attr('height', height);
|
10510 |
|
10511 | var text = f.append('div').style('display', 'table').style('height', '100%').style('width', '100%');
|
10512 |
|
10513 | text.append('div').style('display', 'table-cell').style('text-align', 'center').style('vertical-align', 'middle').text(content);
|
10514 |
|
10515 | byTspan(content, s, x, y, width, height, textAttrs);
|
10516 | _setTextAttrs(text, textAttrs);
|
10517 | }
|
10518 |
|
10519 | function _setTextAttrs(toText, fromTextAttrsDict) {
|
10520 | for (var key in fromTextAttrsDict) {
|
10521 | if (fromTextAttrsDict.hasOwnProperty(key)) {
|
10522 | toText.attr(key, fromTextAttrsDict[key]);
|
10523 | }
|
10524 | }
|
10525 | }
|
10526 |
|
10527 | return function (conf) {
|
10528 | return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;
|
10529 | };
|
10530 | }();
|
10531 |
|
10532 | exports.default = {
|
10533 | drawRect: drawRect,
|
10534 | drawText: drawText,
|
10535 | drawLabel: drawLabel,
|
10536 | drawActor: drawActor,
|
10537 | anchorElement: anchorElement,
|
10538 | drawActivation: drawActivation,
|
10539 | drawLoop: drawLoop,
|
10540 | insertArrowHead: insertArrowHead,
|
10541 | insertArrowCrossHead: insertArrowCrossHead,
|
10542 | getTextObj: getTextObj,
|
10543 | getNoteRect: getNoteRect
|
10544 | };
|
10545 |
|
10546 | }),
|
10547 |
|
10548 | (function(module, exports, __webpack_require__) {
|
10549 |
|
10550 | "use strict";
|
10551 |
|
10552 |
|
10553 | Object.defineProperty(exports, "__esModule", {
|
10554 | value: true
|
10555 | });
|
10556 | exports.draw = undefined;
|
10557 |
|
10558 | var _exampleDb = __webpack_require__(14);
|
10559 |
|
10560 | var _exampleDb2 = _interopRequireDefault(_exampleDb);
|
10561 |
|
10562 | var _example = __webpack_require__(15);
|
10563 |
|
10564 | var _example2 = _interopRequireDefault(_example);
|
10565 |
|
10566 | var _d = __webpack_require__(1);
|
10567 |
|
10568 | var _d2 = _interopRequireDefault(_d);
|
10569 |
|
10570 | var _logger = __webpack_require__(0);
|
10571 |
|
10572 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
10573 |
|
10574 |
|
10575 |
|
10576 |
|
10577 |
|
10578 |
|
10579 | var draw = exports.draw = function draw(txt, id, ver) {
|
10580 | var parser;
|
10581 | parser = _example2.default.parser;
|
10582 | parser.yy = _exampleDb2.default;
|
10583 | _logger.logger.debug('Renering example diagram');
|
10584 |
|
10585 | parser.parse(txt);
|
10586 |
|
10587 |
|
10588 | var svg = _d2.default.select('#' + id);
|
10589 |
|
10590 | var g = svg.append('g');
|
10591 |
|
10592 | g.append('text')
|
10593 | .attr('x', 100).attr('y', 40).attr('class', 'version').attr('font-size', '32px').style('text-anchor', 'middle').text('mermaid ' + ver);
|
10594 |
|
10595 | svg.attr('height', 100);
|
10596 | svg.attr('width', 400);
|
10597 | };
|
10598 |
|
10599 | exports.default = {
|
10600 | draw: draw
|
10601 | };
|
10602 |
|
10603 | }),
|
10604 |
|
10605 | (function(module, exports, __webpack_require__) {
|
10606 |
|
10607 | "use strict";
|
10608 |
|
10609 |
|
10610 | Object.defineProperty(exports, "__esModule", {
|
10611 | value: true
|
10612 | });
|
10613 | exports.draw = exports.setConf = undefined;
|
10614 |
|
10615 | var _moment = __webpack_require__(7);
|
10616 |
|
10617 | var _moment2 = _interopRequireDefault(_moment);
|
10618 |
|
10619 | var _gantt = __webpack_require__(16);
|
10620 |
|
10621 | var _ganttDb = __webpack_require__(17);
|
10622 |
|
10623 | var _ganttDb2 = _interopRequireDefault(_ganttDb);
|
10624 |
|
10625 | var _d = __webpack_require__(1);
|
10626 |
|
10627 | var _d2 = _interopRequireDefault(_d);
|
10628 |
|
10629 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
10630 |
|
10631 | _gantt.parser.yy = _ganttDb2.default;
|
10632 |
|
10633 | var daysInChart;
|
10634 | var conf = {
|
10635 | titleTopMargin: 25,
|
10636 | barHeight: 20,
|
10637 | barGap: 4,
|
10638 | topPadding: 50,
|
10639 | rightPadding: 75,
|
10640 | leftPadding: 75,
|
10641 | gridLineStartPadding: 35,
|
10642 | fontSize: 11,
|
10643 | fontFamily: '"Open-Sans", "sans-serif"'
|
10644 | };
|
10645 | var setConf = exports.setConf = function setConf(cnf) {
|
10646 | var keys = Object.keys(cnf);
|
10647 |
|
10648 | keys.forEach(function (key) {
|
10649 | conf[key] = cnf[key];
|
10650 | });
|
10651 | };
|
10652 | var w;
|
10653 | var draw = exports.draw = function draw(text, id) {
|
10654 | _gantt.parser.yy.clear();
|
10655 | _gantt.parser.parse(text);
|
10656 |
|
10657 | var elem = document.getElementById(id);
|
10658 | w = elem.parentElement.offsetWidth;
|
10659 |
|
10660 | if (typeof w === 'undefined') {
|
10661 | w = 1200;
|
10662 | }
|
10663 |
|
10664 | if (typeof conf.useWidth !== 'undefined') {
|
10665 | w = conf.useWidth;
|
10666 | }
|
10667 |
|
10668 | var taskArray = _gantt.parser.yy.getTasks();
|
10669 |
|
10670 |
|
10671 | var h = taskArray.length * (conf.barHeight + conf.barGap) + 2 * conf.topPadding;
|
10672 |
|
10673 | elem.setAttribute('height', '100%');
|
10674 |
|
10675 | elem.setAttribute('viewBox', '0 0 ' + w + ' ' + h);
|
10676 | var svg = _d2.default.select('#' + id);
|
10677 |
|
10678 | var startDate = _d2.default.min(taskArray, function (d) {
|
10679 | return d.startTime;
|
10680 | });
|
10681 | var endDate = _d2.default.max(taskArray, function (d) {
|
10682 | return d.endTime;
|
10683 | });
|
10684 |
|
10685 |
|
10686 | var timeScale = _d2.default.time.scale().domain([_d2.default.min(taskArray, function (d) {
|
10687 | return d.startTime;
|
10688 | }), _d2.default.max(taskArray, function (d) {
|
10689 | return d.endTime;
|
10690 | })]).rangeRound([0, w - conf.leftPadding - conf.rightPadding]);
|
10691 |
|
10692 | var categories = [];
|
10693 |
|
10694 | daysInChart = _moment2.default.duration(endDate - startDate).asDays();
|
10695 |
|
10696 | for (var i = 0; i < taskArray.length; i++) {
|
10697 | categories.push(taskArray[i].type);
|
10698 | }
|
10699 |
|
10700 | var catsUnfiltered = categories;
|
10701 |
|
10702 | categories = checkUnique(categories);
|
10703 |
|
10704 | makeGant(taskArray, w, h);
|
10705 | if (typeof conf.useWidth !== 'undefined') {
|
10706 | elem.setAttribute('width', w);
|
10707 | }
|
10708 |
|
10709 | svg.append('text').text(_gantt.parser.yy.getTitle()).attr('x', w / 2).attr('y', conf.titleTopMargin).attr('class', 'titleText');
|
10710 |
|
10711 | function makeGant(tasks, pageWidth, pageHeight) {
|
10712 | var barHeight = conf.barHeight;
|
10713 | var gap = barHeight + conf.barGap;
|
10714 | var topPadding = conf.topPadding;
|
10715 | var leftPadding = conf.leftPadding;
|
10716 |
|
10717 | var colorScale = _d2.default.scale.linear().domain([0, categories.length]).range(['#00B9FA', '#F95002']).interpolate(_d2.default.interpolateHcl);
|
10718 |
|
10719 | makeGrid(leftPadding, topPadding, pageWidth, pageHeight);
|
10720 | drawRects(tasks, gap, topPadding, leftPadding, barHeight, colorScale, pageWidth, pageHeight);
|
10721 | vertLabels(gap, topPadding, leftPadding, barHeight, colorScale);
|
10722 | drawToday(leftPadding, topPadding, pageWidth, pageHeight);
|
10723 | }
|
10724 |
|
10725 | function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w, h) {
|
10726 | svg.append('g').selectAll('rect').data(theArray).enter().append('rect').attr('x', 0).attr('y', function (d, i) {
|
10727 | return i * theGap + theTopPad - 2;
|
10728 | }).attr('width', function () {
|
10729 | return w - conf.rightPadding / 2;
|
10730 | }).attr('height', theGap).attr('class', function (d) {
|
10731 | for (var i = 0; i < categories.length; i++) {
|
10732 | if (d.type === categories[i]) {
|
10733 | return 'section section' + i % conf.numberSectionStyles;
|
10734 | }
|
10735 | }
|
10736 | return 'section section0';
|
10737 | });
|
10738 |
|
10739 | var rectangles = svg.append('g').selectAll('rect').data(theArray).enter();
|
10740 |
|
10741 | rectangles.append('rect').attr('rx', 3).attr('ry', 3).attr('x', function (d) {
|
10742 | return timeScale(d.startTime) + theSidePad;
|
10743 | }).attr('y', function (d, i) {
|
10744 | return i * theGap + theTopPad;
|
10745 | }).attr('width', function (d) {
|
10746 | return timeScale(d.endTime) - timeScale(d.startTime);
|
10747 | }).attr('height', theBarHeight).attr('class', function (d) {
|
10748 | var res = 'task ';
|
10749 |
|
10750 | var secNum = 0;
|
10751 | for (var i = 0; i < categories.length; i++) {
|
10752 | if (d.type === categories[i]) {
|
10753 | secNum = i % conf.numberSectionStyles;
|
10754 | }
|
10755 | }
|
10756 |
|
10757 | if (d.active) {
|
10758 | if (d.crit) {
|
10759 | return res + ' activeCrit' + secNum;
|
10760 | } else {
|
10761 | return res + ' active' + secNum;
|
10762 | }
|
10763 | }
|
10764 |
|
10765 | if (d.done) {
|
10766 | if (d.crit) {
|
10767 | return res + ' doneCrit' + secNum;
|
10768 | } else {
|
10769 | return res + ' done' + secNum;
|
10770 | }
|
10771 | }
|
10772 |
|
10773 | if (d.crit) {
|
10774 | return res + ' crit' + secNum;
|
10775 | }
|
10776 |
|
10777 | return res + ' task' + secNum;
|
10778 | });
|
10779 |
|
10780 | rectangles.append('text').text(function (d) {
|
10781 | return d.task;
|
10782 | }).attr('font-size', conf.fontSize).attr('x', function (d) {
|
10783 | var startX = timeScale(d.startTime);
|
10784 | var endX = timeScale(d.endTime);
|
10785 | var textWidth = this.getBBox().width;
|
10786 |
|
10787 |
|
10788 | if (textWidth > endX - startX) {
|
10789 | if (endX + textWidth + 1.5 * conf.leftPadding > w) {
|
10790 | return startX + theSidePad - 5;
|
10791 | } else {
|
10792 | return endX + theSidePad + 5;
|
10793 | }
|
10794 | } else {
|
10795 | return (endX - startX) / 2 + startX + theSidePad;
|
10796 | }
|
10797 | }).attr('y', function (d, i) {
|
10798 | return i * theGap + conf.barHeight / 2 + (conf.fontSize / 2 - 2) + theTopPad;
|
10799 | }).attr('text-height', theBarHeight).attr('class', function (d) {
|
10800 | var startX = timeScale(d.startTime);
|
10801 | var endX = timeScale(d.endTime);
|
10802 | var textWidth = this.getBBox().width;
|
10803 | var secNum = 0;
|
10804 | for (var i = 0; i < categories.length; i++) {
|
10805 | if (d.type === categories[i]) {
|
10806 | secNum = i % conf.numberSectionStyles;
|
10807 | }
|
10808 | }
|
10809 |
|
10810 | var taskType = '';
|
10811 | if (d.active) {
|
10812 | if (d.crit) {
|
10813 | taskType = 'activeCritText' + secNum;
|
10814 | } else {
|
10815 | taskType = 'activeText' + secNum;
|
10816 | }
|
10817 | }
|
10818 |
|
10819 | if (d.done) {
|
10820 | if (d.crit) {
|
10821 | taskType = taskType + ' doneCritText' + secNum;
|
10822 | } else {
|
10823 | taskType = taskType + ' doneText' + secNum;
|
10824 | }
|
10825 | } else {
|
10826 | if (d.crit) {
|
10827 | taskType = taskType + ' critText' + secNum;
|
10828 | }
|
10829 | }
|
10830 |
|
10831 |
|
10832 | if (textWidth > endX - startX) {
|
10833 | if (endX + textWidth + 1.5 * conf.leftPadding > w) {
|
10834 | return 'taskTextOutsideLeft taskTextOutside' + secNum + ' ' + taskType;
|
10835 | } else {
|
10836 | return 'taskTextOutsideRight taskTextOutside' + secNum + ' ' + taskType;
|
10837 | }
|
10838 | } else {
|
10839 | return 'taskText taskText' + secNum + ' ' + taskType;
|
10840 | }
|
10841 | });
|
10842 | }
|
10843 |
|
10844 | function makeGrid(theSidePad, theTopPad, w, h) {
|
10845 | var pre = [['.%L', function (d) {
|
10846 | return d.getMilliseconds();
|
10847 | }], [':%S', function (d) {
|
10848 | return d.getSeconds();
|
10849 | }],
|
10850 |
|
10851 | ['h1 %I:%M', function (d) {
|
10852 | return d.getMinutes();
|
10853 | }]];
|
10854 | var post = [['%Y', function () {
|
10855 | return true;
|
10856 | }]];
|
10857 |
|
10858 | var mid = [
|
10859 |
|
10860 | ['%I:%M', function (d) {
|
10861 | return d.getHours();
|
10862 | }],
|
10863 |
|
10864 | ['%a %d', function (d) {
|
10865 | return d.getDay() && d.getDate() !== 1;
|
10866 | }],
|
10867 |
|
10868 | ['%b %d', function (d) {
|
10869 | return d.getDate() !== 1;
|
10870 | }],
|
10871 |
|
10872 | ['%B', function (d) {
|
10873 | return d.getMonth();
|
10874 | }]];
|
10875 | var formatter;
|
10876 | if (typeof conf.axisFormatter !== 'undefined') {
|
10877 | mid = [];
|
10878 | conf.axisFormatter.forEach(function (item) {
|
10879 | var n = [];
|
10880 | n[0] = item[0];
|
10881 | n[1] = item[1];
|
10882 | mid.push(n);
|
10883 | });
|
10884 | }
|
10885 | formatter = pre.concat(mid).concat(post);
|
10886 |
|
10887 | var xAxis = _d2.default.svg.axis().scale(timeScale).orient('bottom').tickSize(-h + theTopPad + conf.gridLineStartPadding, 0, 0).tickFormat(_d2.default.time.format.multi(formatter));
|
10888 |
|
10889 | if (daysInChart > 7 && daysInChart < 230) {
|
10890 | xAxis = xAxis.ticks(_d2.default.time.monday.range);
|
10891 | }
|
10892 |
|
10893 | 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');
|
10894 | }
|
10895 |
|
10896 | function vertLabels(theGap, theTopPad) {
|
10897 | var numOccurances = [];
|
10898 | var prevGap = 0;
|
10899 |
|
10900 | for (var i = 0; i < categories.length; i++) {
|
10901 | numOccurances[i] = [categories[i], getCount(categories[i], catsUnfiltered)];
|
10902 | }
|
10903 |
|
10904 | svg.append('g')
|
10905 | .selectAll('text').data(numOccurances).enter().append('text').text(function (d) {
|
10906 | return d[0];
|
10907 | }).attr('x', 10).attr('y', function (d, i) {
|
10908 | if (i > 0) {
|
10909 | for (var j = 0; j < i; j++) {
|
10910 | prevGap += numOccurances[i - 1][1];
|
10911 | return d[1] * theGap / 2 + prevGap * theGap + theTopPad;
|
10912 | }
|
10913 | } else {
|
10914 | return d[1] * theGap / 2 + theTopPad;
|
10915 | }
|
10916 | }).attr('class', function (d) {
|
10917 | for (var i = 0; i < categories.length; i++) {
|
10918 | if (d[0] === categories[i]) {
|
10919 | return 'sectionTitle sectionTitle' + i % conf.numberSectionStyles;
|
10920 | }
|
10921 | }
|
10922 | return 'sectionTitle';
|
10923 | });
|
10924 | }
|
10925 |
|
10926 | function drawToday(theSidePad, theTopPad, w, h) {
|
10927 | var todayG = svg.append('g').attr('class', 'today');
|
10928 |
|
10929 | var today = new Date();
|
10930 |
|
10931 | 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');
|
10932 | }
|
10933 |
|
10934 |
|
10935 | function checkUnique(arr) {
|
10936 | var hash = {};
|
10937 | var result = [];
|
10938 | for (var i = 0, l = arr.length; i < l; ++i) {
|
10939 | if (!hash.hasOwnProperty(arr[i])) {
|
10940 |
|
10941 | hash[arr[i]] = true;
|
10942 | result.push(arr[i]);
|
10943 | }
|
10944 | }
|
10945 | return result;
|
10946 | }
|
10947 |
|
10948 |
|
10949 | function getCounts(arr) {
|
10950 | var i = arr.length;
|
10951 | var obj = {};
|
10952 | while (i) {
|
10953 | obj[arr[--i]] = (obj[arr[i]] || 0) + 1;
|
10954 | }
|
10955 | return obj;
|
10956 | }
|
10957 |
|
10958 |
|
10959 | function getCount(word, arr) {
|
10960 | return getCounts(arr)[word] || 0;
|
10961 | }
|
10962 | };
|
10963 |
|
10964 | exports.default = {
|
10965 | setConf: setConf,
|
10966 | draw: draw
|
10967 | };
|
10968 |
|
10969 | }),
|
10970 |
|
10971 | (function(module, exports, __webpack_require__) {
|
10972 |
|
10973 | "use strict";
|
10974 |
|
10975 |
|
10976 | Object.defineProperty(exports, "__esModule", {
|
10977 | value: true
|
10978 | });
|
10979 | exports.draw = exports.setConf = undefined;
|
10980 |
|
10981 | var _dagreLayout = __webpack_require__(36);
|
10982 |
|
10983 | var _dagreLayout2 = _interopRequireDefault(_dagreLayout);
|
10984 |
|
10985 | var _classDb = __webpack_require__(19);
|
10986 |
|
10987 | var _classDb2 = _interopRequireDefault(_classDb);
|
10988 |
|
10989 | var _d = __webpack_require__(1);
|
10990 |
|
10991 | var _d2 = _interopRequireDefault(_d);
|
10992 |
|
10993 | var _logger = __webpack_require__(0);
|
10994 |
|
10995 | var _classDiagram = __webpack_require__(18);
|
10996 |
|
10997 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
10998 |
|
10999 | _classDiagram.parser.yy = _classDb2.default;
|
11000 |
|
11001 | var idCache;
|
11002 | idCache = {};
|
11003 |
|
11004 | var classCnt = 0;
|
11005 | var conf = {
|
11006 | dividerMargin: 10,
|
11007 | padding: 5,
|
11008 | textHeight: 10
|
11009 |
|
11010 |
|
11011 | };var getGraphId = function getGraphId(label) {
|
11012 | var keys = Object.keys(idCache);
|
11013 |
|
11014 | var i;
|
11015 | for (i = 0; i < keys.length; i++) {
|
11016 | if (idCache[keys[i]].label === label) {
|
11017 | return keys[i];
|
11018 | }
|
11019 | }
|
11020 |
|
11021 | return undefined;
|
11022 | };
|
11023 |
|
11024 |
|
11025 |
|
11026 |
|
11027 | var insertMarkers = function insertMarkers(elem) {
|
11028 | 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');
|
11029 |
|
11030 | 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');
|
11031 |
|
11032 | 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');
|
11033 |
|
11034 | 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');
|
11035 |
|
11036 | 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');
|
11037 |
|
11038 | 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');
|
11039 |
|
11040 | 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');
|
11041 |
|
11042 | 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');
|
11043 | };
|
11044 |
|
11045 | var edgeCount = 0;
|
11046 | var drawEdge = function drawEdge(elem, path, relation) {
|
11047 | var getRelationType = function getRelationType(type) {
|
11048 | switch (type) {
|
11049 | case _classDb2.default.relationType.AGGREGATION:
|
11050 | return 'aggregation';
|
11051 | case _classDb2.default.relationType.EXTENSION:
|
11052 | return 'extension';
|
11053 | case _classDb2.default.relationType.COMPOSITION:
|
11054 | return 'composition';
|
11055 | case _classDb2.default.relationType.DEPENDENCY:
|
11056 | return 'dependency';
|
11057 | }
|
11058 | };
|
11059 |
|
11060 |
|
11061 | var lineData = path.points;
|
11062 |
|
11063 |
|
11064 | var lineFunction = _d2.default.svg.line().x(function (d) {
|
11065 | return d.x;
|
11066 | }).y(function (d) {
|
11067 | return d.y;
|
11068 | }).interpolate('basis');
|
11069 |
|
11070 | var svgPath = elem.append('path').attr('d', lineFunction(lineData)).attr('id', 'edge' + edgeCount).attr('class', 'relation');
|
11071 | var url = '';
|
11072 | if (conf.arrowMarkerAbsolute) {
|
11073 | url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;
|
11074 | url = url.replace(/\(/g, '\\(');
|
11075 | url = url.replace(/\)/g, '\\)');
|
11076 | }
|
11077 |
|
11078 | if (relation.relation.type1 !== 'none') {
|
11079 | svgPath.attr('marker-start', 'url(' + url + '#' + getRelationType(relation.relation.type1) + 'Start' + ')');
|
11080 | }
|
11081 | if (relation.relation.type2 !== 'none') {
|
11082 | svgPath.attr('marker-end', 'url(' + url + '#' + getRelationType(relation.relation.type2) + 'End' + ')');
|
11083 | }
|
11084 |
|
11085 | var x, y;
|
11086 | var l = path.points.length;
|
11087 | if (l % 2 !== 0) {
|
11088 | var p1 = path.points[Math.floor(l / 2)];
|
11089 | var p2 = path.points[Math.ceil(l / 2)];
|
11090 | x = (p1.x + p2.x) / 2;
|
11091 | y = (p1.y + p2.y) / 2;
|
11092 | } else {
|
11093 | var p = path.points[Math.floor(l / 2)];
|
11094 | x = p.x;
|
11095 | y = p.y;
|
11096 | }
|
11097 |
|
11098 | if (typeof relation.title !== 'undefined') {
|
11099 | var g = elem.append('g').attr('class', 'classLabel');
|
11100 | var label = g.append('text').attr('class', 'label').attr('x', x).attr('y', y).attr('fill', 'red').attr('text-anchor', 'middle').text(relation.title);
|
11101 |
|
11102 | window.label = label;
|
11103 | var bounds = label.node().getBBox();
|
11104 |
|
11105 | 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);
|
11106 | }
|
11107 |
|
11108 | edgeCount++;
|
11109 | };
|
11110 |
|
11111 | var drawClass = function drawClass(elem, classDef) {
|
11112 | _logger.logger.info('Rendering class ' + classDef);
|
11113 |
|
11114 | var addTspan = function addTspan(textEl, txt, isFirst) {
|
11115 | var tSpan = textEl.append('tspan').attr('x', conf.padding).text(txt);
|
11116 | if (!isFirst) {
|
11117 | tSpan.attr('dy', conf.textHeight);
|
11118 | }
|
11119 | };
|
11120 |
|
11121 | var id = 'classId' + classCnt;
|
11122 | var classInfo = {
|
11123 | id: id,
|
11124 | label: classDef.id,
|
11125 | width: 0,
|
11126 | height: 0
|
11127 | };
|
11128 |
|
11129 | var g = elem.append('g').attr('id', id).attr('class', 'classGroup');
|
11130 | var title = g.append('text').attr('x', conf.padding).attr('y', conf.textHeight + conf.padding).text(classDef.id);
|
11131 |
|
11132 | var titleHeight = title.node().getBBox().height;
|
11133 |
|
11134 | var membersLine = g.append('line')
|
11135 | .attr('x1', 0).attr('y1', conf.padding + titleHeight + conf.dividerMargin / 2).attr('y2', conf.padding + titleHeight + conf.dividerMargin / 2);
|
11136 |
|
11137 | var members = g.append('text')
|
11138 | .attr('x', conf.padding).attr('y', titleHeight + conf.dividerMargin + conf.textHeight).attr('fill', 'white').attr('class', 'classText');
|
11139 |
|
11140 | var isFirst = true;
|
11141 |
|
11142 | classDef.members.forEach(function (member) {
|
11143 | addTspan(members, member, isFirst);
|
11144 | isFirst = false;
|
11145 | });
|
11146 |
|
11147 | var membersBox = members.node().getBBox();
|
11148 |
|
11149 | var methodsLine = g.append('line')
|
11150 | .attr('x1', 0).attr('y1', conf.padding + titleHeight + conf.dividerMargin + membersBox.height).attr('y2', conf.padding + titleHeight + conf.dividerMargin + membersBox.height);
|
11151 |
|
11152 | var methods = g.append('text')
|
11153 | .attr('x', conf.padding).attr('y', titleHeight + 2 * conf.dividerMargin + membersBox.height + conf.textHeight).attr('fill', 'white').attr('class', 'classText');
|
11154 |
|
11155 | isFirst = true;
|
11156 |
|
11157 | classDef.methods.forEach(function (method) {
|
11158 | addTspan(methods, method, isFirst);
|
11159 | isFirst = false;
|
11160 | });
|
11161 |
|
11162 | var classBox = g.node().getBBox();
|
11163 | 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);
|
11164 |
|
11165 | membersLine.attr('x2', classBox.width + 2 * conf.padding);
|
11166 | methodsLine.attr('x2', classBox.width + 2 * conf.padding);
|
11167 |
|
11168 | classInfo.width = classBox.width + 2 * conf.padding;
|
11169 | classInfo.height = classBox.height + conf.padding + 0.5 * conf.dividerMargin;
|
11170 |
|
11171 | idCache[id] = classInfo;
|
11172 | classCnt++;
|
11173 | return classInfo;
|
11174 | };
|
11175 |
|
11176 | var setConf = exports.setConf = function setConf(cnf) {
|
11177 | var keys = Object.keys(cnf);
|
11178 |
|
11179 | keys.forEach(function (key) {
|
11180 | conf[key] = cnf[key];
|
11181 | });
|
11182 | };
|
11183 |
|
11184 |
|
11185 |
|
11186 |
|
11187 |
|
11188 | var draw = exports.draw = function draw(text, id) {
|
11189 | _classDiagram.parser.yy.clear();
|
11190 | _classDiagram.parser.parse(text);
|
11191 |
|
11192 | _logger.logger.info('Rendering diagram ' + text);
|
11193 |
|
11194 |
|
11195 | var diagram = _d2.default.select('#' + id);
|
11196 | insertMarkers(diagram);
|
11197 |
|
11198 |
|
11199 | var g = new _dagreLayout2.default.graphlib.Graph({
|
11200 | multigraph: true
|
11201 | });
|
11202 |
|
11203 |
|
11204 | g.setGraph({
|
11205 | isMultiGraph: true
|
11206 | });
|
11207 |
|
11208 |
|
11209 | g.setDefaultEdgeLabel(function () {
|
11210 | return {};
|
11211 | });
|
11212 |
|
11213 | var classes = _classDb2.default.getClasses();
|
11214 | var keys = Object.keys(classes);
|
11215 | var i;
|
11216 | for (i = 0; i < keys.length; i++) {
|
11217 | var classDef = classes[keys[i]];
|
11218 | var node = drawClass(diagram, classDef);
|
11219 |
|
11220 |
|
11221 |
|
11222 | g.setNode(node.id, node);
|
11223 | _logger.logger.info('Org height: ' + node.height);
|
11224 | }
|
11225 |
|
11226 | var relations = _classDb2.default.getRelations();
|
11227 | relations.forEach(function (relation) {
|
11228 | _logger.logger.info('tjoho' + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation));
|
11229 | g.setEdge(getGraphId(relation.id1), getGraphId(relation.id2), { relation: relation });
|
11230 | });
|
11231 | _dagreLayout2.default.layout(g);
|
11232 | g.nodes().forEach(function (v) {
|
11233 | if (typeof v !== 'undefined') {
|
11234 | _logger.logger.debug('Node ' + v + ': ' + JSON.stringify(g.node(v)));
|
11235 | _d2.default.select('#' + v).attr('transform', 'translate(' + (g.node(v).x - g.node(v).width / 2) + ',' + (g.node(v).y - g.node(v).height / 2) + ' )');
|
11236 | }
|
11237 | });
|
11238 | g.edges().forEach(function (e) {
|
11239 | _logger.logger.debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(g.edge(e)));
|
11240 | drawEdge(diagram, g.edge(e), g.edge(e).relation);
|
11241 | });
|
11242 |
|
11243 | diagram.attr('height', '100%');
|
11244 | diagram.attr('width', '100%');
|
11245 | diagram.attr('viewBox', '0 0 ' + (g.graph().width + 20) + ' ' + (g.graph().height + 20));
|
11246 | };
|
11247 |
|
11248 | exports.default = {
|
11249 | setConf: setConf,
|
11250 | draw: draw
|
11251 | };
|
11252 |
|
11253 | }),
|
11254 |
|
11255 | (function(module, exports) {
|
11256 |
|
11257 | module.exports = require("dagre-layout");
|
11258 |
|
11259 | }),
|
11260 |
|
11261 | (function(module, exports, __webpack_require__) {
|
11262 |
|
11263 | "use strict";
|
11264 |
|
11265 |
|
11266 | Object.defineProperty(exports, "__esModule", {
|
11267 | value: true
|
11268 | });
|
11269 | exports.draw = exports.setConf = undefined;
|
11270 |
|
11271 | var _each2 = __webpack_require__(21);
|
11272 |
|
11273 | var _each3 = _interopRequireDefault(_each2);
|
11274 |
|
11275 | var _extend2 = __webpack_require__(38);
|
11276 |
|
11277 | var _extend3 = _interopRequireDefault(_extend2);
|
11278 |
|
11279 | var _isArray2 = __webpack_require__(39);
|
11280 |
|
11281 | var _isArray3 = _interopRequireDefault(_isArray2);
|
11282 |
|
11283 | var _find2 = __webpack_require__(40);
|
11284 |
|
11285 | var _find3 = _interopRequireDefault(_find2);
|
11286 |
|
11287 | var _isString2 = __webpack_require__(41);
|
11288 |
|
11289 | var _isString3 = _interopRequireDefault(_isString2);
|
11290 |
|
11291 | var _gitGraphAst = __webpack_require__(22);
|
11292 |
|
11293 | var _gitGraphAst2 = _interopRequireDefault(_gitGraphAst);
|
11294 |
|
11295 | var _gitGraph = __webpack_require__(20);
|
11296 |
|
11297 | var _gitGraph2 = _interopRequireDefault(_gitGraph);
|
11298 |
|
11299 | var _d = __webpack_require__(1);
|
11300 |
|
11301 | var _d2 = _interopRequireDefault(_d);
|
11302 |
|
11303 | var _logger = __webpack_require__(0);
|
11304 |
|
11305 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11306 |
|
11307 | var allCommitsDict = {};
|
11308 | var branchNum;
|
11309 | var config = {
|
11310 | nodeSpacing: 150,
|
11311 | nodeFillColor: 'yellow',
|
11312 | nodeStrokeWidth: 2,
|
11313 | nodeStrokeColor: 'grey',
|
11314 | lineStrokeWidth: 4,
|
11315 | branchOffset: 50,
|
11316 | lineColor: 'grey',
|
11317 | leftMargin: 50,
|
11318 | branchColors: ['#442f74', '#983351', '#609732', '#AA9A39'],
|
11319 | nodeRadius: 10,
|
11320 | nodeLabel: {
|
11321 | width: 75,
|
11322 | height: 100,
|
11323 | x: -25,
|
11324 | y: 0
|
11325 | }
|
11326 | };
|
11327 | var apiConfig = {};
|
11328 | var setConf = exports.setConf = function setConf(c) {
|
11329 | apiConfig = c;
|
11330 | };
|
11331 |
|
11332 | function svgCreateDefs(svg) {
|
11333 | svg.append('defs').append('g').attr('id', 'def-commit').append('circle').attr('r', config.nodeRadius).attr('cx', 0).attr('cy', 0);
|
11334 | 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('xhtml:p').html('');
|
11335 | }
|
11336 |
|
11337 | function svgDrawLine(svg, points, colorIdx, interpolate) {
|
11338 | interpolate = interpolate || 'basis';
|
11339 | var color = config.branchColors[colorIdx % config.branchColors.length];
|
11340 | var lineGen = _d2.default.svg.line().x(function (d) {
|
11341 | return Math.round(d.x);
|
11342 | }).y(function (d) {
|
11343 | return Math.round(d.y);
|
11344 | }).interpolate(interpolate);
|
11345 |
|
11346 | svg.append('svg:path').attr('d', lineGen(points)).style('stroke', color).style('stroke-width', config.lineStrokeWidth).style('fill', 'none');
|
11347 | }
|
11348 |
|
11349 | function getElementCoords(element, coords) {
|
11350 | coords = coords || element.node().getBBox();
|
11351 | var ctm = element.node().getCTM();
|
11352 | var xn = ctm.e + coords.x * ctm.a;
|
11353 | var yn = ctm.f + coords.y * ctm.d;
|
11354 | return {
|
11355 | left: xn,
|
11356 | top: yn,
|
11357 | width: coords.width,
|
11358 | height: coords.height
|
11359 | };
|
11360 | }
|
11361 |
|
11362 | function svgDrawLineForCommits(svg, fromId, toId, direction, color) {
|
11363 | _logger.logger.debug('svgDrawLineForCommits: ', fromId, toId);
|
11364 | var fromBbox = getElementCoords(svg.select('#node-' + fromId + ' circle'));
|
11365 | var toBbox = getElementCoords(svg.select('#node-' + toId + ' circle'));
|
11366 | switch (direction) {
|
11367 | case 'LR':
|
11368 |
|
11369 |
|
11370 |
|
11371 | if (fromBbox.left - toBbox.left > config.nodeSpacing) {
|
11372 | var lineStart = { x: fromBbox.left - config.nodeSpacing, y: toBbox.top + toBbox.height / 2 };
|
11373 | var lineEnd = { x: toBbox.left + toBbox.width, y: toBbox.top + toBbox.height / 2 };
|
11374 | svgDrawLine(svg, [lineStart, lineEnd], color, 'linear');
|
11375 | svgDrawLine(svg, [{ x: fromBbox.left, y: fromBbox.top + fromBbox.height / 2 }, { x: fromBbox.left - config.nodeSpacing / 2, y: fromBbox.top + fromBbox.height / 2 }, { x: fromBbox.left - config.nodeSpacing / 2, y: lineStart.y }, lineStart], color);
|
11376 | } else {
|
11377 | svgDrawLine(svg, [{
|
11378 | 'x': fromBbox.left,
|
11379 | 'y': fromBbox.top + fromBbox.height / 2
|
11380 | }, {
|
11381 | 'x': fromBbox.left - config.nodeSpacing / 2,
|
11382 | 'y': fromBbox.top + fromBbox.height / 2
|
11383 | }, {
|
11384 | 'x': fromBbox.left - config.nodeSpacing / 2,
|
11385 | 'y': toBbox.top + toBbox.height / 2
|
11386 | }, {
|
11387 | 'x': toBbox.left + toBbox.width,
|
11388 | 'y': toBbox.top + toBbox.height / 2
|
11389 | }], color);
|
11390 | }
|
11391 | break;
|
11392 | case 'BT':
|
11393 |
|
11394 |
|
11395 |
|
11396 |
|
11397 | if (toBbox.top - fromBbox.top > config.nodeSpacing) {
|
11398 | lineStart = { x: toBbox.left + toBbox.width / 2, y: fromBbox.top + fromBbox.height + config.nodeSpacing };
|
11399 | lineEnd = { x: toBbox.left + toBbox.width / 2, y: toBbox.top };
|
11400 | svgDrawLine(svg, [lineStart, lineEnd], color, 'linear');
|
11401 | svgDrawLine(svg, [{ x: fromBbox.left + fromBbox.width / 2, y: fromBbox.top + fromBbox.height }, { x: fromBbox.left + fromBbox.width / 2, y: fromBbox.top + fromBbox.height + config.nodeSpacing / 2 }, { x: toBbox.left + toBbox.width / 2, y: lineStart.y - config.nodeSpacing / 2 }, lineStart], color);
|
11402 | } else {
|
11403 | svgDrawLine(svg, [{
|
11404 | 'x': fromBbox.left + fromBbox.width / 2,
|
11405 | 'y': fromBbox.top + fromBbox.height
|
11406 | }, {
|
11407 | 'x': fromBbox.left + fromBbox.width / 2,
|
11408 | 'y': fromBbox.top + config.nodeSpacing / 2
|
11409 | }, {
|
11410 | 'x': toBbox.left + toBbox.width / 2,
|
11411 | 'y': toBbox.top - config.nodeSpacing / 2
|
11412 | }, {
|
11413 | 'x': toBbox.left + toBbox.width / 2,
|
11414 | 'y': toBbox.top
|
11415 | }], color);
|
11416 | }
|
11417 | break;
|
11418 | }
|
11419 | }
|
11420 |
|
11421 | function cloneNode(svg, selector) {
|
11422 | return svg.select(selector).node().cloneNode(true);
|
11423 | }
|
11424 |
|
11425 | function renderCommitHistory(svg, commitid, branches, direction) {
|
11426 | var commit;
|
11427 | var numCommits = Object.keys(allCommitsDict).length;
|
11428 | if ((0, _isString3.default)(commitid)) {
|
11429 | do {
|
11430 | commit = allCommitsDict[commitid];
|
11431 | _logger.logger.debug('in renderCommitHistory', commit.id, commit.seq);
|
11432 | if (svg.select('#node-' + commitid).size() > 0) {
|
11433 | return;
|
11434 | }
|
11435 | svg.append(function () {
|
11436 | return cloneNode(svg, '#def-commit');
|
11437 | }).attr('class', 'commit').attr('id', function () {
|
11438 | return 'node-' + commit.id;
|
11439 | }).attr('transform', function () {
|
11440 | switch (direction) {
|
11441 | case 'LR':
|
11442 | return 'translate(' + (commit.seq * config.nodeSpacing + config.leftMargin) + ', ' + branchNum * config.branchOffset + ')';
|
11443 | case 'BT':
|
11444 | return 'translate(' + (branchNum * config.branchOffset + config.leftMargin) + ', ' + (numCommits - commit.seq) * config.nodeSpacing + ')';
|
11445 | }
|
11446 | }).attr('fill', config.nodeFillColor).attr('stroke', config.nodeStrokeColor).attr('stroke-width', config.nodeStrokeWidth);
|
11447 |
|
11448 | var branch = (0, _find3.default)(branches, ['commit', commit]);
|
11449 | if (branch) {
|
11450 | _logger.logger.debug('found branch ', branch.name);
|
11451 | svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'branch-label').text(branch.name + ', ');
|
11452 | }
|
11453 | svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'commit-id').text(commit.id);
|
11454 | if (commit.message !== '' && direction === 'BT') {
|
11455 | svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'commit-msg').text(', ' + commit.message);
|
11456 | }
|
11457 | commitid = commit.parent;
|
11458 | } while (commitid && allCommitsDict[commitid]);
|
11459 | }
|
11460 |
|
11461 | if ((0, _isArray3.default)(commitid)) {
|
11462 | _logger.logger.debug('found merge commmit', commitid);
|
11463 | renderCommitHistory(svg, commitid[0], branches, direction);
|
11464 | branchNum++;
|
11465 | renderCommitHistory(svg, commitid[1], branches, direction);
|
11466 | branchNum--;
|
11467 | }
|
11468 | }
|
11469 |
|
11470 | function renderLines(svg, commit, direction, branchColor) {
|
11471 | branchColor = branchColor || 0;
|
11472 | while (commit.seq > 0 && !commit.lineDrawn) {
|
11473 | if ((0, _isString3.default)(commit.parent)) {
|
11474 | svgDrawLineForCommits(svg, commit.id, commit.parent, direction, branchColor);
|
11475 | commit.lineDrawn = true;
|
11476 | commit = allCommitsDict[commit.parent];
|
11477 | } else if ((0, _isArray3.default)(commit.parent)) {
|
11478 | svgDrawLineForCommits(svg, commit.id, commit.parent[0], direction, branchColor);
|
11479 | svgDrawLineForCommits(svg, commit.id, commit.parent[1], direction, branchColor + 1);
|
11480 | renderLines(svg, allCommitsDict[commit.parent[1]], direction, branchColor + 1);
|
11481 | commit.lineDrawn = true;
|
11482 | commit = allCommitsDict[commit.parent[0]];
|
11483 | }
|
11484 | }
|
11485 | }
|
11486 |
|
11487 | var draw = exports.draw = function draw(txt, id, ver) {
|
11488 | try {
|
11489 | var parser;
|
11490 | parser = _gitGraph2.default.parser;
|
11491 | parser.yy = _gitGraphAst2.default;
|
11492 |
|
11493 | _logger.logger.debug('in gitgraph renderer', txt, id, ver);
|
11494 |
|
11495 | parser.parse(txt + '\n');
|
11496 |
|
11497 | config = (0, _extend3.default)(config, apiConfig, _gitGraphAst2.default.getOptions());
|
11498 | _logger.logger.debug('effective options', config);
|
11499 | var direction = _gitGraphAst2.default.getDirection();
|
11500 | allCommitsDict = _gitGraphAst2.default.getCommits();
|
11501 | var branches = _gitGraphAst2.default.getBranchesAsObjArray();
|
11502 | if (direction === 'BT') {
|
11503 | config.nodeLabel.x = branches.length * config.branchOffset;
|
11504 | config.nodeLabel.width = '100%';
|
11505 | config.nodeLabel.y = -1 * 2 * config.nodeRadius;
|
11506 | }
|
11507 | var svg = _d2.default.select('#' + id);
|
11508 | svgCreateDefs(svg);
|
11509 | branchNum = 1;
|
11510 | (0, _each3.default)(branches, function (v) {
|
11511 | renderCommitHistory(svg, v.commit.id, branches, direction);
|
11512 | renderLines(svg, v.commit, direction);
|
11513 | branchNum++;
|
11514 | });
|
11515 | svg.attr('height', function () {
|
11516 | if (direction === 'BT') return Object.keys(allCommitsDict).length * config.nodeSpacing;
|
11517 | return (branches.length + 1) * config.branchOffset;
|
11518 | });
|
11519 | } catch (e) {
|
11520 | _logger.logger.error('Error while rendering gitgraph');
|
11521 | _logger.logger.error(e.message);
|
11522 | }
|
11523 | };
|
11524 |
|
11525 | exports.default = {
|
11526 | setConf: setConf,
|
11527 | draw: draw
|
11528 | };
|
11529 |
|
11530 | }),
|
11531 |
|
11532 | (function(module, exports) {
|
11533 |
|
11534 | module.exports = require("lodash/extend");
|
11535 |
|
11536 | }),
|
11537 |
|
11538 | (function(module, exports) {
|
11539 |
|
11540 | module.exports = require("lodash/isArray");
|
11541 |
|
11542 | }),
|
11543 |
|
11544 | (function(module, exports) {
|
11545 |
|
11546 | module.exports = require("lodash/find");
|
11547 |
|
11548 | }),
|
11549 |
|
11550 | (function(module, exports) {
|
11551 |
|
11552 | module.exports = require("lodash/isString");
|
11553 |
|
11554 | }),
|
11555 |
|
11556 | (function(module, exports) {
|
11557 |
|
11558 | module.exports = require("lodash/orderBy");
|
11559 |
|
11560 | }),
|
11561 |
|
11562 | (function(module, exports) {
|
11563 |
|
11564 | module.exports = require("lodash/map");
|
11565 |
|
11566 | }),
|
11567 |
|
11568 | (function(module, exports) {
|
11569 |
|
11570 | module.exports = require("lodash/uniqBy");
|
11571 |
|
11572 | }),
|
11573 |
|
11574 | (function(module, exports) {
|
11575 |
|
11576 | module.exports = require("lodash/maxBy");
|
11577 |
|
11578 | }),
|
11579 |
|
11580 | (function(module, exports, __webpack_require__) {
|
11581 |
|
11582 |
|
11583 |
|
11584 |
|
11585 | var styles = __webpack_require__(47);
|
11586 |
|
11587 | if (typeof styles === 'string') {
|
11588 |
|
11589 | module.exports = styles;
|
11590 | } else {
|
11591 |
|
11592 | module.exports = styles.toString();
|
11593 | }
|
11594 |
|
11595 | }),
|
11596 |
|
11597 | (function(module, exports, __webpack_require__) {
|
11598 |
|
11599 | exports = module.exports = __webpack_require__(6)(undefined);
|
11600 |
|
11601 |
|
11602 |
|
11603 |
|
11604 | exports.push([module.i, "/* Flowchart variables */\n/* Sequence Diagram variables */\n/* Gantt chart variables */\n.mermaid .label {\n color: #323D47;\n}\n.node rect,\n.node circle,\n.node ellipse,\n.node polygon {\n fill: #BDD5EA;\n stroke: #81B1DB;\n stroke-width: 1px;\n}\n.arrowheadPath {\n fill: lightgrey;\n}\n.edgePath .path {\n stroke: lightgrey;\n}\n.edgeLabel {\n background-color: #e8e8e8;\n}\n.cluster rect {\n fill: #6D6D65 !important;\n rx: 4 !important;\n stroke: rgba(255, 255, 255, 0.25) !important;\n stroke-width: 1px !important;\n}\n.cluster text {\n fill: #F9FFFE;\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 marker-end: \"url(#arrowhead)\";\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 !important;\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 marker-end: \"url(#arrowhead)\";\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/** 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: rgba(255, 255, 255, 0.3);\n opacity: 0.3;\n shape-rendering: crispEdges;\n}\n.grid .tick text {\n fill: lightgrey;\n opacity: 0.5;\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: 1;\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/* 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 fill: lightgrey;\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: 1;\n cursor: pointer;\n shape-rendering: crispEdges;\n}\n.doneCritText0,\n.doneCritText1,\n.doneCritText2,\n.doneCritText3 {\n fill: lightgrey !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: lightgrey;\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}\nsvg .classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #BDD5EA;\n opacity: 0.5;\n}\nsvg .classLabel .label {\n fill: purple;\n font-size: 10px;\n}\n.relation {\n stroke: purple;\n stroke-width: 1;\n fill: none;\n}\n.composition {\n fill: purple;\n stroke: purple;\n stroke-width: 1;\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.aggregation {\n fill: #BDD5EA;\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}\n.node text {\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 14px;\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", ""]);
|
11605 |
|
11606 |
|
11607 |
|
11608 |
|
11609 | }),
|
11610 |
|
11611 | (function(module, exports, __webpack_require__) {
|
11612 |
|
11613 |
|
11614 |
|
11615 |
|
11616 | var styles = __webpack_require__(49);
|
11617 |
|
11618 | if (typeof styles === 'string') {
|
11619 |
|
11620 | module.exports = styles;
|
11621 | } else {
|
11622 |
|
11623 | module.exports = styles.toString();
|
11624 | }
|
11625 |
|
11626 | }),
|
11627 |
|
11628 | (function(module, exports, __webpack_require__) {
|
11629 |
|
11630 | exports = module.exports = __webpack_require__(6)(undefined);
|
11631 |
|
11632 |
|
11633 |
|
11634 |
|
11635 | exports.push([module.i, "/* Flowchart variables */\n/* Sequence Diagram variables */\n/* Gantt chart variables */\n.mermaid .label {\n color: #333;\n}\n.node rect,\n.node circle,\n.node ellipse,\n.node polygon {\n fill: #ECECFF;\n stroke: #CCCCFF;\n stroke-width: 1px;\n}\n.arrowheadPath {\n fill: #333333;\n}\n.edgePath .path {\n stroke: #333333;\n}\n.edgeLabel {\n background-color: #e8e8e8;\n}\n.cluster rect {\n fill: #ffffde !important;\n rx: 4 !important;\n stroke: #aaaa33 !important;\n stroke-width: 1px !important;\n}\n.cluster text {\n fill: #333;\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 marker-end: \"url(#arrowhead)\";\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#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 marker-end: \"url(#arrowhead)\";\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/** 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/* 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.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}\nsvg .classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #ECECFF;\n opacity: 0.5;\n}\nsvg .classLabel .label {\n fill: #9370DB;\n font-size: 10px;\n}\n.relation {\n stroke: #9370DB;\n stroke-width: 1;\n fill: none;\n}\n.composition {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1;\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.aggregation {\n fill: #ECECFF;\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.node text {\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 14px;\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", ""]);
|
11636 |
|
11637 |
|
11638 |
|
11639 |
|
11640 | }),
|
11641 |
|
11642 | (function(module, exports, __webpack_require__) {
|
11643 |
|
11644 |
|
11645 |
|
11646 |
|
11647 | var styles = __webpack_require__(51);
|
11648 |
|
11649 | if (typeof styles === 'string') {
|
11650 |
|
11651 | module.exports = styles;
|
11652 | } else {
|
11653 |
|
11654 | module.exports = styles.toString();
|
11655 | }
|
11656 |
|
11657 | }),
|
11658 |
|
11659 | (function(module, exports, __webpack_require__) {
|
11660 |
|
11661 | exports = module.exports = __webpack_require__(6)(undefined);
|
11662 |
|
11663 |
|
11664 |
|
11665 |
|
11666 | exports.push([module.i, "/* Flowchart variables */\n/* Sequence Diagram variables */\n/* Gantt chart variables */\n.mermaid .label {\n font-family: 'trebuchet ms', verdana, arial;\n color: #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.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 !important;\n rx: 4 !important;\n stroke: #6eaa49 !important;\n stroke-width: 1px !important;\n}\n.cluster text {\n fill: #333;\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 marker-end: \"url(#arrowhead)\";\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#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 marker-end: \"url(#arrowhead)\";\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/** 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/* 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.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}\nsvg .classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #cde498;\n opacity: 0.5;\n}\nsvg .classLabel .label {\n fill: #13540c;\n font-size: 10px;\n}\n.relation {\n stroke: #13540c;\n stroke-width: 1;\n fill: none;\n}\n.composition {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1;\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.aggregation {\n fill: #cde498;\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.node text {\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 14px;\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", ""]);
|
11667 |
|
11668 |
|
11669 |
|
11670 |
|
11671 | }),
|
11672 |
|
11673 | (function(module, exports, __webpack_require__) {
|
11674 |
|
11675 |
|
11676 |
|
11677 |
|
11678 | var styles = __webpack_require__(53);
|
11679 |
|
11680 | if (typeof styles === 'string') {
|
11681 |
|
11682 | module.exports = styles;
|
11683 | } else {
|
11684 |
|
11685 | module.exports = styles.toString();
|
11686 | }
|
11687 |
|
11688 | }),
|
11689 |
|
11690 | (function(module, exports, __webpack_require__) {
|
11691 |
|
11692 | exports = module.exports = __webpack_require__(6)(undefined);
|
11693 |
|
11694 |
|
11695 |
|
11696 |
|
11697 | exports.push([module.i, "/* Flowchart variables */\n/* Sequence Diagram variables */\n/* Gantt chart variables */\n.mermaid .label {\n color: #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.edgePath .path {\n stroke: #666;\n stroke-width: 1.5px;\n}\n.edgeLabel {\n background-color: white;\n}\n.cluster rect {\n fill: #eaf2fb !important;\n rx: 4 !important;\n stroke: #26a !important;\n stroke-width: 1px !important;\n}\n.cluster text {\n fill: #333;\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 marker-end: \"url(#arrowhead)\";\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#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: white;\n stroke: none;\n}\n.loopText {\n fill: white;\n stroke: none;\n}\n.loopLine {\n stroke-width: 2;\n stroke-dasharray: \"2 2\";\n marker-end: \"url(#arrowhead)\";\n stroke: #999;\n}\n.note {\n stroke: #777700;\n fill: #ffa;\n}\n.noteText {\n fill: black;\n stroke: none;\n font-family: Arial, Helvetica, sans-serif;\n font-size: 14px;\n}\n/** Section styling */\n.section {\n stroke: none;\n opacity: 0.2;\n}\n.section0 {\n fill: #7fb2e6;\n}\n.section2 {\n fill: #7fb2e6;\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: #e5e5e5;\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/* 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: #194c7f;\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: #194c7f;\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}\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}\nsvg .classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #eee;\n opacity: 0.5;\n}\nsvg .classLabel .label {\n fill: #999;\n font-size: 10px;\n}\n.relation {\n stroke: #999;\n stroke-width: 1;\n fill: none;\n}\n.composition {\n fill: #999;\n stroke: #999;\n stroke-width: 1;\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.aggregation {\n fill: #eee;\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.node text {\n font-family: Arial, Helvetica, sans-serif;\n font-size: 14px;\n}\ndiv.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: Arial, Helvetica, sans-serif;\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", ""]);
|
11698 |
|
11699 |
|
11700 |
|
11701 |
|
11702 | })
|
11703 | ])["default"];
|
11704 | }); |
\ | No newline at end of file |