@halo-dev/richtext-editor 0.0.0-alpha.6 → 0.0.0-alpha.7
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/extensions/code-block/code-block.d.ts +2 -0
- package/dist/extensions/code-block/index.d.ts +2 -0
- package/dist/extensions/code-block/lowlight.d.ts +2 -0
- package/dist/extensions/commands-menu/commands.d.ts +3 -0
- package/dist/extensions/commands-menu/index.d.ts +2 -0
- package/dist/extensions/commands-menu/suggestion.d.ts +23 -0
- package/dist/extensions/index.d.ts +35 -0
- package/dist/extensions/katex/index.d.ts +2 -0
- package/dist/index.d.ts +7 -0
- package/dist/rich-text-editor.es.js +2050 -514
- package/dist/rich-text-editor.es.js.map +1 -1
- package/dist/rich-text-editor.iife.js +2049 -513
- package/dist/rich-text-editor.iife.js.map +1 -1
- package/dist/style.css +86 -1117
- package/package.json +45 -45
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, onMounted, onBeforeUnmount, h, reactive, markRaw, getCurrentInstance, watchEffect, nextTick, unref, Teleport, shallowRef, customRef, provide, pushScopeId, popScopeId, openBlock, createBlock, createElementBlock, normalizeClass, renderSlot, normalizeProps, guardReactiveProps, withScopeId, resolveComponent, normalizeStyle, withKeys, createElementVNode, Fragment as Fragment$1, createCommentVNode, withCtx, createVNode, renderList, resolveDynamicComponent, toDisplayString, watch,
|
|
1
|
+
import { defineComponent, ref, onMounted, onBeforeUnmount, h, reactive, markRaw, getCurrentInstance, watchEffect, nextTick, unref, Teleport, shallowRef, customRef, provide, pushScopeId, popScopeId, openBlock, createBlock, createElementBlock, normalizeClass, renderSlot, normalizeProps, guardReactiveProps, withScopeId, resolveComponent, normalizeStyle, withKeys, createElementVNode, Fragment as Fragment$1, createCommentVNode, withCtx, createVNode, renderList, resolveDynamicComponent, toDisplayString, watch, computed, withDirectives, isRef, vModelSelect, withModifiers, vModelText } from "vue";
|
|
2
2
|
function OrderedMap(content) {
|
|
3
3
|
this.content = content;
|
|
4
4
|
}
|
|
@@ -9001,7 +9001,7 @@ const newlineInCode$1 = (state, dispatch) => {
|
|
|
9001
9001
|
dispatch(state.tr.insertText("\n").scrollIntoView());
|
|
9002
9002
|
return true;
|
|
9003
9003
|
};
|
|
9004
|
-
function defaultBlockAt$
|
|
9004
|
+
function defaultBlockAt$1(match) {
|
|
9005
9005
|
for (let i = 0; i < match.edgeCount; i++) {
|
|
9006
9006
|
let { type } = match.edge(i);
|
|
9007
9007
|
if (type.isTextblock && !type.hasRequiredAttrs())
|
|
@@ -9013,7 +9013,7 @@ const exitCode$1 = (state, dispatch) => {
|
|
|
9013
9013
|
let { $head, $anchor } = state.selection;
|
|
9014
9014
|
if (!$head.parent.type.spec.code || !$head.sameParent($anchor))
|
|
9015
9015
|
return false;
|
|
9016
|
-
let above = $head.node(-1), after = $head.indexAfter(-1), type = defaultBlockAt$
|
|
9016
|
+
let above = $head.node(-1), after = $head.indexAfter(-1), type = defaultBlockAt$1(above.contentMatchAt(after));
|
|
9017
9017
|
if (!type || !above.canReplaceWith(after, after, type))
|
|
9018
9018
|
return false;
|
|
9019
9019
|
if (dispatch) {
|
|
@@ -9027,7 +9027,7 @@ const createParagraphNear$1 = (state, dispatch) => {
|
|
|
9027
9027
|
let sel = state.selection, { $from, $to } = sel;
|
|
9028
9028
|
if (sel instanceof AllSelection || $from.parent.inlineContent || $to.parent.inlineContent)
|
|
9029
9029
|
return false;
|
|
9030
|
-
let type = defaultBlockAt$
|
|
9030
|
+
let type = defaultBlockAt$1($to.parent.contentMatchAt($to.indexAfter()));
|
|
9031
9031
|
if (!type || !type.isTextblock)
|
|
9032
9032
|
return false;
|
|
9033
9033
|
if (dispatch) {
|
|
@@ -9386,11 +9386,11 @@ class CommandManager {
|
|
|
9386
9386
|
}
|
|
9387
9387
|
createCan(startTr) {
|
|
9388
9388
|
const { rawCommands, state } = this;
|
|
9389
|
-
const dispatch =
|
|
9389
|
+
const dispatch = false;
|
|
9390
9390
|
const tr = startTr || state.tr;
|
|
9391
9391
|
const props = this.buildProps(tr, dispatch);
|
|
9392
9392
|
const formattedCommands = Object.fromEntries(Object.entries(rawCommands).map(([name, command2]) => {
|
|
9393
|
-
return [name, (...args) => command2(...args)({ ...props, dispatch })];
|
|
9393
|
+
return [name, (...args) => command2(...args)({ ...props, dispatch: void 0 })];
|
|
9394
9394
|
}));
|
|
9395
9395
|
return {
|
|
9396
9396
|
...formattedCommands,
|
|
@@ -10047,7 +10047,7 @@ function pasteRulesPlugin(props) {
|
|
|
10047
10047
|
editor,
|
|
10048
10048
|
state: chainableState,
|
|
10049
10049
|
from: Math.max(from2 - 1, 0),
|
|
10050
|
-
to: to.b,
|
|
10050
|
+
to: to.b - 1,
|
|
10051
10051
|
rule
|
|
10052
10052
|
});
|
|
10053
10053
|
if (!handler || !tr.steps.length) {
|
|
@@ -10192,13 +10192,18 @@ class ExtensionManager {
|
|
|
10192
10192
|
};
|
|
10193
10193
|
const plugins = [];
|
|
10194
10194
|
const addKeyboardShortcuts = getExtensionField(extension, "addKeyboardShortcuts", context);
|
|
10195
|
+
let defaultBindings = {};
|
|
10196
|
+
if (extension.type === "mark" && extension.config.exitable) {
|
|
10197
|
+
defaultBindings.ArrowRight = () => Mark.handleExit({ editor, mark: extension });
|
|
10198
|
+
}
|
|
10195
10199
|
if (addKeyboardShortcuts) {
|
|
10196
10200
|
const bindings = Object.fromEntries(Object.entries(addKeyboardShortcuts()).map(([shortcut, method]) => {
|
|
10197
10201
|
return [shortcut, () => method({ editor })];
|
|
10198
10202
|
}));
|
|
10199
|
-
|
|
10200
|
-
plugins.push(keyMapPlugin);
|
|
10203
|
+
defaultBindings = { ...defaultBindings, ...bindings };
|
|
10201
10204
|
}
|
|
10205
|
+
const keyMapPlugin = keymap(defaultBindings);
|
|
10206
|
+
plugins.push(keyMapPlugin);
|
|
10202
10207
|
const addInputRules = getExtensionField(extension, "addInputRules", context);
|
|
10203
10208
|
if (isExtensionRulesEnabled(extension, editor.options.enableInputRules) && addInputRules) {
|
|
10204
10209
|
inputRules.push(...addInputRules());
|
|
@@ -10573,18 +10578,8 @@ const first = (commands2) => (props) => {
|
|
|
10573
10578
|
}
|
|
10574
10579
|
return false;
|
|
10575
10580
|
};
|
|
10576
|
-
function isClass(value) {
|
|
10577
|
-
var _a;
|
|
10578
|
-
if (((_a = value.constructor) === null || _a === void 0 ? void 0 : _a.toString().substring(0, 5)) !== "class") {
|
|
10579
|
-
return false;
|
|
10580
|
-
}
|
|
10581
|
-
return true;
|
|
10582
|
-
}
|
|
10583
|
-
function isObject(value) {
|
|
10584
|
-
return value && typeof value === "object" && !Array.isArray(value) && !isClass(value);
|
|
10585
|
-
}
|
|
10586
10581
|
function isTextSelection(value) {
|
|
10587
|
-
return
|
|
10582
|
+
return value instanceof TextSelection;
|
|
10588
10583
|
}
|
|
10589
10584
|
function minMax(value = 0, min2 = 0, max2 = 0) {
|
|
10590
10585
|
return Math.min(Math.max(value, min2), max2);
|
|
@@ -11044,10 +11039,8 @@ const setNode = (typeOrName, attributes = {}) => ({ state, dispatch, chain }) =>
|
|
|
11044
11039
|
const setNodeSelection = (position) => ({ tr, dispatch }) => {
|
|
11045
11040
|
if (dispatch) {
|
|
11046
11041
|
const { doc: doc2 } = tr;
|
|
11047
|
-
const
|
|
11048
|
-
const
|
|
11049
|
-
const resolvedPos = minMax(position, minPos, maxPos);
|
|
11050
|
-
const selection = NodeSelection.create(doc2, resolvedPos);
|
|
11042
|
+
const from2 = minMax(position, 0, doc2.content.size);
|
|
11043
|
+
const selection = NodeSelection.create(doc2, from2);
|
|
11051
11044
|
tr.setSelection(selection);
|
|
11052
11045
|
}
|
|
11053
11046
|
return true;
|
|
@@ -11069,6 +11062,15 @@ const sinkListItem = (typeOrName) => ({ state, dispatch }) => {
|
|
|
11069
11062
|
const type = getNodeType(typeOrName, state.schema);
|
|
11070
11063
|
return sinkListItem$1(type)(state, dispatch);
|
|
11071
11064
|
};
|
|
11065
|
+
function defaultBlockAt(match) {
|
|
11066
|
+
for (let i = 0; i < match.edgeCount; i += 1) {
|
|
11067
|
+
const { type } = match.edge(i);
|
|
11068
|
+
if (type.isTextblock && !type.hasRequiredAttrs()) {
|
|
11069
|
+
return type;
|
|
11070
|
+
}
|
|
11071
|
+
}
|
|
11072
|
+
return null;
|
|
11073
|
+
}
|
|
11072
11074
|
function getSplittedAttributes(extensionAttributes, typeName, attributes) {
|
|
11073
11075
|
return Object.fromEntries(Object.entries(attributes).filter(([name]) => {
|
|
11074
11076
|
const extensionAttribute = extensionAttributes.find((item) => {
|
|
@@ -11080,15 +11082,6 @@ function getSplittedAttributes(extensionAttributes, typeName, attributes) {
|
|
|
11080
11082
|
return extensionAttribute.attribute.keepOnSplit;
|
|
11081
11083
|
}));
|
|
11082
11084
|
}
|
|
11083
|
-
function defaultBlockAt$1(match) {
|
|
11084
|
-
for (let i = 0; i < match.edgeCount; i += 1) {
|
|
11085
|
-
const { type } = match.edge(i);
|
|
11086
|
-
if (type.isTextblock && !type.hasRequiredAttrs()) {
|
|
11087
|
-
return type;
|
|
11088
|
-
}
|
|
11089
|
-
}
|
|
11090
|
-
return null;
|
|
11091
|
-
}
|
|
11092
11085
|
function ensureMarks(state, splittableMarks) {
|
|
11093
11086
|
const marks = state.storedMarks || state.selection.$to.parentOffset && state.selection.$from.marks();
|
|
11094
11087
|
if (marks) {
|
|
@@ -11121,7 +11114,7 @@ const splitBlock = ({ keepMarks = true } = {}) => ({ tr, state, dispatch, editor
|
|
|
11121
11114
|
if (selection instanceof TextSelection) {
|
|
11122
11115
|
tr.deleteSelection();
|
|
11123
11116
|
}
|
|
11124
|
-
const deflt3 = $from.depth === 0 ? void 0 : defaultBlockAt
|
|
11117
|
+
const deflt3 = $from.depth === 0 ? void 0 : defaultBlockAt($from.node(-1).contentMatchAt($from.indexAfter(-1)));
|
|
11125
11118
|
let types = atEnd && deflt3 ? [{
|
|
11126
11119
|
type: deflt3,
|
|
11127
11120
|
attrs: newAttributes
|
|
@@ -11940,6 +11933,7 @@ class Editor$1 extends EventEmitter {
|
|
|
11940
11933
|
}
|
|
11941
11934
|
setEditable(editable) {
|
|
11942
11935
|
this.setOptions({ editable });
|
|
11936
|
+
this.emit("update", { editor: this, transaction: this.state.tr });
|
|
11943
11937
|
}
|
|
11944
11938
|
get isEditable() {
|
|
11945
11939
|
return this.options.editable && this.view && this.view.editable;
|
|
@@ -12110,15 +12104,6 @@ function combineTransactionSteps(oldDoc, transactions) {
|
|
|
12110
12104
|
});
|
|
12111
12105
|
return transform;
|
|
12112
12106
|
}
|
|
12113
|
-
function defaultBlockAt(match) {
|
|
12114
|
-
for (let i = 0; i < match.edgeCount; i += 1) {
|
|
12115
|
-
const { type } = match.edge(i);
|
|
12116
|
-
if (type.isTextblock && !type.hasRequiredAttrs()) {
|
|
12117
|
-
return type;
|
|
12118
|
-
}
|
|
12119
|
-
}
|
|
12120
|
-
return null;
|
|
12121
|
-
}
|
|
12122
12107
|
function findChildren(node, predicate) {
|
|
12123
12108
|
const nodesWithPos = [];
|
|
12124
12109
|
node.descendants((child, pos) => {
|
|
@@ -12284,7 +12269,7 @@ function getMarksBetween(from2, to, doc2) {
|
|
|
12284
12269
|
return marks;
|
|
12285
12270
|
}
|
|
12286
12271
|
function isNodeSelection(value) {
|
|
12287
|
-
return
|
|
12272
|
+
return value instanceof NodeSelection;
|
|
12288
12273
|
}
|
|
12289
12274
|
function posToDOMRect(view, from2, to) {
|
|
12290
12275
|
const minPos = 0;
|
|
@@ -12489,6 +12474,26 @@ class Mark {
|
|
|
12489
12474
|
}));
|
|
12490
12475
|
return extension;
|
|
12491
12476
|
}
|
|
12477
|
+
static handleExit({ editor, mark }) {
|
|
12478
|
+
const { tr } = editor.state;
|
|
12479
|
+
const currentPos = editor.state.selection.$from;
|
|
12480
|
+
const isAtEnd = currentPos.pos === currentPos.end();
|
|
12481
|
+
if (isAtEnd) {
|
|
12482
|
+
const currentMarks = currentPos.marks();
|
|
12483
|
+
const isInMark = !!currentMarks.find((m) => (m === null || m === void 0 ? void 0 : m.type.name) === mark.name);
|
|
12484
|
+
if (!isInMark) {
|
|
12485
|
+
return false;
|
|
12486
|
+
}
|
|
12487
|
+
const removeMark2 = currentMarks.find((m) => (m === null || m === void 0 ? void 0 : m.type.name) === mark.name);
|
|
12488
|
+
if (removeMark2) {
|
|
12489
|
+
tr.removeStoredMark(removeMark2);
|
|
12490
|
+
}
|
|
12491
|
+
tr.insertText(" ", currentPos.pos);
|
|
12492
|
+
editor.view.dispatch(tr);
|
|
12493
|
+
return true;
|
|
12494
|
+
}
|
|
12495
|
+
return false;
|
|
12496
|
+
}
|
|
12492
12497
|
}
|
|
12493
12498
|
class Node {
|
|
12494
12499
|
constructor(config2 = {}) {
|
|
@@ -12743,7 +12748,7 @@ function nodePasteRule(config2) {
|
|
|
12743
12748
|
return null;
|
|
12744
12749
|
}
|
|
12745
12750
|
if (match.input) {
|
|
12746
|
-
chain().deleteRange(range).
|
|
12751
|
+
chain().deleteRange(range).insertContentAt(range.from, {
|
|
12747
12752
|
type: config2.type.name,
|
|
12748
12753
|
attrs: attributes
|
|
12749
12754
|
});
|
|
@@ -14669,7 +14674,7 @@ function getChildren(popper2) {
|
|
|
14669
14674
|
})
|
|
14670
14675
|
};
|
|
14671
14676
|
}
|
|
14672
|
-
function render$
|
|
14677
|
+
function render$o(instance) {
|
|
14673
14678
|
var popper2 = div();
|
|
14674
14679
|
var box = div();
|
|
14675
14680
|
box.className = BOX_CLASS;
|
|
@@ -14724,7 +14729,7 @@ function render$p(instance) {
|
|
|
14724
14729
|
onUpdate
|
|
14725
14730
|
};
|
|
14726
14731
|
}
|
|
14727
|
-
render$
|
|
14732
|
+
render$o.$$tippy = true;
|
|
14728
14733
|
var idCounter = 1;
|
|
14729
14734
|
var mouseMoveListeners = [];
|
|
14730
14735
|
var mountedInstances = [];
|
|
@@ -15497,7 +15502,7 @@ Object.assign({}, applyStyles$1, {
|
|
|
15497
15502
|
}
|
|
15498
15503
|
});
|
|
15499
15504
|
tippy.setDefaultProps({
|
|
15500
|
-
render: render$
|
|
15505
|
+
render: render$o
|
|
15501
15506
|
});
|
|
15502
15507
|
class BubbleMenuView {
|
|
15503
15508
|
constructor({ editor, element, view, tippyOptions = {}, shouldShow }) {
|
|
@@ -15506,7 +15511,9 @@ class BubbleMenuView {
|
|
|
15506
15511
|
const { doc: doc2, selection } = state;
|
|
15507
15512
|
const { empty: empty2 } = selection;
|
|
15508
15513
|
const isEmptyTextBlock = !doc2.textBetween(from2, to).length && isTextSelection(state.selection);
|
|
15509
|
-
|
|
15514
|
+
const isChildOfMenu = this.element.contains(document.activeElement);
|
|
15515
|
+
const hasEditorFocus = view2.hasFocus() || isChildOfMenu;
|
|
15516
|
+
if (!hasEditorFocus || empty2 || isEmptyTextBlock || !this.editor.isEditable) {
|
|
15510
15517
|
return false;
|
|
15511
15518
|
}
|
|
15512
15519
|
return true;
|
|
@@ -15660,7 +15667,7 @@ class FloatingMenuView {
|
|
|
15660
15667
|
const { $anchor, empty: empty2 } = selection;
|
|
15661
15668
|
const isRootDepth = $anchor.depth === 1;
|
|
15662
15669
|
const isEmptyTextBlock = $anchor.parent.isTextblock && !$anchor.parent.type.spec.code && !$anchor.parent.textContent;
|
|
15663
|
-
if (!view2.hasFocus() || !empty2 || !isRootDepth || !isEmptyTextBlock) {
|
|
15670
|
+
if (!view2.hasFocus() || !empty2 || !isRootDepth || !isEmptyTextBlock || !this.editor.isEditable) {
|
|
15664
15671
|
return false;
|
|
15665
15672
|
}
|
|
15666
15673
|
return true;
|
|
@@ -16017,7 +16024,7 @@ const NodeViewWrapper = defineComponent({
|
|
|
16017
16024
|
render() {
|
|
16018
16025
|
var _a, _b;
|
|
16019
16026
|
return h(this.as, {
|
|
16020
|
-
class: this.decorationClasses
|
|
16027
|
+
class: this.decorationClasses,
|
|
16021
16028
|
style: {
|
|
16022
16029
|
whiteSpace: "normal"
|
|
16023
16030
|
},
|
|
@@ -17623,6 +17630,10 @@ var PrivatePopper = () => defineComponent({
|
|
|
17623
17630
|
shiftCrossAxis: {
|
|
17624
17631
|
type: Boolean,
|
|
17625
17632
|
default: defaultPropFactory("shiftCrossAxis")
|
|
17633
|
+
},
|
|
17634
|
+
noAutoFocus: {
|
|
17635
|
+
type: Boolean,
|
|
17636
|
+
default: defaultPropFactory("noAutoFocus")
|
|
17626
17637
|
}
|
|
17627
17638
|
},
|
|
17628
17639
|
emits: [
|
|
@@ -18054,7 +18065,8 @@ var PrivatePopper = () => defineComponent({
|
|
|
18054
18065
|
await nextFrame();
|
|
18055
18066
|
this.classes.showFrom = false;
|
|
18056
18067
|
this.classes.showTo = true;
|
|
18057
|
-
this
|
|
18068
|
+
if (!this.noAutoFocus)
|
|
18069
|
+
this.$_popperNode.focus();
|
|
18058
18070
|
},
|
|
18059
18071
|
async $_applyHide(skipTransition = false) {
|
|
18060
18072
|
if (this.shownChildren.size > 0) {
|
|
@@ -18491,10 +18503,10 @@ const _hoisted_1$2$1 = {
|
|
|
18491
18503
|
tabindex: "-1"
|
|
18492
18504
|
};
|
|
18493
18505
|
popScopeId();
|
|
18494
|
-
const render$
|
|
18506
|
+
const render$n = /* @__PURE__ */ _withId((_ctx, _cache, $props, $setup, $data, $options) => {
|
|
18495
18507
|
return openBlock(), createBlock("div", _hoisted_1$2$1);
|
|
18496
18508
|
});
|
|
18497
|
-
script.render = render$
|
|
18509
|
+
script.render = render$n;
|
|
18498
18510
|
script.__scopeId = "data-v-b329ee4c";
|
|
18499
18511
|
script.__file = "src/components/ResizeObserver.vue";
|
|
18500
18512
|
var PrivateThemeClass = (prop = "theme") => ({
|
|
@@ -18541,11 +18553,11 @@ const _hoisted_2$1$1 = {
|
|
|
18541
18553
|
ref: "inner",
|
|
18542
18554
|
class: "v-popper__inner"
|
|
18543
18555
|
};
|
|
18544
|
-
const _hoisted_3$
|
|
18545
|
-
const _hoisted_4$
|
|
18546
|
-
const _hoisted_5$
|
|
18547
|
-
_hoisted_3$
|
|
18548
|
-
_hoisted_4$
|
|
18556
|
+
const _hoisted_3$r = /* @__PURE__ */ createElementVNode("div", { class: "v-popper__arrow-outer" }, null, -1);
|
|
18557
|
+
const _hoisted_4$2 = /* @__PURE__ */ createElementVNode("div", { class: "v-popper__arrow-inner" }, null, -1);
|
|
18558
|
+
const _hoisted_5$2 = [
|
|
18559
|
+
_hoisted_3$r,
|
|
18560
|
+
_hoisted_4$2
|
|
18549
18561
|
];
|
|
18550
18562
|
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
18551
18563
|
const _component_ResizeObserver = resolveComponent("ResizeObserver");
|
|
@@ -18604,7 +18616,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
18604
18616
|
left: _ctx.toPx(_ctx.result.arrow.x),
|
|
18605
18617
|
top: _ctx.toPx(_ctx.result.arrow.y)
|
|
18606
18618
|
} : void 0)
|
|
18607
|
-
}, _hoisted_5$
|
|
18619
|
+
}, _hoisted_5$2, 4)
|
|
18608
18620
|
], 4)
|
|
18609
18621
|
], 46, _hoisted_1$1$1);
|
|
18610
18622
|
}
|
|
@@ -18814,32 +18826,14 @@ defineComponent({
|
|
|
18814
18826
|
}
|
|
18815
18827
|
});
|
|
18816
18828
|
const Menu = _sfc_main$2$1;
|
|
18817
|
-
const _hoisted_1$s = {
|
|
18818
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
18819
|
-
viewBox: "0 0 24 24",
|
|
18820
|
-
width: "1.2em",
|
|
18821
|
-
height: "1.2em"
|
|
18822
|
-
};
|
|
18823
|
-
const _hoisted_2$s = /* @__PURE__ */ createElementVNode("path", {
|
|
18824
|
-
fill: "currentColor",
|
|
18825
|
-
d: "M13.5 15.5H10v-3h3.5A1.5 1.5 0 0 1 15 14a1.5 1.5 0 0 1-1.5 1.5m-3.5-9h3A1.5 1.5 0 0 1 14.5 8A1.5 1.5 0 0 1 13 9.5h-3m5.6 1.29c.97-.68 1.65-1.79 1.65-2.79c0-2.26-1.75-4-4-4H7v14h7.04c2.1 0 3.71-1.7 3.71-3.79c0-1.52-.86-2.82-2.15-3.42Z"
|
|
18826
|
-
}, null, -1);
|
|
18827
|
-
const _hoisted_3$r = [
|
|
18828
|
-
_hoisted_2$s
|
|
18829
|
-
];
|
|
18830
|
-
function render$n(_ctx, _cache) {
|
|
18831
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$s, _hoisted_3$r);
|
|
18832
|
-
}
|
|
18833
|
-
const MdiFormatBold = { name: "mdi-format-bold", render: render$n };
|
|
18834
18829
|
const _hoisted_1$r = {
|
|
18835
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
18836
18830
|
viewBox: "0 0 24 24",
|
|
18837
18831
|
width: "1.2em",
|
|
18838
18832
|
height: "1.2em"
|
|
18839
18833
|
};
|
|
18840
18834
|
const _hoisted_2$r = /* @__PURE__ */ createElementVNode("path", {
|
|
18841
18835
|
fill: "currentColor",
|
|
18842
|
-
d: "
|
|
18836
|
+
d: "M13.5 15.5H10v-3h3.5A1.5 1.5 0 0 1 15 14a1.5 1.5 0 0 1-1.5 1.5m-3.5-9h3A1.5 1.5 0 0 1 14.5 8A1.5 1.5 0 0 1 13 9.5h-3m5.6 1.29c.97-.68 1.65-1.79 1.65-2.79c0-2.26-1.75-4-4-4H7v14h7.04c2.1 0 3.71-1.7 3.71-3.79c0-1.52-.86-2.82-2.15-3.42Z"
|
|
18843
18837
|
}, null, -1);
|
|
18844
18838
|
const _hoisted_3$q = [
|
|
18845
18839
|
_hoisted_2$r
|
|
@@ -18847,16 +18841,15 @@ const _hoisted_3$q = [
|
|
|
18847
18841
|
function render$m(_ctx, _cache) {
|
|
18848
18842
|
return openBlock(), createElementBlock("svg", _hoisted_1$r, _hoisted_3$q);
|
|
18849
18843
|
}
|
|
18850
|
-
const
|
|
18844
|
+
const MdiFormatBold = { name: "mdi-format-bold", render: render$m };
|
|
18851
18845
|
const _hoisted_1$q = {
|
|
18852
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
18853
18846
|
viewBox: "0 0 24 24",
|
|
18854
18847
|
width: "1.2em",
|
|
18855
18848
|
height: "1.2em"
|
|
18856
18849
|
};
|
|
18857
18850
|
const _hoisted_2$q = /* @__PURE__ */ createElementVNode("path", {
|
|
18858
18851
|
fill: "currentColor",
|
|
18859
|
-
d: "
|
|
18852
|
+
d: "M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4h-8Z"
|
|
18860
18853
|
}, null, -1);
|
|
18861
18854
|
const _hoisted_3$p = [
|
|
18862
18855
|
_hoisted_2$q
|
|
@@ -18864,16 +18857,15 @@ const _hoisted_3$p = [
|
|
|
18864
18857
|
function render$l(_ctx, _cache) {
|
|
18865
18858
|
return openBlock(), createElementBlock("svg", _hoisted_1$q, _hoisted_3$p);
|
|
18866
18859
|
}
|
|
18867
|
-
const
|
|
18860
|
+
const MdiFormatItalic = { name: "mdi-format-italic", render: render$l };
|
|
18868
18861
|
const _hoisted_1$p = {
|
|
18869
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
18870
18862
|
viewBox: "0 0 24 24",
|
|
18871
18863
|
width: "1.2em",
|
|
18872
18864
|
height: "1.2em"
|
|
18873
18865
|
};
|
|
18874
18866
|
const _hoisted_2$p = /* @__PURE__ */ createElementVNode("path", {
|
|
18875
18867
|
fill: "currentColor",
|
|
18876
|
-
d: "M3
|
|
18868
|
+
d: "M3 14h18v-2H3m2-8v3h5v3h4V7h5V4m-9 15h4v-3h-4v3Z"
|
|
18877
18869
|
}, null, -1);
|
|
18878
18870
|
const _hoisted_3$o = [
|
|
18879
18871
|
_hoisted_2$p
|
|
@@ -18881,16 +18873,15 @@ const _hoisted_3$o = [
|
|
|
18881
18873
|
function render$k(_ctx, _cache) {
|
|
18882
18874
|
return openBlock(), createElementBlock("svg", _hoisted_1$p, _hoisted_3$o);
|
|
18883
18875
|
}
|
|
18884
|
-
const
|
|
18876
|
+
const MdiFormatStrikethrough = { name: "mdi-format-strikethrough", render: render$k };
|
|
18885
18877
|
const _hoisted_1$o = {
|
|
18886
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
18887
18878
|
viewBox: "0 0 24 24",
|
|
18888
18879
|
width: "1.2em",
|
|
18889
18880
|
height: "1.2em"
|
|
18890
18881
|
};
|
|
18891
18882
|
const _hoisted_2$o = /* @__PURE__ */ createElementVNode("path", {
|
|
18892
18883
|
fill: "currentColor",
|
|
18893
|
-
d: "M3 4h2v6h4V4h2v14H9v-
|
|
18884
|
+
d: "M3 4h2v6h4V4h2v14H9v-6H5v6H3V4m10 4h2.31l.32-3h2l-.32 3h2l.32-3h2l-.32 3H23v2h-1.9l-.2 2H23v2h-2.31l-.32 3h-2l.32-3h-2l-.32 3h-2l.32-3H13v-2h1.9l.2-2H13V8m4.1 2l-.2 2h2l.2-2h-2Z"
|
|
18894
18885
|
}, null, -1);
|
|
18895
18886
|
const _hoisted_3$n = [
|
|
18896
18887
|
_hoisted_2$o
|
|
@@ -18898,16 +18889,15 @@ const _hoisted_3$n = [
|
|
|
18898
18889
|
function render$j(_ctx, _cache) {
|
|
18899
18890
|
return openBlock(), createElementBlock("svg", _hoisted_1$o, _hoisted_3$n);
|
|
18900
18891
|
}
|
|
18901
|
-
const
|
|
18892
|
+
const MdiFormatHeaderPound = { name: "mdi-format-header-pound", render: render$j };
|
|
18902
18893
|
const _hoisted_1$n = {
|
|
18903
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
18904
18894
|
viewBox: "0 0 24 24",
|
|
18905
18895
|
width: "1.2em",
|
|
18906
18896
|
height: "1.2em"
|
|
18907
18897
|
};
|
|
18908
18898
|
const _hoisted_2$n = /* @__PURE__ */ createElementVNode("path", {
|
|
18909
18899
|
fill: "currentColor",
|
|
18910
|
-
d: "M3 4h2v6h4V4h2v14H9v-
|
|
18900
|
+
d: "M3 4h2v6h4V4h2v14H9v-6H5v6H3V4m11 14v-2h2V6.31l-2.5 1.44V5.44L16 4h2v12h2v2h-6Z"
|
|
18911
18901
|
}, null, -1);
|
|
18912
18902
|
const _hoisted_3$m = [
|
|
18913
18903
|
_hoisted_2$n
|
|
@@ -18915,16 +18905,15 @@ const _hoisted_3$m = [
|
|
|
18915
18905
|
function render$i(_ctx, _cache) {
|
|
18916
18906
|
return openBlock(), createElementBlock("svg", _hoisted_1$n, _hoisted_3$m);
|
|
18917
18907
|
}
|
|
18918
|
-
const
|
|
18908
|
+
const MdiFormatHeader1 = { name: "mdi-format-header-1", render: render$i };
|
|
18919
18909
|
const _hoisted_1$m = {
|
|
18920
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
18921
18910
|
viewBox: "0 0 24 24",
|
|
18922
18911
|
width: "1.2em",
|
|
18923
18912
|
height: "1.2em"
|
|
18924
18913
|
};
|
|
18925
18914
|
const _hoisted_2$m = /* @__PURE__ */ createElementVNode("path", {
|
|
18926
18915
|
fill: "currentColor",
|
|
18927
|
-
d: "M3 4h2v6h4V4h2v14H9v-
|
|
18916
|
+
d: "M3 4h2v6h4V4h2v14H9v-6H5v6H3V4m18 14h-6a2 2 0 0 1-2-2c0-.53.2-1 .54-1.36l4.87-5.23c.37-.36.59-.86.59-1.41a2 2 0 0 0-2-2a2 2 0 0 0-2 2h-2a4 4 0 0 1 4-4a4 4 0 0 1 4 4c0 1.1-.45 2.1-1.17 2.83L15 16h6v2Z"
|
|
18928
18917
|
}, null, -1);
|
|
18929
18918
|
const _hoisted_3$l = [
|
|
18930
18919
|
_hoisted_2$m
|
|
@@ -18932,16 +18921,15 @@ const _hoisted_3$l = [
|
|
|
18932
18921
|
function render$h(_ctx, _cache) {
|
|
18933
18922
|
return openBlock(), createElementBlock("svg", _hoisted_1$m, _hoisted_3$l);
|
|
18934
18923
|
}
|
|
18935
|
-
const
|
|
18924
|
+
const MdiFormatHeader2 = { name: "mdi-format-header-2", render: render$h };
|
|
18936
18925
|
const _hoisted_1$l = {
|
|
18937
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
18938
18926
|
viewBox: "0 0 24 24",
|
|
18939
18927
|
width: "1.2em",
|
|
18940
18928
|
height: "1.2em"
|
|
18941
18929
|
};
|
|
18942
18930
|
const _hoisted_2$l = /* @__PURE__ */ createElementVNode("path", {
|
|
18943
18931
|
fill: "currentColor",
|
|
18944
|
-
d: "M3 4h2v6h4V4h2v14H9v-
|
|
18932
|
+
d: "M3 4h2v6h4V4h2v14H9v-6H5v6H3V4m12 0h4a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2v-1h2v1h4v-4h-4v-2h4V6h-4v1h-2V6a2 2 0 0 1 2-2Z"
|
|
18945
18933
|
}, null, -1);
|
|
18946
18934
|
const _hoisted_3$k = [
|
|
18947
18935
|
_hoisted_2$l
|
|
@@ -18949,16 +18937,15 @@ const _hoisted_3$k = [
|
|
|
18949
18937
|
function render$g(_ctx, _cache) {
|
|
18950
18938
|
return openBlock(), createElementBlock("svg", _hoisted_1$l, _hoisted_3$k);
|
|
18951
18939
|
}
|
|
18952
|
-
const
|
|
18940
|
+
const MdiFormatHeader3 = { name: "mdi-format-header-3", render: render$g };
|
|
18953
18941
|
const _hoisted_1$k = {
|
|
18954
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
18955
18942
|
viewBox: "0 0 24 24",
|
|
18956
18943
|
width: "1.2em",
|
|
18957
18944
|
height: "1.2em"
|
|
18958
18945
|
};
|
|
18959
18946
|
const _hoisted_2$k = /* @__PURE__ */ createElementVNode("path", {
|
|
18960
18947
|
fill: "currentColor",
|
|
18961
|
-
d: "M3 4h2v6h4V4h2v14H9v-
|
|
18948
|
+
d: "M3 4h2v6h4V4h2v14H9v-6H5v6H3V4m15 14v-5h-5v-2l5-7h2v7h1v2h-1v5h-2m0-7V7.42L15.45 11H18Z"
|
|
18962
18949
|
}, null, -1);
|
|
18963
18950
|
const _hoisted_3$j = [
|
|
18964
18951
|
_hoisted_2$k
|
|
@@ -18966,16 +18953,15 @@ const _hoisted_3$j = [
|
|
|
18966
18953
|
function render$f(_ctx, _cache) {
|
|
18967
18954
|
return openBlock(), createElementBlock("svg", _hoisted_1$k, _hoisted_3$j);
|
|
18968
18955
|
}
|
|
18969
|
-
const
|
|
18956
|
+
const MdiFormatHeader4 = { name: "mdi-format-header-4", render: render$f };
|
|
18970
18957
|
const _hoisted_1$j = {
|
|
18971
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
18972
18958
|
viewBox: "0 0 24 24",
|
|
18973
18959
|
width: "1.2em",
|
|
18974
18960
|
height: "1.2em"
|
|
18975
18961
|
};
|
|
18976
18962
|
const _hoisted_2$j = /* @__PURE__ */ createElementVNode("path", {
|
|
18977
18963
|
fill: "currentColor",
|
|
18978
|
-
d: "M3 4h2v6h4V4h2v14H9v-6H5v6H3V4m12
|
|
18964
|
+
d: "M3 4h2v6h4V4h2v14H9v-6H5v6H3V4m12 0h5v2h-5v4h2a4 4 0 0 1 4 4a4 4 0 0 1-4 4h-2a2 2 0 0 1-2-2v-1h2v1h2a2 2 0 0 0 2-2a2 2 0 0 0-2-2h-2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Z"
|
|
18979
18965
|
}, null, -1);
|
|
18980
18966
|
const _hoisted_3$i = [
|
|
18981
18967
|
_hoisted_2$j
|
|
@@ -18983,16 +18969,15 @@ const _hoisted_3$i = [
|
|
|
18983
18969
|
function render$e(_ctx, _cache) {
|
|
18984
18970
|
return openBlock(), createElementBlock("svg", _hoisted_1$j, _hoisted_3$i);
|
|
18985
18971
|
}
|
|
18986
|
-
const
|
|
18972
|
+
const MdiFormatHeader5 = { name: "mdi-format-header-5", render: render$e };
|
|
18987
18973
|
const _hoisted_1$i = {
|
|
18988
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
18989
18974
|
viewBox: "0 0 24 24",
|
|
18990
18975
|
width: "1.2em",
|
|
18991
18976
|
height: "1.2em"
|
|
18992
18977
|
};
|
|
18993
18978
|
const _hoisted_2$i = /* @__PURE__ */ createElementVNode("path", {
|
|
18994
18979
|
fill: "currentColor",
|
|
18995
|
-
d: "
|
|
18980
|
+
d: "M3 4h2v6h4V4h2v14H9v-6H5v6H3V4m12 0h4a2 2 0 0 1 2 2v1h-2V6h-4v4h4a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2m0 8v4h4v-4h-4Z"
|
|
18996
18981
|
}, null, -1);
|
|
18997
18982
|
const _hoisted_3$h = [
|
|
18998
18983
|
_hoisted_2$i
|
|
@@ -19000,16 +18985,15 @@ const _hoisted_3$h = [
|
|
|
19000
18985
|
function render$d(_ctx, _cache) {
|
|
19001
18986
|
return openBlock(), createElementBlock("svg", _hoisted_1$i, _hoisted_3$h);
|
|
19002
18987
|
}
|
|
19003
|
-
const
|
|
18988
|
+
const MdiFormatHeader6 = { name: "mdi-format-header-6", render: render$d };
|
|
19004
18989
|
const _hoisted_1$h = {
|
|
19005
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
19006
18990
|
viewBox: "0 0 24 24",
|
|
19007
18991
|
width: "1.2em",
|
|
19008
18992
|
height: "1.2em"
|
|
19009
18993
|
};
|
|
19010
18994
|
const _hoisted_2$h = /* @__PURE__ */ createElementVNode("path", {
|
|
19011
18995
|
fill: "currentColor",
|
|
19012
|
-
d: "
|
|
18996
|
+
d: "M13.5 7a6.5 6.5 0 0 1 6.5 6.5a6.5 6.5 0 0 1-6.5 6.5H10v-2h3.5c2.5 0 4.5-2 4.5-4.5S16 9 13.5 9H7.83l3.08 3.09L9.5 13.5L4 8l5.5-5.5l1.42 1.41L7.83 7h5.67M6 18h2v2H6v-2Z"
|
|
19013
18997
|
}, null, -1);
|
|
19014
18998
|
const _hoisted_3$g = [
|
|
19015
18999
|
_hoisted_2$h
|
|
@@ -19017,16 +19001,15 @@ const _hoisted_3$g = [
|
|
|
19017
19001
|
function render$c(_ctx, _cache) {
|
|
19018
19002
|
return openBlock(), createElementBlock("svg", _hoisted_1$h, _hoisted_3$g);
|
|
19019
19003
|
}
|
|
19020
|
-
const
|
|
19004
|
+
const MdiUndoVariant = { name: "mdi-undo-variant", render: render$c };
|
|
19021
19005
|
const _hoisted_1$g = {
|
|
19022
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
19023
19006
|
viewBox: "0 0 24 24",
|
|
19024
19007
|
width: "1.2em",
|
|
19025
19008
|
height: "1.2em"
|
|
19026
19009
|
};
|
|
19027
19010
|
const _hoisted_2$g = /* @__PURE__ */ createElementVNode("path", {
|
|
19028
19011
|
fill: "currentColor",
|
|
19029
|
-
d: "
|
|
19012
|
+
d: "M10.5 7A6.5 6.5 0 0 0 4 13.5a6.5 6.5 0 0 0 6.5 6.5H14v-2h-3.5C8 18 6 16 6 13.5S8 9 10.5 9h5.67l-3.08 3.09l1.41 1.41L20 8l-5.5-5.5l-1.42 1.41L16.17 7H10.5M18 18h-2v2h2v-2Z"
|
|
19030
19013
|
}, null, -1);
|
|
19031
19014
|
const _hoisted_3$f = [
|
|
19032
19015
|
_hoisted_2$g
|
|
@@ -19034,16 +19017,15 @@ const _hoisted_3$f = [
|
|
|
19034
19017
|
function render$b(_ctx, _cache) {
|
|
19035
19018
|
return openBlock(), createElementBlock("svg", _hoisted_1$g, _hoisted_3$f);
|
|
19036
19019
|
}
|
|
19037
|
-
const
|
|
19020
|
+
const MdiRedoVariant = { name: "mdi-redo-variant", render: render$b };
|
|
19038
19021
|
const _hoisted_1$f = {
|
|
19039
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
19040
19022
|
viewBox: "0 0 24 24",
|
|
19041
19023
|
width: "1.2em",
|
|
19042
19024
|
height: "1.2em"
|
|
19043
19025
|
};
|
|
19044
19026
|
const _hoisted_2$f = /* @__PURE__ */ createElementVNode("path", {
|
|
19045
19027
|
fill: "currentColor",
|
|
19046
|
-
d: "
|
|
19028
|
+
d: "M5 21h14v-2H5v2m7-4a6 6 0 0 0 6-6V3h-2.5v8a3.5 3.5 0 0 1-3.5 3.5A3.5 3.5 0 0 1 8.5 11V3H6v8a6 6 0 0 0 6 6Z"
|
|
19047
19029
|
}, null, -1);
|
|
19048
19030
|
const _hoisted_3$e = [
|
|
19049
19031
|
_hoisted_2$f
|
|
@@ -19051,16 +19033,15 @@ const _hoisted_3$e = [
|
|
|
19051
19033
|
function render$a(_ctx, _cache) {
|
|
19052
19034
|
return openBlock(), createElementBlock("svg", _hoisted_1$f, _hoisted_3$e);
|
|
19053
19035
|
}
|
|
19054
|
-
const
|
|
19036
|
+
const MdiFormatUnderline = { name: "mdi-format-underline", render: render$a };
|
|
19055
19037
|
const _hoisted_1$e = {
|
|
19056
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
19057
19038
|
viewBox: "0 0 24 24",
|
|
19058
19039
|
width: "1.2em",
|
|
19059
19040
|
height: "1.2em"
|
|
19060
19041
|
};
|
|
19061
19042
|
const _hoisted_2$e = /* @__PURE__ */ createElementVNode("path", {
|
|
19062
19043
|
fill: "currentColor",
|
|
19063
|
-
d: "M3
|
|
19044
|
+
d: "M3 3h18v2H3V3m0 4h12v2H3V7m0 4h18v2H3v-2m0 4h12v2H3v-2m0 4h18v2H3v-2Z"
|
|
19064
19045
|
}, null, -1);
|
|
19065
19046
|
const _hoisted_3$d = [
|
|
19066
19047
|
_hoisted_2$e
|
|
@@ -19068,16 +19049,15 @@ const _hoisted_3$d = [
|
|
|
19068
19049
|
function render$9(_ctx, _cache) {
|
|
19069
19050
|
return openBlock(), createElementBlock("svg", _hoisted_1$e, _hoisted_3$d);
|
|
19070
19051
|
}
|
|
19071
|
-
const
|
|
19052
|
+
const MdiFormatAlignLeft = { name: "mdi-format-align-left", render: render$9 };
|
|
19072
19053
|
const _hoisted_1$d = {
|
|
19073
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
19074
19054
|
viewBox: "0 0 24 24",
|
|
19075
19055
|
width: "1.2em",
|
|
19076
19056
|
height: "1.2em"
|
|
19077
19057
|
};
|
|
19078
19058
|
const _hoisted_2$d = /* @__PURE__ */ createElementVNode("path", {
|
|
19079
19059
|
fill: "currentColor",
|
|
19080
|
-
d: "M3
|
|
19060
|
+
d: "M3 3h18v2H3V3m4 4h10v2H7V7m-4 4h18v2H3v-2m4 4h10v2H7v-2m-4 4h18v2H3v-2Z"
|
|
19081
19061
|
}, null, -1);
|
|
19082
19062
|
const _hoisted_3$c = [
|
|
19083
19063
|
_hoisted_2$d
|
|
@@ -19085,16 +19065,15 @@ const _hoisted_3$c = [
|
|
|
19085
19065
|
function render$8(_ctx, _cache) {
|
|
19086
19066
|
return openBlock(), createElementBlock("svg", _hoisted_1$d, _hoisted_3$c);
|
|
19087
19067
|
}
|
|
19088
|
-
const
|
|
19068
|
+
const MdiFormatAlignCenter = { name: "mdi-format-align-center", render: render$8 };
|
|
19089
19069
|
const _hoisted_1$c = {
|
|
19090
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
19091
19070
|
viewBox: "0 0 24 24",
|
|
19092
19071
|
width: "1.2em",
|
|
19093
19072
|
height: "1.2em"
|
|
19094
19073
|
};
|
|
19095
19074
|
const _hoisted_2$c = /* @__PURE__ */ createElementVNode("path", {
|
|
19096
19075
|
fill: "currentColor",
|
|
19097
|
-
d: "M3
|
|
19076
|
+
d: "M3 3h18v2H3V3m6 4h12v2H9V7m-6 4h18v2H3v-2m6 4h12v2H9v-2m-6 4h18v2H3v-2Z"
|
|
19098
19077
|
}, null, -1);
|
|
19099
19078
|
const _hoisted_3$b = [
|
|
19100
19079
|
_hoisted_2$c
|
|
@@ -19102,16 +19081,15 @@ const _hoisted_3$b = [
|
|
|
19102
19081
|
function render$7(_ctx, _cache) {
|
|
19103
19082
|
return openBlock(), createElementBlock("svg", _hoisted_1$c, _hoisted_3$b);
|
|
19104
19083
|
}
|
|
19105
|
-
const
|
|
19084
|
+
const MdiFormatAlignRight = { name: "mdi-format-align-right", render: render$7 };
|
|
19106
19085
|
const _hoisted_1$b = {
|
|
19107
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
19108
19086
|
viewBox: "0 0 24 24",
|
|
19109
19087
|
width: "1.2em",
|
|
19110
19088
|
height: "1.2em"
|
|
19111
19089
|
};
|
|
19112
19090
|
const _hoisted_2$b = /* @__PURE__ */ createElementVNode("path", {
|
|
19113
19091
|
fill: "currentColor",
|
|
19114
|
-
d: "
|
|
19092
|
+
d: "M3 3h18v2H3V3m0 4h18v2H3V7m0 4h18v2H3v-2m0 4h18v2H3v-2m0 4h18v2H3v-2Z"
|
|
19115
19093
|
}, null, -1);
|
|
19116
19094
|
const _hoisted_3$a = [
|
|
19117
19095
|
_hoisted_2$b
|
|
@@ -19119,16 +19097,15 @@ const _hoisted_3$a = [
|
|
|
19119
19097
|
function render$6(_ctx, _cache) {
|
|
19120
19098
|
return openBlock(), createElementBlock("svg", _hoisted_1$b, _hoisted_3$a);
|
|
19121
19099
|
}
|
|
19122
|
-
const
|
|
19100
|
+
const MdiFormatAlignJustify = { name: "mdi-format-align-justify", render: render$6 };
|
|
19123
19101
|
const _hoisted_1$a = {
|
|
19124
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
19125
19102
|
viewBox: "0 0 24 24",
|
|
19126
19103
|
width: "1.2em",
|
|
19127
19104
|
height: "1.2em"
|
|
19128
19105
|
};
|
|
19129
19106
|
const _hoisted_2$a = /* @__PURE__ */ createElementVNode("path", {
|
|
19130
19107
|
fill: "currentColor",
|
|
19131
|
-
d: "
|
|
19108
|
+
d: "m10 7l-2 4h3v6H5v-6l2-4h3m8 0l-2 4h3v6h-6v-6l2-4h3Z"
|
|
19132
19109
|
}, null, -1);
|
|
19133
19110
|
const _hoisted_3$9 = [
|
|
19134
19111
|
_hoisted_2$a
|
|
@@ -19136,16 +19113,15 @@ const _hoisted_3$9 = [
|
|
|
19136
19113
|
function render$5(_ctx, _cache) {
|
|
19137
19114
|
return openBlock(), createElementBlock("svg", _hoisted_1$a, _hoisted_3$9);
|
|
19138
19115
|
}
|
|
19139
|
-
const
|
|
19116
|
+
const MdiFormatQuoteOpen = { name: "mdi-format-quote-open", render: render$5 };
|
|
19140
19117
|
const _hoisted_1$9 = {
|
|
19141
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
19142
19118
|
viewBox: "0 0 24 24",
|
|
19143
19119
|
width: "1.2em",
|
|
19144
19120
|
height: "1.2em"
|
|
19145
19121
|
};
|
|
19146
19122
|
const _hoisted_2$9 = /* @__PURE__ */ createElementVNode("path", {
|
|
19147
19123
|
fill: "currentColor",
|
|
19148
|
-
d: "
|
|
19124
|
+
d: "m14.6 16.6l4.6-4.6l-4.6-4.6L16 6l6 6l-6 6l-1.4-1.4m-5.2 0L4.8 12l4.6-4.6L8 6l-6 6l6 6l1.4-1.4Z"
|
|
19149
19125
|
}, null, -1);
|
|
19150
19126
|
const _hoisted_3$8 = [
|
|
19151
19127
|
_hoisted_2$9
|
|
@@ -19153,16 +19129,15 @@ const _hoisted_3$8 = [
|
|
|
19153
19129
|
function render$4(_ctx, _cache) {
|
|
19154
19130
|
return openBlock(), createElementBlock("svg", _hoisted_1$9, _hoisted_3$8);
|
|
19155
19131
|
}
|
|
19156
|
-
const
|
|
19132
|
+
const MdiCodeTags = { name: "mdi-code-tags", render: render$4 };
|
|
19157
19133
|
const _hoisted_1$8 = {
|
|
19158
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
19159
19134
|
viewBox: "0 0 24 24",
|
|
19160
19135
|
width: "1.2em",
|
|
19161
19136
|
height: "1.2em"
|
|
19162
19137
|
};
|
|
19163
19138
|
const _hoisted_2$8 = /* @__PURE__ */ createElementVNode("path", {
|
|
19164
19139
|
fill: "currentColor",
|
|
19165
|
-
d: "
|
|
19140
|
+
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-8 5H9v2c0 1.1-.9 2-2 2c1.1 0 2 .9 2 2v2h2v2H9c-1.1 0-2-.9-2-2v-1c0-1.1-.9-2-2-2v-2c1.1 0 2-.9 2-2V8c0-1.1.9-2 2-2h2v2m8 5c-1.1 0-2 .9-2 2v1c0 1.1-.9 2-2 2h-2v-2h2v-2c0-1.1.9-2 2-2c-1.1 0-2-.9-2-2V8h-2V6h2c1.1 0 2 .9 2 2v1c0 1.1.9 2 2 2v2Z"
|
|
19166
19141
|
}, null, -1);
|
|
19167
19142
|
const _hoisted_3$7 = [
|
|
19168
19143
|
_hoisted_2$8
|
|
@@ -19170,9 +19145,8 @@ const _hoisted_3$7 = [
|
|
|
19170
19145
|
function render$3(_ctx, _cache) {
|
|
19171
19146
|
return openBlock(), createElementBlock("svg", _hoisted_1$8, _hoisted_3$7);
|
|
19172
19147
|
}
|
|
19173
|
-
const
|
|
19148
|
+
const MdiCodeBracesBox = { name: "mdi-code-braces-box", render: render$3 };
|
|
19174
19149
|
const _hoisted_1$7 = {
|
|
19175
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
19176
19150
|
viewBox: "0 0 24 24",
|
|
19177
19151
|
width: "1.2em",
|
|
19178
19152
|
height: "1.2em"
|
|
@@ -19189,7 +19163,6 @@ function render$2(_ctx, _cache) {
|
|
|
19189
19163
|
}
|
|
19190
19164
|
const MdiFormatSuperscript = { name: "mdi-format-superscript", render: render$2 };
|
|
19191
19165
|
const _hoisted_1$6 = {
|
|
19192
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
19193
19166
|
viewBox: "0 0 24 24",
|
|
19194
19167
|
width: "1.2em",
|
|
19195
19168
|
height: "1.2em"
|
|
@@ -19208,14 +19181,19 @@ const MdiFormatSubscript = { name: "mdi-format-subscript", render: render$1 };
|
|
|
19208
19181
|
const _hoisted_1$5 = { class: "editor-header flex items-center py-1 space-x-0.5 justify-center border-b drop-shadow-sm bg-white" };
|
|
19209
19182
|
const _hoisted_2$5 = ["onClick"];
|
|
19210
19183
|
const _hoisted_3$4 = { class: "w-24 flex flex-col" };
|
|
19211
|
-
const _hoisted_4 = ["onClick"];
|
|
19212
|
-
const _hoisted_5 = { class: "text-sm" };
|
|
19184
|
+
const _hoisted_4$1 = ["onClick"];
|
|
19185
|
+
const _hoisted_5$1 = { class: "text-sm" };
|
|
19213
19186
|
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
19214
19187
|
__name: "EditorHeader",
|
|
19215
19188
|
props: {
|
|
19216
19189
|
editor: {
|
|
19217
19190
|
type: Object,
|
|
19218
19191
|
required: true
|
|
19192
|
+
},
|
|
19193
|
+
addtionalMenuItems: {
|
|
19194
|
+
type: Array,
|
|
19195
|
+
required: false,
|
|
19196
|
+
default: () => []
|
|
19219
19197
|
}
|
|
19220
19198
|
},
|
|
19221
19199
|
setup(__props) {
|
|
@@ -19298,13 +19276,6 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
19298
19276
|
action: () => props.editor.chain().focus().toggleCodeBlock().run(),
|
|
19299
19277
|
isActive: () => props.editor.isActive("codeBlock")
|
|
19300
19278
|
},
|
|
19301
|
-
{
|
|
19302
|
-
type: "button",
|
|
19303
|
-
icon: MdiMathCompass,
|
|
19304
|
-
title: "Math",
|
|
19305
|
-
action: () => props.editor.chain().addKatex().run(),
|
|
19306
|
-
isActive: () => props.editor.isActive("katexBlock")
|
|
19307
|
-
},
|
|
19308
19279
|
{
|
|
19309
19280
|
type: "button",
|
|
19310
19281
|
icon: MdiFormatHeaderPound,
|
|
@@ -19382,19 +19353,20 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
19382
19353
|
title: "Align justify",
|
|
19383
19354
|
action: () => props.editor.chain().focus().setTextAlign("justify").run(),
|
|
19384
19355
|
isActive: () => props.editor.isActive({ textAlign: "justify" })
|
|
19385
|
-
}
|
|
19356
|
+
},
|
|
19357
|
+
...props.addtionalMenuItems
|
|
19386
19358
|
];
|
|
19387
19359
|
return (_ctx, _cache) => {
|
|
19388
19360
|
return openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
19389
19361
|
(openBlock(), createElementBlock(Fragment$1, null, renderList(menuItems, (menuItem, index2) => {
|
|
19390
|
-
var _a;
|
|
19362
|
+
var _a, _b;
|
|
19391
19363
|
return createElementVNode("div", {
|
|
19392
19364
|
key: index2,
|
|
19393
19365
|
class: "inline-flex items-center justify-center"
|
|
19394
19366
|
}, [
|
|
19395
19367
|
!((_a = menuItem.children) == null ? void 0 : _a.length) ? (openBlock(), createElementBlock("button", {
|
|
19396
19368
|
key: 0,
|
|
19397
|
-
class: normalizeClass([{ "bg-gray-200": menuItem.isActive() }, "hover:bg-gray-100 p-1 rounded-sm"]),
|
|
19369
|
+
class: normalizeClass([{ "bg-gray-200": (_b = menuItem.isActive) == null ? void 0 : _b.call(menuItem) }, "hover:bg-gray-100 p-1 rounded-sm"]),
|
|
19398
19370
|
onClick: menuItem.action
|
|
19399
19371
|
}, [
|
|
19400
19372
|
(openBlock(), createBlock(resolveDynamicComponent(menuItem.icon)))
|
|
@@ -19402,28 +19374,32 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
19402
19374
|
popper: withCtx(() => [
|
|
19403
19375
|
createElementVNode("div", _hoisted_3$4, [
|
|
19404
19376
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(menuItem.children, (child, childIndex) => {
|
|
19377
|
+
var _a2;
|
|
19405
19378
|
return openBlock(), createElementBlock("div", {
|
|
19406
19379
|
key: childIndex,
|
|
19407
|
-
class: normalizeClass([{ "bg-gray-200": child.isActive() }, "p-1 hover:bg-gray-100"])
|
|
19380
|
+
class: normalizeClass([{ "bg-gray-200": (_a2 = child.isActive) == null ? void 0 : _a2.call(child) }, "p-1 hover:bg-gray-100"])
|
|
19408
19381
|
}, [
|
|
19409
19382
|
createElementVNode("button", {
|
|
19410
19383
|
class: "flex flex-row gap-2 items-center justify-center",
|
|
19411
19384
|
onClick: child.action
|
|
19412
19385
|
}, [
|
|
19413
19386
|
(openBlock(), createBlock(resolveDynamicComponent(child.icon))),
|
|
19414
|
-
createElementVNode("span", _hoisted_5, toDisplayString(child.title), 1)
|
|
19415
|
-
], 8, _hoisted_4)
|
|
19387
|
+
createElementVNode("span", _hoisted_5$1, toDisplayString(child.title), 1)
|
|
19388
|
+
], 8, _hoisted_4$1)
|
|
19416
19389
|
], 2);
|
|
19417
19390
|
}), 128))
|
|
19418
19391
|
])
|
|
19419
19392
|
]),
|
|
19420
|
-
default: withCtx(() =>
|
|
19421
|
-
|
|
19422
|
-
|
|
19423
|
-
|
|
19424
|
-
|
|
19425
|
-
|
|
19426
|
-
|
|
19393
|
+
default: withCtx(() => {
|
|
19394
|
+
var _a2;
|
|
19395
|
+
return [
|
|
19396
|
+
createElementVNode("button", {
|
|
19397
|
+
class: normalizeClass([{ "bg-gray-200": (_a2 = menuItem.isActive) == null ? void 0 : _a2.call(menuItem) }, "hover:bg-gray-100 p-1 rounded-sm"])
|
|
19398
|
+
}, [
|
|
19399
|
+
(openBlock(), createBlock(resolveDynamicComponent(menuItem.icon)))
|
|
19400
|
+
], 2)
|
|
19401
|
+
];
|
|
19402
|
+
}),
|
|
19427
19403
|
_: 2
|
|
19428
19404
|
}, 1024))
|
|
19429
19405
|
]);
|
|
@@ -19546,11 +19522,15 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
19546
19522
|
default: withCtx(() => [
|
|
19547
19523
|
createElementVNode("div", _hoisted_1$4, [
|
|
19548
19524
|
(openBlock(), createElementBlock(Fragment$1, null, renderList(menuItems, (menuItem, index2) => {
|
|
19525
|
+
var _a;
|
|
19549
19526
|
return createElementVNode("button", {
|
|
19550
19527
|
key: index2,
|
|
19551
|
-
class: normalizeClass([{ "bg-gray-200 !text-black": menuItem.isActive() }, "text-gray-600 text-lg hover:bg-gray-100 p-0.5 rounded-sm"]),
|
|
19528
|
+
class: normalizeClass([{ "bg-gray-200 !text-black": (_a = menuItem.isActive) == null ? void 0 : _a.call(menuItem) }, "text-gray-600 text-lg hover:bg-gray-100 p-0.5 rounded-sm"]),
|
|
19552
19529
|
title: menuItem.title,
|
|
19553
|
-
onClick: ($event) =>
|
|
19530
|
+
onClick: ($event) => {
|
|
19531
|
+
var _a2;
|
|
19532
|
+
return (_a2 = menuItem.action) == null ? void 0 : _a2.call(menuItem);
|
|
19533
|
+
}
|
|
19554
19534
|
}, [
|
|
19555
19535
|
(openBlock(), createBlock(resolveDynamicComponent(menuItem.icon)))
|
|
19556
19536
|
], 10, _hoisted_2$4);
|
|
@@ -19574,13 +19554,21 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
19574
19554
|
editor: {
|
|
19575
19555
|
type: Object,
|
|
19576
19556
|
required: true
|
|
19557
|
+
},
|
|
19558
|
+
addtionalMenuItems: {
|
|
19559
|
+
type: Array,
|
|
19560
|
+
required: false,
|
|
19561
|
+
default: () => []
|
|
19577
19562
|
}
|
|
19578
19563
|
},
|
|
19579
19564
|
setup(__props) {
|
|
19580
19565
|
return (_ctx, _cache) => {
|
|
19581
19566
|
return __props.editor ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
19582
19567
|
createVNode(_sfc_main$4, { editor: __props.editor }, null, 8, ["editor"]),
|
|
19583
|
-
createVNode(_sfc_main$5, {
|
|
19568
|
+
createVNode(_sfc_main$5, {
|
|
19569
|
+
editor: __props.editor,
|
|
19570
|
+
addtionalMenuItems: __props.addtionalMenuItems
|
|
19571
|
+
}, null, 8, ["editor", "addtionalMenuItems"]),
|
|
19584
19572
|
createElementVNode("div", _hoisted_2$3, [
|
|
19585
19573
|
createVNode(unref(EditorContent), {
|
|
19586
19574
|
editor: __props.editor,
|
|
@@ -19597,7 +19585,6 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
19597
19585
|
const index = "";
|
|
19598
19586
|
const tailwind = "";
|
|
19599
19587
|
const style = "";
|
|
19600
|
-
const katex$1 = "";
|
|
19601
19588
|
const githubMarkdownLight = "";
|
|
19602
19589
|
const inputRegex$6 = /^\s*>\s$/;
|
|
19603
19590
|
const Blockquote = Node.create({
|
|
@@ -19771,6 +19758,7 @@ const Code = Mark.create({
|
|
|
19771
19758
|
},
|
|
19772
19759
|
excludes: "_",
|
|
19773
19760
|
code: true,
|
|
19761
|
+
exitable: true,
|
|
19774
19762
|
parseHTML() {
|
|
19775
19763
|
return [
|
|
19776
19764
|
{ tag: "code" }
|
|
@@ -23884,7 +23872,7 @@ function parserCreateMultiToken(Multi, input, tokens) {
|
|
|
23884
23872
|
var value = input.substr(startIdx, endIdx - startIdx);
|
|
23885
23873
|
return new Multi(value, tokens);
|
|
23886
23874
|
}
|
|
23887
|
-
var warn$
|
|
23875
|
+
var warn$2 = typeof console !== "undefined" && console && console.warn || function() {
|
|
23888
23876
|
};
|
|
23889
23877
|
var INIT = {
|
|
23890
23878
|
scanner: null,
|
|
@@ -23895,7 +23883,7 @@ var INIT = {
|
|
|
23895
23883
|
};
|
|
23896
23884
|
function registerCustomProtocol(protocol) {
|
|
23897
23885
|
if (INIT.initialized) {
|
|
23898
|
-
warn$
|
|
23886
|
+
warn$2('linkifyjs: already initialized - will not register custom protocol "'.concat(protocol, '" until you manually call linkify.init(). To avoid this warning, please register all custom protocols before invoking linkify the first time.'));
|
|
23899
23887
|
}
|
|
23900
23888
|
if (!/^[a-z-]+$/.test(protocol)) {
|
|
23901
23889
|
throw Error("linkifyjs: protocols containing characters other than a-z or - (hyphen) are not supported");
|
|
@@ -26690,7 +26678,7 @@ function Suggestion({ pluginKey = SuggestionPluginKey, editor, char = "@", allow
|
|
|
26690
26678
|
return;
|
|
26691
26679
|
}
|
|
26692
26680
|
const state = handleExit && !handleStart ? prev : next;
|
|
26693
|
-
const decorationNode =
|
|
26681
|
+
const decorationNode = view.dom.querySelector(`[data-decoration-id="${state.decorationId}"]`);
|
|
26694
26682
|
props = {
|
|
26695
26683
|
editor,
|
|
26696
26684
|
range: state.range,
|
|
@@ -26708,7 +26696,7 @@ function Suggestion({ pluginKey = SuggestionPluginKey, editor, char = "@", allow
|
|
|
26708
26696
|
clientRect: decorationNode ? () => {
|
|
26709
26697
|
var _a2;
|
|
26710
26698
|
const { decorationId } = (_a2 = this.key) === null || _a2 === void 0 ? void 0 : _a2.getState(editor.state);
|
|
26711
|
-
const currentDecorationNode =
|
|
26699
|
+
const currentDecorationNode = view.dom.querySelector(`[data-decoration-id="${decorationId}"]`);
|
|
26712
26700
|
return (currentDecorationNode === null || currentDecorationNode === void 0 ? void 0 : currentDecorationNode.getBoundingClientRect()) || null;
|
|
26713
26701
|
} : null
|
|
26714
26702
|
};
|
|
@@ -26848,12 +26836,17 @@ const ExtensionCommands = Extension.create({
|
|
|
26848
26836
|
];
|
|
26849
26837
|
}
|
|
26850
26838
|
});
|
|
26851
|
-
const _hoisted_1$2 = { class: "items" };
|
|
26839
|
+
const _hoisted_1$2 = { class: "command-items" };
|
|
26852
26840
|
const _hoisted_2$2 = ["onClick"];
|
|
26853
|
-
const _hoisted_3$2 = {
|
|
26841
|
+
const _hoisted_3$2 = { class: "command-title" };
|
|
26842
|
+
const _hoisted_4 = {
|
|
26854
26843
|
key: 1,
|
|
26855
|
-
class: "
|
|
26844
|
+
class: "command-empty"
|
|
26856
26845
|
};
|
|
26846
|
+
const _hoisted_5 = /* @__PURE__ */ createElementVNode("span", null, "\u6CA1\u6709\u641C\u7D22\u7ED3\u679C", -1);
|
|
26847
|
+
const _hoisted_6 = [
|
|
26848
|
+
_hoisted_5
|
|
26849
|
+
];
|
|
26857
26850
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
26858
26851
|
__name: "CommandsView",
|
|
26859
26852
|
props: {
|
|
@@ -26911,15 +26904,15 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
26911
26904
|
return (_ctx, _cache) => {
|
|
26912
26905
|
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
26913
26906
|
__props.items.length ? (openBlock(true), createElementBlock(Fragment$1, { key: 0 }, renderList(__props.items, (item, index2) => {
|
|
26914
|
-
return openBlock(), createElementBlock("
|
|
26907
|
+
return openBlock(), createElementBlock("div", {
|
|
26915
26908
|
key: index2,
|
|
26916
|
-
class: normalizeClass([{ "is-selected": index2 === selectedIndex.value }, "item
|
|
26909
|
+
class: normalizeClass([{ "is-selected": index2 === selectedIndex.value }, "command-item"]),
|
|
26917
26910
|
onClick: ($event) => handleSelectItem(index2)
|
|
26918
26911
|
}, [
|
|
26919
|
-
(openBlock(), createBlock(resolveDynamicComponent(item.icon), { class: "
|
|
26920
|
-
|
|
26912
|
+
(openBlock(), createBlock(resolveDynamicComponent(item.icon), { class: "command-icon" })),
|
|
26913
|
+
createElementVNode("span", _hoisted_3$2, toDisplayString(item.title), 1)
|
|
26921
26914
|
], 10, _hoisted_2$2);
|
|
26922
|
-
}), 128)) : (openBlock(), createElementBlock("div",
|
|
26915
|
+
}), 128)) : (openBlock(), createElementBlock("div", _hoisted_4, _hoisted_6))
|
|
26923
26916
|
]);
|
|
26924
26917
|
};
|
|
26925
26918
|
}
|
|
@@ -26929,7 +26922,7 @@ const CommandsSuggestion = {
|
|
|
26929
26922
|
items: ({ query }) => {
|
|
26930
26923
|
return [
|
|
26931
26924
|
{
|
|
26932
|
-
icon: MdiFormatHeader1,
|
|
26925
|
+
icon: markRaw(MdiFormatHeader1),
|
|
26933
26926
|
title: "\u4E00\u7EA7\u6807\u9898",
|
|
26934
26927
|
keywords: ["h1", "header1", "1", "yijibiaoti"],
|
|
26935
26928
|
command: ({ editor, range }) => {
|
|
@@ -26937,7 +26930,7 @@ const CommandsSuggestion = {
|
|
|
26937
26930
|
}
|
|
26938
26931
|
},
|
|
26939
26932
|
{
|
|
26940
|
-
icon: MdiFormatHeader2,
|
|
26933
|
+
icon: markRaw(MdiFormatHeader2),
|
|
26941
26934
|
title: "\u4E8C\u7EA7\u6807\u9898",
|
|
26942
26935
|
keywords: ["h2", "header2", "2", "erjibiaoti"],
|
|
26943
26936
|
command: ({ editor, range }) => {
|
|
@@ -26945,7 +26938,7 @@ const CommandsSuggestion = {
|
|
|
26945
26938
|
}
|
|
26946
26939
|
},
|
|
26947
26940
|
{
|
|
26948
|
-
icon: MdiFormatHeader3,
|
|
26941
|
+
icon: markRaw(MdiFormatHeader3),
|
|
26949
26942
|
title: "\u4E09\u7EA7\u6807\u9898",
|
|
26950
26943
|
keywords: ["h3", "header3", "3", "sanjibiaoti"],
|
|
26951
26944
|
command: ({ editor, range }) => {
|
|
@@ -26953,7 +26946,7 @@ const CommandsSuggestion = {
|
|
|
26953
26946
|
}
|
|
26954
26947
|
},
|
|
26955
26948
|
{
|
|
26956
|
-
icon: MdiFormatHeader4,
|
|
26949
|
+
icon: markRaw(MdiFormatHeader4),
|
|
26957
26950
|
title: "\u56DB\u7EA7\u6807\u9898",
|
|
26958
26951
|
keywords: ["h4", "header4", "4", "sijibiaoti"],
|
|
26959
26952
|
command: ({ editor, range }) => {
|
|
@@ -26961,7 +26954,7 @@ const CommandsSuggestion = {
|
|
|
26961
26954
|
}
|
|
26962
26955
|
},
|
|
26963
26956
|
{
|
|
26964
|
-
icon: MdiFormatHeader5,
|
|
26957
|
+
icon: markRaw(MdiFormatHeader5),
|
|
26965
26958
|
title: "\u4E94\u7EA7\u6807\u9898",
|
|
26966
26959
|
keywords: ["h5", "header5", "5", "wujibiaoti"],
|
|
26967
26960
|
command: ({ editor, range }) => {
|
|
@@ -26969,7 +26962,7 @@ const CommandsSuggestion = {
|
|
|
26969
26962
|
}
|
|
26970
26963
|
},
|
|
26971
26964
|
{
|
|
26972
|
-
icon: MdiFormatHeader6,
|
|
26965
|
+
icon: markRaw(MdiFormatHeader6),
|
|
26973
26966
|
title: "\u516D\u7EA7\u6807\u9898",
|
|
26974
26967
|
keywords: ["h6", "header6", "6", "liujibiaoti"],
|
|
26975
26968
|
command: ({ editor, range }) => {
|
|
@@ -26977,19 +26970,11 @@ const CommandsSuggestion = {
|
|
|
26977
26970
|
}
|
|
26978
26971
|
},
|
|
26979
26972
|
{
|
|
26980
|
-
icon: MdiCodeBracesBox,
|
|
26973
|
+
icon: markRaw(MdiCodeBracesBox),
|
|
26981
26974
|
title: "\u4EE3\u7801\u5757",
|
|
26982
26975
|
keywords: ["codeblock", "daimakuai"],
|
|
26983
26976
|
command: ({ editor, range }) => {
|
|
26984
|
-
editor.chain().focus().deleteRange(range).
|
|
26985
|
-
}
|
|
26986
|
-
},
|
|
26987
|
-
{
|
|
26988
|
-
icon: MdiMathCompass,
|
|
26989
|
-
title: "\u6570\u5B66\u516C\u5F0F",
|
|
26990
|
-
keywords: ["katex", "math", "shuxuegongshi"],
|
|
26991
|
-
command: ({ editor, range }) => {
|
|
26992
|
-
editor.chain().focus().deleteRange(range).addKatex().run();
|
|
26977
|
+
editor.chain().focus().deleteRange(range).setCodeBlock().run();
|
|
26993
26978
|
}
|
|
26994
26979
|
}
|
|
26995
26980
|
].filter(
|
|
@@ -27014,7 +26999,6 @@ const CommandsSuggestion = {
|
|
|
27014
26999
|
getReferenceClientRect: props.clientRect,
|
|
27015
27000
|
appendTo: () => document.body,
|
|
27016
27001
|
content: component.element,
|
|
27017
|
-
arrow: ROUND_ARROW,
|
|
27018
27002
|
showOnCreate: true,
|
|
27019
27003
|
interactive: true,
|
|
27020
27004
|
trigger: "manual",
|
|
@@ -27087,141 +27071,1588 @@ const CodeBlock = Node.create({
|
|
|
27087
27071
|
tag: "pre",
|
|
27088
27072
|
preserveWhitespace: "full"
|
|
27089
27073
|
}
|
|
27090
|
-
];
|
|
27091
|
-
},
|
|
27092
|
-
renderHTML({ node, HTMLAttributes }) {
|
|
27093
|
-
return [
|
|
27094
|
-
"pre",
|
|
27095
|
-
mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),
|
|
27096
|
-
[
|
|
27097
|
-
"code",
|
|
27098
|
-
{
|
|
27099
|
-
class: node.attrs.language ? this.options.languageClassPrefix + node.attrs.language : null
|
|
27100
|
-
},
|
|
27101
|
-
0
|
|
27102
|
-
]
|
|
27103
|
-
];
|
|
27104
|
-
},
|
|
27105
|
-
addCommands() {
|
|
27106
|
-
return {
|
|
27107
|
-
setCodeBlock: (attributes) => ({ commands: commands2 }) => {
|
|
27108
|
-
return commands2.setNode(this.name, attributes);
|
|
27109
|
-
},
|
|
27110
|
-
toggleCodeBlock: (attributes) => ({ commands: commands2 }) => {
|
|
27111
|
-
return commands2.toggleNode(this.name, "paragraph", attributes);
|
|
27074
|
+
];
|
|
27075
|
+
},
|
|
27076
|
+
renderHTML({ node, HTMLAttributes }) {
|
|
27077
|
+
return [
|
|
27078
|
+
"pre",
|
|
27079
|
+
mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),
|
|
27080
|
+
[
|
|
27081
|
+
"code",
|
|
27082
|
+
{
|
|
27083
|
+
class: node.attrs.language ? this.options.languageClassPrefix + node.attrs.language : null
|
|
27084
|
+
},
|
|
27085
|
+
0
|
|
27086
|
+
]
|
|
27087
|
+
];
|
|
27088
|
+
},
|
|
27089
|
+
addCommands() {
|
|
27090
|
+
return {
|
|
27091
|
+
setCodeBlock: (attributes) => ({ commands: commands2 }) => {
|
|
27092
|
+
return commands2.setNode(this.name, attributes);
|
|
27093
|
+
},
|
|
27094
|
+
toggleCodeBlock: (attributes) => ({ commands: commands2 }) => {
|
|
27095
|
+
return commands2.toggleNode(this.name, "paragraph", attributes);
|
|
27096
|
+
}
|
|
27097
|
+
};
|
|
27098
|
+
},
|
|
27099
|
+
addKeyboardShortcuts() {
|
|
27100
|
+
return {
|
|
27101
|
+
"Mod-Alt-c": () => this.editor.commands.toggleCodeBlock(),
|
|
27102
|
+
Backspace: () => {
|
|
27103
|
+
const { empty: empty2, $anchor } = this.editor.state.selection;
|
|
27104
|
+
const isAtStart = $anchor.pos === 1;
|
|
27105
|
+
if (!empty2 || $anchor.parent.type.name !== this.name) {
|
|
27106
|
+
return false;
|
|
27107
|
+
}
|
|
27108
|
+
if (isAtStart || !$anchor.parent.textContent.length) {
|
|
27109
|
+
return this.editor.commands.clearNodes();
|
|
27110
|
+
}
|
|
27111
|
+
return false;
|
|
27112
|
+
},
|
|
27113
|
+
Enter: ({ editor }) => {
|
|
27114
|
+
if (!this.options.exitOnTripleEnter) {
|
|
27115
|
+
return false;
|
|
27116
|
+
}
|
|
27117
|
+
const { state } = editor;
|
|
27118
|
+
const { selection } = state;
|
|
27119
|
+
const { $from, empty: empty2 } = selection;
|
|
27120
|
+
if (!empty2 || $from.parent.type !== this.type) {
|
|
27121
|
+
return false;
|
|
27122
|
+
}
|
|
27123
|
+
const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2;
|
|
27124
|
+
const endsWithDoubleNewline = $from.parent.textContent.endsWith("\n\n");
|
|
27125
|
+
if (!isAtEnd || !endsWithDoubleNewline) {
|
|
27126
|
+
return false;
|
|
27127
|
+
}
|
|
27128
|
+
return editor.chain().command(({ tr }) => {
|
|
27129
|
+
tr.delete($from.pos - 2, $from.pos);
|
|
27130
|
+
return true;
|
|
27131
|
+
}).exitCode().run();
|
|
27132
|
+
},
|
|
27133
|
+
ArrowDown: ({ editor }) => {
|
|
27134
|
+
if (!this.options.exitOnArrowDown) {
|
|
27135
|
+
return false;
|
|
27136
|
+
}
|
|
27137
|
+
const { state } = editor;
|
|
27138
|
+
const { selection, doc: doc2 } = state;
|
|
27139
|
+
const { $from, empty: empty2 } = selection;
|
|
27140
|
+
if (!empty2 || $from.parent.type !== this.type) {
|
|
27141
|
+
return false;
|
|
27142
|
+
}
|
|
27143
|
+
const isAtEnd = $from.parentOffset === $from.parent.nodeSize - 2;
|
|
27144
|
+
if (!isAtEnd) {
|
|
27145
|
+
return false;
|
|
27146
|
+
}
|
|
27147
|
+
const after = $from.after();
|
|
27148
|
+
if (after === void 0) {
|
|
27149
|
+
return false;
|
|
27150
|
+
}
|
|
27151
|
+
const nodeAfter = doc2.nodeAt(after);
|
|
27152
|
+
if (nodeAfter) {
|
|
27153
|
+
return false;
|
|
27154
|
+
}
|
|
27155
|
+
return editor.commands.exitCode();
|
|
27156
|
+
}
|
|
27157
|
+
};
|
|
27158
|
+
},
|
|
27159
|
+
addInputRules() {
|
|
27160
|
+
return [
|
|
27161
|
+
textblockTypeInputRule({
|
|
27162
|
+
find: backtickInputRegex,
|
|
27163
|
+
type: this.type,
|
|
27164
|
+
getAttributes: (match) => ({
|
|
27165
|
+
language: match[1]
|
|
27166
|
+
})
|
|
27167
|
+
}),
|
|
27168
|
+
textblockTypeInputRule({
|
|
27169
|
+
find: tildeInputRegex,
|
|
27170
|
+
type: this.type,
|
|
27171
|
+
getAttributes: (match) => ({
|
|
27172
|
+
language: match[1]
|
|
27173
|
+
})
|
|
27174
|
+
})
|
|
27175
|
+
];
|
|
27176
|
+
},
|
|
27177
|
+
addProseMirrorPlugins() {
|
|
27178
|
+
return [
|
|
27179
|
+
new Plugin({
|
|
27180
|
+
key: new PluginKey("codeBlockVSCodeHandler"),
|
|
27181
|
+
props: {
|
|
27182
|
+
handlePaste: (view, event) => {
|
|
27183
|
+
if (!event.clipboardData) {
|
|
27184
|
+
return false;
|
|
27185
|
+
}
|
|
27186
|
+
if (this.editor.isActive(this.type.name)) {
|
|
27187
|
+
return false;
|
|
27188
|
+
}
|
|
27189
|
+
const text2 = event.clipboardData.getData("text/plain");
|
|
27190
|
+
const vscode = event.clipboardData.getData("vscode-editor-data");
|
|
27191
|
+
const vscodeData = vscode ? JSON.parse(vscode) : void 0;
|
|
27192
|
+
const language = vscodeData === null || vscodeData === void 0 ? void 0 : vscodeData.mode;
|
|
27193
|
+
if (!text2 || !language) {
|
|
27194
|
+
return false;
|
|
27195
|
+
}
|
|
27196
|
+
const { tr } = view.state;
|
|
27197
|
+
tr.replaceSelectionWith(this.type.create({ language }));
|
|
27198
|
+
tr.setSelection(TextSelection.near(tr.doc.resolve(Math.max(0, tr.selection.from - 2))));
|
|
27199
|
+
tr.insertText(text2.replace(/\r\n?/g, "\n"));
|
|
27200
|
+
tr.setMeta("paste", true);
|
|
27201
|
+
view.dispatch(tr);
|
|
27202
|
+
return true;
|
|
27203
|
+
}
|
|
27204
|
+
}
|
|
27205
|
+
})
|
|
27206
|
+
];
|
|
27207
|
+
}
|
|
27208
|
+
});
|
|
27209
|
+
var deepFreezeEs6$1 = { exports: {} };
|
|
27210
|
+
function deepFreeze$1(obj) {
|
|
27211
|
+
if (obj instanceof Map) {
|
|
27212
|
+
obj.clear = obj.delete = obj.set = function() {
|
|
27213
|
+
throw new Error("map is read-only");
|
|
27214
|
+
};
|
|
27215
|
+
} else if (obj instanceof Set) {
|
|
27216
|
+
obj.add = obj.clear = obj.delete = function() {
|
|
27217
|
+
throw new Error("set is read-only");
|
|
27218
|
+
};
|
|
27219
|
+
}
|
|
27220
|
+
Object.freeze(obj);
|
|
27221
|
+
Object.getOwnPropertyNames(obj).forEach(function(name) {
|
|
27222
|
+
var prop = obj[name];
|
|
27223
|
+
if (typeof prop == "object" && !Object.isFrozen(prop)) {
|
|
27224
|
+
deepFreeze$1(prop);
|
|
27225
|
+
}
|
|
27226
|
+
});
|
|
27227
|
+
return obj;
|
|
27228
|
+
}
|
|
27229
|
+
deepFreezeEs6$1.exports = deepFreeze$1;
|
|
27230
|
+
deepFreezeEs6$1.exports.default = deepFreeze$1;
|
|
27231
|
+
class Response$1 {
|
|
27232
|
+
constructor(mode) {
|
|
27233
|
+
if (mode.data === void 0)
|
|
27234
|
+
mode.data = {};
|
|
27235
|
+
this.data = mode.data;
|
|
27236
|
+
this.isMatchIgnored = false;
|
|
27237
|
+
}
|
|
27238
|
+
ignoreMatch() {
|
|
27239
|
+
this.isMatchIgnored = true;
|
|
27240
|
+
}
|
|
27241
|
+
}
|
|
27242
|
+
function escapeHTML$1(value) {
|
|
27243
|
+
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
27244
|
+
}
|
|
27245
|
+
function inherit$1$1(original, ...objects) {
|
|
27246
|
+
const result = /* @__PURE__ */ Object.create(null);
|
|
27247
|
+
for (const key2 in original) {
|
|
27248
|
+
result[key2] = original[key2];
|
|
27249
|
+
}
|
|
27250
|
+
objects.forEach(function(obj) {
|
|
27251
|
+
for (const key2 in obj) {
|
|
27252
|
+
result[key2] = obj[key2];
|
|
27253
|
+
}
|
|
27254
|
+
});
|
|
27255
|
+
return result;
|
|
27256
|
+
}
|
|
27257
|
+
const SPAN_CLOSE$1 = "</span>";
|
|
27258
|
+
const emitsWrappingTags$1 = (node) => {
|
|
27259
|
+
return !!node.scope || node.sublanguage && node.language;
|
|
27260
|
+
};
|
|
27261
|
+
const scopeToCSSClass$1 = (name, { prefix }) => {
|
|
27262
|
+
if (name.includes(".")) {
|
|
27263
|
+
const pieces = name.split(".");
|
|
27264
|
+
return [
|
|
27265
|
+
`${prefix}${pieces.shift()}`,
|
|
27266
|
+
...pieces.map((x, i) => `${x}${"_".repeat(i + 1)}`)
|
|
27267
|
+
].join(" ");
|
|
27268
|
+
}
|
|
27269
|
+
return `${prefix}${name}`;
|
|
27270
|
+
};
|
|
27271
|
+
class HTMLRenderer$1 {
|
|
27272
|
+
constructor(parseTree3, options) {
|
|
27273
|
+
this.buffer = "";
|
|
27274
|
+
this.classPrefix = options.classPrefix;
|
|
27275
|
+
parseTree3.walk(this);
|
|
27276
|
+
}
|
|
27277
|
+
addText(text2) {
|
|
27278
|
+
this.buffer += escapeHTML$1(text2);
|
|
27279
|
+
}
|
|
27280
|
+
openNode(node) {
|
|
27281
|
+
if (!emitsWrappingTags$1(node))
|
|
27282
|
+
return;
|
|
27283
|
+
let className = "";
|
|
27284
|
+
if (node.sublanguage) {
|
|
27285
|
+
className = `language-${node.language}`;
|
|
27286
|
+
} else {
|
|
27287
|
+
className = scopeToCSSClass$1(node.scope, { prefix: this.classPrefix });
|
|
27288
|
+
}
|
|
27289
|
+
this.span(className);
|
|
27290
|
+
}
|
|
27291
|
+
closeNode(node) {
|
|
27292
|
+
if (!emitsWrappingTags$1(node))
|
|
27293
|
+
return;
|
|
27294
|
+
this.buffer += SPAN_CLOSE$1;
|
|
27295
|
+
}
|
|
27296
|
+
value() {
|
|
27297
|
+
return this.buffer;
|
|
27298
|
+
}
|
|
27299
|
+
span(className) {
|
|
27300
|
+
this.buffer += `<span class="${className}">`;
|
|
27301
|
+
}
|
|
27302
|
+
}
|
|
27303
|
+
const newNode$1 = (opts = {}) => {
|
|
27304
|
+
const result = { children: [] };
|
|
27305
|
+
Object.assign(result, opts);
|
|
27306
|
+
return result;
|
|
27307
|
+
};
|
|
27308
|
+
class TokenTree$1 {
|
|
27309
|
+
constructor() {
|
|
27310
|
+
this.rootNode = newNode$1();
|
|
27311
|
+
this.stack = [this.rootNode];
|
|
27312
|
+
}
|
|
27313
|
+
get top() {
|
|
27314
|
+
return this.stack[this.stack.length - 1];
|
|
27315
|
+
}
|
|
27316
|
+
get root() {
|
|
27317
|
+
return this.rootNode;
|
|
27318
|
+
}
|
|
27319
|
+
add(node) {
|
|
27320
|
+
this.top.children.push(node);
|
|
27321
|
+
}
|
|
27322
|
+
openNode(scope) {
|
|
27323
|
+
const node = newNode$1({ scope });
|
|
27324
|
+
this.add(node);
|
|
27325
|
+
this.stack.push(node);
|
|
27326
|
+
}
|
|
27327
|
+
closeNode() {
|
|
27328
|
+
if (this.stack.length > 1) {
|
|
27329
|
+
return this.stack.pop();
|
|
27330
|
+
}
|
|
27331
|
+
return void 0;
|
|
27332
|
+
}
|
|
27333
|
+
closeAllNodes() {
|
|
27334
|
+
while (this.closeNode())
|
|
27335
|
+
;
|
|
27336
|
+
}
|
|
27337
|
+
toJSON() {
|
|
27338
|
+
return JSON.stringify(this.rootNode, null, 4);
|
|
27339
|
+
}
|
|
27340
|
+
walk(builder) {
|
|
27341
|
+
return this.constructor._walk(builder, this.rootNode);
|
|
27342
|
+
}
|
|
27343
|
+
static _walk(builder, node) {
|
|
27344
|
+
if (typeof node === "string") {
|
|
27345
|
+
builder.addText(node);
|
|
27346
|
+
} else if (node.children) {
|
|
27347
|
+
builder.openNode(node);
|
|
27348
|
+
node.children.forEach((child) => this._walk(builder, child));
|
|
27349
|
+
builder.closeNode(node);
|
|
27350
|
+
}
|
|
27351
|
+
return builder;
|
|
27352
|
+
}
|
|
27353
|
+
static _collapse(node) {
|
|
27354
|
+
if (typeof node === "string")
|
|
27355
|
+
return;
|
|
27356
|
+
if (!node.children)
|
|
27357
|
+
return;
|
|
27358
|
+
if (node.children.every((el) => typeof el === "string")) {
|
|
27359
|
+
node.children = [node.children.join("")];
|
|
27360
|
+
} else {
|
|
27361
|
+
node.children.forEach((child) => {
|
|
27362
|
+
TokenTree$1._collapse(child);
|
|
27363
|
+
});
|
|
27364
|
+
}
|
|
27365
|
+
}
|
|
27366
|
+
}
|
|
27367
|
+
class TokenTreeEmitter$1 extends TokenTree$1 {
|
|
27368
|
+
constructor(options) {
|
|
27369
|
+
super();
|
|
27370
|
+
this.options = options;
|
|
27371
|
+
}
|
|
27372
|
+
addKeyword(text2, scope) {
|
|
27373
|
+
if (text2 === "") {
|
|
27374
|
+
return;
|
|
27375
|
+
}
|
|
27376
|
+
this.openNode(scope);
|
|
27377
|
+
this.addText(text2);
|
|
27378
|
+
this.closeNode();
|
|
27379
|
+
}
|
|
27380
|
+
addText(text2) {
|
|
27381
|
+
if (text2 === "") {
|
|
27382
|
+
return;
|
|
27383
|
+
}
|
|
27384
|
+
this.add(text2);
|
|
27385
|
+
}
|
|
27386
|
+
addSublanguage(emitter, name) {
|
|
27387
|
+
const node = emitter.root;
|
|
27388
|
+
node.sublanguage = true;
|
|
27389
|
+
node.language = name;
|
|
27390
|
+
this.add(node);
|
|
27391
|
+
}
|
|
27392
|
+
toHTML() {
|
|
27393
|
+
const renderer = new HTMLRenderer$1(this, this.options);
|
|
27394
|
+
return renderer.value();
|
|
27395
|
+
}
|
|
27396
|
+
finalize() {
|
|
27397
|
+
return true;
|
|
27398
|
+
}
|
|
27399
|
+
}
|
|
27400
|
+
function source$3(re) {
|
|
27401
|
+
if (!re)
|
|
27402
|
+
return null;
|
|
27403
|
+
if (typeof re === "string")
|
|
27404
|
+
return re;
|
|
27405
|
+
return re.source;
|
|
27406
|
+
}
|
|
27407
|
+
function lookahead$3(re) {
|
|
27408
|
+
return concat$3("(?=", re, ")");
|
|
27409
|
+
}
|
|
27410
|
+
function anyNumberOfTimes$1(re) {
|
|
27411
|
+
return concat$3("(?:", re, ")*");
|
|
27412
|
+
}
|
|
27413
|
+
function optional$1(re) {
|
|
27414
|
+
return concat$3("(?:", re, ")?");
|
|
27415
|
+
}
|
|
27416
|
+
function concat$3(...args) {
|
|
27417
|
+
const joined = args.map((x) => source$3(x)).join("");
|
|
27418
|
+
return joined;
|
|
27419
|
+
}
|
|
27420
|
+
function stripOptionsFromArgs$3(args) {
|
|
27421
|
+
const opts = args[args.length - 1];
|
|
27422
|
+
if (typeof opts === "object" && opts.constructor === Object) {
|
|
27423
|
+
args.splice(args.length - 1, 1);
|
|
27424
|
+
return opts;
|
|
27425
|
+
} else {
|
|
27426
|
+
return {};
|
|
27427
|
+
}
|
|
27428
|
+
}
|
|
27429
|
+
function either$3(...args) {
|
|
27430
|
+
const opts = stripOptionsFromArgs$3(args);
|
|
27431
|
+
const joined = "(" + (opts.capture ? "" : "?:") + args.map((x) => source$3(x)).join("|") + ")";
|
|
27432
|
+
return joined;
|
|
27433
|
+
}
|
|
27434
|
+
function countMatchGroups$1(re) {
|
|
27435
|
+
return new RegExp(re.toString() + "|").exec("").length - 1;
|
|
27436
|
+
}
|
|
27437
|
+
function startsWith$1(re, lexeme) {
|
|
27438
|
+
const match = re && re.exec(lexeme);
|
|
27439
|
+
return match && match.index === 0;
|
|
27440
|
+
}
|
|
27441
|
+
const BACKREF_RE$1 = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
|
27442
|
+
function _rewriteBackreferences$1(regexps, { joinWith }) {
|
|
27443
|
+
let numCaptures = 0;
|
|
27444
|
+
return regexps.map((regex) => {
|
|
27445
|
+
numCaptures += 1;
|
|
27446
|
+
const offset2 = numCaptures;
|
|
27447
|
+
let re = source$3(regex);
|
|
27448
|
+
let out = "";
|
|
27449
|
+
while (re.length > 0) {
|
|
27450
|
+
const match = BACKREF_RE$1.exec(re);
|
|
27451
|
+
if (!match) {
|
|
27452
|
+
out += re;
|
|
27453
|
+
break;
|
|
27454
|
+
}
|
|
27455
|
+
out += re.substring(0, match.index);
|
|
27456
|
+
re = re.substring(match.index + match[0].length);
|
|
27457
|
+
if (match[0][0] === "\\" && match[1]) {
|
|
27458
|
+
out += "\\" + String(Number(match[1]) + offset2);
|
|
27459
|
+
} else {
|
|
27460
|
+
out += match[0];
|
|
27461
|
+
if (match[0] === "(") {
|
|
27462
|
+
numCaptures++;
|
|
27463
|
+
}
|
|
27464
|
+
}
|
|
27465
|
+
}
|
|
27466
|
+
return out;
|
|
27467
|
+
}).map((re) => `(${re})`).join(joinWith);
|
|
27468
|
+
}
|
|
27469
|
+
const MATCH_NOTHING_RE$1 = /\b\B/;
|
|
27470
|
+
const IDENT_RE$3 = "[a-zA-Z]\\w*";
|
|
27471
|
+
const UNDERSCORE_IDENT_RE$1 = "[a-zA-Z_]\\w*";
|
|
27472
|
+
const NUMBER_RE$1 = "\\b\\d+(\\.\\d+)?";
|
|
27473
|
+
const C_NUMBER_RE$1 = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";
|
|
27474
|
+
const BINARY_NUMBER_RE$1 = "\\b(0b[01]+)";
|
|
27475
|
+
const RE_STARTERS_RE$1 = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";
|
|
27476
|
+
const SHEBANG$1 = (opts = {}) => {
|
|
27477
|
+
const beginShebang = /^#![ ]*\//;
|
|
27478
|
+
if (opts.binary) {
|
|
27479
|
+
opts.begin = concat$3(
|
|
27480
|
+
beginShebang,
|
|
27481
|
+
/.*\b/,
|
|
27482
|
+
opts.binary,
|
|
27483
|
+
/\b.*/
|
|
27484
|
+
);
|
|
27485
|
+
}
|
|
27486
|
+
return inherit$1$1({
|
|
27487
|
+
scope: "meta",
|
|
27488
|
+
begin: beginShebang,
|
|
27489
|
+
end: /$/,
|
|
27490
|
+
relevance: 0,
|
|
27491
|
+
"on:begin": (m, resp) => {
|
|
27492
|
+
if (m.index !== 0)
|
|
27493
|
+
resp.ignoreMatch();
|
|
27494
|
+
}
|
|
27495
|
+
}, opts);
|
|
27496
|
+
};
|
|
27497
|
+
const BACKSLASH_ESCAPE$1 = {
|
|
27498
|
+
begin: "\\\\[\\s\\S]",
|
|
27499
|
+
relevance: 0
|
|
27500
|
+
};
|
|
27501
|
+
const APOS_STRING_MODE$1 = {
|
|
27502
|
+
scope: "string",
|
|
27503
|
+
begin: "'",
|
|
27504
|
+
end: "'",
|
|
27505
|
+
illegal: "\\n",
|
|
27506
|
+
contains: [BACKSLASH_ESCAPE$1]
|
|
27507
|
+
};
|
|
27508
|
+
const QUOTE_STRING_MODE$1 = {
|
|
27509
|
+
scope: "string",
|
|
27510
|
+
begin: '"',
|
|
27511
|
+
end: '"',
|
|
27512
|
+
illegal: "\\n",
|
|
27513
|
+
contains: [BACKSLASH_ESCAPE$1]
|
|
27514
|
+
};
|
|
27515
|
+
const PHRASAL_WORDS_MODE$1 = {
|
|
27516
|
+
begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
|
|
27517
|
+
};
|
|
27518
|
+
const COMMENT$1 = function(begin, end2, modeOptions = {}) {
|
|
27519
|
+
const mode = inherit$1$1(
|
|
27520
|
+
{
|
|
27521
|
+
scope: "comment",
|
|
27522
|
+
begin,
|
|
27523
|
+
end: end2,
|
|
27524
|
+
contains: []
|
|
27525
|
+
},
|
|
27526
|
+
modeOptions
|
|
27527
|
+
);
|
|
27528
|
+
mode.contains.push({
|
|
27529
|
+
scope: "doctag",
|
|
27530
|
+
begin: "[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",
|
|
27531
|
+
end: /(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,
|
|
27532
|
+
excludeBegin: true,
|
|
27533
|
+
relevance: 0
|
|
27534
|
+
});
|
|
27535
|
+
const ENGLISH_WORD = either$3(
|
|
27536
|
+
"I",
|
|
27537
|
+
"a",
|
|
27538
|
+
"is",
|
|
27539
|
+
"so",
|
|
27540
|
+
"us",
|
|
27541
|
+
"to",
|
|
27542
|
+
"at",
|
|
27543
|
+
"if",
|
|
27544
|
+
"in",
|
|
27545
|
+
"it",
|
|
27546
|
+
"on",
|
|
27547
|
+
/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,
|
|
27548
|
+
/[A-Za-z]+[-][a-z]+/,
|
|
27549
|
+
/[A-Za-z][a-z]{2,}/
|
|
27550
|
+
);
|
|
27551
|
+
mode.contains.push(
|
|
27552
|
+
{
|
|
27553
|
+
begin: concat$3(
|
|
27554
|
+
/[ ]+/,
|
|
27555
|
+
"(",
|
|
27556
|
+
ENGLISH_WORD,
|
|
27557
|
+
/[.]?[:]?([.][ ]|[ ])/,
|
|
27558
|
+
"){3}"
|
|
27559
|
+
)
|
|
27560
|
+
}
|
|
27561
|
+
);
|
|
27562
|
+
return mode;
|
|
27563
|
+
};
|
|
27564
|
+
const C_LINE_COMMENT_MODE$1 = COMMENT$1("//", "$");
|
|
27565
|
+
const C_BLOCK_COMMENT_MODE$1 = COMMENT$1("/\\*", "\\*/");
|
|
27566
|
+
const HASH_COMMENT_MODE$1 = COMMENT$1("#", "$");
|
|
27567
|
+
const NUMBER_MODE$1 = {
|
|
27568
|
+
scope: "number",
|
|
27569
|
+
begin: NUMBER_RE$1,
|
|
27570
|
+
relevance: 0
|
|
27571
|
+
};
|
|
27572
|
+
const C_NUMBER_MODE$1 = {
|
|
27573
|
+
scope: "number",
|
|
27574
|
+
begin: C_NUMBER_RE$1,
|
|
27575
|
+
relevance: 0
|
|
27576
|
+
};
|
|
27577
|
+
const BINARY_NUMBER_MODE$1 = {
|
|
27578
|
+
scope: "number",
|
|
27579
|
+
begin: BINARY_NUMBER_RE$1,
|
|
27580
|
+
relevance: 0
|
|
27581
|
+
};
|
|
27582
|
+
const REGEXP_MODE$1 = {
|
|
27583
|
+
begin: /(?=\/[^/\n]*\/)/,
|
|
27584
|
+
contains: [{
|
|
27585
|
+
scope: "regexp",
|
|
27586
|
+
begin: /\//,
|
|
27587
|
+
end: /\/[gimuy]*/,
|
|
27588
|
+
illegal: /\n/,
|
|
27589
|
+
contains: [
|
|
27590
|
+
BACKSLASH_ESCAPE$1,
|
|
27591
|
+
{
|
|
27592
|
+
begin: /\[/,
|
|
27593
|
+
end: /\]/,
|
|
27594
|
+
relevance: 0,
|
|
27595
|
+
contains: [BACKSLASH_ESCAPE$1]
|
|
27596
|
+
}
|
|
27597
|
+
]
|
|
27598
|
+
}]
|
|
27599
|
+
};
|
|
27600
|
+
const TITLE_MODE$1 = {
|
|
27601
|
+
scope: "title",
|
|
27602
|
+
begin: IDENT_RE$3,
|
|
27603
|
+
relevance: 0
|
|
27604
|
+
};
|
|
27605
|
+
const UNDERSCORE_TITLE_MODE$1 = {
|
|
27606
|
+
scope: "title",
|
|
27607
|
+
begin: UNDERSCORE_IDENT_RE$1,
|
|
27608
|
+
relevance: 0
|
|
27609
|
+
};
|
|
27610
|
+
const METHOD_GUARD$1 = {
|
|
27611
|
+
begin: "\\.\\s*" + UNDERSCORE_IDENT_RE$1,
|
|
27612
|
+
relevance: 0
|
|
27613
|
+
};
|
|
27614
|
+
const END_SAME_AS_BEGIN$1 = function(mode) {
|
|
27615
|
+
return Object.assign(
|
|
27616
|
+
mode,
|
|
27617
|
+
{
|
|
27618
|
+
"on:begin": (m, resp) => {
|
|
27619
|
+
resp.data._beginMatch = m[1];
|
|
27620
|
+
},
|
|
27621
|
+
"on:end": (m, resp) => {
|
|
27622
|
+
if (resp.data._beginMatch !== m[1])
|
|
27623
|
+
resp.ignoreMatch();
|
|
27624
|
+
}
|
|
27625
|
+
}
|
|
27626
|
+
);
|
|
27627
|
+
};
|
|
27628
|
+
var MODES$5 = /* @__PURE__ */ Object.freeze({
|
|
27629
|
+
__proto__: null,
|
|
27630
|
+
MATCH_NOTHING_RE: MATCH_NOTHING_RE$1,
|
|
27631
|
+
IDENT_RE: IDENT_RE$3,
|
|
27632
|
+
UNDERSCORE_IDENT_RE: UNDERSCORE_IDENT_RE$1,
|
|
27633
|
+
NUMBER_RE: NUMBER_RE$1,
|
|
27634
|
+
C_NUMBER_RE: C_NUMBER_RE$1,
|
|
27635
|
+
BINARY_NUMBER_RE: BINARY_NUMBER_RE$1,
|
|
27636
|
+
RE_STARTERS_RE: RE_STARTERS_RE$1,
|
|
27637
|
+
SHEBANG: SHEBANG$1,
|
|
27638
|
+
BACKSLASH_ESCAPE: BACKSLASH_ESCAPE$1,
|
|
27639
|
+
APOS_STRING_MODE: APOS_STRING_MODE$1,
|
|
27640
|
+
QUOTE_STRING_MODE: QUOTE_STRING_MODE$1,
|
|
27641
|
+
PHRASAL_WORDS_MODE: PHRASAL_WORDS_MODE$1,
|
|
27642
|
+
COMMENT: COMMENT$1,
|
|
27643
|
+
C_LINE_COMMENT_MODE: C_LINE_COMMENT_MODE$1,
|
|
27644
|
+
C_BLOCK_COMMENT_MODE: C_BLOCK_COMMENT_MODE$1,
|
|
27645
|
+
HASH_COMMENT_MODE: HASH_COMMENT_MODE$1,
|
|
27646
|
+
NUMBER_MODE: NUMBER_MODE$1,
|
|
27647
|
+
C_NUMBER_MODE: C_NUMBER_MODE$1,
|
|
27648
|
+
BINARY_NUMBER_MODE: BINARY_NUMBER_MODE$1,
|
|
27649
|
+
REGEXP_MODE: REGEXP_MODE$1,
|
|
27650
|
+
TITLE_MODE: TITLE_MODE$1,
|
|
27651
|
+
UNDERSCORE_TITLE_MODE: UNDERSCORE_TITLE_MODE$1,
|
|
27652
|
+
METHOD_GUARD: METHOD_GUARD$1,
|
|
27653
|
+
END_SAME_AS_BEGIN: END_SAME_AS_BEGIN$1
|
|
27654
|
+
});
|
|
27655
|
+
function skipIfHasPrecedingDot$1(match, response) {
|
|
27656
|
+
const before = match.input[match.index - 1];
|
|
27657
|
+
if (before === ".") {
|
|
27658
|
+
response.ignoreMatch();
|
|
27659
|
+
}
|
|
27660
|
+
}
|
|
27661
|
+
function scopeClassName$1(mode, _parent) {
|
|
27662
|
+
if (mode.className !== void 0) {
|
|
27663
|
+
mode.scope = mode.className;
|
|
27664
|
+
delete mode.className;
|
|
27665
|
+
}
|
|
27666
|
+
}
|
|
27667
|
+
function beginKeywords$1(mode, parent) {
|
|
27668
|
+
if (!parent)
|
|
27669
|
+
return;
|
|
27670
|
+
if (!mode.beginKeywords)
|
|
27671
|
+
return;
|
|
27672
|
+
mode.begin = "\\b(" + mode.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)";
|
|
27673
|
+
mode.__beforeBegin = skipIfHasPrecedingDot$1;
|
|
27674
|
+
mode.keywords = mode.keywords || mode.beginKeywords;
|
|
27675
|
+
delete mode.beginKeywords;
|
|
27676
|
+
if (mode.relevance === void 0)
|
|
27677
|
+
mode.relevance = 0;
|
|
27678
|
+
}
|
|
27679
|
+
function compileIllegal$1(mode, _parent) {
|
|
27680
|
+
if (!Array.isArray(mode.illegal))
|
|
27681
|
+
return;
|
|
27682
|
+
mode.illegal = either$3(...mode.illegal);
|
|
27683
|
+
}
|
|
27684
|
+
function compileMatch$1(mode, _parent) {
|
|
27685
|
+
if (!mode.match)
|
|
27686
|
+
return;
|
|
27687
|
+
if (mode.begin || mode.end)
|
|
27688
|
+
throw new Error("begin & end are not supported with match");
|
|
27689
|
+
mode.begin = mode.match;
|
|
27690
|
+
delete mode.match;
|
|
27691
|
+
}
|
|
27692
|
+
function compileRelevance$1(mode, _parent) {
|
|
27693
|
+
if (mode.relevance === void 0)
|
|
27694
|
+
mode.relevance = 1;
|
|
27695
|
+
}
|
|
27696
|
+
const beforeMatchExt$1 = (mode, parent) => {
|
|
27697
|
+
if (!mode.beforeMatch)
|
|
27698
|
+
return;
|
|
27699
|
+
if (mode.starts)
|
|
27700
|
+
throw new Error("beforeMatch cannot be used with starts");
|
|
27701
|
+
const originalMode = Object.assign({}, mode);
|
|
27702
|
+
Object.keys(mode).forEach((key2) => {
|
|
27703
|
+
delete mode[key2];
|
|
27704
|
+
});
|
|
27705
|
+
mode.keywords = originalMode.keywords;
|
|
27706
|
+
mode.begin = concat$3(originalMode.beforeMatch, lookahead$3(originalMode.begin));
|
|
27707
|
+
mode.starts = {
|
|
27708
|
+
relevance: 0,
|
|
27709
|
+
contains: [
|
|
27710
|
+
Object.assign(originalMode, { endsParent: true })
|
|
27711
|
+
]
|
|
27712
|
+
};
|
|
27713
|
+
mode.relevance = 0;
|
|
27714
|
+
delete originalMode.beforeMatch;
|
|
27715
|
+
};
|
|
27716
|
+
const COMMON_KEYWORDS$1 = [
|
|
27717
|
+
"of",
|
|
27718
|
+
"and",
|
|
27719
|
+
"for",
|
|
27720
|
+
"in",
|
|
27721
|
+
"not",
|
|
27722
|
+
"or",
|
|
27723
|
+
"if",
|
|
27724
|
+
"then",
|
|
27725
|
+
"parent",
|
|
27726
|
+
"list",
|
|
27727
|
+
"value"
|
|
27728
|
+
];
|
|
27729
|
+
const DEFAULT_KEYWORD_SCOPE$1 = "keyword";
|
|
27730
|
+
function compileKeywords$1(rawKeywords, caseInsensitive, scopeName = DEFAULT_KEYWORD_SCOPE$1) {
|
|
27731
|
+
const compiledKeywords = /* @__PURE__ */ Object.create(null);
|
|
27732
|
+
if (typeof rawKeywords === "string") {
|
|
27733
|
+
compileList(scopeName, rawKeywords.split(" "));
|
|
27734
|
+
} else if (Array.isArray(rawKeywords)) {
|
|
27735
|
+
compileList(scopeName, rawKeywords);
|
|
27736
|
+
} else {
|
|
27737
|
+
Object.keys(rawKeywords).forEach(function(scopeName2) {
|
|
27738
|
+
Object.assign(
|
|
27739
|
+
compiledKeywords,
|
|
27740
|
+
compileKeywords$1(rawKeywords[scopeName2], caseInsensitive, scopeName2)
|
|
27741
|
+
);
|
|
27742
|
+
});
|
|
27743
|
+
}
|
|
27744
|
+
return compiledKeywords;
|
|
27745
|
+
function compileList(scopeName2, keywordList) {
|
|
27746
|
+
if (caseInsensitive) {
|
|
27747
|
+
keywordList = keywordList.map((x) => x.toLowerCase());
|
|
27748
|
+
}
|
|
27749
|
+
keywordList.forEach(function(keyword) {
|
|
27750
|
+
const pair = keyword.split("|");
|
|
27751
|
+
compiledKeywords[pair[0]] = [scopeName2, scoreForKeyword$1(pair[0], pair[1])];
|
|
27752
|
+
});
|
|
27753
|
+
}
|
|
27754
|
+
}
|
|
27755
|
+
function scoreForKeyword$1(keyword, providedScore) {
|
|
27756
|
+
if (providedScore) {
|
|
27757
|
+
return Number(providedScore);
|
|
27758
|
+
}
|
|
27759
|
+
return commonKeyword$1(keyword) ? 0 : 1;
|
|
27760
|
+
}
|
|
27761
|
+
function commonKeyword$1(keyword) {
|
|
27762
|
+
return COMMON_KEYWORDS$1.includes(keyword.toLowerCase());
|
|
27763
|
+
}
|
|
27764
|
+
const seenDeprecations$1 = {};
|
|
27765
|
+
const error$1 = (message) => {
|
|
27766
|
+
console.error(message);
|
|
27767
|
+
};
|
|
27768
|
+
const warn$1 = (message, ...args) => {
|
|
27769
|
+
console.log(`WARN: ${message}`, ...args);
|
|
27770
|
+
};
|
|
27771
|
+
const deprecated$1 = (version2, message) => {
|
|
27772
|
+
if (seenDeprecations$1[`${version2}/${message}`])
|
|
27773
|
+
return;
|
|
27774
|
+
console.log(`Deprecated as of ${version2}. ${message}`);
|
|
27775
|
+
seenDeprecations$1[`${version2}/${message}`] = true;
|
|
27776
|
+
};
|
|
27777
|
+
const MultiClassError$1 = new Error();
|
|
27778
|
+
function remapScopeNames$1(mode, regexes, { key: key2 }) {
|
|
27779
|
+
let offset2 = 0;
|
|
27780
|
+
const scopeNames = mode[key2];
|
|
27781
|
+
const emit = {};
|
|
27782
|
+
const positions = {};
|
|
27783
|
+
for (let i = 1; i <= regexes.length; i++) {
|
|
27784
|
+
positions[i + offset2] = scopeNames[i];
|
|
27785
|
+
emit[i + offset2] = true;
|
|
27786
|
+
offset2 += countMatchGroups$1(regexes[i - 1]);
|
|
27787
|
+
}
|
|
27788
|
+
mode[key2] = positions;
|
|
27789
|
+
mode[key2]._emit = emit;
|
|
27790
|
+
mode[key2]._multi = true;
|
|
27791
|
+
}
|
|
27792
|
+
function beginMultiClass$1(mode) {
|
|
27793
|
+
if (!Array.isArray(mode.begin))
|
|
27794
|
+
return;
|
|
27795
|
+
if (mode.skip || mode.excludeBegin || mode.returnBegin) {
|
|
27796
|
+
error$1("skip, excludeBegin, returnBegin not compatible with beginScope: {}");
|
|
27797
|
+
throw MultiClassError$1;
|
|
27798
|
+
}
|
|
27799
|
+
if (typeof mode.beginScope !== "object" || mode.beginScope === null) {
|
|
27800
|
+
error$1("beginScope must be object");
|
|
27801
|
+
throw MultiClassError$1;
|
|
27802
|
+
}
|
|
27803
|
+
remapScopeNames$1(mode, mode.begin, { key: "beginScope" });
|
|
27804
|
+
mode.begin = _rewriteBackreferences$1(mode.begin, { joinWith: "" });
|
|
27805
|
+
}
|
|
27806
|
+
function endMultiClass$1(mode) {
|
|
27807
|
+
if (!Array.isArray(mode.end))
|
|
27808
|
+
return;
|
|
27809
|
+
if (mode.skip || mode.excludeEnd || mode.returnEnd) {
|
|
27810
|
+
error$1("skip, excludeEnd, returnEnd not compatible with endScope: {}");
|
|
27811
|
+
throw MultiClassError$1;
|
|
27812
|
+
}
|
|
27813
|
+
if (typeof mode.endScope !== "object" || mode.endScope === null) {
|
|
27814
|
+
error$1("endScope must be object");
|
|
27815
|
+
throw MultiClassError$1;
|
|
27816
|
+
}
|
|
27817
|
+
remapScopeNames$1(mode, mode.end, { key: "endScope" });
|
|
27818
|
+
mode.end = _rewriteBackreferences$1(mode.end, { joinWith: "" });
|
|
27819
|
+
}
|
|
27820
|
+
function scopeSugar$1(mode) {
|
|
27821
|
+
if (mode.scope && typeof mode.scope === "object" && mode.scope !== null) {
|
|
27822
|
+
mode.beginScope = mode.scope;
|
|
27823
|
+
delete mode.scope;
|
|
27824
|
+
}
|
|
27825
|
+
}
|
|
27826
|
+
function MultiClass$1(mode) {
|
|
27827
|
+
scopeSugar$1(mode);
|
|
27828
|
+
if (typeof mode.beginScope === "string") {
|
|
27829
|
+
mode.beginScope = { _wrap: mode.beginScope };
|
|
27830
|
+
}
|
|
27831
|
+
if (typeof mode.endScope === "string") {
|
|
27832
|
+
mode.endScope = { _wrap: mode.endScope };
|
|
27833
|
+
}
|
|
27834
|
+
beginMultiClass$1(mode);
|
|
27835
|
+
endMultiClass$1(mode);
|
|
27836
|
+
}
|
|
27837
|
+
function compileLanguage$1(language) {
|
|
27838
|
+
function langRe(value, global) {
|
|
27839
|
+
return new RegExp(
|
|
27840
|
+
source$3(value),
|
|
27841
|
+
"m" + (language.case_insensitive ? "i" : "") + (language.unicodeRegex ? "u" : "") + (global ? "g" : "")
|
|
27842
|
+
);
|
|
27843
|
+
}
|
|
27844
|
+
class MultiRegex {
|
|
27845
|
+
constructor() {
|
|
27846
|
+
this.matchIndexes = {};
|
|
27847
|
+
this.regexes = [];
|
|
27848
|
+
this.matchAt = 1;
|
|
27849
|
+
this.position = 0;
|
|
27850
|
+
}
|
|
27851
|
+
addRule(re, opts) {
|
|
27852
|
+
opts.position = this.position++;
|
|
27853
|
+
this.matchIndexes[this.matchAt] = opts;
|
|
27854
|
+
this.regexes.push([opts, re]);
|
|
27855
|
+
this.matchAt += countMatchGroups$1(re) + 1;
|
|
27856
|
+
}
|
|
27857
|
+
compile() {
|
|
27858
|
+
if (this.regexes.length === 0) {
|
|
27859
|
+
this.exec = () => null;
|
|
27860
|
+
}
|
|
27861
|
+
const terminators = this.regexes.map((el) => el[1]);
|
|
27862
|
+
this.matcherRe = langRe(_rewriteBackreferences$1(terminators, { joinWith: "|" }), true);
|
|
27863
|
+
this.lastIndex = 0;
|
|
27864
|
+
}
|
|
27865
|
+
exec(s) {
|
|
27866
|
+
this.matcherRe.lastIndex = this.lastIndex;
|
|
27867
|
+
const match = this.matcherRe.exec(s);
|
|
27868
|
+
if (!match) {
|
|
27869
|
+
return null;
|
|
27870
|
+
}
|
|
27871
|
+
const i = match.findIndex((el, i2) => i2 > 0 && el !== void 0);
|
|
27872
|
+
const matchData = this.matchIndexes[i];
|
|
27873
|
+
match.splice(0, i);
|
|
27874
|
+
return Object.assign(match, matchData);
|
|
27875
|
+
}
|
|
27876
|
+
}
|
|
27877
|
+
class ResumableMultiRegex {
|
|
27878
|
+
constructor() {
|
|
27879
|
+
this.rules = [];
|
|
27880
|
+
this.multiRegexes = [];
|
|
27881
|
+
this.count = 0;
|
|
27882
|
+
this.lastIndex = 0;
|
|
27883
|
+
this.regexIndex = 0;
|
|
27884
|
+
}
|
|
27885
|
+
getMatcher(index2) {
|
|
27886
|
+
if (this.multiRegexes[index2])
|
|
27887
|
+
return this.multiRegexes[index2];
|
|
27888
|
+
const matcher = new MultiRegex();
|
|
27889
|
+
this.rules.slice(index2).forEach(([re, opts]) => matcher.addRule(re, opts));
|
|
27890
|
+
matcher.compile();
|
|
27891
|
+
this.multiRegexes[index2] = matcher;
|
|
27892
|
+
return matcher;
|
|
27893
|
+
}
|
|
27894
|
+
resumingScanAtSamePosition() {
|
|
27895
|
+
return this.regexIndex !== 0;
|
|
27896
|
+
}
|
|
27897
|
+
considerAll() {
|
|
27898
|
+
this.regexIndex = 0;
|
|
27899
|
+
}
|
|
27900
|
+
addRule(re, opts) {
|
|
27901
|
+
this.rules.push([re, opts]);
|
|
27902
|
+
if (opts.type === "begin")
|
|
27903
|
+
this.count++;
|
|
27904
|
+
}
|
|
27905
|
+
exec(s) {
|
|
27906
|
+
const m = this.getMatcher(this.regexIndex);
|
|
27907
|
+
m.lastIndex = this.lastIndex;
|
|
27908
|
+
let result = m.exec(s);
|
|
27909
|
+
if (this.resumingScanAtSamePosition()) {
|
|
27910
|
+
if (result && result.index === this.lastIndex)
|
|
27911
|
+
;
|
|
27912
|
+
else {
|
|
27913
|
+
const m2 = this.getMatcher(0);
|
|
27914
|
+
m2.lastIndex = this.lastIndex + 1;
|
|
27915
|
+
result = m2.exec(s);
|
|
27916
|
+
}
|
|
27917
|
+
}
|
|
27918
|
+
if (result) {
|
|
27919
|
+
this.regexIndex += result.position + 1;
|
|
27920
|
+
if (this.regexIndex === this.count) {
|
|
27921
|
+
this.considerAll();
|
|
27922
|
+
}
|
|
27923
|
+
}
|
|
27924
|
+
return result;
|
|
27925
|
+
}
|
|
27926
|
+
}
|
|
27927
|
+
function buildModeRegex(mode) {
|
|
27928
|
+
const mm = new ResumableMultiRegex();
|
|
27929
|
+
mode.contains.forEach((term) => mm.addRule(term.begin, { rule: term, type: "begin" }));
|
|
27930
|
+
if (mode.terminatorEnd) {
|
|
27931
|
+
mm.addRule(mode.terminatorEnd, { type: "end" });
|
|
27932
|
+
}
|
|
27933
|
+
if (mode.illegal) {
|
|
27934
|
+
mm.addRule(mode.illegal, { type: "illegal" });
|
|
27935
|
+
}
|
|
27936
|
+
return mm;
|
|
27937
|
+
}
|
|
27938
|
+
function compileMode(mode, parent) {
|
|
27939
|
+
const cmode = mode;
|
|
27940
|
+
if (mode.isCompiled)
|
|
27941
|
+
return cmode;
|
|
27942
|
+
[
|
|
27943
|
+
scopeClassName$1,
|
|
27944
|
+
compileMatch$1,
|
|
27945
|
+
MultiClass$1,
|
|
27946
|
+
beforeMatchExt$1
|
|
27947
|
+
].forEach((ext) => ext(mode, parent));
|
|
27948
|
+
language.compilerExtensions.forEach((ext) => ext(mode, parent));
|
|
27949
|
+
mode.__beforeBegin = null;
|
|
27950
|
+
[
|
|
27951
|
+
beginKeywords$1,
|
|
27952
|
+
compileIllegal$1,
|
|
27953
|
+
compileRelevance$1
|
|
27954
|
+
].forEach((ext) => ext(mode, parent));
|
|
27955
|
+
mode.isCompiled = true;
|
|
27956
|
+
let keywordPattern = null;
|
|
27957
|
+
if (typeof mode.keywords === "object" && mode.keywords.$pattern) {
|
|
27958
|
+
mode.keywords = Object.assign({}, mode.keywords);
|
|
27959
|
+
keywordPattern = mode.keywords.$pattern;
|
|
27960
|
+
delete mode.keywords.$pattern;
|
|
27961
|
+
}
|
|
27962
|
+
keywordPattern = keywordPattern || /\w+/;
|
|
27963
|
+
if (mode.keywords) {
|
|
27964
|
+
mode.keywords = compileKeywords$1(mode.keywords, language.case_insensitive);
|
|
27965
|
+
}
|
|
27966
|
+
cmode.keywordPatternRe = langRe(keywordPattern, true);
|
|
27967
|
+
if (parent) {
|
|
27968
|
+
if (!mode.begin)
|
|
27969
|
+
mode.begin = /\B|\b/;
|
|
27970
|
+
cmode.beginRe = langRe(cmode.begin);
|
|
27971
|
+
if (!mode.end && !mode.endsWithParent)
|
|
27972
|
+
mode.end = /\B|\b/;
|
|
27973
|
+
if (mode.end)
|
|
27974
|
+
cmode.endRe = langRe(cmode.end);
|
|
27975
|
+
cmode.terminatorEnd = source$3(cmode.end) || "";
|
|
27976
|
+
if (mode.endsWithParent && parent.terminatorEnd) {
|
|
27977
|
+
cmode.terminatorEnd += (mode.end ? "|" : "") + parent.terminatorEnd;
|
|
27978
|
+
}
|
|
27979
|
+
}
|
|
27980
|
+
if (mode.illegal)
|
|
27981
|
+
cmode.illegalRe = langRe(mode.illegal);
|
|
27982
|
+
if (!mode.contains)
|
|
27983
|
+
mode.contains = [];
|
|
27984
|
+
mode.contains = [].concat(...mode.contains.map(function(c2) {
|
|
27985
|
+
return expandOrCloneMode$1(c2 === "self" ? mode : c2);
|
|
27986
|
+
}));
|
|
27987
|
+
mode.contains.forEach(function(c2) {
|
|
27988
|
+
compileMode(c2, cmode);
|
|
27989
|
+
});
|
|
27990
|
+
if (mode.starts) {
|
|
27991
|
+
compileMode(mode.starts, parent);
|
|
27992
|
+
}
|
|
27993
|
+
cmode.matcher = buildModeRegex(cmode);
|
|
27994
|
+
return cmode;
|
|
27995
|
+
}
|
|
27996
|
+
if (!language.compilerExtensions)
|
|
27997
|
+
language.compilerExtensions = [];
|
|
27998
|
+
if (language.contains && language.contains.includes("self")) {
|
|
27999
|
+
throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
|
|
28000
|
+
}
|
|
28001
|
+
language.classNameAliases = inherit$1$1(language.classNameAliases || {});
|
|
28002
|
+
return compileMode(language);
|
|
28003
|
+
}
|
|
28004
|
+
function dependencyOnParent$1(mode) {
|
|
28005
|
+
if (!mode)
|
|
28006
|
+
return false;
|
|
28007
|
+
return mode.endsWithParent || dependencyOnParent$1(mode.starts);
|
|
28008
|
+
}
|
|
28009
|
+
function expandOrCloneMode$1(mode) {
|
|
28010
|
+
if (mode.variants && !mode.cachedVariants) {
|
|
28011
|
+
mode.cachedVariants = mode.variants.map(function(variant) {
|
|
28012
|
+
return inherit$1$1(mode, { variants: null }, variant);
|
|
28013
|
+
});
|
|
28014
|
+
}
|
|
28015
|
+
if (mode.cachedVariants) {
|
|
28016
|
+
return mode.cachedVariants;
|
|
28017
|
+
}
|
|
28018
|
+
if (dependencyOnParent$1(mode)) {
|
|
28019
|
+
return inherit$1$1(mode, { starts: mode.starts ? inherit$1$1(mode.starts) : null });
|
|
28020
|
+
}
|
|
28021
|
+
if (Object.isFrozen(mode)) {
|
|
28022
|
+
return inherit$1$1(mode);
|
|
28023
|
+
}
|
|
28024
|
+
return mode;
|
|
28025
|
+
}
|
|
28026
|
+
var version$1 = "11.6.0";
|
|
28027
|
+
class HTMLInjectionError$1 extends Error {
|
|
28028
|
+
constructor(reason, html) {
|
|
28029
|
+
super(reason);
|
|
28030
|
+
this.name = "HTMLInjectionError";
|
|
28031
|
+
this.html = html;
|
|
28032
|
+
}
|
|
28033
|
+
}
|
|
28034
|
+
const escape$3 = escapeHTML$1;
|
|
28035
|
+
const inherit$2 = inherit$1$1;
|
|
28036
|
+
const NO_MATCH$1 = Symbol("nomatch");
|
|
28037
|
+
const MAX_KEYWORD_HITS$1 = 7;
|
|
28038
|
+
const HLJS$1 = function(hljs) {
|
|
28039
|
+
const languages = /* @__PURE__ */ Object.create(null);
|
|
28040
|
+
const aliases = /* @__PURE__ */ Object.create(null);
|
|
28041
|
+
const plugins = [];
|
|
28042
|
+
let SAFE_MODE = true;
|
|
28043
|
+
const LANGUAGE_NOT_FOUND = "Could not find the language '{}', did you forget to load/include a language module?";
|
|
28044
|
+
const PLAINTEXT_LANGUAGE = { disableAutodetect: true, name: "Plain text", contains: [] };
|
|
28045
|
+
let options = {
|
|
28046
|
+
ignoreUnescapedHTML: false,
|
|
28047
|
+
throwUnescapedHTML: false,
|
|
28048
|
+
noHighlightRe: /^(no-?highlight)$/i,
|
|
28049
|
+
languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i,
|
|
28050
|
+
classPrefix: "hljs-",
|
|
28051
|
+
cssSelector: "pre code",
|
|
28052
|
+
languages: null,
|
|
28053
|
+
__emitter: TokenTreeEmitter$1
|
|
28054
|
+
};
|
|
28055
|
+
function shouldNotHighlight(languageName) {
|
|
28056
|
+
return options.noHighlightRe.test(languageName);
|
|
28057
|
+
}
|
|
28058
|
+
function blockLanguage(block) {
|
|
28059
|
+
let classes = block.className + " ";
|
|
28060
|
+
classes += block.parentNode ? block.parentNode.className : "";
|
|
28061
|
+
const match = options.languageDetectRe.exec(classes);
|
|
28062
|
+
if (match) {
|
|
28063
|
+
const language = getLanguage(match[1]);
|
|
28064
|
+
if (!language) {
|
|
28065
|
+
warn$1(LANGUAGE_NOT_FOUND.replace("{}", match[1]));
|
|
28066
|
+
warn$1("Falling back to no-highlight mode for this block.", block);
|
|
28067
|
+
}
|
|
28068
|
+
return language ? match[1] : "no-highlight";
|
|
28069
|
+
}
|
|
28070
|
+
return classes.split(/\s+/).find((_class) => shouldNotHighlight(_class) || getLanguage(_class));
|
|
28071
|
+
}
|
|
28072
|
+
function highlight2(codeOrLanguageName, optionsOrCode, ignoreIllegals) {
|
|
28073
|
+
let code = "";
|
|
28074
|
+
let languageName = "";
|
|
28075
|
+
if (typeof optionsOrCode === "object") {
|
|
28076
|
+
code = codeOrLanguageName;
|
|
28077
|
+
ignoreIllegals = optionsOrCode.ignoreIllegals;
|
|
28078
|
+
languageName = optionsOrCode.language;
|
|
28079
|
+
} else {
|
|
28080
|
+
deprecated$1("10.7.0", "highlight(lang, code, ...args) has been deprecated.");
|
|
28081
|
+
deprecated$1("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277");
|
|
28082
|
+
languageName = codeOrLanguageName;
|
|
28083
|
+
code = optionsOrCode;
|
|
28084
|
+
}
|
|
28085
|
+
if (ignoreIllegals === void 0) {
|
|
28086
|
+
ignoreIllegals = true;
|
|
28087
|
+
}
|
|
28088
|
+
const context = {
|
|
28089
|
+
code,
|
|
28090
|
+
language: languageName
|
|
28091
|
+
};
|
|
28092
|
+
fire("before:highlight", context);
|
|
28093
|
+
const result = context.result ? context.result : _highlight(context.language, context.code, ignoreIllegals);
|
|
28094
|
+
result.code = context.code;
|
|
28095
|
+
fire("after:highlight", result);
|
|
28096
|
+
return result;
|
|
28097
|
+
}
|
|
28098
|
+
function _highlight(languageName, codeToHighlight, ignoreIllegals, continuation) {
|
|
28099
|
+
const keywordHits = /* @__PURE__ */ Object.create(null);
|
|
28100
|
+
function keywordData(mode, matchText) {
|
|
28101
|
+
return mode.keywords[matchText];
|
|
28102
|
+
}
|
|
28103
|
+
function processKeywords() {
|
|
28104
|
+
if (!top2.keywords) {
|
|
28105
|
+
emitter.addText(modeBuffer);
|
|
28106
|
+
return;
|
|
28107
|
+
}
|
|
28108
|
+
let lastIndex = 0;
|
|
28109
|
+
top2.keywordPatternRe.lastIndex = 0;
|
|
28110
|
+
let match = top2.keywordPatternRe.exec(modeBuffer);
|
|
28111
|
+
let buf = "";
|
|
28112
|
+
while (match) {
|
|
28113
|
+
buf += modeBuffer.substring(lastIndex, match.index);
|
|
28114
|
+
const word = language.case_insensitive ? match[0].toLowerCase() : match[0];
|
|
28115
|
+
const data = keywordData(top2, word);
|
|
28116
|
+
if (data) {
|
|
28117
|
+
const [kind, keywordRelevance] = data;
|
|
28118
|
+
emitter.addText(buf);
|
|
28119
|
+
buf = "";
|
|
28120
|
+
keywordHits[word] = (keywordHits[word] || 0) + 1;
|
|
28121
|
+
if (keywordHits[word] <= MAX_KEYWORD_HITS$1)
|
|
28122
|
+
relevance += keywordRelevance;
|
|
28123
|
+
if (kind.startsWith("_")) {
|
|
28124
|
+
buf += match[0];
|
|
28125
|
+
} else {
|
|
28126
|
+
const cssClass = language.classNameAliases[kind] || kind;
|
|
28127
|
+
emitter.addKeyword(match[0], cssClass);
|
|
28128
|
+
}
|
|
28129
|
+
} else {
|
|
28130
|
+
buf += match[0];
|
|
28131
|
+
}
|
|
28132
|
+
lastIndex = top2.keywordPatternRe.lastIndex;
|
|
28133
|
+
match = top2.keywordPatternRe.exec(modeBuffer);
|
|
28134
|
+
}
|
|
28135
|
+
buf += modeBuffer.substring(lastIndex);
|
|
28136
|
+
emitter.addText(buf);
|
|
28137
|
+
}
|
|
28138
|
+
function processSubLanguage() {
|
|
28139
|
+
if (modeBuffer === "")
|
|
28140
|
+
return;
|
|
28141
|
+
let result2 = null;
|
|
28142
|
+
if (typeof top2.subLanguage === "string") {
|
|
28143
|
+
if (!languages[top2.subLanguage]) {
|
|
28144
|
+
emitter.addText(modeBuffer);
|
|
28145
|
+
return;
|
|
28146
|
+
}
|
|
28147
|
+
result2 = _highlight(top2.subLanguage, modeBuffer, true, continuations[top2.subLanguage]);
|
|
28148
|
+
continuations[top2.subLanguage] = result2._top;
|
|
28149
|
+
} else {
|
|
28150
|
+
result2 = highlightAuto2(modeBuffer, top2.subLanguage.length ? top2.subLanguage : null);
|
|
28151
|
+
}
|
|
28152
|
+
if (top2.relevance > 0) {
|
|
28153
|
+
relevance += result2.relevance;
|
|
28154
|
+
}
|
|
28155
|
+
emitter.addSublanguage(result2._emitter, result2.language);
|
|
28156
|
+
}
|
|
28157
|
+
function processBuffer() {
|
|
28158
|
+
if (top2.subLanguage != null) {
|
|
28159
|
+
processSubLanguage();
|
|
28160
|
+
} else {
|
|
28161
|
+
processKeywords();
|
|
28162
|
+
}
|
|
28163
|
+
modeBuffer = "";
|
|
28164
|
+
}
|
|
28165
|
+
function emitMultiClass(scope, match) {
|
|
28166
|
+
let i = 1;
|
|
28167
|
+
const max2 = match.length - 1;
|
|
28168
|
+
while (i <= max2) {
|
|
28169
|
+
if (!scope._emit[i]) {
|
|
28170
|
+
i++;
|
|
28171
|
+
continue;
|
|
28172
|
+
}
|
|
28173
|
+
const klass = language.classNameAliases[scope[i]] || scope[i];
|
|
28174
|
+
const text2 = match[i];
|
|
28175
|
+
if (klass) {
|
|
28176
|
+
emitter.addKeyword(text2, klass);
|
|
28177
|
+
} else {
|
|
28178
|
+
modeBuffer = text2;
|
|
28179
|
+
processKeywords();
|
|
28180
|
+
modeBuffer = "";
|
|
28181
|
+
}
|
|
28182
|
+
i++;
|
|
28183
|
+
}
|
|
28184
|
+
}
|
|
28185
|
+
function startNewMode(mode, match) {
|
|
28186
|
+
if (mode.scope && typeof mode.scope === "string") {
|
|
28187
|
+
emitter.openNode(language.classNameAliases[mode.scope] || mode.scope);
|
|
28188
|
+
}
|
|
28189
|
+
if (mode.beginScope) {
|
|
28190
|
+
if (mode.beginScope._wrap) {
|
|
28191
|
+
emitter.addKeyword(modeBuffer, language.classNameAliases[mode.beginScope._wrap] || mode.beginScope._wrap);
|
|
28192
|
+
modeBuffer = "";
|
|
28193
|
+
} else if (mode.beginScope._multi) {
|
|
28194
|
+
emitMultiClass(mode.beginScope, match);
|
|
28195
|
+
modeBuffer = "";
|
|
28196
|
+
}
|
|
28197
|
+
}
|
|
28198
|
+
top2 = Object.create(mode, { parent: { value: top2 } });
|
|
28199
|
+
return top2;
|
|
28200
|
+
}
|
|
28201
|
+
function endOfMode(mode, match, matchPlusRemainder) {
|
|
28202
|
+
let matched = startsWith$1(mode.endRe, matchPlusRemainder);
|
|
28203
|
+
if (matched) {
|
|
28204
|
+
if (mode["on:end"]) {
|
|
28205
|
+
const resp = new Response$1(mode);
|
|
28206
|
+
mode["on:end"](match, resp);
|
|
28207
|
+
if (resp.isMatchIgnored)
|
|
28208
|
+
matched = false;
|
|
28209
|
+
}
|
|
28210
|
+
if (matched) {
|
|
28211
|
+
while (mode.endsParent && mode.parent) {
|
|
28212
|
+
mode = mode.parent;
|
|
28213
|
+
}
|
|
28214
|
+
return mode;
|
|
28215
|
+
}
|
|
28216
|
+
}
|
|
28217
|
+
if (mode.endsWithParent) {
|
|
28218
|
+
return endOfMode(mode.parent, match, matchPlusRemainder);
|
|
28219
|
+
}
|
|
28220
|
+
}
|
|
28221
|
+
function doIgnore(lexeme) {
|
|
28222
|
+
if (top2.matcher.regexIndex === 0) {
|
|
28223
|
+
modeBuffer += lexeme[0];
|
|
28224
|
+
return 1;
|
|
28225
|
+
} else {
|
|
28226
|
+
resumeScanAtSamePosition = true;
|
|
28227
|
+
return 0;
|
|
27112
28228
|
}
|
|
27113
|
-
}
|
|
27114
|
-
|
|
27115
|
-
|
|
27116
|
-
|
|
27117
|
-
|
|
27118
|
-
|
|
27119
|
-
|
|
27120
|
-
|
|
27121
|
-
|
|
27122
|
-
|
|
28229
|
+
}
|
|
28230
|
+
function doBeginMatch(match) {
|
|
28231
|
+
const lexeme = match[0];
|
|
28232
|
+
const newMode = match.rule;
|
|
28233
|
+
const resp = new Response$1(newMode);
|
|
28234
|
+
const beforeCallbacks = [newMode.__beforeBegin, newMode["on:begin"]];
|
|
28235
|
+
for (const cb of beforeCallbacks) {
|
|
28236
|
+
if (!cb)
|
|
28237
|
+
continue;
|
|
28238
|
+
cb(match, resp);
|
|
28239
|
+
if (resp.isMatchIgnored)
|
|
28240
|
+
return doIgnore(lexeme);
|
|
28241
|
+
}
|
|
28242
|
+
if (newMode.skip) {
|
|
28243
|
+
modeBuffer += lexeme;
|
|
28244
|
+
} else {
|
|
28245
|
+
if (newMode.excludeBegin) {
|
|
28246
|
+
modeBuffer += lexeme;
|
|
27123
28247
|
}
|
|
27124
|
-
|
|
27125
|
-
|
|
28248
|
+
processBuffer();
|
|
28249
|
+
if (!newMode.returnBegin && !newMode.excludeBegin) {
|
|
28250
|
+
modeBuffer = lexeme;
|
|
27126
28251
|
}
|
|
27127
|
-
|
|
27128
|
-
|
|
27129
|
-
|
|
27130
|
-
|
|
27131
|
-
|
|
28252
|
+
}
|
|
28253
|
+
startNewMode(newMode, match);
|
|
28254
|
+
return newMode.returnBegin ? 0 : lexeme.length;
|
|
28255
|
+
}
|
|
28256
|
+
function doEndMatch(match) {
|
|
28257
|
+
const lexeme = match[0];
|
|
28258
|
+
const matchPlusRemainder = codeToHighlight.substring(match.index);
|
|
28259
|
+
const endMode = endOfMode(top2, match, matchPlusRemainder);
|
|
28260
|
+
if (!endMode) {
|
|
28261
|
+
return NO_MATCH$1;
|
|
28262
|
+
}
|
|
28263
|
+
const origin = top2;
|
|
28264
|
+
if (top2.endScope && top2.endScope._wrap) {
|
|
28265
|
+
processBuffer();
|
|
28266
|
+
emitter.addKeyword(lexeme, top2.endScope._wrap);
|
|
28267
|
+
} else if (top2.endScope && top2.endScope._multi) {
|
|
28268
|
+
processBuffer();
|
|
28269
|
+
emitMultiClass(top2.endScope, match);
|
|
28270
|
+
} else if (origin.skip) {
|
|
28271
|
+
modeBuffer += lexeme;
|
|
28272
|
+
} else {
|
|
28273
|
+
if (!(origin.returnEnd || origin.excludeEnd)) {
|
|
28274
|
+
modeBuffer += lexeme;
|
|
27132
28275
|
}
|
|
27133
|
-
|
|
27134
|
-
|
|
27135
|
-
|
|
27136
|
-
if (!empty2 || $from.parent.type !== this.type) {
|
|
27137
|
-
return false;
|
|
28276
|
+
processBuffer();
|
|
28277
|
+
if (origin.excludeEnd) {
|
|
28278
|
+
modeBuffer = lexeme;
|
|
27138
28279
|
}
|
|
27139
|
-
|
|
27140
|
-
|
|
27141
|
-
if (
|
|
27142
|
-
|
|
28280
|
+
}
|
|
28281
|
+
do {
|
|
28282
|
+
if (top2.scope) {
|
|
28283
|
+
emitter.closeNode();
|
|
27143
28284
|
}
|
|
27144
|
-
|
|
27145
|
-
|
|
27146
|
-
return true;
|
|
27147
|
-
}).exitCode().run();
|
|
27148
|
-
},
|
|
27149
|
-
ArrowDown: ({ editor }) => {
|
|
27150
|
-
if (!this.options.exitOnArrowDown) {
|
|
27151
|
-
return false;
|
|
28285
|
+
if (!top2.skip && !top2.subLanguage) {
|
|
28286
|
+
relevance += top2.relevance;
|
|
27152
28287
|
}
|
|
27153
|
-
|
|
27154
|
-
|
|
27155
|
-
|
|
27156
|
-
|
|
27157
|
-
|
|
28288
|
+
top2 = top2.parent;
|
|
28289
|
+
} while (top2 !== endMode.parent);
|
|
28290
|
+
if (endMode.starts) {
|
|
28291
|
+
startNewMode(endMode.starts, match);
|
|
28292
|
+
}
|
|
28293
|
+
return origin.returnEnd ? 0 : lexeme.length;
|
|
28294
|
+
}
|
|
28295
|
+
function processContinuations() {
|
|
28296
|
+
const list = [];
|
|
28297
|
+
for (let current = top2; current !== language; current = current.parent) {
|
|
28298
|
+
if (current.scope) {
|
|
28299
|
+
list.unshift(current.scope);
|
|
27158
28300
|
}
|
|
27159
|
-
|
|
27160
|
-
|
|
27161
|
-
|
|
28301
|
+
}
|
|
28302
|
+
list.forEach((item) => emitter.openNode(item));
|
|
28303
|
+
}
|
|
28304
|
+
let lastMatch = {};
|
|
28305
|
+
function processLexeme(textBeforeMatch, match) {
|
|
28306
|
+
const lexeme = match && match[0];
|
|
28307
|
+
modeBuffer += textBeforeMatch;
|
|
28308
|
+
if (lexeme == null) {
|
|
28309
|
+
processBuffer();
|
|
28310
|
+
return 0;
|
|
28311
|
+
}
|
|
28312
|
+
if (lastMatch.type === "begin" && match.type === "end" && lastMatch.index === match.index && lexeme === "") {
|
|
28313
|
+
modeBuffer += codeToHighlight.slice(match.index, match.index + 1);
|
|
28314
|
+
if (!SAFE_MODE) {
|
|
28315
|
+
const err = new Error(`0 width match regex (${languageName})`);
|
|
28316
|
+
err.languageName = languageName;
|
|
28317
|
+
err.badRule = lastMatch.rule;
|
|
28318
|
+
throw err;
|
|
27162
28319
|
}
|
|
27163
|
-
|
|
27164
|
-
|
|
27165
|
-
|
|
28320
|
+
return 1;
|
|
28321
|
+
}
|
|
28322
|
+
lastMatch = match;
|
|
28323
|
+
if (match.type === "begin") {
|
|
28324
|
+
return doBeginMatch(match);
|
|
28325
|
+
} else if (match.type === "illegal" && !ignoreIllegals) {
|
|
28326
|
+
const err = new Error('Illegal lexeme "' + lexeme + '" for mode "' + (top2.scope || "<unnamed>") + '"');
|
|
28327
|
+
err.mode = top2;
|
|
28328
|
+
throw err;
|
|
28329
|
+
} else if (match.type === "end") {
|
|
28330
|
+
const processed = doEndMatch(match);
|
|
28331
|
+
if (processed !== NO_MATCH$1) {
|
|
28332
|
+
return processed;
|
|
27166
28333
|
}
|
|
27167
|
-
|
|
27168
|
-
|
|
27169
|
-
|
|
28334
|
+
}
|
|
28335
|
+
if (match.type === "illegal" && lexeme === "") {
|
|
28336
|
+
return 1;
|
|
28337
|
+
}
|
|
28338
|
+
if (iterations > 1e5 && iterations > match.index * 3) {
|
|
28339
|
+
const err = new Error("potential infinite loop, way more iterations than matches");
|
|
28340
|
+
throw err;
|
|
28341
|
+
}
|
|
28342
|
+
modeBuffer += lexeme;
|
|
28343
|
+
return lexeme.length;
|
|
28344
|
+
}
|
|
28345
|
+
const language = getLanguage(languageName);
|
|
28346
|
+
if (!language) {
|
|
28347
|
+
error$1(LANGUAGE_NOT_FOUND.replace("{}", languageName));
|
|
28348
|
+
throw new Error('Unknown language: "' + languageName + '"');
|
|
28349
|
+
}
|
|
28350
|
+
const md = compileLanguage$1(language);
|
|
28351
|
+
let result = "";
|
|
28352
|
+
let top2 = continuation || md;
|
|
28353
|
+
const continuations = {};
|
|
28354
|
+
const emitter = new options.__emitter(options);
|
|
28355
|
+
processContinuations();
|
|
28356
|
+
let modeBuffer = "";
|
|
28357
|
+
let relevance = 0;
|
|
28358
|
+
let index2 = 0;
|
|
28359
|
+
let iterations = 0;
|
|
28360
|
+
let resumeScanAtSamePosition = false;
|
|
28361
|
+
try {
|
|
28362
|
+
top2.matcher.considerAll();
|
|
28363
|
+
for (; ; ) {
|
|
28364
|
+
iterations++;
|
|
28365
|
+
if (resumeScanAtSamePosition) {
|
|
28366
|
+
resumeScanAtSamePosition = false;
|
|
28367
|
+
} else {
|
|
28368
|
+
top2.matcher.considerAll();
|
|
27170
28369
|
}
|
|
27171
|
-
|
|
28370
|
+
top2.matcher.lastIndex = index2;
|
|
28371
|
+
const match = top2.matcher.exec(codeToHighlight);
|
|
28372
|
+
if (!match)
|
|
28373
|
+
break;
|
|
28374
|
+
const beforeMatch = codeToHighlight.substring(index2, match.index);
|
|
28375
|
+
const processedCount = processLexeme(beforeMatch, match);
|
|
28376
|
+
index2 = match.index + processedCount;
|
|
28377
|
+
}
|
|
28378
|
+
processLexeme(codeToHighlight.substring(index2));
|
|
28379
|
+
emitter.closeAllNodes();
|
|
28380
|
+
emitter.finalize();
|
|
28381
|
+
result = emitter.toHTML();
|
|
28382
|
+
return {
|
|
28383
|
+
language: languageName,
|
|
28384
|
+
value: result,
|
|
28385
|
+
relevance,
|
|
28386
|
+
illegal: false,
|
|
28387
|
+
_emitter: emitter,
|
|
28388
|
+
_top: top2
|
|
28389
|
+
};
|
|
28390
|
+
} catch (err) {
|
|
28391
|
+
if (err.message && err.message.includes("Illegal")) {
|
|
28392
|
+
return {
|
|
28393
|
+
language: languageName,
|
|
28394
|
+
value: escape$3(codeToHighlight),
|
|
28395
|
+
illegal: true,
|
|
28396
|
+
relevance: 0,
|
|
28397
|
+
_illegalBy: {
|
|
28398
|
+
message: err.message,
|
|
28399
|
+
index: index2,
|
|
28400
|
+
context: codeToHighlight.slice(index2 - 100, index2 + 100),
|
|
28401
|
+
mode: err.mode,
|
|
28402
|
+
resultSoFar: result
|
|
28403
|
+
},
|
|
28404
|
+
_emitter: emitter
|
|
28405
|
+
};
|
|
28406
|
+
} else if (SAFE_MODE) {
|
|
28407
|
+
return {
|
|
28408
|
+
language: languageName,
|
|
28409
|
+
value: escape$3(codeToHighlight),
|
|
28410
|
+
illegal: false,
|
|
28411
|
+
relevance: 0,
|
|
28412
|
+
errorRaised: err,
|
|
28413
|
+
_emitter: emitter,
|
|
28414
|
+
_top: top2
|
|
28415
|
+
};
|
|
28416
|
+
} else {
|
|
28417
|
+
throw err;
|
|
27172
28418
|
}
|
|
28419
|
+
}
|
|
28420
|
+
}
|
|
28421
|
+
function justTextHighlightResult(code) {
|
|
28422
|
+
const result = {
|
|
28423
|
+
value: escape$3(code),
|
|
28424
|
+
illegal: false,
|
|
28425
|
+
relevance: 0,
|
|
28426
|
+
_top: PLAINTEXT_LANGUAGE,
|
|
28427
|
+
_emitter: new options.__emitter(options)
|
|
27173
28428
|
};
|
|
27174
|
-
|
|
27175
|
-
|
|
27176
|
-
|
|
27177
|
-
|
|
27178
|
-
|
|
27179
|
-
|
|
27180
|
-
|
|
27181
|
-
|
|
27182
|
-
|
|
27183
|
-
|
|
27184
|
-
|
|
27185
|
-
|
|
27186
|
-
|
|
27187
|
-
|
|
27188
|
-
|
|
27189
|
-
|
|
27190
|
-
|
|
27191
|
-
|
|
27192
|
-
},
|
|
27193
|
-
addProseMirrorPlugins() {
|
|
27194
|
-
return [
|
|
27195
|
-
new Plugin({
|
|
27196
|
-
key: new PluginKey("codeBlockVSCodeHandler"),
|
|
27197
|
-
props: {
|
|
27198
|
-
handlePaste: (view, event) => {
|
|
27199
|
-
if (!event.clipboardData) {
|
|
27200
|
-
return false;
|
|
27201
|
-
}
|
|
27202
|
-
if (this.editor.isActive(this.type.name)) {
|
|
27203
|
-
return false;
|
|
27204
|
-
}
|
|
27205
|
-
const text2 = event.clipboardData.getData("text/plain");
|
|
27206
|
-
const vscode = event.clipboardData.getData("vscode-editor-data");
|
|
27207
|
-
const vscodeData = vscode ? JSON.parse(vscode) : void 0;
|
|
27208
|
-
const language = vscodeData === null || vscodeData === void 0 ? void 0 : vscodeData.mode;
|
|
27209
|
-
if (!text2 || !language) {
|
|
27210
|
-
return false;
|
|
27211
|
-
}
|
|
27212
|
-
const { tr } = view.state;
|
|
27213
|
-
tr.replaceSelectionWith(this.type.create({ language }));
|
|
27214
|
-
tr.setSelection(TextSelection.near(tr.doc.resolve(Math.max(0, tr.selection.from - 2))));
|
|
27215
|
-
tr.insertText(text2.replace(/\r\n?/g, "\n"));
|
|
27216
|
-
tr.setMeta("paste", true);
|
|
27217
|
-
view.dispatch(tr);
|
|
27218
|
-
return true;
|
|
27219
|
-
}
|
|
28429
|
+
result._emitter.addText(code);
|
|
28430
|
+
return result;
|
|
28431
|
+
}
|
|
28432
|
+
function highlightAuto2(code, languageSubset) {
|
|
28433
|
+
languageSubset = languageSubset || options.languages || Object.keys(languages);
|
|
28434
|
+
const plaintext2 = justTextHighlightResult(code);
|
|
28435
|
+
const results = languageSubset.filter(getLanguage).filter(autoDetection).map(
|
|
28436
|
+
(name) => _highlight(name, code, false)
|
|
28437
|
+
);
|
|
28438
|
+
results.unshift(plaintext2);
|
|
28439
|
+
const sorted = results.sort((a, b) => {
|
|
28440
|
+
if (a.relevance !== b.relevance)
|
|
28441
|
+
return b.relevance - a.relevance;
|
|
28442
|
+
if (a.language && b.language) {
|
|
28443
|
+
if (getLanguage(a.language).supersetOf === b.language) {
|
|
28444
|
+
return 1;
|
|
28445
|
+
} else if (getLanguage(b.language).supersetOf === a.language) {
|
|
28446
|
+
return -1;
|
|
27220
28447
|
}
|
|
27221
|
-
}
|
|
27222
|
-
|
|
28448
|
+
}
|
|
28449
|
+
return 0;
|
|
28450
|
+
});
|
|
28451
|
+
const [best, secondBest] = sorted;
|
|
28452
|
+
const result = best;
|
|
28453
|
+
result.secondBest = secondBest;
|
|
28454
|
+
return result;
|
|
27223
28455
|
}
|
|
27224
|
-
|
|
28456
|
+
function updateClassName(element, currentLang, resultLang) {
|
|
28457
|
+
const language = currentLang && aliases[currentLang] || resultLang;
|
|
28458
|
+
element.classList.add("hljs");
|
|
28459
|
+
element.classList.add(`language-${language}`);
|
|
28460
|
+
}
|
|
28461
|
+
function highlightElement(element) {
|
|
28462
|
+
let node = null;
|
|
28463
|
+
const language = blockLanguage(element);
|
|
28464
|
+
if (shouldNotHighlight(language))
|
|
28465
|
+
return;
|
|
28466
|
+
fire(
|
|
28467
|
+
"before:highlightElement",
|
|
28468
|
+
{ el: element, language }
|
|
28469
|
+
);
|
|
28470
|
+
if (element.children.length > 0) {
|
|
28471
|
+
if (!options.ignoreUnescapedHTML) {
|
|
28472
|
+
console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk.");
|
|
28473
|
+
console.warn("https://github.com/highlightjs/highlight.js/wiki/security");
|
|
28474
|
+
console.warn("The element with unescaped HTML:");
|
|
28475
|
+
console.warn(element);
|
|
28476
|
+
}
|
|
28477
|
+
if (options.throwUnescapedHTML) {
|
|
28478
|
+
const err = new HTMLInjectionError$1(
|
|
28479
|
+
"One of your code blocks includes unescaped HTML.",
|
|
28480
|
+
element.innerHTML
|
|
28481
|
+
);
|
|
28482
|
+
throw err;
|
|
28483
|
+
}
|
|
28484
|
+
}
|
|
28485
|
+
node = element;
|
|
28486
|
+
const text2 = node.textContent;
|
|
28487
|
+
const result = language ? highlight2(text2, { language, ignoreIllegals: true }) : highlightAuto2(text2);
|
|
28488
|
+
element.innerHTML = result.value;
|
|
28489
|
+
updateClassName(element, language, result.language);
|
|
28490
|
+
element.result = {
|
|
28491
|
+
language: result.language,
|
|
28492
|
+
re: result.relevance,
|
|
28493
|
+
relevance: result.relevance
|
|
28494
|
+
};
|
|
28495
|
+
if (result.secondBest) {
|
|
28496
|
+
element.secondBest = {
|
|
28497
|
+
language: result.secondBest.language,
|
|
28498
|
+
relevance: result.secondBest.relevance
|
|
28499
|
+
};
|
|
28500
|
+
}
|
|
28501
|
+
fire("after:highlightElement", { el: element, result, text: text2 });
|
|
28502
|
+
}
|
|
28503
|
+
function configure(userOptions) {
|
|
28504
|
+
options = inherit$2(options, userOptions);
|
|
28505
|
+
}
|
|
28506
|
+
const initHighlighting = () => {
|
|
28507
|
+
highlightAll();
|
|
28508
|
+
deprecated$1("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
28509
|
+
};
|
|
28510
|
+
function initHighlightingOnLoad() {
|
|
28511
|
+
highlightAll();
|
|
28512
|
+
deprecated$1("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
28513
|
+
}
|
|
28514
|
+
let wantsHighlight = false;
|
|
28515
|
+
function highlightAll() {
|
|
28516
|
+
if (document.readyState === "loading") {
|
|
28517
|
+
wantsHighlight = true;
|
|
28518
|
+
return;
|
|
28519
|
+
}
|
|
28520
|
+
const blocks = document.querySelectorAll(options.cssSelector);
|
|
28521
|
+
blocks.forEach(highlightElement);
|
|
28522
|
+
}
|
|
28523
|
+
function boot() {
|
|
28524
|
+
if (wantsHighlight)
|
|
28525
|
+
highlightAll();
|
|
28526
|
+
}
|
|
28527
|
+
if (typeof window !== "undefined" && window.addEventListener) {
|
|
28528
|
+
window.addEventListener("DOMContentLoaded", boot, false);
|
|
28529
|
+
}
|
|
28530
|
+
function registerLanguage2(languageName, languageDefinition) {
|
|
28531
|
+
let lang = null;
|
|
28532
|
+
try {
|
|
28533
|
+
lang = languageDefinition(hljs);
|
|
28534
|
+
} catch (error$1$1) {
|
|
28535
|
+
error$1("Language definition for '{}' could not be registered.".replace("{}", languageName));
|
|
28536
|
+
if (!SAFE_MODE) {
|
|
28537
|
+
throw error$1$1;
|
|
28538
|
+
} else {
|
|
28539
|
+
error$1(error$1$1);
|
|
28540
|
+
}
|
|
28541
|
+
lang = PLAINTEXT_LANGUAGE;
|
|
28542
|
+
}
|
|
28543
|
+
if (!lang.name)
|
|
28544
|
+
lang.name = languageName;
|
|
28545
|
+
languages[languageName] = lang;
|
|
28546
|
+
lang.rawDefinition = languageDefinition.bind(null, hljs);
|
|
28547
|
+
if (lang.aliases) {
|
|
28548
|
+
registerAliases(lang.aliases, { languageName });
|
|
28549
|
+
}
|
|
28550
|
+
}
|
|
28551
|
+
function unregisterLanguage(languageName) {
|
|
28552
|
+
delete languages[languageName];
|
|
28553
|
+
for (const alias of Object.keys(aliases)) {
|
|
28554
|
+
if (aliases[alias] === languageName) {
|
|
28555
|
+
delete aliases[alias];
|
|
28556
|
+
}
|
|
28557
|
+
}
|
|
28558
|
+
}
|
|
28559
|
+
function listLanguages2() {
|
|
28560
|
+
return Object.keys(languages);
|
|
28561
|
+
}
|
|
28562
|
+
function getLanguage(name) {
|
|
28563
|
+
name = (name || "").toLowerCase();
|
|
28564
|
+
return languages[name] || languages[aliases[name]];
|
|
28565
|
+
}
|
|
28566
|
+
function registerAliases(aliasList, { languageName }) {
|
|
28567
|
+
if (typeof aliasList === "string") {
|
|
28568
|
+
aliasList = [aliasList];
|
|
28569
|
+
}
|
|
28570
|
+
aliasList.forEach((alias) => {
|
|
28571
|
+
aliases[alias.toLowerCase()] = languageName;
|
|
28572
|
+
});
|
|
28573
|
+
}
|
|
28574
|
+
function autoDetection(name) {
|
|
28575
|
+
const lang = getLanguage(name);
|
|
28576
|
+
return lang && !lang.disableAutodetect;
|
|
28577
|
+
}
|
|
28578
|
+
function upgradePluginAPI(plugin2) {
|
|
28579
|
+
if (plugin2["before:highlightBlock"] && !plugin2["before:highlightElement"]) {
|
|
28580
|
+
plugin2["before:highlightElement"] = (data) => {
|
|
28581
|
+
plugin2["before:highlightBlock"](
|
|
28582
|
+
Object.assign({ block: data.el }, data)
|
|
28583
|
+
);
|
|
28584
|
+
};
|
|
28585
|
+
}
|
|
28586
|
+
if (plugin2["after:highlightBlock"] && !plugin2["after:highlightElement"]) {
|
|
28587
|
+
plugin2["after:highlightElement"] = (data) => {
|
|
28588
|
+
plugin2["after:highlightBlock"](
|
|
28589
|
+
Object.assign({ block: data.el }, data)
|
|
28590
|
+
);
|
|
28591
|
+
};
|
|
28592
|
+
}
|
|
28593
|
+
}
|
|
28594
|
+
function addPlugin(plugin2) {
|
|
28595
|
+
upgradePluginAPI(plugin2);
|
|
28596
|
+
plugins.push(plugin2);
|
|
28597
|
+
}
|
|
28598
|
+
function fire(event, args) {
|
|
28599
|
+
const cb = event;
|
|
28600
|
+
plugins.forEach(function(plugin2) {
|
|
28601
|
+
if (plugin2[cb]) {
|
|
28602
|
+
plugin2[cb](args);
|
|
28603
|
+
}
|
|
28604
|
+
});
|
|
28605
|
+
}
|
|
28606
|
+
function deprecateHighlightBlock(el) {
|
|
28607
|
+
deprecated$1("10.7.0", "highlightBlock will be removed entirely in v12.0");
|
|
28608
|
+
deprecated$1("10.7.0", "Please use highlightElement now.");
|
|
28609
|
+
return highlightElement(el);
|
|
28610
|
+
}
|
|
28611
|
+
Object.assign(hljs, {
|
|
28612
|
+
highlight: highlight2,
|
|
28613
|
+
highlightAuto: highlightAuto2,
|
|
28614
|
+
highlightAll,
|
|
28615
|
+
highlightElement,
|
|
28616
|
+
highlightBlock: deprecateHighlightBlock,
|
|
28617
|
+
configure,
|
|
28618
|
+
initHighlighting,
|
|
28619
|
+
initHighlightingOnLoad,
|
|
28620
|
+
registerLanguage: registerLanguage2,
|
|
28621
|
+
unregisterLanguage,
|
|
28622
|
+
listLanguages: listLanguages2,
|
|
28623
|
+
getLanguage,
|
|
28624
|
+
registerAliases,
|
|
28625
|
+
autoDetection,
|
|
28626
|
+
inherit: inherit$2,
|
|
28627
|
+
addPlugin
|
|
28628
|
+
});
|
|
28629
|
+
hljs.debugMode = function() {
|
|
28630
|
+
SAFE_MODE = false;
|
|
28631
|
+
};
|
|
28632
|
+
hljs.safeMode = function() {
|
|
28633
|
+
SAFE_MODE = true;
|
|
28634
|
+
};
|
|
28635
|
+
hljs.versionString = version$1;
|
|
28636
|
+
hljs.regex = {
|
|
28637
|
+
concat: concat$3,
|
|
28638
|
+
lookahead: lookahead$3,
|
|
28639
|
+
either: either$3,
|
|
28640
|
+
optional: optional$1,
|
|
28641
|
+
anyNumberOfTimes: anyNumberOfTimes$1
|
|
28642
|
+
};
|
|
28643
|
+
for (const key2 in MODES$5) {
|
|
28644
|
+
if (typeof MODES$5[key2] === "object") {
|
|
28645
|
+
deepFreezeEs6$1.exports(MODES$5[key2]);
|
|
28646
|
+
}
|
|
28647
|
+
}
|
|
28648
|
+
Object.assign(hljs, MODES$5);
|
|
28649
|
+
return hljs;
|
|
28650
|
+
};
|
|
28651
|
+
var highlight$2 = HLJS$1({});
|
|
28652
|
+
var core$1 = highlight$2;
|
|
28653
|
+
highlight$2.HighlightJS = highlight$2;
|
|
28654
|
+
highlight$2.default = highlight$2;
|
|
28655
|
+
var HighlightJS$1 = core$1;
|
|
27225
28656
|
function parseNodes(nodes, className = []) {
|
|
27226
28657
|
return nodes.map((node) => {
|
|
27227
28658
|
const classes = [
|
|
@@ -27240,13 +28671,16 @@ function parseNodes(nodes, className = []) {
|
|
|
27240
28671
|
function getHighlightNodes(result) {
|
|
27241
28672
|
return result.value || result.children || [];
|
|
27242
28673
|
}
|
|
28674
|
+
function registered$1(aliasOrLanguage) {
|
|
28675
|
+
return Boolean(HighlightJS$1.getLanguage(aliasOrLanguage));
|
|
28676
|
+
}
|
|
27243
28677
|
function getDecorations({ doc: doc2, name, lowlight: lowlight2, defaultLanguage }) {
|
|
27244
28678
|
const decorations = [];
|
|
27245
28679
|
findChildren(doc2, (node) => node.type.name === name).forEach((block) => {
|
|
27246
28680
|
let from2 = block.pos + 1;
|
|
27247
28681
|
const language = block.node.attrs.language || defaultLanguage;
|
|
27248
28682
|
const languages = lowlight2.listLanguages();
|
|
27249
|
-
const nodes = language && languages.includes(language) ? getHighlightNodes(lowlight2.highlight(language, block.node.textContent)) : getHighlightNodes(lowlight2.highlightAuto(block.node.textContent));
|
|
28683
|
+
const nodes = language && (languages.includes(language) || registered$1(language)) ? getHighlightNodes(lowlight2.highlight(language, block.node.textContent)) : getHighlightNodes(lowlight2.highlightAuto(block.node.textContent));
|
|
27250
28684
|
parseNodes(nodes).forEach((node) => {
|
|
27251
28685
|
const to = from2 + node.text.length;
|
|
27252
28686
|
if (node.classes.length) {
|
|
@@ -40200,12 +41634,12 @@ const HLJS = function(hljs) {
|
|
|
40200
41634
|
let lang = null;
|
|
40201
41635
|
try {
|
|
40202
41636
|
lang = languageDefinition(hljs);
|
|
40203
|
-
} catch (error$
|
|
41637
|
+
} catch (error$12) {
|
|
40204
41638
|
error("Language definition for '{}' could not be registered.".replace("{}", languageName));
|
|
40205
41639
|
if (!SAFE_MODE) {
|
|
40206
|
-
throw error$
|
|
41640
|
+
throw error$12;
|
|
40207
41641
|
} else {
|
|
40208
|
-
error(error$
|
|
41642
|
+
error(error$12);
|
|
40209
41643
|
}
|
|
40210
41644
|
lang = PLAINTEXT_LANGUAGE;
|
|
40211
41645
|
}
|
|
@@ -73691,7 +75125,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
73691
75125
|
])
|
|
73692
75126
|
]),
|
|
73693
75127
|
createElementVNode("pre", null, [
|
|
73694
|
-
|
|
75128
|
+
createElementVNode("code", null, [
|
|
75129
|
+
createVNode(unref(NodeViewContent))
|
|
75130
|
+
])
|
|
73695
75131
|
])
|
|
73696
75132
|
]),
|
|
73697
75133
|
_: 1
|
|
@@ -74247,6 +75683,32 @@ var path = {
|
|
|
74247
75683
|
shortbaraboveleftharpoon: "M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",
|
|
74248
75684
|
shortrightharpoonabovebar: "M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"
|
|
74249
75685
|
};
|
|
75686
|
+
var tallDelim = function tallDelim2(label, midHeight) {
|
|
75687
|
+
switch (label) {
|
|
75688
|
+
case "lbrack":
|
|
75689
|
+
return "M403 1759 V84 H666 V0 H319 V1759 v" + midHeight + " v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v" + midHeight + " v1759 h84z";
|
|
75690
|
+
case "rbrack":
|
|
75691
|
+
return "M347 1759 V0 H0 V84 H263 V1759 v" + midHeight + " v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v" + midHeight + " v1759 h84z";
|
|
75692
|
+
case "vert":
|
|
75693
|
+
return "M145 15 v585 v" + midHeight + " v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v" + -midHeight + " v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v" + midHeight + " v585 h43z";
|
|
75694
|
+
case "doublevert":
|
|
75695
|
+
return "M145 15 v585 v" + midHeight + " v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v" + -midHeight + " v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v" + midHeight + " v585 h43z\nM367 15 v585 v" + midHeight + " v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v" + -midHeight + " v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v" + midHeight + " v585 h43z";
|
|
75696
|
+
case "lfloor":
|
|
75697
|
+
return "M319 602 V0 H403 V602 v" + midHeight + " v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v" + midHeight + " v1715 H319z";
|
|
75698
|
+
case "rfloor":
|
|
75699
|
+
return "M319 602 V0 H403 V602 v" + midHeight + " v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v" + midHeight + " v1715 H319z";
|
|
75700
|
+
case "lceil":
|
|
75701
|
+
return "M403 1759 V84 H666 V0 H319 V1759 v" + midHeight + " v602 h84z\nM403 1759 V0 H319 V1759 v" + midHeight + " v602 h84z";
|
|
75702
|
+
case "rceil":
|
|
75703
|
+
return "M347 1759 V0 H0 V84 H263 V1759 v" + midHeight + " v602 h84z\nM347 1759 V0 h-84 V1759 v" + midHeight + " v602 h84z";
|
|
75704
|
+
case "lparen":
|
|
75705
|
+
return "M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0," + (midHeight + 84) + "c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-" + (midHeight + 92) + "c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";
|
|
75706
|
+
case "rparen":
|
|
75707
|
+
return "M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0," + (midHeight + 9) + "\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-" + (midHeight + 144) + "c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";
|
|
75708
|
+
default:
|
|
75709
|
+
throw new Error("Unknown stretchy delimiter.");
|
|
75710
|
+
}
|
|
75711
|
+
};
|
|
74250
75712
|
class DocumentFragment {
|
|
74251
75713
|
constructor(children) {
|
|
74252
75714
|
this.children = void 0;
|
|
@@ -77996,7 +79458,7 @@ var makeOrd = function makeOrd2(group, options, type) {
|
|
|
77996
79458
|
}
|
|
77997
79459
|
if (lookupSymbol(text2, fontName, mode).metrics) {
|
|
77998
79460
|
return makeSymbol(text2, fontName, mode, options, classes.concat(fontClasses));
|
|
77999
|
-
} else if (ligatures.hasOwnProperty(text2) && fontName.
|
|
79461
|
+
} else if (ligatures.hasOwnProperty(text2) && fontName.slice(0, 10) === "Typewriter") {
|
|
78000
79462
|
var parts = [];
|
|
78001
79463
|
for (var i = 0; i < text2.length; i++) {
|
|
78002
79464
|
parts.push(makeSymbol(text2[i], fontName, mode, options, classes.concat(fontClasses)));
|
|
@@ -78842,7 +80304,7 @@ var mathMLTree = {
|
|
|
78842
80304
|
newDocumentFragment
|
|
78843
80305
|
};
|
|
78844
80306
|
var makeText = function makeText2(text2, mode, options) {
|
|
78845
|
-
if (symbols[mode][text2] && symbols[mode][text2].replace && text2.charCodeAt(0) !== 55349 && !(ligatures.hasOwnProperty(text2) && options && (options.fontFamily && options.fontFamily.
|
|
80307
|
+
if (symbols[mode][text2] && symbols[mode][text2].replace && text2.charCodeAt(0) !== 55349 && !(ligatures.hasOwnProperty(text2) && options && (options.fontFamily && options.fontFamily.slice(4, 6) === "tt" || options.font && options.font.slice(4, 6) === "tt"))) {
|
|
78846
80308
|
text2 = symbols[mode][text2].replace;
|
|
78847
80309
|
}
|
|
78848
80310
|
return new mathMLTree.TextNode(text2);
|
|
@@ -79126,7 +80588,7 @@ var groupLength = function groupLength2(arg) {
|
|
|
79126
80588
|
var svgSpan = function svgSpan2(group, options) {
|
|
79127
80589
|
function buildSvgSpan_() {
|
|
79128
80590
|
var viewBoxWidth = 4e5;
|
|
79129
|
-
var label = group.label.
|
|
80591
|
+
var label = group.label.slice(1);
|
|
79130
80592
|
if (utils.contains(["widehat", "widecheck", "widetilde", "utilde"], label)) {
|
|
79131
80593
|
var grp = group;
|
|
79132
80594
|
var numChars = groupLength(grp.base);
|
|
@@ -79626,6 +81088,175 @@ defineFunction({
|
|
|
79626
81088
|
return node;
|
|
79627
81089
|
}
|
|
79628
81090
|
});
|
|
81091
|
+
var makeSpan2 = buildCommon.makeSpan;
|
|
81092
|
+
function htmlBuilder$9(group, options) {
|
|
81093
|
+
var elements = buildExpression$1(group.body, options, true);
|
|
81094
|
+
return makeSpan2([group.mclass], elements, options);
|
|
81095
|
+
}
|
|
81096
|
+
function mathmlBuilder$8(group, options) {
|
|
81097
|
+
var node;
|
|
81098
|
+
var inner2 = buildExpression2(group.body, options);
|
|
81099
|
+
if (group.mclass === "minner") {
|
|
81100
|
+
node = new mathMLTree.MathNode("mpadded", inner2);
|
|
81101
|
+
} else if (group.mclass === "mord") {
|
|
81102
|
+
if (group.isCharacterBox) {
|
|
81103
|
+
node = inner2[0];
|
|
81104
|
+
node.type = "mi";
|
|
81105
|
+
} else {
|
|
81106
|
+
node = new mathMLTree.MathNode("mi", inner2);
|
|
81107
|
+
}
|
|
81108
|
+
} else {
|
|
81109
|
+
if (group.isCharacterBox) {
|
|
81110
|
+
node = inner2[0];
|
|
81111
|
+
node.type = "mo";
|
|
81112
|
+
} else {
|
|
81113
|
+
node = new mathMLTree.MathNode("mo", inner2);
|
|
81114
|
+
}
|
|
81115
|
+
if (group.mclass === "mbin") {
|
|
81116
|
+
node.attributes.lspace = "0.22em";
|
|
81117
|
+
node.attributes.rspace = "0.22em";
|
|
81118
|
+
} else if (group.mclass === "mpunct") {
|
|
81119
|
+
node.attributes.lspace = "0em";
|
|
81120
|
+
node.attributes.rspace = "0.17em";
|
|
81121
|
+
} else if (group.mclass === "mopen" || group.mclass === "mclose") {
|
|
81122
|
+
node.attributes.lspace = "0em";
|
|
81123
|
+
node.attributes.rspace = "0em";
|
|
81124
|
+
} else if (group.mclass === "minner") {
|
|
81125
|
+
node.attributes.lspace = "0.0556em";
|
|
81126
|
+
node.attributes.width = "+0.1111em";
|
|
81127
|
+
}
|
|
81128
|
+
}
|
|
81129
|
+
return node;
|
|
81130
|
+
}
|
|
81131
|
+
defineFunction({
|
|
81132
|
+
type: "mclass",
|
|
81133
|
+
names: ["\\mathord", "\\mathbin", "\\mathrel", "\\mathopen", "\\mathclose", "\\mathpunct", "\\mathinner"],
|
|
81134
|
+
props: {
|
|
81135
|
+
numArgs: 1,
|
|
81136
|
+
primitive: true
|
|
81137
|
+
},
|
|
81138
|
+
handler(_ref, args) {
|
|
81139
|
+
var {
|
|
81140
|
+
parser,
|
|
81141
|
+
funcName
|
|
81142
|
+
} = _ref;
|
|
81143
|
+
var body = args[0];
|
|
81144
|
+
return {
|
|
81145
|
+
type: "mclass",
|
|
81146
|
+
mode: parser.mode,
|
|
81147
|
+
mclass: "m" + funcName.slice(5),
|
|
81148
|
+
body: ordargument(body),
|
|
81149
|
+
isCharacterBox: utils.isCharacterBox(body)
|
|
81150
|
+
};
|
|
81151
|
+
},
|
|
81152
|
+
htmlBuilder: htmlBuilder$9,
|
|
81153
|
+
mathmlBuilder: mathmlBuilder$8
|
|
81154
|
+
});
|
|
81155
|
+
var binrelClass = (arg) => {
|
|
81156
|
+
var atom = arg.type === "ordgroup" && arg.body.length ? arg.body[0] : arg;
|
|
81157
|
+
if (atom.type === "atom" && (atom.family === "bin" || atom.family === "rel")) {
|
|
81158
|
+
return "m" + atom.family;
|
|
81159
|
+
} else {
|
|
81160
|
+
return "mord";
|
|
81161
|
+
}
|
|
81162
|
+
};
|
|
81163
|
+
defineFunction({
|
|
81164
|
+
type: "mclass",
|
|
81165
|
+
names: ["\\@binrel"],
|
|
81166
|
+
props: {
|
|
81167
|
+
numArgs: 2
|
|
81168
|
+
},
|
|
81169
|
+
handler(_ref2, args) {
|
|
81170
|
+
var {
|
|
81171
|
+
parser
|
|
81172
|
+
} = _ref2;
|
|
81173
|
+
return {
|
|
81174
|
+
type: "mclass",
|
|
81175
|
+
mode: parser.mode,
|
|
81176
|
+
mclass: binrelClass(args[0]),
|
|
81177
|
+
body: ordargument(args[1]),
|
|
81178
|
+
isCharacterBox: utils.isCharacterBox(args[1])
|
|
81179
|
+
};
|
|
81180
|
+
}
|
|
81181
|
+
});
|
|
81182
|
+
defineFunction({
|
|
81183
|
+
type: "mclass",
|
|
81184
|
+
names: ["\\stackrel", "\\overset", "\\underset"],
|
|
81185
|
+
props: {
|
|
81186
|
+
numArgs: 2
|
|
81187
|
+
},
|
|
81188
|
+
handler(_ref3, args) {
|
|
81189
|
+
var {
|
|
81190
|
+
parser,
|
|
81191
|
+
funcName
|
|
81192
|
+
} = _ref3;
|
|
81193
|
+
var baseArg = args[1];
|
|
81194
|
+
var shiftedArg = args[0];
|
|
81195
|
+
var mclass;
|
|
81196
|
+
if (funcName !== "\\stackrel") {
|
|
81197
|
+
mclass = binrelClass(baseArg);
|
|
81198
|
+
} else {
|
|
81199
|
+
mclass = "mrel";
|
|
81200
|
+
}
|
|
81201
|
+
var baseOp = {
|
|
81202
|
+
type: "op",
|
|
81203
|
+
mode: baseArg.mode,
|
|
81204
|
+
limits: true,
|
|
81205
|
+
alwaysHandleSupSub: true,
|
|
81206
|
+
parentIsSupSub: false,
|
|
81207
|
+
symbol: false,
|
|
81208
|
+
suppressBaseShift: funcName !== "\\stackrel",
|
|
81209
|
+
body: ordargument(baseArg)
|
|
81210
|
+
};
|
|
81211
|
+
var supsub = {
|
|
81212
|
+
type: "supsub",
|
|
81213
|
+
mode: shiftedArg.mode,
|
|
81214
|
+
base: baseOp,
|
|
81215
|
+
sup: funcName === "\\underset" ? null : shiftedArg,
|
|
81216
|
+
sub: funcName === "\\underset" ? shiftedArg : null
|
|
81217
|
+
};
|
|
81218
|
+
return {
|
|
81219
|
+
type: "mclass",
|
|
81220
|
+
mode: parser.mode,
|
|
81221
|
+
mclass,
|
|
81222
|
+
body: [supsub],
|
|
81223
|
+
isCharacterBox: utils.isCharacterBox(supsub)
|
|
81224
|
+
};
|
|
81225
|
+
},
|
|
81226
|
+
htmlBuilder: htmlBuilder$9,
|
|
81227
|
+
mathmlBuilder: mathmlBuilder$8
|
|
81228
|
+
});
|
|
81229
|
+
defineFunction({
|
|
81230
|
+
type: "pmb",
|
|
81231
|
+
names: ["\\pmb"],
|
|
81232
|
+
props: {
|
|
81233
|
+
numArgs: 1,
|
|
81234
|
+
allowedInText: true
|
|
81235
|
+
},
|
|
81236
|
+
handler(_ref, args) {
|
|
81237
|
+
var {
|
|
81238
|
+
parser
|
|
81239
|
+
} = _ref;
|
|
81240
|
+
return {
|
|
81241
|
+
type: "pmb",
|
|
81242
|
+
mode: parser.mode,
|
|
81243
|
+
mclass: binrelClass(args[0]),
|
|
81244
|
+
body: ordargument(args[0])
|
|
81245
|
+
};
|
|
81246
|
+
},
|
|
81247
|
+
htmlBuilder(group, options) {
|
|
81248
|
+
var elements = buildExpression$1(group.body, options, true);
|
|
81249
|
+
var node = buildCommon.makeSpan([group.mclass], elements, options);
|
|
81250
|
+
node.style.textShadow = "0.02em 0.01em 0.04px";
|
|
81251
|
+
return node;
|
|
81252
|
+
},
|
|
81253
|
+
mathmlBuilder(group, style2) {
|
|
81254
|
+
var inner2 = buildExpression2(group.body, style2);
|
|
81255
|
+
var node = new mathMLTree.MathNode("mstyle", inner2);
|
|
81256
|
+
node.setAttribute("style", "text-shadow: 0.02em 0.01em 0.04px");
|
|
81257
|
+
return node;
|
|
81258
|
+
}
|
|
81259
|
+
});
|
|
79629
81260
|
var cdArrowFunctionName = {
|
|
79630
81261
|
">": "\\\\cdrightarrow",
|
|
79631
81262
|
"<": "\\\\cdleftarrow",
|
|
@@ -79900,11 +81531,11 @@ defineFunction({
|
|
|
79900
81531
|
};
|
|
79901
81532
|
}
|
|
79902
81533
|
});
|
|
79903
|
-
var htmlBuilder$
|
|
81534
|
+
var htmlBuilder$8 = (group, options) => {
|
|
79904
81535
|
var elements = buildExpression$1(group.body, options.withColor(group.color), false);
|
|
79905
81536
|
return buildCommon.makeFragment(elements);
|
|
79906
81537
|
};
|
|
79907
|
-
var mathmlBuilder$
|
|
81538
|
+
var mathmlBuilder$7 = (group, options) => {
|
|
79908
81539
|
var inner2 = buildExpression2(group.body, options.withColor(group.color));
|
|
79909
81540
|
var node = new mathMLTree.MathNode("mstyle", inner2);
|
|
79910
81541
|
node.setAttribute("mathcolor", group.color);
|
|
@@ -79931,8 +81562,8 @@ defineFunction({
|
|
|
79931
81562
|
body: ordargument(body)
|
|
79932
81563
|
};
|
|
79933
81564
|
},
|
|
79934
|
-
htmlBuilder: htmlBuilder$
|
|
79935
|
-
mathmlBuilder: mathmlBuilder$
|
|
81565
|
+
htmlBuilder: htmlBuilder$8,
|
|
81566
|
+
mathmlBuilder: mathmlBuilder$7
|
|
79936
81567
|
});
|
|
79937
81568
|
defineFunction({
|
|
79938
81569
|
type: "color",
|
|
@@ -79957,8 +81588,8 @@ defineFunction({
|
|
|
79957
81588
|
body
|
|
79958
81589
|
};
|
|
79959
81590
|
},
|
|
79960
|
-
htmlBuilder: htmlBuilder$
|
|
79961
|
-
mathmlBuilder: mathmlBuilder$
|
|
81591
|
+
htmlBuilder: htmlBuilder$8,
|
|
81592
|
+
mathmlBuilder: mathmlBuilder$7
|
|
79962
81593
|
});
|
|
79963
81594
|
defineFunction({
|
|
79964
81595
|
type: "cr",
|
|
@@ -80277,6 +81908,8 @@ var makeStackedDelim = function makeStackedDelim2(delim, heightTotal, center, op
|
|
|
80277
81908
|
var middle;
|
|
80278
81909
|
var repeat;
|
|
80279
81910
|
var bottom2;
|
|
81911
|
+
var svgLabel = "";
|
|
81912
|
+
var viewBoxWidth = 0;
|
|
80280
81913
|
top2 = repeat = bottom2 = delim;
|
|
80281
81914
|
middle = null;
|
|
80282
81915
|
var font = "Size1-Regular";
|
|
@@ -80298,44 +81931,64 @@ var makeStackedDelim = function makeStackedDelim2(delim, heightTotal, center, op
|
|
|
80298
81931
|
bottom2 = "\\Downarrow";
|
|
80299
81932
|
} else if (utils.contains(verts, delim)) {
|
|
80300
81933
|
repeat = "\u2223";
|
|
81934
|
+
svgLabel = "vert";
|
|
81935
|
+
viewBoxWidth = 333;
|
|
80301
81936
|
} else if (utils.contains(doubleVerts, delim)) {
|
|
80302
81937
|
repeat = "\u2225";
|
|
81938
|
+
svgLabel = "doublevert";
|
|
81939
|
+
viewBoxWidth = 556;
|
|
80303
81940
|
} else if (delim === "[" || delim === "\\lbrack") {
|
|
80304
81941
|
top2 = "\u23A1";
|
|
80305
81942
|
repeat = "\u23A2";
|
|
80306
81943
|
bottom2 = "\u23A3";
|
|
80307
81944
|
font = "Size4-Regular";
|
|
81945
|
+
svgLabel = "lbrack";
|
|
81946
|
+
viewBoxWidth = 667;
|
|
80308
81947
|
} else if (delim === "]" || delim === "\\rbrack") {
|
|
80309
81948
|
top2 = "\u23A4";
|
|
80310
81949
|
repeat = "\u23A5";
|
|
80311
81950
|
bottom2 = "\u23A6";
|
|
80312
81951
|
font = "Size4-Regular";
|
|
81952
|
+
svgLabel = "rbrack";
|
|
81953
|
+
viewBoxWidth = 667;
|
|
80313
81954
|
} else if (delim === "\\lfloor" || delim === "\u230A") {
|
|
80314
81955
|
repeat = top2 = "\u23A2";
|
|
80315
81956
|
bottom2 = "\u23A3";
|
|
80316
81957
|
font = "Size4-Regular";
|
|
81958
|
+
svgLabel = "lfloor";
|
|
81959
|
+
viewBoxWidth = 667;
|
|
80317
81960
|
} else if (delim === "\\lceil" || delim === "\u2308") {
|
|
80318
81961
|
top2 = "\u23A1";
|
|
80319
81962
|
repeat = bottom2 = "\u23A2";
|
|
80320
81963
|
font = "Size4-Regular";
|
|
81964
|
+
svgLabel = "lceil";
|
|
81965
|
+
viewBoxWidth = 667;
|
|
80321
81966
|
} else if (delim === "\\rfloor" || delim === "\u230B") {
|
|
80322
81967
|
repeat = top2 = "\u23A5";
|
|
80323
81968
|
bottom2 = "\u23A6";
|
|
80324
81969
|
font = "Size4-Regular";
|
|
81970
|
+
svgLabel = "rfloor";
|
|
81971
|
+
viewBoxWidth = 667;
|
|
80325
81972
|
} else if (delim === "\\rceil" || delim === "\u2309") {
|
|
80326
81973
|
top2 = "\u23A4";
|
|
80327
81974
|
repeat = bottom2 = "\u23A5";
|
|
80328
81975
|
font = "Size4-Regular";
|
|
81976
|
+
svgLabel = "rceil";
|
|
81977
|
+
viewBoxWidth = 667;
|
|
80329
81978
|
} else if (delim === "(" || delim === "\\lparen") {
|
|
80330
81979
|
top2 = "\u239B";
|
|
80331
81980
|
repeat = "\u239C";
|
|
80332
81981
|
bottom2 = "\u239D";
|
|
80333
81982
|
font = "Size4-Regular";
|
|
81983
|
+
svgLabel = "lparen";
|
|
81984
|
+
viewBoxWidth = 875;
|
|
80334
81985
|
} else if (delim === ")" || delim === "\\rparen") {
|
|
80335
81986
|
top2 = "\u239E";
|
|
80336
81987
|
repeat = "\u239F";
|
|
80337
81988
|
bottom2 = "\u23A0";
|
|
80338
81989
|
font = "Size4-Regular";
|
|
81990
|
+
svgLabel = "rparen";
|
|
81991
|
+
viewBoxWidth = 875;
|
|
80339
81992
|
} else if (delim === "\\{" || delim === "\\lbrace") {
|
|
80340
81993
|
top2 = "\u23A7";
|
|
80341
81994
|
middle = "\u23A8";
|
|
@@ -80391,21 +82044,43 @@ var makeStackedDelim = function makeStackedDelim2(delim, heightTotal, center, op
|
|
|
80391
82044
|
}
|
|
80392
82045
|
var depth = realHeightTotal / 2 - axisHeight;
|
|
80393
82046
|
var stack = [];
|
|
80394
|
-
|
|
80395
|
-
|
|
80396
|
-
|
|
80397
|
-
var
|
|
80398
|
-
|
|
82047
|
+
if (svgLabel.length > 0) {
|
|
82048
|
+
var midHeight = realHeightTotal - topHeightTotal - bottomHeightTotal;
|
|
82049
|
+
var viewBoxHeight = Math.round(realHeightTotal * 1e3);
|
|
82050
|
+
var pathStr = tallDelim(svgLabel, Math.round(midHeight * 1e3));
|
|
82051
|
+
var path2 = new PathNode(svgLabel, pathStr);
|
|
82052
|
+
var width = (viewBoxWidth / 1e3).toFixed(3) + "em";
|
|
82053
|
+
var height = (viewBoxHeight / 1e3).toFixed(3) + "em";
|
|
82054
|
+
var svg = new SvgNode([path2], {
|
|
82055
|
+
"width": width,
|
|
82056
|
+
"height": height,
|
|
82057
|
+
"viewBox": "0 0 " + viewBoxWidth + " " + viewBoxHeight
|
|
82058
|
+
});
|
|
82059
|
+
var wrapper = buildCommon.makeSvgSpan([], [svg], options);
|
|
82060
|
+
wrapper.height = viewBoxHeight / 1e3;
|
|
82061
|
+
wrapper.style.width = width;
|
|
82062
|
+
wrapper.style.height = height;
|
|
82063
|
+
stack.push({
|
|
82064
|
+
type: "elem",
|
|
82065
|
+
elem: wrapper
|
|
82066
|
+
});
|
|
80399
82067
|
} else {
|
|
80400
|
-
|
|
80401
|
-
stack.push(makeInner(repeat, _innerHeight, options));
|
|
82068
|
+
stack.push(makeGlyphSpan(bottom2, font, mode));
|
|
80402
82069
|
stack.push(lap);
|
|
80403
|
-
|
|
82070
|
+
if (middle === null) {
|
|
82071
|
+
var innerHeight2 = realHeightTotal - topHeightTotal - bottomHeightTotal + 2 * lapInEms;
|
|
82072
|
+
stack.push(makeInner(repeat, innerHeight2, options));
|
|
82073
|
+
} else {
|
|
82074
|
+
var _innerHeight = (realHeightTotal - topHeightTotal - bottomHeightTotal - middleHeightTotal) / 2 + 2 * lapInEms;
|
|
82075
|
+
stack.push(makeInner(repeat, _innerHeight, options));
|
|
82076
|
+
stack.push(lap);
|
|
82077
|
+
stack.push(makeGlyphSpan(middle, font, mode));
|
|
82078
|
+
stack.push(lap);
|
|
82079
|
+
stack.push(makeInner(repeat, _innerHeight, options));
|
|
82080
|
+
}
|
|
80404
82081
|
stack.push(lap);
|
|
80405
|
-
stack.push(
|
|
82082
|
+
stack.push(makeGlyphSpan(top2, font, mode));
|
|
80406
82083
|
}
|
|
80407
|
-
stack.push(lap);
|
|
80408
|
-
stack.push(makeGlyphSpan(top2, font, mode));
|
|
80409
82084
|
var newOptions = options.havingBaseStyle(Style$1.TEXT);
|
|
80410
82085
|
var inner2 = buildCommon.makeVList({
|
|
80411
82086
|
positionType: "bottom",
|
|
@@ -80887,9 +82562,9 @@ defineFunction({
|
|
|
80887
82562
|
return middleNode;
|
|
80888
82563
|
}
|
|
80889
82564
|
});
|
|
80890
|
-
var htmlBuilder$
|
|
82565
|
+
var htmlBuilder$7 = (group, options) => {
|
|
80891
82566
|
var inner2 = buildCommon.wrapFragment(buildGroup$1(group.body, options), options);
|
|
80892
|
-
var label = group.label.
|
|
82567
|
+
var label = group.label.slice(1);
|
|
80893
82568
|
var scale = options.sizeMultiplier;
|
|
80894
82569
|
var img;
|
|
80895
82570
|
var imgShift = 0;
|
|
@@ -81012,7 +82687,7 @@ var htmlBuilder$8 = (group, options) => {
|
|
|
81012
82687
|
return buildCommon.makeSpan(["mord"], [vlist], options);
|
|
81013
82688
|
}
|
|
81014
82689
|
};
|
|
81015
|
-
var mathmlBuilder$
|
|
82690
|
+
var mathmlBuilder$6 = (group, options) => {
|
|
81016
82691
|
var fboxsep = 0;
|
|
81017
82692
|
var node = new mathMLTree.MathNode(group.label.indexOf("colorbox") > -1 ? "mpadded" : "menclose", [buildGroup2(group.body, options)]);
|
|
81018
82693
|
switch (group.label) {
|
|
@@ -81081,8 +82756,8 @@ defineFunction({
|
|
|
81081
82756
|
body
|
|
81082
82757
|
};
|
|
81083
82758
|
},
|
|
81084
|
-
htmlBuilder: htmlBuilder$
|
|
81085
|
-
mathmlBuilder: mathmlBuilder$
|
|
82759
|
+
htmlBuilder: htmlBuilder$7,
|
|
82760
|
+
mathmlBuilder: mathmlBuilder$6
|
|
81086
82761
|
});
|
|
81087
82762
|
defineFunction({
|
|
81088
82763
|
type: "enclose",
|
|
@@ -81109,8 +82784,8 @@ defineFunction({
|
|
|
81109
82784
|
body
|
|
81110
82785
|
};
|
|
81111
82786
|
},
|
|
81112
|
-
htmlBuilder: htmlBuilder$
|
|
81113
|
-
mathmlBuilder: mathmlBuilder$
|
|
82787
|
+
htmlBuilder: htmlBuilder$7,
|
|
82788
|
+
mathmlBuilder: mathmlBuilder$6
|
|
81114
82789
|
});
|
|
81115
82790
|
defineFunction({
|
|
81116
82791
|
type: "enclose",
|
|
@@ -81151,8 +82826,8 @@ defineFunction({
|
|
|
81151
82826
|
body
|
|
81152
82827
|
};
|
|
81153
82828
|
},
|
|
81154
|
-
htmlBuilder: htmlBuilder$
|
|
81155
|
-
mathmlBuilder: mathmlBuilder$
|
|
82829
|
+
htmlBuilder: htmlBuilder$7,
|
|
82830
|
+
mathmlBuilder: mathmlBuilder$6
|
|
81156
82831
|
});
|
|
81157
82832
|
defineFunction({
|
|
81158
82833
|
type: "enclose",
|
|
@@ -81350,13 +83025,13 @@ function parseArray(parser, _ref, style2) {
|
|
|
81350
83025
|
};
|
|
81351
83026
|
}
|
|
81352
83027
|
function dCellStyle(envName) {
|
|
81353
|
-
if (envName.
|
|
83028
|
+
if (envName.slice(0, 1) === "d") {
|
|
81354
83029
|
return "display";
|
|
81355
83030
|
} else {
|
|
81356
83031
|
return "text";
|
|
81357
83032
|
}
|
|
81358
83033
|
}
|
|
81359
|
-
var htmlBuilder$
|
|
83034
|
+
var htmlBuilder$6 = function htmlBuilder(group, options) {
|
|
81360
83035
|
var r2;
|
|
81361
83036
|
var c2;
|
|
81362
83037
|
var nr = group.body.length;
|
|
@@ -81582,7 +83257,7 @@ var alignMap = {
|
|
|
81582
83257
|
l: "left ",
|
|
81583
83258
|
r: "right "
|
|
81584
83259
|
};
|
|
81585
|
-
var mathmlBuilder$
|
|
83260
|
+
var mathmlBuilder$5 = function mathmlBuilder(group, options) {
|
|
81586
83261
|
var tbl = [];
|
|
81587
83262
|
var glue = new mathMLTree.MathNode("mtd", [], ["mtr-glue"]);
|
|
81588
83263
|
var tag = new mathMLTree.MathNode("mtd", [], ["mml-eqn-num"]);
|
|
@@ -81780,8 +83455,8 @@ defineEnvironment({
|
|
|
81780
83455
|
};
|
|
81781
83456
|
return parseArray(context.parser, res, dCellStyle(context.envName));
|
|
81782
83457
|
},
|
|
81783
|
-
htmlBuilder: htmlBuilder$
|
|
81784
|
-
mathmlBuilder: mathmlBuilder$
|
|
83458
|
+
htmlBuilder: htmlBuilder$6,
|
|
83459
|
+
mathmlBuilder: mathmlBuilder$5
|
|
81785
83460
|
});
|
|
81786
83461
|
defineEnvironment({
|
|
81787
83462
|
type: "array",
|
|
@@ -81841,8 +83516,8 @@ defineEnvironment({
|
|
|
81841
83516
|
rightColor: void 0
|
|
81842
83517
|
} : res;
|
|
81843
83518
|
},
|
|
81844
|
-
htmlBuilder: htmlBuilder$
|
|
81845
|
-
mathmlBuilder: mathmlBuilder$
|
|
83519
|
+
htmlBuilder: htmlBuilder$6,
|
|
83520
|
+
mathmlBuilder: mathmlBuilder$5
|
|
81846
83521
|
});
|
|
81847
83522
|
defineEnvironment({
|
|
81848
83523
|
type: "array",
|
|
@@ -81858,8 +83533,8 @@ defineEnvironment({
|
|
|
81858
83533
|
res.colSeparationType = "small";
|
|
81859
83534
|
return res;
|
|
81860
83535
|
},
|
|
81861
|
-
htmlBuilder: htmlBuilder$
|
|
81862
|
-
mathmlBuilder: mathmlBuilder$
|
|
83536
|
+
htmlBuilder: htmlBuilder$6,
|
|
83537
|
+
mathmlBuilder: mathmlBuilder$5
|
|
81863
83538
|
});
|
|
81864
83539
|
defineEnvironment({
|
|
81865
83540
|
type: "array",
|
|
@@ -81895,8 +83570,8 @@ defineEnvironment({
|
|
|
81895
83570
|
}
|
|
81896
83571
|
return res;
|
|
81897
83572
|
},
|
|
81898
|
-
htmlBuilder: htmlBuilder$
|
|
81899
|
-
mathmlBuilder: mathmlBuilder$
|
|
83573
|
+
htmlBuilder: htmlBuilder$6,
|
|
83574
|
+
mathmlBuilder: mathmlBuilder$5
|
|
81900
83575
|
});
|
|
81901
83576
|
defineEnvironment({
|
|
81902
83577
|
type: "array",
|
|
@@ -81929,8 +83604,8 @@ defineEnvironment({
|
|
|
81929
83604
|
rightColor: void 0
|
|
81930
83605
|
};
|
|
81931
83606
|
},
|
|
81932
|
-
htmlBuilder: htmlBuilder$
|
|
81933
|
-
mathmlBuilder: mathmlBuilder$
|
|
83607
|
+
htmlBuilder: htmlBuilder$6,
|
|
83608
|
+
mathmlBuilder: mathmlBuilder$5
|
|
81934
83609
|
});
|
|
81935
83610
|
defineEnvironment({
|
|
81936
83611
|
type: "array",
|
|
@@ -81939,8 +83614,8 @@ defineEnvironment({
|
|
|
81939
83614
|
numArgs: 0
|
|
81940
83615
|
},
|
|
81941
83616
|
handler: alignedHandler,
|
|
81942
|
-
htmlBuilder: htmlBuilder$
|
|
81943
|
-
mathmlBuilder: mathmlBuilder$
|
|
83617
|
+
htmlBuilder: htmlBuilder$6,
|
|
83618
|
+
mathmlBuilder: mathmlBuilder$5
|
|
81944
83619
|
});
|
|
81945
83620
|
defineEnvironment({
|
|
81946
83621
|
type: "array",
|
|
@@ -81965,8 +83640,8 @@ defineEnvironment({
|
|
|
81965
83640
|
};
|
|
81966
83641
|
return parseArray(context.parser, res, "display");
|
|
81967
83642
|
},
|
|
81968
|
-
htmlBuilder: htmlBuilder$
|
|
81969
|
-
mathmlBuilder: mathmlBuilder$
|
|
83643
|
+
htmlBuilder: htmlBuilder$6,
|
|
83644
|
+
mathmlBuilder: mathmlBuilder$5
|
|
81970
83645
|
});
|
|
81971
83646
|
defineEnvironment({
|
|
81972
83647
|
type: "array",
|
|
@@ -81975,8 +83650,8 @@ defineEnvironment({
|
|
|
81975
83650
|
numArgs: 1
|
|
81976
83651
|
},
|
|
81977
83652
|
handler: alignedHandler,
|
|
81978
|
-
htmlBuilder: htmlBuilder$
|
|
81979
|
-
mathmlBuilder: mathmlBuilder$
|
|
83653
|
+
htmlBuilder: htmlBuilder$6,
|
|
83654
|
+
mathmlBuilder: mathmlBuilder$5
|
|
81980
83655
|
});
|
|
81981
83656
|
defineEnvironment({
|
|
81982
83657
|
type: "array",
|
|
@@ -81995,8 +83670,8 @@ defineEnvironment({
|
|
|
81995
83670
|
};
|
|
81996
83671
|
return parseArray(context.parser, res, "display");
|
|
81997
83672
|
},
|
|
81998
|
-
htmlBuilder: htmlBuilder$
|
|
81999
|
-
mathmlBuilder: mathmlBuilder$
|
|
83673
|
+
htmlBuilder: htmlBuilder$6,
|
|
83674
|
+
mathmlBuilder: mathmlBuilder$5
|
|
82000
83675
|
});
|
|
82001
83676
|
defineEnvironment({
|
|
82002
83677
|
type: "array",
|
|
@@ -82008,8 +83683,8 @@ defineEnvironment({
|
|
|
82008
83683
|
validateAmsEnvironmentContext(context);
|
|
82009
83684
|
return parseCD(context.parser);
|
|
82010
83685
|
},
|
|
82011
|
-
htmlBuilder: htmlBuilder$
|
|
82012
|
-
mathmlBuilder: mathmlBuilder$
|
|
83686
|
+
htmlBuilder: htmlBuilder$6,
|
|
83687
|
+
mathmlBuilder: mathmlBuilder$5
|
|
82013
83688
|
});
|
|
82014
83689
|
defineMacro("\\nonumber", "\\gdef\\@eqnsw{0}");
|
|
82015
83690
|
defineMacro("\\notag", "\\nonumber");
|
|
@@ -82077,144 +83752,6 @@ defineFunction({
|
|
|
82077
83752
|
};
|
|
82078
83753
|
}
|
|
82079
83754
|
});
|
|
82080
|
-
var makeSpan2 = buildCommon.makeSpan;
|
|
82081
|
-
function htmlBuilder$6(group, options) {
|
|
82082
|
-
var elements = buildExpression$1(group.body, options, true);
|
|
82083
|
-
return makeSpan2([group.mclass], elements, options);
|
|
82084
|
-
}
|
|
82085
|
-
function mathmlBuilder$5(group, options) {
|
|
82086
|
-
var node;
|
|
82087
|
-
var inner2 = buildExpression2(group.body, options);
|
|
82088
|
-
if (group.mclass === "minner") {
|
|
82089
|
-
node = new mathMLTree.MathNode("mpadded", inner2);
|
|
82090
|
-
} else if (group.mclass === "mord") {
|
|
82091
|
-
if (group.isCharacterBox) {
|
|
82092
|
-
node = inner2[0];
|
|
82093
|
-
node.type = "mi";
|
|
82094
|
-
} else {
|
|
82095
|
-
node = new mathMLTree.MathNode("mi", inner2);
|
|
82096
|
-
}
|
|
82097
|
-
} else {
|
|
82098
|
-
if (group.isCharacterBox) {
|
|
82099
|
-
node = inner2[0];
|
|
82100
|
-
node.type = "mo";
|
|
82101
|
-
} else {
|
|
82102
|
-
node = new mathMLTree.MathNode("mo", inner2);
|
|
82103
|
-
}
|
|
82104
|
-
if (group.mclass === "mbin") {
|
|
82105
|
-
node.attributes.lspace = "0.22em";
|
|
82106
|
-
node.attributes.rspace = "0.22em";
|
|
82107
|
-
} else if (group.mclass === "mpunct") {
|
|
82108
|
-
node.attributes.lspace = "0em";
|
|
82109
|
-
node.attributes.rspace = "0.17em";
|
|
82110
|
-
} else if (group.mclass === "mopen" || group.mclass === "mclose") {
|
|
82111
|
-
node.attributes.lspace = "0em";
|
|
82112
|
-
node.attributes.rspace = "0em";
|
|
82113
|
-
} else if (group.mclass === "minner") {
|
|
82114
|
-
node.attributes.lspace = "0.0556em";
|
|
82115
|
-
node.attributes.width = "+0.1111em";
|
|
82116
|
-
}
|
|
82117
|
-
}
|
|
82118
|
-
return node;
|
|
82119
|
-
}
|
|
82120
|
-
defineFunction({
|
|
82121
|
-
type: "mclass",
|
|
82122
|
-
names: ["\\mathord", "\\mathbin", "\\mathrel", "\\mathopen", "\\mathclose", "\\mathpunct", "\\mathinner"],
|
|
82123
|
-
props: {
|
|
82124
|
-
numArgs: 1,
|
|
82125
|
-
primitive: true
|
|
82126
|
-
},
|
|
82127
|
-
handler(_ref, args) {
|
|
82128
|
-
var {
|
|
82129
|
-
parser,
|
|
82130
|
-
funcName
|
|
82131
|
-
} = _ref;
|
|
82132
|
-
var body = args[0];
|
|
82133
|
-
return {
|
|
82134
|
-
type: "mclass",
|
|
82135
|
-
mode: parser.mode,
|
|
82136
|
-
mclass: "m" + funcName.substr(5),
|
|
82137
|
-
body: ordargument(body),
|
|
82138
|
-
isCharacterBox: utils.isCharacterBox(body)
|
|
82139
|
-
};
|
|
82140
|
-
},
|
|
82141
|
-
htmlBuilder: htmlBuilder$6,
|
|
82142
|
-
mathmlBuilder: mathmlBuilder$5
|
|
82143
|
-
});
|
|
82144
|
-
var binrelClass = (arg) => {
|
|
82145
|
-
var atom = arg.type === "ordgroup" && arg.body.length ? arg.body[0] : arg;
|
|
82146
|
-
if (atom.type === "atom" && (atom.family === "bin" || atom.family === "rel")) {
|
|
82147
|
-
return "m" + atom.family;
|
|
82148
|
-
} else {
|
|
82149
|
-
return "mord";
|
|
82150
|
-
}
|
|
82151
|
-
};
|
|
82152
|
-
defineFunction({
|
|
82153
|
-
type: "mclass",
|
|
82154
|
-
names: ["\\@binrel"],
|
|
82155
|
-
props: {
|
|
82156
|
-
numArgs: 2
|
|
82157
|
-
},
|
|
82158
|
-
handler(_ref2, args) {
|
|
82159
|
-
var {
|
|
82160
|
-
parser
|
|
82161
|
-
} = _ref2;
|
|
82162
|
-
return {
|
|
82163
|
-
type: "mclass",
|
|
82164
|
-
mode: parser.mode,
|
|
82165
|
-
mclass: binrelClass(args[0]),
|
|
82166
|
-
body: ordargument(args[1]),
|
|
82167
|
-
isCharacterBox: utils.isCharacterBox(args[1])
|
|
82168
|
-
};
|
|
82169
|
-
}
|
|
82170
|
-
});
|
|
82171
|
-
defineFunction({
|
|
82172
|
-
type: "mclass",
|
|
82173
|
-
names: ["\\stackrel", "\\overset", "\\underset"],
|
|
82174
|
-
props: {
|
|
82175
|
-
numArgs: 2
|
|
82176
|
-
},
|
|
82177
|
-
handler(_ref3, args) {
|
|
82178
|
-
var {
|
|
82179
|
-
parser,
|
|
82180
|
-
funcName
|
|
82181
|
-
} = _ref3;
|
|
82182
|
-
var baseArg = args[1];
|
|
82183
|
-
var shiftedArg = args[0];
|
|
82184
|
-
var mclass;
|
|
82185
|
-
if (funcName !== "\\stackrel") {
|
|
82186
|
-
mclass = binrelClass(baseArg);
|
|
82187
|
-
} else {
|
|
82188
|
-
mclass = "mrel";
|
|
82189
|
-
}
|
|
82190
|
-
var baseOp = {
|
|
82191
|
-
type: "op",
|
|
82192
|
-
mode: baseArg.mode,
|
|
82193
|
-
limits: true,
|
|
82194
|
-
alwaysHandleSupSub: true,
|
|
82195
|
-
parentIsSupSub: false,
|
|
82196
|
-
symbol: false,
|
|
82197
|
-
suppressBaseShift: funcName !== "\\stackrel",
|
|
82198
|
-
body: ordargument(baseArg)
|
|
82199
|
-
};
|
|
82200
|
-
var supsub = {
|
|
82201
|
-
type: "supsub",
|
|
82202
|
-
mode: shiftedArg.mode,
|
|
82203
|
-
base: baseOp,
|
|
82204
|
-
sup: funcName === "\\underset" ? null : shiftedArg,
|
|
82205
|
-
sub: funcName === "\\underset" ? shiftedArg : null
|
|
82206
|
-
};
|
|
82207
|
-
return {
|
|
82208
|
-
type: "mclass",
|
|
82209
|
-
mode: parser.mode,
|
|
82210
|
-
mclass,
|
|
82211
|
-
body: [supsub],
|
|
82212
|
-
isCharacterBox: utils.isCharacterBox(supsub)
|
|
82213
|
-
};
|
|
82214
|
-
},
|
|
82215
|
-
htmlBuilder: htmlBuilder$6,
|
|
82216
|
-
mathmlBuilder: mathmlBuilder$5
|
|
82217
|
-
});
|
|
82218
83755
|
var htmlBuilder$5 = (group, options) => {
|
|
82219
83756
|
var font = group.font;
|
|
82220
83757
|
var newOptions = options.withFont(font);
|
|
@@ -83541,7 +85078,7 @@ var htmlBuilder$2 = (grp, options) => {
|
|
|
83541
85078
|
var fontName = large ? "Size2-Regular" : "Size1-Regular";
|
|
83542
85079
|
var stash = "";
|
|
83543
85080
|
if (group.name === "\\oiint" || group.name === "\\oiiint") {
|
|
83544
|
-
stash = group.name.
|
|
85081
|
+
stash = group.name.slice(1);
|
|
83545
85082
|
group.name = stash === "oiint" ? "\\iint" : "\\iiint";
|
|
83546
85083
|
}
|
|
83547
85084
|
base2 = buildCommon.makeSymbol(group.name, fontName, "math", options, ["mop", "op-symbol", large ? "large-op" : "small-op"]);
|
|
@@ -85340,7 +86877,7 @@ defineMacro("\\dots", function(context) {
|
|
|
85340
86877
|
var next = context.expandAfterFuture().text;
|
|
85341
86878
|
if (next in dotsByToken) {
|
|
85342
86879
|
thedots = dotsByToken[next];
|
|
85343
|
-
} else if (next.
|
|
86880
|
+
} else if (next.slice(0, 4) === "\\not") {
|
|
85344
86881
|
thedots = "\\dotsb";
|
|
85345
86882
|
} else if (next in symbols.math) {
|
|
85346
86883
|
if (utils.contains(["bin", "rel"], symbols.math[next].group)) {
|
|
@@ -85429,7 +86966,6 @@ defineMacro("\\bmod", "\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5
|
|
|
85429
86966
|
defineMacro("\\pod", "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");
|
|
85430
86967
|
defineMacro("\\pmod", "\\pod{{\\rm mod}\\mkern6mu#1}");
|
|
85431
86968
|
defineMacro("\\mod", "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");
|
|
85432
|
-
defineMacro("\\pmb", "\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}");
|
|
85433
86969
|
defineMacro("\\newline", "\\\\\\relax");
|
|
85434
86970
|
defineMacro("\\TeX", "\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");
|
|
85435
86971
|
var latexRaiseA = makeEm(fontMetricsData["Main-Regular"]["T".charCodeAt(0)][1] - 0.7 * fontMetricsData["Main-Regular"]["A".charCodeAt(0)][1]);
|
|
@@ -87066,7 +88602,7 @@ class Parser {
|
|
|
87066
88602
|
if (this.settings.strict && this.mode === "math") {
|
|
87067
88603
|
this.settings.reportNonstrict("unicodeTextInMathMode", 'Accented Unicode text character "' + text2[0] + '" used in math mode', nucleus);
|
|
87068
88604
|
}
|
|
87069
|
-
text2 = unicodeSymbols[text2[0]] + text2.
|
|
88605
|
+
text2 = unicodeSymbols[text2[0]] + text2.slice(1);
|
|
87070
88606
|
}
|
|
87071
88607
|
var match = combiningDiacriticalMarksEndRegex.exec(text2);
|
|
87072
88608
|
if (match) {
|
|
@@ -87217,7 +88753,7 @@ var renderToHTMLTree = function renderToHTMLTree2(expression, options) {
|
|
|
87217
88753
|
}
|
|
87218
88754
|
};
|
|
87219
88755
|
var katex = {
|
|
87220
|
-
version: "0.16.
|
|
88756
|
+
version: "0.16.2",
|
|
87221
88757
|
render,
|
|
87222
88758
|
renderToString,
|
|
87223
88759
|
ParseError,
|