@tailor-cms/ce-html-edit 0.0.12 → 0.0.14
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/index.cjs +905 -786
- package/dist/{style.css → index.css} +21 -21
- package/dist/index.js +906 -787
- package/package.json +7 -7
- package/dist/chrome-4cc2126d.js +0 -8
- package/dist/chrome-dd3ea238.cjs +0 -9
- package/dist/html-09b878d3.js +0 -2347
- package/dist/html-838019c8.cjs +0 -2346
- package/dist/language_tools-51ba2c8f.cjs +0 -1738
- package/dist/language_tools-9b346ce3.js +0 -1737
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
2
|
+
var import_index = require("./index.css");
|
|
3
3
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
4
4
|
const vue = require("vue");
|
|
5
5
|
var type = "TIPTAP_HTML";
|
|
@@ -21,7 +21,7 @@ var manifest$1 = {
|
|
|
21
21
|
initState,
|
|
22
22
|
ui
|
|
23
23
|
};
|
|
24
|
-
var
|
|
24
|
+
var index_default = manifest$1;
|
|
25
25
|
function OrderedMap(content) {
|
|
26
26
|
this.content = content;
|
|
27
27
|
}
|
|
@@ -29,8 +29,7 @@ OrderedMap.prototype = {
|
|
|
29
29
|
constructor: OrderedMap,
|
|
30
30
|
find: function(key) {
|
|
31
31
|
for (var i = 0; i < this.content.length; i += 2)
|
|
32
|
-
if (this.content[i] === key)
|
|
33
|
-
return i;
|
|
32
|
+
if (this.content[i] === key) return i;
|
|
34
33
|
return -1;
|
|
35
34
|
},
|
|
36
35
|
// :: (string) → ?any
|
|
@@ -51,8 +50,7 @@ OrderedMap.prototype = {
|
|
|
51
50
|
content.push(newKey || key, value);
|
|
52
51
|
} else {
|
|
53
52
|
content[found2 + 1] = value;
|
|
54
|
-
if (newKey)
|
|
55
|
-
content[found2] = newKey;
|
|
53
|
+
if (newKey) content[found2] = newKey;
|
|
56
54
|
}
|
|
57
55
|
return new OrderedMap(content);
|
|
58
56
|
},
|
|
@@ -60,8 +58,7 @@ OrderedMap.prototype = {
|
|
|
60
58
|
// Return a map with the given key removed, if it existed.
|
|
61
59
|
remove: function(key) {
|
|
62
60
|
var found2 = this.find(key);
|
|
63
|
-
if (found2 == -1)
|
|
64
|
-
return this;
|
|
61
|
+
if (found2 == -1) return this;
|
|
65
62
|
var content = this.content.slice();
|
|
66
63
|
content.splice(found2, 2);
|
|
67
64
|
return new OrderedMap(content);
|
|
@@ -99,8 +96,7 @@ OrderedMap.prototype = {
|
|
|
99
96
|
// appear in `map` before the keys in `map`.
|
|
100
97
|
prepend: function(map2) {
|
|
101
98
|
map2 = OrderedMap.from(map2);
|
|
102
|
-
if (!map2.size)
|
|
103
|
-
return this;
|
|
99
|
+
if (!map2.size) return this;
|
|
104
100
|
return new OrderedMap(map2.content.concat(this.subtract(map2).content));
|
|
105
101
|
},
|
|
106
102
|
// :: (union<Object, OrderedMap>) → OrderedMap
|
|
@@ -108,8 +104,7 @@ OrderedMap.prototype = {
|
|
|
108
104
|
// appear in `map` after the keys in `map`.
|
|
109
105
|
append: function(map2) {
|
|
110
106
|
map2 = OrderedMap.from(map2);
|
|
111
|
-
if (!map2.size)
|
|
112
|
-
return this;
|
|
107
|
+
if (!map2.size) return this;
|
|
113
108
|
return new OrderedMap(this.subtract(map2).content.concat(map2.content));
|
|
114
109
|
},
|
|
115
110
|
// :: (union<Object, OrderedMap>) → OrderedMap
|
|
@@ -138,12 +133,9 @@ OrderedMap.prototype = {
|
|
|
138
133
|
}
|
|
139
134
|
};
|
|
140
135
|
OrderedMap.from = function(value) {
|
|
141
|
-
if (value instanceof OrderedMap)
|
|
142
|
-
return value;
|
|
136
|
+
if (value instanceof OrderedMap) return value;
|
|
143
137
|
var content = [];
|
|
144
|
-
if (value)
|
|
145
|
-
for (var prop in value)
|
|
146
|
-
content.push(prop, value[prop]);
|
|
138
|
+
if (value) for (var prop in value) content.push(prop, value[prop]);
|
|
147
139
|
return new OrderedMap(content);
|
|
148
140
|
};
|
|
149
141
|
function findDiffStart(a, b, pos) {
|
|
@@ -746,8 +738,6 @@ function removeRange(content, from2, to) {
|
|
|
746
738
|
function insertInto(content, dist, insert, parent) {
|
|
747
739
|
let { index, offset: offset2 } = content.findIndex(dist), child = content.maybeChild(index);
|
|
748
740
|
if (offset2 == dist || child.isText) {
|
|
749
|
-
if (parent && !parent.canReplace(index, index, insert))
|
|
750
|
-
return null;
|
|
751
741
|
return content.cut(0, dist).append(insert).append(content.cut(dist));
|
|
752
742
|
}
|
|
753
743
|
let inner = insertInto(child.content, dist - offset2 - 1, insert);
|
|
@@ -2572,7 +2562,7 @@ const OPT_PRESERVE_WS = 1, OPT_PRESERVE_WS_FULL = 2, OPT_OPEN_LEFT = 4;
|
|
|
2572
2562
|
function wsOptionsFor(type2, preserveWhitespace, base2) {
|
|
2573
2563
|
if (preserveWhitespace != null)
|
|
2574
2564
|
return (preserveWhitespace ? OPT_PRESERVE_WS : 0) | (preserveWhitespace === "full" ? OPT_PRESERVE_WS_FULL : 0);
|
|
2575
|
-
return type2 && type2.whitespace == "pre" ? OPT_PRESERVE_WS | OPT_PRESERVE_WS_FULL : base2 &
|
|
2565
|
+
return type2 && type2.whitespace == "pre" ? OPT_PRESERVE_WS | OPT_PRESERVE_WS_FULL : base2 & -5;
|
|
2576
2566
|
}
|
|
2577
2567
|
class NodeContext {
|
|
2578
2568
|
constructor(type2, attrs, marks, pendingMarks, solid, match, options) {
|
|
@@ -4469,21 +4459,20 @@ class Fitter {
|
|
|
4469
4459
|
return after;
|
|
4470
4460
|
}
|
|
4471
4461
|
findCloseLevel($to) {
|
|
4472
|
-
scan:
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
continue scan;
|
|
4484
|
-
}
|
|
4485
|
-
return { depth: i, fit, move: dropInner ? $to.doc.resolve($to.after(i + 1)) : $to };
|
|
4462
|
+
scan: for (let i = Math.min(this.depth, $to.depth); i >= 0; i--) {
|
|
4463
|
+
let { match, type: type2 } = this.frontier[i];
|
|
4464
|
+
let dropInner = i < $to.depth && $to.end(i + 1) == $to.pos + ($to.depth - (i + 1));
|
|
4465
|
+
let fit = contentAfterFits($to, i, type2, match, dropInner);
|
|
4466
|
+
if (!fit)
|
|
4467
|
+
continue;
|
|
4468
|
+
for (let d = i - 1; d >= 0; d--) {
|
|
4469
|
+
let { match: match2, type: type3 } = this.frontier[d];
|
|
4470
|
+
let matches2 = contentAfterFits($to, d, type3, match2, true);
|
|
4471
|
+
if (!matches2 || matches2.childCount)
|
|
4472
|
+
continue scan;
|
|
4486
4473
|
}
|
|
4474
|
+
return { depth: i, fit, move: dropInner ? $to.doc.resolve($to.after(i + 1)) : $to };
|
|
4475
|
+
}
|
|
4487
4476
|
}
|
|
4488
4477
|
close($to) {
|
|
4489
4478
|
let close2 = this.findCloseLevel($to);
|
|
@@ -5477,7 +5466,7 @@ class Transaction extends Transform {
|
|
|
5477
5466
|
throw new RangeError("Selection passed to setSelection must point at the current document");
|
|
5478
5467
|
this.curSelection = selection;
|
|
5479
5468
|
this.curSelectionFor = this.steps.length;
|
|
5480
|
-
this.updated = (this.updated | UPDATED_SEL) &
|
|
5469
|
+
this.updated = (this.updated | UPDATED_SEL) & -3;
|
|
5481
5470
|
this.storedMarks = null;
|
|
5482
5471
|
return this;
|
|
5483
5472
|
}
|
|
@@ -5528,7 +5517,7 @@ class Transaction extends Transform {
|
|
|
5528
5517
|
*/
|
|
5529
5518
|
addStep(step, doc2) {
|
|
5530
5519
|
super.addStep(step, doc2);
|
|
5531
|
-
this.updated = this.updated &
|
|
5520
|
+
this.updated = this.updated & -3;
|
|
5532
5521
|
this.storedMarks = null;
|
|
5533
5522
|
}
|
|
5534
5523
|
/**
|
|
@@ -6759,17 +6748,17 @@ class ViewDesc {
|
|
|
6759
6748
|
// custom things with the selection. Note that this falls apart when
|
|
6760
6749
|
// a selection starts in such a node and ends in another, in which
|
|
6761
6750
|
// case we just use whatever domFromPos produces as a best effort.
|
|
6762
|
-
setSelection(anchor, head,
|
|
6751
|
+
setSelection(anchor, head, root, force = false) {
|
|
6763
6752
|
let from2 = Math.min(anchor, head), to = Math.max(anchor, head);
|
|
6764
6753
|
for (let i = 0, offset2 = 0; i < this.children.length; i++) {
|
|
6765
6754
|
let child = this.children[i], end2 = offset2 + child.size;
|
|
6766
6755
|
if (from2 > offset2 && to < end2)
|
|
6767
|
-
return child.setSelection(anchor - offset2 - child.border, head - offset2 - child.border,
|
|
6756
|
+
return child.setSelection(anchor - offset2 - child.border, head - offset2 - child.border, root, force);
|
|
6768
6757
|
offset2 = end2;
|
|
6769
6758
|
}
|
|
6770
6759
|
let anchorDOM = this.domFromPos(anchor, anchor ? -1 : 1);
|
|
6771
6760
|
let headDOM = head == anchor ? anchorDOM : this.domFromPos(head, head ? -1 : 1);
|
|
6772
|
-
let domSel =
|
|
6761
|
+
let domSel = root.getSelection();
|
|
6773
6762
|
let brKludge = false;
|
|
6774
6763
|
if ((gecko || safari) && anchor == head) {
|
|
6775
6764
|
let { node, offset: offset2 } = anchorDOM;
|
|
@@ -7078,12 +7067,9 @@ class NodeViewDesc extends ViewDesc {
|
|
|
7078
7067
|
}, (child, outerDeco, innerDeco, i) => {
|
|
7079
7068
|
updater.syncToMarks(child.marks, inline, view);
|
|
7080
7069
|
let compIndex;
|
|
7081
|
-
if (updater.findNodeMatch(child, outerDeco, innerDeco, i))
|
|
7082
|
-
|
|
7083
|
-
else if (
|
|
7084
|
-
;
|
|
7085
|
-
else if (updater.updateNextNode(child, outerDeco, innerDeco, view, i, off))
|
|
7086
|
-
;
|
|
7070
|
+
if (updater.findNodeMatch(child, outerDeco, innerDeco, i)) ;
|
|
7071
|
+
else if (compositionInChild && view.state.selection.from > off && view.state.selection.to < off + child.nodeSize && (compIndex = updater.findIndexWithChild(composition.node)) > -1 && updater.updateNodeAt(child, outerDeco, innerDeco, compIndex, view)) ;
|
|
7072
|
+
else if (updater.updateNextNode(child, outerDeco, innerDeco, view, i, off)) ;
|
|
7087
7073
|
else {
|
|
7088
7074
|
updater.addNode(child, outerDeco, innerDeco, view, off);
|
|
7089
7075
|
}
|
|
@@ -7284,8 +7270,8 @@ class CustomNodeViewDesc extends NodeViewDesc {
|
|
|
7284
7270
|
deselectNode() {
|
|
7285
7271
|
this.spec.deselectNode ? this.spec.deselectNode() : super.deselectNode();
|
|
7286
7272
|
}
|
|
7287
|
-
setSelection(anchor, head,
|
|
7288
|
-
this.spec.setSelection ? this.spec.setSelection(anchor, head,
|
|
7273
|
+
setSelection(anchor, head, root, force) {
|
|
7274
|
+
this.spec.setSelection ? this.spec.setSelection(anchor, head, root) : super.setSelection(anchor, head, root, force);
|
|
7289
7275
|
}
|
|
7290
7276
|
destroy() {
|
|
7291
7277
|
if (this.spec.destroy)
|
|
@@ -7644,36 +7630,35 @@ class ViewTreeUpdater {
|
|
|
7644
7630
|
function preMatch(frag, parentDesc) {
|
|
7645
7631
|
let curDesc = parentDesc, descI = curDesc.children.length;
|
|
7646
7632
|
let fI = frag.childCount, matched = /* @__PURE__ */ new Map(), matches2 = [];
|
|
7647
|
-
outer:
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
|
|
7654
|
-
|
|
7655
|
-
descI = next.children.length;
|
|
7656
|
-
} else {
|
|
7657
|
-
desc = next;
|
|
7658
|
-
descI--;
|
|
7659
|
-
break;
|
|
7660
|
-
}
|
|
7661
|
-
} else if (curDesc == parentDesc) {
|
|
7662
|
-
break outer;
|
|
7633
|
+
outer: while (fI > 0) {
|
|
7634
|
+
let desc;
|
|
7635
|
+
for (; ; ) {
|
|
7636
|
+
if (descI) {
|
|
7637
|
+
let next = curDesc.children[descI - 1];
|
|
7638
|
+
if (next instanceof MarkViewDesc) {
|
|
7639
|
+
curDesc = next;
|
|
7640
|
+
descI = next.children.length;
|
|
7663
7641
|
} else {
|
|
7664
|
-
|
|
7665
|
-
|
|
7642
|
+
desc = next;
|
|
7643
|
+
descI--;
|
|
7644
|
+
break;
|
|
7666
7645
|
}
|
|
7646
|
+
} else if (curDesc == parentDesc) {
|
|
7647
|
+
break outer;
|
|
7648
|
+
} else {
|
|
7649
|
+
descI = curDesc.parent.children.indexOf(curDesc);
|
|
7650
|
+
curDesc = curDesc.parent;
|
|
7667
7651
|
}
|
|
7668
|
-
let node = desc.node;
|
|
7669
|
-
if (!node)
|
|
7670
|
-
continue;
|
|
7671
|
-
if (node != frag.child(fI - 1))
|
|
7672
|
-
break;
|
|
7673
|
-
--fI;
|
|
7674
|
-
matched.set(desc, fI);
|
|
7675
|
-
matches2.push(desc);
|
|
7676
7652
|
}
|
|
7653
|
+
let node = desc.node;
|
|
7654
|
+
if (!node)
|
|
7655
|
+
continue;
|
|
7656
|
+
if (node != frag.child(fI - 1))
|
|
7657
|
+
break;
|
|
7658
|
+
--fI;
|
|
7659
|
+
matched.set(desc, fI);
|
|
7660
|
+
matches2.push(desc);
|
|
7661
|
+
}
|
|
7677
7662
|
return { index: fI, matched, matches: matches2.reverse() };
|
|
7678
7663
|
}
|
|
7679
7664
|
function compareSide(a, b) {
|
|
@@ -8640,10 +8625,10 @@ editHandlers.keydown = (view, _event) => {
|
|
|
8640
8625
|
if (event.keyCode != 229)
|
|
8641
8626
|
view.domObserver.forceFlush();
|
|
8642
8627
|
if (ios && event.keyCode == 13 && !event.ctrlKey && !event.altKey && !event.metaKey) {
|
|
8643
|
-
let
|
|
8644
|
-
view.input.lastIOSEnter =
|
|
8628
|
+
let now = Date.now();
|
|
8629
|
+
view.input.lastIOSEnter = now;
|
|
8645
8630
|
view.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
8646
|
-
if (view.input.lastIOSEnter ==
|
|
8631
|
+
if (view.input.lastIOSEnter == now) {
|
|
8647
8632
|
view.someProp("handleKeyDown", (f) => f(view, keyEvent(13, "Enter")));
|
|
8648
8633
|
view.input.lastIOSEnter = 0;
|
|
8649
8634
|
}
|
|
@@ -8695,8 +8680,7 @@ function updateSelection(view, selection, origin) {
|
|
|
8695
8680
|
if (!view.focused)
|
|
8696
8681
|
view.focus();
|
|
8697
8682
|
let tr2 = view.state.tr.setSelection(selection);
|
|
8698
|
-
|
|
8699
|
-
tr2.setMeta("pointer", true);
|
|
8683
|
+
tr2.setMeta("pointer", true);
|
|
8700
8684
|
view.dispatch(tr2);
|
|
8701
8685
|
}
|
|
8702
8686
|
function selectClickedLeaf(view, inside) {
|
|
@@ -8704,7 +8688,7 @@ function selectClickedLeaf(view, inside) {
|
|
|
8704
8688
|
return false;
|
|
8705
8689
|
let $pos = view.state.doc.resolve(inside), node = $pos.nodeAfter;
|
|
8706
8690
|
if (node && node.isAtom && NodeSelection.isSelectable(node)) {
|
|
8707
|
-
updateSelection(view, new NodeSelection($pos)
|
|
8691
|
+
updateSelection(view, new NodeSelection($pos));
|
|
8708
8692
|
return true;
|
|
8709
8693
|
}
|
|
8710
8694
|
return false;
|
|
@@ -8727,7 +8711,7 @@ function selectClickedNode(view, inside) {
|
|
|
8727
8711
|
}
|
|
8728
8712
|
}
|
|
8729
8713
|
if (selectAt != null) {
|
|
8730
|
-
updateSelection(view, NodeSelection.create(view.state.doc, selectAt)
|
|
8714
|
+
updateSelection(view, NodeSelection.create(view.state.doc, selectAt));
|
|
8731
8715
|
return true;
|
|
8732
8716
|
} else {
|
|
8733
8717
|
return false;
|
|
@@ -8748,7 +8732,7 @@ function defaultTripleClick(view, inside, event) {
|
|
|
8748
8732
|
let doc2 = view.state.doc;
|
|
8749
8733
|
if (inside == -1) {
|
|
8750
8734
|
if (doc2.inlineContent) {
|
|
8751
|
-
updateSelection(view, TextSelection.create(doc2, 0, doc2.content.size)
|
|
8735
|
+
updateSelection(view, TextSelection.create(doc2, 0, doc2.content.size));
|
|
8752
8736
|
return true;
|
|
8753
8737
|
}
|
|
8754
8738
|
return false;
|
|
@@ -8758,9 +8742,9 @@ function defaultTripleClick(view, inside, event) {
|
|
|
8758
8742
|
let node = i > $pos.depth ? $pos.nodeAfter : $pos.node(i);
|
|
8759
8743
|
let nodePos = $pos.before(i);
|
|
8760
8744
|
if (node.inlineContent)
|
|
8761
|
-
updateSelection(view, TextSelection.create(doc2, nodePos + 1, nodePos + 1 + node.content.size)
|
|
8745
|
+
updateSelection(view, TextSelection.create(doc2, nodePos + 1, nodePos + 1 + node.content.size));
|
|
8762
8746
|
else if (NodeSelection.isSelectable(node))
|
|
8763
|
-
updateSelection(view, NodeSelection.create(doc2, nodePos)
|
|
8747
|
+
updateSelection(view, NodeSelection.create(doc2, nodePos));
|
|
8764
8748
|
else
|
|
8765
8749
|
continue;
|
|
8766
8750
|
return true;
|
|
@@ -8774,14 +8758,14 @@ handlers.mousedown = (view, _event) => {
|
|
|
8774
8758
|
let event = _event;
|
|
8775
8759
|
view.input.shiftKey = event.shiftKey;
|
|
8776
8760
|
let flushed = forceDOMFlush(view);
|
|
8777
|
-
let
|
|
8778
|
-
if (
|
|
8761
|
+
let now = Date.now(), type2 = "singleClick";
|
|
8762
|
+
if (now - view.input.lastClick.time < 500 && isNear(event, view.input.lastClick) && !event[selectNodeModifier]) {
|
|
8779
8763
|
if (view.input.lastClick.type == "singleClick")
|
|
8780
8764
|
type2 = "doubleClick";
|
|
8781
8765
|
else if (view.input.lastClick.type == "doubleClick")
|
|
8782
8766
|
type2 = "tripleClick";
|
|
8783
8767
|
}
|
|
8784
|
-
view.input.lastClick = { time:
|
|
8768
|
+
view.input.lastClick = { time: now, x: event.clientX, y: event.clientY, type: type2 };
|
|
8785
8769
|
let pos = view.posAtCoords(eventCoords(event));
|
|
8786
8770
|
if (!pos)
|
|
8787
8771
|
return;
|
|
@@ -8877,7 +8861,7 @@ class MouseDown {
|
|
|
8877
8861
|
// thus doesn't get a reaction from ProseMirror. This
|
|
8878
8862
|
// works around that.
|
|
8879
8863
|
chrome && !this.view.state.selection.visible && Math.min(Math.abs(pos.pos - this.view.state.selection.from), Math.abs(pos.pos - this.view.state.selection.to)) <= 2)) {
|
|
8880
|
-
updateSelection(this.view, Selection.near(this.view.state.doc.resolve(pos.pos))
|
|
8864
|
+
updateSelection(this.view, Selection.near(this.view.state.doc.resolve(pos.pos)));
|
|
8881
8865
|
event.preventDefault();
|
|
8882
8866
|
} else {
|
|
8883
8867
|
setSelectionOrigin(this.view, "pointer");
|
|
@@ -9094,8 +9078,7 @@ handlers.dragstart = (view, _event) => {
|
|
|
9094
9078
|
let sel = view.state.selection;
|
|
9095
9079
|
let pos = sel.empty ? null : view.posAtCoords(eventCoords(event));
|
|
9096
9080
|
let node;
|
|
9097
|
-
if (pos && pos.pos >= sel.from && pos.pos <= (sel instanceof NodeSelection ? sel.to - 1 : sel.to))
|
|
9098
|
-
;
|
|
9081
|
+
if (pos && pos.pos >= sel.from && pos.pos <= (sel instanceof NodeSelection ? sel.to - 1 : sel.to)) ;
|
|
9099
9082
|
else if (mouseDown && mouseDown.mightDrag) {
|
|
9100
9083
|
node = NodeSelection.create(view.state.doc, mouseDown.mightDrag.pos);
|
|
9101
9084
|
} else if (event.target && event.target.nodeType == 1) {
|
|
@@ -10560,8 +10543,7 @@ class EditorView {
|
|
|
10560
10543
|
*/
|
|
10561
10544
|
scrollToSelection() {
|
|
10562
10545
|
let startDOM = this.domSelectionRange().focusNode;
|
|
10563
|
-
if (this.someProp("handleScrollToSelection", (f) => f(this)))
|
|
10564
|
-
;
|
|
10546
|
+
if (this.someProp("handleScrollToSelection", (f) => f(this))) ;
|
|
10565
10547
|
else if (this.state.selection instanceof NodeSelection) {
|
|
10566
10548
|
let target = this.docView.domAfterPos(this.state.selection.from);
|
|
10567
10549
|
if (target.nodeType == 1)
|
|
@@ -10980,32 +10962,22 @@ var shift = {
|
|
|
10980
10962
|
};
|
|
10981
10963
|
var mac$1 = typeof navigator != "undefined" && /Mac/.test(navigator.platform);
|
|
10982
10964
|
var ie = typeof navigator != "undefined" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
|
|
10983
|
-
for (var i = 0; i < 10; i++)
|
|
10984
|
-
|
|
10985
|
-
for (var i = 1; i <= 24; i++)
|
|
10986
|
-
base[i + 111] = "F" + i;
|
|
10965
|
+
for (var i = 0; i < 10; i++) base[48 + i] = base[96 + i] = String(i);
|
|
10966
|
+
for (var i = 1; i <= 24; i++) base[i + 111] = "F" + i;
|
|
10987
10967
|
for (var i = 65; i <= 90; i++) {
|
|
10988
10968
|
base[i] = String.fromCharCode(i + 32);
|
|
10989
10969
|
shift[i] = String.fromCharCode(i);
|
|
10990
10970
|
}
|
|
10991
|
-
for (var code in base)
|
|
10992
|
-
if (!shift.hasOwnProperty(code))
|
|
10993
|
-
shift[code] = base[code];
|
|
10971
|
+
for (var code in base) if (!shift.hasOwnProperty(code)) shift[code] = base[code];
|
|
10994
10972
|
function keyName(event) {
|
|
10995
10973
|
var ignoreKey = mac$1 && event.metaKey && event.shiftKey && !event.ctrlKey && !event.altKey || ie && event.shiftKey && event.key && event.key.length == 1 || event.key == "Unidentified";
|
|
10996
10974
|
var name2 = !ignoreKey && event.key || (event.shiftKey ? shift : base)[event.keyCode] || event.key || "Unidentified";
|
|
10997
|
-
if (name2 == "Esc")
|
|
10998
|
-
|
|
10999
|
-
if (name2 == "
|
|
11000
|
-
|
|
11001
|
-
if (name2 == "
|
|
11002
|
-
|
|
11003
|
-
if (name2 == "Up")
|
|
11004
|
-
name2 = "ArrowUp";
|
|
11005
|
-
if (name2 == "Right")
|
|
11006
|
-
name2 = "ArrowRight";
|
|
11007
|
-
if (name2 == "Down")
|
|
11008
|
-
name2 = "ArrowDown";
|
|
10975
|
+
if (name2 == "Esc") name2 = "Escape";
|
|
10976
|
+
if (name2 == "Del") name2 = "Delete";
|
|
10977
|
+
if (name2 == "Left") name2 = "ArrowLeft";
|
|
10978
|
+
if (name2 == "Up") name2 = "ArrowUp";
|
|
10979
|
+
if (name2 == "Right") name2 = "ArrowRight";
|
|
10980
|
+
if (name2 == "Down") name2 = "ArrowDown";
|
|
11009
10981
|
return name2;
|
|
11010
10982
|
}
|
|
11011
10983
|
const mac = typeof navigator != "undefined" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : false;
|
|
@@ -11376,6 +11348,45 @@ const liftEmptyBlock$1 = (state, dispatch) => {
|
|
|
11376
11348
|
dispatch(state.tr.lift(range, target).scrollIntoView());
|
|
11377
11349
|
return true;
|
|
11378
11350
|
};
|
|
11351
|
+
function splitBlockAs(splitNode) {
|
|
11352
|
+
return (state, dispatch) => {
|
|
11353
|
+
let { $from, $to } = state.selection;
|
|
11354
|
+
if (state.selection instanceof NodeSelection && state.selection.node.isBlock) {
|
|
11355
|
+
if (!$from.parentOffset || !canSplit(state.doc, $from.pos))
|
|
11356
|
+
return false;
|
|
11357
|
+
if (dispatch)
|
|
11358
|
+
dispatch(state.tr.split($from.pos).scrollIntoView());
|
|
11359
|
+
return true;
|
|
11360
|
+
}
|
|
11361
|
+
if (!$from.parent.isBlock)
|
|
11362
|
+
return false;
|
|
11363
|
+
if (dispatch) {
|
|
11364
|
+
let atEnd = $to.parentOffset == $to.parent.content.size;
|
|
11365
|
+
let tr2 = state.tr;
|
|
11366
|
+
if (state.selection instanceof TextSelection || state.selection instanceof AllSelection)
|
|
11367
|
+
tr2.deleteSelection();
|
|
11368
|
+
let deflt = $from.depth == 0 ? null : defaultBlockAt$1($from.node(-1).contentMatchAt($from.indexAfter(-1)));
|
|
11369
|
+
let types = atEnd && deflt ? [{ type: deflt }] : void 0;
|
|
11370
|
+
let can = canSplit(tr2.doc, tr2.mapping.map($from.pos), 1, types);
|
|
11371
|
+
if (!types && !can && canSplit(tr2.doc, tr2.mapping.map($from.pos), 1, deflt ? [{ type: deflt }] : void 0)) {
|
|
11372
|
+
if (deflt)
|
|
11373
|
+
types = [{ type: deflt }];
|
|
11374
|
+
can = true;
|
|
11375
|
+
}
|
|
11376
|
+
if (can) {
|
|
11377
|
+
tr2.split(tr2.mapping.map($from.pos), 1, types);
|
|
11378
|
+
if (!atEnd && !$from.parentOffset && $from.parent.type != deflt) {
|
|
11379
|
+
let first2 = tr2.mapping.map($from.before()), $first = tr2.doc.resolve(first2);
|
|
11380
|
+
if (deflt && $from.node(-1).canReplaceWith($first.index(), $first.index() + 1, deflt))
|
|
11381
|
+
tr2.setNodeMarkup(tr2.mapping.map($from.before()), deflt);
|
|
11382
|
+
}
|
|
11383
|
+
}
|
|
11384
|
+
dispatch(tr2.scrollIntoView());
|
|
11385
|
+
}
|
|
11386
|
+
return true;
|
|
11387
|
+
};
|
|
11388
|
+
}
|
|
11389
|
+
const splitBlock$1 = splitBlockAs();
|
|
11379
11390
|
const selectParentNode$1 = (state, dispatch) => {
|
|
11380
11391
|
let { $from, to } = state.selection, pos;
|
|
11381
11392
|
let same = $from.sharedDepth(to);
|
|
@@ -11513,6 +11524,19 @@ function setBlockType(nodeType, attrs = null) {
|
|
|
11513
11524
|
return true;
|
|
11514
11525
|
};
|
|
11515
11526
|
}
|
|
11527
|
+
function chainCommands(...commands2) {
|
|
11528
|
+
return function(state, dispatch, view) {
|
|
11529
|
+
for (let i = 0; i < commands2.length; i++)
|
|
11530
|
+
if (commands2[i](state, dispatch, view))
|
|
11531
|
+
return true;
|
|
11532
|
+
return false;
|
|
11533
|
+
};
|
|
11534
|
+
}
|
|
11535
|
+
chainCommands(deleteSelection$1, joinBackward$1, selectNodeBackward$1);
|
|
11536
|
+
chainCommands(deleteSelection$1, joinForward$1, selectNodeForward$1);
|
|
11537
|
+
({
|
|
11538
|
+
"Enter": chainCommands(newlineInCode$1, createParagraphNear$1, liftEmptyBlock$1, splitBlock$1)
|
|
11539
|
+
});
|
|
11516
11540
|
typeof navigator != "undefined" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os != "undefined" && os.platform ? os.platform() == "darwin" : false;
|
|
11517
11541
|
function wrapInList$1(listType, attrs = null) {
|
|
11518
11542
|
return function(state, dispatch) {
|
|
@@ -14660,7 +14684,7 @@ img.ProseMirror-separator {
|
|
|
14660
14684
|
opacity: 0
|
|
14661
14685
|
}`;
|
|
14662
14686
|
function createStyleTag(style2, nonce, suffix) {
|
|
14663
|
-
const tiptapStyleTag = document.querySelector(`style[data-tiptap-style${
|
|
14687
|
+
const tiptapStyleTag = document.querySelector(`style[data-tiptap-style${""}]`);
|
|
14664
14688
|
if (tiptapStyleTag !== null) {
|
|
14665
14689
|
return tiptapStyleTag;
|
|
14666
14690
|
}
|
|
@@ -14668,7 +14692,7 @@ function createStyleTag(style2, nonce, suffix) {
|
|
|
14668
14692
|
if (nonce) {
|
|
14669
14693
|
styleNode.setAttribute("nonce", nonce);
|
|
14670
14694
|
}
|
|
14671
|
-
styleNode.setAttribute(`data-tiptap-style${
|
|
14695
|
+
styleNode.setAttribute(`data-tiptap-style${""}`, "");
|
|
14672
14696
|
styleNode.innerHTML = style2;
|
|
14673
14697
|
document.getElementsByTagName("head")[0].appendChild(styleNode);
|
|
14674
14698
|
return styleNode;
|
|
@@ -16052,7 +16076,6 @@ function detectOverflow(state, options) {
|
|
|
16052
16076
|
var popperOffsets2 = computeOffsets({
|
|
16053
16077
|
reference: referenceClientRect,
|
|
16054
16078
|
element: popperRect,
|
|
16055
|
-
strategy: "absolute",
|
|
16056
16079
|
placement
|
|
16057
16080
|
});
|
|
16058
16081
|
var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets2));
|
|
@@ -16186,8 +16209,7 @@ function flip(_ref) {
|
|
|
16186
16209
|
};
|
|
16187
16210
|
for (var _i = numberOfChecks; _i > 0; _i--) {
|
|
16188
16211
|
var _ret = _loop(_i);
|
|
16189
|
-
if (_ret === "break")
|
|
16190
|
-
break;
|
|
16212
|
+
if (_ret === "break") break;
|
|
16191
16213
|
}
|
|
16192
16214
|
}
|
|
16193
16215
|
if (state.placement !== firstFittingPlacement) {
|
|
@@ -16300,7 +16322,6 @@ function popperOffsets(_ref) {
|
|
|
16300
16322
|
state.modifiersData[name2] = computeOffsets({
|
|
16301
16323
|
reference: state.rects.reference,
|
|
16302
16324
|
element: state.rects.popper,
|
|
16303
|
-
strategy: "absolute",
|
|
16304
16325
|
placement: state.placement
|
|
16305
16326
|
});
|
|
16306
16327
|
}
|
|
@@ -16495,7 +16516,7 @@ function orderModifiers(modifiers2) {
|
|
|
16495
16516
|
}));
|
|
16496
16517
|
}, []);
|
|
16497
16518
|
}
|
|
16498
|
-
function debounce$
|
|
16519
|
+
function debounce$2(fn2) {
|
|
16499
16520
|
var pending;
|
|
16500
16521
|
return function() {
|
|
16501
16522
|
if (!pending) {
|
|
@@ -16616,7 +16637,7 @@ function popperGenerator(generatorOptions) {
|
|
|
16616
16637
|
},
|
|
16617
16638
|
// Async and optimistically optimized update – it will not be executed if
|
|
16618
16639
|
// not necessary (debounced to run at most once-per-tick)
|
|
16619
|
-
update: debounce$
|
|
16640
|
+
update: debounce$2(function() {
|
|
16620
16641
|
return new Promise(function(resolve) {
|
|
16621
16642
|
instance.forceUpdate();
|
|
16622
16643
|
resolve(state);
|
|
@@ -16676,7 +16697,7 @@ var TOUCH_OPTIONS = {
|
|
|
16676
16697
|
var TIPPY_DEFAULT_APPEND_TO = function TIPPY_DEFAULT_APPEND_TO2() {
|
|
16677
16698
|
return document.body;
|
|
16678
16699
|
};
|
|
16679
|
-
function hasOwnProperty
|
|
16700
|
+
function hasOwnProperty(obj, key) {
|
|
16680
16701
|
return {}.hasOwnProperty.call(obj, key);
|
|
16681
16702
|
}
|
|
16682
16703
|
function getValueAtIndexOrReturn(value, index, defaultValue) {
|
|
@@ -16693,7 +16714,7 @@ function isType(value, type2) {
|
|
|
16693
16714
|
function invokeWithArgsOrReturn(value, args) {
|
|
16694
16715
|
return typeof value === "function" ? value.apply(void 0, args) : value;
|
|
16695
16716
|
}
|
|
16696
|
-
function debounce$
|
|
16717
|
+
function debounce$1(fn2, ms) {
|
|
16697
16718
|
if (ms === 0) {
|
|
16698
16719
|
return fn2;
|
|
16699
16720
|
}
|
|
@@ -16842,12 +16863,12 @@ function onDocumentTouchStart() {
|
|
|
16842
16863
|
}
|
|
16843
16864
|
}
|
|
16844
16865
|
function onDocumentMouseMove() {
|
|
16845
|
-
var
|
|
16846
|
-
if (
|
|
16866
|
+
var now = performance.now();
|
|
16867
|
+
if (now - lastMouseMoveTime < 20) {
|
|
16847
16868
|
currentInput.isTouch = false;
|
|
16848
16869
|
document.removeEventListener("mousemove", onDocumentMouseMove);
|
|
16849
16870
|
}
|
|
16850
|
-
lastMouseMoveTime =
|
|
16871
|
+
lastMouseMoveTime = now;
|
|
16851
16872
|
}
|
|
16852
16873
|
function onWindowBlur() {
|
|
16853
16874
|
var activeElement = document.activeElement;
|
|
@@ -17048,7 +17069,7 @@ function validateProps(partialProps, plugins) {
|
|
|
17048
17069
|
var keys2 = Object.keys(partialProps);
|
|
17049
17070
|
keys2.forEach(function(prop) {
|
|
17050
17071
|
var nonPluginProps = removeProperties(defaultProps, Object.keys(pluginProps));
|
|
17051
|
-
var didPassUnknownProp = !hasOwnProperty
|
|
17072
|
+
var didPassUnknownProp = !hasOwnProperty(nonPluginProps, prop);
|
|
17052
17073
|
if (didPassUnknownProp) {
|
|
17053
17074
|
didPassUnknownProp = plugins.filter(function(plugin) {
|
|
17054
17075
|
return plugin.name === prop;
|
|
@@ -17177,7 +17198,7 @@ function createTippy(reference2, passedProps) {
|
|
|
17177
17198
|
var currentTransitionEndListener;
|
|
17178
17199
|
var onFirstUpdate;
|
|
17179
17200
|
var listeners = [];
|
|
17180
|
-
var debouncedOnMouseMove = debounce$
|
|
17201
|
+
var debouncedOnMouseMove = debounce$1(onMouseMove, props.interactiveDebounce);
|
|
17181
17202
|
var currentTarget;
|
|
17182
17203
|
var id = idCounter++;
|
|
17183
17204
|
var popperInstance = null;
|
|
@@ -17712,7 +17733,7 @@ function createTippy(reference2, passedProps) {
|
|
|
17712
17733
|
addListeners();
|
|
17713
17734
|
if (prevProps.interactiveDebounce !== nextProps.interactiveDebounce) {
|
|
17714
17735
|
cleanupInteractiveMouseListeners();
|
|
17715
|
-
debouncedOnMouseMove = debounce$
|
|
17736
|
+
debouncedOnMouseMove = debounce$1(onMouseMove, nextProps.interactiveDebounce);
|
|
17716
17737
|
}
|
|
17717
17738
|
if (prevProps.triggerTarget && !nextProps.triggerTarget) {
|
|
17718
17739
|
normalizeToArray(prevProps.triggerTarget).forEach(function(node) {
|
|
@@ -18298,13 +18319,13 @@ const BubbleMenu = vue.defineComponent({
|
|
|
18298
18319
|
}
|
|
18299
18320
|
},
|
|
18300
18321
|
setup(props, { slots }) {
|
|
18301
|
-
const
|
|
18322
|
+
const root = vue.ref(null);
|
|
18302
18323
|
vue.onMounted(() => {
|
|
18303
18324
|
const { updateDelay, editor, pluginKey, shouldShow, tippyOptions } = props;
|
|
18304
18325
|
editor.registerPlugin(BubbleMenuPlugin({
|
|
18305
18326
|
updateDelay,
|
|
18306
18327
|
editor,
|
|
18307
|
-
element:
|
|
18328
|
+
element: root.value,
|
|
18308
18329
|
pluginKey,
|
|
18309
18330
|
shouldShow,
|
|
18310
18331
|
tippyOptions
|
|
@@ -18316,7 +18337,7 @@ const BubbleMenu = vue.defineComponent({
|
|
|
18316
18337
|
});
|
|
18317
18338
|
return () => {
|
|
18318
18339
|
var _a;
|
|
18319
|
-
return vue.h("div", { ref:
|
|
18340
|
+
return vue.h("div", { ref: root }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots));
|
|
18320
18341
|
};
|
|
18321
18342
|
}
|
|
18322
18343
|
});
|
|
@@ -18466,13 +18487,13 @@ vue.defineComponent({
|
|
|
18466
18487
|
}
|
|
18467
18488
|
},
|
|
18468
18489
|
setup(props, { slots }) {
|
|
18469
|
-
const
|
|
18490
|
+
const root = vue.ref(null);
|
|
18470
18491
|
vue.onMounted(() => {
|
|
18471
18492
|
const { pluginKey, editor, tippyOptions, shouldShow } = props;
|
|
18472
18493
|
editor.registerPlugin(FloatingMenuPlugin({
|
|
18473
18494
|
pluginKey,
|
|
18474
18495
|
editor,
|
|
18475
|
-
element:
|
|
18496
|
+
element: root.value,
|
|
18476
18497
|
tippyOptions,
|
|
18477
18498
|
shouldShow
|
|
18478
18499
|
}));
|
|
@@ -18483,7 +18504,7 @@ vue.defineComponent({
|
|
|
18483
18504
|
});
|
|
18484
18505
|
return () => {
|
|
18485
18506
|
var _a;
|
|
18486
|
-
return vue.h("div", { ref:
|
|
18507
|
+
return vue.h("div", { ref: root }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots));
|
|
18487
18508
|
};
|
|
18488
18509
|
}
|
|
18489
18510
|
});
|
|
@@ -18542,199 +18563,298 @@ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof win
|
|
|
18542
18563
|
function getDefaultExportFromCjs(x) {
|
|
18543
18564
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
18544
18565
|
}
|
|
18545
|
-
|
|
18546
|
-
|
|
18547
|
-
|
|
18548
|
-
|
|
18549
|
-
|
|
18550
|
-
|
|
18551
|
-
var
|
|
18552
|
-
|
|
18553
|
-
|
|
18554
|
-
|
|
18555
|
-
|
|
18556
|
-
|
|
18557
|
-
var
|
|
18558
|
-
|
|
18559
|
-
|
|
18560
|
-
|
|
18561
|
-
|
|
18562
|
-
|
|
18563
|
-
|
|
18564
|
-
|
|
18565
|
-
|
|
18566
|
-
|
|
18567
|
-
|
|
18568
|
-
|
|
18569
|
-
|
|
18570
|
-
|
|
18571
|
-
|
|
18572
|
-
|
|
18573
|
-
|
|
18574
|
-
|
|
18575
|
-
|
|
18576
|
-
|
|
18577
|
-
var
|
|
18578
|
-
var
|
|
18579
|
-
|
|
18580
|
-
|
|
18581
|
-
|
|
18582
|
-
var
|
|
18583
|
-
function
|
|
18584
|
-
|
|
18585
|
-
|
|
18586
|
-
|
|
18587
|
-
|
|
18588
|
-
|
|
18589
|
-
|
|
18590
|
-
|
|
18591
|
-
|
|
18592
|
-
|
|
18593
|
-
|
|
18594
|
-
|
|
18595
|
-
|
|
18566
|
+
var isObject_1;
|
|
18567
|
+
var hasRequiredIsObject;
|
|
18568
|
+
function requireIsObject() {
|
|
18569
|
+
if (hasRequiredIsObject) return isObject_1;
|
|
18570
|
+
hasRequiredIsObject = 1;
|
|
18571
|
+
function isObject(value) {
|
|
18572
|
+
var type2 = typeof value;
|
|
18573
|
+
return value != null && (type2 == "object" || type2 == "function");
|
|
18574
|
+
}
|
|
18575
|
+
isObject_1 = isObject;
|
|
18576
|
+
return isObject_1;
|
|
18577
|
+
}
|
|
18578
|
+
var _freeGlobal;
|
|
18579
|
+
var hasRequired_freeGlobal;
|
|
18580
|
+
function require_freeGlobal() {
|
|
18581
|
+
if (hasRequired_freeGlobal) return _freeGlobal;
|
|
18582
|
+
hasRequired_freeGlobal = 1;
|
|
18583
|
+
var freeGlobal = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
18584
|
+
_freeGlobal = freeGlobal;
|
|
18585
|
+
return _freeGlobal;
|
|
18586
|
+
}
|
|
18587
|
+
var _root;
|
|
18588
|
+
var hasRequired_root;
|
|
18589
|
+
function require_root() {
|
|
18590
|
+
if (hasRequired_root) return _root;
|
|
18591
|
+
hasRequired_root = 1;
|
|
18592
|
+
var freeGlobal = require_freeGlobal();
|
|
18593
|
+
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
18594
|
+
var root = freeGlobal || freeSelf || Function("return this")();
|
|
18595
|
+
_root = root;
|
|
18596
|
+
return _root;
|
|
18597
|
+
}
|
|
18598
|
+
var now_1;
|
|
18599
|
+
var hasRequiredNow;
|
|
18600
|
+
function requireNow() {
|
|
18601
|
+
if (hasRequiredNow) return now_1;
|
|
18602
|
+
hasRequiredNow = 1;
|
|
18603
|
+
var root = require_root();
|
|
18604
|
+
var now = function() {
|
|
18605
|
+
return root.Date.now();
|
|
18606
|
+
};
|
|
18607
|
+
now_1 = now;
|
|
18608
|
+
return now_1;
|
|
18609
|
+
}
|
|
18610
|
+
var _trimmedEndIndex;
|
|
18611
|
+
var hasRequired_trimmedEndIndex;
|
|
18612
|
+
function require_trimmedEndIndex() {
|
|
18613
|
+
if (hasRequired_trimmedEndIndex) return _trimmedEndIndex;
|
|
18614
|
+
hasRequired_trimmedEndIndex = 1;
|
|
18615
|
+
var reWhitespace = /\s/;
|
|
18616
|
+
function trimmedEndIndex(string) {
|
|
18617
|
+
var index = string.length;
|
|
18618
|
+
while (index-- && reWhitespace.test(string.charAt(index))) {
|
|
18619
|
+
}
|
|
18620
|
+
return index;
|
|
18621
|
+
}
|
|
18622
|
+
_trimmedEndIndex = trimmedEndIndex;
|
|
18623
|
+
return _trimmedEndIndex;
|
|
18624
|
+
}
|
|
18625
|
+
var _baseTrim;
|
|
18626
|
+
var hasRequired_baseTrim;
|
|
18627
|
+
function require_baseTrim() {
|
|
18628
|
+
if (hasRequired_baseTrim) return _baseTrim;
|
|
18629
|
+
hasRequired_baseTrim = 1;
|
|
18630
|
+
var trimmedEndIndex = require_trimmedEndIndex();
|
|
18631
|
+
var reTrimStart = /^\s+/;
|
|
18632
|
+
function baseTrim(string) {
|
|
18633
|
+
return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
|
|
18634
|
+
}
|
|
18635
|
+
_baseTrim = baseTrim;
|
|
18636
|
+
return _baseTrim;
|
|
18637
|
+
}
|
|
18638
|
+
var _Symbol;
|
|
18639
|
+
var hasRequired_Symbol;
|
|
18640
|
+
function require_Symbol() {
|
|
18641
|
+
if (hasRequired_Symbol) return _Symbol;
|
|
18642
|
+
hasRequired_Symbol = 1;
|
|
18643
|
+
var root = require_root();
|
|
18644
|
+
var Symbol2 = root.Symbol;
|
|
18645
|
+
_Symbol = Symbol2;
|
|
18646
|
+
return _Symbol;
|
|
18647
|
+
}
|
|
18648
|
+
var _getRawTag;
|
|
18649
|
+
var hasRequired_getRawTag;
|
|
18650
|
+
function require_getRawTag() {
|
|
18651
|
+
if (hasRequired_getRawTag) return _getRawTag;
|
|
18652
|
+
hasRequired_getRawTag = 1;
|
|
18653
|
+
var Symbol2 = require_Symbol();
|
|
18654
|
+
var objectProto = Object.prototype;
|
|
18655
|
+
var hasOwnProperty2 = objectProto.hasOwnProperty;
|
|
18656
|
+
var nativeObjectToString = objectProto.toString;
|
|
18657
|
+
var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
|
|
18658
|
+
function getRawTag(value) {
|
|
18659
|
+
var isOwn = hasOwnProperty2.call(value, symToStringTag), tag = value[symToStringTag];
|
|
18660
|
+
try {
|
|
18661
|
+
value[symToStringTag] = void 0;
|
|
18662
|
+
var unmasked = true;
|
|
18663
|
+
} catch (e) {
|
|
18664
|
+
}
|
|
18665
|
+
var result = nativeObjectToString.call(value);
|
|
18666
|
+
if (unmasked) {
|
|
18667
|
+
if (isOwn) {
|
|
18668
|
+
value[symToStringTag] = tag;
|
|
18669
|
+
} else {
|
|
18670
|
+
delete value[symToStringTag];
|
|
18671
|
+
}
|
|
18596
18672
|
}
|
|
18597
|
-
}
|
|
18598
|
-
return result;
|
|
18599
|
-
}
|
|
18600
|
-
var _getRawTag = getRawTag$1;
|
|
18601
|
-
var objectProto = Object.prototype;
|
|
18602
|
-
var nativeObjectToString = objectProto.toString;
|
|
18603
|
-
function objectToString$1(value) {
|
|
18604
|
-
return nativeObjectToString.call(value);
|
|
18605
|
-
}
|
|
18606
|
-
var _objectToString = objectToString$1;
|
|
18607
|
-
var Symbol$1 = _Symbol, getRawTag = _getRawTag, objectToString = _objectToString;
|
|
18608
|
-
var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
|
|
18609
|
-
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
18610
|
-
function baseGetTag$1(value) {
|
|
18611
|
-
if (value == null) {
|
|
18612
|
-
return value === void 0 ? undefinedTag : nullTag;
|
|
18613
|
-
}
|
|
18614
|
-
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
18615
|
-
}
|
|
18616
|
-
var _baseGetTag = baseGetTag$1;
|
|
18617
|
-
function isObjectLike$1(value) {
|
|
18618
|
-
return value != null && typeof value == "object";
|
|
18619
|
-
}
|
|
18620
|
-
var isObjectLike_1 = isObjectLike$1;
|
|
18621
|
-
var baseGetTag = _baseGetTag, isObjectLike = isObjectLike_1;
|
|
18622
|
-
var symbolTag = "[object Symbol]";
|
|
18623
|
-
function isSymbol$1(value) {
|
|
18624
|
-
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
|
|
18625
|
-
}
|
|
18626
|
-
var isSymbol_1 = isSymbol$1;
|
|
18627
|
-
var baseTrim = _baseTrim, isObject$1 = isObject_1, isSymbol = isSymbol_1;
|
|
18628
|
-
var NAN = 0 / 0;
|
|
18629
|
-
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
18630
|
-
var reIsBinary = /^0b[01]+$/i;
|
|
18631
|
-
var reIsOctal = /^0o[0-7]+$/i;
|
|
18632
|
-
var freeParseInt = parseInt;
|
|
18633
|
-
function toNumber$1(value) {
|
|
18634
|
-
if (typeof value == "number") {
|
|
18635
|
-
return value;
|
|
18636
|
-
}
|
|
18637
|
-
if (isSymbol(value)) {
|
|
18638
|
-
return NAN;
|
|
18639
|
-
}
|
|
18640
|
-
if (isObject$1(value)) {
|
|
18641
|
-
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
18642
|
-
value = isObject$1(other) ? other + "" : other;
|
|
18643
|
-
}
|
|
18644
|
-
if (typeof value != "string") {
|
|
18645
|
-
return value === 0 ? value : +value;
|
|
18646
|
-
}
|
|
18647
|
-
value = baseTrim(value);
|
|
18648
|
-
var isBinary = reIsBinary.test(value);
|
|
18649
|
-
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
18650
|
-
}
|
|
18651
|
-
var toNumber_1 = toNumber$1;
|
|
18652
|
-
var isObject = isObject_1, now = now_1, toNumber = toNumber_1;
|
|
18653
|
-
var FUNC_ERROR_TEXT = "Expected a function";
|
|
18654
|
-
var nativeMax = Math.max, nativeMin = Math.min;
|
|
18655
|
-
function debounce(func, wait, options) {
|
|
18656
|
-
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
18657
|
-
if (typeof func != "function") {
|
|
18658
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
18659
|
-
}
|
|
18660
|
-
wait = toNumber(wait) || 0;
|
|
18661
|
-
if (isObject(options)) {
|
|
18662
|
-
leading = !!options.leading;
|
|
18663
|
-
maxing = "maxWait" in options;
|
|
18664
|
-
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
18665
|
-
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
18666
|
-
}
|
|
18667
|
-
function invokeFunc(time) {
|
|
18668
|
-
var args = lastArgs, thisArg = lastThis;
|
|
18669
|
-
lastArgs = lastThis = void 0;
|
|
18670
|
-
lastInvokeTime = time;
|
|
18671
|
-
result = func.apply(thisArg, args);
|
|
18672
18673
|
return result;
|
|
18673
18674
|
}
|
|
18674
|
-
|
|
18675
|
-
|
|
18676
|
-
|
|
18677
|
-
|
|
18678
|
-
|
|
18679
|
-
|
|
18680
|
-
|
|
18681
|
-
|
|
18682
|
-
|
|
18683
|
-
|
|
18684
|
-
|
|
18685
|
-
return
|
|
18686
|
-
}
|
|
18687
|
-
|
|
18688
|
-
|
|
18689
|
-
|
|
18690
|
-
|
|
18675
|
+
_getRawTag = getRawTag;
|
|
18676
|
+
return _getRawTag;
|
|
18677
|
+
}
|
|
18678
|
+
var _objectToString;
|
|
18679
|
+
var hasRequired_objectToString;
|
|
18680
|
+
function require_objectToString() {
|
|
18681
|
+
if (hasRequired_objectToString) return _objectToString;
|
|
18682
|
+
hasRequired_objectToString = 1;
|
|
18683
|
+
var objectProto = Object.prototype;
|
|
18684
|
+
var nativeObjectToString = objectProto.toString;
|
|
18685
|
+
function objectToString(value) {
|
|
18686
|
+
return nativeObjectToString.call(value);
|
|
18687
|
+
}
|
|
18688
|
+
_objectToString = objectToString;
|
|
18689
|
+
return _objectToString;
|
|
18690
|
+
}
|
|
18691
|
+
var _baseGetTag;
|
|
18692
|
+
var hasRequired_baseGetTag;
|
|
18693
|
+
function require_baseGetTag() {
|
|
18694
|
+
if (hasRequired_baseGetTag) return _baseGetTag;
|
|
18695
|
+
hasRequired_baseGetTag = 1;
|
|
18696
|
+
var Symbol2 = require_Symbol(), getRawTag = require_getRawTag(), objectToString = require_objectToString();
|
|
18697
|
+
var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
|
|
18698
|
+
var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
|
|
18699
|
+
function baseGetTag(value) {
|
|
18700
|
+
if (value == null) {
|
|
18701
|
+
return value === void 0 ? undefinedTag : nullTag;
|
|
18702
|
+
}
|
|
18703
|
+
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
18704
|
+
}
|
|
18705
|
+
_baseGetTag = baseGetTag;
|
|
18706
|
+
return _baseGetTag;
|
|
18707
|
+
}
|
|
18708
|
+
var isObjectLike_1;
|
|
18709
|
+
var hasRequiredIsObjectLike;
|
|
18710
|
+
function requireIsObjectLike() {
|
|
18711
|
+
if (hasRequiredIsObjectLike) return isObjectLike_1;
|
|
18712
|
+
hasRequiredIsObjectLike = 1;
|
|
18713
|
+
function isObjectLike(value) {
|
|
18714
|
+
return value != null && typeof value == "object";
|
|
18715
|
+
}
|
|
18716
|
+
isObjectLike_1 = isObjectLike;
|
|
18717
|
+
return isObjectLike_1;
|
|
18718
|
+
}
|
|
18719
|
+
var isSymbol_1;
|
|
18720
|
+
var hasRequiredIsSymbol;
|
|
18721
|
+
function requireIsSymbol() {
|
|
18722
|
+
if (hasRequiredIsSymbol) return isSymbol_1;
|
|
18723
|
+
hasRequiredIsSymbol = 1;
|
|
18724
|
+
var baseGetTag = require_baseGetTag(), isObjectLike = requireIsObjectLike();
|
|
18725
|
+
var symbolTag = "[object Symbol]";
|
|
18726
|
+
function isSymbol(value) {
|
|
18727
|
+
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
|
|
18728
|
+
}
|
|
18729
|
+
isSymbol_1 = isSymbol;
|
|
18730
|
+
return isSymbol_1;
|
|
18731
|
+
}
|
|
18732
|
+
var toNumber_1;
|
|
18733
|
+
var hasRequiredToNumber;
|
|
18734
|
+
function requireToNumber() {
|
|
18735
|
+
if (hasRequiredToNumber) return toNumber_1;
|
|
18736
|
+
hasRequiredToNumber = 1;
|
|
18737
|
+
var baseTrim = require_baseTrim(), isObject = requireIsObject(), isSymbol = requireIsSymbol();
|
|
18738
|
+
var NAN = 0 / 0;
|
|
18739
|
+
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
18740
|
+
var reIsBinary = /^0b[01]+$/i;
|
|
18741
|
+
var reIsOctal = /^0o[0-7]+$/i;
|
|
18742
|
+
var freeParseInt = parseInt;
|
|
18743
|
+
function toNumber(value) {
|
|
18744
|
+
if (typeof value == "number") {
|
|
18745
|
+
return value;
|
|
18691
18746
|
}
|
|
18692
|
-
|
|
18693
|
-
|
|
18694
|
-
|
|
18695
|
-
|
|
18696
|
-
|
|
18697
|
-
|
|
18747
|
+
if (isSymbol(value)) {
|
|
18748
|
+
return NAN;
|
|
18749
|
+
}
|
|
18750
|
+
if (isObject(value)) {
|
|
18751
|
+
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
18752
|
+
value = isObject(other) ? other + "" : other;
|
|
18753
|
+
}
|
|
18754
|
+
if (typeof value != "string") {
|
|
18755
|
+
return value === 0 ? value : +value;
|
|
18756
|
+
}
|
|
18757
|
+
value = baseTrim(value);
|
|
18758
|
+
var isBinary = reIsBinary.test(value);
|
|
18759
|
+
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
18760
|
+
}
|
|
18761
|
+
toNumber_1 = toNumber;
|
|
18762
|
+
return toNumber_1;
|
|
18763
|
+
}
|
|
18764
|
+
var debounce_1;
|
|
18765
|
+
var hasRequiredDebounce;
|
|
18766
|
+
function requireDebounce() {
|
|
18767
|
+
if (hasRequiredDebounce) return debounce_1;
|
|
18768
|
+
hasRequiredDebounce = 1;
|
|
18769
|
+
var isObject = requireIsObject(), now = requireNow(), toNumber = requireToNumber();
|
|
18770
|
+
var FUNC_ERROR_TEXT = "Expected a function";
|
|
18771
|
+
var nativeMax = Math.max, nativeMin = Math.min;
|
|
18772
|
+
function debounce2(func, wait, options) {
|
|
18773
|
+
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
18774
|
+
if (typeof func != "function") {
|
|
18775
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
18776
|
+
}
|
|
18777
|
+
wait = toNumber(wait) || 0;
|
|
18778
|
+
if (isObject(options)) {
|
|
18779
|
+
leading = !!options.leading;
|
|
18780
|
+
maxing = "maxWait" in options;
|
|
18781
|
+
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
18782
|
+
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
18783
|
+
}
|
|
18784
|
+
function invokeFunc(time) {
|
|
18785
|
+
var args = lastArgs, thisArg = lastThis;
|
|
18786
|
+
lastArgs = lastThis = void 0;
|
|
18787
|
+
lastInvokeTime = time;
|
|
18788
|
+
result = func.apply(thisArg, args);
|
|
18789
|
+
return result;
|
|
18698
18790
|
}
|
|
18699
|
-
|
|
18700
|
-
|
|
18701
|
-
|
|
18702
|
-
|
|
18703
|
-
if (timerId !== void 0) {
|
|
18704
|
-
clearTimeout(timerId);
|
|
18791
|
+
function leadingEdge(time) {
|
|
18792
|
+
lastInvokeTime = time;
|
|
18793
|
+
timerId = setTimeout(timerExpired, wait);
|
|
18794
|
+
return leading ? invokeFunc(time) : result;
|
|
18705
18795
|
}
|
|
18706
|
-
|
|
18707
|
-
|
|
18708
|
-
|
|
18709
|
-
|
|
18710
|
-
|
|
18711
|
-
|
|
18712
|
-
|
|
18713
|
-
|
|
18714
|
-
|
|
18715
|
-
|
|
18716
|
-
|
|
18717
|
-
|
|
18718
|
-
|
|
18719
|
-
|
|
18796
|
+
function remainingWait(time) {
|
|
18797
|
+
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
|
|
18798
|
+
return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
|
|
18799
|
+
}
|
|
18800
|
+
function shouldInvoke(time) {
|
|
18801
|
+
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
|
|
18802
|
+
return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
|
18803
|
+
}
|
|
18804
|
+
function timerExpired() {
|
|
18805
|
+
var time = now();
|
|
18806
|
+
if (shouldInvoke(time)) {
|
|
18807
|
+
return trailingEdge(time);
|
|
18808
|
+
}
|
|
18809
|
+
timerId = setTimeout(timerExpired, remainingWait(time));
|
|
18810
|
+
}
|
|
18811
|
+
function trailingEdge(time) {
|
|
18812
|
+
timerId = void 0;
|
|
18813
|
+
if (trailing && lastArgs) {
|
|
18814
|
+
return invokeFunc(time);
|
|
18720
18815
|
}
|
|
18721
|
-
|
|
18816
|
+
lastArgs = lastThis = void 0;
|
|
18817
|
+
return result;
|
|
18818
|
+
}
|
|
18819
|
+
function cancel() {
|
|
18820
|
+
if (timerId !== void 0) {
|
|
18722
18821
|
clearTimeout(timerId);
|
|
18723
|
-
timerId = setTimeout(timerExpired, wait);
|
|
18724
|
-
return invokeFunc(lastCallTime);
|
|
18725
18822
|
}
|
|
18823
|
+
lastInvokeTime = 0;
|
|
18824
|
+
lastArgs = lastCallTime = lastThis = timerId = void 0;
|
|
18726
18825
|
}
|
|
18727
|
-
|
|
18728
|
-
timerId
|
|
18826
|
+
function flush() {
|
|
18827
|
+
return timerId === void 0 ? result : trailingEdge(now());
|
|
18729
18828
|
}
|
|
18730
|
-
|
|
18829
|
+
function debounced() {
|
|
18830
|
+
var time = now(), isInvoking = shouldInvoke(time);
|
|
18831
|
+
lastArgs = arguments;
|
|
18832
|
+
lastThis = this;
|
|
18833
|
+
lastCallTime = time;
|
|
18834
|
+
if (isInvoking) {
|
|
18835
|
+
if (timerId === void 0) {
|
|
18836
|
+
return leadingEdge(lastCallTime);
|
|
18837
|
+
}
|
|
18838
|
+
if (maxing) {
|
|
18839
|
+
clearTimeout(timerId);
|
|
18840
|
+
timerId = setTimeout(timerExpired, wait);
|
|
18841
|
+
return invokeFunc(lastCallTime);
|
|
18842
|
+
}
|
|
18843
|
+
}
|
|
18844
|
+
if (timerId === void 0) {
|
|
18845
|
+
timerId = setTimeout(timerExpired, wait);
|
|
18846
|
+
}
|
|
18847
|
+
return result;
|
|
18848
|
+
}
|
|
18849
|
+
debounced.cancel = cancel;
|
|
18850
|
+
debounced.flush = flush;
|
|
18851
|
+
return debounced;
|
|
18731
18852
|
}
|
|
18732
|
-
|
|
18733
|
-
|
|
18734
|
-
return debounced;
|
|
18853
|
+
debounce_1 = debounce2;
|
|
18854
|
+
return debounce_1;
|
|
18735
18855
|
}
|
|
18736
|
-
var
|
|
18737
|
-
const debounce
|
|
18856
|
+
var debounceExports = requireDebounce();
|
|
18857
|
+
const debounce = /* @__PURE__ */ getDefaultExportFromCjs(debounceExports);
|
|
18738
18858
|
const TextStyle$2 = Mark2.create({
|
|
18739
18859
|
name: "textStyle",
|
|
18740
18860
|
addOptions() {
|
|
@@ -19669,42 +19789,41 @@ class GapCursor extends Selection {
|
|
|
19669
19789
|
@internal
|
|
19670
19790
|
*/
|
|
19671
19791
|
static findGapCursorFrom($pos, dir, mustMove = false) {
|
|
19672
|
-
search:
|
|
19673
|
-
|
|
19674
|
-
|
|
19675
|
-
|
|
19676
|
-
|
|
19677
|
-
|
|
19678
|
-
|
|
19679
|
-
|
|
19680
|
-
|
|
19681
|
-
|
|
19682
|
-
|
|
19683
|
-
return null;
|
|
19684
|
-
}
|
|
19685
|
-
pos += dir;
|
|
19686
|
-
let $cur = $pos.doc.resolve(pos);
|
|
19687
|
-
if (GapCursor.valid($cur))
|
|
19688
|
-
return $cur;
|
|
19792
|
+
search: for (; ; ) {
|
|
19793
|
+
if (!mustMove && GapCursor.valid($pos))
|
|
19794
|
+
return $pos;
|
|
19795
|
+
let pos = $pos.pos, next = null;
|
|
19796
|
+
for (let d = $pos.depth; ; d--) {
|
|
19797
|
+
let parent = $pos.node(d);
|
|
19798
|
+
if (dir > 0 ? $pos.indexAfter(d) < parent.childCount : $pos.index(d) > 0) {
|
|
19799
|
+
next = parent.child(dir > 0 ? $pos.indexAfter(d) : $pos.index(d) - 1);
|
|
19800
|
+
break;
|
|
19801
|
+
} else if (d == 0) {
|
|
19802
|
+
return null;
|
|
19689
19803
|
}
|
|
19690
|
-
|
|
19691
|
-
|
|
19692
|
-
|
|
19693
|
-
|
|
19694
|
-
|
|
19695
|
-
|
|
19696
|
-
|
|
19697
|
-
|
|
19698
|
-
|
|
19804
|
+
pos += dir;
|
|
19805
|
+
let $cur = $pos.doc.resolve(pos);
|
|
19806
|
+
if (GapCursor.valid($cur))
|
|
19807
|
+
return $cur;
|
|
19808
|
+
}
|
|
19809
|
+
for (; ; ) {
|
|
19810
|
+
let inside = dir > 0 ? next.firstChild : next.lastChild;
|
|
19811
|
+
if (!inside) {
|
|
19812
|
+
if (next.isAtom && !next.isText && !NodeSelection.isSelectable(next)) {
|
|
19813
|
+
$pos = $pos.doc.resolve(pos + next.nodeSize * dir);
|
|
19814
|
+
mustMove = false;
|
|
19815
|
+
continue search;
|
|
19699
19816
|
}
|
|
19700
|
-
|
|
19701
|
-
pos += dir;
|
|
19702
|
-
let $cur = $pos.doc.resolve(pos);
|
|
19703
|
-
if (GapCursor.valid($cur))
|
|
19704
|
-
return $cur;
|
|
19817
|
+
break;
|
|
19705
19818
|
}
|
|
19706
|
-
|
|
19819
|
+
next = inside;
|
|
19820
|
+
pos += dir;
|
|
19821
|
+
let $cur = $pos.doc.resolve(pos);
|
|
19822
|
+
if (GapCursor.valid($cur))
|
|
19823
|
+
return $cur;
|
|
19707
19824
|
}
|
|
19825
|
+
return null;
|
|
19826
|
+
}
|
|
19708
19827
|
}
|
|
19709
19828
|
}
|
|
19710
19829
|
GapCursor.prototype.visible = false;
|
|
@@ -19987,10 +20106,8 @@ RopeSequence.prototype.appendInner = function appendInner(other) {
|
|
|
19987
20106
|
return new Append(this, other);
|
|
19988
20107
|
};
|
|
19989
20108
|
RopeSequence.prototype.slice = function slice(from2, to) {
|
|
19990
|
-
if (from2 === void 0)
|
|
19991
|
-
|
|
19992
|
-
if (to === void 0)
|
|
19993
|
-
to = this.length;
|
|
20109
|
+
if (from2 === void 0) from2 = 0;
|
|
20110
|
+
if (to === void 0) to = this.length;
|
|
19994
20111
|
if (from2 >= to) {
|
|
19995
20112
|
return RopeSequence.empty;
|
|
19996
20113
|
}
|
|
@@ -20003,10 +20120,8 @@ RopeSequence.prototype.get = function get(i) {
|
|
|
20003
20120
|
return this.getInner(i);
|
|
20004
20121
|
};
|
|
20005
20122
|
RopeSequence.prototype.forEach = function forEach2(f, from2, to) {
|
|
20006
|
-
if (from2 === void 0)
|
|
20007
|
-
|
|
20008
|
-
if (to === void 0)
|
|
20009
|
-
to = this.length;
|
|
20123
|
+
if (from2 === void 0) from2 = 0;
|
|
20124
|
+
if (to === void 0) to = this.length;
|
|
20010
20125
|
if (from2 <= to) {
|
|
20011
20126
|
this.forEachInner(f, from2, to, 0);
|
|
20012
20127
|
} else {
|
|
@@ -20014,10 +20129,8 @@ RopeSequence.prototype.forEach = function forEach2(f, from2, to) {
|
|
|
20014
20129
|
}
|
|
20015
20130
|
};
|
|
20016
20131
|
RopeSequence.prototype.map = function map(f, from2, to) {
|
|
20017
|
-
if (from2 === void 0)
|
|
20018
|
-
|
|
20019
|
-
if (to === void 0)
|
|
20020
|
-
to = this.length;
|
|
20132
|
+
if (from2 === void 0) from2 = 0;
|
|
20133
|
+
if (to === void 0) to = this.length;
|
|
20021
20134
|
var result = [];
|
|
20022
20135
|
this.forEach(function(elt, i) {
|
|
20023
20136
|
return result.push(f(elt, i));
|
|
@@ -20035,8 +20148,7 @@ var Leaf = /* @__PURE__ */ function(RopeSequence3) {
|
|
|
20035
20148
|
RopeSequence3.call(this);
|
|
20036
20149
|
this.values = values;
|
|
20037
20150
|
}
|
|
20038
|
-
if (RopeSequence3)
|
|
20039
|
-
Leaf2.__proto__ = RopeSequence3;
|
|
20151
|
+
if (RopeSequence3) Leaf2.__proto__ = RopeSequence3;
|
|
20040
20152
|
Leaf2.prototype = Object.create(RopeSequence3 && RopeSequence3.prototype);
|
|
20041
20153
|
Leaf2.prototype.constructor = Leaf2;
|
|
20042
20154
|
var prototypeAccessors = { length: { configurable: true }, depth: { configurable: true } };
|
|
@@ -20094,8 +20206,7 @@ var Append = /* @__PURE__ */ function(RopeSequence3) {
|
|
|
20094
20206
|
this.length = left2.length + right2.length;
|
|
20095
20207
|
this.depth = Math.max(left2.depth, right2.depth) + 1;
|
|
20096
20208
|
}
|
|
20097
|
-
if (RopeSequence3)
|
|
20098
|
-
Append2.__proto__ = RopeSequence3;
|
|
20209
|
+
if (RopeSequence3) Append2.__proto__ = RopeSequence3;
|
|
20099
20210
|
Append2.prototype = Object.create(RopeSequence3 && RopeSequence3.prototype);
|
|
20100
20211
|
Append2.prototype.constructor = Append2;
|
|
20101
20212
|
Append2.prototype.flatten = function flatten() {
|
|
@@ -23401,9 +23512,6 @@ function createColGroup(node, cellMinWidth, overrideCol, overrideValue) {
|
|
|
23401
23512
|
return { colgroup, tableWidth, tableMinWidth };
|
|
23402
23513
|
}
|
|
23403
23514
|
function createCell(cellType, cellContent) {
|
|
23404
|
-
if (cellContent) {
|
|
23405
|
-
return cellType.createChecked(null, cellContent);
|
|
23406
|
-
}
|
|
23407
23515
|
return cellType.createAndFill();
|
|
23408
23516
|
}
|
|
23409
23517
|
function getTableNodeTypes(schema) {
|
|
@@ -23425,12 +23533,12 @@ function createTable(schema, rowsCount, colsCount, withHeaderRow, cellContent) {
|
|
|
23425
23533
|
const headerCells = [];
|
|
23426
23534
|
const cells = [];
|
|
23427
23535
|
for (let index = 0; index < colsCount; index += 1) {
|
|
23428
|
-
const cell = createCell(types.cell
|
|
23536
|
+
const cell = createCell(types.cell);
|
|
23429
23537
|
if (cell) {
|
|
23430
23538
|
cells.push(cell);
|
|
23431
23539
|
}
|
|
23432
23540
|
if (withHeaderRow) {
|
|
23433
|
-
const headerCell = createCell(types.header_cell
|
|
23541
|
+
const headerCell = createCell(types.header_cell);
|
|
23434
23542
|
if (headerCell) {
|
|
23435
23543
|
headerCells.push(headerCell);
|
|
23436
23544
|
}
|
|
@@ -23824,8 +23932,7 @@ const FontSize$1 = Extension.create({
|
|
|
23824
23932
|
fontSize: {
|
|
23825
23933
|
default: null,
|
|
23826
23934
|
renderHTML: (attributes) => {
|
|
23827
|
-
if (!attributes.fontSize)
|
|
23828
|
-
return {};
|
|
23935
|
+
if (!attributes.fontSize) return {};
|
|
23829
23936
|
return {
|
|
23830
23937
|
style: `font-size: ${attributes.fontSize};`
|
|
23831
23938
|
};
|
|
@@ -23921,8 +24028,7 @@ const Image = Image$1.configure({ inline: true }).extend({
|
|
|
23921
24028
|
width: {
|
|
23922
24029
|
default: null,
|
|
23923
24030
|
renderHTML: ({ width }) => {
|
|
23924
|
-
if (!width)
|
|
23925
|
-
return {};
|
|
24031
|
+
if (!width) return {};
|
|
23926
24032
|
return { style: `width: ${width};` };
|
|
23927
24033
|
},
|
|
23928
24034
|
parseHTML: (element) => element.style.width.replace(/['"]+/g, "")
|
|
@@ -24267,8 +24373,8 @@ var tk = /* @__PURE__ */ Object.freeze({
|
|
|
24267
24373
|
SYM
|
|
24268
24374
|
});
|
|
24269
24375
|
const ASCII_LETTER = /[a-z]/;
|
|
24270
|
-
const LETTER =
|
|
24271
|
-
const EMOJI =
|
|
24376
|
+
const LETTER = new RegExp("\\p{L}", "u");
|
|
24377
|
+
const EMOJI = new RegExp("\\p{Emoji}", "u");
|
|
24272
24378
|
const DIGIT = /\d/;
|
|
24273
24379
|
const SPACE = /\s/;
|
|
24274
24380
|
const NL = "\n";
|
|
@@ -25414,7 +25520,6 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
|
25414
25520
|
};
|
|
25415
25521
|
}
|
|
25416
25522
|
});
|
|
25417
|
-
const IconButton_vue_vue_type_style_index_0_scoped_5f000959_lang = "";
|
|
25418
25523
|
const _export_sfc = (sfc, props) => {
|
|
25419
25524
|
const target = sfc.__vccOpts || sfc;
|
|
25420
25525
|
for (const [key, val] of props) {
|
|
@@ -25429,12 +25534,12 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
25429
25534
|
editor: {}
|
|
25430
25535
|
},
|
|
25431
25536
|
setup(__props) {
|
|
25432
|
-
const props = __props;
|
|
25433
25537
|
const sizes = [
|
|
25434
25538
|
{ width: "25%", label: "Small", icon: "mdi-size-s" },
|
|
25435
25539
|
{ width: "50%", label: "Medium", icon: "mdi-size-m" },
|
|
25436
25540
|
{ width: "100%", label: "Large", icon: "mdi-size-xl" }
|
|
25437
25541
|
];
|
|
25542
|
+
const props = __props;
|
|
25438
25543
|
function setWidth(value) {
|
|
25439
25544
|
const current = props.editor.getAttributes("image").width;
|
|
25440
25545
|
const width = current !== value ? value : void 0;
|
|
@@ -25478,7 +25583,6 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
25478
25583
|
};
|
|
25479
25584
|
}
|
|
25480
25585
|
});
|
|
25481
|
-
const ImageMenu_vue_vue_type_style_index_0_scoped_cb530515_lang = "";
|
|
25482
25586
|
const ImageMenu = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-cb530515"]]);
|
|
25483
25587
|
const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
25484
25588
|
__name: "TableMenu",
|
|
@@ -25579,7 +25683,6 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
|
25579
25683
|
};
|
|
25580
25684
|
}
|
|
25581
25685
|
});
|
|
25582
|
-
const TableMenu_vue_vue_type_style_index_0_scoped_e73020ec_lang = "";
|
|
25583
25686
|
const TableMenu = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-e73020ec"]]);
|
|
25584
25687
|
const _hoisted_1$3 = { class: "tce-container" };
|
|
25585
25688
|
const SAVE_DEBOUNCE = 3e3;
|
|
@@ -25591,34 +25694,41 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
|
25591
25694
|
isDisabled: { type: Boolean }
|
|
25592
25695
|
},
|
|
25593
25696
|
emits: ["save"],
|
|
25594
|
-
setup(__props, { emit }) {
|
|
25697
|
+
setup(__props, { emit: __emit }) {
|
|
25595
25698
|
const props = __props;
|
|
25699
|
+
const emit = __emit;
|
|
25596
25700
|
const elementBus = vue.inject("$elementBus");
|
|
25597
25701
|
const editor = useEditor({
|
|
25598
25702
|
content: props.element.data.content,
|
|
25599
25703
|
extensions,
|
|
25600
25704
|
editable: !props.isDisabled && props.isFocused,
|
|
25601
|
-
onUpdate: debounce
|
|
25602
|
-
const content = editor2.isEmpty ? "" : editor2.getHTML();
|
|
25603
|
-
return emit("save", { content });
|
|
25604
|
-
}, SAVE_DEBOUNCE)
|
|
25705
|
+
onUpdate: debounce(() => save(), SAVE_DEBOUNCE)
|
|
25605
25706
|
});
|
|
25707
|
+
const save = () => {
|
|
25708
|
+
var _a, _b;
|
|
25709
|
+
const content = ((_a = editor.value) == null ? void 0 : _a.isEmpty) ? "" : (_b = editor.value) == null ? void 0 : _b.getHTML();
|
|
25710
|
+
return emit("save", { content });
|
|
25711
|
+
};
|
|
25606
25712
|
vue.watch(
|
|
25607
25713
|
() => props.isFocused,
|
|
25608
25714
|
() => {
|
|
25609
25715
|
var _a, _b;
|
|
25610
|
-
const
|
|
25611
|
-
(_a = editor.value) == null ? void 0 : _a.setOptions({ editable });
|
|
25612
|
-
if (
|
|
25716
|
+
const { isDisabled, isFocused } = props;
|
|
25717
|
+
(_a = editor.value) == null ? void 0 : _a.setOptions({ editable: !isDisabled && isFocused });
|
|
25718
|
+
if (!isFocused) return save();
|
|
25719
|
+
if (!isDisabled) {
|
|
25613
25720
|
(_b = editor.value) == null ? void 0 : _b.commands.focus();
|
|
25614
|
-
|
|
25721
|
+
vue.nextTick(() => elementBus.emit("initialize", editor.value));
|
|
25722
|
+
}
|
|
25615
25723
|
}
|
|
25616
25724
|
);
|
|
25617
25725
|
vue.watch(
|
|
25618
25726
|
() => props.element.data.content,
|
|
25619
25727
|
(value) => {
|
|
25620
25728
|
var _a;
|
|
25621
|
-
|
|
25729
|
+
if (!editor.value) return;
|
|
25730
|
+
const isSame = editor.value.getHTML() === value;
|
|
25731
|
+
return !isSame && ((_a = editor.value) == null ? void 0 : _a.commands.setContent(value, false));
|
|
25622
25732
|
}
|
|
25623
25733
|
);
|
|
25624
25734
|
return (_ctx, _cache) => {
|
|
@@ -25639,366 +25749,378 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
|
25639
25749
|
};
|
|
25640
25750
|
}
|
|
25641
25751
|
});
|
|
25642
|
-
const
|
|
25643
|
-
const Edit = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-c2fe9392"]]);
|
|
25752
|
+
const Edit = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-8f503238"]]);
|
|
25644
25753
|
var isURL$1 = { exports: {} };
|
|
25645
25754
|
var assertString = { exports: {} };
|
|
25646
|
-
|
|
25647
|
-
|
|
25648
|
-
|
|
25649
|
-
|
|
25650
|
-
exports2
|
|
25651
|
-
|
|
25652
|
-
|
|
25653
|
-
|
|
25654
|
-
|
|
25655
|
-
|
|
25656
|
-
|
|
25657
|
-
|
|
25658
|
-
|
|
25659
|
-
|
|
25660
|
-
|
|
25755
|
+
var hasRequiredAssertString;
|
|
25756
|
+
function requireAssertString() {
|
|
25757
|
+
if (hasRequiredAssertString) return assertString.exports;
|
|
25758
|
+
hasRequiredAssertString = 1;
|
|
25759
|
+
(function(module2, exports2) {
|
|
25760
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
25761
|
+
value: true
|
|
25762
|
+
});
|
|
25763
|
+
exports2.default = assertString2;
|
|
25764
|
+
function _typeof(obj) {
|
|
25765
|
+
"@babel/helpers - typeof";
|
|
25766
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
25767
|
+
_typeof = function _typeof2(obj2) {
|
|
25768
|
+
return typeof obj2;
|
|
25769
|
+
};
|
|
25770
|
+
} else {
|
|
25771
|
+
_typeof = function _typeof2(obj2) {
|
|
25772
|
+
return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
25773
|
+
};
|
|
25774
|
+
}
|
|
25775
|
+
return _typeof(obj);
|
|
25661
25776
|
}
|
|
25662
|
-
|
|
25663
|
-
|
|
25664
|
-
|
|
25665
|
-
|
|
25666
|
-
|
|
25667
|
-
|
|
25668
|
-
|
|
25669
|
-
|
|
25670
|
-
else if (invalidType === "object")
|
|
25671
|
-
invalidType = input.constructor.name;
|
|
25672
|
-
throw new TypeError("Expected a string but received a ".concat(invalidType));
|
|
25777
|
+
function assertString2(input) {
|
|
25778
|
+
var isString = typeof input === "string" || input instanceof String;
|
|
25779
|
+
if (!isString) {
|
|
25780
|
+
var invalidType = _typeof(input);
|
|
25781
|
+
if (input === null) invalidType = "null";
|
|
25782
|
+
else if (invalidType === "object") invalidType = input.constructor.name;
|
|
25783
|
+
throw new TypeError("Expected a string but received a ".concat(invalidType));
|
|
25784
|
+
}
|
|
25673
25785
|
}
|
|
25674
|
-
|
|
25675
|
-
|
|
25676
|
-
|
|
25677
|
-
|
|
25678
|
-
|
|
25786
|
+
module2.exports = exports2.default;
|
|
25787
|
+
module2.exports.default = exports2.default;
|
|
25788
|
+
})(assertString, assertString.exports);
|
|
25789
|
+
return assertString.exports;
|
|
25790
|
+
}
|
|
25679
25791
|
var isFQDN = { exports: {} };
|
|
25680
25792
|
var merge = { exports: {} };
|
|
25681
|
-
|
|
25682
|
-
|
|
25683
|
-
|
|
25684
|
-
|
|
25685
|
-
exports2
|
|
25686
|
-
|
|
25687
|
-
|
|
25688
|
-
|
|
25689
|
-
|
|
25690
|
-
|
|
25691
|
-
|
|
25793
|
+
var hasRequiredMerge;
|
|
25794
|
+
function requireMerge() {
|
|
25795
|
+
if (hasRequiredMerge) return merge.exports;
|
|
25796
|
+
hasRequiredMerge = 1;
|
|
25797
|
+
(function(module2, exports2) {
|
|
25798
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
25799
|
+
value: true
|
|
25800
|
+
});
|
|
25801
|
+
exports2.default = merge2;
|
|
25802
|
+
function merge2() {
|
|
25803
|
+
var obj = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
25804
|
+
var defaults2 = arguments.length > 1 ? arguments[1] : void 0;
|
|
25805
|
+
for (var key in defaults2) {
|
|
25806
|
+
if (typeof obj[key] === "undefined") {
|
|
25807
|
+
obj[key] = defaults2[key];
|
|
25808
|
+
}
|
|
25692
25809
|
}
|
|
25810
|
+
return obj;
|
|
25693
25811
|
}
|
|
25694
|
-
|
|
25695
|
-
|
|
25696
|
-
|
|
25697
|
-
|
|
25698
|
-
}
|
|
25699
|
-
var
|
|
25700
|
-
|
|
25701
|
-
|
|
25702
|
-
|
|
25703
|
-
|
|
25704
|
-
|
|
25705
|
-
|
|
25706
|
-
|
|
25707
|
-
|
|
25708
|
-
|
|
25709
|
-
|
|
25710
|
-
|
|
25711
|
-
|
|
25712
|
-
|
|
25713
|
-
|
|
25714
|
-
|
|
25715
|
-
|
|
25716
|
-
|
|
25717
|
-
|
|
25718
|
-
|
|
25719
|
-
|
|
25720
|
-
|
|
25721
|
-
|
|
25722
|
-
|
|
25723
|
-
|
|
25724
|
-
|
|
25725
|
-
|
|
25726
|
-
|
|
25727
|
-
|
|
25728
|
-
|
|
25729
|
-
|
|
25730
|
-
|
|
25731
|
-
|
|
25812
|
+
module2.exports = exports2.default;
|
|
25813
|
+
module2.exports.default = exports2.default;
|
|
25814
|
+
})(merge, merge.exports);
|
|
25815
|
+
return merge.exports;
|
|
25816
|
+
}
|
|
25817
|
+
var hasRequiredIsFQDN;
|
|
25818
|
+
function requireIsFQDN() {
|
|
25819
|
+
if (hasRequiredIsFQDN) return isFQDN.exports;
|
|
25820
|
+
hasRequiredIsFQDN = 1;
|
|
25821
|
+
(function(module2, exports2) {
|
|
25822
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
25823
|
+
value: true
|
|
25824
|
+
});
|
|
25825
|
+
exports2.default = isFQDN2;
|
|
25826
|
+
var _assertString = _interopRequireDefault(/* @__PURE__ */ requireAssertString());
|
|
25827
|
+
var _merge = _interopRequireDefault(/* @__PURE__ */ requireMerge());
|
|
25828
|
+
function _interopRequireDefault(obj) {
|
|
25829
|
+
return obj && obj.__esModule ? obj : { default: obj };
|
|
25830
|
+
}
|
|
25831
|
+
var default_fqdn_options = {
|
|
25832
|
+
require_tld: true,
|
|
25833
|
+
allow_underscores: false,
|
|
25834
|
+
allow_trailing_dot: false,
|
|
25835
|
+
allow_numeric_tld: false,
|
|
25836
|
+
allow_wildcard: false,
|
|
25837
|
+
ignore_max_length: false
|
|
25838
|
+
};
|
|
25839
|
+
function isFQDN2(str, options) {
|
|
25840
|
+
(0, _assertString.default)(str);
|
|
25841
|
+
options = (0, _merge.default)(options, default_fqdn_options);
|
|
25842
|
+
if (options.allow_trailing_dot && str[str.length - 1] === ".") {
|
|
25843
|
+
str = str.substring(0, str.length - 1);
|
|
25844
|
+
}
|
|
25845
|
+
if (options.allow_wildcard === true && str.indexOf("*.") === 0) {
|
|
25846
|
+
str = str.substring(2);
|
|
25847
|
+
}
|
|
25848
|
+
var parts = str.split(".");
|
|
25849
|
+
var tld = parts[parts.length - 1];
|
|
25850
|
+
if (options.require_tld) {
|
|
25851
|
+
if (parts.length < 2) {
|
|
25852
|
+
return false;
|
|
25853
|
+
}
|
|
25854
|
+
if (!options.allow_numeric_tld && !/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {
|
|
25855
|
+
return false;
|
|
25856
|
+
}
|
|
25857
|
+
if (/\s/.test(tld)) {
|
|
25858
|
+
return false;
|
|
25859
|
+
}
|
|
25732
25860
|
}
|
|
25733
|
-
if (!options.allow_numeric_tld &&
|
|
25861
|
+
if (!options.allow_numeric_tld && /^\d+$/.test(tld)) {
|
|
25734
25862
|
return false;
|
|
25735
25863
|
}
|
|
25736
|
-
|
|
25737
|
-
|
|
25864
|
+
return parts.every(function(part) {
|
|
25865
|
+
if (part.length > 63 && !options.ignore_max_length) {
|
|
25866
|
+
return false;
|
|
25867
|
+
}
|
|
25868
|
+
if (!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(part)) {
|
|
25869
|
+
return false;
|
|
25870
|
+
}
|
|
25871
|
+
if (/[\uff01-\uff5e]/.test(part)) {
|
|
25872
|
+
return false;
|
|
25873
|
+
}
|
|
25874
|
+
if (/^-|-$/.test(part)) {
|
|
25875
|
+
return false;
|
|
25876
|
+
}
|
|
25877
|
+
if (!options.allow_underscores && /_/.test(part)) {
|
|
25878
|
+
return false;
|
|
25879
|
+
}
|
|
25880
|
+
return true;
|
|
25881
|
+
});
|
|
25882
|
+
}
|
|
25883
|
+
module2.exports = exports2.default;
|
|
25884
|
+
module2.exports.default = exports2.default;
|
|
25885
|
+
})(isFQDN, isFQDN.exports);
|
|
25886
|
+
return isFQDN.exports;
|
|
25887
|
+
}
|
|
25888
|
+
var isIP = { exports: {} };
|
|
25889
|
+
var hasRequiredIsIP;
|
|
25890
|
+
function requireIsIP() {
|
|
25891
|
+
if (hasRequiredIsIP) return isIP.exports;
|
|
25892
|
+
hasRequiredIsIP = 1;
|
|
25893
|
+
(function(module2, exports2) {
|
|
25894
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
25895
|
+
value: true
|
|
25896
|
+
});
|
|
25897
|
+
exports2.default = isIP2;
|
|
25898
|
+
var _assertString = _interopRequireDefault(/* @__PURE__ */ requireAssertString());
|
|
25899
|
+
function _interopRequireDefault(obj) {
|
|
25900
|
+
return obj && obj.__esModule ? obj : { default: obj };
|
|
25901
|
+
}
|
|
25902
|
+
var IPv4SegmentFormat = "(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])";
|
|
25903
|
+
var IPv4AddressFormat = "(".concat(IPv4SegmentFormat, "[.]){3}").concat(IPv4SegmentFormat);
|
|
25904
|
+
var IPv4AddressRegExp = new RegExp("^".concat(IPv4AddressFormat, "$"));
|
|
25905
|
+
var IPv6SegmentFormat = "(?:[0-9a-fA-F]{1,4})";
|
|
25906
|
+
var IPv6AddressRegExp = new RegExp("^(" + "(?:".concat(IPv6SegmentFormat, ":){7}(?:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){6}(?:").concat(IPv4AddressFormat, "|:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){5}(?::").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,2}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){4}(?:(:").concat(IPv6SegmentFormat, "){0,1}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,3}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){3}(?:(:").concat(IPv6SegmentFormat, "){0,2}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,4}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){2}(?:(:").concat(IPv6SegmentFormat, "){0,3}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,5}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){1}(?:(:").concat(IPv6SegmentFormat, "){0,4}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,6}|:)|") + "(?::((?::".concat(IPv6SegmentFormat, "){0,5}:").concat(IPv4AddressFormat, "|(?::").concat(IPv6SegmentFormat, "){1,7}|:))") + ")(%[0-9a-zA-Z-.:]{1,})?$");
|
|
25907
|
+
function isIP2(str) {
|
|
25908
|
+
var version2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
25909
|
+
(0, _assertString.default)(str);
|
|
25910
|
+
version2 = String(version2);
|
|
25911
|
+
if (!version2) {
|
|
25912
|
+
return isIP2(str, 4) || isIP2(str, 6);
|
|
25913
|
+
}
|
|
25914
|
+
if (version2 === "4") {
|
|
25915
|
+
return IPv4AddressRegExp.test(str);
|
|
25916
|
+
}
|
|
25917
|
+
if (version2 === "6") {
|
|
25918
|
+
return IPv6AddressRegExp.test(str);
|
|
25738
25919
|
}
|
|
25920
|
+
return false;
|
|
25739
25921
|
}
|
|
25740
|
-
|
|
25922
|
+
module2.exports = exports2.default;
|
|
25923
|
+
module2.exports.default = exports2.default;
|
|
25924
|
+
})(isIP, isIP.exports);
|
|
25925
|
+
return isIP.exports;
|
|
25926
|
+
}
|
|
25927
|
+
var hasRequiredIsURL;
|
|
25928
|
+
function requireIsURL() {
|
|
25929
|
+
if (hasRequiredIsURL) return isURL$1.exports;
|
|
25930
|
+
hasRequiredIsURL = 1;
|
|
25931
|
+
(function(module2, exports2) {
|
|
25932
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
25933
|
+
value: true
|
|
25934
|
+
});
|
|
25935
|
+
exports2.default = isURL2;
|
|
25936
|
+
var _assertString = _interopRequireDefault(/* @__PURE__ */ requireAssertString());
|
|
25937
|
+
var _isFQDN = _interopRequireDefault(/* @__PURE__ */ requireIsFQDN());
|
|
25938
|
+
var _isIP = _interopRequireDefault(/* @__PURE__ */ requireIsIP());
|
|
25939
|
+
var _merge = _interopRequireDefault(/* @__PURE__ */ requireMerge());
|
|
25940
|
+
function _interopRequireDefault(obj) {
|
|
25941
|
+
return obj && obj.__esModule ? obj : { default: obj };
|
|
25942
|
+
}
|
|
25943
|
+
function _slicedToArray(arr, i) {
|
|
25944
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
25945
|
+
}
|
|
25946
|
+
function _nonIterableRest() {
|
|
25947
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
25948
|
+
}
|
|
25949
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
25950
|
+
if (!o) return;
|
|
25951
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
25952
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
25953
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
25954
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
25955
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
25956
|
+
}
|
|
25957
|
+
function _arrayLikeToArray(arr, len) {
|
|
25958
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
25959
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
25960
|
+
arr2[i] = arr[i];
|
|
25961
|
+
}
|
|
25962
|
+
return arr2;
|
|
25963
|
+
}
|
|
25964
|
+
function _iterableToArrayLimit(arr, i) {
|
|
25965
|
+
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
|
25966
|
+
var _arr = [];
|
|
25967
|
+
var _n = true;
|
|
25968
|
+
var _d = false;
|
|
25969
|
+
var _e = void 0;
|
|
25970
|
+
try {
|
|
25971
|
+
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
25972
|
+
_arr.push(_s.value);
|
|
25973
|
+
if (i && _arr.length === i) break;
|
|
25974
|
+
}
|
|
25975
|
+
} catch (err) {
|
|
25976
|
+
_d = true;
|
|
25977
|
+
_e = err;
|
|
25978
|
+
} finally {
|
|
25979
|
+
try {
|
|
25980
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
25981
|
+
} finally {
|
|
25982
|
+
if (_d) throw _e;
|
|
25983
|
+
}
|
|
25984
|
+
}
|
|
25985
|
+
return _arr;
|
|
25986
|
+
}
|
|
25987
|
+
function _arrayWithHoles(arr) {
|
|
25988
|
+
if (Array.isArray(arr)) return arr;
|
|
25989
|
+
}
|
|
25990
|
+
var default_url_options = {
|
|
25991
|
+
protocols: ["http", "https", "ftp"],
|
|
25992
|
+
require_tld: true,
|
|
25993
|
+
require_protocol: false,
|
|
25994
|
+
require_host: true,
|
|
25995
|
+
require_port: false,
|
|
25996
|
+
require_valid_protocol: true,
|
|
25997
|
+
allow_underscores: false,
|
|
25998
|
+
allow_trailing_dot: false,
|
|
25999
|
+
allow_protocol_relative_urls: false,
|
|
26000
|
+
allow_fragments: true,
|
|
26001
|
+
allow_query_components: true,
|
|
26002
|
+
validate_length: true
|
|
26003
|
+
};
|
|
26004
|
+
var wrapped_ipv6 = /^\[([^\]]+)\](?::([0-9]+))?$/;
|
|
26005
|
+
function isRegExp2(obj) {
|
|
26006
|
+
return Object.prototype.toString.call(obj) === "[object RegExp]";
|
|
26007
|
+
}
|
|
26008
|
+
function checkHost(host, matches2) {
|
|
26009
|
+
for (var i = 0; i < matches2.length; i++) {
|
|
26010
|
+
var match = matches2[i];
|
|
26011
|
+
if (host === match || isRegExp2(match) && match.test(host)) {
|
|
26012
|
+
return true;
|
|
26013
|
+
}
|
|
26014
|
+
}
|
|
25741
26015
|
return false;
|
|
25742
26016
|
}
|
|
25743
|
-
|
|
25744
|
-
|
|
26017
|
+
function isURL2(url, options) {
|
|
26018
|
+
(0, _assertString.default)(url);
|
|
26019
|
+
if (!url || /[\s<>]/.test(url)) {
|
|
25745
26020
|
return false;
|
|
25746
26021
|
}
|
|
25747
|
-
if (
|
|
26022
|
+
if (url.indexOf("mailto:") === 0) {
|
|
25748
26023
|
return false;
|
|
25749
26024
|
}
|
|
25750
|
-
|
|
26025
|
+
options = (0, _merge.default)(options, default_url_options);
|
|
26026
|
+
if (options.validate_length && url.length >= 2083) {
|
|
25751
26027
|
return false;
|
|
25752
26028
|
}
|
|
25753
|
-
if (
|
|
26029
|
+
if (!options.allow_fragments && url.includes("#")) {
|
|
25754
26030
|
return false;
|
|
25755
26031
|
}
|
|
25756
|
-
if (!options.
|
|
26032
|
+
if (!options.allow_query_components && (url.includes("?") || url.includes("&"))) {
|
|
25757
26033
|
return false;
|
|
25758
26034
|
}
|
|
25759
|
-
|
|
25760
|
-
|
|
25761
|
-
|
|
25762
|
-
|
|
25763
|
-
|
|
25764
|
-
|
|
25765
|
-
|
|
25766
|
-
|
|
25767
|
-
(
|
|
25768
|
-
|
|
25769
|
-
|
|
25770
|
-
|
|
25771
|
-
|
|
25772
|
-
|
|
25773
|
-
|
|
25774
|
-
|
|
25775
|
-
|
|
25776
|
-
|
|
25777
|
-
var IPv4AddressFormat = "(".concat(IPv4SegmentFormat, "[.]){3}").concat(IPv4SegmentFormat);
|
|
25778
|
-
var IPv4AddressRegExp = new RegExp("^".concat(IPv4AddressFormat, "$"));
|
|
25779
|
-
var IPv6SegmentFormat = "(?:[0-9a-fA-F]{1,4})";
|
|
25780
|
-
var IPv6AddressRegExp = new RegExp("^(" + "(?:".concat(IPv6SegmentFormat, ":){7}(?:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){6}(?:").concat(IPv4AddressFormat, "|:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){5}(?::").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,2}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){4}(?:(:").concat(IPv6SegmentFormat, "){0,1}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,3}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){3}(?:(:").concat(IPv6SegmentFormat, "){0,2}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,4}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){2}(?:(:").concat(IPv6SegmentFormat, "){0,3}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,5}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){1}(?:(:").concat(IPv6SegmentFormat, "){0,4}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,6}|:)|") + "(?::((?::".concat(IPv6SegmentFormat, "){0,5}:").concat(IPv4AddressFormat, "|(?::").concat(IPv6SegmentFormat, "){1,7}|:))") + ")(%[0-9a-zA-Z-.:]{1,})?$");
|
|
25781
|
-
function isIP2(str) {
|
|
25782
|
-
var version2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
25783
|
-
(0, _assertString.default)(str);
|
|
25784
|
-
version2 = String(version2);
|
|
25785
|
-
if (!version2) {
|
|
25786
|
-
return isIP2(str, 4) || isIP2(str, 6);
|
|
25787
|
-
}
|
|
25788
|
-
if (version2 === "4") {
|
|
25789
|
-
return IPv4AddressRegExp.test(str);
|
|
25790
|
-
}
|
|
25791
|
-
if (version2 === "6") {
|
|
25792
|
-
return IPv6AddressRegExp.test(str);
|
|
25793
|
-
}
|
|
25794
|
-
return false;
|
|
25795
|
-
}
|
|
25796
|
-
module2.exports = exports2.default;
|
|
25797
|
-
module2.exports.default = exports2.default;
|
|
25798
|
-
})(isIP, isIP.exports);
|
|
25799
|
-
var isIPExports = isIP.exports;
|
|
25800
|
-
(function(module2, exports2) {
|
|
25801
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
25802
|
-
value: true
|
|
25803
|
-
});
|
|
25804
|
-
exports2.default = isURL2;
|
|
25805
|
-
var _assertString = _interopRequireDefault(assertStringExports);
|
|
25806
|
-
var _isFQDN = _interopRequireDefault(isFQDNExports);
|
|
25807
|
-
var _isIP = _interopRequireDefault(isIPExports);
|
|
25808
|
-
var _merge = _interopRequireDefault(mergeExports);
|
|
25809
|
-
function _interopRequireDefault(obj) {
|
|
25810
|
-
return obj && obj.__esModule ? obj : { default: obj };
|
|
25811
|
-
}
|
|
25812
|
-
function _slicedToArray(arr, i) {
|
|
25813
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
25814
|
-
}
|
|
25815
|
-
function _nonIterableRest() {
|
|
25816
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
25817
|
-
}
|
|
25818
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
25819
|
-
if (!o)
|
|
25820
|
-
return;
|
|
25821
|
-
if (typeof o === "string")
|
|
25822
|
-
return _arrayLikeToArray(o, minLen);
|
|
25823
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
25824
|
-
if (n === "Object" && o.constructor)
|
|
25825
|
-
n = o.constructor.name;
|
|
25826
|
-
if (n === "Map" || n === "Set")
|
|
25827
|
-
return Array.from(o);
|
|
25828
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
25829
|
-
return _arrayLikeToArray(o, minLen);
|
|
25830
|
-
}
|
|
25831
|
-
function _arrayLikeToArray(arr, len) {
|
|
25832
|
-
if (len == null || len > arr.length)
|
|
25833
|
-
len = arr.length;
|
|
25834
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
25835
|
-
arr2[i] = arr[i];
|
|
25836
|
-
}
|
|
25837
|
-
return arr2;
|
|
25838
|
-
}
|
|
25839
|
-
function _iterableToArrayLimit(arr, i) {
|
|
25840
|
-
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr)))
|
|
25841
|
-
return;
|
|
25842
|
-
var _arr = [];
|
|
25843
|
-
var _n = true;
|
|
25844
|
-
var _d = false;
|
|
25845
|
-
var _e = void 0;
|
|
25846
|
-
try {
|
|
25847
|
-
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
25848
|
-
_arr.push(_s.value);
|
|
25849
|
-
if (i && _arr.length === i)
|
|
25850
|
-
break;
|
|
26035
|
+
var protocol, auth, host, hostname, port, port_str, split2, ipv6;
|
|
26036
|
+
split2 = url.split("#");
|
|
26037
|
+
url = split2.shift();
|
|
26038
|
+
split2 = url.split("?");
|
|
26039
|
+
url = split2.shift();
|
|
26040
|
+
split2 = url.split("://");
|
|
26041
|
+
if (split2.length > 1) {
|
|
26042
|
+
protocol = split2.shift().toLowerCase();
|
|
26043
|
+
if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) {
|
|
26044
|
+
return false;
|
|
26045
|
+
}
|
|
26046
|
+
} else if (options.require_protocol) {
|
|
26047
|
+
return false;
|
|
26048
|
+
} else if (url.slice(0, 2) === "//") {
|
|
26049
|
+
if (!options.allow_protocol_relative_urls) {
|
|
26050
|
+
return false;
|
|
26051
|
+
}
|
|
26052
|
+
split2[0] = url.slice(2);
|
|
25851
26053
|
}
|
|
25852
|
-
|
|
25853
|
-
|
|
25854
|
-
|
|
25855
|
-
|
|
25856
|
-
|
|
25857
|
-
|
|
25858
|
-
|
|
25859
|
-
} finally {
|
|
25860
|
-
if (_d)
|
|
25861
|
-
throw _e;
|
|
25862
|
-
}
|
|
25863
|
-
}
|
|
25864
|
-
return _arr;
|
|
25865
|
-
}
|
|
25866
|
-
function _arrayWithHoles(arr) {
|
|
25867
|
-
if (Array.isArray(arr))
|
|
25868
|
-
return arr;
|
|
25869
|
-
}
|
|
25870
|
-
var default_url_options = {
|
|
25871
|
-
protocols: ["http", "https", "ftp"],
|
|
25872
|
-
require_tld: true,
|
|
25873
|
-
require_protocol: false,
|
|
25874
|
-
require_host: true,
|
|
25875
|
-
require_port: false,
|
|
25876
|
-
require_valid_protocol: true,
|
|
25877
|
-
allow_underscores: false,
|
|
25878
|
-
allow_trailing_dot: false,
|
|
25879
|
-
allow_protocol_relative_urls: false,
|
|
25880
|
-
allow_fragments: true,
|
|
25881
|
-
allow_query_components: true,
|
|
25882
|
-
validate_length: true
|
|
25883
|
-
};
|
|
25884
|
-
var wrapped_ipv6 = /^\[([^\]]+)\](?::([0-9]+))?$/;
|
|
25885
|
-
function isRegExp2(obj) {
|
|
25886
|
-
return Object.prototype.toString.call(obj) === "[object RegExp]";
|
|
25887
|
-
}
|
|
25888
|
-
function checkHost(host, matches2) {
|
|
25889
|
-
for (var i = 0; i < matches2.length; i++) {
|
|
25890
|
-
var match = matches2[i];
|
|
25891
|
-
if (host === match || isRegExp2(match) && match.test(host)) {
|
|
26054
|
+
url = split2.join("://");
|
|
26055
|
+
if (url === "") {
|
|
26056
|
+
return false;
|
|
26057
|
+
}
|
|
26058
|
+
split2 = url.split("/");
|
|
26059
|
+
url = split2.shift();
|
|
26060
|
+
if (url === "" && !options.require_host) {
|
|
25892
26061
|
return true;
|
|
25893
26062
|
}
|
|
25894
|
-
|
|
25895
|
-
|
|
25896
|
-
|
|
25897
|
-
|
|
25898
|
-
|
|
25899
|
-
|
|
25900
|
-
|
|
25901
|
-
|
|
25902
|
-
|
|
25903
|
-
|
|
25904
|
-
|
|
25905
|
-
|
|
25906
|
-
|
|
25907
|
-
|
|
25908
|
-
|
|
25909
|
-
|
|
25910
|
-
return false;
|
|
25911
|
-
}
|
|
25912
|
-
if (!options.allow_query_components && (url.includes("?") || url.includes("&"))) {
|
|
25913
|
-
return false;
|
|
25914
|
-
}
|
|
25915
|
-
var protocol, auth, host, hostname, port, port_str, split2, ipv6;
|
|
25916
|
-
split2 = url.split("#");
|
|
25917
|
-
url = split2.shift();
|
|
25918
|
-
split2 = url.split("?");
|
|
25919
|
-
url = split2.shift();
|
|
25920
|
-
split2 = url.split("://");
|
|
25921
|
-
if (split2.length > 1) {
|
|
25922
|
-
protocol = split2.shift().toLowerCase();
|
|
25923
|
-
if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) {
|
|
25924
|
-
return false;
|
|
26063
|
+
split2 = url.split("@");
|
|
26064
|
+
if (split2.length > 1) {
|
|
26065
|
+
if (options.disallow_auth) {
|
|
26066
|
+
return false;
|
|
26067
|
+
}
|
|
26068
|
+
if (split2[0] === "") {
|
|
26069
|
+
return false;
|
|
26070
|
+
}
|
|
26071
|
+
auth = split2.shift();
|
|
26072
|
+
if (auth.indexOf(":") >= 0 && auth.split(":").length > 2) {
|
|
26073
|
+
return false;
|
|
26074
|
+
}
|
|
26075
|
+
var _auth$split = auth.split(":"), _auth$split2 = _slicedToArray(_auth$split, 2), user = _auth$split2[0], password = _auth$split2[1];
|
|
26076
|
+
if (user === "" && password === "") {
|
|
26077
|
+
return false;
|
|
26078
|
+
}
|
|
25925
26079
|
}
|
|
25926
|
-
|
|
25927
|
-
|
|
25928
|
-
|
|
25929
|
-
|
|
25930
|
-
|
|
26080
|
+
hostname = split2.join("@");
|
|
26081
|
+
port_str = null;
|
|
26082
|
+
ipv6 = null;
|
|
26083
|
+
var ipv6_match = hostname.match(wrapped_ipv6);
|
|
26084
|
+
if (ipv6_match) {
|
|
26085
|
+
host = "";
|
|
26086
|
+
ipv6 = ipv6_match[1];
|
|
26087
|
+
port_str = ipv6_match[2] || null;
|
|
26088
|
+
} else {
|
|
26089
|
+
split2 = hostname.split(":");
|
|
26090
|
+
host = split2.shift();
|
|
26091
|
+
if (split2.length) {
|
|
26092
|
+
port_str = split2.join(":");
|
|
26093
|
+
}
|
|
25931
26094
|
}
|
|
25932
|
-
|
|
25933
|
-
|
|
25934
|
-
|
|
25935
|
-
|
|
25936
|
-
|
|
25937
|
-
|
|
25938
|
-
split2 = url.split("/");
|
|
25939
|
-
url = split2.shift();
|
|
25940
|
-
if (url === "" && !options.require_host) {
|
|
25941
|
-
return true;
|
|
25942
|
-
}
|
|
25943
|
-
split2 = url.split("@");
|
|
25944
|
-
if (split2.length > 1) {
|
|
25945
|
-
if (options.disallow_auth) {
|
|
26095
|
+
if (port_str !== null && port_str.length > 0) {
|
|
26096
|
+
port = parseInt(port_str, 10);
|
|
26097
|
+
if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) {
|
|
26098
|
+
return false;
|
|
26099
|
+
}
|
|
26100
|
+
} else if (options.require_port) {
|
|
25946
26101
|
return false;
|
|
25947
26102
|
}
|
|
25948
|
-
if (
|
|
25949
|
-
return
|
|
26103
|
+
if (options.host_whitelist) {
|
|
26104
|
+
return checkHost(host, options.host_whitelist);
|
|
25950
26105
|
}
|
|
25951
|
-
|
|
25952
|
-
|
|
25953
|
-
return false;
|
|
26106
|
+
if (host === "" && !options.require_host) {
|
|
26107
|
+
return true;
|
|
25954
26108
|
}
|
|
25955
|
-
|
|
25956
|
-
if (user === "" && password === "") {
|
|
26109
|
+
if (!(0, _isIP.default)(host) && !(0, _isFQDN.default)(host, options) && (!ipv6 || !(0, _isIP.default)(ipv6, 6))) {
|
|
25957
26110
|
return false;
|
|
25958
26111
|
}
|
|
25959
|
-
|
|
25960
|
-
|
|
25961
|
-
port_str = null;
|
|
25962
|
-
ipv6 = null;
|
|
25963
|
-
var ipv6_match = hostname.match(wrapped_ipv6);
|
|
25964
|
-
if (ipv6_match) {
|
|
25965
|
-
host = "";
|
|
25966
|
-
ipv6 = ipv6_match[1];
|
|
25967
|
-
port_str = ipv6_match[2] || null;
|
|
25968
|
-
} else {
|
|
25969
|
-
split2 = hostname.split(":");
|
|
25970
|
-
host = split2.shift();
|
|
25971
|
-
if (split2.length) {
|
|
25972
|
-
port_str = split2.join(":");
|
|
25973
|
-
}
|
|
25974
|
-
}
|
|
25975
|
-
if (port_str !== null && port_str.length > 0) {
|
|
25976
|
-
port = parseInt(port_str, 10);
|
|
25977
|
-
if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) {
|
|
26112
|
+
host = host || ipv6;
|
|
26113
|
+
if (options.host_blacklist && checkHost(host, options.host_blacklist)) {
|
|
25978
26114
|
return false;
|
|
25979
26115
|
}
|
|
25980
|
-
} else if (options.require_port) {
|
|
25981
|
-
return false;
|
|
25982
|
-
}
|
|
25983
|
-
if (options.host_whitelist) {
|
|
25984
|
-
return checkHost(host, options.host_whitelist);
|
|
25985
|
-
}
|
|
25986
|
-
if (host === "" && !options.require_host) {
|
|
25987
26116
|
return true;
|
|
25988
26117
|
}
|
|
25989
|
-
|
|
25990
|
-
|
|
25991
|
-
|
|
25992
|
-
|
|
25993
|
-
|
|
25994
|
-
|
|
25995
|
-
}
|
|
25996
|
-
return true;
|
|
25997
|
-
}
|
|
25998
|
-
module2.exports = exports2.default;
|
|
25999
|
-
module2.exports.default = exports2.default;
|
|
26000
|
-
})(isURL$1, isURL$1.exports);
|
|
26001
|
-
var isURLExports = isURL$1.exports;
|
|
26118
|
+
module2.exports = exports2.default;
|
|
26119
|
+
module2.exports.default = exports2.default;
|
|
26120
|
+
})(isURL$1, isURL$1.exports);
|
|
26121
|
+
return isURL$1.exports;
|
|
26122
|
+
}
|
|
26123
|
+
var isURLExports = /* @__PURE__ */ requireIsURL();
|
|
26002
26124
|
const isURL = /* @__PURE__ */ getDefaultExportFromCjs(isURLExports);
|
|
26003
26125
|
const _hoisted_1$2 = { class: "actions d-flex justify-end" };
|
|
26004
26126
|
const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -26007,24 +26129,22 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
|
26007
26129
|
editor: {}
|
|
26008
26130
|
},
|
|
26009
26131
|
setup(__props) {
|
|
26010
|
-
const props = __props;
|
|
26011
26132
|
const rules = {
|
|
26012
26133
|
required: (val) => !!val || "The field is required",
|
|
26013
26134
|
url: (val) => {
|
|
26014
26135
|
const url2 = val.trim();
|
|
26015
|
-
if (!url2)
|
|
26016
|
-
return true;
|
|
26136
|
+
if (!url2) return true;
|
|
26017
26137
|
return isURL(url2) || "Please enter valid URL";
|
|
26018
26138
|
}
|
|
26019
26139
|
};
|
|
26140
|
+
const props = __props;
|
|
26020
26141
|
const form = vue.ref();
|
|
26021
26142
|
const url = vue.ref("");
|
|
26022
26143
|
const title = vue.ref("");
|
|
26023
26144
|
const show = vue.ref(false);
|
|
26024
26145
|
async function setImage() {
|
|
26025
26146
|
const { valid } = await form.value.validate();
|
|
26026
|
-
if (!valid)
|
|
26027
|
-
return;
|
|
26147
|
+
if (!valid) return;
|
|
26028
26148
|
const href = url.value.startsWith("http") ? url.value : `https://${url.value}`;
|
|
26029
26149
|
props.editor.chain().focus().setImage({ src: href, alt: title.value, title: title.value }).run();
|
|
26030
26150
|
show.value = false;
|
|
@@ -26032,8 +26152,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
|
26032
26152
|
}
|
|
26033
26153
|
vue.watch(show, (val) => {
|
|
26034
26154
|
var _a;
|
|
26035
|
-
if (!val)
|
|
26036
|
-
return;
|
|
26155
|
+
if (!val) return;
|
|
26037
26156
|
url.value = "";
|
|
26038
26157
|
title.value = "";
|
|
26039
26158
|
(_a = form.value) == null ? void 0 : _a.resetValidation();
|
|
@@ -26063,9 +26182,9 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
|
26063
26182
|
}, vue.mergeProps(menu, tooltip)), {
|
|
26064
26183
|
default: vue.withCtx(() => [
|
|
26065
26184
|
vue.createVNode(_component_VIcon, { size: "24" }, {
|
|
26066
|
-
default: vue.withCtx(() => [
|
|
26185
|
+
default: vue.withCtx(() => _cache[3] || (_cache[3] = [
|
|
26067
26186
|
vue.createTextVNode("mdi-image-plus")
|
|
26068
|
-
]),
|
|
26187
|
+
])),
|
|
26069
26188
|
_: 1
|
|
26070
26189
|
})
|
|
26071
26190
|
]),
|
|
@@ -26073,7 +26192,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
|
26073
26192
|
}, 1040, ["active", "disabled"])
|
|
26074
26193
|
]),
|
|
26075
26194
|
default: vue.withCtx(() => [
|
|
26076
|
-
vue.createTextVNode(" Add image ")
|
|
26195
|
+
_cache[4] || (_cache[4] = vue.createTextVNode(" Add image "))
|
|
26077
26196
|
]),
|
|
26078
26197
|
_: 2
|
|
26079
26198
|
}, 1024)
|
|
@@ -26116,9 +26235,9 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
|
26116
26235
|
type: "submit",
|
|
26117
26236
|
variant: "tonal"
|
|
26118
26237
|
}, {
|
|
26119
|
-
default: vue.withCtx(() => [
|
|
26238
|
+
default: vue.withCtx(() => _cache[5] || (_cache[5] = [
|
|
26120
26239
|
vue.createTextVNode("Confirm")
|
|
26121
|
-
]),
|
|
26240
|
+
])),
|
|
26122
26241
|
_: 1
|
|
26123
26242
|
})
|
|
26124
26243
|
])
|
|
@@ -26127,14 +26246,13 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
|
26127
26246
|
})
|
|
26128
26247
|
]),
|
|
26129
26248
|
_: 1
|
|
26130
|
-
},
|
|
26249
|
+
}, 512)
|
|
26131
26250
|
]),
|
|
26132
26251
|
_: 1
|
|
26133
26252
|
}, 8, ["modelValue"]);
|
|
26134
26253
|
};
|
|
26135
26254
|
}
|
|
26136
26255
|
});
|
|
26137
|
-
const AddImage_vue_vue_type_style_index_0_scoped_8e6263e8_lang = "";
|
|
26138
26256
|
const AddImage = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-8e6263e8"]]);
|
|
26139
26257
|
const _hoisted_1$1 = { class: "actions d-flex justify-end" };
|
|
26140
26258
|
const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -26143,16 +26261,15 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
26143
26261
|
editor: {}
|
|
26144
26262
|
},
|
|
26145
26263
|
setup(__props) {
|
|
26146
|
-
const props = __props;
|
|
26147
26264
|
const rules = {
|
|
26148
26265
|
required: (val) => !!val || "The field is required",
|
|
26149
26266
|
url: (val) => {
|
|
26150
26267
|
const url2 = val.trim();
|
|
26151
|
-
if (!url2)
|
|
26152
|
-
return true;
|
|
26268
|
+
if (!url2) return true;
|
|
26153
26269
|
return isURL(url2) || "Please enter valid URL";
|
|
26154
26270
|
}
|
|
26155
26271
|
};
|
|
26272
|
+
const props = __props;
|
|
26156
26273
|
const form = vue.ref();
|
|
26157
26274
|
const getText2 = () => {
|
|
26158
26275
|
const { view, state } = props.editor;
|
|
@@ -26169,21 +26286,18 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
26169
26286
|
}
|
|
26170
26287
|
async function setLink() {
|
|
26171
26288
|
const { valid } = await form.value.validate();
|
|
26172
|
-
if (!valid)
|
|
26173
|
-
return;
|
|
26289
|
+
if (!valid) return;
|
|
26174
26290
|
const href = url.value.startsWith("http") ? url.value : `https://${url.value}`;
|
|
26175
26291
|
if (href) {
|
|
26176
26292
|
const attributes = { href };
|
|
26177
26293
|
props.editor.chain().focus().setLinkText({ attributes, text: text.value }).run();
|
|
26178
|
-
} else
|
|
26179
|
-
props.editor.chain().focus().unsetLink().run();
|
|
26294
|
+
} else props.editor.chain().focus().unsetLink().run();
|
|
26180
26295
|
show.value = false;
|
|
26181
26296
|
form.value.resetValidation();
|
|
26182
26297
|
}
|
|
26183
26298
|
vue.watch(show, (val) => {
|
|
26184
26299
|
var _a;
|
|
26185
|
-
if (!val)
|
|
26186
|
-
return;
|
|
26300
|
+
if (!val) return;
|
|
26187
26301
|
url.value = props.editor.getAttributes("link").href ?? "";
|
|
26188
26302
|
text.value = getText2() ?? "";
|
|
26189
26303
|
(_a = form.value) == null ? void 0 : _a.resetValidation();
|
|
@@ -26213,9 +26327,9 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
26213
26327
|
}, vue.mergeProps(menu, tooltip)), {
|
|
26214
26328
|
default: vue.withCtx(() => [
|
|
26215
26329
|
vue.createVNode(_component_VIcon, { size: "24" }, {
|
|
26216
|
-
default: vue.withCtx(() => [
|
|
26330
|
+
default: vue.withCtx(() => _cache[3] || (_cache[3] = [
|
|
26217
26331
|
vue.createTextVNode("mdi-link")
|
|
26218
|
-
]),
|
|
26332
|
+
])),
|
|
26219
26333
|
_: 1
|
|
26220
26334
|
})
|
|
26221
26335
|
]),
|
|
@@ -26223,7 +26337,7 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
26223
26337
|
}, 1040, ["active", "disabled"])
|
|
26224
26338
|
]),
|
|
26225
26339
|
default: vue.withCtx(() => [
|
|
26226
|
-
vue.createTextVNode(" Add link ")
|
|
26340
|
+
_cache[4] || (_cache[4] = vue.createTextVNode(" Add link "))
|
|
26227
26341
|
]),
|
|
26228
26342
|
_: 2
|
|
26229
26343
|
}, 1024)
|
|
@@ -26267,9 +26381,9 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
26267
26381
|
variant: "plain",
|
|
26268
26382
|
onClick: unlink
|
|
26269
26383
|
}, {
|
|
26270
|
-
default: vue.withCtx(() => [
|
|
26384
|
+
default: vue.withCtx(() => _cache[5] || (_cache[5] = [
|
|
26271
26385
|
vue.createTextVNode(" Unlink ")
|
|
26272
|
-
]),
|
|
26386
|
+
])),
|
|
26273
26387
|
_: 1
|
|
26274
26388
|
})) : vue.createCommentVNode("", true),
|
|
26275
26389
|
vue.createVNode(_component_VBtn, {
|
|
@@ -26277,9 +26391,9 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
26277
26391
|
type: "submit",
|
|
26278
26392
|
variant: "tonal"
|
|
26279
26393
|
}, {
|
|
26280
|
-
default: vue.withCtx(() => [
|
|
26394
|
+
default: vue.withCtx(() => _cache[6] || (_cache[6] = [
|
|
26281
26395
|
vue.createTextVNode("Confirm")
|
|
26282
|
-
]),
|
|
26396
|
+
])),
|
|
26283
26397
|
_: 1
|
|
26284
26398
|
})
|
|
26285
26399
|
])
|
|
@@ -26288,14 +26402,13 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
26288
26402
|
})
|
|
26289
26403
|
]),
|
|
26290
26404
|
_: 1
|
|
26291
|
-
},
|
|
26405
|
+
}, 512)
|
|
26292
26406
|
]),
|
|
26293
26407
|
_: 1
|
|
26294
26408
|
}, 8, ["modelValue"]);
|
|
26295
26409
|
};
|
|
26296
26410
|
}
|
|
26297
26411
|
});
|
|
26298
|
-
const AddLink_vue_vue_type_style_index_0_scoped_148650fc_lang = "";
|
|
26299
26412
|
const AddLink = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-148650fc"]]);
|
|
26300
26413
|
const _hoisted_1 = { class: "text-body-2" };
|
|
26301
26414
|
const INIT_SIZE = 5;
|
|
@@ -26312,14 +26425,10 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
|
26312
26425
|
const selectedSize = vue.reactive({ rows: 0, cols: 0 });
|
|
26313
26426
|
const gridSize = vue.reactive({ rows: INIT_SIZE, cols: INIT_SIZE });
|
|
26314
26427
|
const updateSelection2 = (rows, cols) => {
|
|
26315
|
-
if (rows === gridSize.rows)
|
|
26316
|
-
|
|
26317
|
-
|
|
26318
|
-
|
|
26319
|
-
if (cols === gridSize.cols)
|
|
26320
|
-
gridSize.cols = Math.min(cols + 1, MAX_SIZE);
|
|
26321
|
-
else if (cols < gridSize.cols - 1 && cols >= INIT_SIZE - 1)
|
|
26322
|
-
gridSize.cols--;
|
|
26428
|
+
if (rows === gridSize.rows) gridSize.rows = Math.min(rows + 1, MAX_SIZE);
|
|
26429
|
+
else if (rows < gridSize.rows - 1 && rows >= INIT_SIZE - 1) gridSize.rows--;
|
|
26430
|
+
if (cols === gridSize.cols) gridSize.cols = Math.min(cols + 1, MAX_SIZE);
|
|
26431
|
+
else if (cols < gridSize.cols - 1 && cols >= INIT_SIZE - 1) gridSize.cols--;
|
|
26323
26432
|
selectedSize.rows = rows;
|
|
26324
26433
|
selectedSize.cols = cols;
|
|
26325
26434
|
};
|
|
@@ -26332,8 +26441,7 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
|
26332
26441
|
return props.editor.chain().focus().insertTable(options).run();
|
|
26333
26442
|
};
|
|
26334
26443
|
vue.watch(show, (val) => {
|
|
26335
|
-
if (!val)
|
|
26336
|
-
return;
|
|
26444
|
+
if (!val) return;
|
|
26337
26445
|
withHeaderRow.value = false;
|
|
26338
26446
|
gridSize.rows = INIT_SIZE;
|
|
26339
26447
|
gridSize.cols = INIT_SIZE;
|
|
@@ -26360,9 +26468,9 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
|
26360
26468
|
}, vue.mergeProps(menu, tooltip)), {
|
|
26361
26469
|
default: vue.withCtx(() => [
|
|
26362
26470
|
vue.createVNode(_component_VIcon, { size: "24" }, {
|
|
26363
|
-
default: vue.withCtx(() => [
|
|
26471
|
+
default: vue.withCtx(() => _cache[3] || (_cache[3] = [
|
|
26364
26472
|
vue.createTextVNode("mdi-table-plus")
|
|
26365
|
-
]),
|
|
26473
|
+
])),
|
|
26366
26474
|
_: 1
|
|
26367
26475
|
})
|
|
26368
26476
|
]),
|
|
@@ -26370,7 +26478,7 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
|
26370
26478
|
}, 1040)
|
|
26371
26479
|
]),
|
|
26372
26480
|
default: vue.withCtx(() => [
|
|
26373
|
-
vue.createTextVNode(" Add table ")
|
|
26481
|
+
_cache[4] || (_cache[4] = vue.createTextVNode(" Add table "))
|
|
26374
26482
|
]),
|
|
26375
26483
|
_: 2
|
|
26376
26484
|
}, 1024)
|
|
@@ -26423,7 +26531,6 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
|
26423
26531
|
};
|
|
26424
26532
|
}
|
|
26425
26533
|
});
|
|
26426
|
-
const AddTable_vue_vue_type_style_index_0_scoped_86386e2b_lang = "";
|
|
26427
26534
|
const AddTable = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-86386e2b"]]);
|
|
26428
26535
|
const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
26429
26536
|
__name: "FontFamily",
|
|
@@ -26467,16 +26574,16 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
26467
26574
|
class: "ml-1 mr-n1",
|
|
26468
26575
|
size: "24"
|
|
26469
26576
|
}, {
|
|
26470
|
-
default: vue.withCtx(() => [
|
|
26577
|
+
default: vue.withCtx(() => _cache[0] || (_cache[0] = [
|
|
26471
26578
|
vue.createTextVNode("mdi-format-font")
|
|
26472
|
-
]),
|
|
26579
|
+
])),
|
|
26473
26580
|
_: 1
|
|
26474
26581
|
}),
|
|
26475
26582
|
vue.createElementVNode("div", null, [
|
|
26476
26583
|
vue.createVNode(_component_VIcon, { small: "" }, {
|
|
26477
|
-
default: vue.withCtx(() => [
|
|
26584
|
+
default: vue.withCtx(() => _cache[1] || (_cache[1] = [
|
|
26478
26585
|
vue.createTextVNode("mdi-menu-down")
|
|
26479
|
-
]),
|
|
26586
|
+
])),
|
|
26480
26587
|
_: 1
|
|
26481
26588
|
})
|
|
26482
26589
|
])
|
|
@@ -26485,7 +26592,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
26485
26592
|
}, 1040, ["active", "disabled"])
|
|
26486
26593
|
]),
|
|
26487
26594
|
default: vue.withCtx(() => [
|
|
26488
|
-
vue.createTextVNode(" Font family ")
|
|
26595
|
+
_cache[2] || (_cache[2] = vue.createTextVNode(" Font family "))
|
|
26489
26596
|
]),
|
|
26490
26597
|
_: 2
|
|
26491
26598
|
}, 1024)
|
|
@@ -26529,7 +26636,6 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
26529
26636
|
};
|
|
26530
26637
|
}
|
|
26531
26638
|
});
|
|
26532
|
-
const FontFamily_vue_vue_type_style_index_0_scoped_13c3b0cc_lang = "";
|
|
26533
26639
|
const FontFamily = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-13c3b0cc"]]);
|
|
26534
26640
|
const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
26535
26641
|
__name: "FontSize",
|
|
@@ -26581,15 +26687,15 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
26581
26687
|
class: "ml-1 mr-n1",
|
|
26582
26688
|
size: "24"
|
|
26583
26689
|
}, {
|
|
26584
|
-
default: vue.withCtx(() => [
|
|
26690
|
+
default: vue.withCtx(() => _cache[0] || (_cache[0] = [
|
|
26585
26691
|
vue.createTextVNode("mdi-format-size")
|
|
26586
|
-
]),
|
|
26692
|
+
])),
|
|
26587
26693
|
_: 1
|
|
26588
26694
|
}),
|
|
26589
26695
|
vue.createVNode(_component_VIcon, { small: "" }, {
|
|
26590
|
-
default: vue.withCtx(() => [
|
|
26696
|
+
default: vue.withCtx(() => _cache[1] || (_cache[1] = [
|
|
26591
26697
|
vue.createTextVNode("mdi-menu-down")
|
|
26592
|
-
]),
|
|
26698
|
+
])),
|
|
26593
26699
|
_: 1
|
|
26594
26700
|
})
|
|
26595
26701
|
]),
|
|
@@ -26597,7 +26703,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
26597
26703
|
}, 1040, ["active", "disabled"])
|
|
26598
26704
|
]),
|
|
26599
26705
|
default: vue.withCtx(() => [
|
|
26600
|
-
vue.createTextVNode(" Font size ")
|
|
26706
|
+
_cache[2] || (_cache[2] = vue.createTextVNode(" Font size "))
|
|
26601
26707
|
]),
|
|
26602
26708
|
_: 2
|
|
26603
26709
|
}, 1024)
|
|
@@ -26639,7 +26745,6 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
26639
26745
|
};
|
|
26640
26746
|
}
|
|
26641
26747
|
});
|
|
26642
|
-
const FontSize_vue_vue_type_style_index_0_scoped_70882e8a_lang = "";
|
|
26643
26748
|
const FontSize = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-70882e8a"]]);
|
|
26644
26749
|
const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
26645
26750
|
__name: "TextAlign",
|
|
@@ -26672,15 +26777,15 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
26672
26777
|
class: "ml-1 mr-n1",
|
|
26673
26778
|
size: "24"
|
|
26674
26779
|
}, {
|
|
26675
|
-
default: vue.withCtx(() => [
|
|
26780
|
+
default: vue.withCtx(() => _cache[0] || (_cache[0] = [
|
|
26676
26781
|
vue.createTextVNode("mdi-format-align-justify")
|
|
26677
|
-
]),
|
|
26782
|
+
])),
|
|
26678
26783
|
_: 1
|
|
26679
26784
|
}),
|
|
26680
26785
|
vue.createVNode(_component_VIcon, { small: "" }, {
|
|
26681
|
-
default: vue.withCtx(() => [
|
|
26786
|
+
default: vue.withCtx(() => _cache[1] || (_cache[1] = [
|
|
26682
26787
|
vue.createTextVNode("mdi-menu-down")
|
|
26683
|
-
]),
|
|
26788
|
+
])),
|
|
26684
26789
|
_: 1
|
|
26685
26790
|
})
|
|
26686
26791
|
]),
|
|
@@ -26688,7 +26793,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
26688
26793
|
}, 1040, ["disabled"])
|
|
26689
26794
|
]),
|
|
26690
26795
|
default: vue.withCtx(() => [
|
|
26691
|
-
vue.createTextVNode(" Text align ")
|
|
26796
|
+
_cache[2] || (_cache[2] = vue.createTextVNode(" Text align "))
|
|
26692
26797
|
]),
|
|
26693
26798
|
_: 2
|
|
26694
26799
|
}, 1024)
|
|
@@ -26740,7 +26845,6 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
26740
26845
|
};
|
|
26741
26846
|
}
|
|
26742
26847
|
});
|
|
26743
|
-
const TextAlign_vue_vue_type_style_index_0_scoped_1b30eb43_lang = "";
|
|
26744
26848
|
const TextAlign = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-1b30eb43"]]);
|
|
26745
26849
|
const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
26746
26850
|
__name: "ColorPicker",
|
|
@@ -26751,8 +26855,9 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
26751
26855
|
icon: {}
|
|
26752
26856
|
},
|
|
26753
26857
|
emits: ["set", "unset"],
|
|
26754
|
-
setup(__props, { emit }) {
|
|
26858
|
+
setup(__props, { emit: __emit }) {
|
|
26755
26859
|
const props = __props;
|
|
26860
|
+
const emit = __emit;
|
|
26756
26861
|
const COLORS = [
|
|
26757
26862
|
[
|
|
26758
26863
|
"#000000",
|
|
@@ -26836,9 +26941,9 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
26836
26941
|
color: currentColor.value,
|
|
26837
26942
|
size: "20"
|
|
26838
26943
|
}, {
|
|
26839
|
-
default: vue.withCtx(() => [
|
|
26944
|
+
default: vue.withCtx(() => _cache[1] || (_cache[1] = [
|
|
26840
26945
|
vue.createTextVNode("mdi-color-helper")
|
|
26841
|
-
]),
|
|
26946
|
+
])),
|
|
26842
26947
|
_: 1
|
|
26843
26948
|
}, 8, ["color"])
|
|
26844
26949
|
]),
|
|
@@ -26879,9 +26984,9 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
26879
26984
|
color: "white",
|
|
26880
26985
|
size: "small"
|
|
26881
26986
|
}, {
|
|
26882
|
-
default: vue.withCtx(() => [
|
|
26987
|
+
default: vue.withCtx(() => _cache[2] || (_cache[2] = [
|
|
26883
26988
|
vue.createTextVNode(" mdi-check-circle ")
|
|
26884
|
-
]),
|
|
26989
|
+
])),
|
|
26885
26990
|
_: 1
|
|
26886
26991
|
})) : vue.createCommentVNode("", true)
|
|
26887
26992
|
]),
|
|
@@ -26899,12 +27004,12 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
26899
27004
|
}, {
|
|
26900
27005
|
default: vue.withCtx(() => [
|
|
26901
27006
|
vue.createVNode(_component_VIcon, { size: "small" }, {
|
|
26902
|
-
default: vue.withCtx(() => [
|
|
27007
|
+
default: vue.withCtx(() => _cache[3] || (_cache[3] = [
|
|
26903
27008
|
vue.createTextVNode("mdi-water-off")
|
|
26904
|
-
]),
|
|
27009
|
+
])),
|
|
26905
27010
|
_: 1
|
|
26906
27011
|
}),
|
|
26907
|
-
vue.createTextVNode(" Reset ")
|
|
27012
|
+
_cache[4] || (_cache[4] = vue.createTextVNode(" Reset "))
|
|
26908
27013
|
]),
|
|
26909
27014
|
_: 1
|
|
26910
27015
|
})
|
|
@@ -26917,7 +27022,6 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
26917
27022
|
};
|
|
26918
27023
|
}
|
|
26919
27024
|
});
|
|
26920
|
-
const ColorPicker_vue_vue_type_style_index_0_scoped_0b56d20a_lang = "";
|
|
26921
27025
|
const ColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-0b56d20a"]]);
|
|
26922
27026
|
const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
26923
27027
|
__name: "TextColor",
|
|
@@ -26973,9 +27077,9 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
26973
27077
|
_: 1
|
|
26974
27078
|
}),
|
|
26975
27079
|
vue.createVNode(_component_VIcon, { small: "" }, {
|
|
26976
|
-
default: vue.withCtx(() => [
|
|
27080
|
+
default: vue.withCtx(() => _cache[1] || (_cache[1] = [
|
|
26977
27081
|
vue.createTextVNode("mdi-menu-down")
|
|
26978
|
-
]),
|
|
27082
|
+
])),
|
|
26979
27083
|
_: 1
|
|
26980
27084
|
})
|
|
26981
27085
|
]),
|
|
@@ -26983,7 +27087,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
26983
27087
|
}, 1040, ["active"])
|
|
26984
27088
|
]),
|
|
26985
27089
|
default: vue.withCtx(() => [
|
|
26986
|
-
vue.createTextVNode(" Headings ")
|
|
27090
|
+
_cache[2] || (_cache[2] = vue.createTextVNode(" Headings "))
|
|
26987
27091
|
]),
|
|
26988
27092
|
_: 2
|
|
26989
27093
|
}, 1024)
|
|
@@ -27014,7 +27118,24 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
27014
27118
|
]),
|
|
27015
27119
|
_: 2
|
|
27016
27120
|
}, 1032, ["active", "onClick"]);
|
|
27017
|
-
}), 64))
|
|
27121
|
+
}), 64)),
|
|
27122
|
+
vue.createVNode(_component_VListItem, {
|
|
27123
|
+
active: _ctx.editor.isActive("paragraph"),
|
|
27124
|
+
class: "px-2",
|
|
27125
|
+
"min-height": "36",
|
|
27126
|
+
rounded: "sm",
|
|
27127
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.editor.chain().focus().setParagraph().run())
|
|
27128
|
+
}, {
|
|
27129
|
+
default: vue.withCtx(() => [
|
|
27130
|
+
vue.createVNode(_component_VListItemTitle, null, {
|
|
27131
|
+
default: vue.withCtx(() => _cache[3] || (_cache[3] = [
|
|
27132
|
+
vue.createTextVNode("Normal")
|
|
27133
|
+
])),
|
|
27134
|
+
_: 1
|
|
27135
|
+
})
|
|
27136
|
+
]),
|
|
27137
|
+
_: 1
|
|
27138
|
+
}, 8, ["active"])
|
|
27018
27139
|
]),
|
|
27019
27140
|
_: 1
|
|
27020
27141
|
})
|
|
@@ -27024,8 +27145,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
27024
27145
|
};
|
|
27025
27146
|
}
|
|
27026
27147
|
});
|
|
27027
|
-
const
|
|
27028
|
-
const TextHeading = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-70d410a1"]]);
|
|
27148
|
+
const TextHeading = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-eb5927ce"]]);
|
|
27029
27149
|
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
27030
27150
|
__name: "TextHighlight",
|
|
27031
27151
|
props: {
|
|
@@ -27203,7 +27323,6 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
27203
27323
|
};
|
|
27204
27324
|
}
|
|
27205
27325
|
});
|
|
27206
|
-
const EditorToolbar_vue_vue_type_style_index_0_scoped_b4ffaa29_lang = "";
|
|
27207
27326
|
const EditorToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-b4ffaa29"]]);
|
|
27208
27327
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
27209
27328
|
__name: "TopToolbar",
|
|
@@ -27226,7 +27345,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
27226
27345
|
}
|
|
27227
27346
|
});
|
|
27228
27347
|
const manifest = {
|
|
27229
|
-
...
|
|
27348
|
+
...index_default,
|
|
27230
27349
|
Edit,
|
|
27231
27350
|
TopToolbar: _sfc_main
|
|
27232
27351
|
};
|