@abi-software/map-side-bar 1.4.3-context-card-disabled → 1.4.5-context-card-disabled
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/map-side-bar.common.js +114 -3788
- package/dist/map-side-bar.common.js.map +1 -1
- package/dist/map-side-bar.css +1 -1
- package/dist/map-side-bar.umd.js +114 -3788
- package/dist/map-side-bar.umd.js.map +1 -1
- package/dist/map-side-bar.umd.min.js +2 -2
- package/dist/map-side-bar.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/SideBar.vue +1 -1
- package/src/components/SidebarContent.vue +1 -12
package/dist/map-side-bar.umd.js
CHANGED
|
@@ -198,13 +198,6 @@ module.exports = require("core-js/modules/es.date.to-primitive.js");
|
|
|
198
198
|
|
|
199
199
|
/***/ }),
|
|
200
200
|
|
|
201
|
-
/***/ "230a":
|
|
202
|
-
/***/ (function(module, exports) {
|
|
203
|
-
|
|
204
|
-
module.exports = require("element-ui/lib/theme-chalk/link.css");
|
|
205
|
-
|
|
206
|
-
/***/ }),
|
|
207
|
-
|
|
208
201
|
/***/ "2439":
|
|
209
202
|
/***/ (function(module, exports) {
|
|
210
203
|
|
|
@@ -442,17 +435,6 @@ module.exports = require("core-js/modules/es.math.to-string-tag.js");
|
|
|
442
435
|
|
|
443
436
|
module.exports = require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
444
437
|
|
|
445
|
-
/***/ }),
|
|
446
|
-
|
|
447
|
-
/***/ "77d9":
|
|
448
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
449
|
-
|
|
450
|
-
"use strict";
|
|
451
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ContextCard_vue_vue_type_style_index_0_id_1221ea8f_prod_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("af4c");
|
|
452
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ContextCard_vue_vue_type_style_index_0_id_1221ea8f_prod_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ContextCard_vue_vue_type_style_index_0_id_1221ea8f_prod_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
|
|
453
|
-
/* unused harmony reexport * */
|
|
454
|
-
|
|
455
|
-
|
|
456
438
|
/***/ }),
|
|
457
439
|
|
|
458
440
|
/***/ "7949":
|
|
@@ -462,3219 +444,140 @@ module.exports = require("core-js/modules/es.object.proto.js");
|
|
|
462
444
|
|
|
463
445
|
/***/ }),
|
|
464
446
|
|
|
465
|
-
/***/ "
|
|
466
|
-
/***/ (function(module, exports
|
|
467
|
-
|
|
468
|
-
/**
|
|
469
|
-
* marked - a markdown parser
|
|
470
|
-
* Copyright (c) 2011-2022, Christopher Jeffrey. (MIT Licensed)
|
|
471
|
-
* https://github.com/markedjs/marked
|
|
472
|
-
*/
|
|
473
|
-
|
|
474
|
-
/**
|
|
475
|
-
* DO NOT EDIT THIS FILE
|
|
476
|
-
* The code in this file is generated from files in ./src/
|
|
477
|
-
*/
|
|
478
|
-
|
|
479
|
-
(function (global, factory) {
|
|
480
|
-
true ? factory(exports) :
|
|
481
|
-
undefined;
|
|
482
|
-
})(this, (function (exports) { 'use strict';
|
|
483
|
-
|
|
484
|
-
function _defineProperties(target, props) {
|
|
485
|
-
for (var i = 0; i < props.length; i++) {
|
|
486
|
-
var descriptor = props[i];
|
|
487
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
488
|
-
descriptor.configurable = true;
|
|
489
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
490
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
495
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
496
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
497
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
498
|
-
writable: false
|
|
499
|
-
});
|
|
500
|
-
return Constructor;
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
504
|
-
if (!o) return;
|
|
505
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
506
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
507
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
508
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
509
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
function _arrayLikeToArray(arr, len) {
|
|
513
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
514
|
-
|
|
515
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
516
|
-
|
|
517
|
-
return arr2;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
521
|
-
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
522
|
-
if (it) return (it = it.call(o)).next.bind(it);
|
|
523
|
-
|
|
524
|
-
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
525
|
-
if (it) o = it;
|
|
526
|
-
var i = 0;
|
|
527
|
-
return function () {
|
|
528
|
-
if (i >= o.length) return {
|
|
529
|
-
done: true
|
|
530
|
-
};
|
|
531
|
-
return {
|
|
532
|
-
done: false,
|
|
533
|
-
value: o[i++]
|
|
534
|
-
};
|
|
535
|
-
};
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
function getDefaults() {
|
|
542
|
-
return {
|
|
543
|
-
async: false,
|
|
544
|
-
baseUrl: null,
|
|
545
|
-
breaks: false,
|
|
546
|
-
extensions: null,
|
|
547
|
-
gfm: true,
|
|
548
|
-
headerIds: true,
|
|
549
|
-
headerPrefix: '',
|
|
550
|
-
highlight: null,
|
|
551
|
-
langPrefix: 'language-',
|
|
552
|
-
mangle: true,
|
|
553
|
-
pedantic: false,
|
|
554
|
-
renderer: null,
|
|
555
|
-
sanitize: false,
|
|
556
|
-
sanitizer: null,
|
|
557
|
-
silent: false,
|
|
558
|
-
smartypants: false,
|
|
559
|
-
tokenizer: null,
|
|
560
|
-
walkTokens: null,
|
|
561
|
-
xhtml: false
|
|
562
|
-
};
|
|
563
|
-
}
|
|
564
|
-
exports.defaults = getDefaults();
|
|
565
|
-
function changeDefaults(newDefaults) {
|
|
566
|
-
exports.defaults = newDefaults;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
/**
|
|
570
|
-
* Helpers
|
|
571
|
-
*/
|
|
572
|
-
var escapeTest = /[&<>"']/;
|
|
573
|
-
var escapeReplace = /[&<>"']/g;
|
|
574
|
-
var escapeTestNoEncode = /[<>"']|&(?!#?\w+;)/;
|
|
575
|
-
var escapeReplaceNoEncode = /[<>"']|&(?!#?\w+;)/g;
|
|
576
|
-
var escapeReplacements = {
|
|
577
|
-
'&': '&',
|
|
578
|
-
'<': '<',
|
|
579
|
-
'>': '>',
|
|
580
|
-
'"': '"',
|
|
581
|
-
"'": '''
|
|
582
|
-
};
|
|
583
|
-
|
|
584
|
-
var getEscapeReplacement = function getEscapeReplacement(ch) {
|
|
585
|
-
return escapeReplacements[ch];
|
|
586
|
-
};
|
|
587
|
-
|
|
588
|
-
function escape(html, encode) {
|
|
589
|
-
if (encode) {
|
|
590
|
-
if (escapeTest.test(html)) {
|
|
591
|
-
return html.replace(escapeReplace, getEscapeReplacement);
|
|
592
|
-
}
|
|
593
|
-
} else {
|
|
594
|
-
if (escapeTestNoEncode.test(html)) {
|
|
595
|
-
return html.replace(escapeReplaceNoEncode, getEscapeReplacement);
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
return html;
|
|
600
|
-
}
|
|
601
|
-
var unescapeTest = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
|
|
602
|
-
/**
|
|
603
|
-
* @param {string} html
|
|
604
|
-
*/
|
|
605
|
-
|
|
606
|
-
function unescape(html) {
|
|
607
|
-
// explicitly match decimal, hex, and named HTML entities
|
|
608
|
-
return html.replace(unescapeTest, function (_, n) {
|
|
609
|
-
n = n.toLowerCase();
|
|
610
|
-
if (n === 'colon') return ':';
|
|
611
|
-
|
|
612
|
-
if (n.charAt(0) === '#') {
|
|
613
|
-
return n.charAt(1) === 'x' ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1));
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
return '';
|
|
617
|
-
});
|
|
618
|
-
}
|
|
619
|
-
var caret = /(^|[^\[])\^/g;
|
|
620
|
-
/**
|
|
621
|
-
* @param {string | RegExp} regex
|
|
622
|
-
* @param {string} opt
|
|
623
|
-
*/
|
|
624
|
-
|
|
625
|
-
function edit(regex, opt) {
|
|
626
|
-
regex = typeof regex === 'string' ? regex : regex.source;
|
|
627
|
-
opt = opt || '';
|
|
628
|
-
var obj = {
|
|
629
|
-
replace: function replace(name, val) {
|
|
630
|
-
val = val.source || val;
|
|
631
|
-
val = val.replace(caret, '$1');
|
|
632
|
-
regex = regex.replace(name, val);
|
|
633
|
-
return obj;
|
|
634
|
-
},
|
|
635
|
-
getRegex: function getRegex() {
|
|
636
|
-
return new RegExp(regex, opt);
|
|
637
|
-
}
|
|
638
|
-
};
|
|
639
|
-
return obj;
|
|
640
|
-
}
|
|
641
|
-
var nonWordAndColonTest = /[^\w:]/g;
|
|
642
|
-
var originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;
|
|
643
|
-
/**
|
|
644
|
-
* @param {boolean} sanitize
|
|
645
|
-
* @param {string} base
|
|
646
|
-
* @param {string} href
|
|
647
|
-
*/
|
|
648
|
-
|
|
649
|
-
function cleanUrl(sanitize, base, href) {
|
|
650
|
-
if (sanitize) {
|
|
651
|
-
var prot;
|
|
652
|
-
|
|
653
|
-
try {
|
|
654
|
-
prot = decodeURIComponent(unescape(href)).replace(nonWordAndColonTest, '').toLowerCase();
|
|
655
|
-
} catch (e) {
|
|
656
|
-
return null;
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) {
|
|
660
|
-
return null;
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
if (base && !originIndependentUrl.test(href)) {
|
|
665
|
-
href = resolveUrl(base, href);
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
try {
|
|
669
|
-
href = encodeURI(href).replace(/%25/g, '%');
|
|
670
|
-
} catch (e) {
|
|
671
|
-
return null;
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
return href;
|
|
675
|
-
}
|
|
676
|
-
var baseUrls = {};
|
|
677
|
-
var justDomain = /^[^:]+:\/*[^/]*$/;
|
|
678
|
-
var protocol = /^([^:]+:)[\s\S]*$/;
|
|
679
|
-
var domain = /^([^:]+:\/*[^/]*)[\s\S]*$/;
|
|
680
|
-
/**
|
|
681
|
-
* @param {string} base
|
|
682
|
-
* @param {string} href
|
|
683
|
-
*/
|
|
684
|
-
|
|
685
|
-
function resolveUrl(base, href) {
|
|
686
|
-
if (!baseUrls[' ' + base]) {
|
|
687
|
-
// we can ignore everything in base after the last slash of its path component,
|
|
688
|
-
// but we might need to add _that_
|
|
689
|
-
// https://tools.ietf.org/html/rfc3986#section-3
|
|
690
|
-
if (justDomain.test(base)) {
|
|
691
|
-
baseUrls[' ' + base] = base + '/';
|
|
692
|
-
} else {
|
|
693
|
-
baseUrls[' ' + base] = rtrim(base, '/', true);
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
base = baseUrls[' ' + base];
|
|
698
|
-
var relativeBase = base.indexOf(':') === -1;
|
|
699
|
-
|
|
700
|
-
if (href.substring(0, 2) === '//') {
|
|
701
|
-
if (relativeBase) {
|
|
702
|
-
return href;
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
return base.replace(protocol, '$1') + href;
|
|
706
|
-
} else if (href.charAt(0) === '/') {
|
|
707
|
-
if (relativeBase) {
|
|
708
|
-
return href;
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
return base.replace(domain, '$1') + href;
|
|
712
|
-
} else {
|
|
713
|
-
return base + href;
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
var noopTest = {
|
|
717
|
-
exec: function noopTest() {}
|
|
718
|
-
};
|
|
719
|
-
function merge(obj) {
|
|
720
|
-
var i = 1,
|
|
721
|
-
target,
|
|
722
|
-
key;
|
|
723
|
-
|
|
724
|
-
for (; i < arguments.length; i++) {
|
|
725
|
-
target = arguments[i];
|
|
726
|
-
|
|
727
|
-
for (key in target) {
|
|
728
|
-
if (Object.prototype.hasOwnProperty.call(target, key)) {
|
|
729
|
-
obj[key] = target[key];
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
return obj;
|
|
735
|
-
}
|
|
736
|
-
function splitCells(tableRow, count) {
|
|
737
|
-
// ensure that every cell-delimiting pipe has a space
|
|
738
|
-
// before it to distinguish it from an escaped pipe
|
|
739
|
-
var row = tableRow.replace(/\|/g, function (match, offset, str) {
|
|
740
|
-
var escaped = false,
|
|
741
|
-
curr = offset;
|
|
742
|
-
|
|
743
|
-
while (--curr >= 0 && str[curr] === '\\') {
|
|
744
|
-
escaped = !escaped;
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
if (escaped) {
|
|
748
|
-
// odd number of slashes means | is escaped
|
|
749
|
-
// so we leave it alone
|
|
750
|
-
return '|';
|
|
751
|
-
} else {
|
|
752
|
-
// add space before unescaped |
|
|
753
|
-
return ' |';
|
|
754
|
-
}
|
|
755
|
-
}),
|
|
756
|
-
cells = row.split(/ \|/);
|
|
757
|
-
var i = 0; // First/last cell in a row cannot be empty if it has no leading/trailing pipe
|
|
758
|
-
|
|
759
|
-
if (!cells[0].trim()) {
|
|
760
|
-
cells.shift();
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
if (cells.length > 0 && !cells[cells.length - 1].trim()) {
|
|
764
|
-
cells.pop();
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
if (cells.length > count) {
|
|
768
|
-
cells.splice(count);
|
|
769
|
-
} else {
|
|
770
|
-
while (cells.length < count) {
|
|
771
|
-
cells.push('');
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
for (; i < cells.length; i++) {
|
|
776
|
-
// leading or trailing whitespace is ignored per the gfm spec
|
|
777
|
-
cells[i] = cells[i].trim().replace(/\\\|/g, '|');
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
return cells;
|
|
781
|
-
}
|
|
782
|
-
/**
|
|
783
|
-
* Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').
|
|
784
|
-
* /c*$/ is vulnerable to REDOS.
|
|
785
|
-
*
|
|
786
|
-
* @param {string} str
|
|
787
|
-
* @param {string} c
|
|
788
|
-
* @param {boolean} invert Remove suffix of non-c chars instead. Default falsey.
|
|
789
|
-
*/
|
|
790
|
-
|
|
791
|
-
function rtrim(str, c, invert) {
|
|
792
|
-
var l = str.length;
|
|
793
|
-
|
|
794
|
-
if (l === 0) {
|
|
795
|
-
return '';
|
|
796
|
-
} // Length of suffix matching the invert condition.
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
var suffLen = 0; // Step left until we fail to match the invert condition.
|
|
800
|
-
|
|
801
|
-
while (suffLen < l) {
|
|
802
|
-
var currChar = str.charAt(l - suffLen - 1);
|
|
803
|
-
|
|
804
|
-
if (currChar === c && !invert) {
|
|
805
|
-
suffLen++;
|
|
806
|
-
} else if (currChar !== c && invert) {
|
|
807
|
-
suffLen++;
|
|
808
|
-
} else {
|
|
809
|
-
break;
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
return str.slice(0, l - suffLen);
|
|
814
|
-
}
|
|
815
|
-
function findClosingBracket(str, b) {
|
|
816
|
-
if (str.indexOf(b[1]) === -1) {
|
|
817
|
-
return -1;
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
var l = str.length;
|
|
821
|
-
var level = 0,
|
|
822
|
-
i = 0;
|
|
823
|
-
|
|
824
|
-
for (; i < l; i++) {
|
|
825
|
-
if (str[i] === '\\') {
|
|
826
|
-
i++;
|
|
827
|
-
} else if (str[i] === b[0]) {
|
|
828
|
-
level++;
|
|
829
|
-
} else if (str[i] === b[1]) {
|
|
830
|
-
level--;
|
|
831
|
-
|
|
832
|
-
if (level < 0) {
|
|
833
|
-
return i;
|
|
834
|
-
}
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
return -1;
|
|
839
|
-
}
|
|
840
|
-
function checkSanitizeDeprecation(opt) {
|
|
841
|
-
if (opt && opt.sanitize && !opt.silent) {
|
|
842
|
-
console.warn('marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options');
|
|
843
|
-
}
|
|
844
|
-
} // copied from https://stackoverflow.com/a/5450113/806777
|
|
447
|
+
/***/ "7f9f":
|
|
448
|
+
/***/ (function(module, exports) {
|
|
845
449
|
|
|
846
|
-
|
|
847
|
-
* @param {string} pattern
|
|
848
|
-
* @param {number} count
|
|
849
|
-
*/
|
|
450
|
+
module.exports = require("element-ui/lib/locale");
|
|
850
451
|
|
|
851
|
-
|
|
852
|
-
if (count < 1) {
|
|
853
|
-
return '';
|
|
854
|
-
}
|
|
452
|
+
/***/ }),
|
|
855
453
|
|
|
856
|
-
|
|
454
|
+
/***/ "8017":
|
|
455
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
857
456
|
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
457
|
+
"use strict";
|
|
458
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SidebarContent_vue_vue_type_style_index_0_id_29231cf0_prod_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("adf3");
|
|
459
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SidebarContent_vue_vue_type_style_index_0_id_29231cf0_prod_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SidebarContent_vue_vue_type_style_index_0_id_29231cf0_prod_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
|
|
460
|
+
/* unused harmony reexport * */
|
|
862
461
|
|
|
863
|
-
count >>= 1;
|
|
864
|
-
pattern += pattern;
|
|
865
|
-
}
|
|
866
462
|
|
|
867
|
-
|
|
868
|
-
}
|
|
463
|
+
/***/ }),
|
|
869
464
|
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
var title = link.title ? escape(link.title) : null;
|
|
873
|
-
var text = cap[1].replace(/\\([\[\]])/g, '$1');
|
|
874
|
-
|
|
875
|
-
if (cap[0].charAt(0) !== '!') {
|
|
876
|
-
lexer.state.inLink = true;
|
|
877
|
-
var token = {
|
|
878
|
-
type: 'link',
|
|
879
|
-
raw: raw,
|
|
880
|
-
href: href,
|
|
881
|
-
title: title,
|
|
882
|
-
text: text,
|
|
883
|
-
tokens: lexer.inlineTokens(text)
|
|
884
|
-
};
|
|
885
|
-
lexer.state.inLink = false;
|
|
886
|
-
return token;
|
|
887
|
-
}
|
|
465
|
+
/***/ "80c4":
|
|
466
|
+
/***/ (function(module, exports) {
|
|
888
467
|
|
|
889
|
-
|
|
890
|
-
type: 'image',
|
|
891
|
-
raw: raw,
|
|
892
|
-
href: href,
|
|
893
|
-
title: title,
|
|
894
|
-
text: escape(text)
|
|
895
|
-
};
|
|
896
|
-
}
|
|
468
|
+
module.exports = require("element-ui/lib/theme-chalk/option.css");
|
|
897
469
|
|
|
898
|
-
|
|
899
|
-
var matchIndentToCode = raw.match(/^(\s+)(?:```)/);
|
|
470
|
+
/***/ }),
|
|
900
471
|
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
}
|
|
472
|
+
/***/ "8353":
|
|
473
|
+
/***/ (function(module, exports) {
|
|
904
474
|
|
|
905
|
-
|
|
906
|
-
return text.split('\n').map(function (node) {
|
|
907
|
-
var matchIndentInNode = node.match(/^\s+/);
|
|
475
|
+
module.exports = require("core-js/modules/es.string.replace-all.js");
|
|
908
476
|
|
|
909
|
-
|
|
910
|
-
return node;
|
|
911
|
-
}
|
|
477
|
+
/***/ }),
|
|
912
478
|
|
|
913
|
-
|
|
479
|
+
/***/ "8535":
|
|
480
|
+
/***/ (function(module, exports) {
|
|
914
481
|
|
|
915
|
-
|
|
916
|
-
return node.slice(indentToCode.length);
|
|
917
|
-
}
|
|
482
|
+
module.exports = require("core-js/modules/es.set.js");
|
|
918
483
|
|
|
919
|
-
|
|
920
|
-
}).join('\n');
|
|
921
|
-
}
|
|
922
|
-
/**
|
|
923
|
-
* Tokenizer
|
|
924
|
-
*/
|
|
484
|
+
/***/ }),
|
|
925
485
|
|
|
486
|
+
/***/ "85f7":
|
|
487
|
+
/***/ (function(module, exports) {
|
|
926
488
|
|
|
927
|
-
|
|
928
|
-
function Tokenizer(options) {
|
|
929
|
-
this.options = options || exports.defaults;
|
|
930
|
-
}
|
|
489
|
+
module.exports = require("core-js/modules/es.array.includes.js");
|
|
931
490
|
|
|
932
|
-
|
|
491
|
+
/***/ }),
|
|
933
492
|
|
|
934
|
-
|
|
935
|
-
|
|
493
|
+
/***/ "88eb":
|
|
494
|
+
/***/ (function(module, exports) {
|
|
936
495
|
|
|
937
|
-
|
|
938
|
-
return {
|
|
939
|
-
type: 'space',
|
|
940
|
-
raw: cap[0]
|
|
941
|
-
};
|
|
942
|
-
}
|
|
943
|
-
};
|
|
496
|
+
module.exports = require("algoliasearch");
|
|
944
497
|
|
|
945
|
-
|
|
946
|
-
var cap = this.rules.block.code.exec(src);
|
|
498
|
+
/***/ }),
|
|
947
499
|
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
return {
|
|
951
|
-
type: 'code',
|
|
952
|
-
raw: cap[0],
|
|
953
|
-
codeBlockStyle: 'indented',
|
|
954
|
-
text: !this.options.pedantic ? rtrim(text, '\n') : text
|
|
955
|
-
};
|
|
956
|
-
}
|
|
957
|
-
};
|
|
500
|
+
/***/ "8bbf":
|
|
501
|
+
/***/ (function(module, exports) {
|
|
958
502
|
|
|
959
|
-
|
|
960
|
-
var cap = this.rules.block.fences.exec(src);
|
|
503
|
+
module.exports = require("vue");
|
|
961
504
|
|
|
962
|
-
|
|
963
|
-
var raw = cap[0];
|
|
964
|
-
var text = indentCodeCompensation(raw, cap[3] || '');
|
|
965
|
-
return {
|
|
966
|
-
type: 'code',
|
|
967
|
-
raw: raw,
|
|
968
|
-
lang: cap[2] ? cap[2].trim() : cap[2],
|
|
969
|
-
text: text
|
|
970
|
-
};
|
|
971
|
-
}
|
|
972
|
-
};
|
|
505
|
+
/***/ }),
|
|
973
506
|
|
|
974
|
-
|
|
975
|
-
|
|
507
|
+
/***/ "8edc":
|
|
508
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
976
509
|
|
|
977
|
-
|
|
978
|
-
var text = cap[2].trim(); // remove trailing #s
|
|
510
|
+
// extracted by mini-css-extract-plugin
|
|
979
511
|
|
|
980
|
-
|
|
981
|
-
var trimmed = rtrim(text, '#');
|
|
512
|
+
/***/ }),
|
|
982
513
|
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
} else if (!trimmed || / $/.test(trimmed)) {
|
|
986
|
-
// CommonMark requires space before trailing #s
|
|
987
|
-
text = trimmed.trim();
|
|
988
|
-
}
|
|
989
|
-
}
|
|
514
|
+
/***/ "8f11":
|
|
515
|
+
/***/ (function(module, exports) {
|
|
990
516
|
|
|
991
|
-
|
|
992
|
-
type: 'heading',
|
|
993
|
-
raw: cap[0],
|
|
994
|
-
depth: cap[1].length,
|
|
995
|
-
text: text,
|
|
996
|
-
tokens: this.lexer.inline(text)
|
|
997
|
-
};
|
|
998
|
-
}
|
|
999
|
-
};
|
|
517
|
+
module.exports = require("element-ui/lib/theme-chalk/icon.css");
|
|
1000
518
|
|
|
1001
|
-
|
|
1002
|
-
var cap = this.rules.block.hr.exec(src);
|
|
519
|
+
/***/ }),
|
|
1003
520
|
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
type: 'hr',
|
|
1007
|
-
raw: cap[0]
|
|
1008
|
-
};
|
|
1009
|
-
}
|
|
1010
|
-
};
|
|
521
|
+
/***/ "93e6":
|
|
522
|
+
/***/ (function(module, exports) {
|
|
1011
523
|
|
|
1012
|
-
|
|
1013
|
-
var cap = this.rules.block.blockquote.exec(src);
|
|
524
|
+
module.exports = require("element-ui/lib/popover");
|
|
1014
525
|
|
|
1015
|
-
|
|
1016
|
-
var text = cap[0].replace(/^ *>[ \t]?/gm, '');
|
|
1017
|
-
return {
|
|
1018
|
-
type: 'blockquote',
|
|
1019
|
-
raw: cap[0],
|
|
1020
|
-
tokens: this.lexer.blockTokens(text, []),
|
|
1021
|
-
text: text
|
|
1022
|
-
};
|
|
1023
|
-
}
|
|
1024
|
-
};
|
|
526
|
+
/***/ }),
|
|
1025
527
|
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
if (cap) {
|
|
1030
|
-
var raw, istask, ischecked, indent, i, blankLine, endsWithBlankLine, line, nextLine, rawLine, itemContents, endEarly;
|
|
1031
|
-
var bull = cap[1].trim();
|
|
1032
|
-
var isordered = bull.length > 1;
|
|
1033
|
-
var list = {
|
|
1034
|
-
type: 'list',
|
|
1035
|
-
raw: '',
|
|
1036
|
-
ordered: isordered,
|
|
1037
|
-
start: isordered ? +bull.slice(0, -1) : '',
|
|
1038
|
-
loose: false,
|
|
1039
|
-
items: []
|
|
1040
|
-
};
|
|
1041
|
-
bull = isordered ? "\\d{1,9}\\" + bull.slice(-1) : "\\" + bull;
|
|
528
|
+
/***/ "97d3":
|
|
529
|
+
/***/ (function(module, exports) {
|
|
1042
530
|
|
|
1043
|
-
|
|
1044
|
-
bull = isordered ? bull : '[*+-]';
|
|
1045
|
-
} // Get next list item
|
|
531
|
+
module.exports = require("core-js/modules/es.object.to-string.js");
|
|
1046
532
|
|
|
533
|
+
/***/ }),
|
|
1047
534
|
|
|
1048
|
-
|
|
535
|
+
/***/ "9a25":
|
|
536
|
+
/***/ (function(module, exports) {
|
|
1049
537
|
|
|
1050
|
-
|
|
1051
|
-
endEarly = false;
|
|
538
|
+
module.exports = require("element-ui/lib/theme-chalk/base.css");
|
|
1052
539
|
|
|
1053
|
-
|
|
1054
|
-
break;
|
|
1055
|
-
}
|
|
540
|
+
/***/ }),
|
|
1056
541
|
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
break;
|
|
1060
|
-
}
|
|
542
|
+
/***/ "9b22":
|
|
543
|
+
/***/ (function(module, exports) {
|
|
1061
544
|
|
|
1062
|
-
|
|
1063
|
-
src = src.substring(raw.length);
|
|
1064
|
-
line = cap[2].split('\n', 1)[0];
|
|
1065
|
-
nextLine = src.split('\n', 1)[0];
|
|
545
|
+
module.exports = require("core-js/modules/es.symbol.js");
|
|
1066
546
|
|
|
1067
|
-
|
|
1068
|
-
indent = 2;
|
|
1069
|
-
itemContents = line.trimLeft();
|
|
1070
|
-
} else {
|
|
1071
|
-
indent = cap[2].search(/[^ ]/); // Find first non-space char
|
|
547
|
+
/***/ }),
|
|
1072
548
|
|
|
1073
|
-
|
|
549
|
+
/***/ "9b53":
|
|
550
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1074
551
|
|
|
1075
|
-
|
|
1076
|
-
indent += cap[1].length;
|
|
1077
|
-
}
|
|
552
|
+
module.exports = __webpack_require__.p + "img/missing-image.1878d8b8.svg";
|
|
1078
553
|
|
|
1079
|
-
|
|
554
|
+
/***/ }),
|
|
1080
555
|
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
raw += nextLine + '\n';
|
|
1084
|
-
src = src.substring(nextLine.length + 1);
|
|
1085
|
-
endEarly = true;
|
|
1086
|
-
}
|
|
556
|
+
/***/ "9bb0":
|
|
557
|
+
/***/ (function(module, exports) {
|
|
1087
558
|
|
|
1088
|
-
|
|
1089
|
-
var nextBulletRegex = new RegExp("^ {0," + Math.min(3, indent - 1) + "}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))");
|
|
1090
|
-
var hrRegex = new RegExp("^ {0," + Math.min(3, indent - 1) + "}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)");
|
|
1091
|
-
var fencesBeginRegex = new RegExp("^ {0," + Math.min(3, indent - 1) + "}(?:```|~~~)");
|
|
1092
|
-
var headingBeginRegex = new RegExp("^ {0," + Math.min(3, indent - 1) + "}#"); // Check if following lines should be included in List Item
|
|
559
|
+
module.exports = require("@soda/get-current-script");
|
|
1093
560
|
|
|
1094
|
-
|
|
1095
|
-
rawLine = src.split('\n', 1)[0];
|
|
1096
|
-
line = rawLine; // Re-align to follow commonmark nesting rules
|
|
561
|
+
/***/ }),
|
|
1097
562
|
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
} // End list item if found code fences
|
|
563
|
+
/***/ "9bb5":
|
|
564
|
+
/***/ (function(module, exports) {
|
|
1101
565
|
|
|
566
|
+
module.exports = require("core-js/modules/es.string.iterator.js");
|
|
1102
567
|
|
|
1103
|
-
|
|
1104
|
-
break;
|
|
1105
|
-
} // End list item if found start of new heading
|
|
568
|
+
/***/ }),
|
|
1106
569
|
|
|
570
|
+
/***/ "a005":
|
|
571
|
+
/***/ (function(module, exports) {
|
|
1107
572
|
|
|
1108
|
-
|
|
1109
|
-
break;
|
|
1110
|
-
} // End list item if found start of new bullet
|
|
573
|
+
module.exports = require("core-js/modules/es.object.entries.js");
|
|
1111
574
|
|
|
575
|
+
/***/ }),
|
|
1112
576
|
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
} // Horizontal rule found
|
|
577
|
+
/***/ "a012":
|
|
578
|
+
/***/ (function(module, exports) {
|
|
1116
579
|
|
|
1117
|
-
|
|
1118
|
-
if (hrRegex.test(src)) {
|
|
1119
|
-
break;
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
if (line.search(/[^ ]/) >= indent || !line.trim()) {
|
|
1123
|
-
// Dedent if possible
|
|
1124
|
-
itemContents += '\n' + line.slice(indent);
|
|
1125
|
-
} else if (!blankLine) {
|
|
1126
|
-
// Until blank line, item doesn't need indentation
|
|
1127
|
-
itemContents += '\n' + line;
|
|
1128
|
-
} else {
|
|
1129
|
-
// Otherwise, improper indentation ends this item
|
|
1130
|
-
break;
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
if (!blankLine && !line.trim()) {
|
|
1134
|
-
// Check if current line is blank
|
|
1135
|
-
blankLine = true;
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
raw += rawLine + '\n';
|
|
1139
|
-
src = src.substring(rawLine.length + 1);
|
|
1140
|
-
}
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
if (!list.loose) {
|
|
1144
|
-
// If the previous item ended with a blank line, the list is loose
|
|
1145
|
-
if (endsWithBlankLine) {
|
|
1146
|
-
list.loose = true;
|
|
1147
|
-
} else if (/\n *\n *$/.test(raw)) {
|
|
1148
|
-
endsWithBlankLine = true;
|
|
1149
|
-
}
|
|
1150
|
-
} // Check for task list items
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
if (this.options.gfm) {
|
|
1154
|
-
istask = /^\[[ xX]\] /.exec(itemContents);
|
|
1155
|
-
|
|
1156
|
-
if (istask) {
|
|
1157
|
-
ischecked = istask[0] !== '[ ] ';
|
|
1158
|
-
itemContents = itemContents.replace(/^\[[ xX]\] +/, '');
|
|
1159
|
-
}
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
list.items.push({
|
|
1163
|
-
type: 'list_item',
|
|
1164
|
-
raw: raw,
|
|
1165
|
-
task: !!istask,
|
|
1166
|
-
checked: ischecked,
|
|
1167
|
-
loose: false,
|
|
1168
|
-
text: itemContents
|
|
1169
|
-
});
|
|
1170
|
-
list.raw += raw;
|
|
1171
|
-
} // Do not consume newlines at end of final item. Alternatively, make itemRegex *start* with any newlines to simplify/speed up endsWithBlankLine logic
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
list.items[list.items.length - 1].raw = raw.trimRight();
|
|
1175
|
-
list.items[list.items.length - 1].text = itemContents.trimRight();
|
|
1176
|
-
list.raw = list.raw.trimRight();
|
|
1177
|
-
var l = list.items.length; // Item child tokens handled here at end because we needed to have the final item to trim it first
|
|
1178
|
-
|
|
1179
|
-
for (i = 0; i < l; i++) {
|
|
1180
|
-
this.lexer.state.top = false;
|
|
1181
|
-
list.items[i].tokens = this.lexer.blockTokens(list.items[i].text, []);
|
|
1182
|
-
var spacers = list.items[i].tokens.filter(function (t) {
|
|
1183
|
-
return t.type === 'space';
|
|
1184
|
-
});
|
|
1185
|
-
var hasMultipleLineBreaks = spacers.every(function (t) {
|
|
1186
|
-
var chars = t.raw.split('');
|
|
1187
|
-
var lineBreaks = 0;
|
|
1188
|
-
|
|
1189
|
-
for (var _iterator = _createForOfIteratorHelperLoose(chars), _step; !(_step = _iterator()).done;) {
|
|
1190
|
-
var _char = _step.value;
|
|
1191
|
-
|
|
1192
|
-
if (_char === '\n') {
|
|
1193
|
-
lineBreaks += 1;
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
|
-
if (lineBreaks > 1) {
|
|
1197
|
-
return true;
|
|
1198
|
-
}
|
|
1199
|
-
}
|
|
1200
|
-
|
|
1201
|
-
return false;
|
|
1202
|
-
});
|
|
1203
|
-
|
|
1204
|
-
if (!list.loose && spacers.length && hasMultipleLineBreaks) {
|
|
1205
|
-
// Having a single line break doesn't mean a list is loose. A single line break is terminating the last list item
|
|
1206
|
-
list.loose = true;
|
|
1207
|
-
list.items[i].loose = true;
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
|
-
return list;
|
|
1212
|
-
}
|
|
1213
|
-
};
|
|
1214
|
-
|
|
1215
|
-
_proto.html = function html(src) {
|
|
1216
|
-
var cap = this.rules.block.html.exec(src);
|
|
1217
|
-
|
|
1218
|
-
if (cap) {
|
|
1219
|
-
var token = {
|
|
1220
|
-
type: 'html',
|
|
1221
|
-
raw: cap[0],
|
|
1222
|
-
pre: !this.options.sanitizer && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'),
|
|
1223
|
-
text: cap[0]
|
|
1224
|
-
};
|
|
1225
|
-
|
|
1226
|
-
if (this.options.sanitize) {
|
|
1227
|
-
var text = this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]);
|
|
1228
|
-
token.type = 'paragraph';
|
|
1229
|
-
token.text = text;
|
|
1230
|
-
token.tokens = this.lexer.inline(text);
|
|
1231
|
-
}
|
|
1232
|
-
|
|
1233
|
-
return token;
|
|
1234
|
-
}
|
|
1235
|
-
};
|
|
1236
|
-
|
|
1237
|
-
_proto.def = function def(src) {
|
|
1238
|
-
var cap = this.rules.block.def.exec(src);
|
|
1239
|
-
|
|
1240
|
-
if (cap) {
|
|
1241
|
-
if (cap[3]) cap[3] = cap[3].substring(1, cap[3].length - 1);
|
|
1242
|
-
var tag = cap[1].toLowerCase().replace(/\s+/g, ' ');
|
|
1243
|
-
return {
|
|
1244
|
-
type: 'def',
|
|
1245
|
-
tag: tag,
|
|
1246
|
-
raw: cap[0],
|
|
1247
|
-
href: cap[2],
|
|
1248
|
-
title: cap[3]
|
|
1249
|
-
};
|
|
1250
|
-
}
|
|
1251
|
-
};
|
|
1252
|
-
|
|
1253
|
-
_proto.table = function table(src) {
|
|
1254
|
-
var cap = this.rules.block.table.exec(src);
|
|
1255
|
-
|
|
1256
|
-
if (cap) {
|
|
1257
|
-
var item = {
|
|
1258
|
-
type: 'table',
|
|
1259
|
-
header: splitCells(cap[1]).map(function (c) {
|
|
1260
|
-
return {
|
|
1261
|
-
text: c
|
|
1262
|
-
};
|
|
1263
|
-
}),
|
|
1264
|
-
align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
|
|
1265
|
-
rows: cap[3] && cap[3].trim() ? cap[3].replace(/\n[ \t]*$/, '').split('\n') : []
|
|
1266
|
-
};
|
|
1267
|
-
|
|
1268
|
-
if (item.header.length === item.align.length) {
|
|
1269
|
-
item.raw = cap[0];
|
|
1270
|
-
var l = item.align.length;
|
|
1271
|
-
var i, j, k, row;
|
|
1272
|
-
|
|
1273
|
-
for (i = 0; i < l; i++) {
|
|
1274
|
-
if (/^ *-+: *$/.test(item.align[i])) {
|
|
1275
|
-
item.align[i] = 'right';
|
|
1276
|
-
} else if (/^ *:-+: *$/.test(item.align[i])) {
|
|
1277
|
-
item.align[i] = 'center';
|
|
1278
|
-
} else if (/^ *:-+ *$/.test(item.align[i])) {
|
|
1279
|
-
item.align[i] = 'left';
|
|
1280
|
-
} else {
|
|
1281
|
-
item.align[i] = null;
|
|
1282
|
-
}
|
|
1283
|
-
}
|
|
1284
|
-
|
|
1285
|
-
l = item.rows.length;
|
|
1286
|
-
|
|
1287
|
-
for (i = 0; i < l; i++) {
|
|
1288
|
-
item.rows[i] = splitCells(item.rows[i], item.header.length).map(function (c) {
|
|
1289
|
-
return {
|
|
1290
|
-
text: c
|
|
1291
|
-
};
|
|
1292
|
-
});
|
|
1293
|
-
} // parse child tokens inside headers and cells
|
|
1294
|
-
// header child tokens
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
l = item.header.length;
|
|
1298
|
-
|
|
1299
|
-
for (j = 0; j < l; j++) {
|
|
1300
|
-
item.header[j].tokens = this.lexer.inline(item.header[j].text);
|
|
1301
|
-
} // cell child tokens
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
l = item.rows.length;
|
|
1305
|
-
|
|
1306
|
-
for (j = 0; j < l; j++) {
|
|
1307
|
-
row = item.rows[j];
|
|
1308
|
-
|
|
1309
|
-
for (k = 0; k < row.length; k++) {
|
|
1310
|
-
row[k].tokens = this.lexer.inline(row[k].text);
|
|
1311
|
-
}
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
return item;
|
|
1315
|
-
}
|
|
1316
|
-
}
|
|
1317
|
-
};
|
|
1318
|
-
|
|
1319
|
-
_proto.lheading = function lheading(src) {
|
|
1320
|
-
var cap = this.rules.block.lheading.exec(src);
|
|
1321
|
-
|
|
1322
|
-
if (cap) {
|
|
1323
|
-
return {
|
|
1324
|
-
type: 'heading',
|
|
1325
|
-
raw: cap[0],
|
|
1326
|
-
depth: cap[2].charAt(0) === '=' ? 1 : 2,
|
|
1327
|
-
text: cap[1],
|
|
1328
|
-
tokens: this.lexer.inline(cap[1])
|
|
1329
|
-
};
|
|
1330
|
-
}
|
|
1331
|
-
};
|
|
1332
|
-
|
|
1333
|
-
_proto.paragraph = function paragraph(src) {
|
|
1334
|
-
var cap = this.rules.block.paragraph.exec(src);
|
|
1335
|
-
|
|
1336
|
-
if (cap) {
|
|
1337
|
-
var text = cap[1].charAt(cap[1].length - 1) === '\n' ? cap[1].slice(0, -1) : cap[1];
|
|
1338
|
-
return {
|
|
1339
|
-
type: 'paragraph',
|
|
1340
|
-
raw: cap[0],
|
|
1341
|
-
text: text,
|
|
1342
|
-
tokens: this.lexer.inline(text)
|
|
1343
|
-
};
|
|
1344
|
-
}
|
|
1345
|
-
};
|
|
1346
|
-
|
|
1347
|
-
_proto.text = function text(src) {
|
|
1348
|
-
var cap = this.rules.block.text.exec(src);
|
|
1349
|
-
|
|
1350
|
-
if (cap) {
|
|
1351
|
-
return {
|
|
1352
|
-
type: 'text',
|
|
1353
|
-
raw: cap[0],
|
|
1354
|
-
text: cap[0],
|
|
1355
|
-
tokens: this.lexer.inline(cap[0])
|
|
1356
|
-
};
|
|
1357
|
-
}
|
|
1358
|
-
};
|
|
1359
|
-
|
|
1360
|
-
_proto.escape = function escape$1(src) {
|
|
1361
|
-
var cap = this.rules.inline.escape.exec(src);
|
|
1362
|
-
|
|
1363
|
-
if (cap) {
|
|
1364
|
-
return {
|
|
1365
|
-
type: 'escape',
|
|
1366
|
-
raw: cap[0],
|
|
1367
|
-
text: escape(cap[1])
|
|
1368
|
-
};
|
|
1369
|
-
}
|
|
1370
|
-
};
|
|
1371
|
-
|
|
1372
|
-
_proto.tag = function tag(src) {
|
|
1373
|
-
var cap = this.rules.inline.tag.exec(src);
|
|
1374
|
-
|
|
1375
|
-
if (cap) {
|
|
1376
|
-
if (!this.lexer.state.inLink && /^<a /i.test(cap[0])) {
|
|
1377
|
-
this.lexer.state.inLink = true;
|
|
1378
|
-
} else if (this.lexer.state.inLink && /^<\/a>/i.test(cap[0])) {
|
|
1379
|
-
this.lexer.state.inLink = false;
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
|
-
if (!this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(cap[0])) {
|
|
1383
|
-
this.lexer.state.inRawBlock = true;
|
|
1384
|
-
} else if (this.lexer.state.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(cap[0])) {
|
|
1385
|
-
this.lexer.state.inRawBlock = false;
|
|
1386
|
-
}
|
|
1387
|
-
|
|
1388
|
-
return {
|
|
1389
|
-
type: this.options.sanitize ? 'text' : 'html',
|
|
1390
|
-
raw: cap[0],
|
|
1391
|
-
inLink: this.lexer.state.inLink,
|
|
1392
|
-
inRawBlock: this.lexer.state.inRawBlock,
|
|
1393
|
-
text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]) : cap[0]
|
|
1394
|
-
};
|
|
1395
|
-
}
|
|
1396
|
-
};
|
|
1397
|
-
|
|
1398
|
-
_proto.link = function link(src) {
|
|
1399
|
-
var cap = this.rules.inline.link.exec(src);
|
|
1400
|
-
|
|
1401
|
-
if (cap) {
|
|
1402
|
-
var trimmedUrl = cap[2].trim();
|
|
1403
|
-
|
|
1404
|
-
if (!this.options.pedantic && /^</.test(trimmedUrl)) {
|
|
1405
|
-
// commonmark requires matching angle brackets
|
|
1406
|
-
if (!/>$/.test(trimmedUrl)) {
|
|
1407
|
-
return;
|
|
1408
|
-
} // ending angle bracket cannot be escaped
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
var rtrimSlash = rtrim(trimmedUrl.slice(0, -1), '\\');
|
|
1412
|
-
|
|
1413
|
-
if ((trimmedUrl.length - rtrimSlash.length) % 2 === 0) {
|
|
1414
|
-
return;
|
|
1415
|
-
}
|
|
1416
|
-
} else {
|
|
1417
|
-
// find closing parenthesis
|
|
1418
|
-
var lastParenIndex = findClosingBracket(cap[2], '()');
|
|
1419
|
-
|
|
1420
|
-
if (lastParenIndex > -1) {
|
|
1421
|
-
var start = cap[0].indexOf('!') === 0 ? 5 : 4;
|
|
1422
|
-
var linkLen = start + cap[1].length + lastParenIndex;
|
|
1423
|
-
cap[2] = cap[2].substring(0, lastParenIndex);
|
|
1424
|
-
cap[0] = cap[0].substring(0, linkLen).trim();
|
|
1425
|
-
cap[3] = '';
|
|
1426
|
-
}
|
|
1427
|
-
}
|
|
1428
|
-
|
|
1429
|
-
var href = cap[2];
|
|
1430
|
-
var title = '';
|
|
1431
|
-
|
|
1432
|
-
if (this.options.pedantic) {
|
|
1433
|
-
// split pedantic href and title
|
|
1434
|
-
var link = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(href);
|
|
1435
|
-
|
|
1436
|
-
if (link) {
|
|
1437
|
-
href = link[1];
|
|
1438
|
-
title = link[3];
|
|
1439
|
-
}
|
|
1440
|
-
} else {
|
|
1441
|
-
title = cap[3] ? cap[3].slice(1, -1) : '';
|
|
1442
|
-
}
|
|
1443
|
-
|
|
1444
|
-
href = href.trim();
|
|
1445
|
-
|
|
1446
|
-
if (/^</.test(href)) {
|
|
1447
|
-
if (this.options.pedantic && !/>$/.test(trimmedUrl)) {
|
|
1448
|
-
// pedantic allows starting angle bracket without ending angle bracket
|
|
1449
|
-
href = href.slice(1);
|
|
1450
|
-
} else {
|
|
1451
|
-
href = href.slice(1, -1);
|
|
1452
|
-
}
|
|
1453
|
-
}
|
|
1454
|
-
|
|
1455
|
-
return outputLink(cap, {
|
|
1456
|
-
href: href ? href.replace(this.rules.inline._escapes, '$1') : href,
|
|
1457
|
-
title: title ? title.replace(this.rules.inline._escapes, '$1') : title
|
|
1458
|
-
}, cap[0], this.lexer);
|
|
1459
|
-
}
|
|
1460
|
-
};
|
|
1461
|
-
|
|
1462
|
-
_proto.reflink = function reflink(src, links) {
|
|
1463
|
-
var cap;
|
|
1464
|
-
|
|
1465
|
-
if ((cap = this.rules.inline.reflink.exec(src)) || (cap = this.rules.inline.nolink.exec(src))) {
|
|
1466
|
-
var link = (cap[2] || cap[1]).replace(/\s+/g, ' ');
|
|
1467
|
-
link = links[link.toLowerCase()];
|
|
1468
|
-
|
|
1469
|
-
if (!link || !link.href) {
|
|
1470
|
-
var text = cap[0].charAt(0);
|
|
1471
|
-
return {
|
|
1472
|
-
type: 'text',
|
|
1473
|
-
raw: text,
|
|
1474
|
-
text: text
|
|
1475
|
-
};
|
|
1476
|
-
}
|
|
1477
|
-
|
|
1478
|
-
return outputLink(cap, link, cap[0], this.lexer);
|
|
1479
|
-
}
|
|
1480
|
-
};
|
|
1481
|
-
|
|
1482
|
-
_proto.emStrong = function emStrong(src, maskedSrc, prevChar) {
|
|
1483
|
-
if (prevChar === void 0) {
|
|
1484
|
-
prevChar = '';
|
|
1485
|
-
}
|
|
1486
|
-
|
|
1487
|
-
var match = this.rules.inline.emStrong.lDelim.exec(src);
|
|
1488
|
-
if (!match) return; // _ can't be between two alphanumerics. \p{L}\p{N} includes non-english alphabet/numbers as well
|
|
1489
|
-
|
|
1490
|
-
if (match[3] && prevChar.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\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\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\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\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\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-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\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\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/)) return;
|
|
1491
|
-
var nextChar = match[1] || match[2] || '';
|
|
1492
|
-
|
|
1493
|
-
if (!nextChar || nextChar && (prevChar === '' || this.rules.inline.punctuation.exec(prevChar))) {
|
|
1494
|
-
var lLength = match[0].length - 1;
|
|
1495
|
-
var rDelim,
|
|
1496
|
-
rLength,
|
|
1497
|
-
delimTotal = lLength,
|
|
1498
|
-
midDelimTotal = 0;
|
|
1499
|
-
var endReg = match[0][0] === '*' ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd;
|
|
1500
|
-
endReg.lastIndex = 0; // Clip maskedSrc to same section of string as src (move to lexer?)
|
|
1501
|
-
|
|
1502
|
-
maskedSrc = maskedSrc.slice(-1 * src.length + lLength);
|
|
1503
|
-
|
|
1504
|
-
while ((match = endReg.exec(maskedSrc)) != null) {
|
|
1505
|
-
rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];
|
|
1506
|
-
if (!rDelim) continue; // skip single * in __abc*abc__
|
|
1507
|
-
|
|
1508
|
-
rLength = rDelim.length;
|
|
1509
|
-
|
|
1510
|
-
if (match[3] || match[4]) {
|
|
1511
|
-
// found another Left Delim
|
|
1512
|
-
delimTotal += rLength;
|
|
1513
|
-
continue;
|
|
1514
|
-
} else if (match[5] || match[6]) {
|
|
1515
|
-
// either Left or Right Delim
|
|
1516
|
-
if (lLength % 3 && !((lLength + rLength) % 3)) {
|
|
1517
|
-
midDelimTotal += rLength;
|
|
1518
|
-
continue; // CommonMark Emphasis Rules 9-10
|
|
1519
|
-
}
|
|
1520
|
-
}
|
|
1521
|
-
|
|
1522
|
-
delimTotal -= rLength;
|
|
1523
|
-
if (delimTotal > 0) continue; // Haven't found enough closing delimiters
|
|
1524
|
-
// Remove extra characters. *a*** -> *a*
|
|
1525
|
-
|
|
1526
|
-
rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal); // Create `em` if smallest delimiter has odd char count. *a***
|
|
1527
|
-
|
|
1528
|
-
if (Math.min(lLength, rLength) % 2) {
|
|
1529
|
-
var _text = src.slice(1, lLength + match.index + rLength);
|
|
1530
|
-
|
|
1531
|
-
return {
|
|
1532
|
-
type: 'em',
|
|
1533
|
-
raw: src.slice(0, lLength + match.index + rLength + 1),
|
|
1534
|
-
text: _text,
|
|
1535
|
-
tokens: this.lexer.inlineTokens(_text)
|
|
1536
|
-
};
|
|
1537
|
-
} // Create 'strong' if smallest delimiter has even char count. **a***
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
var text = src.slice(2, lLength + match.index + rLength - 1);
|
|
1541
|
-
return {
|
|
1542
|
-
type: 'strong',
|
|
1543
|
-
raw: src.slice(0, lLength + match.index + rLength + 1),
|
|
1544
|
-
text: text,
|
|
1545
|
-
tokens: this.lexer.inlineTokens(text)
|
|
1546
|
-
};
|
|
1547
|
-
}
|
|
1548
|
-
}
|
|
1549
|
-
};
|
|
1550
|
-
|
|
1551
|
-
_proto.codespan = function codespan(src) {
|
|
1552
|
-
var cap = this.rules.inline.code.exec(src);
|
|
1553
|
-
|
|
1554
|
-
if (cap) {
|
|
1555
|
-
var text = cap[2].replace(/\n/g, ' ');
|
|
1556
|
-
var hasNonSpaceChars = /[^ ]/.test(text);
|
|
1557
|
-
var hasSpaceCharsOnBothEnds = /^ /.test(text) && / $/.test(text);
|
|
1558
|
-
|
|
1559
|
-
if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {
|
|
1560
|
-
text = text.substring(1, text.length - 1);
|
|
1561
|
-
}
|
|
1562
|
-
|
|
1563
|
-
text = escape(text, true);
|
|
1564
|
-
return {
|
|
1565
|
-
type: 'codespan',
|
|
1566
|
-
raw: cap[0],
|
|
1567
|
-
text: text
|
|
1568
|
-
};
|
|
1569
|
-
}
|
|
1570
|
-
};
|
|
1571
|
-
|
|
1572
|
-
_proto.br = function br(src) {
|
|
1573
|
-
var cap = this.rules.inline.br.exec(src);
|
|
1574
|
-
|
|
1575
|
-
if (cap) {
|
|
1576
|
-
return {
|
|
1577
|
-
type: 'br',
|
|
1578
|
-
raw: cap[0]
|
|
1579
|
-
};
|
|
1580
|
-
}
|
|
1581
|
-
};
|
|
1582
|
-
|
|
1583
|
-
_proto.del = function del(src) {
|
|
1584
|
-
var cap = this.rules.inline.del.exec(src);
|
|
1585
|
-
|
|
1586
|
-
if (cap) {
|
|
1587
|
-
return {
|
|
1588
|
-
type: 'del',
|
|
1589
|
-
raw: cap[0],
|
|
1590
|
-
text: cap[2],
|
|
1591
|
-
tokens: this.lexer.inlineTokens(cap[2])
|
|
1592
|
-
};
|
|
1593
|
-
}
|
|
1594
|
-
};
|
|
1595
|
-
|
|
1596
|
-
_proto.autolink = function autolink(src, mangle) {
|
|
1597
|
-
var cap = this.rules.inline.autolink.exec(src);
|
|
1598
|
-
|
|
1599
|
-
if (cap) {
|
|
1600
|
-
var text, href;
|
|
1601
|
-
|
|
1602
|
-
if (cap[2] === '@') {
|
|
1603
|
-
text = escape(this.options.mangle ? mangle(cap[1]) : cap[1]);
|
|
1604
|
-
href = 'mailto:' + text;
|
|
1605
|
-
} else {
|
|
1606
|
-
text = escape(cap[1]);
|
|
1607
|
-
href = text;
|
|
1608
|
-
}
|
|
1609
|
-
|
|
1610
|
-
return {
|
|
1611
|
-
type: 'link',
|
|
1612
|
-
raw: cap[0],
|
|
1613
|
-
text: text,
|
|
1614
|
-
href: href,
|
|
1615
|
-
tokens: [{
|
|
1616
|
-
type: 'text',
|
|
1617
|
-
raw: text,
|
|
1618
|
-
text: text
|
|
1619
|
-
}]
|
|
1620
|
-
};
|
|
1621
|
-
}
|
|
1622
|
-
};
|
|
1623
|
-
|
|
1624
|
-
_proto.url = function url(src, mangle) {
|
|
1625
|
-
var cap;
|
|
1626
|
-
|
|
1627
|
-
if (cap = this.rules.inline.url.exec(src)) {
|
|
1628
|
-
var text, href;
|
|
1629
|
-
|
|
1630
|
-
if (cap[2] === '@') {
|
|
1631
|
-
text = escape(this.options.mangle ? mangle(cap[0]) : cap[0]);
|
|
1632
|
-
href = 'mailto:' + text;
|
|
1633
|
-
} else {
|
|
1634
|
-
// do extended autolink path validation
|
|
1635
|
-
var prevCapZero;
|
|
1636
|
-
|
|
1637
|
-
do {
|
|
1638
|
-
prevCapZero = cap[0];
|
|
1639
|
-
cap[0] = this.rules.inline._backpedal.exec(cap[0])[0];
|
|
1640
|
-
} while (prevCapZero !== cap[0]);
|
|
1641
|
-
|
|
1642
|
-
text = escape(cap[0]);
|
|
1643
|
-
|
|
1644
|
-
if (cap[1] === 'www.') {
|
|
1645
|
-
href = 'http://' + text;
|
|
1646
|
-
} else {
|
|
1647
|
-
href = text;
|
|
1648
|
-
}
|
|
1649
|
-
}
|
|
1650
|
-
|
|
1651
|
-
return {
|
|
1652
|
-
type: 'link',
|
|
1653
|
-
raw: cap[0],
|
|
1654
|
-
text: text,
|
|
1655
|
-
href: href,
|
|
1656
|
-
tokens: [{
|
|
1657
|
-
type: 'text',
|
|
1658
|
-
raw: text,
|
|
1659
|
-
text: text
|
|
1660
|
-
}]
|
|
1661
|
-
};
|
|
1662
|
-
}
|
|
1663
|
-
};
|
|
1664
|
-
|
|
1665
|
-
_proto.inlineText = function inlineText(src, smartypants) {
|
|
1666
|
-
var cap = this.rules.inline.text.exec(src);
|
|
1667
|
-
|
|
1668
|
-
if (cap) {
|
|
1669
|
-
var text;
|
|
1670
|
-
|
|
1671
|
-
if (this.lexer.state.inRawBlock) {
|
|
1672
|
-
text = this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]) : cap[0];
|
|
1673
|
-
} else {
|
|
1674
|
-
text = escape(this.options.smartypants ? smartypants(cap[0]) : cap[0]);
|
|
1675
|
-
}
|
|
1676
|
-
|
|
1677
|
-
return {
|
|
1678
|
-
type: 'text',
|
|
1679
|
-
raw: cap[0],
|
|
1680
|
-
text: text
|
|
1681
|
-
};
|
|
1682
|
-
}
|
|
1683
|
-
};
|
|
1684
|
-
|
|
1685
|
-
return Tokenizer;
|
|
1686
|
-
}();
|
|
1687
|
-
|
|
1688
|
-
/**
|
|
1689
|
-
* Block-Level Grammar
|
|
1690
|
-
*/
|
|
1691
|
-
|
|
1692
|
-
var block = {
|
|
1693
|
-
newline: /^(?: *(?:\n|$))+/,
|
|
1694
|
-
code: /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,
|
|
1695
|
-
fences: /^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,
|
|
1696
|
-
hr: /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,
|
|
1697
|
-
heading: /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,
|
|
1698
|
-
blockquote: /^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,
|
|
1699
|
-
list: /^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,
|
|
1700
|
-
html: '^ {0,3}(?:' // optional indentation
|
|
1701
|
-
+ '<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)' // (1)
|
|
1702
|
-
+ '|comment[^\\n]*(\\n+|$)' // (2)
|
|
1703
|
-
+ '|<\\?[\\s\\S]*?(?:\\?>\\n*|$)' // (3)
|
|
1704
|
-
+ '|<![A-Z][\\s\\S]*?(?:>\\n*|$)' // (4)
|
|
1705
|
-
+ '|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)' // (5)
|
|
1706
|
-
+ '|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)' // (6)
|
|
1707
|
-
+ '|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)' // (7) open tag
|
|
1708
|
-
+ '|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)' // (7) closing tag
|
|
1709
|
-
+ ')',
|
|
1710
|
-
def: /^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,
|
|
1711
|
-
table: noopTest,
|
|
1712
|
-
lheading: /^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
1713
|
-
// regex template, placeholders will be replaced according to different paragraph
|
|
1714
|
-
// interruption rules of commonmark and the original markdown spec:
|
|
1715
|
-
_paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,
|
|
1716
|
-
text: /^[^\n]+/
|
|
1717
|
-
};
|
|
1718
|
-
block._label = /(?!\s*\])(?:\\.|[^\[\]\\])+/;
|
|
1719
|
-
block._title = /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;
|
|
1720
|
-
block.def = edit(block.def).replace('label', block._label).replace('title', block._title).getRegex();
|
|
1721
|
-
block.bullet = /(?:[*+-]|\d{1,9}[.)])/;
|
|
1722
|
-
block.listItemStart = edit(/^( *)(bull) */).replace('bull', block.bullet).getRegex();
|
|
1723
|
-
block.list = edit(block.list).replace(/bull/g, block.bullet).replace('hr', '\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))').replace('def', '\\n+(?=' + block.def.source + ')').getRegex();
|
|
1724
|
-
block._tag = 'address|article|aside|base|basefont|blockquote|body|caption' + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption' + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe' + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option' + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr' + '|track|ul';
|
|
1725
|
-
block._comment = /<!--(?!-?>)[\s\S]*?(?:-->|$)/;
|
|
1726
|
-
block.html = edit(block.html, 'i').replace('comment', block._comment).replace('tag', block._tag).replace('attribute', / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
|
|
1727
|
-
block.paragraph = edit(block._paragraph).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs
|
|
1728
|
-
.replace('|table', '').replace('blockquote', ' {0,3}>').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt
|
|
1729
|
-
.replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)').replace('tag', block._tag) // pars can be interrupted by type (6) html blocks
|
|
1730
|
-
.getRegex();
|
|
1731
|
-
block.blockquote = edit(block.blockquote).replace('paragraph', block.paragraph).getRegex();
|
|
1732
|
-
/**
|
|
1733
|
-
* Normal Block Grammar
|
|
1734
|
-
*/
|
|
1735
|
-
|
|
1736
|
-
block.normal = merge({}, block);
|
|
1737
|
-
/**
|
|
1738
|
-
* GFM Block Grammar
|
|
1739
|
-
*/
|
|
1740
|
-
|
|
1741
|
-
block.gfm = merge({}, block.normal, {
|
|
1742
|
-
table: '^ *([^\\n ].*\\|.*)\\n' // Header
|
|
1743
|
-
+ ' {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?' // Align
|
|
1744
|
-
+ '(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)' // Cells
|
|
1745
|
-
|
|
1746
|
-
});
|
|
1747
|
-
block.gfm.table = edit(block.gfm.table).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('blockquote', ' {0,3}>').replace('code', ' {4}[^\\n]').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt
|
|
1748
|
-
.replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)').replace('tag', block._tag) // tables can be interrupted by type (6) html blocks
|
|
1749
|
-
.getRegex();
|
|
1750
|
-
block.gfm.paragraph = edit(block._paragraph).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs
|
|
1751
|
-
.replace('table', block.gfm.table) // interrupt paragraphs with table
|
|
1752
|
-
.replace('blockquote', ' {0,3}>').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt
|
|
1753
|
-
.replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)').replace('tag', block._tag) // pars can be interrupted by type (6) html blocks
|
|
1754
|
-
.getRegex();
|
|
1755
|
-
/**
|
|
1756
|
-
* Pedantic grammar (original John Gruber's loose markdown specification)
|
|
1757
|
-
*/
|
|
1758
|
-
|
|
1759
|
-
block.pedantic = merge({}, block.normal, {
|
|
1760
|
-
html: edit('^ *(?:comment *(?:\\n|\\s*$)' + '|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)' // closed tag
|
|
1761
|
-
+ '|<tag(?:"[^"]*"|\'[^\']*\'|\\s[^\'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))').replace('comment', block._comment).replace(/tag/g, '(?!(?:' + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub' + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)' + '\\b)\\w+(?!:|[^\\w\\s@]*@)\\b').getRegex(),
|
|
1762
|
-
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
1763
|
-
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
|
1764
|
-
fences: noopTest,
|
|
1765
|
-
// fences not supported
|
|
1766
|
-
paragraph: edit(block.normal._paragraph).replace('hr', block.hr).replace('heading', ' *#{1,6} *[^\n]').replace('lheading', block.lheading).replace('blockquote', ' {0,3}>').replace('|fences', '').replace('|list', '').replace('|html', '').getRegex()
|
|
1767
|
-
});
|
|
1768
|
-
/**
|
|
1769
|
-
* Inline-Level Grammar
|
|
1770
|
-
*/
|
|
1771
|
-
|
|
1772
|
-
var inline = {
|
|
1773
|
-
escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,
|
|
1774
|
-
autolink: /^<(scheme:[^\s\x00-\x1f<>]*|email)>/,
|
|
1775
|
-
url: noopTest,
|
|
1776
|
-
tag: '^comment' + '|^</[a-zA-Z][\\w:-]*\\s*>' // self-closing tag
|
|
1777
|
-
+ '|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>' // open tag
|
|
1778
|
-
+ '|^<\\?[\\s\\S]*?\\?>' // processing instruction, e.g. <?php ?>
|
|
1779
|
-
+ '|^<![a-zA-Z]+\\s[\\s\\S]*?>' // declaration, e.g. <!DOCTYPE html>
|
|
1780
|
-
+ '|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>',
|
|
1781
|
-
// CDATA section
|
|
1782
|
-
link: /^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,
|
|
1783
|
-
reflink: /^!?\[(label)\]\[(ref)\]/,
|
|
1784
|
-
nolink: /^!?\[(ref)\](?:\[\])?/,
|
|
1785
|
-
reflinkSearch: 'reflink|nolink(?!\\()',
|
|
1786
|
-
emStrong: {
|
|
1787
|
-
lDelim: /^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,
|
|
1788
|
-
// (1) and (2) can only be a Right Delimiter. (3) and (4) can only be Left. (5) and (6) can be either Left or Right.
|
|
1789
|
-
// () Skip orphan inside strong () Consume to delim (1) #*** (2) a***#, a*** (3) #***a, ***a (4) ***# (5) #***# (6) a***a
|
|
1790
|
-
rDelimAst: /^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,
|
|
1791
|
-
rDelimUnd: /^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/ // ^- Not allowed for _
|
|
1792
|
-
|
|
1793
|
-
},
|
|
1794
|
-
code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,
|
|
1795
|
-
br: /^( {2,}|\\)\n(?!\s*$)/,
|
|
1796
|
-
del: noopTest,
|
|
1797
|
-
text: /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,
|
|
1798
|
-
punctuation: /^([\spunctuation])/
|
|
1799
|
-
}; // list of punctuation marks from CommonMark spec
|
|
1800
|
-
// without * and _ to handle the different emphasis markers * and _
|
|
1801
|
-
|
|
1802
|
-
inline._punctuation = '!"#$%&\'()+\\-.,/:;<=>?@\\[\\]`^{|}~';
|
|
1803
|
-
inline.punctuation = edit(inline.punctuation).replace(/punctuation/g, inline._punctuation).getRegex(); // sequences em should skip over [title](link), `code`, <html>
|
|
1804
|
-
|
|
1805
|
-
inline.blockSkip = /\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;
|
|
1806
|
-
inline.escapedEmSt = /\\\*|\\_/g;
|
|
1807
|
-
inline._comment = edit(block._comment).replace('(?:-->|$)', '-->').getRegex();
|
|
1808
|
-
inline.emStrong.lDelim = edit(inline.emStrong.lDelim).replace(/punct/g, inline._punctuation).getRegex();
|
|
1809
|
-
inline.emStrong.rDelimAst = edit(inline.emStrong.rDelimAst, 'g').replace(/punct/g, inline._punctuation).getRegex();
|
|
1810
|
-
inline.emStrong.rDelimUnd = edit(inline.emStrong.rDelimUnd, 'g').replace(/punct/g, inline._punctuation).getRegex();
|
|
1811
|
-
inline._escapes = /\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;
|
|
1812
|
-
inline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;
|
|
1813
|
-
inline._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;
|
|
1814
|
-
inline.autolink = edit(inline.autolink).replace('scheme', inline._scheme).replace('email', inline._email).getRegex();
|
|
1815
|
-
inline._attribute = /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;
|
|
1816
|
-
inline.tag = edit(inline.tag).replace('comment', inline._comment).replace('attribute', inline._attribute).getRegex();
|
|
1817
|
-
inline._label = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;
|
|
1818
|
-
inline._href = /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;
|
|
1819
|
-
inline._title = /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;
|
|
1820
|
-
inline.link = edit(inline.link).replace('label', inline._label).replace('href', inline._href).replace('title', inline._title).getRegex();
|
|
1821
|
-
inline.reflink = edit(inline.reflink).replace('label', inline._label).replace('ref', block._label).getRegex();
|
|
1822
|
-
inline.nolink = edit(inline.nolink).replace('ref', block._label).getRegex();
|
|
1823
|
-
inline.reflinkSearch = edit(inline.reflinkSearch, 'g').replace('reflink', inline.reflink).replace('nolink', inline.nolink).getRegex();
|
|
1824
|
-
/**
|
|
1825
|
-
* Normal Inline Grammar
|
|
1826
|
-
*/
|
|
1827
|
-
|
|
1828
|
-
inline.normal = merge({}, inline);
|
|
1829
|
-
/**
|
|
1830
|
-
* Pedantic Inline Grammar
|
|
1831
|
-
*/
|
|
1832
|
-
|
|
1833
|
-
inline.pedantic = merge({}, inline.normal, {
|
|
1834
|
-
strong: {
|
|
1835
|
-
start: /^__|\*\*/,
|
|
1836
|
-
middle: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,
|
|
1837
|
-
endAst: /\*\*(?!\*)/g,
|
|
1838
|
-
endUnd: /__(?!_)/g
|
|
1839
|
-
},
|
|
1840
|
-
em: {
|
|
1841
|
-
start: /^_|\*/,
|
|
1842
|
-
middle: /^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,
|
|
1843
|
-
endAst: /\*(?!\*)/g,
|
|
1844
|
-
endUnd: /_(?!_)/g
|
|
1845
|
-
},
|
|
1846
|
-
link: edit(/^!?\[(label)\]\((.*?)\)/).replace('label', inline._label).getRegex(),
|
|
1847
|
-
reflink: edit(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace('label', inline._label).getRegex()
|
|
1848
|
-
});
|
|
1849
|
-
/**
|
|
1850
|
-
* GFM Inline Grammar
|
|
1851
|
-
*/
|
|
1852
|
-
|
|
1853
|
-
inline.gfm = merge({}, inline.normal, {
|
|
1854
|
-
escape: edit(inline.escape).replace('])', '~|])').getRegex(),
|
|
1855
|
-
_extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,
|
|
1856
|
-
url: /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,
|
|
1857
|
-
_backpedal: /(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,
|
|
1858
|
-
del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,
|
|
1859
|
-
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
|
|
1860
|
-
});
|
|
1861
|
-
inline.gfm.url = edit(inline.gfm.url, 'i').replace('email', inline.gfm._extended_email).getRegex();
|
|
1862
|
-
/**
|
|
1863
|
-
* GFM + Line Breaks Inline Grammar
|
|
1864
|
-
*/
|
|
1865
|
-
|
|
1866
|
-
inline.breaks = merge({}, inline.gfm, {
|
|
1867
|
-
br: edit(inline.br).replace('{2,}', '*').getRegex(),
|
|
1868
|
-
text: edit(inline.gfm.text).replace('\\b_', '\\b_| {2,}\\n').replace(/\{2,\}/g, '*').getRegex()
|
|
1869
|
-
});
|
|
1870
|
-
|
|
1871
|
-
/**
|
|
1872
|
-
* smartypants text replacement
|
|
1873
|
-
* @param {string} text
|
|
1874
|
-
*/
|
|
1875
|
-
|
|
1876
|
-
function smartypants(text) {
|
|
1877
|
-
return text // em-dashes
|
|
1878
|
-
.replace(/---/g, "\u2014") // en-dashes
|
|
1879
|
-
.replace(/--/g, "\u2013") // opening singles
|
|
1880
|
-
.replace(/(^|[-\u2014/(\[{"\s])'/g, "$1\u2018") // closing singles & apostrophes
|
|
1881
|
-
.replace(/'/g, "\u2019") // opening doubles
|
|
1882
|
-
.replace(/(^|[-\u2014/(\[{\u2018\s])"/g, "$1\u201C") // closing doubles
|
|
1883
|
-
.replace(/"/g, "\u201D") // ellipses
|
|
1884
|
-
.replace(/\.{3}/g, "\u2026");
|
|
1885
|
-
}
|
|
1886
|
-
/**
|
|
1887
|
-
* mangle email addresses
|
|
1888
|
-
* @param {string} text
|
|
1889
|
-
*/
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
function mangle(text) {
|
|
1893
|
-
var out = '',
|
|
1894
|
-
i,
|
|
1895
|
-
ch;
|
|
1896
|
-
var l = text.length;
|
|
1897
|
-
|
|
1898
|
-
for (i = 0; i < l; i++) {
|
|
1899
|
-
ch = text.charCodeAt(i);
|
|
1900
|
-
|
|
1901
|
-
if (Math.random() > 0.5) {
|
|
1902
|
-
ch = 'x' + ch.toString(16);
|
|
1903
|
-
}
|
|
1904
|
-
|
|
1905
|
-
out += '&#' + ch + ';';
|
|
1906
|
-
}
|
|
1907
|
-
|
|
1908
|
-
return out;
|
|
1909
|
-
}
|
|
1910
|
-
/**
|
|
1911
|
-
* Block Lexer
|
|
1912
|
-
*/
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
var Lexer = /*#__PURE__*/function () {
|
|
1916
|
-
function Lexer(options) {
|
|
1917
|
-
this.tokens = [];
|
|
1918
|
-
this.tokens.links = Object.create(null);
|
|
1919
|
-
this.options = options || exports.defaults;
|
|
1920
|
-
this.options.tokenizer = this.options.tokenizer || new Tokenizer();
|
|
1921
|
-
this.tokenizer = this.options.tokenizer;
|
|
1922
|
-
this.tokenizer.options = this.options;
|
|
1923
|
-
this.tokenizer.lexer = this;
|
|
1924
|
-
this.inlineQueue = [];
|
|
1925
|
-
this.state = {
|
|
1926
|
-
inLink: false,
|
|
1927
|
-
inRawBlock: false,
|
|
1928
|
-
top: true
|
|
1929
|
-
};
|
|
1930
|
-
var rules = {
|
|
1931
|
-
block: block.normal,
|
|
1932
|
-
inline: inline.normal
|
|
1933
|
-
};
|
|
1934
|
-
|
|
1935
|
-
if (this.options.pedantic) {
|
|
1936
|
-
rules.block = block.pedantic;
|
|
1937
|
-
rules.inline = inline.pedantic;
|
|
1938
|
-
} else if (this.options.gfm) {
|
|
1939
|
-
rules.block = block.gfm;
|
|
1940
|
-
|
|
1941
|
-
if (this.options.breaks) {
|
|
1942
|
-
rules.inline = inline.breaks;
|
|
1943
|
-
} else {
|
|
1944
|
-
rules.inline = inline.gfm;
|
|
1945
|
-
}
|
|
1946
|
-
}
|
|
1947
|
-
|
|
1948
|
-
this.tokenizer.rules = rules;
|
|
1949
|
-
}
|
|
1950
|
-
/**
|
|
1951
|
-
* Expose Rules
|
|
1952
|
-
*/
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
/**
|
|
1956
|
-
* Static Lex Method
|
|
1957
|
-
*/
|
|
1958
|
-
Lexer.lex = function lex(src, options) {
|
|
1959
|
-
var lexer = new Lexer(options);
|
|
1960
|
-
return lexer.lex(src);
|
|
1961
|
-
}
|
|
1962
|
-
/**
|
|
1963
|
-
* Static Lex Inline Method
|
|
1964
|
-
*/
|
|
1965
|
-
;
|
|
1966
|
-
|
|
1967
|
-
Lexer.lexInline = function lexInline(src, options) {
|
|
1968
|
-
var lexer = new Lexer(options);
|
|
1969
|
-
return lexer.inlineTokens(src);
|
|
1970
|
-
}
|
|
1971
|
-
/**
|
|
1972
|
-
* Preprocessing
|
|
1973
|
-
*/
|
|
1974
|
-
;
|
|
1975
|
-
|
|
1976
|
-
var _proto = Lexer.prototype;
|
|
1977
|
-
|
|
1978
|
-
_proto.lex = function lex(src) {
|
|
1979
|
-
src = src.replace(/\r\n|\r/g, '\n');
|
|
1980
|
-
this.blockTokens(src, this.tokens);
|
|
1981
|
-
var next;
|
|
1982
|
-
|
|
1983
|
-
while (next = this.inlineQueue.shift()) {
|
|
1984
|
-
this.inlineTokens(next.src, next.tokens);
|
|
1985
|
-
}
|
|
1986
|
-
|
|
1987
|
-
return this.tokens;
|
|
1988
|
-
}
|
|
1989
|
-
/**
|
|
1990
|
-
* Lexing
|
|
1991
|
-
*/
|
|
1992
|
-
;
|
|
1993
|
-
|
|
1994
|
-
_proto.blockTokens = function blockTokens(src, tokens) {
|
|
1995
|
-
var _this = this;
|
|
1996
|
-
|
|
1997
|
-
if (tokens === void 0) {
|
|
1998
|
-
tokens = [];
|
|
1999
|
-
}
|
|
2000
|
-
|
|
2001
|
-
if (this.options.pedantic) {
|
|
2002
|
-
src = src.replace(/\t/g, ' ').replace(/^ +$/gm, '');
|
|
2003
|
-
} else {
|
|
2004
|
-
src = src.replace(/^( *)(\t+)/gm, function (_, leading, tabs) {
|
|
2005
|
-
return leading + ' '.repeat(tabs.length);
|
|
2006
|
-
});
|
|
2007
|
-
}
|
|
2008
|
-
|
|
2009
|
-
var token, lastToken, cutSrc, lastParagraphClipped;
|
|
2010
|
-
|
|
2011
|
-
while (src) {
|
|
2012
|
-
if (this.options.extensions && this.options.extensions.block && this.options.extensions.block.some(function (extTokenizer) {
|
|
2013
|
-
if (token = extTokenizer.call({
|
|
2014
|
-
lexer: _this
|
|
2015
|
-
}, src, tokens)) {
|
|
2016
|
-
src = src.substring(token.raw.length);
|
|
2017
|
-
tokens.push(token);
|
|
2018
|
-
return true;
|
|
2019
|
-
}
|
|
2020
|
-
|
|
2021
|
-
return false;
|
|
2022
|
-
})) {
|
|
2023
|
-
continue;
|
|
2024
|
-
} // newline
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
if (token = this.tokenizer.space(src)) {
|
|
2028
|
-
src = src.substring(token.raw.length);
|
|
2029
|
-
|
|
2030
|
-
if (token.raw.length === 1 && tokens.length > 0) {
|
|
2031
|
-
// if there's a single \n as a spacer, it's terminating the last line,
|
|
2032
|
-
// so move it there so that we don't get unecessary paragraph tags
|
|
2033
|
-
tokens[tokens.length - 1].raw += '\n';
|
|
2034
|
-
} else {
|
|
2035
|
-
tokens.push(token);
|
|
2036
|
-
}
|
|
2037
|
-
|
|
2038
|
-
continue;
|
|
2039
|
-
} // code
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
if (token = this.tokenizer.code(src)) {
|
|
2043
|
-
src = src.substring(token.raw.length);
|
|
2044
|
-
lastToken = tokens[tokens.length - 1]; // An indented code block cannot interrupt a paragraph.
|
|
2045
|
-
|
|
2046
|
-
if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {
|
|
2047
|
-
lastToken.raw += '\n' + token.raw;
|
|
2048
|
-
lastToken.text += '\n' + token.text;
|
|
2049
|
-
this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;
|
|
2050
|
-
} else {
|
|
2051
|
-
tokens.push(token);
|
|
2052
|
-
}
|
|
2053
|
-
|
|
2054
|
-
continue;
|
|
2055
|
-
} // fences
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
if (token = this.tokenizer.fences(src)) {
|
|
2059
|
-
src = src.substring(token.raw.length);
|
|
2060
|
-
tokens.push(token);
|
|
2061
|
-
continue;
|
|
2062
|
-
} // heading
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
if (token = this.tokenizer.heading(src)) {
|
|
2066
|
-
src = src.substring(token.raw.length);
|
|
2067
|
-
tokens.push(token);
|
|
2068
|
-
continue;
|
|
2069
|
-
} // hr
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
if (token = this.tokenizer.hr(src)) {
|
|
2073
|
-
src = src.substring(token.raw.length);
|
|
2074
|
-
tokens.push(token);
|
|
2075
|
-
continue;
|
|
2076
|
-
} // blockquote
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
if (token = this.tokenizer.blockquote(src)) {
|
|
2080
|
-
src = src.substring(token.raw.length);
|
|
2081
|
-
tokens.push(token);
|
|
2082
|
-
continue;
|
|
2083
|
-
} // list
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
if (token = this.tokenizer.list(src)) {
|
|
2087
|
-
src = src.substring(token.raw.length);
|
|
2088
|
-
tokens.push(token);
|
|
2089
|
-
continue;
|
|
2090
|
-
} // html
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
if (token = this.tokenizer.html(src)) {
|
|
2094
|
-
src = src.substring(token.raw.length);
|
|
2095
|
-
tokens.push(token);
|
|
2096
|
-
continue;
|
|
2097
|
-
} // def
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
if (token = this.tokenizer.def(src)) {
|
|
2101
|
-
src = src.substring(token.raw.length);
|
|
2102
|
-
lastToken = tokens[tokens.length - 1];
|
|
2103
|
-
|
|
2104
|
-
if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {
|
|
2105
|
-
lastToken.raw += '\n' + token.raw;
|
|
2106
|
-
lastToken.text += '\n' + token.raw;
|
|
2107
|
-
this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;
|
|
2108
|
-
} else if (!this.tokens.links[token.tag]) {
|
|
2109
|
-
this.tokens.links[token.tag] = {
|
|
2110
|
-
href: token.href,
|
|
2111
|
-
title: token.title
|
|
2112
|
-
};
|
|
2113
|
-
}
|
|
2114
|
-
|
|
2115
|
-
continue;
|
|
2116
|
-
} // table (gfm)
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
if (token = this.tokenizer.table(src)) {
|
|
2120
|
-
src = src.substring(token.raw.length);
|
|
2121
|
-
tokens.push(token);
|
|
2122
|
-
continue;
|
|
2123
|
-
} // lheading
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
if (token = this.tokenizer.lheading(src)) {
|
|
2127
|
-
src = src.substring(token.raw.length);
|
|
2128
|
-
tokens.push(token);
|
|
2129
|
-
continue;
|
|
2130
|
-
} // top-level paragraph
|
|
2131
|
-
// prevent paragraph consuming extensions by clipping 'src' to extension start
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
cutSrc = src;
|
|
2135
|
-
|
|
2136
|
-
if (this.options.extensions && this.options.extensions.startBlock) {
|
|
2137
|
-
(function () {
|
|
2138
|
-
var startIndex = Infinity;
|
|
2139
|
-
var tempSrc = src.slice(1);
|
|
2140
|
-
var tempStart = void 0;
|
|
2141
|
-
|
|
2142
|
-
_this.options.extensions.startBlock.forEach(function (getStartIndex) {
|
|
2143
|
-
tempStart = getStartIndex.call({
|
|
2144
|
-
lexer: this
|
|
2145
|
-
}, tempSrc);
|
|
2146
|
-
|
|
2147
|
-
if (typeof tempStart === 'number' && tempStart >= 0) {
|
|
2148
|
-
startIndex = Math.min(startIndex, tempStart);
|
|
2149
|
-
}
|
|
2150
|
-
});
|
|
2151
|
-
|
|
2152
|
-
if (startIndex < Infinity && startIndex >= 0) {
|
|
2153
|
-
cutSrc = src.substring(0, startIndex + 1);
|
|
2154
|
-
}
|
|
2155
|
-
})();
|
|
2156
|
-
}
|
|
2157
|
-
|
|
2158
|
-
if (this.state.top && (token = this.tokenizer.paragraph(cutSrc))) {
|
|
2159
|
-
lastToken = tokens[tokens.length - 1];
|
|
2160
|
-
|
|
2161
|
-
if (lastParagraphClipped && lastToken.type === 'paragraph') {
|
|
2162
|
-
lastToken.raw += '\n' + token.raw;
|
|
2163
|
-
lastToken.text += '\n' + token.text;
|
|
2164
|
-
this.inlineQueue.pop();
|
|
2165
|
-
this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;
|
|
2166
|
-
} else {
|
|
2167
|
-
tokens.push(token);
|
|
2168
|
-
}
|
|
2169
|
-
|
|
2170
|
-
lastParagraphClipped = cutSrc.length !== src.length;
|
|
2171
|
-
src = src.substring(token.raw.length);
|
|
2172
|
-
continue;
|
|
2173
|
-
} // text
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
if (token = this.tokenizer.text(src)) {
|
|
2177
|
-
src = src.substring(token.raw.length);
|
|
2178
|
-
lastToken = tokens[tokens.length - 1];
|
|
2179
|
-
|
|
2180
|
-
if (lastToken && lastToken.type === 'text') {
|
|
2181
|
-
lastToken.raw += '\n' + token.raw;
|
|
2182
|
-
lastToken.text += '\n' + token.text;
|
|
2183
|
-
this.inlineQueue.pop();
|
|
2184
|
-
this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;
|
|
2185
|
-
} else {
|
|
2186
|
-
tokens.push(token);
|
|
2187
|
-
}
|
|
2188
|
-
|
|
2189
|
-
continue;
|
|
2190
|
-
}
|
|
2191
|
-
|
|
2192
|
-
if (src) {
|
|
2193
|
-
var errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);
|
|
2194
|
-
|
|
2195
|
-
if (this.options.silent) {
|
|
2196
|
-
console.error(errMsg);
|
|
2197
|
-
break;
|
|
2198
|
-
} else {
|
|
2199
|
-
throw new Error(errMsg);
|
|
2200
|
-
}
|
|
2201
|
-
}
|
|
2202
|
-
}
|
|
2203
|
-
|
|
2204
|
-
this.state.top = true;
|
|
2205
|
-
return tokens;
|
|
2206
|
-
};
|
|
2207
|
-
|
|
2208
|
-
_proto.inline = function inline(src, tokens) {
|
|
2209
|
-
if (tokens === void 0) {
|
|
2210
|
-
tokens = [];
|
|
2211
|
-
}
|
|
2212
|
-
|
|
2213
|
-
this.inlineQueue.push({
|
|
2214
|
-
src: src,
|
|
2215
|
-
tokens: tokens
|
|
2216
|
-
});
|
|
2217
|
-
return tokens;
|
|
2218
|
-
}
|
|
2219
|
-
/**
|
|
2220
|
-
* Lexing/Compiling
|
|
2221
|
-
*/
|
|
2222
|
-
;
|
|
2223
|
-
|
|
2224
|
-
_proto.inlineTokens = function inlineTokens(src, tokens) {
|
|
2225
|
-
var _this2 = this;
|
|
2226
|
-
|
|
2227
|
-
if (tokens === void 0) {
|
|
2228
|
-
tokens = [];
|
|
2229
|
-
}
|
|
2230
|
-
|
|
2231
|
-
var token, lastToken, cutSrc; // String with links masked to avoid interference with em and strong
|
|
2232
|
-
|
|
2233
|
-
var maskedSrc = src;
|
|
2234
|
-
var match;
|
|
2235
|
-
var keepPrevChar, prevChar; // Mask out reflinks
|
|
2236
|
-
|
|
2237
|
-
if (this.tokens.links) {
|
|
2238
|
-
var links = Object.keys(this.tokens.links);
|
|
2239
|
-
|
|
2240
|
-
if (links.length > 0) {
|
|
2241
|
-
while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) {
|
|
2242
|
-
if (links.includes(match[0].slice(match[0].lastIndexOf('[') + 1, -1))) {
|
|
2243
|
-
maskedSrc = maskedSrc.slice(0, match.index) + '[' + repeatString('a', match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex);
|
|
2244
|
-
}
|
|
2245
|
-
}
|
|
2246
|
-
}
|
|
2247
|
-
} // Mask out other blocks
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {
|
|
2251
|
-
maskedSrc = maskedSrc.slice(0, match.index) + '[' + repeatString('a', match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
|
|
2252
|
-
} // Mask out escaped em & strong delimiters
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
while ((match = this.tokenizer.rules.inline.escapedEmSt.exec(maskedSrc)) != null) {
|
|
2256
|
-
maskedSrc = maskedSrc.slice(0, match.index) + '++' + maskedSrc.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);
|
|
2257
|
-
}
|
|
2258
|
-
|
|
2259
|
-
while (src) {
|
|
2260
|
-
if (!keepPrevChar) {
|
|
2261
|
-
prevChar = '';
|
|
2262
|
-
}
|
|
2263
|
-
|
|
2264
|
-
keepPrevChar = false; // extensions
|
|
2265
|
-
|
|
2266
|
-
if (this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some(function (extTokenizer) {
|
|
2267
|
-
if (token = extTokenizer.call({
|
|
2268
|
-
lexer: _this2
|
|
2269
|
-
}, src, tokens)) {
|
|
2270
|
-
src = src.substring(token.raw.length);
|
|
2271
|
-
tokens.push(token);
|
|
2272
|
-
return true;
|
|
2273
|
-
}
|
|
2274
|
-
|
|
2275
|
-
return false;
|
|
2276
|
-
})) {
|
|
2277
|
-
continue;
|
|
2278
|
-
} // escape
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
if (token = this.tokenizer.escape(src)) {
|
|
2282
|
-
src = src.substring(token.raw.length);
|
|
2283
|
-
tokens.push(token);
|
|
2284
|
-
continue;
|
|
2285
|
-
} // tag
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
if (token = this.tokenizer.tag(src)) {
|
|
2289
|
-
src = src.substring(token.raw.length);
|
|
2290
|
-
lastToken = tokens[tokens.length - 1];
|
|
2291
|
-
|
|
2292
|
-
if (lastToken && token.type === 'text' && lastToken.type === 'text') {
|
|
2293
|
-
lastToken.raw += token.raw;
|
|
2294
|
-
lastToken.text += token.text;
|
|
2295
|
-
} else {
|
|
2296
|
-
tokens.push(token);
|
|
2297
|
-
}
|
|
2298
|
-
|
|
2299
|
-
continue;
|
|
2300
|
-
} // link
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
if (token = this.tokenizer.link(src)) {
|
|
2304
|
-
src = src.substring(token.raw.length);
|
|
2305
|
-
tokens.push(token);
|
|
2306
|
-
continue;
|
|
2307
|
-
} // reflink, nolink
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
if (token = this.tokenizer.reflink(src, this.tokens.links)) {
|
|
2311
|
-
src = src.substring(token.raw.length);
|
|
2312
|
-
lastToken = tokens[tokens.length - 1];
|
|
2313
|
-
|
|
2314
|
-
if (lastToken && token.type === 'text' && lastToken.type === 'text') {
|
|
2315
|
-
lastToken.raw += token.raw;
|
|
2316
|
-
lastToken.text += token.text;
|
|
2317
|
-
} else {
|
|
2318
|
-
tokens.push(token);
|
|
2319
|
-
}
|
|
2320
|
-
|
|
2321
|
-
continue;
|
|
2322
|
-
} // em & strong
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
if (token = this.tokenizer.emStrong(src, maskedSrc, prevChar)) {
|
|
2326
|
-
src = src.substring(token.raw.length);
|
|
2327
|
-
tokens.push(token);
|
|
2328
|
-
continue;
|
|
2329
|
-
} // code
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
if (token = this.tokenizer.codespan(src)) {
|
|
2333
|
-
src = src.substring(token.raw.length);
|
|
2334
|
-
tokens.push(token);
|
|
2335
|
-
continue;
|
|
2336
|
-
} // br
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
if (token = this.tokenizer.br(src)) {
|
|
2340
|
-
src = src.substring(token.raw.length);
|
|
2341
|
-
tokens.push(token);
|
|
2342
|
-
continue;
|
|
2343
|
-
} // del (gfm)
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
if (token = this.tokenizer.del(src)) {
|
|
2347
|
-
src = src.substring(token.raw.length);
|
|
2348
|
-
tokens.push(token);
|
|
2349
|
-
continue;
|
|
2350
|
-
} // autolink
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
if (token = this.tokenizer.autolink(src, mangle)) {
|
|
2354
|
-
src = src.substring(token.raw.length);
|
|
2355
|
-
tokens.push(token);
|
|
2356
|
-
continue;
|
|
2357
|
-
} // url (gfm)
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
if (!this.state.inLink && (token = this.tokenizer.url(src, mangle))) {
|
|
2361
|
-
src = src.substring(token.raw.length);
|
|
2362
|
-
tokens.push(token);
|
|
2363
|
-
continue;
|
|
2364
|
-
} // text
|
|
2365
|
-
// prevent inlineText consuming extensions by clipping 'src' to extension start
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
cutSrc = src;
|
|
2369
|
-
|
|
2370
|
-
if (this.options.extensions && this.options.extensions.startInline) {
|
|
2371
|
-
(function () {
|
|
2372
|
-
var startIndex = Infinity;
|
|
2373
|
-
var tempSrc = src.slice(1);
|
|
2374
|
-
var tempStart = void 0;
|
|
2375
|
-
|
|
2376
|
-
_this2.options.extensions.startInline.forEach(function (getStartIndex) {
|
|
2377
|
-
tempStart = getStartIndex.call({
|
|
2378
|
-
lexer: this
|
|
2379
|
-
}, tempSrc);
|
|
2380
|
-
|
|
2381
|
-
if (typeof tempStart === 'number' && tempStart >= 0) {
|
|
2382
|
-
startIndex = Math.min(startIndex, tempStart);
|
|
2383
|
-
}
|
|
2384
|
-
});
|
|
2385
|
-
|
|
2386
|
-
if (startIndex < Infinity && startIndex >= 0) {
|
|
2387
|
-
cutSrc = src.substring(0, startIndex + 1);
|
|
2388
|
-
}
|
|
2389
|
-
})();
|
|
2390
|
-
}
|
|
2391
|
-
|
|
2392
|
-
if (token = this.tokenizer.inlineText(cutSrc, smartypants)) {
|
|
2393
|
-
src = src.substring(token.raw.length);
|
|
2394
|
-
|
|
2395
|
-
if (token.raw.slice(-1) !== '_') {
|
|
2396
|
-
// Track prevChar before string of ____ started
|
|
2397
|
-
prevChar = token.raw.slice(-1);
|
|
2398
|
-
}
|
|
2399
|
-
|
|
2400
|
-
keepPrevChar = true;
|
|
2401
|
-
lastToken = tokens[tokens.length - 1];
|
|
2402
|
-
|
|
2403
|
-
if (lastToken && lastToken.type === 'text') {
|
|
2404
|
-
lastToken.raw += token.raw;
|
|
2405
|
-
lastToken.text += token.text;
|
|
2406
|
-
} else {
|
|
2407
|
-
tokens.push(token);
|
|
2408
|
-
}
|
|
2409
|
-
|
|
2410
|
-
continue;
|
|
2411
|
-
}
|
|
2412
|
-
|
|
2413
|
-
if (src) {
|
|
2414
|
-
var errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);
|
|
2415
|
-
|
|
2416
|
-
if (this.options.silent) {
|
|
2417
|
-
console.error(errMsg);
|
|
2418
|
-
break;
|
|
2419
|
-
} else {
|
|
2420
|
-
throw new Error(errMsg);
|
|
2421
|
-
}
|
|
2422
|
-
}
|
|
2423
|
-
}
|
|
2424
|
-
|
|
2425
|
-
return tokens;
|
|
2426
|
-
};
|
|
2427
|
-
|
|
2428
|
-
_createClass(Lexer, null, [{
|
|
2429
|
-
key: "rules",
|
|
2430
|
-
get: function get() {
|
|
2431
|
-
return {
|
|
2432
|
-
block: block,
|
|
2433
|
-
inline: inline
|
|
2434
|
-
};
|
|
2435
|
-
}
|
|
2436
|
-
}]);
|
|
2437
|
-
|
|
2438
|
-
return Lexer;
|
|
2439
|
-
}();
|
|
2440
|
-
|
|
2441
|
-
/**
|
|
2442
|
-
* Renderer
|
|
2443
|
-
*/
|
|
2444
|
-
|
|
2445
|
-
var Renderer = /*#__PURE__*/function () {
|
|
2446
|
-
function Renderer(options) {
|
|
2447
|
-
this.options = options || exports.defaults;
|
|
2448
|
-
}
|
|
2449
|
-
|
|
2450
|
-
var _proto = Renderer.prototype;
|
|
2451
|
-
|
|
2452
|
-
_proto.code = function code(_code, infostring, escaped) {
|
|
2453
|
-
var lang = (infostring || '').match(/\S*/)[0];
|
|
2454
|
-
|
|
2455
|
-
if (this.options.highlight) {
|
|
2456
|
-
var out = this.options.highlight(_code, lang);
|
|
2457
|
-
|
|
2458
|
-
if (out != null && out !== _code) {
|
|
2459
|
-
escaped = true;
|
|
2460
|
-
_code = out;
|
|
2461
|
-
}
|
|
2462
|
-
}
|
|
2463
|
-
|
|
2464
|
-
_code = _code.replace(/\n$/, '') + '\n';
|
|
2465
|
-
|
|
2466
|
-
if (!lang) {
|
|
2467
|
-
return '<pre><code>' + (escaped ? _code : escape(_code, true)) + '</code></pre>\n';
|
|
2468
|
-
}
|
|
2469
|
-
|
|
2470
|
-
return '<pre><code class="' + this.options.langPrefix + escape(lang, true) + '">' + (escaped ? _code : escape(_code, true)) + '</code></pre>\n';
|
|
2471
|
-
}
|
|
2472
|
-
/**
|
|
2473
|
-
* @param {string} quote
|
|
2474
|
-
*/
|
|
2475
|
-
;
|
|
2476
|
-
|
|
2477
|
-
_proto.blockquote = function blockquote(quote) {
|
|
2478
|
-
return "<blockquote>\n" + quote + "</blockquote>\n";
|
|
2479
|
-
};
|
|
2480
|
-
|
|
2481
|
-
_proto.html = function html(_html) {
|
|
2482
|
-
return _html;
|
|
2483
|
-
}
|
|
2484
|
-
/**
|
|
2485
|
-
* @param {string} text
|
|
2486
|
-
* @param {string} level
|
|
2487
|
-
* @param {string} raw
|
|
2488
|
-
* @param {any} slugger
|
|
2489
|
-
*/
|
|
2490
|
-
;
|
|
2491
|
-
|
|
2492
|
-
_proto.heading = function heading(text, level, raw, slugger) {
|
|
2493
|
-
if (this.options.headerIds) {
|
|
2494
|
-
var id = this.options.headerPrefix + slugger.slug(raw);
|
|
2495
|
-
return "<h" + level + " id=\"" + id + "\">" + text + "</h" + level + ">\n";
|
|
2496
|
-
} // ignore IDs
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
return "<h" + level + ">" + text + "</h" + level + ">\n";
|
|
2500
|
-
};
|
|
2501
|
-
|
|
2502
|
-
_proto.hr = function hr() {
|
|
2503
|
-
return this.options.xhtml ? '<hr/>\n' : '<hr>\n';
|
|
2504
|
-
};
|
|
2505
|
-
|
|
2506
|
-
_proto.list = function list(body, ordered, start) {
|
|
2507
|
-
var type = ordered ? 'ol' : 'ul',
|
|
2508
|
-
startatt = ordered && start !== 1 ? ' start="' + start + '"' : '';
|
|
2509
|
-
return '<' + type + startatt + '>\n' + body + '</' + type + '>\n';
|
|
2510
|
-
}
|
|
2511
|
-
/**
|
|
2512
|
-
* @param {string} text
|
|
2513
|
-
*/
|
|
2514
|
-
;
|
|
2515
|
-
|
|
2516
|
-
_proto.listitem = function listitem(text) {
|
|
2517
|
-
return "<li>" + text + "</li>\n";
|
|
2518
|
-
};
|
|
2519
|
-
|
|
2520
|
-
_proto.checkbox = function checkbox(checked) {
|
|
2521
|
-
return '<input ' + (checked ? 'checked="" ' : '') + 'disabled="" type="checkbox"' + (this.options.xhtml ? ' /' : '') + '> ';
|
|
2522
|
-
}
|
|
2523
|
-
/**
|
|
2524
|
-
* @param {string} text
|
|
2525
|
-
*/
|
|
2526
|
-
;
|
|
2527
|
-
|
|
2528
|
-
_proto.paragraph = function paragraph(text) {
|
|
2529
|
-
return "<p>" + text + "</p>\n";
|
|
2530
|
-
}
|
|
2531
|
-
/**
|
|
2532
|
-
* @param {string} header
|
|
2533
|
-
* @param {string} body
|
|
2534
|
-
*/
|
|
2535
|
-
;
|
|
2536
|
-
|
|
2537
|
-
_proto.table = function table(header, body) {
|
|
2538
|
-
if (body) body = "<tbody>" + body + "</tbody>";
|
|
2539
|
-
return '<table>\n' + '<thead>\n' + header + '</thead>\n' + body + '</table>\n';
|
|
2540
|
-
}
|
|
2541
|
-
/**
|
|
2542
|
-
* @param {string} content
|
|
2543
|
-
*/
|
|
2544
|
-
;
|
|
2545
|
-
|
|
2546
|
-
_proto.tablerow = function tablerow(content) {
|
|
2547
|
-
return "<tr>\n" + content + "</tr>\n";
|
|
2548
|
-
};
|
|
2549
|
-
|
|
2550
|
-
_proto.tablecell = function tablecell(content, flags) {
|
|
2551
|
-
var type = flags.header ? 'th' : 'td';
|
|
2552
|
-
var tag = flags.align ? "<" + type + " align=\"" + flags.align + "\">" : "<" + type + ">";
|
|
2553
|
-
return tag + content + ("</" + type + ">\n");
|
|
2554
|
-
}
|
|
2555
|
-
/**
|
|
2556
|
-
* span level renderer
|
|
2557
|
-
* @param {string} text
|
|
2558
|
-
*/
|
|
2559
|
-
;
|
|
2560
|
-
|
|
2561
|
-
_proto.strong = function strong(text) {
|
|
2562
|
-
return "<strong>" + text + "</strong>";
|
|
2563
|
-
}
|
|
2564
|
-
/**
|
|
2565
|
-
* @param {string} text
|
|
2566
|
-
*/
|
|
2567
|
-
;
|
|
2568
|
-
|
|
2569
|
-
_proto.em = function em(text) {
|
|
2570
|
-
return "<em>" + text + "</em>";
|
|
2571
|
-
}
|
|
2572
|
-
/**
|
|
2573
|
-
* @param {string} text
|
|
2574
|
-
*/
|
|
2575
|
-
;
|
|
2576
|
-
|
|
2577
|
-
_proto.codespan = function codespan(text) {
|
|
2578
|
-
return "<code>" + text + "</code>";
|
|
2579
|
-
};
|
|
2580
|
-
|
|
2581
|
-
_proto.br = function br() {
|
|
2582
|
-
return this.options.xhtml ? '<br/>' : '<br>';
|
|
2583
|
-
}
|
|
2584
|
-
/**
|
|
2585
|
-
* @param {string} text
|
|
2586
|
-
*/
|
|
2587
|
-
;
|
|
2588
|
-
|
|
2589
|
-
_proto.del = function del(text) {
|
|
2590
|
-
return "<del>" + text + "</del>";
|
|
2591
|
-
}
|
|
2592
|
-
/**
|
|
2593
|
-
* @param {string} href
|
|
2594
|
-
* @param {string} title
|
|
2595
|
-
* @param {string} text
|
|
2596
|
-
*/
|
|
2597
|
-
;
|
|
2598
|
-
|
|
2599
|
-
_proto.link = function link(href, title, text) {
|
|
2600
|
-
href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);
|
|
2601
|
-
|
|
2602
|
-
if (href === null) {
|
|
2603
|
-
return text;
|
|
2604
|
-
}
|
|
2605
|
-
|
|
2606
|
-
var out = '<a href="' + escape(href) + '"';
|
|
2607
|
-
|
|
2608
|
-
if (title) {
|
|
2609
|
-
out += ' title="' + title + '"';
|
|
2610
|
-
}
|
|
2611
|
-
|
|
2612
|
-
out += '>' + text + '</a>';
|
|
2613
|
-
return out;
|
|
2614
|
-
}
|
|
2615
|
-
/**
|
|
2616
|
-
* @param {string} href
|
|
2617
|
-
* @param {string} title
|
|
2618
|
-
* @param {string} text
|
|
2619
|
-
*/
|
|
2620
|
-
;
|
|
2621
|
-
|
|
2622
|
-
_proto.image = function image(href, title, text) {
|
|
2623
|
-
href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);
|
|
2624
|
-
|
|
2625
|
-
if (href === null) {
|
|
2626
|
-
return text;
|
|
2627
|
-
}
|
|
2628
|
-
|
|
2629
|
-
var out = "<img src=\"" + href + "\" alt=\"" + text + "\"";
|
|
2630
|
-
|
|
2631
|
-
if (title) {
|
|
2632
|
-
out += " title=\"" + title + "\"";
|
|
2633
|
-
}
|
|
2634
|
-
|
|
2635
|
-
out += this.options.xhtml ? '/>' : '>';
|
|
2636
|
-
return out;
|
|
2637
|
-
};
|
|
2638
|
-
|
|
2639
|
-
_proto.text = function text(_text) {
|
|
2640
|
-
return _text;
|
|
2641
|
-
};
|
|
2642
|
-
|
|
2643
|
-
return Renderer;
|
|
2644
|
-
}();
|
|
2645
|
-
|
|
2646
|
-
/**
|
|
2647
|
-
* TextRenderer
|
|
2648
|
-
* returns only the textual part of the token
|
|
2649
|
-
*/
|
|
2650
|
-
var TextRenderer = /*#__PURE__*/function () {
|
|
2651
|
-
function TextRenderer() {}
|
|
2652
|
-
|
|
2653
|
-
var _proto = TextRenderer.prototype;
|
|
2654
|
-
|
|
2655
|
-
// no need for block level renderers
|
|
2656
|
-
_proto.strong = function strong(text) {
|
|
2657
|
-
return text;
|
|
2658
|
-
};
|
|
2659
|
-
|
|
2660
|
-
_proto.em = function em(text) {
|
|
2661
|
-
return text;
|
|
2662
|
-
};
|
|
2663
|
-
|
|
2664
|
-
_proto.codespan = function codespan(text) {
|
|
2665
|
-
return text;
|
|
2666
|
-
};
|
|
2667
|
-
|
|
2668
|
-
_proto.del = function del(text) {
|
|
2669
|
-
return text;
|
|
2670
|
-
};
|
|
2671
|
-
|
|
2672
|
-
_proto.html = function html(text) {
|
|
2673
|
-
return text;
|
|
2674
|
-
};
|
|
2675
|
-
|
|
2676
|
-
_proto.text = function text(_text) {
|
|
2677
|
-
return _text;
|
|
2678
|
-
};
|
|
2679
|
-
|
|
2680
|
-
_proto.link = function link(href, title, text) {
|
|
2681
|
-
return '' + text;
|
|
2682
|
-
};
|
|
2683
|
-
|
|
2684
|
-
_proto.image = function image(href, title, text) {
|
|
2685
|
-
return '' + text;
|
|
2686
|
-
};
|
|
2687
|
-
|
|
2688
|
-
_proto.br = function br() {
|
|
2689
|
-
return '';
|
|
2690
|
-
};
|
|
2691
|
-
|
|
2692
|
-
return TextRenderer;
|
|
2693
|
-
}();
|
|
2694
|
-
|
|
2695
|
-
/**
|
|
2696
|
-
* Slugger generates header id
|
|
2697
|
-
*/
|
|
2698
|
-
var Slugger = /*#__PURE__*/function () {
|
|
2699
|
-
function Slugger() {
|
|
2700
|
-
this.seen = {};
|
|
2701
|
-
}
|
|
2702
|
-
/**
|
|
2703
|
-
* @param {string} value
|
|
2704
|
-
*/
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
var _proto = Slugger.prototype;
|
|
2708
|
-
|
|
2709
|
-
_proto.serialize = function serialize(value) {
|
|
2710
|
-
return value.toLowerCase().trim() // remove html tags
|
|
2711
|
-
.replace(/<[!\/a-z].*?>/ig, '') // remove unwanted chars
|
|
2712
|
-
.replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, '').replace(/\s/g, '-');
|
|
2713
|
-
}
|
|
2714
|
-
/**
|
|
2715
|
-
* Finds the next safe (unique) slug to use
|
|
2716
|
-
* @param {string} originalSlug
|
|
2717
|
-
* @param {boolean} isDryRun
|
|
2718
|
-
*/
|
|
2719
|
-
;
|
|
2720
|
-
|
|
2721
|
-
_proto.getNextSafeSlug = function getNextSafeSlug(originalSlug, isDryRun) {
|
|
2722
|
-
var slug = originalSlug;
|
|
2723
|
-
var occurenceAccumulator = 0;
|
|
2724
|
-
|
|
2725
|
-
if (this.seen.hasOwnProperty(slug)) {
|
|
2726
|
-
occurenceAccumulator = this.seen[originalSlug];
|
|
2727
|
-
|
|
2728
|
-
do {
|
|
2729
|
-
occurenceAccumulator++;
|
|
2730
|
-
slug = originalSlug + '-' + occurenceAccumulator;
|
|
2731
|
-
} while (this.seen.hasOwnProperty(slug));
|
|
2732
|
-
}
|
|
2733
|
-
|
|
2734
|
-
if (!isDryRun) {
|
|
2735
|
-
this.seen[originalSlug] = occurenceAccumulator;
|
|
2736
|
-
this.seen[slug] = 0;
|
|
2737
|
-
}
|
|
2738
|
-
|
|
2739
|
-
return slug;
|
|
2740
|
-
}
|
|
2741
|
-
/**
|
|
2742
|
-
* Convert string to unique id
|
|
2743
|
-
* @param {object} [options]
|
|
2744
|
-
* @param {boolean} [options.dryrun] Generates the next unique slug without
|
|
2745
|
-
* updating the internal accumulator.
|
|
2746
|
-
*/
|
|
2747
|
-
;
|
|
2748
|
-
|
|
2749
|
-
_proto.slug = function slug(value, options) {
|
|
2750
|
-
if (options === void 0) {
|
|
2751
|
-
options = {};
|
|
2752
|
-
}
|
|
2753
|
-
|
|
2754
|
-
var slug = this.serialize(value);
|
|
2755
|
-
return this.getNextSafeSlug(slug, options.dryrun);
|
|
2756
|
-
};
|
|
2757
|
-
|
|
2758
|
-
return Slugger;
|
|
2759
|
-
}();
|
|
2760
|
-
|
|
2761
|
-
/**
|
|
2762
|
-
* Parsing & Compiling
|
|
2763
|
-
*/
|
|
2764
|
-
|
|
2765
|
-
var Parser = /*#__PURE__*/function () {
|
|
2766
|
-
function Parser(options) {
|
|
2767
|
-
this.options = options || exports.defaults;
|
|
2768
|
-
this.options.renderer = this.options.renderer || new Renderer();
|
|
2769
|
-
this.renderer = this.options.renderer;
|
|
2770
|
-
this.renderer.options = this.options;
|
|
2771
|
-
this.textRenderer = new TextRenderer();
|
|
2772
|
-
this.slugger = new Slugger();
|
|
2773
|
-
}
|
|
2774
|
-
/**
|
|
2775
|
-
* Static Parse Method
|
|
2776
|
-
*/
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
Parser.parse = function parse(tokens, options) {
|
|
2780
|
-
var parser = new Parser(options);
|
|
2781
|
-
return parser.parse(tokens);
|
|
2782
|
-
}
|
|
2783
|
-
/**
|
|
2784
|
-
* Static Parse Inline Method
|
|
2785
|
-
*/
|
|
2786
|
-
;
|
|
2787
|
-
|
|
2788
|
-
Parser.parseInline = function parseInline(tokens, options) {
|
|
2789
|
-
var parser = new Parser(options);
|
|
2790
|
-
return parser.parseInline(tokens);
|
|
2791
|
-
}
|
|
2792
|
-
/**
|
|
2793
|
-
* Parse Loop
|
|
2794
|
-
*/
|
|
2795
|
-
;
|
|
2796
|
-
|
|
2797
|
-
var _proto = Parser.prototype;
|
|
2798
|
-
|
|
2799
|
-
_proto.parse = function parse(tokens, top) {
|
|
2800
|
-
if (top === void 0) {
|
|
2801
|
-
top = true;
|
|
2802
|
-
}
|
|
2803
|
-
|
|
2804
|
-
var out = '',
|
|
2805
|
-
i,
|
|
2806
|
-
j,
|
|
2807
|
-
k,
|
|
2808
|
-
l2,
|
|
2809
|
-
l3,
|
|
2810
|
-
row,
|
|
2811
|
-
cell,
|
|
2812
|
-
header,
|
|
2813
|
-
body,
|
|
2814
|
-
token,
|
|
2815
|
-
ordered,
|
|
2816
|
-
start,
|
|
2817
|
-
loose,
|
|
2818
|
-
itemBody,
|
|
2819
|
-
item,
|
|
2820
|
-
checked,
|
|
2821
|
-
task,
|
|
2822
|
-
checkbox,
|
|
2823
|
-
ret;
|
|
2824
|
-
var l = tokens.length;
|
|
2825
|
-
|
|
2826
|
-
for (i = 0; i < l; i++) {
|
|
2827
|
-
token = tokens[i]; // Run any renderer extensions
|
|
2828
|
-
|
|
2829
|
-
if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[token.type]) {
|
|
2830
|
-
ret = this.options.extensions.renderers[token.type].call({
|
|
2831
|
-
parser: this
|
|
2832
|
-
}, token);
|
|
2833
|
-
|
|
2834
|
-
if (ret !== false || !['space', 'hr', 'heading', 'code', 'table', 'blockquote', 'list', 'html', 'paragraph', 'text'].includes(token.type)) {
|
|
2835
|
-
out += ret || '';
|
|
2836
|
-
continue;
|
|
2837
|
-
}
|
|
2838
|
-
}
|
|
2839
|
-
|
|
2840
|
-
switch (token.type) {
|
|
2841
|
-
case 'space':
|
|
2842
|
-
{
|
|
2843
|
-
continue;
|
|
2844
|
-
}
|
|
2845
|
-
|
|
2846
|
-
case 'hr':
|
|
2847
|
-
{
|
|
2848
|
-
out += this.renderer.hr();
|
|
2849
|
-
continue;
|
|
2850
|
-
}
|
|
2851
|
-
|
|
2852
|
-
case 'heading':
|
|
2853
|
-
{
|
|
2854
|
-
out += this.renderer.heading(this.parseInline(token.tokens), token.depth, unescape(this.parseInline(token.tokens, this.textRenderer)), this.slugger);
|
|
2855
|
-
continue;
|
|
2856
|
-
}
|
|
2857
|
-
|
|
2858
|
-
case 'code':
|
|
2859
|
-
{
|
|
2860
|
-
out += this.renderer.code(token.text, token.lang, token.escaped);
|
|
2861
|
-
continue;
|
|
2862
|
-
}
|
|
2863
|
-
|
|
2864
|
-
case 'table':
|
|
2865
|
-
{
|
|
2866
|
-
header = ''; // header
|
|
2867
|
-
|
|
2868
|
-
cell = '';
|
|
2869
|
-
l2 = token.header.length;
|
|
2870
|
-
|
|
2871
|
-
for (j = 0; j < l2; j++) {
|
|
2872
|
-
cell += this.renderer.tablecell(this.parseInline(token.header[j].tokens), {
|
|
2873
|
-
header: true,
|
|
2874
|
-
align: token.align[j]
|
|
2875
|
-
});
|
|
2876
|
-
}
|
|
2877
|
-
|
|
2878
|
-
header += this.renderer.tablerow(cell);
|
|
2879
|
-
body = '';
|
|
2880
|
-
l2 = token.rows.length;
|
|
2881
|
-
|
|
2882
|
-
for (j = 0; j < l2; j++) {
|
|
2883
|
-
row = token.rows[j];
|
|
2884
|
-
cell = '';
|
|
2885
|
-
l3 = row.length;
|
|
2886
|
-
|
|
2887
|
-
for (k = 0; k < l3; k++) {
|
|
2888
|
-
cell += this.renderer.tablecell(this.parseInline(row[k].tokens), {
|
|
2889
|
-
header: false,
|
|
2890
|
-
align: token.align[k]
|
|
2891
|
-
});
|
|
2892
|
-
}
|
|
2893
|
-
|
|
2894
|
-
body += this.renderer.tablerow(cell);
|
|
2895
|
-
}
|
|
2896
|
-
|
|
2897
|
-
out += this.renderer.table(header, body);
|
|
2898
|
-
continue;
|
|
2899
|
-
}
|
|
2900
|
-
|
|
2901
|
-
case 'blockquote':
|
|
2902
|
-
{
|
|
2903
|
-
body = this.parse(token.tokens);
|
|
2904
|
-
out += this.renderer.blockquote(body);
|
|
2905
|
-
continue;
|
|
2906
|
-
}
|
|
2907
|
-
|
|
2908
|
-
case 'list':
|
|
2909
|
-
{
|
|
2910
|
-
ordered = token.ordered;
|
|
2911
|
-
start = token.start;
|
|
2912
|
-
loose = token.loose;
|
|
2913
|
-
l2 = token.items.length;
|
|
2914
|
-
body = '';
|
|
2915
|
-
|
|
2916
|
-
for (j = 0; j < l2; j++) {
|
|
2917
|
-
item = token.items[j];
|
|
2918
|
-
checked = item.checked;
|
|
2919
|
-
task = item.task;
|
|
2920
|
-
itemBody = '';
|
|
2921
|
-
|
|
2922
|
-
if (item.task) {
|
|
2923
|
-
checkbox = this.renderer.checkbox(checked);
|
|
2924
|
-
|
|
2925
|
-
if (loose) {
|
|
2926
|
-
if (item.tokens.length > 0 && item.tokens[0].type === 'paragraph') {
|
|
2927
|
-
item.tokens[0].text = checkbox + ' ' + item.tokens[0].text;
|
|
2928
|
-
|
|
2929
|
-
if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') {
|
|
2930
|
-
item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text;
|
|
2931
|
-
}
|
|
2932
|
-
} else {
|
|
2933
|
-
item.tokens.unshift({
|
|
2934
|
-
type: 'text',
|
|
2935
|
-
text: checkbox
|
|
2936
|
-
});
|
|
2937
|
-
}
|
|
2938
|
-
} else {
|
|
2939
|
-
itemBody += checkbox;
|
|
2940
|
-
}
|
|
2941
|
-
}
|
|
2942
|
-
|
|
2943
|
-
itemBody += this.parse(item.tokens, loose);
|
|
2944
|
-
body += this.renderer.listitem(itemBody, task, checked);
|
|
2945
|
-
}
|
|
2946
|
-
|
|
2947
|
-
out += this.renderer.list(body, ordered, start);
|
|
2948
|
-
continue;
|
|
2949
|
-
}
|
|
2950
|
-
|
|
2951
|
-
case 'html':
|
|
2952
|
-
{
|
|
2953
|
-
// TODO parse inline content if parameter markdown=1
|
|
2954
|
-
out += this.renderer.html(token.text);
|
|
2955
|
-
continue;
|
|
2956
|
-
}
|
|
2957
|
-
|
|
2958
|
-
case 'paragraph':
|
|
2959
|
-
{
|
|
2960
|
-
out += this.renderer.paragraph(this.parseInline(token.tokens));
|
|
2961
|
-
continue;
|
|
2962
|
-
}
|
|
2963
|
-
|
|
2964
|
-
case 'text':
|
|
2965
|
-
{
|
|
2966
|
-
body = token.tokens ? this.parseInline(token.tokens) : token.text;
|
|
2967
|
-
|
|
2968
|
-
while (i + 1 < l && tokens[i + 1].type === 'text') {
|
|
2969
|
-
token = tokens[++i];
|
|
2970
|
-
body += '\n' + (token.tokens ? this.parseInline(token.tokens) : token.text);
|
|
2971
|
-
}
|
|
2972
|
-
|
|
2973
|
-
out += top ? this.renderer.paragraph(body) : body;
|
|
2974
|
-
continue;
|
|
2975
|
-
}
|
|
2976
|
-
|
|
2977
|
-
default:
|
|
2978
|
-
{
|
|
2979
|
-
var errMsg = 'Token with "' + token.type + '" type was not found.';
|
|
2980
|
-
|
|
2981
|
-
if (this.options.silent) {
|
|
2982
|
-
console.error(errMsg);
|
|
2983
|
-
return;
|
|
2984
|
-
} else {
|
|
2985
|
-
throw new Error(errMsg);
|
|
2986
|
-
}
|
|
2987
|
-
}
|
|
2988
|
-
}
|
|
2989
|
-
}
|
|
2990
|
-
|
|
2991
|
-
return out;
|
|
2992
|
-
}
|
|
2993
|
-
/**
|
|
2994
|
-
* Parse Inline Tokens
|
|
2995
|
-
*/
|
|
2996
|
-
;
|
|
2997
|
-
|
|
2998
|
-
_proto.parseInline = function parseInline(tokens, renderer) {
|
|
2999
|
-
renderer = renderer || this.renderer;
|
|
3000
|
-
var out = '',
|
|
3001
|
-
i,
|
|
3002
|
-
token,
|
|
3003
|
-
ret;
|
|
3004
|
-
var l = tokens.length;
|
|
3005
|
-
|
|
3006
|
-
for (i = 0; i < l; i++) {
|
|
3007
|
-
token = tokens[i]; // Run any renderer extensions
|
|
3008
|
-
|
|
3009
|
-
if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[token.type]) {
|
|
3010
|
-
ret = this.options.extensions.renderers[token.type].call({
|
|
3011
|
-
parser: this
|
|
3012
|
-
}, token);
|
|
3013
|
-
|
|
3014
|
-
if (ret !== false || !['escape', 'html', 'link', 'image', 'strong', 'em', 'codespan', 'br', 'del', 'text'].includes(token.type)) {
|
|
3015
|
-
out += ret || '';
|
|
3016
|
-
continue;
|
|
3017
|
-
}
|
|
3018
|
-
}
|
|
3019
|
-
|
|
3020
|
-
switch (token.type) {
|
|
3021
|
-
case 'escape':
|
|
3022
|
-
{
|
|
3023
|
-
out += renderer.text(token.text);
|
|
3024
|
-
break;
|
|
3025
|
-
}
|
|
3026
|
-
|
|
3027
|
-
case 'html':
|
|
3028
|
-
{
|
|
3029
|
-
out += renderer.html(token.text);
|
|
3030
|
-
break;
|
|
3031
|
-
}
|
|
3032
|
-
|
|
3033
|
-
case 'link':
|
|
3034
|
-
{
|
|
3035
|
-
out += renderer.link(token.href, token.title, this.parseInline(token.tokens, renderer));
|
|
3036
|
-
break;
|
|
3037
|
-
}
|
|
3038
|
-
|
|
3039
|
-
case 'image':
|
|
3040
|
-
{
|
|
3041
|
-
out += renderer.image(token.href, token.title, token.text);
|
|
3042
|
-
break;
|
|
3043
|
-
}
|
|
3044
|
-
|
|
3045
|
-
case 'strong':
|
|
3046
|
-
{
|
|
3047
|
-
out += renderer.strong(this.parseInline(token.tokens, renderer));
|
|
3048
|
-
break;
|
|
3049
|
-
}
|
|
3050
|
-
|
|
3051
|
-
case 'em':
|
|
3052
|
-
{
|
|
3053
|
-
out += renderer.em(this.parseInline(token.tokens, renderer));
|
|
3054
|
-
break;
|
|
3055
|
-
}
|
|
3056
|
-
|
|
3057
|
-
case 'codespan':
|
|
3058
|
-
{
|
|
3059
|
-
out += renderer.codespan(token.text);
|
|
3060
|
-
break;
|
|
3061
|
-
}
|
|
3062
|
-
|
|
3063
|
-
case 'br':
|
|
3064
|
-
{
|
|
3065
|
-
out += renderer.br();
|
|
3066
|
-
break;
|
|
3067
|
-
}
|
|
3068
|
-
|
|
3069
|
-
case 'del':
|
|
3070
|
-
{
|
|
3071
|
-
out += renderer.del(this.parseInline(token.tokens, renderer));
|
|
3072
|
-
break;
|
|
3073
|
-
}
|
|
3074
|
-
|
|
3075
|
-
case 'text':
|
|
3076
|
-
{
|
|
3077
|
-
out += renderer.text(token.text);
|
|
3078
|
-
break;
|
|
3079
|
-
}
|
|
3080
|
-
|
|
3081
|
-
default:
|
|
3082
|
-
{
|
|
3083
|
-
var errMsg = 'Token with "' + token.type + '" type was not found.';
|
|
3084
|
-
|
|
3085
|
-
if (this.options.silent) {
|
|
3086
|
-
console.error(errMsg);
|
|
3087
|
-
return;
|
|
3088
|
-
} else {
|
|
3089
|
-
throw new Error(errMsg);
|
|
3090
|
-
}
|
|
3091
|
-
}
|
|
3092
|
-
}
|
|
3093
|
-
}
|
|
3094
|
-
|
|
3095
|
-
return out;
|
|
3096
|
-
};
|
|
3097
|
-
|
|
3098
|
-
return Parser;
|
|
3099
|
-
}();
|
|
3100
|
-
|
|
3101
|
-
/**
|
|
3102
|
-
* Marked
|
|
3103
|
-
*/
|
|
3104
|
-
|
|
3105
|
-
function marked(src, opt, callback) {
|
|
3106
|
-
// throw error in case of non string input
|
|
3107
|
-
if (typeof src === 'undefined' || src === null) {
|
|
3108
|
-
throw new Error('marked(): input parameter is undefined or null');
|
|
3109
|
-
}
|
|
3110
|
-
|
|
3111
|
-
if (typeof src !== 'string') {
|
|
3112
|
-
throw new Error('marked(): input parameter is of type ' + Object.prototype.toString.call(src) + ', string expected');
|
|
3113
|
-
}
|
|
3114
|
-
|
|
3115
|
-
if (typeof opt === 'function') {
|
|
3116
|
-
callback = opt;
|
|
3117
|
-
opt = null;
|
|
3118
|
-
}
|
|
3119
|
-
|
|
3120
|
-
opt = merge({}, marked.defaults, opt || {});
|
|
3121
|
-
checkSanitizeDeprecation(opt);
|
|
3122
|
-
|
|
3123
|
-
if (callback) {
|
|
3124
|
-
var highlight = opt.highlight;
|
|
3125
|
-
var tokens;
|
|
3126
|
-
|
|
3127
|
-
try {
|
|
3128
|
-
tokens = Lexer.lex(src, opt);
|
|
3129
|
-
} catch (e) {
|
|
3130
|
-
return callback(e);
|
|
3131
|
-
}
|
|
3132
|
-
|
|
3133
|
-
var done = function done(err) {
|
|
3134
|
-
var out;
|
|
3135
|
-
|
|
3136
|
-
if (!err) {
|
|
3137
|
-
try {
|
|
3138
|
-
if (opt.walkTokens) {
|
|
3139
|
-
marked.walkTokens(tokens, opt.walkTokens);
|
|
3140
|
-
}
|
|
3141
|
-
|
|
3142
|
-
out = Parser.parse(tokens, opt);
|
|
3143
|
-
} catch (e) {
|
|
3144
|
-
err = e;
|
|
3145
|
-
}
|
|
3146
|
-
}
|
|
3147
|
-
|
|
3148
|
-
opt.highlight = highlight;
|
|
3149
|
-
return err ? callback(err) : callback(null, out);
|
|
3150
|
-
};
|
|
3151
|
-
|
|
3152
|
-
if (!highlight || highlight.length < 3) {
|
|
3153
|
-
return done();
|
|
3154
|
-
}
|
|
3155
|
-
|
|
3156
|
-
delete opt.highlight;
|
|
3157
|
-
if (!tokens.length) return done();
|
|
3158
|
-
var pending = 0;
|
|
3159
|
-
marked.walkTokens(tokens, function (token) {
|
|
3160
|
-
if (token.type === 'code') {
|
|
3161
|
-
pending++;
|
|
3162
|
-
setTimeout(function () {
|
|
3163
|
-
highlight(token.text, token.lang, function (err, code) {
|
|
3164
|
-
if (err) {
|
|
3165
|
-
return done(err);
|
|
3166
|
-
}
|
|
3167
|
-
|
|
3168
|
-
if (code != null && code !== token.text) {
|
|
3169
|
-
token.text = code;
|
|
3170
|
-
token.escaped = true;
|
|
3171
|
-
}
|
|
3172
|
-
|
|
3173
|
-
pending--;
|
|
3174
|
-
|
|
3175
|
-
if (pending === 0) {
|
|
3176
|
-
done();
|
|
3177
|
-
}
|
|
3178
|
-
});
|
|
3179
|
-
}, 0);
|
|
3180
|
-
}
|
|
3181
|
-
});
|
|
3182
|
-
|
|
3183
|
-
if (pending === 0) {
|
|
3184
|
-
done();
|
|
3185
|
-
}
|
|
3186
|
-
|
|
3187
|
-
return;
|
|
3188
|
-
}
|
|
3189
|
-
|
|
3190
|
-
function onError(e) {
|
|
3191
|
-
e.message += '\nPlease report this to https://github.com/markedjs/marked.';
|
|
3192
|
-
|
|
3193
|
-
if (opt.silent) {
|
|
3194
|
-
return '<p>An error occurred:</p><pre>' + escape(e.message + '', true) + '</pre>';
|
|
3195
|
-
}
|
|
3196
|
-
|
|
3197
|
-
throw e;
|
|
3198
|
-
}
|
|
3199
|
-
|
|
3200
|
-
try {
|
|
3201
|
-
var _tokens = Lexer.lex(src, opt);
|
|
3202
|
-
|
|
3203
|
-
if (opt.walkTokens) {
|
|
3204
|
-
if (opt.async) {
|
|
3205
|
-
return Promise.all(marked.walkTokens(_tokens, opt.walkTokens)).then(function () {
|
|
3206
|
-
return Parser.parse(_tokens, opt);
|
|
3207
|
-
})["catch"](onError);
|
|
3208
|
-
}
|
|
3209
|
-
|
|
3210
|
-
marked.walkTokens(_tokens, opt.walkTokens);
|
|
3211
|
-
}
|
|
3212
|
-
|
|
3213
|
-
return Parser.parse(_tokens, opt);
|
|
3214
|
-
} catch (e) {
|
|
3215
|
-
onError(e);
|
|
3216
|
-
}
|
|
3217
|
-
}
|
|
3218
|
-
/**
|
|
3219
|
-
* Options
|
|
3220
|
-
*/
|
|
3221
|
-
|
|
3222
|
-
marked.options = marked.setOptions = function (opt) {
|
|
3223
|
-
merge(marked.defaults, opt);
|
|
3224
|
-
changeDefaults(marked.defaults);
|
|
3225
|
-
return marked;
|
|
3226
|
-
};
|
|
3227
|
-
|
|
3228
|
-
marked.getDefaults = getDefaults;
|
|
3229
|
-
marked.defaults = exports.defaults;
|
|
3230
|
-
/**
|
|
3231
|
-
* Use Extension
|
|
3232
|
-
*/
|
|
3233
|
-
|
|
3234
|
-
marked.use = function () {
|
|
3235
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
3236
|
-
args[_key] = arguments[_key];
|
|
3237
|
-
}
|
|
3238
|
-
|
|
3239
|
-
var opts = merge.apply(void 0, [{}].concat(args));
|
|
3240
|
-
var extensions = marked.defaults.extensions || {
|
|
3241
|
-
renderers: {},
|
|
3242
|
-
childTokens: {}
|
|
3243
|
-
};
|
|
3244
|
-
var hasExtensions;
|
|
3245
|
-
args.forEach(function (pack) {
|
|
3246
|
-
// ==-- Parse "addon" extensions --== //
|
|
3247
|
-
if (pack.extensions) {
|
|
3248
|
-
hasExtensions = true;
|
|
3249
|
-
pack.extensions.forEach(function (ext) {
|
|
3250
|
-
if (!ext.name) {
|
|
3251
|
-
throw new Error('extension name required');
|
|
3252
|
-
}
|
|
3253
|
-
|
|
3254
|
-
if (ext.renderer) {
|
|
3255
|
-
// Renderer extensions
|
|
3256
|
-
var prevRenderer = extensions.renderers ? extensions.renderers[ext.name] : null;
|
|
3257
|
-
|
|
3258
|
-
if (prevRenderer) {
|
|
3259
|
-
// Replace extension with func to run new extension but fall back if false
|
|
3260
|
-
extensions.renderers[ext.name] = function () {
|
|
3261
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
3262
|
-
args[_key2] = arguments[_key2];
|
|
3263
|
-
}
|
|
3264
|
-
|
|
3265
|
-
var ret = ext.renderer.apply(this, args);
|
|
3266
|
-
|
|
3267
|
-
if (ret === false) {
|
|
3268
|
-
ret = prevRenderer.apply(this, args);
|
|
3269
|
-
}
|
|
3270
|
-
|
|
3271
|
-
return ret;
|
|
3272
|
-
};
|
|
3273
|
-
} else {
|
|
3274
|
-
extensions.renderers[ext.name] = ext.renderer;
|
|
3275
|
-
}
|
|
3276
|
-
}
|
|
3277
|
-
|
|
3278
|
-
if (ext.tokenizer) {
|
|
3279
|
-
// Tokenizer Extensions
|
|
3280
|
-
if (!ext.level || ext.level !== 'block' && ext.level !== 'inline') {
|
|
3281
|
-
throw new Error("extension level must be 'block' or 'inline'");
|
|
3282
|
-
}
|
|
3283
|
-
|
|
3284
|
-
if (extensions[ext.level]) {
|
|
3285
|
-
extensions[ext.level].unshift(ext.tokenizer);
|
|
3286
|
-
} else {
|
|
3287
|
-
extensions[ext.level] = [ext.tokenizer];
|
|
3288
|
-
}
|
|
3289
|
-
|
|
3290
|
-
if (ext.start) {
|
|
3291
|
-
// Function to check for start of token
|
|
3292
|
-
if (ext.level === 'block') {
|
|
3293
|
-
if (extensions.startBlock) {
|
|
3294
|
-
extensions.startBlock.push(ext.start);
|
|
3295
|
-
} else {
|
|
3296
|
-
extensions.startBlock = [ext.start];
|
|
3297
|
-
}
|
|
3298
|
-
} else if (ext.level === 'inline') {
|
|
3299
|
-
if (extensions.startInline) {
|
|
3300
|
-
extensions.startInline.push(ext.start);
|
|
3301
|
-
} else {
|
|
3302
|
-
extensions.startInline = [ext.start];
|
|
3303
|
-
}
|
|
3304
|
-
}
|
|
3305
|
-
}
|
|
3306
|
-
}
|
|
3307
|
-
|
|
3308
|
-
if (ext.childTokens) {
|
|
3309
|
-
// Child tokens to be visited by walkTokens
|
|
3310
|
-
extensions.childTokens[ext.name] = ext.childTokens;
|
|
3311
|
-
}
|
|
3312
|
-
});
|
|
3313
|
-
} // ==-- Parse "overwrite" extensions --== //
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
if (pack.renderer) {
|
|
3317
|
-
(function () {
|
|
3318
|
-
var renderer = marked.defaults.renderer || new Renderer();
|
|
3319
|
-
|
|
3320
|
-
var _loop = function _loop(prop) {
|
|
3321
|
-
var prevRenderer = renderer[prop]; // Replace renderer with func to run extension, but fall back if false
|
|
3322
|
-
|
|
3323
|
-
renderer[prop] = function () {
|
|
3324
|
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
3325
|
-
args[_key3] = arguments[_key3];
|
|
3326
|
-
}
|
|
3327
|
-
|
|
3328
|
-
var ret = pack.renderer[prop].apply(renderer, args);
|
|
3329
|
-
|
|
3330
|
-
if (ret === false) {
|
|
3331
|
-
ret = prevRenderer.apply(renderer, args);
|
|
3332
|
-
}
|
|
3333
|
-
|
|
3334
|
-
return ret;
|
|
3335
|
-
};
|
|
3336
|
-
};
|
|
3337
|
-
|
|
3338
|
-
for (var prop in pack.renderer) {
|
|
3339
|
-
_loop(prop);
|
|
3340
|
-
}
|
|
3341
|
-
|
|
3342
|
-
opts.renderer = renderer;
|
|
3343
|
-
})();
|
|
3344
|
-
}
|
|
3345
|
-
|
|
3346
|
-
if (pack.tokenizer) {
|
|
3347
|
-
(function () {
|
|
3348
|
-
var tokenizer = marked.defaults.tokenizer || new Tokenizer();
|
|
3349
|
-
|
|
3350
|
-
var _loop2 = function _loop2(prop) {
|
|
3351
|
-
var prevTokenizer = tokenizer[prop]; // Replace tokenizer with func to run extension, but fall back if false
|
|
3352
|
-
|
|
3353
|
-
tokenizer[prop] = function () {
|
|
3354
|
-
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
3355
|
-
args[_key4] = arguments[_key4];
|
|
3356
|
-
}
|
|
3357
|
-
|
|
3358
|
-
var ret = pack.tokenizer[prop].apply(tokenizer, args);
|
|
3359
|
-
|
|
3360
|
-
if (ret === false) {
|
|
3361
|
-
ret = prevTokenizer.apply(tokenizer, args);
|
|
3362
|
-
}
|
|
3363
|
-
|
|
3364
|
-
return ret;
|
|
3365
|
-
};
|
|
3366
|
-
};
|
|
3367
|
-
|
|
3368
|
-
for (var prop in pack.tokenizer) {
|
|
3369
|
-
_loop2(prop);
|
|
3370
|
-
}
|
|
3371
|
-
|
|
3372
|
-
opts.tokenizer = tokenizer;
|
|
3373
|
-
})();
|
|
3374
|
-
} // ==-- Parse WalkTokens extensions --== //
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
if (pack.walkTokens) {
|
|
3378
|
-
var _walkTokens = marked.defaults.walkTokens;
|
|
3379
|
-
|
|
3380
|
-
opts.walkTokens = function (token) {
|
|
3381
|
-
var values = [];
|
|
3382
|
-
values.push(pack.walkTokens.call(this, token));
|
|
3383
|
-
|
|
3384
|
-
if (_walkTokens) {
|
|
3385
|
-
values = values.concat(_walkTokens.call(this, token));
|
|
3386
|
-
}
|
|
3387
|
-
|
|
3388
|
-
return values;
|
|
3389
|
-
};
|
|
3390
|
-
}
|
|
3391
|
-
|
|
3392
|
-
if (hasExtensions) {
|
|
3393
|
-
opts.extensions = extensions;
|
|
3394
|
-
}
|
|
3395
|
-
|
|
3396
|
-
marked.setOptions(opts);
|
|
3397
|
-
});
|
|
3398
|
-
};
|
|
3399
|
-
/**
|
|
3400
|
-
* Run callback for every token
|
|
3401
|
-
*/
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
marked.walkTokens = function (tokens, callback) {
|
|
3405
|
-
var values = [];
|
|
3406
|
-
|
|
3407
|
-
var _loop3 = function _loop3() {
|
|
3408
|
-
var token = _step.value;
|
|
3409
|
-
values = values.concat(callback.call(marked, token));
|
|
3410
|
-
|
|
3411
|
-
switch (token.type) {
|
|
3412
|
-
case 'table':
|
|
3413
|
-
{
|
|
3414
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose(token.header), _step2; !(_step2 = _iterator2()).done;) {
|
|
3415
|
-
var cell = _step2.value;
|
|
3416
|
-
values = values.concat(marked.walkTokens(cell.tokens, callback));
|
|
3417
|
-
}
|
|
3418
|
-
|
|
3419
|
-
for (var _iterator3 = _createForOfIteratorHelperLoose(token.rows), _step3; !(_step3 = _iterator3()).done;) {
|
|
3420
|
-
var row = _step3.value;
|
|
3421
|
-
|
|
3422
|
-
for (var _iterator4 = _createForOfIteratorHelperLoose(row), _step4; !(_step4 = _iterator4()).done;) {
|
|
3423
|
-
var _cell = _step4.value;
|
|
3424
|
-
values = values.concat(marked.walkTokens(_cell.tokens, callback));
|
|
3425
|
-
}
|
|
3426
|
-
}
|
|
3427
|
-
|
|
3428
|
-
break;
|
|
3429
|
-
}
|
|
3430
|
-
|
|
3431
|
-
case 'list':
|
|
3432
|
-
{
|
|
3433
|
-
values = values.concat(marked.walkTokens(token.items, callback));
|
|
3434
|
-
break;
|
|
3435
|
-
}
|
|
3436
|
-
|
|
3437
|
-
default:
|
|
3438
|
-
{
|
|
3439
|
-
if (marked.defaults.extensions && marked.defaults.extensions.childTokens && marked.defaults.extensions.childTokens[token.type]) {
|
|
3440
|
-
// Walk any extensions
|
|
3441
|
-
marked.defaults.extensions.childTokens[token.type].forEach(function (childTokens) {
|
|
3442
|
-
values = values.concat(marked.walkTokens(token[childTokens], callback));
|
|
3443
|
-
});
|
|
3444
|
-
} else if (token.tokens) {
|
|
3445
|
-
values = values.concat(marked.walkTokens(token.tokens, callback));
|
|
3446
|
-
}
|
|
3447
|
-
}
|
|
3448
|
-
}
|
|
3449
|
-
};
|
|
3450
|
-
|
|
3451
|
-
for (var _iterator = _createForOfIteratorHelperLoose(tokens), _step; !(_step = _iterator()).done;) {
|
|
3452
|
-
_loop3();
|
|
3453
|
-
}
|
|
3454
|
-
|
|
3455
|
-
return values;
|
|
3456
|
-
};
|
|
3457
|
-
/**
|
|
3458
|
-
* Parse Inline
|
|
3459
|
-
* @param {string} src
|
|
3460
|
-
*/
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
marked.parseInline = function (src, opt) {
|
|
3464
|
-
// throw error in case of non string input
|
|
3465
|
-
if (typeof src === 'undefined' || src === null) {
|
|
3466
|
-
throw new Error('marked.parseInline(): input parameter is undefined or null');
|
|
3467
|
-
}
|
|
3468
|
-
|
|
3469
|
-
if (typeof src !== 'string') {
|
|
3470
|
-
throw new Error('marked.parseInline(): input parameter is of type ' + Object.prototype.toString.call(src) + ', string expected');
|
|
3471
|
-
}
|
|
3472
|
-
|
|
3473
|
-
opt = merge({}, marked.defaults, opt || {});
|
|
3474
|
-
checkSanitizeDeprecation(opt);
|
|
3475
|
-
|
|
3476
|
-
try {
|
|
3477
|
-
var tokens = Lexer.lexInline(src, opt);
|
|
3478
|
-
|
|
3479
|
-
if (opt.walkTokens) {
|
|
3480
|
-
marked.walkTokens(tokens, opt.walkTokens);
|
|
3481
|
-
}
|
|
3482
|
-
|
|
3483
|
-
return Parser.parseInline(tokens, opt);
|
|
3484
|
-
} catch (e) {
|
|
3485
|
-
e.message += '\nPlease report this to https://github.com/markedjs/marked.';
|
|
3486
|
-
|
|
3487
|
-
if (opt.silent) {
|
|
3488
|
-
return '<p>An error occurred:</p><pre>' + escape(e.message + '', true) + '</pre>';
|
|
3489
|
-
}
|
|
3490
|
-
|
|
3491
|
-
throw e;
|
|
3492
|
-
}
|
|
3493
|
-
};
|
|
3494
|
-
/**
|
|
3495
|
-
* Expose
|
|
3496
|
-
*/
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
marked.Parser = Parser;
|
|
3500
|
-
marked.parser = Parser.parse;
|
|
3501
|
-
marked.Renderer = Renderer;
|
|
3502
|
-
marked.TextRenderer = TextRenderer;
|
|
3503
|
-
marked.Lexer = Lexer;
|
|
3504
|
-
marked.lexer = Lexer.lex;
|
|
3505
|
-
marked.Tokenizer = Tokenizer;
|
|
3506
|
-
marked.Slugger = Slugger;
|
|
3507
|
-
marked.parse = marked;
|
|
3508
|
-
var options = marked.options;
|
|
3509
|
-
var setOptions = marked.setOptions;
|
|
3510
|
-
var use = marked.use;
|
|
3511
|
-
var walkTokens = marked.walkTokens;
|
|
3512
|
-
var parseInline = marked.parseInline;
|
|
3513
|
-
var parse = marked;
|
|
3514
|
-
var parser = Parser.parse;
|
|
3515
|
-
var lexer = Lexer.lex;
|
|
3516
|
-
|
|
3517
|
-
exports.Lexer = Lexer;
|
|
3518
|
-
exports.Parser = Parser;
|
|
3519
|
-
exports.Renderer = Renderer;
|
|
3520
|
-
exports.Slugger = Slugger;
|
|
3521
|
-
exports.TextRenderer = TextRenderer;
|
|
3522
|
-
exports.Tokenizer = Tokenizer;
|
|
3523
|
-
exports.getDefaults = getDefaults;
|
|
3524
|
-
exports.lexer = lexer;
|
|
3525
|
-
exports.marked = marked;
|
|
3526
|
-
exports.options = options;
|
|
3527
|
-
exports.parse = parse;
|
|
3528
|
-
exports.parseInline = parseInline;
|
|
3529
|
-
exports.parser = parser;
|
|
3530
|
-
exports.setOptions = setOptions;
|
|
3531
|
-
exports.use = use;
|
|
3532
|
-
exports.walkTokens = walkTokens;
|
|
3533
|
-
|
|
3534
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3535
|
-
|
|
3536
|
-
}));
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
/***/ }),
|
|
3540
|
-
|
|
3541
|
-
/***/ "7db7":
|
|
3542
|
-
/***/ (function(module, exports) {
|
|
3543
|
-
|
|
3544
|
-
module.exports = require("element-ui/lib/link");
|
|
3545
|
-
|
|
3546
|
-
/***/ }),
|
|
3547
|
-
|
|
3548
|
-
/***/ "7f9f":
|
|
3549
|
-
/***/ (function(module, exports) {
|
|
3550
|
-
|
|
3551
|
-
module.exports = require("element-ui/lib/locale");
|
|
3552
|
-
|
|
3553
|
-
/***/ }),
|
|
3554
|
-
|
|
3555
|
-
/***/ "80c4":
|
|
3556
|
-
/***/ (function(module, exports) {
|
|
3557
|
-
|
|
3558
|
-
module.exports = require("element-ui/lib/theme-chalk/option.css");
|
|
3559
|
-
|
|
3560
|
-
/***/ }),
|
|
3561
|
-
|
|
3562
|
-
/***/ "8353":
|
|
3563
|
-
/***/ (function(module, exports) {
|
|
3564
|
-
|
|
3565
|
-
module.exports = require("core-js/modules/es.string.replace-all.js");
|
|
3566
|
-
|
|
3567
|
-
/***/ }),
|
|
3568
|
-
|
|
3569
|
-
/***/ "8535":
|
|
3570
|
-
/***/ (function(module, exports) {
|
|
3571
|
-
|
|
3572
|
-
module.exports = require("core-js/modules/es.set.js");
|
|
3573
|
-
|
|
3574
|
-
/***/ }),
|
|
3575
|
-
|
|
3576
|
-
/***/ "85f7":
|
|
3577
|
-
/***/ (function(module, exports) {
|
|
3578
|
-
|
|
3579
|
-
module.exports = require("core-js/modules/es.array.includes.js");
|
|
3580
|
-
|
|
3581
|
-
/***/ }),
|
|
3582
|
-
|
|
3583
|
-
/***/ "88eb":
|
|
3584
|
-
/***/ (function(module, exports) {
|
|
3585
|
-
|
|
3586
|
-
module.exports = require("algoliasearch");
|
|
3587
|
-
|
|
3588
|
-
/***/ }),
|
|
3589
|
-
|
|
3590
|
-
/***/ "8bbf":
|
|
3591
|
-
/***/ (function(module, exports) {
|
|
3592
|
-
|
|
3593
|
-
module.exports = require("vue");
|
|
3594
|
-
|
|
3595
|
-
/***/ }),
|
|
3596
|
-
|
|
3597
|
-
/***/ "8edc":
|
|
3598
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
3599
|
-
|
|
3600
|
-
// extracted by mini-css-extract-plugin
|
|
3601
|
-
|
|
3602
|
-
/***/ }),
|
|
3603
|
-
|
|
3604
|
-
/***/ "8f11":
|
|
3605
|
-
/***/ (function(module, exports) {
|
|
3606
|
-
|
|
3607
|
-
module.exports = require("element-ui/lib/theme-chalk/icon.css");
|
|
3608
|
-
|
|
3609
|
-
/***/ }),
|
|
3610
|
-
|
|
3611
|
-
/***/ "93e6":
|
|
3612
|
-
/***/ (function(module, exports) {
|
|
3613
|
-
|
|
3614
|
-
module.exports = require("element-ui/lib/popover");
|
|
3615
|
-
|
|
3616
|
-
/***/ }),
|
|
3617
|
-
|
|
3618
|
-
/***/ "97d3":
|
|
3619
|
-
/***/ (function(module, exports) {
|
|
3620
|
-
|
|
3621
|
-
module.exports = require("core-js/modules/es.object.to-string.js");
|
|
3622
|
-
|
|
3623
|
-
/***/ }),
|
|
3624
|
-
|
|
3625
|
-
/***/ "9a25":
|
|
3626
|
-
/***/ (function(module, exports) {
|
|
3627
|
-
|
|
3628
|
-
module.exports = require("element-ui/lib/theme-chalk/base.css");
|
|
3629
|
-
|
|
3630
|
-
/***/ }),
|
|
3631
|
-
|
|
3632
|
-
/***/ "9b22":
|
|
3633
|
-
/***/ (function(module, exports) {
|
|
3634
|
-
|
|
3635
|
-
module.exports = require("core-js/modules/es.symbol.js");
|
|
3636
|
-
|
|
3637
|
-
/***/ }),
|
|
3638
|
-
|
|
3639
|
-
/***/ "9b53":
|
|
3640
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
3641
|
-
|
|
3642
|
-
module.exports = __webpack_require__.p + "img/missing-image.1878d8b8.svg";
|
|
3643
|
-
|
|
3644
|
-
/***/ }),
|
|
3645
|
-
|
|
3646
|
-
/***/ "9bb0":
|
|
3647
|
-
/***/ (function(module, exports) {
|
|
3648
|
-
|
|
3649
|
-
module.exports = require("@soda/get-current-script");
|
|
3650
|
-
|
|
3651
|
-
/***/ }),
|
|
3652
|
-
|
|
3653
|
-
/***/ "9bb5":
|
|
3654
|
-
/***/ (function(module, exports) {
|
|
3655
|
-
|
|
3656
|
-
module.exports = require("core-js/modules/es.string.iterator.js");
|
|
3657
|
-
|
|
3658
|
-
/***/ }),
|
|
3659
|
-
|
|
3660
|
-
/***/ "a005":
|
|
3661
|
-
/***/ (function(module, exports) {
|
|
3662
|
-
|
|
3663
|
-
module.exports = require("core-js/modules/es.object.entries.js");
|
|
3664
|
-
|
|
3665
|
-
/***/ }),
|
|
3666
|
-
|
|
3667
|
-
/***/ "a012":
|
|
3668
|
-
/***/ (function(module, exports) {
|
|
3669
|
-
|
|
3670
|
-
module.exports = require("@abi-software/gallery/src/mixins/GalleryHelpers");
|
|
3671
|
-
|
|
3672
|
-
/***/ }),
|
|
3673
|
-
|
|
3674
|
-
/***/ "a290":
|
|
3675
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
3676
|
-
|
|
3677
|
-
// extracted by mini-css-extract-plugin
|
|
580
|
+
module.exports = require("@abi-software/gallery/src/mixins/GalleryHelpers");
|
|
3678
581
|
|
|
3679
582
|
/***/ }),
|
|
3680
583
|
|
|
@@ -3706,6 +609,13 @@ module.exports = require("element-ui/lib/theme-chalk/input.css");
|
|
|
3706
609
|
|
|
3707
610
|
/***/ }),
|
|
3708
611
|
|
|
612
|
+
/***/ "aa1e":
|
|
613
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
614
|
+
|
|
615
|
+
// extracted by mini-css-extract-plugin
|
|
616
|
+
|
|
617
|
+
/***/ }),
|
|
618
|
+
|
|
3709
619
|
/***/ "ab87":
|
|
3710
620
|
/***/ (function(module, exports) {
|
|
3711
621
|
|
|
@@ -3720,7 +630,7 @@ module.exports = require("core-js/modules/es.object.assign.js");
|
|
|
3720
630
|
|
|
3721
631
|
/***/ }),
|
|
3722
632
|
|
|
3723
|
-
/***/ "
|
|
633
|
+
/***/ "adf3":
|
|
3724
634
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3725
635
|
|
|
3726
636
|
// extracted by mini-css-extract-plugin
|
|
@@ -3768,6 +678,17 @@ module.exports = require("element-ui/lib/icon");
|
|
|
3768
678
|
|
|
3769
679
|
module.exports = require("core-js/modules/es.map.js");
|
|
3770
680
|
|
|
681
|
+
/***/ }),
|
|
682
|
+
|
|
683
|
+
/***/ "ba21":
|
|
684
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
685
|
+
|
|
686
|
+
"use strict";
|
|
687
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SideBar_vue_vue_type_style_index_0_id_589e8b8e_prod_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aa1e");
|
|
688
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SideBar_vue_vue_type_style_index_0_id_589e8b8e_prod_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SideBar_vue_vue_type_style_index_0_id_589e8b8e_prod_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
|
|
689
|
+
/* unused harmony reexport * */
|
|
690
|
+
|
|
691
|
+
|
|
3771
692
|
/***/ }),
|
|
3772
693
|
|
|
3773
694
|
/***/ "be94":
|
|
@@ -3796,17 +717,6 @@ module.exports = require("core-js/modules/es.regexp.exec.js");
|
|
|
3796
717
|
|
|
3797
718
|
module.exports = require("core-js/modules/es.array.concat.js");
|
|
3798
719
|
|
|
3799
|
-
/***/ }),
|
|
3800
|
-
|
|
3801
|
-
/***/ "d019":
|
|
3802
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3803
|
-
|
|
3804
|
-
"use strict";
|
|
3805
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SidebarContent_vue_vue_type_style_index_0_id_35b8b64a_prod_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a290");
|
|
3806
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SidebarContent_vue_vue_type_style_index_0_id_35b8b64a_prod_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SidebarContent_vue_vue_type_style_index_0_id_35b8b64a_prod_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
|
|
3807
|
-
/* unused harmony reexport * */
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
720
|
/***/ }),
|
|
3811
721
|
|
|
3812
722
|
/***/ "da6e":
|
|
@@ -3863,31 +773,6 @@ module.exports = require("core-js/modules/es.object.keys.js");
|
|
|
3863
773
|
|
|
3864
774
|
module.exports = require("core-js/modules/es.promise.js");
|
|
3865
775
|
|
|
3866
|
-
/***/ }),
|
|
3867
|
-
|
|
3868
|
-
/***/ "ed7f":
|
|
3869
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
3870
|
-
|
|
3871
|
-
// extracted by mini-css-extract-plugin
|
|
3872
|
-
|
|
3873
|
-
/***/ }),
|
|
3874
|
-
|
|
3875
|
-
/***/ "efde":
|
|
3876
|
-
/***/ (function(module, exports) {
|
|
3877
|
-
|
|
3878
|
-
module.exports = require("xss");
|
|
3879
|
-
|
|
3880
|
-
/***/ }),
|
|
3881
|
-
|
|
3882
|
-
/***/ "f0c7":
|
|
3883
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3884
|
-
|
|
3885
|
-
"use strict";
|
|
3886
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SideBar_vue_vue_type_style_index_0_id_16a27613_prod_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ed7f");
|
|
3887
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SideBar_vue_vue_type_style_index_0_id_16a27613_prod_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SideBar_vue_vue_type_style_index_0_id_16a27613_prod_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
|
|
3888
|
-
/* unused harmony reexport * */
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
776
|
/***/ }),
|
|
3892
777
|
|
|
3893
778
|
/***/ "f3b8":
|
|
@@ -3945,7 +830,7 @@ if (typeof window !== 'undefined') {
|
|
|
3945
830
|
// Indicate to webpack that this file can be concatenated
|
|
3946
831
|
/* harmony default export */ var setPublicPath = (null);
|
|
3947
832
|
|
|
3948
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"fb6f3a7c-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SideBar.vue?vue&type=template&id=
|
|
833
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"fb6f3a7c-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SideBar.vue?vue&type=template&id=589e8b8e&scoped=true&
|
|
3949
834
|
var render = function render() {
|
|
3950
835
|
var _vm = this,
|
|
3951
836
|
_c = _vm._self._c;
|
|
@@ -4020,7 +905,7 @@ var render = function render() {
|
|
|
4020
905
|
};
|
|
4021
906
|
var staticRenderFns = [];
|
|
4022
907
|
|
|
4023
|
-
// CONCATENATED MODULE: ./src/components/SideBar.vue?vue&type=template&id=
|
|
908
|
+
// CONCATENATED MODULE: ./src/components/SideBar.vue?vue&type=template&id=589e8b8e&scoped=true&
|
|
4024
909
|
|
|
4025
910
|
// EXTERNAL MODULE: external "core-js/modules/es.symbol.js"
|
|
4026
911
|
var es_symbol_js_ = __webpack_require__("9b22");
|
|
@@ -4581,8 +1466,8 @@ var en_default = /*#__PURE__*/__webpack_require__.n(en_);
|
|
|
4581
1466
|
var locale_ = __webpack_require__("7f9f");
|
|
4582
1467
|
var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
|
|
4583
1468
|
|
|
4584
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"fb6f3a7c-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SidebarContent.vue?vue&type=template&id=
|
|
4585
|
-
var
|
|
1469
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"fb6f3a7c-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SidebarContent.vue?vue&type=template&id=29231cf0&scoped=true&
|
|
1470
|
+
var SidebarContentvue_type_template_id_29231cf0_scoped_true_render = function render() {
|
|
4586
1471
|
var _vm = this,
|
|
4587
1472
|
_c = _vm._self._c;
|
|
4588
1473
|
return _c('el-card', {
|
|
@@ -4596,12 +1481,7 @@ var SidebarContentvue_type_template_id_35b8b64a_scoped_true_render = function re
|
|
|
4596
1481
|
"slot": "header"
|
|
4597
1482
|
},
|
|
4598
1483
|
slot: "header"
|
|
4599
|
-
}, [
|
|
4600
|
-
attrs: {
|
|
4601
|
-
"entry": _vm.contextCardEntry,
|
|
4602
|
-
"envVars": _vm.envVars
|
|
4603
|
-
}
|
|
4604
|
-
}) : _vm._e(), _c('el-input', {
|
|
1484
|
+
}, [_c('el-input', {
|
|
4605
1485
|
staticClass: "search-input",
|
|
4606
1486
|
attrs: {
|
|
4607
1487
|
"placeholder": "Search",
|
|
@@ -4659,9 +1539,6 @@ var SidebarContentvue_type_template_id_35b8b64a_scoped_true_render = function re
|
|
|
4659
1539
|
attrs: {
|
|
4660
1540
|
"entry": result,
|
|
4661
1541
|
"envVars": _vm.envVars
|
|
4662
|
-
},
|
|
4663
|
-
on: {
|
|
4664
|
-
"contextUpdate": _vm.contextCardUpdate
|
|
4665
1542
|
}
|
|
4666
1543
|
})], 1);
|
|
4667
1544
|
}), _c('el-pagination', {
|
|
@@ -4685,9 +1562,9 @@ var SidebarContentvue_type_template_id_35b8b64a_scoped_true_render = function re
|
|
|
4685
1562
|
}
|
|
4686
1563
|
})], 2)], 1);
|
|
4687
1564
|
};
|
|
4688
|
-
var
|
|
1565
|
+
var SidebarContentvue_type_template_id_29231cf0_scoped_true_staticRenderFns = [];
|
|
4689
1566
|
|
|
4690
|
-
// CONCATENATED MODULE: ./src/components/SidebarContent.vue?vue&type=template&id=
|
|
1567
|
+
// CONCATENATED MODULE: ./src/components/SidebarContent.vue?vue&type=template&id=29231cf0&scoped=true&
|
|
4691
1568
|
|
|
4692
1569
|
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
|
|
4693
1570
|
function _arrayLikeToArray(arr, len) {
|
|
@@ -7077,551 +3954,6 @@ var DatasetCard_component = normalizeComponent(
|
|
|
7077
3954
|
)
|
|
7078
3955
|
|
|
7079
3956
|
/* harmony default export */ var DatasetCard = (DatasetCard_component.exports);
|
|
7080
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"fb6f3a7c-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ContextCard.vue?vue&type=template&id=1221ea8f&scoped=true&
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
var ContextCardvue_type_template_id_1221ea8f_scoped_true_render = function render() {
|
|
7085
|
-
var _vm = this,
|
|
7086
|
-
_c = _vm._self._c;
|
|
7087
|
-
return _c('div', {
|
|
7088
|
-
ref: "container",
|
|
7089
|
-
staticClass: "context-card-container"
|
|
7090
|
-
}, [_c('div', {
|
|
7091
|
-
directives: [{
|
|
7092
|
-
name: "show",
|
|
7093
|
-
rawName: "v-show",
|
|
7094
|
-
value: _vm.showContextCard,
|
|
7095
|
-
expression: "showContextCard"
|
|
7096
|
-
}]
|
|
7097
|
-
}, [_c('div', {
|
|
7098
|
-
directives: [{
|
|
7099
|
-
name: "show",
|
|
7100
|
-
rawName: "v-show",
|
|
7101
|
-
value: _vm.showDetails,
|
|
7102
|
-
expression: "showDetails"
|
|
7103
|
-
}],
|
|
7104
|
-
staticClass: "hide",
|
|
7105
|
-
on: {
|
|
7106
|
-
"click": function click($event) {
|
|
7107
|
-
_vm.showDetails = !_vm.showDetails;
|
|
7108
|
-
}
|
|
7109
|
-
}
|
|
7110
|
-
}, [_vm._v("Hide information"), _c('i', {
|
|
7111
|
-
staticClass: "el-icon-arrow-up"
|
|
7112
|
-
})]), _c('div', {
|
|
7113
|
-
directives: [{
|
|
7114
|
-
name: "show",
|
|
7115
|
-
rawName: "v-show",
|
|
7116
|
-
value: !_vm.showDetails,
|
|
7117
|
-
expression: "!showDetails"
|
|
7118
|
-
}],
|
|
7119
|
-
staticClass: "hide",
|
|
7120
|
-
on: {
|
|
7121
|
-
"click": function click($event) {
|
|
7122
|
-
_vm.showDetails = !_vm.showDetails;
|
|
7123
|
-
}
|
|
7124
|
-
}
|
|
7125
|
-
}, [_vm._v("Show information"), _c('i', {
|
|
7126
|
-
staticClass: "el-icon-arrow-down"
|
|
7127
|
-
})]), _vm.showDetails && Object.keys(_vm.contextData).length !== 0 ? _c('el-card', {
|
|
7128
|
-
directives: [{
|
|
7129
|
-
name: "loading",
|
|
7130
|
-
rawName: "v-loading",
|
|
7131
|
-
value: _vm.loading,
|
|
7132
|
-
expression: "loading"
|
|
7133
|
-
}],
|
|
7134
|
-
staticClass: "context-card"
|
|
7135
|
-
}, [_c('div', {
|
|
7136
|
-
staticClass: "card-left"
|
|
7137
|
-
}, [_c('img', {
|
|
7138
|
-
staticClass: "context-image",
|
|
7139
|
-
attrs: {
|
|
7140
|
-
"src": _vm.banner
|
|
7141
|
-
}
|
|
7142
|
-
})]), _c('div', {
|
|
7143
|
-
staticClass: "card-right scrollbar"
|
|
7144
|
-
}, [_c('div', {
|
|
7145
|
-
staticClass: "title"
|
|
7146
|
-
}, [_vm._v(_vm._s(_vm.contextData.heading))]), _c('div', {
|
|
7147
|
-
domProps: {
|
|
7148
|
-
"innerHTML": _vm._s(_vm.parseMarkdown(_vm.contextData.description))
|
|
7149
|
-
}
|
|
7150
|
-
}), _c('br'), !_vm.samplesUnderViews ? [_vm.contextData.views && _vm.contextData.views.length > 0 ? _c('div', {
|
|
7151
|
-
staticClass: "subtitle"
|
|
7152
|
-
}, [_vm._v("Scaffold Views")]) : _vm._e(), _vm._l(_vm.contextData.views, function (view, i) {
|
|
7153
|
-
return [_c('div', {
|
|
7154
|
-
key: i + '_1',
|
|
7155
|
-
staticClass: "context-card-view",
|
|
7156
|
-
on: {
|
|
7157
|
-
"click": function click($event) {
|
|
7158
|
-
return _vm.openViewFile(view);
|
|
7159
|
-
}
|
|
7160
|
-
}
|
|
7161
|
-
}, [_c('img', {
|
|
7162
|
-
staticClass: "view-image",
|
|
7163
|
-
attrs: {
|
|
7164
|
-
"src": _vm.getFileFromPath(view.thumbnail)
|
|
7165
|
-
}
|
|
7166
|
-
}), _c('div', {
|
|
7167
|
-
staticClass: "view-description"
|
|
7168
|
-
}, [_vm._v(_vm._s(view.description))])]), _c('div', {
|
|
7169
|
-
key: i,
|
|
7170
|
-
staticClass: "padding"
|
|
7171
|
-
})];
|
|
7172
|
-
}), _c('div', {
|
|
7173
|
-
staticStyle: {
|
|
7174
|
-
"margin-bottom": "16px"
|
|
7175
|
-
}
|
|
7176
|
-
}), _vm.contextData.samples && _vm.contextData.samples.length > 0 ? _c('div', {
|
|
7177
|
-
staticClass: "subtitle"
|
|
7178
|
-
}, [_vm._v("Samples on Scaffold")]) : _vm._e(), _vm._l(_vm.contextData.samples, function (sample, i) {
|
|
7179
|
-
return [_c('span', {
|
|
7180
|
-
key: i + '_3',
|
|
7181
|
-
staticClass: "context-card-item cursor-pointer",
|
|
7182
|
-
on: {
|
|
7183
|
-
"click": function click($event) {
|
|
7184
|
-
return _vm.toggleSampleDetails(i);
|
|
7185
|
-
}
|
|
7186
|
-
}
|
|
7187
|
-
}, [_c('div', {
|
|
7188
|
-
key: i + '_6',
|
|
7189
|
-
staticStyle: {
|
|
7190
|
-
"display": "flex"
|
|
7191
|
-
}
|
|
7192
|
-
}, [sample.color ? _c('div', {
|
|
7193
|
-
staticClass: "color-box",
|
|
7194
|
-
style: 'background-color:' + sample.color
|
|
7195
|
-
}) : sample.thumbnail ? _c('img', {
|
|
7196
|
-
staticClass: "key-image",
|
|
7197
|
-
attrs: {
|
|
7198
|
-
"src": _vm.getFileFromPath(sample.thumbnail)
|
|
7199
|
-
}
|
|
7200
|
-
}) : _vm._e(), _vm._v(" " + _vm._s(sample.heading) + " "), _c('i', {
|
|
7201
|
-
staticClass: "el-icon-warning-outline info"
|
|
7202
|
-
})])]), _vm.sampleDetails[i] ? _c('div', {
|
|
7203
|
-
key: i + '_4',
|
|
7204
|
-
domProps: {
|
|
7205
|
-
"innerHTML": _vm._s(sample.description)
|
|
7206
|
-
}
|
|
7207
|
-
}) : _vm._e(), _vm.sampleDetails[i] && sample.path ? _c('a', {
|
|
7208
|
-
key: i + '_5',
|
|
7209
|
-
attrs: {
|
|
7210
|
-
"href": _vm.generateFileLink(sample),
|
|
7211
|
-
"target": "_blank"
|
|
7212
|
-
}
|
|
7213
|
-
}, [_vm._v("View Source")]) : _vm._e(), _c('div', {
|
|
7214
|
-
key: i + '_2',
|
|
7215
|
-
staticClass: "padding"
|
|
7216
|
-
})];
|
|
7217
|
-
})] : [_vm.contextData.views && _vm.contextData.views.length > 0 ? _c('div', {
|
|
7218
|
-
staticClass: "subtitle"
|
|
7219
|
-
}, [_vm._v("Scaffold Views")]) : _vm._e(), _vm._l(_vm.contextData.views, function (view, i) {
|
|
7220
|
-
return [_c('span', {
|
|
7221
|
-
key: i + '_1',
|
|
7222
|
-
staticClass: "context-card-view",
|
|
7223
|
-
on: {
|
|
7224
|
-
"click": function click($event) {
|
|
7225
|
-
return _vm.viewClicked(view, i);
|
|
7226
|
-
}
|
|
7227
|
-
}
|
|
7228
|
-
}, [_c('img', {
|
|
7229
|
-
staticClass: "view-image",
|
|
7230
|
-
attrs: {
|
|
7231
|
-
"src": _vm.getFileFromPath(view.thumbnail)
|
|
7232
|
-
}
|
|
7233
|
-
}), _c('div', {
|
|
7234
|
-
staticClass: "view-description"
|
|
7235
|
-
}, [_vm._v(_vm._s(view.description)), _c('i', {
|
|
7236
|
-
staticClass: "el-icon-warning-outline info"
|
|
7237
|
-
})])]), _vm.sampleDetails[i] ? _c('div', {
|
|
7238
|
-
key: i + '_2',
|
|
7239
|
-
domProps: {
|
|
7240
|
-
"innerHTML": _vm._s(_vm.samplesMatching(view.id).description)
|
|
7241
|
-
}
|
|
7242
|
-
}) : _vm._e(), _vm.sampleDetails[i] && _vm.samplesMatching(view.id).path ? _c('a', {
|
|
7243
|
-
key: i + '_5',
|
|
7244
|
-
attrs: {
|
|
7245
|
-
"href": _vm.generateFileLink(_vm.samplesMatching(view.id)),
|
|
7246
|
-
"target": "_blank"
|
|
7247
|
-
}
|
|
7248
|
-
}, [_vm._v("View Source")]) : _vm._e(), _c('div', {
|
|
7249
|
-
key: i,
|
|
7250
|
-
staticClass: "padding"
|
|
7251
|
-
}), _vm.sampleDetails[i] ? _c('div', {
|
|
7252
|
-
key: i + '_6',
|
|
7253
|
-
staticClass: "padding"
|
|
7254
|
-
}) : _vm._e()];
|
|
7255
|
-
})]], 2)]) : _vm._e()], 1)]);
|
|
7256
|
-
};
|
|
7257
|
-
var ContextCardvue_type_template_id_1221ea8f_scoped_true_staticRenderFns = [];
|
|
7258
|
-
|
|
7259
|
-
// CONCATENATED MODULE: ./src/components/ContextCard.vue?vue&type=template&id=1221ea8f&scoped=true&
|
|
7260
|
-
|
|
7261
|
-
// EXTERNAL MODULE: external "element-ui/lib/theme-chalk/link.css"
|
|
7262
|
-
var link_css_ = __webpack_require__("230a");
|
|
7263
|
-
|
|
7264
|
-
// EXTERNAL MODULE: external "element-ui/lib/link"
|
|
7265
|
-
var link_ = __webpack_require__("7db7");
|
|
7266
|
-
var link_default = /*#__PURE__*/__webpack_require__.n(link_);
|
|
7267
|
-
|
|
7268
|
-
// CONCATENATED MODULE: ./src/components/hardcoded-context-info.js
|
|
7269
|
-
/* harmony default export */ var hardcoded_context_info = ({});
|
|
7270
|
-
// //Uncomment the code below to add in hardcoded data
|
|
7271
|
-
// export default {
|
|
7272
|
-
// 77: {
|
|
7273
|
-
// "description": "This dataset contains single cell scale anatomical map of the rat intrinsic cardiac nervous system (ICNS) across four male and three female hearts. These cell clusters can be seen by the yellow data points on the image as well as spherical markers on the 3D heart scaffold. The dataset provides an integrative framework to visualise the spatial distribution of ICNS across different hearts.",
|
|
7274
|
-
// "heading": "Mapped ICN samples",
|
|
7275
|
-
// "id": "sparc.science.context_data",
|
|
7276
|
-
// "samples": [
|
|
7277
|
-
// {
|
|
7278
|
-
// "annotation": "",
|
|
7279
|
-
// "description": "Spatial location of isolated ICNS mapped onto a generic heart scaffold",
|
|
7280
|
-
// "doi": "",
|
|
7281
|
-
// "heading": "ICNS from subject M54-8",
|
|
7282
|
-
// "id": "Sample 1",
|
|
7283
|
-
// "path": "",
|
|
7284
|
-
// "view": "View 1",
|
|
7285
|
-
// "color": "#FFFF00",
|
|
7286
|
-
// "thumbnail": "https://raw.githubusercontent.com/ABI-Software/map-sidebar/main/assets/temp-pics/orange.png"
|
|
7287
|
-
// },
|
|
7288
|
-
// {
|
|
7289
|
-
// "annotation": "",
|
|
7290
|
-
// "description": "Spatial location of isolated ICNS mapped onto a generic heart scaffold",
|
|
7291
|
-
// "doi": "",
|
|
7292
|
-
// "heading": "ICNS from subject M54-5",
|
|
7293
|
-
// "id": "Sample 2",
|
|
7294
|
-
// "path": "",
|
|
7295
|
-
// "view": "View 2",
|
|
7296
|
-
// "color": "#FFA500",
|
|
7297
|
-
// "thumbnail": "https://raw.githubusercontent.com/ABI-Software/map-sidebar/main/assets/temp-pics/teal.png"
|
|
7298
|
-
// }
|
|
7299
|
-
// ],
|
|
7300
|
-
// "version": "0.1.0",
|
|
7301
|
-
// },
|
|
7302
|
-
// 221: {
|
|
7303
|
-
// "description": "3D digital tracings of the enteric plexus obtained from seven subjects (M11, M16, M162, M163, M164, M168) are mapped randomly on mouse proximal colon. The data depicts individual neural wiring patterns in enteric microcircuits, and revealed both neuron and fiber units wired in a complex organization.",
|
|
7304
|
-
// "heading": "Digital tracings of enteric plexus",
|
|
7305
|
-
// "id": "sparc.science.context_data",
|
|
7306
|
-
// "samples": [
|
|
7307
|
-
// {
|
|
7308
|
-
// "annotation": "",
|
|
7309
|
-
// "description": "Neuronal soma and fibers in a myenteric ganglion in this subject are annotated into the following groups to highlight their interactions:\n\nNeuron1,2,3 Connex: Connections between 3 neurons and cross-ganglionic fibers\n\nNeuron4_Connex: A small neuron contacts fibers passing the ganglion\n\nNeuron5: Multiple projections of a neuron in an myenteric ganglion\n\nNeuron5,3,7 Connex: Connections between 3 neurons, nerve fibers, IGNEx (complex type of intraganglionic nerve endings) and fibers in the circular muscles.\n\nNeuron8,9,10 Connex: Connections of 3 neurons with each other and with long passing fibers. \n\nIntraganglionic Nerve Ending (IGNE): Digital traces of neurites consist of complex intraganglionic nerve endings. The blue fiber has branched terminals, more likely the afferent nerve endings; the violet and cyan terminals also interweave into the fiber nest; the orange, pink and peach fibers and one process of the neuron cross the IGNE to make 1-2 conjunctions. \n",
|
|
7310
|
-
// "doi": "",
|
|
7311
|
-
// "heading": "Digital tracing for subject M11",
|
|
7312
|
-
// "id": "Sample 1",
|
|
7313
|
-
// "path": "files/derivative/sub-M11/sam-pCm11/digital-traces/pC PHPS XFP M11 20XZ 180425_180713_2_NL_20.xml",
|
|
7314
|
-
// "view": "View 1"
|
|
7315
|
-
// },
|
|
7316
|
-
// {
|
|
7317
|
-
// "annotation": "",
|
|
7318
|
-
// "description": "This digital trace demonstrates some types of wiring. A long process of the green neuron terminates in the intraganglionic nerve endings (IGNE) while in contact with a nerve fiber (cyan), soma of a neuron (peach) and processes of 3 neurons (magenta, yellow and red). Two neurons and one fiber are traced to an IGNE. ",
|
|
7319
|
-
// "doi": "",
|
|
7320
|
-
// "heading": "Digital tracing for subject M16",
|
|
7321
|
-
// "id": "Sample 2",
|
|
7322
|
-
// "path": "files/derivative/sub-M16/sam-pCm16/digital-traces/pC PHPS XFP M16 20XZ 180425_180524.xml",
|
|
7323
|
-
// "view": "View 2"
|
|
7324
|
-
// }
|
|
7325
|
-
// ],
|
|
7326
|
-
// "version": "0.1.0",
|
|
7327
|
-
// "views": [
|
|
7328
|
-
// {
|
|
7329
|
-
// "annotation": "--",
|
|
7330
|
-
// "description": "Digital tracing of neurons for subject M11.",
|
|
7331
|
-
// "id": "View 1",
|
|
7332
|
-
// "path": "files/derivative/Scaffolds/M11_view.json",
|
|
7333
|
-
// "sample": "Sample 1",
|
|
7334
|
-
// "thumbnail": "https://api.sparc.science/s3-resource/221/2/files/derivative/Scaffolds/M11_thumbnail.jpeg"
|
|
7335
|
-
// },
|
|
7336
|
-
// {
|
|
7337
|
-
// "annotation": "--",
|
|
7338
|
-
// "description": "Digital tracing of neurons for subject M16.",
|
|
7339
|
-
// "id": "View 2",
|
|
7340
|
-
// "path": "files/derivative/Scaffolds/M16_view.json",
|
|
7341
|
-
// "sample": "Sample 2",
|
|
7342
|
-
// "thumbnail": "https://api.sparc.science/s3-resource/221/2/files/derivative/Scaffolds/M16_thumbnail.jpeg"
|
|
7343
|
-
// }
|
|
7344
|
-
// ]
|
|
7345
|
-
// }
|
|
7346
|
-
// }
|
|
7347
|
-
// EXTERNAL MODULE: ./node_modules/marked/lib/marked.umd.js
|
|
7348
|
-
var marked_umd = __webpack_require__("7c5c");
|
|
7349
|
-
|
|
7350
|
-
// EXTERNAL MODULE: external "xss"
|
|
7351
|
-
var external_xss_ = __webpack_require__("efde");
|
|
7352
|
-
var external_xss_default = /*#__PURE__*/__webpack_require__.n(external_xss_);
|
|
7353
|
-
|
|
7354
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ContextCard.vue?vue&type=script&lang=js&
|
|
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
|
-
/* eslint-disable no-alert, no-console */
|
|
7386
|
-
|
|
7387
|
-
|
|
7388
|
-
|
|
7389
|
-
|
|
7390
|
-
|
|
7391
|
-
|
|
7392
|
-
//provide the s3Bucket related methods and data.
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
locale_default.a.use(en_default.a);
|
|
7397
|
-
external_vue_default.a.use(link_default.a);
|
|
7398
|
-
external_vue_default.a.use(icon_default.a);
|
|
7399
|
-
external_vue_default.a.use(card_default.a);
|
|
7400
|
-
external_vue_default.a.use(button_default.a);
|
|
7401
|
-
external_vue_default.a.use(select_default.a);
|
|
7402
|
-
external_vue_default.a.use(input_default.a);
|
|
7403
|
-
var addFilesToPathIfMissing = function addFilesToPathIfMissing(path) {
|
|
7404
|
-
if (!path.includes('files')) {
|
|
7405
|
-
return 'files/' + path;
|
|
7406
|
-
} else {
|
|
7407
|
-
return path;
|
|
7408
|
-
}
|
|
7409
|
-
};
|
|
7410
|
-
var convertBackslashToForwardSlash = function convertBackslashToForwardSlash(path) {
|
|
7411
|
-
path = path.replaceAll('\\', '/');
|
|
7412
|
-
path = path.replaceAll('\\\\', '/');
|
|
7413
|
-
return path;
|
|
7414
|
-
};
|
|
7415
|
-
|
|
7416
|
-
// const switchPathToDirectory = function(path){
|
|
7417
|
-
// let newPath = path.split('/')
|
|
7418
|
-
// newPath.pop()
|
|
7419
|
-
// return newPath.join('/')
|
|
7420
|
-
// }
|
|
7421
|
-
|
|
7422
|
-
/* harmony default export */ var ContextCardvue_type_script_lang_js_ = ({
|
|
7423
|
-
name: "contextCard",
|
|
7424
|
-
mixins: [S3Bucket],
|
|
7425
|
-
props: {
|
|
7426
|
-
/**
|
|
7427
|
-
* Object containing information for
|
|
7428
|
-
* the required viewing.
|
|
7429
|
-
*/
|
|
7430
|
-
entry: Object,
|
|
7431
|
-
envVars: Object
|
|
7432
|
-
},
|
|
7433
|
-
data: function data() {
|
|
7434
|
-
return {
|
|
7435
|
-
contextData: {},
|
|
7436
|
-
showDetails: true,
|
|
7437
|
-
showContextCard: true,
|
|
7438
|
-
sampleDetails: {},
|
|
7439
|
-
loading: false
|
|
7440
|
-
};
|
|
7441
|
-
},
|
|
7442
|
-
watch: {
|
|
7443
|
-
'entry.contextCardUrl': {
|
|
7444
|
-
handler: function handler(val) {
|
|
7445
|
-
if (val) {
|
|
7446
|
-
// used for hardcoding data
|
|
7447
|
-
if (val === true) {
|
|
7448
|
-
this.contextData = hardcoded_context_info[this.entry.discoverId];
|
|
7449
|
-
} else {
|
|
7450
|
-
this.getContextFile(val);
|
|
7451
|
-
this.showContextCard = true;
|
|
7452
|
-
}
|
|
7453
|
-
} else {
|
|
7454
|
-
this.showContextCard = false;
|
|
7455
|
-
}
|
|
7456
|
-
},
|
|
7457
|
-
immediate: true
|
|
7458
|
-
},
|
|
7459
|
-
'entry.s3uri': {
|
|
7460
|
-
handler: function handler(val) {
|
|
7461
|
-
this.updateS3Bucket(val);
|
|
7462
|
-
},
|
|
7463
|
-
immediate: true
|
|
7464
|
-
}
|
|
7465
|
-
},
|
|
7466
|
-
computed: {
|
|
7467
|
-
samplesUnderViews: function samplesUnderViews() {
|
|
7468
|
-
if (this.contextData) {
|
|
7469
|
-
if (this.contextData.samplesUnderViews) {
|
|
7470
|
-
return true;
|
|
7471
|
-
} else {
|
|
7472
|
-
var viewId = this.contextData.views.map(function (v) {
|
|
7473
|
-
return v.id;
|
|
7474
|
-
});
|
|
7475
|
-
var samplesView = this.contextData.samples.map(function (s) {
|
|
7476
|
-
return s.view;
|
|
7477
|
-
});
|
|
7478
|
-
|
|
7479
|
-
// get matching values
|
|
7480
|
-
var matching = viewId.filter(function (v) {
|
|
7481
|
-
return samplesView.includes(v);
|
|
7482
|
-
});
|
|
7483
|
-
|
|
7484
|
-
// check all arrays have the same length (which means all values are in all three)
|
|
7485
|
-
if (viewId.length === matching.length && matching.length === samplesView.length) {
|
|
7486
|
-
return true;
|
|
7487
|
-
}
|
|
7488
|
-
return false;
|
|
7489
|
-
}
|
|
7490
|
-
} else return false;
|
|
7491
|
-
},
|
|
7492
|
-
banner: function banner() {
|
|
7493
|
-
if (this.contextData.banner) {
|
|
7494
|
-
return this.getFileFromPath(this.contextData.banner);
|
|
7495
|
-
} else if (this.contextData && this.contextData.views && this.contextData.views.length > 0) {
|
|
7496
|
-
if (this.contextData.views[0].thumbnail) {
|
|
7497
|
-
return this.getFileFromPath(this.contextData.views[0].thumbnail);
|
|
7498
|
-
}
|
|
7499
|
-
}
|
|
7500
|
-
return this.entry.banner;
|
|
7501
|
-
}
|
|
7502
|
-
},
|
|
7503
|
-
methods: {
|
|
7504
|
-
samplesMatching: function samplesMatching(viewId) {
|
|
7505
|
-
if (this.contextData && this.contextData.samples) {
|
|
7506
|
-
return this.contextData.samples.filter(function (s) {
|
|
7507
|
-
return s.view == viewId;
|
|
7508
|
-
})[0];
|
|
7509
|
-
} else return [];
|
|
7510
|
-
},
|
|
7511
|
-
viewClicked: function viewClicked(view, i) {
|
|
7512
|
-
this.openViewFile(view);
|
|
7513
|
-
this.toggleSampleDetails(i);
|
|
7514
|
-
},
|
|
7515
|
-
getContextFile: function getContextFile(contextFileUrl) {
|
|
7516
|
-
var _this = this;
|
|
7517
|
-
this.loading = true;
|
|
7518
|
-
fetch(contextFileUrl).then(function (response) {
|
|
7519
|
-
if (!response.ok) {
|
|
7520
|
-
throw Error(response.statusText);
|
|
7521
|
-
} else {
|
|
7522
|
-
return response.json();
|
|
7523
|
-
}
|
|
7524
|
-
}).then(function (data) {
|
|
7525
|
-
_this.contextData = data;
|
|
7526
|
-
_this.loading = false;
|
|
7527
|
-
_this.addDiscoverIdsToContextData();
|
|
7528
|
-
}).catch(function (err) {
|
|
7529
|
-
//set defaults if we hit an error
|
|
7530
|
-
console.error('caught error!', err);
|
|
7531
|
-
_this.thumbnail = __webpack_require__("9b53");
|
|
7532
|
-
_this.discoverId = undefined;
|
|
7533
|
-
_this.loading = false;
|
|
7534
|
-
});
|
|
7535
|
-
},
|
|
7536
|
-
removeDoubleFilesPath: function removeDoubleFilesPath(path) {
|
|
7537
|
-
if (path.includes('files/')) {
|
|
7538
|
-
return path.replace('files/', '');
|
|
7539
|
-
} else if (path.includes('files\\')) {
|
|
7540
|
-
return path.replace('files\\', '');
|
|
7541
|
-
} else {
|
|
7542
|
-
return path;
|
|
7543
|
-
}
|
|
7544
|
-
},
|
|
7545
|
-
toggleSampleDetails: function toggleSampleDetails(i) {
|
|
7546
|
-
if (this.sampleDetails[i] === undefined) {
|
|
7547
|
-
external_vue_default.a.set(this.sampleDetails, i, true);
|
|
7548
|
-
} else {
|
|
7549
|
-
external_vue_default.a.set(this.sampleDetails, i, !this.sampleDetails[i]);
|
|
7550
|
-
}
|
|
7551
|
-
},
|
|
7552
|
-
getFileFromPath: function getFileFromPath(path) {
|
|
7553
|
-
// for hardcoded data
|
|
7554
|
-
if (this.entry.contextCardUrl === true) {
|
|
7555
|
-
return path;
|
|
7556
|
-
}
|
|
7557
|
-
path = this.removeDoubleFilesPath(path);
|
|
7558
|
-
return "".concat(this.envVars.API_LOCATION, "s3-resource/").concat(this.entry.discoverId, "/").concat(this.entry.version, "/files/").concat(path).concat(this.getS3Args());
|
|
7559
|
-
},
|
|
7560
|
-
// This is used later when generateing links to the resource on sparc.science (see generateFileLink)
|
|
7561
|
-
addDiscoverIdsToContextData: function addDiscoverIdsToContextData() {
|
|
7562
|
-
var _this2 = this;
|
|
7563
|
-
this.contextData.samples.forEach(function (sample, i) {
|
|
7564
|
-
if (sample && sample.doi && sample.doi !== "") {
|
|
7565
|
-
fetch("".concat(_this2.envVars.PENNSIEVE_API_LOCATION, "/discover/datasets/doi/").concat(_this2.splitDoiFromUrl(sample.doi))).then(function (response) {
|
|
7566
|
-
return response.json();
|
|
7567
|
-
}).then(function (data) {
|
|
7568
|
-
_this2.contextData.samples[i].discoverId = data.id;
|
|
7569
|
-
_this2.contextData.samples[i].version = data.version;
|
|
7570
|
-
});
|
|
7571
|
-
} else {
|
|
7572
|
-
_this2.contextData.samples[i].discoverId = _this2.entry.discoverId;
|
|
7573
|
-
_this2.contextData.samples[i].version = _this2.entry.version;
|
|
7574
|
-
}
|
|
7575
|
-
});
|
|
7576
|
-
},
|
|
7577
|
-
processPathForUrl: function processPathForUrl(path) {
|
|
7578
|
-
path = convertBackslashToForwardSlash(path);
|
|
7579
|
-
path = addFilesToPathIfMissing(path);
|
|
7580
|
-
return encodeURI(path);
|
|
7581
|
-
},
|
|
7582
|
-
splitDoiFromUrl: function splitDoiFromUrl(url) {
|
|
7583
|
-
return url.split('https://doi.org/').pop();
|
|
7584
|
-
},
|
|
7585
|
-
generateFileLink: function generateFileLink(sample) {
|
|
7586
|
-
return "".concat(this.envVars.ROOT_URL, "/file/").concat(sample.discoverId, "/").concat(sample.version, "?path=").concat(this.processPathForUrl(sample.path));
|
|
7587
|
-
},
|
|
7588
|
-
parseMarkdown: function parseMarkdown(markdown) {
|
|
7589
|
-
return external_xss_default()(marked_umd["marked"].parse(markdown));
|
|
7590
|
-
},
|
|
7591
|
-
openViewFile: function openViewFile(view) {
|
|
7592
|
-
// note that we assume that the view file is in the same directory as the scaffold (viewUrls take relative paths)
|
|
7593
|
-
this.entry.viewUrl = "".concat(this.envVars.API_LOCATION, "s3-resource/").concat(this.entry.discoverId, "/").concat(this.entry.version, "/").concat(view.path).concat(this.getS3Args());
|
|
7594
|
-
this.entry.type = 'Scaffold View';
|
|
7595
|
-
components_EventBus.$emit("PopoverActionClick", this.entry);
|
|
7596
|
-
}
|
|
7597
|
-
}
|
|
7598
|
-
});
|
|
7599
|
-
// CONCATENATED MODULE: ./src/components/ContextCard.vue?vue&type=script&lang=js&
|
|
7600
|
-
/* harmony default export */ var components_ContextCardvue_type_script_lang_js_ = (ContextCardvue_type_script_lang_js_);
|
|
7601
|
-
// EXTERNAL MODULE: ./src/components/ContextCard.vue?vue&type=style&index=0&id=1221ea8f&prod&scoped=true&lang=scss&
|
|
7602
|
-
var ContextCardvue_type_style_index_0_id_1221ea8f_prod_scoped_true_lang_scss_ = __webpack_require__("77d9");
|
|
7603
|
-
|
|
7604
|
-
// CONCATENATED MODULE: ./src/components/ContextCard.vue
|
|
7605
|
-
|
|
7606
|
-
|
|
7607
|
-
|
|
7608
|
-
|
|
7609
|
-
|
|
7610
|
-
|
|
7611
|
-
/* normalize component */
|
|
7612
|
-
|
|
7613
|
-
var ContextCard_component = normalizeComponent(
|
|
7614
|
-
components_ContextCardvue_type_script_lang_js_,
|
|
7615
|
-
ContextCardvue_type_template_id_1221ea8f_scoped_true_render,
|
|
7616
|
-
ContextCardvue_type_template_id_1221ea8f_scoped_true_staticRenderFns,
|
|
7617
|
-
false,
|
|
7618
|
-
null,
|
|
7619
|
-
"1221ea8f",
|
|
7620
|
-
null
|
|
7621
|
-
|
|
7622
|
-
)
|
|
7623
|
-
|
|
7624
|
-
/* harmony default export */ var ContextCard = (ContextCard_component.exports);
|
|
7625
3957
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SidebarContent.vue?vue&type=script&lang=js&
|
|
7626
3958
|
|
|
7627
3959
|
|
|
@@ -7677,7 +4009,6 @@ var ContextCard_component = normalizeComponent(
|
|
|
7677
4009
|
|
|
7678
4010
|
|
|
7679
4011
|
|
|
7680
|
-
|
|
7681
4012
|
locale_default.a.use(en_default.a);
|
|
7682
4013
|
external_vue_default.a.use(button_default.a);
|
|
7683
4014
|
external_vue_default.a.use(card_default.a);
|
|
@@ -7734,14 +4065,12 @@ var initial_state = {
|
|
|
7734
4065
|
pageModel: 1,
|
|
7735
4066
|
start: 0,
|
|
7736
4067
|
hasSearched: false,
|
|
7737
|
-
contextCardEntry: undefined,
|
|
7738
4068
|
contextCardEnabled: false
|
|
7739
4069
|
};
|
|
7740
4070
|
/* harmony default export */ var SidebarContentvue_type_script_lang_js_ = ({
|
|
7741
4071
|
components: {
|
|
7742
4072
|
SearchFilters: SearchFilters,
|
|
7743
|
-
DatasetCard: DatasetCard
|
|
7744
|
-
ContextCard: ContextCard
|
|
4073
|
+
DatasetCard: DatasetCard
|
|
7745
4074
|
},
|
|
7746
4075
|
name: "SideBarContent",
|
|
7747
4076
|
props: {
|
|
@@ -7784,9 +4113,6 @@ var initial_state = {
|
|
|
7784
4113
|
}
|
|
7785
4114
|
},
|
|
7786
4115
|
methods: {
|
|
7787
|
-
contextCardUpdate: function contextCardUpdate(val) {
|
|
7788
|
-
this.contextCardEntry = val;
|
|
7789
|
-
},
|
|
7790
4116
|
resetSearch: function resetSearch() {
|
|
7791
4117
|
this.numberOfHits = 0;
|
|
7792
4118
|
this.discoverIds = [];
|
|
@@ -8065,8 +4391,8 @@ var initial_state = {
|
|
|
8065
4391
|
});
|
|
8066
4392
|
// CONCATENATED MODULE: ./src/components/SidebarContent.vue?vue&type=script&lang=js&
|
|
8067
4393
|
/* harmony default export */ var components_SidebarContentvue_type_script_lang_js_ = (SidebarContentvue_type_script_lang_js_);
|
|
8068
|
-
// EXTERNAL MODULE: ./src/components/SidebarContent.vue?vue&type=style&index=0&id=
|
|
8069
|
-
var
|
|
4394
|
+
// EXTERNAL MODULE: ./src/components/SidebarContent.vue?vue&type=style&index=0&id=29231cf0&prod&scoped=true&lang=scss&
|
|
4395
|
+
var SidebarContentvue_type_style_index_0_id_29231cf0_prod_scoped_true_lang_scss_ = __webpack_require__("8017");
|
|
8070
4396
|
|
|
8071
4397
|
// CONCATENATED MODULE: ./src/components/SidebarContent.vue
|
|
8072
4398
|
|
|
@@ -8079,11 +4405,11 @@ var SidebarContentvue_type_style_index_0_id_35b8b64a_prod_scoped_true_lang_scss_
|
|
|
8079
4405
|
|
|
8080
4406
|
var SidebarContent_component = normalizeComponent(
|
|
8081
4407
|
components_SidebarContentvue_type_script_lang_js_,
|
|
8082
|
-
|
|
8083
|
-
|
|
4408
|
+
SidebarContentvue_type_template_id_29231cf0_scoped_true_render,
|
|
4409
|
+
SidebarContentvue_type_template_id_29231cf0_scoped_true_staticRenderFns,
|
|
8084
4410
|
false,
|
|
8085
4411
|
null,
|
|
8086
|
-
"
|
|
4412
|
+
"29231cf0",
|
|
8087
4413
|
null
|
|
8088
4414
|
|
|
8089
4415
|
)
|
|
@@ -8302,7 +4628,7 @@ external_vue_default.a.use(icon_default.a);
|
|
|
8302
4628
|
});
|
|
8303
4629
|
components_EventBus.$on('available-facets', function (payLoad) {
|
|
8304
4630
|
_this4.$emit('search-changed', {
|
|
8305
|
-
type: 'available-
|
|
4631
|
+
type: 'available-facets',
|
|
8306
4632
|
value: payLoad
|
|
8307
4633
|
});
|
|
8308
4634
|
});
|
|
@@ -8313,8 +4639,8 @@ external_vue_default.a.use(icon_default.a);
|
|
|
8313
4639
|
});
|
|
8314
4640
|
// CONCATENATED MODULE: ./src/components/SideBar.vue?vue&type=script&lang=js&
|
|
8315
4641
|
/* harmony default export */ var components_SideBarvue_type_script_lang_js_ = (SideBarvue_type_script_lang_js_);
|
|
8316
|
-
// EXTERNAL MODULE: ./src/components/SideBar.vue?vue&type=style&index=0&id=
|
|
8317
|
-
var
|
|
4642
|
+
// EXTERNAL MODULE: ./src/components/SideBar.vue?vue&type=style&index=0&id=589e8b8e&prod&scoped=true&lang=scss&
|
|
4643
|
+
var SideBarvue_type_style_index_0_id_589e8b8e_prod_scoped_true_lang_scss_ = __webpack_require__("ba21");
|
|
8318
4644
|
|
|
8319
4645
|
// CONCATENATED MODULE: ./src/components/SideBar.vue
|
|
8320
4646
|
|
|
@@ -8331,7 +4657,7 @@ var SideBar_component = normalizeComponent(
|
|
|
8331
4657
|
staticRenderFns,
|
|
8332
4658
|
false,
|
|
8333
4659
|
null,
|
|
8334
|
-
"
|
|
4660
|
+
"589e8b8e",
|
|
8335
4661
|
null
|
|
8336
4662
|
|
|
8337
4663
|
)
|