dara-components 1.16.11__py3-none-any.whl → 1.16.13__py3-none-any.whl
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.
- dara/components/umd/dara.components.umd.js +2629 -415
- {dara_components-1.16.11.dist-info → dara_components-1.16.13.dist-info}/METADATA +3 -3
- {dara_components-1.16.11.dist-info → dara_components-1.16.13.dist-info}/RECORD +5 -5
- {dara_components-1.16.11.dist-info → dara_components-1.16.13.dist-info}/LICENSE +0 -0
- {dara_components-1.16.11.dist-info → dara_components-1.16.13.dist-info}/WHEEL +0 -0
|
@@ -45,7 +45,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
45
45
|
const T__default = /* @__PURE__ */ _interopDefaultLegacy(T$2);
|
|
46
46
|
const ReactDOM__namespace = /* @__PURE__ */ _interopNamespace(ReactDOM);
|
|
47
47
|
const ReactDOM__default = /* @__PURE__ */ _interopDefaultLegacy(ReactDOM);
|
|
48
|
-
const index$
|
|
48
|
+
const index$d = "";
|
|
49
49
|
const theme$5 = {
|
|
50
50
|
colors: {
|
|
51
51
|
primary: "#3796F6",
|
|
@@ -1800,8 +1800,8 @@ var __privateMethod = (obj, member, method) => {
|
|
|
1800
1800
|
delete providers[k3];
|
|
1801
1801
|
}
|
|
1802
1802
|
});
|
|
1803
|
-
_plugins.forEach(function(
|
|
1804
|
-
var mixout =
|
|
1803
|
+
_plugins.forEach(function(plugin2) {
|
|
1804
|
+
var mixout = plugin2.mixout ? plugin2.mixout() : {};
|
|
1805
1805
|
Object.keys(mixout).forEach(function(tk) {
|
|
1806
1806
|
if (typeof mixout[tk] === "function") {
|
|
1807
1807
|
obj[tk] = mixout[tk];
|
|
@@ -1815,8 +1815,8 @@ var __privateMethod = (obj, member, method) => {
|
|
|
1815
1815
|
});
|
|
1816
1816
|
}
|
|
1817
1817
|
});
|
|
1818
|
-
if (
|
|
1819
|
-
var hooks =
|
|
1818
|
+
if (plugin2.hooks) {
|
|
1819
|
+
var hooks = plugin2.hooks();
|
|
1820
1820
|
Object.keys(hooks).forEach(function(hook) {
|
|
1821
1821
|
if (!_hooks[hook]) {
|
|
1822
1822
|
_hooks[hook] = [];
|
|
@@ -1824,8 +1824,8 @@ var __privateMethod = (obj, member, method) => {
|
|
|
1824
1824
|
_hooks[hook].push(hooks[hook]);
|
|
1825
1825
|
});
|
|
1826
1826
|
}
|
|
1827
|
-
if (
|
|
1828
|
-
|
|
1827
|
+
if (plugin2.provides) {
|
|
1828
|
+
plugin2.provides(providers);
|
|
1829
1829
|
}
|
|
1830
1830
|
});
|
|
1831
1831
|
return obj;
|
|
@@ -5917,10 +5917,10 @@ var __privateMethod = (obj, member, method) => {
|
|
|
5917
5917
|
}
|
|
5918
5918
|
return index2;
|
|
5919
5919
|
}
|
|
5920
|
-
function countHolders(array2,
|
|
5920
|
+
function countHolders(array2, placeholder2) {
|
|
5921
5921
|
var length = array2.length, result = 0;
|
|
5922
5922
|
while (length--) {
|
|
5923
|
-
if (array2[length] ===
|
|
5923
|
+
if (array2[length] === placeholder2) {
|
|
5924
5924
|
++result;
|
|
5925
5925
|
}
|
|
5926
5926
|
}
|
|
@@ -5959,11 +5959,11 @@ var __privateMethod = (obj, member, method) => {
|
|
|
5959
5959
|
return func(transform(arg2));
|
|
5960
5960
|
};
|
|
5961
5961
|
}
|
|
5962
|
-
function replaceHolders(array2,
|
|
5962
|
+
function replaceHolders(array2, placeholder2) {
|
|
5963
5963
|
var index2 = -1, length = array2.length, resIndex = 0, result = [];
|
|
5964
5964
|
while (++index2 < length) {
|
|
5965
5965
|
var value = array2[index2];
|
|
5966
|
-
if (value ===
|
|
5966
|
+
if (value === placeholder2 || value === PLACEHOLDER) {
|
|
5967
5967
|
array2[index2] = PLACEHOLDER;
|
|
5968
5968
|
result[resIndex++] = index2;
|
|
5969
5969
|
}
|
|
@@ -6598,15 +6598,15 @@ var __privateMethod = (obj, member, method) => {
|
|
|
6598
6598
|
});
|
|
6599
6599
|
return result2;
|
|
6600
6600
|
}
|
|
6601
|
-
function baseFlatten(array2,
|
|
6601
|
+
function baseFlatten(array2, depth2, predicate, isStrict, result2) {
|
|
6602
6602
|
var index2 = -1, length = array2.length;
|
|
6603
6603
|
predicate || (predicate = isFlattenable);
|
|
6604
6604
|
result2 || (result2 = []);
|
|
6605
6605
|
while (++index2 < length) {
|
|
6606
6606
|
var value = array2[index2];
|
|
6607
|
-
if (
|
|
6608
|
-
if (
|
|
6609
|
-
baseFlatten(value,
|
|
6607
|
+
if (depth2 > 0 && predicate(value)) {
|
|
6608
|
+
if (depth2 > 1) {
|
|
6609
|
+
baseFlatten(value, depth2 - 1, predicate, isStrict, result2);
|
|
6610
6610
|
} else {
|
|
6611
6611
|
arrayPush2(result2, value);
|
|
6612
6612
|
}
|
|
@@ -7520,11 +7520,11 @@ var __privateMethod = (obj, member, method) => {
|
|
|
7520
7520
|
function createCurry(func, bitmask, arity) {
|
|
7521
7521
|
var Ctor = createCtor(func);
|
|
7522
7522
|
function wrapper() {
|
|
7523
|
-
var length = arguments.length, args = Array2(length), index2 = length,
|
|
7523
|
+
var length = arguments.length, args = Array2(length), index2 = length, placeholder2 = getHolder(wrapper);
|
|
7524
7524
|
while (index2--) {
|
|
7525
7525
|
args[index2] = arguments[index2];
|
|
7526
7526
|
}
|
|
7527
|
-
var holders = length < 3 && args[0] !==
|
|
7527
|
+
var holders = length < 3 && args[0] !== placeholder2 && args[length - 1] !== placeholder2 ? [] : replaceHolders(args, placeholder2);
|
|
7528
7528
|
length -= holders.length;
|
|
7529
7529
|
if (length < arity) {
|
|
7530
7530
|
return createRecurry(
|
|
@@ -7605,7 +7605,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
7605
7605
|
args[index2] = arguments[index2];
|
|
7606
7606
|
}
|
|
7607
7607
|
if (isCurried) {
|
|
7608
|
-
var
|
|
7608
|
+
var placeholder2 = getHolder(wrapper), holdersCount = countHolders(args, placeholder2);
|
|
7609
7609
|
}
|
|
7610
7610
|
if (partials) {
|
|
7611
7611
|
args = composeArgs(args, partials, holders, isCurried);
|
|
@@ -7615,7 +7615,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
7615
7615
|
}
|
|
7616
7616
|
length -= holdersCount;
|
|
7617
7617
|
if (isCurried && length < arity) {
|
|
7618
|
-
var newHolders = replaceHolders(args,
|
|
7618
|
+
var newHolders = replaceHolders(args, placeholder2);
|
|
7619
7619
|
return createRecurry(
|
|
7620
7620
|
func,
|
|
7621
7621
|
bitmask,
|
|
@@ -7735,7 +7735,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
7735
7735
|
return operator2(value, other);
|
|
7736
7736
|
};
|
|
7737
7737
|
}
|
|
7738
|
-
function createRecurry(func, bitmask, wrapFunc,
|
|
7738
|
+
function createRecurry(func, bitmask, wrapFunc, placeholder2, thisArg, partials, holders, argPos, ary2, arity) {
|
|
7739
7739
|
var isCurry = bitmask & WRAP_CURRY_FLAG, newHolders = isCurry ? holders : undefined$1, newHoldersRight = isCurry ? undefined$1 : holders, newPartials = isCurry ? partials : undefined$1, newPartialsRight = isCurry ? undefined$1 : partials;
|
|
7740
7740
|
bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG;
|
|
7741
7741
|
bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
|
|
@@ -7758,7 +7758,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
7758
7758
|
if (isLaziable(func)) {
|
|
7759
7759
|
setData(result2, newData);
|
|
7760
7760
|
}
|
|
7761
|
-
result2.placeholder =
|
|
7761
|
+
result2.placeholder = placeholder2;
|
|
7762
7762
|
return setWrapToString(result2, func, bitmask);
|
|
7763
7763
|
}
|
|
7764
7764
|
function createRound2(methodName) {
|
|
@@ -8548,13 +8548,13 @@ var __privateMethod = (obj, member, method) => {
|
|
|
8548
8548
|
var length = array2 == null ? 0 : array2.length;
|
|
8549
8549
|
return length ? baseFlatten(array2, INFINITY2) : [];
|
|
8550
8550
|
}
|
|
8551
|
-
function flattenDepth(array2,
|
|
8551
|
+
function flattenDepth(array2, depth2) {
|
|
8552
8552
|
var length = array2 == null ? 0 : array2.length;
|
|
8553
8553
|
if (!length) {
|
|
8554
8554
|
return [];
|
|
8555
8555
|
}
|
|
8556
|
-
|
|
8557
|
-
return baseFlatten(array2,
|
|
8556
|
+
depth2 = depth2 === undefined$1 ? 1 : toInteger2(depth2);
|
|
8557
|
+
return baseFlatten(array2, depth2);
|
|
8558
8558
|
}
|
|
8559
8559
|
function fromPairs(pairs) {
|
|
8560
8560
|
var index2 = -1, length = pairs == null ? 0 : pairs.length, result2 = {};
|
|
@@ -8933,9 +8933,9 @@ var __privateMethod = (obj, member, method) => {
|
|
|
8933
8933
|
function flatMapDeep(collection, iteratee2) {
|
|
8934
8934
|
return baseFlatten(map2(collection, iteratee2), INFINITY2);
|
|
8935
8935
|
}
|
|
8936
|
-
function flatMapDepth(collection, iteratee2,
|
|
8937
|
-
|
|
8938
|
-
return baseFlatten(map2(collection, iteratee2),
|
|
8936
|
+
function flatMapDepth(collection, iteratee2, depth2) {
|
|
8937
|
+
depth2 = depth2 === undefined$1 ? 1 : toInteger2(depth2);
|
|
8938
|
+
return baseFlatten(map2(collection, iteratee2), depth2);
|
|
8939
8939
|
}
|
|
8940
8940
|
function forEach(collection, iteratee2) {
|
|
8941
8941
|
var func = isArray2(collection) ? arrayEach : baseEach;
|
|
@@ -12765,7 +12765,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
12765
12765
|
platform: platformWithCache
|
|
12766
12766
|
});
|
|
12767
12767
|
};
|
|
12768
|
-
var index$
|
|
12768
|
+
var index$c = typeof document !== "undefined" ? React.useLayoutEffect : React.useEffect;
|
|
12769
12769
|
function deepEqual(a3, b3) {
|
|
12770
12770
|
if (a3 === b3) {
|
|
12771
12771
|
return true;
|
|
@@ -12827,7 +12827,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
12827
12827
|
}
|
|
12828
12828
|
function useLatestRef$1(value) {
|
|
12829
12829
|
const ref = React__namespace.useRef(value);
|
|
12830
|
-
index$
|
|
12830
|
+
index$c(() => {
|
|
12831
12831
|
ref.current = value;
|
|
12832
12832
|
});
|
|
12833
12833
|
return ref;
|
|
@@ -12909,7 +12909,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
12909
12909
|
}
|
|
12910
12910
|
});
|
|
12911
12911
|
}, [latestMiddleware, placement, strategy, platformRef, openRef]);
|
|
12912
|
-
index$
|
|
12912
|
+
index$c(() => {
|
|
12913
12913
|
if (open === false && dataRef.current.isPositioned) {
|
|
12914
12914
|
dataRef.current.isPositioned = false;
|
|
12915
12915
|
setData((data3) => ({
|
|
@@ -12919,13 +12919,13 @@ var __privateMethod = (obj, member, method) => {
|
|
|
12919
12919
|
}
|
|
12920
12920
|
}, [open]);
|
|
12921
12921
|
const isMountedRef = React__namespace.useRef(false);
|
|
12922
|
-
index$
|
|
12922
|
+
index$c(() => {
|
|
12923
12923
|
isMountedRef.current = true;
|
|
12924
12924
|
return () => {
|
|
12925
12925
|
isMountedRef.current = false;
|
|
12926
12926
|
};
|
|
12927
12927
|
}, []);
|
|
12928
|
-
index$
|
|
12928
|
+
index$c(() => {
|
|
12929
12929
|
if (referenceEl)
|
|
12930
12930
|
referenceRef.current = referenceEl;
|
|
12931
12931
|
if (floatingEl)
|
|
@@ -13015,13 +13015,13 @@ var __privateMethod = (obj, member, method) => {
|
|
|
13015
13015
|
return ref.current == null ? void 0 : ref.current(...args);
|
|
13016
13016
|
}, []);
|
|
13017
13017
|
}
|
|
13018
|
-
var index$
|
|
13018
|
+
var index$b = typeof document !== "undefined" ? React.useLayoutEffect : React.useEffect;
|
|
13019
13019
|
let serverHandoffComplete = false;
|
|
13020
13020
|
let count$2 = 0;
|
|
13021
13021
|
const genId = () => "floating-ui-" + Math.random().toString(36).slice(2, 6) + count$2++;
|
|
13022
13022
|
function useFloatingId() {
|
|
13023
13023
|
const [id2, setId] = React__namespace.useState(() => serverHandoffComplete ? genId() : void 0);
|
|
13024
|
-
index$
|
|
13024
|
+
index$b(() => {
|
|
13025
13025
|
if (id2 == null) {
|
|
13026
13026
|
setId(genId());
|
|
13027
13027
|
}
|
|
@@ -13491,7 +13491,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
13491
13491
|
const domReference = optionDomReference || _domReference;
|
|
13492
13492
|
const domReferenceRef = React__namespace.useRef(null);
|
|
13493
13493
|
const tree = useFloatingTree();
|
|
13494
|
-
index$
|
|
13494
|
+
index$b(() => {
|
|
13495
13495
|
if (domReference) {
|
|
13496
13496
|
domReferenceRef.current = domReference;
|
|
13497
13497
|
}
|
|
@@ -13539,7 +13539,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
13539
13539
|
elements,
|
|
13540
13540
|
nodeId
|
|
13541
13541
|
}), [position2, refs, elements, nodeId, rootContext]);
|
|
13542
|
-
index$
|
|
13542
|
+
index$b(() => {
|
|
13543
13543
|
rootContext.dataRef.current.floatingContext = context;
|
|
13544
13544
|
const node2 = tree == null ? void 0 : tree.nodesRef.current.find((node3) => node3.id === nodeId);
|
|
13545
13545
|
if (node2) {
|
|
@@ -14847,7 +14847,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
14847
14847
|
font-style: italic;
|
|
14848
14848
|
}
|
|
14849
14849
|
`;
|
|
14850
|
-
function TextArea({ autoFocus, className, disabled: disabled2, errorMsg, initialValue, keydownFilter, maxHeight, onBlur, onChange: onChange2, onClick, onComplete, placeholder, style: style2, value, resize }) {
|
|
14850
|
+
function TextArea({ autoFocus, className, disabled: disabled2, errorMsg, initialValue, keydownFilter, maxHeight, onBlur, onChange: onChange2, onClick, onComplete, placeholder: placeholder2, style: style2, value, resize }) {
|
|
14851
14851
|
const textareaRef = React__namespace.useRef(null);
|
|
14852
14852
|
React__namespace.useLayoutEffect(() => {
|
|
14853
14853
|
if (maxHeight && textareaRef.current) {
|
|
@@ -14886,7 +14886,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
14886
14886
|
onComplete();
|
|
14887
14887
|
}
|
|
14888
14888
|
};
|
|
14889
|
-
return jsxRuntime.exports.jsxs("div", { className, style: style2, children: [jsxRuntime.exports.jsx(PrimaryTextArea, { ref: textareaRef, autoFocus, defaultValue: initialValue, disabled: disabled2, isErrored: !!errorMsg, onBlur, onChange: onChangeText, onClick, onKeyDown, placeholder, style: { resize, maxHeight: maxHeight ? `${maxHeight}rem` : "none" }, value }), errorMsg && jsxRuntime.exports.jsx(ErrorMessage$2, { children: errorMsg })] });
|
|
14889
|
+
return jsxRuntime.exports.jsxs("div", { className, style: style2, children: [jsxRuntime.exports.jsx(PrimaryTextArea, { ref: textareaRef, autoFocus, defaultValue: initialValue, disabled: disabled2, isErrored: !!errorMsg, onBlur, onChange: onChangeText, onClick, onKeyDown, placeholder: placeholder2, style: { resize, maxHeight: maxHeight ? `${maxHeight}rem` : "none" }, value }), errorMsg && jsxRuntime.exports.jsx(ErrorMessage$2, { children: errorMsg })] });
|
|
14890
14890
|
}
|
|
14891
14891
|
function toInteger$3(dirtyNumber) {
|
|
14892
14892
|
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
|
@@ -19399,12 +19399,12 @@ var __privateMethod = (obj, member, method) => {
|
|
|
19399
19399
|
return "";
|
|
19400
19400
|
}
|
|
19401
19401
|
function point$3(point2) {
|
|
19402
|
-
return index$
|
|
19402
|
+
return index$a(point2 && point2.line) + ":" + index$a(point2 && point2.column);
|
|
19403
19403
|
}
|
|
19404
19404
|
function position$1(pos) {
|
|
19405
19405
|
return point$3(pos && pos.start) + "-" + point$3(pos && pos.end);
|
|
19406
19406
|
}
|
|
19407
|
-
function index$
|
|
19407
|
+
function index$a(value) {
|
|
19408
19408
|
return value && typeof value === "number" ? value : 1;
|
|
19409
19409
|
}
|
|
19410
19410
|
class VFileMessage extends Error {
|
|
@@ -23641,7 +23641,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
23641
23641
|
}
|
|
23642
23642
|
return events;
|
|
23643
23643
|
}
|
|
23644
|
-
const search$
|
|
23644
|
+
const search$2 = /[\0\t\n\r]/g;
|
|
23645
23645
|
function preprocess() {
|
|
23646
23646
|
let column = 1;
|
|
23647
23647
|
let buffer = "";
|
|
@@ -23665,8 +23665,8 @@ var __privateMethod = (obj, member, method) => {
|
|
|
23665
23665
|
start2 = void 0;
|
|
23666
23666
|
}
|
|
23667
23667
|
while (startPosition < value.length) {
|
|
23668
|
-
search$
|
|
23669
|
-
match2 = search$
|
|
23668
|
+
search$2.lastIndex = startPosition;
|
|
23669
|
+
match2 = search$2.exec(value);
|
|
23670
23670
|
endPosition = match2 && match2.index !== void 0 ? match2.index : value.length;
|
|
23671
23671
|
code2 = value.charCodeAt(endPosition);
|
|
23672
23672
|
if (!match2) {
|
|
@@ -24106,8 +24106,8 @@ var __privateMethod = (obj, member, method) => {
|
|
|
24106
24106
|
function onexitatxheadingsequence(token) {
|
|
24107
24107
|
const node2 = this.stack[this.stack.length - 1];
|
|
24108
24108
|
if (!node2.depth) {
|
|
24109
|
-
const
|
|
24110
|
-
node2.depth =
|
|
24109
|
+
const depth2 = this.sliceSerialize(token).length;
|
|
24110
|
+
node2.depth = depth2;
|
|
24111
24111
|
}
|
|
24112
24112
|
}
|
|
24113
24113
|
function onexitsetextheadingtext() {
|
|
@@ -26334,8 +26334,8 @@ var __privateMethod = (obj, member, method) => {
|
|
|
26334
26334
|
addPlugin(value2, []);
|
|
26335
26335
|
} else if (typeof value2 === "object") {
|
|
26336
26336
|
if (Array.isArray(value2)) {
|
|
26337
|
-
const [
|
|
26338
|
-
addPlugin(
|
|
26337
|
+
const [plugin2, ...parameters2] = value2;
|
|
26338
|
+
addPlugin(plugin2, parameters2);
|
|
26339
26339
|
} else {
|
|
26340
26340
|
addPreset(value2);
|
|
26341
26341
|
}
|
|
@@ -26367,24 +26367,24 @@ var __privateMethod = (obj, member, method) => {
|
|
|
26367
26367
|
throw new TypeError("Expected a list of plugins, not `" + plugins2 + "`");
|
|
26368
26368
|
}
|
|
26369
26369
|
}
|
|
26370
|
-
function addPlugin(
|
|
26370
|
+
function addPlugin(plugin2, parameters2) {
|
|
26371
26371
|
let index2 = -1;
|
|
26372
26372
|
let entryIndex = -1;
|
|
26373
26373
|
while (++index2 < attachers.length) {
|
|
26374
|
-
if (attachers[index2][0] ===
|
|
26374
|
+
if (attachers[index2][0] === plugin2) {
|
|
26375
26375
|
entryIndex = index2;
|
|
26376
26376
|
break;
|
|
26377
26377
|
}
|
|
26378
26378
|
}
|
|
26379
26379
|
if (entryIndex === -1) {
|
|
26380
|
-
attachers.push([
|
|
26380
|
+
attachers.push([plugin2, ...parameters2]);
|
|
26381
26381
|
} else if (parameters2.length > 0) {
|
|
26382
26382
|
let [primary, ...rest] = parameters2;
|
|
26383
26383
|
const currentPrimary = attachers[entryIndex][1];
|
|
26384
26384
|
if (isPlainObject$1(currentPrimary) && isPlainObject$1(primary)) {
|
|
26385
26385
|
primary = extend$2(true, currentPrimary, primary);
|
|
26386
26386
|
}
|
|
26387
|
-
attachers[entryIndex] = [
|
|
26387
|
+
attachers[entryIndex] = [plugin2, primary, ...rest];
|
|
26388
26388
|
}
|
|
26389
26389
|
}
|
|
26390
26390
|
}
|
|
@@ -31177,11 +31177,11 @@ var __privateMethod = (obj, member, method) => {
|
|
|
31177
31177
|
return token;
|
|
31178
31178
|
} else {
|
|
31179
31179
|
var interpolationExpression = token.content;
|
|
31180
|
-
var
|
|
31181
|
-
while (code2.indexOf(
|
|
31180
|
+
var placeholder2;
|
|
31181
|
+
while (code2.indexOf(placeholder2 = getPlaceholder(placeholderCounter++, language2)) !== -1) {
|
|
31182
31182
|
}
|
|
31183
|
-
placeholderMap[
|
|
31184
|
-
return
|
|
31183
|
+
placeholderMap[placeholder2] = interpolationExpression;
|
|
31184
|
+
return placeholder2;
|
|
31185
31185
|
}
|
|
31186
31186
|
}).join("");
|
|
31187
31187
|
var embeddedTokens = tokenizeWithHooks(embeddedCode, grammar, language2);
|
|
@@ -31194,14 +31194,14 @@ var __privateMethod = (obj, member, method) => {
|
|
|
31194
31194
|
}
|
|
31195
31195
|
var token = tokens2[i3];
|
|
31196
31196
|
if (typeof token === "string" || typeof token.content === "string") {
|
|
31197
|
-
var
|
|
31197
|
+
var placeholder2 = placeholders[placeholderCounter];
|
|
31198
31198
|
var s3 = typeof token === "string" ? token : token.content;
|
|
31199
|
-
var index2 = s3.indexOf(
|
|
31199
|
+
var index2 = s3.indexOf(placeholder2);
|
|
31200
31200
|
if (index2 !== -1) {
|
|
31201
31201
|
++placeholderCounter;
|
|
31202
31202
|
var before = s3.substring(0, index2);
|
|
31203
|
-
var middle = tokenizeInterpolationExpression(placeholderMap[
|
|
31204
|
-
var after = s3.substring(index2 +
|
|
31203
|
+
var middle = tokenizeInterpolationExpression(placeholderMap[placeholder2]);
|
|
31204
|
+
var after = s3.substring(index2 + placeholder2.length);
|
|
31205
31205
|
var replacement = [];
|
|
31206
31206
|
if (before) {
|
|
31207
31207
|
replacement.push(before);
|
|
@@ -31634,12 +31634,12 @@ var __privateMethod = (obj, member, method) => {
|
|
|
31634
31634
|
return match2;
|
|
31635
31635
|
}
|
|
31636
31636
|
var i3 = tokenStack.length;
|
|
31637
|
-
var
|
|
31638
|
-
while (env2.code.indexOf(
|
|
31637
|
+
var placeholder2;
|
|
31638
|
+
while (env2.code.indexOf(placeholder2 = getPlaceholder(language2, i3)) !== -1) {
|
|
31639
31639
|
++i3;
|
|
31640
31640
|
}
|
|
31641
31641
|
tokenStack[i3] = match2;
|
|
31642
|
-
return
|
|
31642
|
+
return placeholder2;
|
|
31643
31643
|
});
|
|
31644
31644
|
env2.grammar = Prism2.languages.markup;
|
|
31645
31645
|
}
|
|
@@ -31662,13 +31662,13 @@ var __privateMethod = (obj, member, method) => {
|
|
|
31662
31662
|
var k3 = keys2[j3];
|
|
31663
31663
|
var t3 = env2.tokenStack[k3];
|
|
31664
31664
|
var s3 = typeof token === "string" ? token : token.content;
|
|
31665
|
-
var
|
|
31666
|
-
var index2 = s3.indexOf(
|
|
31665
|
+
var placeholder2 = getPlaceholder(language2, k3);
|
|
31666
|
+
var index2 = s3.indexOf(placeholder2);
|
|
31667
31667
|
if (index2 > -1) {
|
|
31668
31668
|
++j3;
|
|
31669
31669
|
var before = s3.substring(0, index2);
|
|
31670
31670
|
var middle = new Prism2.Token(language2, Prism2.tokenize(t3, env2.grammar), "language-" + language2, t3);
|
|
31671
|
-
var after = s3.substring(index2 +
|
|
31671
|
+
var after = s3.substring(index2 + placeholder2.length);
|
|
31672
31672
|
var replacement = [];
|
|
31673
31673
|
if (before) {
|
|
31674
31674
|
replacement.push.apply(replacement, walkTokens([before]));
|
|
@@ -34753,8 +34753,8 @@ var __privateMethod = (obj, member, method) => {
|
|
|
34753
34753
|
};
|
|
34754
34754
|
function getExtendedPassedProps$1(passedProps) {
|
|
34755
34755
|
var plugins2 = passedProps.plugins || [];
|
|
34756
|
-
var pluginProps2 = plugins2.reduce(function(acc,
|
|
34757
|
-
var name2 =
|
|
34756
|
+
var pluginProps2 = plugins2.reduce(function(acc, plugin2) {
|
|
34757
|
+
var name2 = plugin2.name, defaultValue = plugin2.defaultValue;
|
|
34758
34758
|
if (name2) {
|
|
34759
34759
|
acc[name2] = passedProps[name2] !== void 0 ? passedProps[name2] : defaultValue;
|
|
34760
34760
|
}
|
|
@@ -34868,8 +34868,8 @@ var __privateMethod = (obj, member, method) => {
|
|
|
34868
34868
|
instance.popper = popper2;
|
|
34869
34869
|
reference2._tippy = instance;
|
|
34870
34870
|
popper2._tippy = instance;
|
|
34871
|
-
var pluginsHooks = plugins2.map(function(
|
|
34872
|
-
return
|
|
34871
|
+
var pluginsHooks = plugins2.map(function(plugin2) {
|
|
34872
|
+
return plugin2.fn(instance);
|
|
34873
34873
|
});
|
|
34874
34874
|
var hasAriaExpanded = reference2.hasAttribute("aria-expanded");
|
|
34875
34875
|
addListeners();
|
|
@@ -36028,8 +36028,8 @@ var __privateMethod = (obj, member, method) => {
|
|
|
36028
36028
|
};
|
|
36029
36029
|
function getExtendedPassedProps(passedProps) {
|
|
36030
36030
|
var plugins2 = passedProps.plugins || [];
|
|
36031
|
-
var pluginProps2 = plugins2.reduce(function(acc,
|
|
36032
|
-
var name2 =
|
|
36031
|
+
var pluginProps2 = plugins2.reduce(function(acc, plugin2) {
|
|
36032
|
+
var name2 = plugin2.name, defaultValue = plugin2.defaultValue;
|
|
36033
36033
|
if (name2) {
|
|
36034
36034
|
acc[name2] = passedProps[name2] !== void 0 ? passedProps[name2] : defaultValue;
|
|
36035
36035
|
}
|
|
@@ -36231,8 +36231,8 @@ var __privateMethod = (obj, member, method) => {
|
|
|
36231
36231
|
instance.popper = popper2;
|
|
36232
36232
|
reference2._tippy = instance;
|
|
36233
36233
|
popper2._tippy = instance;
|
|
36234
|
-
var pluginsHooks = plugins2.map(function(
|
|
36235
|
-
return
|
|
36234
|
+
var pluginsHooks = plugins2.map(function(plugin2) {
|
|
36235
|
+
return plugin2.fn(instance);
|
|
36236
36236
|
});
|
|
36237
36237
|
var hasAriaExpanded = reference2.hasAttribute("aria-expanded");
|
|
36238
36238
|
addListeners();
|
|
@@ -62767,7 +62767,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
62767
62767
|
);
|
|
62768
62768
|
}
|
|
62769
62769
|
};
|
|
62770
|
-
const search = /[#.]/g;
|
|
62770
|
+
const search$1 = /[#.]/g;
|
|
62771
62771
|
function parseSelector(selector2, defaultTagName) {
|
|
62772
62772
|
const value = selector2 || "";
|
|
62773
62773
|
const props = {};
|
|
@@ -62775,8 +62775,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
62775
62775
|
let previous2;
|
|
62776
62776
|
let tagName;
|
|
62777
62777
|
while (start2 < value.length) {
|
|
62778
|
-
search.lastIndex = start2;
|
|
62779
|
-
const match2 = search.exec(value);
|
|
62778
|
+
search$1.lastIndex = start2;
|
|
62779
|
+
const match2 = search$1.exec(value);
|
|
62780
62780
|
const subvalue = value.slice(start2, match2 ? match2.index : value.length);
|
|
62781
62781
|
if (subvalue) {
|
|
62782
62782
|
if (!previous2) {
|
|
@@ -71312,10 +71312,10 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
71312
71312
|
var t3 = angle / 180 * PI;
|
|
71313
71313
|
var x3 = 0;
|
|
71314
71314
|
var y3 = 0;
|
|
71315
|
-
var
|
|
71315
|
+
var cmd2 = parseSvgPath(path2);
|
|
71316
71316
|
var str = "";
|
|
71317
|
-
for (var i3 = 0; i3 <
|
|
71318
|
-
var cmdI =
|
|
71317
|
+
for (var i3 = 0; i3 < cmd2.length; i3++) {
|
|
71318
|
+
var cmdI = cmd2[i3];
|
|
71319
71319
|
var op2 = cmdI[0];
|
|
71320
71320
|
var x0 = x3;
|
|
71321
71321
|
var y0 = y3;
|
|
@@ -82354,7 +82354,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
82354
82354
|
return str;
|
|
82355
82355
|
};
|
|
82356
82356
|
exports4.readPaths = function(str, gd2, plotinfo, isActiveShape) {
|
|
82357
|
-
var
|
|
82357
|
+
var cmd2 = parseSvgPath(str);
|
|
82358
82358
|
var polys = [];
|
|
82359
82359
|
var n3 = -1;
|
|
82360
82360
|
var newPoly = function() {
|
|
@@ -82371,57 +82371,57 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
82371
82371
|
initY = y3;
|
|
82372
82372
|
};
|
|
82373
82373
|
recStart();
|
|
82374
|
-
for (var i3 = 0; i3 <
|
|
82374
|
+
for (var i3 = 0; i3 < cmd2.length; i3++) {
|
|
82375
82375
|
var newPos = [];
|
|
82376
82376
|
var x1, x22, y12, y22;
|
|
82377
|
-
var c3 =
|
|
82377
|
+
var c3 = cmd2[i3][0];
|
|
82378
82378
|
var w3 = c3;
|
|
82379
82379
|
switch (c3) {
|
|
82380
82380
|
case "M":
|
|
82381
82381
|
newPoly();
|
|
82382
|
-
x3 = +
|
|
82383
|
-
y3 = +
|
|
82382
|
+
x3 = +cmd2[i3][1];
|
|
82383
|
+
y3 = +cmd2[i3][2];
|
|
82384
82384
|
newPos.push([w3, x3, y3]);
|
|
82385
82385
|
recStart();
|
|
82386
82386
|
break;
|
|
82387
82387
|
case "Q":
|
|
82388
82388
|
case "S":
|
|
82389
|
-
x1 = +
|
|
82390
|
-
y12 = +
|
|
82391
|
-
x3 = +
|
|
82392
|
-
y3 = +
|
|
82389
|
+
x1 = +cmd2[i3][1];
|
|
82390
|
+
y12 = +cmd2[i3][2];
|
|
82391
|
+
x3 = +cmd2[i3][3];
|
|
82392
|
+
y3 = +cmd2[i3][4];
|
|
82393
82393
|
newPos.push([w3, x3, y3, x1, y12]);
|
|
82394
82394
|
break;
|
|
82395
82395
|
case "C":
|
|
82396
|
-
x1 = +
|
|
82397
|
-
y12 = +
|
|
82398
|
-
x22 = +
|
|
82399
|
-
y22 = +
|
|
82400
|
-
x3 = +
|
|
82401
|
-
y3 = +
|
|
82396
|
+
x1 = +cmd2[i3][1];
|
|
82397
|
+
y12 = +cmd2[i3][2];
|
|
82398
|
+
x22 = +cmd2[i3][3];
|
|
82399
|
+
y22 = +cmd2[i3][4];
|
|
82400
|
+
x3 = +cmd2[i3][5];
|
|
82401
|
+
y3 = +cmd2[i3][6];
|
|
82402
82402
|
newPos.push([w3, x3, y3, x1, y12, x22, y22]);
|
|
82403
82403
|
break;
|
|
82404
82404
|
case "T":
|
|
82405
82405
|
case "L":
|
|
82406
|
-
x3 = +
|
|
82407
|
-
y3 = +
|
|
82406
|
+
x3 = +cmd2[i3][1];
|
|
82407
|
+
y3 = +cmd2[i3][2];
|
|
82408
82408
|
newPos.push([w3, x3, y3]);
|
|
82409
82409
|
break;
|
|
82410
82410
|
case "H":
|
|
82411
82411
|
w3 = "L";
|
|
82412
|
-
x3 = +
|
|
82412
|
+
x3 = +cmd2[i3][1];
|
|
82413
82413
|
newPos.push([w3, x3, y3]);
|
|
82414
82414
|
break;
|
|
82415
82415
|
case "V":
|
|
82416
82416
|
w3 = "L";
|
|
82417
|
-
y3 = +
|
|
82417
|
+
y3 = +cmd2[i3][1];
|
|
82418
82418
|
newPos.push([w3, x3, y3]);
|
|
82419
82419
|
break;
|
|
82420
82420
|
case "A":
|
|
82421
82421
|
w3 = "L";
|
|
82422
|
-
var rx = +
|
|
82423
|
-
var ry2 = +
|
|
82424
|
-
if (!+
|
|
82422
|
+
var rx = +cmd2[i3][1];
|
|
82423
|
+
var ry2 = +cmd2[i3][2];
|
|
82424
|
+
if (!+cmd2[i3][4]) {
|
|
82425
82425
|
rx = -rx;
|
|
82426
82426
|
ry2 = -ry2;
|
|
82427
82427
|
}
|
|
@@ -83898,7 +83898,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
83898
83898
|
function draw(gd2, titleClass, options) {
|
|
83899
83899
|
var cont = options.propContainer;
|
|
83900
83900
|
var prop = options.propName;
|
|
83901
|
-
var
|
|
83901
|
+
var placeholder2 = options.placeholder;
|
|
83902
83902
|
var traceIndex = options.traceIndex;
|
|
83903
83903
|
var avoid = options.avoid || {};
|
|
83904
83904
|
var attributes2 = options.attributes;
|
|
@@ -83923,7 +83923,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
83923
83923
|
var editable2 = gd2._context.edits[editAttr];
|
|
83924
83924
|
if (txt === "")
|
|
83925
83925
|
opacity = 0;
|
|
83926
|
-
else if (txt.replace(numStripRE, " % ") ===
|
|
83926
|
+
else if (txt.replace(numStripRE, " % ") === placeholder2.replace(numStripRE, " % ")) {
|
|
83927
83927
|
opacity = 0.2;
|
|
83928
83928
|
isplaceholder = true;
|
|
83929
83929
|
if (!editable2)
|
|
@@ -84037,7 +84037,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
84037
84037
|
function setPlaceholder() {
|
|
84038
84038
|
opacity = 0;
|
|
84039
84039
|
isplaceholder = true;
|
|
84040
|
-
el2.text(
|
|
84040
|
+
el2.text(placeholder2).on("mouseover.opacity", function() {
|
|
84041
84041
|
d3.select(this).transition().duration(interactConstants.SHOW_PLACEHOLDER).style("opacity", 1);
|
|
84042
84042
|
}).on("mouseout.opacity", function() {
|
|
84043
84043
|
d3.select(this).transition().duration(interactConstants.HIDE_PLACEHOLDER).style("opacity", 0);
|
|
@@ -89182,7 +89182,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
89182
89182
|
gd2.undoQueue.sequence = false;
|
|
89183
89183
|
gd2.undoQueue.beginSequence = false;
|
|
89184
89184
|
};
|
|
89185
|
-
queue.undo = function
|
|
89185
|
+
queue.undo = function undo2(gd2) {
|
|
89186
89186
|
var queueObj, i3;
|
|
89187
89187
|
if (gd2.undoQueue === void 0 || isNaN(gd2.undoQueue.index) || gd2.undoQueue.index <= 0) {
|
|
89188
89188
|
return;
|
|
@@ -89196,7 +89196,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
89196
89196
|
gd2.undoQueue.inSequence = false;
|
|
89197
89197
|
gd2.autoplay = false;
|
|
89198
89198
|
};
|
|
89199
|
-
queue.redo = function
|
|
89199
|
+
queue.redo = function redo2(gd2) {
|
|
89200
89200
|
var queueObj, i3;
|
|
89201
89201
|
if (gd2.undoQueue === void 0 || isNaN(gd2.undoQueue.index) || gd2.undoQueue.index >= gd2.undoQueue.queue.length) {
|
|
89202
89202
|
return;
|
|
@@ -91765,9 +91765,9 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
91765
91765
|
}
|
|
91766
91766
|
return [newArray, remainder];
|
|
91767
91767
|
}
|
|
91768
|
-
var
|
|
91768
|
+
var undo2 = spliceTraces(gd2, update2, indices, maxPoints, updateArray);
|
|
91769
91769
|
var promise = exports4.redraw(gd2);
|
|
91770
|
-
var undoArgs = [gd2,
|
|
91770
|
+
var undoArgs = [gd2, undo2.update, indices, undo2.maxPoints];
|
|
91771
91771
|
Queue.add(gd2, exports4.prependTraces, undoArgs, extendTraces, arguments);
|
|
91772
91772
|
return promise;
|
|
91773
91773
|
}
|
|
@@ -91810,9 +91810,9 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
91810
91810
|
}
|
|
91811
91811
|
return [newArray, remainder];
|
|
91812
91812
|
}
|
|
91813
|
-
var
|
|
91813
|
+
var undo2 = spliceTraces(gd2, update2, indices, maxPoints, updateArray);
|
|
91814
91814
|
var promise = exports4.redraw(gd2);
|
|
91815
|
-
var undoArgs = [gd2,
|
|
91815
|
+
var undoArgs = [gd2, undo2.update, indices, undo2.maxPoints];
|
|
91816
91816
|
Queue.add(gd2, exports4.extendTraces, undoArgs, prependTraces, arguments);
|
|
91817
91817
|
return promise;
|
|
91818
91818
|
}
|
|
@@ -105095,14 +105095,14 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
105095
105095
|
}, "", 0);
|
|
105096
105096
|
return bindings;
|
|
105097
105097
|
}
|
|
105098
|
-
function crawl(attrs2, callback, path2,
|
|
105098
|
+
function crawl(attrs2, callback, path2, depth2) {
|
|
105099
105099
|
Object.keys(attrs2).forEach(function(attrName) {
|
|
105100
105100
|
var attr = attrs2[attrName];
|
|
105101
105101
|
if (attrName[0] === "_")
|
|
105102
105102
|
return;
|
|
105103
|
-
var thisPath = path2 + (
|
|
105103
|
+
var thisPath = path2 + (depth2 > 0 ? "." : "") + attrName;
|
|
105104
105104
|
if (Lib.isPlainObject(attr)) {
|
|
105105
|
-
crawl(attr, callback, thisPath,
|
|
105105
|
+
crawl(attr, callback, thisPath, depth2 + 1);
|
|
105106
105106
|
} else {
|
|
105107
105107
|
callback(thisPath, attrName, attr);
|
|
105108
105108
|
}
|
|
@@ -122017,8 +122017,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
122017
122017
|
module3.exports = function(a3) {
|
|
122018
122018
|
return minMax(a3, 0);
|
|
122019
122019
|
};
|
|
122020
|
-
function minMax(a3,
|
|
122021
|
-
if (!isArrayOrTypedArray(a3) ||
|
|
122020
|
+
function minMax(a3, depth2) {
|
|
122021
|
+
if (!isArrayOrTypedArray(a3) || depth2 >= 10) {
|
|
122022
122022
|
return null;
|
|
122023
122023
|
}
|
|
122024
122024
|
var min2 = Infinity;
|
|
@@ -122027,7 +122027,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
122027
122027
|
for (var i3 = 0; i3 < n3; i3++) {
|
|
122028
122028
|
var datum2 = a3[i3];
|
|
122029
122029
|
if (isArrayOrTypedArray(datum2)) {
|
|
122030
|
-
var result = minMax(datum2,
|
|
122030
|
+
var result = minMax(datum2, depth2 + 1);
|
|
122031
122031
|
if (result) {
|
|
122032
122032
|
min2 = Math.min(result[0], min2);
|
|
122033
122033
|
max2 = Math.max(result[1], max2);
|
|
@@ -131950,13 +131950,13 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
131950
131950
|
var minVisibleDepth = Infinity;
|
|
131951
131951
|
var maxVisibleDepth = -Infinity;
|
|
131952
131952
|
sliceData.forEach(function(pt2) {
|
|
131953
|
-
var
|
|
131954
|
-
if (
|
|
131953
|
+
var depth2 = pt2.depth;
|
|
131954
|
+
if (depth2 >= trace._maxDepth) {
|
|
131955
131955
|
pt2.x0 = pt2.x1 = (pt2.x0 + pt2.x1) / 2;
|
|
131956
131956
|
pt2.y0 = pt2.y1 = (pt2.y0 + pt2.y1) / 2;
|
|
131957
131957
|
} else {
|
|
131958
|
-
minVisibleDepth = Math.min(minVisibleDepth,
|
|
131959
|
-
maxVisibleDepth = Math.max(maxVisibleDepth,
|
|
131958
|
+
minVisibleDepth = Math.min(minVisibleDepth, depth2);
|
|
131959
|
+
maxVisibleDepth = Math.max(maxVisibleDepth, depth2);
|
|
131960
131960
|
}
|
|
131961
131961
|
});
|
|
131962
131962
|
slices = slices.data(sliceData, helpers.getPtId);
|
|
@@ -134136,11 +134136,11 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
134136
134136
|
var y3 = this.data._meshY[rawId];
|
|
134137
134137
|
var z3 = this.data._meshZ[rawId];
|
|
134138
134138
|
var height = this.data._Ys.length;
|
|
134139
|
-
var
|
|
134139
|
+
var depth2 = this.data._Zs.length;
|
|
134140
134140
|
var i3 = findNearestOnAxis(x3, this.data._Xs).id;
|
|
134141
134141
|
var j3 = findNearestOnAxis(y3, this.data._Ys).id;
|
|
134142
134142
|
var k3 = findNearestOnAxis(z3, this.data._Zs).id;
|
|
134143
|
-
var selectIndex = selection2.index = k3 +
|
|
134143
|
+
var selectIndex = selection2.index = k3 + depth2 * j3 + depth2 * height * i3;
|
|
134144
134144
|
selection2.traceCoordinate = [this.data._meshX[selectIndex], this.data._meshY[selectIndex], this.data._meshZ[selectIndex], this.data._value[selectIndex]];
|
|
134145
134145
|
var text2 = this.data.hovertext || this.data.text;
|
|
134146
134146
|
if (isArrayOrTypedArray(text2) && text2[selectIndex] !== void 0) {
|
|
@@ -134208,20 +134208,20 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
134208
134208
|
var Zs2 = data2._Zs;
|
|
134209
134209
|
var width = Xs2.length;
|
|
134210
134210
|
var height = Ys2.length;
|
|
134211
|
-
var
|
|
134211
|
+
var depth2 = Zs2.length;
|
|
134212
134212
|
var filled = GRID_TYPES.indexOf(data2._gridFill.replace(/-/g, "").replace(/\+/g, ""));
|
|
134213
134213
|
var getIndex = function(i3, j3, k3) {
|
|
134214
134214
|
switch (filled) {
|
|
134215
134215
|
case 5:
|
|
134216
|
-
return k3 +
|
|
134216
|
+
return k3 + depth2 * j3 + depth2 * height * i3;
|
|
134217
134217
|
case 4:
|
|
134218
|
-
return k3 +
|
|
134218
|
+
return k3 + depth2 * i3 + depth2 * width * j3;
|
|
134219
134219
|
case 3:
|
|
134220
|
-
return j3 + height * k3 + height *
|
|
134220
|
+
return j3 + height * k3 + height * depth2 * i3;
|
|
134221
134221
|
case 2:
|
|
134222
134222
|
return j3 + height * i3 + height * width * k3;
|
|
134223
134223
|
case 1:
|
|
134224
|
-
return i3 + width * k3 + width *
|
|
134224
|
+
return i3 + width * k3 + width * depth2 * j3;
|
|
134225
134225
|
default:
|
|
134226
134226
|
return i3 + width * j3 + width * height * k3;
|
|
134227
134227
|
}
|
|
@@ -134598,7 +134598,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
134598
134598
|
var n3 = 0;
|
|
134599
134599
|
for (var q3 = 0; q3 < items.length; q3++) {
|
|
134600
134600
|
var i3 = items[q3];
|
|
134601
|
-
for (var k3 = 1; k3 <
|
|
134601
|
+
for (var k3 = 1; k3 < depth2; k3++) {
|
|
134602
134602
|
for (var j3 = 1; j3 < height; j3++) {
|
|
134603
134603
|
result.push(begin2dCell(style2, getIndex(i3, j3 - 1, k3 - 1), getIndex(i3, j3 - 1, k3), getIndex(i3, j3, k3 - 1), getIndex(i3, j3, k3), min2, max2, (i3 + j3 + k3) % 2, previousResult && previousResult[n3] ? previousResult[n3] : []));
|
|
134604
134604
|
n3++;
|
|
@@ -134613,7 +134613,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
134613
134613
|
for (var q3 = 0; q3 < items.length; q3++) {
|
|
134614
134614
|
var j3 = items[q3];
|
|
134615
134615
|
for (var i3 = 1; i3 < width; i3++) {
|
|
134616
|
-
for (var k3 = 1; k3 <
|
|
134616
|
+
for (var k3 = 1; k3 < depth2; k3++) {
|
|
134617
134617
|
result.push(begin2dCell(style2, getIndex(i3 - 1, j3, k3 - 1), getIndex(i3, j3, k3 - 1), getIndex(i3 - 1, j3, k3), getIndex(i3, j3, k3), min2, max2, (i3 + j3 + k3) % 2, previousResult && previousResult[n3] ? previousResult[n3] : []));
|
|
134618
134618
|
n3++;
|
|
134619
134619
|
}
|
|
@@ -134636,7 +134636,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
134636
134636
|
return result;
|
|
134637
134637
|
}
|
|
134638
134638
|
function draw3d(style2, min2, max2) {
|
|
134639
|
-
for (var k3 = 1; k3 <
|
|
134639
|
+
for (var k3 = 1; k3 < depth2; k3++) {
|
|
134640
134640
|
for (var j3 = 1; j3 < height; j3++) {
|
|
134641
134641
|
for (var i3 = 1; i3 < width; i3++) {
|
|
134642
134642
|
begin3dCell(style2, getIndex(i3 - 1, j3 - 1, k3 - 1), getIndex(i3 - 1, j3 - 1, k3), getIndex(i3 - 1, j3, k3 - 1), getIndex(i3 - 1, j3, k3), getIndex(i3, j3 - 1, k3 - 1), getIndex(i3, j3 - 1, k3), getIndex(i3, j3, k3 - 1), getIndex(i3, j3, k3), min2, max2, (i3 + j3 + k3) % 2);
|
|
@@ -134659,7 +134659,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
134659
134659
|
var n3 = 0;
|
|
134660
134660
|
for (var q3 = 0; q3 < items.length; q3++) {
|
|
134661
134661
|
var i3 = items[q3];
|
|
134662
|
-
for (var k3 = 1; k3 <
|
|
134662
|
+
for (var k3 = 1; k3 < depth2; k3++) {
|
|
134663
134663
|
for (var j3 = 1; j3 < height; j3++) {
|
|
134664
134664
|
result.push(beginSection(style2, i3, j3, k3, min2, max2, distRatios[q3], previousResult && previousResult[n3] ? previousResult[n3] : []));
|
|
134665
134665
|
n3++;
|
|
@@ -134674,7 +134674,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
134674
134674
|
for (var q3 = 0; q3 < items.length; q3++) {
|
|
134675
134675
|
var j3 = items[q3];
|
|
134676
134676
|
for (var i3 = 1; i3 < width; i3++) {
|
|
134677
|
-
for (var k3 = 1; k3 <
|
|
134677
|
+
for (var k3 = 1; k3 < depth2; k3++) {
|
|
134678
134678
|
result.push(beginSection(style2, i3, j3, k3, min2, max2, distRatios[q3], previousResult && previousResult[n3] ? previousResult[n3] : []));
|
|
134679
134679
|
n3++;
|
|
134680
134680
|
}
|
|
@@ -134706,7 +134706,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
134706
134706
|
function insertGridPoints() {
|
|
134707
134707
|
for (var i3 = 0; i3 < width; i3++) {
|
|
134708
134708
|
for (var j3 = 0; j3 < height; j3++) {
|
|
134709
|
-
for (var k3 = 0; k3 <
|
|
134709
|
+
for (var k3 = 0; k3 < depth2; k3++) {
|
|
134710
134710
|
var index2 = getIndex(i3, j3, k3);
|
|
134711
134711
|
addVertex(data2._x[index2], data2._y[index2], data2._z[index2], data2._value[index2]);
|
|
134712
134712
|
}
|
|
@@ -134769,7 +134769,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
134769
134769
|
} else if (e3 === "y") {
|
|
134770
134770
|
exactIndices = createRange(1, height - 1);
|
|
134771
134771
|
} else {
|
|
134772
|
-
exactIndices = createRange(1,
|
|
134772
|
+
exactIndices = createRange(1, depth2 - 1);
|
|
134773
134773
|
}
|
|
134774
134774
|
}
|
|
134775
134775
|
if (ceilIndices.length > 0) {
|
|
@@ -134801,7 +134801,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
134801
134801
|
} else if (e3 === "y") {
|
|
134802
134802
|
preRes[count2] = draw2dY(activeStyle, [0, height - 1], activeMin, activeMax, preRes[count2]);
|
|
134803
134803
|
} else {
|
|
134804
|
-
preRes[count2] = draw2dZ(activeStyle, [0,
|
|
134804
|
+
preRes[count2] = draw2dZ(activeStyle, [0, depth2 - 1], activeMin, activeMax, preRes[count2]);
|
|
134805
134805
|
}
|
|
134806
134806
|
count2++;
|
|
134807
134807
|
}
|
|
@@ -138657,20 +138657,20 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
138657
138657
|
hiD: limits[1].slice(48, 64)
|
|
138658
138658
|
};
|
|
138659
138659
|
}
|
|
138660
|
-
function renderGLParcoords(
|
|
138661
|
-
var panelCount =
|
|
138660
|
+
function renderGLParcoords(panels2, setChanged, clearOnly) {
|
|
138661
|
+
var panelCount = panels2.length;
|
|
138662
138662
|
var i3;
|
|
138663
138663
|
var leftmost;
|
|
138664
138664
|
var rightmost;
|
|
138665
138665
|
var lowestX = Infinity;
|
|
138666
138666
|
var highestX = -Infinity;
|
|
138667
138667
|
for (i3 = 0; i3 < panelCount; i3++) {
|
|
138668
|
-
if (
|
|
138669
|
-
lowestX =
|
|
138668
|
+
if (panels2[i3].dim0.canvasX < lowestX) {
|
|
138669
|
+
lowestX = panels2[i3].dim0.canvasX;
|
|
138670
138670
|
leftmost = i3;
|
|
138671
138671
|
}
|
|
138672
|
-
if (
|
|
138673
|
-
highestX =
|
|
138672
|
+
if (panels2[i3].dim1.canvasX > highestX) {
|
|
138673
|
+
highestX = panels2[i3].dim1.canvasX;
|
|
138674
138674
|
rightmost = i3;
|
|
138675
138675
|
}
|
|
138676
138676
|
}
|
|
@@ -138679,7 +138679,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
138679
138679
|
}
|
|
138680
138680
|
var constraints = makeConstraints(isContext);
|
|
138681
138681
|
for (i3 = 0; i3 < panelCount; i3++) {
|
|
138682
|
-
var p3 =
|
|
138682
|
+
var p3 = panels2[i3];
|
|
138683
138683
|
var i02 = p3.dim0.crossfilterDimensionIndex;
|
|
138684
138684
|
var i12 = p3.dim1.crossfilterDimensionIndex;
|
|
138685
138685
|
var x3 = p3.canvasX;
|
|
@@ -139080,10 +139080,10 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
139080
139080
|
};
|
|
139081
139081
|
}
|
|
139082
139082
|
function updatePanelLayout(yAxis, vm2, plotGlPixelRatio) {
|
|
139083
|
-
var
|
|
139083
|
+
var panels2 = vm2.panels || (vm2.panels = []);
|
|
139084
139084
|
var data2 = yAxis.data();
|
|
139085
139085
|
for (var i3 = 0; i3 < data2.length - 1; i3++) {
|
|
139086
|
-
var p3 =
|
|
139086
|
+
var p3 = panels2[i3] || (panels2[i3] = {});
|
|
139087
139087
|
var dim0 = data2[i3];
|
|
139088
139088
|
var dim1 = data2[i3 + 1];
|
|
139089
139089
|
p3.dim0 = dim0;
|
|
@@ -155833,13 +155833,13 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
155833
155833
|
var minVisibleDepth = Infinity;
|
|
155834
155834
|
var maxVisibleDepth = -Infinity;
|
|
155835
155835
|
sliceData.forEach(function(pt2) {
|
|
155836
|
-
var
|
|
155837
|
-
if (
|
|
155836
|
+
var depth2 = pt2.depth;
|
|
155837
|
+
if (depth2 >= trace._maxDepth) {
|
|
155838
155838
|
pt2.x0 = pt2.x1 = (pt2.x0 + pt2.x1) / 2;
|
|
155839
155839
|
pt2.y0 = pt2.y1 = (pt2.y0 + pt2.y1) / 2;
|
|
155840
155840
|
} else {
|
|
155841
|
-
minVisibleDepth = Math.min(minVisibleDepth,
|
|
155842
|
-
maxVisibleDepth = Math.max(maxVisibleDepth,
|
|
155841
|
+
minVisibleDepth = Math.min(minVisibleDepth, depth2);
|
|
155842
|
+
maxVisibleDepth = Math.max(maxVisibleDepth, depth2);
|
|
155843
155843
|
}
|
|
155844
155844
|
});
|
|
155845
155845
|
slices = slices.data(sliceData, helpers.getPtId);
|
|
@@ -157435,11 +157435,11 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
157435
157435
|
var y3 = this.data._meshY[rawId];
|
|
157436
157436
|
var z3 = this.data._meshZ[rawId];
|
|
157437
157437
|
var height = this.data._Ys.length;
|
|
157438
|
-
var
|
|
157438
|
+
var depth2 = this.data._Zs.length;
|
|
157439
157439
|
var i3 = findNearestOnAxis(x3, this.data._Xs).id;
|
|
157440
157440
|
var j3 = findNearestOnAxis(y3, this.data._Ys).id;
|
|
157441
157441
|
var k3 = findNearestOnAxis(z3, this.data._Zs).id;
|
|
157442
|
-
var selectIndex = selection2.index = k3 +
|
|
157442
|
+
var selectIndex = selection2.index = k3 + depth2 * j3 + depth2 * height * i3;
|
|
157443
157443
|
selection2.traceCoordinate = [this.data._meshX[selectIndex], this.data._meshY[selectIndex], this.data._meshZ[selectIndex], this.data._value[selectIndex]];
|
|
157444
157444
|
var text2 = this.data.hovertext || this.data.text;
|
|
157445
157445
|
if (isArrayOrTypedArray(text2) && text2[selectIndex] !== void 0) {
|
|
@@ -190996,17 +190996,17 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
190996
190996
|
var columnsLength = columns.length;
|
|
190997
190997
|
columns.forEach(function(nodes2) {
|
|
190998
190998
|
var n10 = nodes2.length;
|
|
190999
|
-
var
|
|
190999
|
+
var depth2 = nodes2[0].depth;
|
|
191000
191000
|
nodes2.forEach(function(node2) {
|
|
191001
191001
|
var nodeHeight;
|
|
191002
191002
|
if (node2.sourceLinks.length || node2.targetLinks.length) {
|
|
191003
191003
|
if (node2.partOfCycle && numberOfNonSelfLinkingCycles(node2, id4) > 0)
|
|
191004
191004
|
;
|
|
191005
|
-
else if (
|
|
191005
|
+
else if (depth2 == 0 && n10 == 1) {
|
|
191006
191006
|
nodeHeight = node2.y1 - node2.y0;
|
|
191007
191007
|
node2.y0 = y12 / 2 - nodeHeight / 2;
|
|
191008
191008
|
node2.y1 = y12 / 2 + nodeHeight / 2;
|
|
191009
|
-
} else if (
|
|
191009
|
+
} else if (depth2 == columnsLength - 1 && n10 == 1) {
|
|
191010
191010
|
nodeHeight = node2.y1 - node2.y0;
|
|
191011
191011
|
node2.y0 = y12 / 2 - nodeHeight / 2;
|
|
191012
191012
|
node2.y1 = y12 / 2 + nodeHeight / 2;
|
|
@@ -192381,10 +192381,10 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
192381
192381
|
}
|
|
192382
192382
|
d3.nest = function() {
|
|
192383
192383
|
var nest = {}, keys2 = [], sortKeys = [], sortValues, rollup;
|
|
192384
|
-
function map2(mapType, array2,
|
|
192385
|
-
if (
|
|
192384
|
+
function map2(mapType, array2, depth2) {
|
|
192385
|
+
if (depth2 >= keys2.length)
|
|
192386
192386
|
return rollup ? rollup.call(nest, array2) : sortValues ? array2.sort(sortValues) : array2;
|
|
192387
|
-
var i3 = -1, n3 = array2.length, key = keys2[
|
|
192387
|
+
var i3 = -1, n3 = array2.length, key = keys2[depth2++], keyValue, object, setter, valuesByKey = new d3_Map(), values2;
|
|
192388
192388
|
while (++i3 < n3) {
|
|
192389
192389
|
if (values2 = valuesByKey.get(keyValue = key(object = array2[i3]))) {
|
|
192390
192390
|
values2.push(object);
|
|
@@ -192395,25 +192395,25 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
192395
192395
|
if (mapType) {
|
|
192396
192396
|
object = mapType();
|
|
192397
192397
|
setter = function(keyValue2, values3) {
|
|
192398
|
-
object.set(keyValue2, map2(mapType, values3,
|
|
192398
|
+
object.set(keyValue2, map2(mapType, values3, depth2));
|
|
192399
192399
|
};
|
|
192400
192400
|
} else {
|
|
192401
192401
|
object = {};
|
|
192402
192402
|
setter = function(keyValue2, values3) {
|
|
192403
|
-
object[keyValue2] = map2(mapType, values3,
|
|
192403
|
+
object[keyValue2] = map2(mapType, values3, depth2);
|
|
192404
192404
|
};
|
|
192405
192405
|
}
|
|
192406
192406
|
valuesByKey.forEach(setter);
|
|
192407
192407
|
return object;
|
|
192408
192408
|
}
|
|
192409
|
-
function entries(map3,
|
|
192410
|
-
if (
|
|
192409
|
+
function entries(map3, depth2) {
|
|
192410
|
+
if (depth2 >= keys2.length)
|
|
192411
192411
|
return map3;
|
|
192412
|
-
var array2 = [], sortKey = sortKeys[
|
|
192412
|
+
var array2 = [], sortKey = sortKeys[depth2++];
|
|
192413
192413
|
map3.forEach(function(key, keyMap) {
|
|
192414
192414
|
array2.push({
|
|
192415
192415
|
key,
|
|
192416
|
-
values: entries(keyMap,
|
|
192416
|
+
values: entries(keyMap, depth2)
|
|
192417
192417
|
});
|
|
192418
192418
|
});
|
|
192419
192419
|
return sortKey ? array2.sort(function(a3, b3) {
|
|
@@ -196431,18 +196431,18 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
196431
196431
|
}
|
|
196432
196432
|
}
|
|
196433
196433
|
}
|
|
196434
|
-
function
|
|
196434
|
+
function depth2(node2) {
|
|
196435
196435
|
var children2 = node2.children, d10 = 0;
|
|
196436
196436
|
if (children2 && (n3 = children2.length)) {
|
|
196437
196437
|
var i3 = -1, n3;
|
|
196438
196438
|
while (++i3 < n3)
|
|
196439
|
-
d10 = Math.max(d10,
|
|
196439
|
+
d10 = Math.max(d10, depth2(children2[i3]));
|
|
196440
196440
|
}
|
|
196441
196441
|
return 1 + d10;
|
|
196442
196442
|
}
|
|
196443
196443
|
function partition(d10, i3) {
|
|
196444
196444
|
var nodes = hierarchy2.call(this, d10, i3);
|
|
196445
|
-
position2(nodes[0], 0, size2[0], size2[1] /
|
|
196445
|
+
position2(nodes[0], 0, size2[0], size2[1] / depth2(nodes[0]));
|
|
196446
196446
|
return nodes;
|
|
196447
196447
|
}
|
|
196448
196448
|
partition.size = function(x3) {
|
|
@@ -210726,12 +210726,12 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
210726
210726
|
});
|
|
210727
210727
|
}
|
|
210728
210728
|
};
|
|
210729
|
-
var
|
|
210729
|
+
var plugin2 = {
|
|
210730
210730
|
applyArabicShaping: null,
|
|
210731
210731
|
processBidirectionalText: null,
|
|
210732
210732
|
processStyledBidirectionalText: null,
|
|
210733
210733
|
isLoaded: function isLoaded() {
|
|
210734
|
-
return pluginStatus === status2.loaded ||
|
|
210734
|
+
return pluginStatus === status2.loaded || plugin2.applyArabicShaping != null;
|
|
210735
210735
|
},
|
|
210736
210736
|
isLoading: function isLoading() {
|
|
210737
210737
|
return pluginStatus === status2.loading;
|
|
@@ -210741,14 +210741,14 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
210741
210741
|
pluginURL = state.pluginURL;
|
|
210742
210742
|
},
|
|
210743
210743
|
isParsed: function isParsed() {
|
|
210744
|
-
return
|
|
210744
|
+
return plugin2.applyArabicShaping != null && plugin2.processBidirectionalText != null && plugin2.processStyledBidirectionalText != null;
|
|
210745
210745
|
},
|
|
210746
210746
|
getPluginURL: function getPluginURL() {
|
|
210747
210747
|
return pluginURL;
|
|
210748
210748
|
}
|
|
210749
210749
|
};
|
|
210750
210750
|
var lazyLoadRTLTextPlugin = function() {
|
|
210751
|
-
if (!
|
|
210751
|
+
if (!plugin2.isLoading() && !plugin2.isLoaded() && getRTLTextPluginStatus() === "deferred") {
|
|
210752
210752
|
downloadRTLTextPlugin();
|
|
210753
210753
|
}
|
|
210754
210754
|
};
|
|
@@ -210767,7 +210767,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
210767
210767
|
}
|
|
210768
210768
|
};
|
|
210769
210769
|
EvaluationParameters.prototype.isSupportedScript = function isSupportedScript(str) {
|
|
210770
|
-
return isStringInSupportedScript(str,
|
|
210770
|
+
return isStringInSupportedScript(str, plugin2.isLoaded());
|
|
210771
210771
|
};
|
|
210772
210772
|
EvaluationParameters.prototype.crossFadingFactor = function crossFadingFactor() {
|
|
210773
210773
|
if (this.fadeDuration === 0) {
|
|
@@ -215562,30 +215562,30 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
215562
215562
|
VectorTileFeature.prototype.loadGeometry = function() {
|
|
215563
215563
|
var pbf2 = this._pbf;
|
|
215564
215564
|
pbf2.pos = this._geometry;
|
|
215565
|
-
var end2 = pbf2.readVarint() + pbf2.pos,
|
|
215565
|
+
var end2 = pbf2.readVarint() + pbf2.pos, cmd2 = 1, length = 0, x3 = 0, y3 = 0, lines = [], line;
|
|
215566
215566
|
while (pbf2.pos < end2) {
|
|
215567
215567
|
if (length <= 0) {
|
|
215568
215568
|
var cmdLen = pbf2.readVarint();
|
|
215569
|
-
|
|
215569
|
+
cmd2 = cmdLen & 7;
|
|
215570
215570
|
length = cmdLen >> 3;
|
|
215571
215571
|
}
|
|
215572
215572
|
length--;
|
|
215573
|
-
if (
|
|
215573
|
+
if (cmd2 === 1 || cmd2 === 2) {
|
|
215574
215574
|
x3 += pbf2.readSVarint();
|
|
215575
215575
|
y3 += pbf2.readSVarint();
|
|
215576
|
-
if (
|
|
215576
|
+
if (cmd2 === 1) {
|
|
215577
215577
|
if (line) {
|
|
215578
215578
|
lines.push(line);
|
|
215579
215579
|
}
|
|
215580
215580
|
line = [];
|
|
215581
215581
|
}
|
|
215582
215582
|
line.push(new pointGeometry(x3, y3));
|
|
215583
|
-
} else if (
|
|
215583
|
+
} else if (cmd2 === 7) {
|
|
215584
215584
|
if (line) {
|
|
215585
215585
|
line.push(line[0].clone());
|
|
215586
215586
|
}
|
|
215587
215587
|
} else {
|
|
215588
|
-
throw new Error("unknown command " +
|
|
215588
|
+
throw new Error("unknown command " + cmd2);
|
|
215589
215589
|
}
|
|
215590
215590
|
}
|
|
215591
215591
|
if (line) {
|
|
@@ -215596,15 +215596,15 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
215596
215596
|
VectorTileFeature.prototype.bbox = function() {
|
|
215597
215597
|
var pbf2 = this._pbf;
|
|
215598
215598
|
pbf2.pos = this._geometry;
|
|
215599
|
-
var end2 = pbf2.readVarint() + pbf2.pos,
|
|
215599
|
+
var end2 = pbf2.readVarint() + pbf2.pos, cmd2 = 1, length = 0, x3 = 0, y3 = 0, x1 = Infinity, x22 = -Infinity, y12 = Infinity, y22 = -Infinity;
|
|
215600
215600
|
while (pbf2.pos < end2) {
|
|
215601
215601
|
if (length <= 0) {
|
|
215602
215602
|
var cmdLen = pbf2.readVarint();
|
|
215603
|
-
|
|
215603
|
+
cmd2 = cmdLen & 7;
|
|
215604
215604
|
length = cmdLen >> 3;
|
|
215605
215605
|
}
|
|
215606
215606
|
length--;
|
|
215607
|
-
if (
|
|
215607
|
+
if (cmd2 === 1 || cmd2 === 2) {
|
|
215608
215608
|
x3 += pbf2.readSVarint();
|
|
215609
215609
|
y3 += pbf2.readSVarint();
|
|
215610
215610
|
if (x3 < x1) {
|
|
@@ -215619,8 +215619,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
215619
215619
|
if (y3 > y22) {
|
|
215620
215620
|
y22 = y3;
|
|
215621
215621
|
}
|
|
215622
|
-
} else if (
|
|
215623
|
-
throw new Error("unknown command " +
|
|
215622
|
+
} else if (cmd2 !== 7) {
|
|
215623
|
+
throw new Error("unknown command " + cmd2);
|
|
215624
215624
|
}
|
|
215625
215625
|
}
|
|
215626
215626
|
return [
|
|
@@ -216969,8 +216969,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
216969
216969
|
} else if (transform === "lowercase") {
|
|
216970
216970
|
text2 = text2.toLocaleLowerCase();
|
|
216971
216971
|
}
|
|
216972
|
-
if (
|
|
216973
|
-
text2 =
|
|
216972
|
+
if (plugin2.applyArabicShaping) {
|
|
216973
|
+
text2 = plugin2.applyArabicShaping(text2);
|
|
216974
216974
|
}
|
|
216975
216975
|
return text2;
|
|
216976
216976
|
}
|
|
@@ -218345,8 +218345,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
218345
218345
|
logicalInput.verticalizePunctuation();
|
|
218346
218346
|
}
|
|
218347
218347
|
var lines;
|
|
218348
|
-
var processBidirectionalText =
|
|
218349
|
-
var processStyledBidirectionalText =
|
|
218348
|
+
var processBidirectionalText = plugin2.processBidirectionalText;
|
|
218349
|
+
var processStyledBidirectionalText = plugin2.processStyledBidirectionalText;
|
|
218350
218350
|
if (processBidirectionalText && logicalInput.sections.length === 1) {
|
|
218351
218351
|
lines = [];
|
|
218352
218352
|
var untaggedLines = processBidirectionalText(logicalInput.toString(), determineLineBreaks(logicalInput, spacing, maxWidth, glyphMap, imagePositions, symbolPlacement, layoutTextSize));
|
|
@@ -220179,7 +220179,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
220179
220179
|
if (containsRTLText(formattedText)) {
|
|
220180
220180
|
this.hasRTLText = true;
|
|
220181
220181
|
}
|
|
220182
|
-
if (!this.hasRTLText || getRTLTextPluginStatus() === "unavailable" || this.hasRTLText &&
|
|
220182
|
+
if (!this.hasRTLText || getRTLTextPluginStatus() === "unavailable" || this.hasRTLText && plugin2.isParsed()) {
|
|
220183
220183
|
text2 = transformText$1(formattedText, layer3, evaluationFeature);
|
|
220184
220184
|
}
|
|
220185
220185
|
}
|
|
@@ -222441,7 +222441,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
222441
222441
|
exports4.performSymbolLayout = performSymbolLayout;
|
|
222442
222442
|
exports4.perspective = perspective;
|
|
222443
222443
|
exports4.pick = pick;
|
|
222444
|
-
exports4.plugin =
|
|
222444
|
+
exports4.plugin = plugin2;
|
|
222445
222445
|
exports4.polygonIntersectsPolygon = polygonIntersectsPolygon;
|
|
222446
222446
|
exports4.postMapLoadEvent = postMapLoadEvent;
|
|
222447
222447
|
exports4.postTurnstileEvent = postTurnstileEvent;
|
|
@@ -223177,8 +223177,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
223177
223177
|
pbf.writeVarint(valueIndex);
|
|
223178
223178
|
}
|
|
223179
223179
|
}
|
|
223180
|
-
function command2(
|
|
223181
|
-
return (length << 3) + (
|
|
223180
|
+
function command2(cmd2, length) {
|
|
223181
|
+
return (length << 3) + (cmd2 & 7);
|
|
223182
223182
|
}
|
|
223183
223183
|
function zigzag(num) {
|
|
223184
223184
|
return num << 1 ^ num >> 31;
|
|
@@ -223232,14 +223232,14 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
223232
223232
|
vtPbf.fromVectorTileJs = fromVectorTileJs_1;
|
|
223233
223233
|
vtPbf.fromGeojsonVt = fromGeojsonVt_1;
|
|
223234
223234
|
vtPbf.GeoJSONWrapper = GeoJSONWrapper_1;
|
|
223235
|
-
function sortKD(ids, coords, nodeSize2, left2, right2,
|
|
223235
|
+
function sortKD(ids, coords, nodeSize2, left2, right2, depth2) {
|
|
223236
223236
|
if (right2 - left2 <= nodeSize2) {
|
|
223237
223237
|
return;
|
|
223238
223238
|
}
|
|
223239
223239
|
var m3 = left2 + right2 >> 1;
|
|
223240
|
-
select(ids, coords, m3, left2, right2,
|
|
223241
|
-
sortKD(ids, coords, nodeSize2, left2, m3 - 1,
|
|
223242
|
-
sortKD(ids, coords, nodeSize2, m3 + 1, right2,
|
|
223240
|
+
select(ids, coords, m3, left2, right2, depth2 % 2);
|
|
223241
|
+
sortKD(ids, coords, nodeSize2, left2, m3 - 1, depth2 + 1);
|
|
223242
|
+
sortKD(ids, coords, nodeSize2, m3 + 1, right2, depth2 + 1);
|
|
223243
223243
|
}
|
|
223244
223244
|
function select(ids, coords, k3, left2, right2, inc) {
|
|
223245
223245
|
while (right2 > left2) {
|
|
@@ -228511,7 +228511,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
228511
228511
|
};
|
|
228512
228512
|
Context2.prototype.clear = function clear(ref) {
|
|
228513
228513
|
var color2 = ref.color;
|
|
228514
|
-
var
|
|
228514
|
+
var depth2 = ref.depth;
|
|
228515
228515
|
var gl2 = this.gl;
|
|
228516
228516
|
var mask = 0;
|
|
228517
228517
|
if (color2) {
|
|
@@ -228524,13 +228524,13 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
228524
228524
|
true
|
|
228525
228525
|
]);
|
|
228526
228526
|
}
|
|
228527
|
-
if (typeof
|
|
228527
|
+
if (typeof depth2 !== "undefined") {
|
|
228528
228528
|
mask |= gl2.DEPTH_BUFFER_BIT;
|
|
228529
228529
|
this.depthRange.set([
|
|
228530
228530
|
0,
|
|
228531
228531
|
1
|
|
228532
228532
|
]);
|
|
228533
|
-
this.clearDepth.set(
|
|
228533
|
+
this.clearDepth.set(depth2);
|
|
228534
228534
|
this.depthMask.set(true);
|
|
228535
228535
|
}
|
|
228536
228536
|
gl2.clear(mask);
|
|
@@ -234880,10 +234880,10 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
234880
234880
|
if (!this.opaquePassEnabledForLayer()) {
|
|
234881
234881
|
return DepthMode.disabled;
|
|
234882
234882
|
}
|
|
234883
|
-
var
|
|
234883
|
+
var depth2 = 1 - ((1 + this.currentLayer) * this.numSublayers + n3) * this.depthEpsilon;
|
|
234884
234884
|
return new DepthMode(func || this.context.gl.LEQUAL, mask, [
|
|
234885
|
-
|
|
234886
|
-
|
|
234885
|
+
depth2,
|
|
234886
|
+
depth2
|
|
234887
234887
|
]);
|
|
234888
234888
|
};
|
|
234889
234889
|
Painter.prototype.opaquePassEnabledForLayer = function opaquePassEnabledForLayer() {
|
|
@@ -236396,9 +236396,9 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
236396
236396
|
MapEventHandler.prototype.touchcancel = function touchcancel(e3) {
|
|
236397
236397
|
this._map.fire(new MapTouchEvent(e3.type, this._map, e3));
|
|
236398
236398
|
};
|
|
236399
|
-
MapEventHandler.prototype._firePreventable = function _firePreventable(
|
|
236400
|
-
this._map.fire(
|
|
236401
|
-
if (
|
|
236399
|
+
MapEventHandler.prototype._firePreventable = function _firePreventable(mapEvent2) {
|
|
236400
|
+
this._map.fire(mapEvent2);
|
|
236401
|
+
if (mapEvent2.defaultPrevented) {
|
|
236402
236402
|
return {};
|
|
236403
236403
|
}
|
|
236404
236404
|
};
|
|
@@ -248417,13 +248417,13 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
248417
248417
|
var src_map = map2;
|
|
248418
248418
|
function nest() {
|
|
248419
248419
|
var keys2 = [], sortKeys = [], sortValues, rollup, nest2;
|
|
248420
|
-
function apply(array2,
|
|
248421
|
-
if (
|
|
248420
|
+
function apply(array2, depth2, createResult, setResult) {
|
|
248421
|
+
if (depth2 >= keys2.length) {
|
|
248422
248422
|
if (sortValues != null)
|
|
248423
248423
|
array2.sort(sortValues);
|
|
248424
248424
|
return rollup != null ? rollup(array2) : array2;
|
|
248425
248425
|
}
|
|
248426
|
-
var i3 = -1, n3 = array2.length, key = keys2[
|
|
248426
|
+
var i3 = -1, n3 = array2.length, key = keys2[depth2++], keyValue, value, valuesByKey = src_map(), values2, result = createResult();
|
|
248427
248427
|
while (++i3 < n3) {
|
|
248428
248428
|
if (values2 = valuesByKey.get(keyValue = key(value = array2[i3]) + "")) {
|
|
248429
248429
|
values2.push(value);
|
|
@@ -248432,19 +248432,19 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
248432
248432
|
}
|
|
248433
248433
|
}
|
|
248434
248434
|
valuesByKey.each(function(values3, key2) {
|
|
248435
|
-
setResult(result, key2, apply(values3,
|
|
248435
|
+
setResult(result, key2, apply(values3, depth2, createResult, setResult));
|
|
248436
248436
|
});
|
|
248437
248437
|
return result;
|
|
248438
248438
|
}
|
|
248439
|
-
function entries(map3,
|
|
248440
|
-
if (++
|
|
248439
|
+
function entries(map3, depth2) {
|
|
248440
|
+
if (++depth2 > keys2.length)
|
|
248441
248441
|
return map3;
|
|
248442
|
-
var array2, sortKey = sortKeys[
|
|
248443
|
-
if (rollup != null &&
|
|
248442
|
+
var array2, sortKey = sortKeys[depth2 - 1];
|
|
248443
|
+
if (rollup != null && depth2 >= keys2.length)
|
|
248444
248444
|
array2 = map3.entries();
|
|
248445
248445
|
else
|
|
248446
248446
|
array2 = [], map3.each(function(v3, k3) {
|
|
248447
|
-
array2.push({ key: k3, values: entries(v3,
|
|
248447
|
+
array2.push({ key: k3, values: entries(v3, depth2) });
|
|
248448
248448
|
});
|
|
248449
248449
|
return sortKey != null ? array2.sort(function(a3, b3) {
|
|
248450
248450
|
return sortKey(a3.key, b3.key);
|
|
@@ -251809,7 +251809,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
251809
251809
|
};
|
|
251810
251810
|
return projection.scale(180.739);
|
|
251811
251811
|
}
|
|
251812
|
-
function adsimp(f3, a3, b3, fa2, fm2, fb2, V0, tol, maxdepth,
|
|
251812
|
+
function adsimp(f3, a3, b3, fa2, fm2, fb2, V0, tol, maxdepth, depth2, state) {
|
|
251813
251813
|
if (state.nanEncountered) {
|
|
251814
251814
|
return NaN;
|
|
251815
251815
|
}
|
|
@@ -251829,19 +251829,19 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
251829
251829
|
sr2 = h3 * (fm2 + 4 * f22 + fb2) / 12;
|
|
251830
251830
|
s22 = sl2 + sr2;
|
|
251831
251831
|
err = (s22 - V0) / 15;
|
|
251832
|
-
if (
|
|
251832
|
+
if (depth2 > maxdepth) {
|
|
251833
251833
|
state.maxDepthCount++;
|
|
251834
251834
|
return s22 + err;
|
|
251835
251835
|
} else if (Math.abs(err) < tol) {
|
|
251836
251836
|
return s22 + err;
|
|
251837
251837
|
} else {
|
|
251838
251838
|
m3 = a3 + h3 * 0.5;
|
|
251839
|
-
V12 = adsimp(f3, a3, m3, fa2, f12, fm2, sl2, tol * 0.5, maxdepth,
|
|
251839
|
+
V12 = adsimp(f3, a3, m3, fa2, f12, fm2, sl2, tol * 0.5, maxdepth, depth2 + 1, state);
|
|
251840
251840
|
if (isNaN(V12)) {
|
|
251841
251841
|
state.nanEncountered = true;
|
|
251842
251842
|
return NaN;
|
|
251843
251843
|
}
|
|
251844
|
-
V22 = adsimp(f3, m3, b3, fm2, f22, fb2, sr2, tol * 0.5, maxdepth,
|
|
251844
|
+
V22 = adsimp(f3, m3, b3, fm2, f22, fb2, sr2, tol * 0.5, maxdepth, depth2 + 1, state);
|
|
251845
251845
|
if (isNaN(V22)) {
|
|
251846
251846
|
state.nanEncountered = true;
|
|
251847
251847
|
return NaN;
|
|
@@ -256291,14 +256291,14 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
256291
256291
|
});
|
|
256292
256292
|
}
|
|
256293
256293
|
function resample_resample(project, delta2) {
|
|
256294
|
-
function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y12, lambda1, a12, b12, c12,
|
|
256294
|
+
function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y12, lambda1, a12, b12, c12, depth2, stream) {
|
|
256295
256295
|
var dx = x1 - x0, dy2 = y12 - y0, d22 = dx * dx + dy2 * dy2;
|
|
256296
|
-
if (d22 > 4 * delta2 &&
|
|
256296
|
+
if (d22 > 4 * delta2 && depth2--) {
|
|
256297
256297
|
var a3 = a0 + a12, b3 = b0 + b12, c3 = c0 + c12, m3 = (0, math._b)(a3 * a3 + b3 * b3 + c3 * c3), phi2 = (0, math.ZR)(c3 /= m3), lambda2 = (0, math.Wn)((0, math.Wn)(c3) - 1) < math.Ho || (0, math.Wn)(lambda0 - lambda1) < math.Ho ? (lambda0 + lambda1) / 2 : (0, math.fv)(b3, a3), p3 = project(lambda2, phi2), x22 = p3[0], y22 = p3[1], dx2 = x22 - x0, dy22 = y22 - y0, dz2 = dy2 * dx2 - dx * dy22;
|
|
256298
256298
|
if (dz2 * dz2 / d22 > delta2 || (0, math.Wn)((dx * dx2 + dy2 * dy22) / d22 - 0.5) > 0.3 || a0 * a12 + b0 * b12 + c0 * c12 < cosMinDistance) {
|
|
256299
|
-
resampleLineTo(x0, y0, lambda0, a0, b0, c0, x22, y22, lambda2, a3 /= m3, b3 /= m3, c3,
|
|
256299
|
+
resampleLineTo(x0, y0, lambda0, a0, b0, c0, x22, y22, lambda2, a3 /= m3, b3 /= m3, c3, depth2, stream);
|
|
256300
256300
|
stream.point(x22, y22);
|
|
256301
|
-
resampleLineTo(x22, y22, lambda2, a3, b3, c3, x1, y12, lambda1, a12, b12, c12,
|
|
256301
|
+
resampleLineTo(x22, y22, lambda2, a3, b3, c3, x1, y12, lambda1, a12, b12, c12, depth2, stream);
|
|
256302
256302
|
}
|
|
256303
256303
|
}
|
|
256304
256304
|
}
|
|
@@ -260448,9 +260448,9 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
260448
260448
|
defineProperty2(this, "__redo__", d3("c", [index2]));
|
|
260449
260449
|
return;
|
|
260450
260450
|
}
|
|
260451
|
-
this.__redo__.forEach(function(
|
|
260452
|
-
if (
|
|
260453
|
-
this.__redo__[i3] = ++
|
|
260451
|
+
this.__redo__.forEach(function(redo2, i3) {
|
|
260452
|
+
if (redo2 >= index2)
|
|
260453
|
+
this.__redo__[i3] = ++redo2;
|
|
260454
260454
|
}, this);
|
|
260455
260455
|
this.__redo__.push(index2);
|
|
260456
260456
|
}),
|
|
@@ -260464,9 +260464,9 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
260464
260464
|
i3 = this.__redo__.indexOf(index2);
|
|
260465
260465
|
if (i3 !== -1)
|
|
260466
260466
|
this.__redo__.splice(i3, 1);
|
|
260467
|
-
this.__redo__.forEach(function(
|
|
260468
|
-
if (
|
|
260469
|
-
this.__redo__[j3] = --
|
|
260467
|
+
this.__redo__.forEach(function(redo2, j3) {
|
|
260468
|
+
if (redo2 > index2)
|
|
260469
|
+
this.__redo__[j3] = --redo2;
|
|
260470
260470
|
}, this);
|
|
260471
260471
|
}),
|
|
260472
260472
|
_onClear: d3(function() {
|
|
@@ -263149,7 +263149,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
263149
263149
|
var atlas = this.fontAtlas[i$3] || this.fontAtlas[0];
|
|
263150
263150
|
for (var j$22 = 0; j$22 < count$12; j$22++) {
|
|
263151
263151
|
var char = this.text.charAt(ptr$1);
|
|
263152
|
-
var
|
|
263152
|
+
var prevChar2 = this.text.charAt(ptr$1 - 1);
|
|
263153
263153
|
charIds[ptr$1] = atlas.ids[char];
|
|
263154
263154
|
sizeData[ptr$1 * 2] = font.width[char];
|
|
263155
263155
|
if (j$22) {
|
|
@@ -263158,7 +263158,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
263158
263158
|
var prevOffset = sizeData[ptr$1 * 2 - 1];
|
|
263159
263159
|
var offset2 = prevOffset + prevWidth * 0.5 + currWidth * 0.5;
|
|
263160
263160
|
if (this.kerning) {
|
|
263161
|
-
var kerning$1 = font.kerning[
|
|
263161
|
+
var kerning$1 = font.kerning[prevChar2 + char];
|
|
263162
263162
|
if (kerning$1) {
|
|
263163
263163
|
offset2 += kerning$1 * 1e-3;
|
|
263164
263164
|
}
|
|
@@ -287198,11 +287198,11 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
287198
287198
|
}
|
|
287199
287199
|
var plugins = {};
|
|
287200
287200
|
function getPlugin(pluginKey) {
|
|
287201
|
-
const
|
|
287202
|
-
if (!
|
|
287201
|
+
const plugin2 = plugins[pluginKey];
|
|
287202
|
+
if (!plugin2) {
|
|
287203
287203
|
die(0, pluginKey);
|
|
287204
287204
|
}
|
|
287205
|
-
return
|
|
287205
|
+
return plugin2;
|
|
287206
287206
|
}
|
|
287207
287207
|
var currentScope;
|
|
287208
287208
|
function getCurrentScope() {
|
|
@@ -287991,10 +287991,10 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
287991
287991
|
var fullname = namespace(name2);
|
|
287992
287992
|
return (fullname.local ? creatorFixed : creatorInherit)(fullname);
|
|
287993
287993
|
}
|
|
287994
|
-
function none$
|
|
287994
|
+
function none$4() {
|
|
287995
287995
|
}
|
|
287996
287996
|
function selector(selector2) {
|
|
287997
|
-
return selector2 == null ? none$
|
|
287997
|
+
return selector2 == null ? none$4 : function() {
|
|
287998
287998
|
return this.querySelector(selector2);
|
|
287999
287999
|
};
|
|
288000
288000
|
}
|
|
@@ -288044,7 +288044,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
288044
288044
|
}
|
|
288045
288045
|
return new Selection$1(subgroups, parents);
|
|
288046
288046
|
}
|
|
288047
|
-
function matcher(selector2) {
|
|
288047
|
+
function matcher$1(selector2) {
|
|
288048
288048
|
return function() {
|
|
288049
288049
|
return this.matches(selector2);
|
|
288050
288050
|
};
|
|
@@ -288080,7 +288080,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
288080
288080
|
}
|
|
288081
288081
|
function selection_filter(match2) {
|
|
288082
288082
|
if (typeof match2 !== "function")
|
|
288083
|
-
match2 = matcher(match2);
|
|
288083
|
+
match2 = matcher$1(match2);
|
|
288084
288084
|
for (var groups = this._groups, m3 = groups.length, subgroups = new Array(m3), j3 = 0; j3 < m3; ++j3) {
|
|
288085
288085
|
for (var group = groups[j3], n3 = group.length, subgroup = subgroups[j3] = [], node2, i3 = 0; i3 < n3; ++i3) {
|
|
288086
288086
|
if ((node2 = group[i3]) && match2.call(node2, node2.__data__, i3, group)) {
|
|
@@ -289662,7 +289662,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
289662
289662
|
}
|
|
289663
289663
|
function transition_filter(match2) {
|
|
289664
289664
|
if (typeof match2 !== "function")
|
|
289665
|
-
match2 = matcher(match2);
|
|
289665
|
+
match2 = matcher$1(match2);
|
|
289666
289666
|
for (var groups = this._groups, m3 = groups.length, subgroups = new Array(m3), j3 = 0; j3 < m3; ++j3) {
|
|
289667
289667
|
for (var group = groups[j3], n3 = group.length, subgroup = subgroups[j3] = [], node2, i3 = 0; i3 < n3; ++i3) {
|
|
289668
289668
|
if ((node2 = group[i3]) && match2.call(node2, node2.__data__, i3, group)) {
|
|
@@ -290259,7 +290259,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
290259
290259
|
};
|
|
290260
290260
|
return squarify2;
|
|
290261
290261
|
}(phi);
|
|
290262
|
-
function index() {
|
|
290262
|
+
function index$9() {
|
|
290263
290263
|
var tile = squarify, round2 = false, dx = 1, dy2 = 1, paddingStack = [0], paddingInner = constantZero, paddingTop = constantZero, paddingRight = constantZero, paddingBottom = constantZero, paddingLeft = constantZero;
|
|
290264
290264
|
function treemap(root2) {
|
|
290265
290265
|
root2.x0 = root2.y0 = 0;
|
|
@@ -290391,8 +290391,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
290391
290391
|
function NodeRenderer(props) {
|
|
290392
290392
|
var _a2, _b2, _c2;
|
|
290393
290393
|
const { node: node2, onClick: onClickProp } = props;
|
|
290394
|
-
const
|
|
290395
|
-
const fill = props.color(
|
|
290394
|
+
const depth2 = (props.maxDepth - props.node.depth % 5).toString();
|
|
290395
|
+
const fill = props.color(depth2).toString();
|
|
290396
290396
|
const width = Number.isNaN(node2.x1 - node2.x0) ? void 0 : node2.x1 - node2.x0;
|
|
290397
290397
|
const height = Number.isNaN(node2.y1 - node2.y0) ? void 0 : node2.y1 - node2.y0;
|
|
290398
290398
|
const hasChildren = node2.children && node2.children.length > 0;
|
|
@@ -290415,7 +290415,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
290415
290415
|
const root2 = hierarchy(props.data).sum((node2) => {
|
|
290416
290416
|
return node2.children && node2.children.length > 0 ? 0 : node2.weight;
|
|
290417
290417
|
});
|
|
290418
|
-
index().size([props.width, props.height]).paddingTop(28).paddingBottom(8).paddingRight(7).paddingLeft(7).paddingInner(3)(root2);
|
|
290418
|
+
index$9().size([props.width, props.height]).paddingTop(28).paddingBottom(8).paddingRight(7).paddingLeft(7).paddingInner(3)(root2);
|
|
290419
290419
|
setTreemap(root2);
|
|
290420
290420
|
}
|
|
290421
290421
|
},
|
|
@@ -292199,9 +292199,9 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
292199
292199
|
}
|
|
292200
292200
|
return spec == tr2 ? tr2 : Transaction.create(state, tr2.changes, tr2.selection, spec.effects, spec.annotations, spec.scrollIntoView);
|
|
292201
292201
|
}
|
|
292202
|
-
const none$
|
|
292202
|
+
const none$3 = [];
|
|
292203
292203
|
function asArray$1(value) {
|
|
292204
|
-
return value == null ? none$
|
|
292204
|
+
return value == null ? none$3 : Array.isArray(value) ? value : [value];
|
|
292205
292205
|
}
|
|
292206
292206
|
var CharCategory = /* @__PURE__ */ function(CharCategory2) {
|
|
292207
292207
|
CharCategory2[CharCategory2["Word"] = 0] = "Word";
|
|
@@ -293156,6 +293156,42 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
293156
293156
|
}
|
|
293157
293157
|
return strict === true ? -1 : string2.length;
|
|
293158
293158
|
}
|
|
293159
|
+
const index$8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
293160
|
+
__proto__: null,
|
|
293161
|
+
Annotation,
|
|
293162
|
+
AnnotationType,
|
|
293163
|
+
ChangeDesc,
|
|
293164
|
+
ChangeSet,
|
|
293165
|
+
get CharCategory() {
|
|
293166
|
+
return CharCategory;
|
|
293167
|
+
},
|
|
293168
|
+
Compartment,
|
|
293169
|
+
EditorSelection,
|
|
293170
|
+
EditorState,
|
|
293171
|
+
Facet,
|
|
293172
|
+
Line: Line$1,
|
|
293173
|
+
get MapMode() {
|
|
293174
|
+
return MapMode;
|
|
293175
|
+
},
|
|
293176
|
+
Prec,
|
|
293177
|
+
Range: Range$2,
|
|
293178
|
+
RangeSet,
|
|
293179
|
+
RangeSetBuilder,
|
|
293180
|
+
RangeValue,
|
|
293181
|
+
SelectionRange: SelectionRange$1,
|
|
293182
|
+
StateEffect,
|
|
293183
|
+
StateEffectType,
|
|
293184
|
+
StateField,
|
|
293185
|
+
Text,
|
|
293186
|
+
Transaction,
|
|
293187
|
+
codePointAt,
|
|
293188
|
+
codePointSize,
|
|
293189
|
+
combineConfig,
|
|
293190
|
+
countColumn,
|
|
293191
|
+
findClusterBreak,
|
|
293192
|
+
findColumn,
|
|
293193
|
+
fromCodePoint
|
|
293194
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
293159
293195
|
const C$4 = "\u037C";
|
|
293160
293196
|
const COUNT = typeof Symbol == "undefined" ? "__" + C$4 : Symbol.for(C$4);
|
|
293161
293197
|
const SET = typeof Symbol == "undefined" ? "__styleSet" + Math.floor(Math.random() * 1e8) : Symbol("styleSet");
|
|
@@ -295512,15 +295548,15 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
295512
295548
|
}
|
|
295513
295549
|
static define(create2, spec) {
|
|
295514
295550
|
const { eventHandlers, eventObservers, provide, decorations: deco } = spec || {};
|
|
295515
|
-
return new ViewPlugin(nextPluginID++, create2, eventHandlers, eventObservers, (
|
|
295516
|
-
let ext = [viewPlugin.of(
|
|
295551
|
+
return new ViewPlugin(nextPluginID++, create2, eventHandlers, eventObservers, (plugin2) => {
|
|
295552
|
+
let ext = [viewPlugin.of(plugin2)];
|
|
295517
295553
|
if (deco)
|
|
295518
295554
|
ext.push(decorations.of((view) => {
|
|
295519
|
-
let pluginInst = view.plugin(
|
|
295555
|
+
let pluginInst = view.plugin(plugin2);
|
|
295520
295556
|
return pluginInst ? deco(pluginInst) : Decoration.none;
|
|
295521
295557
|
}));
|
|
295522
295558
|
if (provide)
|
|
295523
|
-
ext.push(provide(
|
|
295559
|
+
ext.push(provide(plugin2));
|
|
295524
295560
|
return ext;
|
|
295525
295561
|
});
|
|
295526
295562
|
}
|
|
@@ -296246,15 +296282,15 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
296246
296282
|
return null;
|
|
296247
296283
|
let inv = changes.invertedDesc;
|
|
296248
296284
|
let range = new ChangedRange(inv.mapPos(from), inv.mapPos(to2), from, to2);
|
|
296249
|
-
let
|
|
296285
|
+
let marks2 = [];
|
|
296250
296286
|
for (let parent = textNode.parentNode; ; parent = parent.parentNode) {
|
|
296251
296287
|
let parentView = ContentView.get(parent);
|
|
296252
296288
|
if (parentView instanceof MarkView)
|
|
296253
|
-
|
|
296289
|
+
marks2.push({ node: parent, deco: parentView.mark });
|
|
296254
296290
|
else if (parentView instanceof LineView || parent.nodeName == "DIV" && parent.parentNode == view.contentDOM)
|
|
296255
|
-
return { range, text: textNode, marks, line: parent };
|
|
296291
|
+
return { range, text: textNode, marks: marks2, line: parent };
|
|
296256
296292
|
else if (parent != view.contentDOM)
|
|
296257
|
-
|
|
296293
|
+
marks2.push({ node: parent, deco: new MarkDecoration({
|
|
296258
296294
|
inclusive: true,
|
|
296259
296295
|
attributes: getAttrs$1(parent),
|
|
296260
296296
|
tagName: parent.tagName.toLowerCase()
|
|
@@ -297080,10 +297116,10 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
297080
297116
|
this.mouseSelection.destroy();
|
|
297081
297117
|
}
|
|
297082
297118
|
}
|
|
297083
|
-
function bindHandler(
|
|
297119
|
+
function bindHandler(plugin2, handler) {
|
|
297084
297120
|
return (view, event) => {
|
|
297085
297121
|
try {
|
|
297086
|
-
return handler.call(
|
|
297122
|
+
return handler.call(plugin2, event, view);
|
|
297087
297123
|
} catch (e3) {
|
|
297088
297124
|
logException(view.state, e3);
|
|
297089
297125
|
}
|
|
@@ -297094,19 +297130,19 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
297094
297130
|
function record(type) {
|
|
297095
297131
|
return result[type] || (result[type] = { observers: [], handlers: [] });
|
|
297096
297132
|
}
|
|
297097
|
-
for (let
|
|
297098
|
-
let spec =
|
|
297133
|
+
for (let plugin2 of plugins2) {
|
|
297134
|
+
let spec = plugin2.spec;
|
|
297099
297135
|
if (spec && spec.domEventHandlers)
|
|
297100
297136
|
for (let type in spec.domEventHandlers) {
|
|
297101
297137
|
let f3 = spec.domEventHandlers[type];
|
|
297102
297138
|
if (f3)
|
|
297103
|
-
record(type).handlers.push(bindHandler(
|
|
297139
|
+
record(type).handlers.push(bindHandler(plugin2.value, f3));
|
|
297104
297140
|
}
|
|
297105
297141
|
if (spec && spec.domEventObservers)
|
|
297106
297142
|
for (let type in spec.domEventObservers) {
|
|
297107
297143
|
let f3 = spec.domEventObservers[type];
|
|
297108
297144
|
if (f3)
|
|
297109
|
-
record(type).observers.push(bindHandler(
|
|
297145
|
+
record(type).observers.push(bindHandler(plugin2.value, f3));
|
|
297110
297146
|
}
|
|
297111
297147
|
}
|
|
297112
297148
|
for (let type in handlers)
|
|
@@ -299860,8 +299896,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
299860
299896
|
if (config2.scrollTo && config2.scrollTo.is(scrollIntoView$1))
|
|
299861
299897
|
this.viewState.scrollTarget = config2.scrollTo.value.clip(this.viewState.state);
|
|
299862
299898
|
this.plugins = this.state.facet(viewPlugin).map((spec) => new PluginInstance(spec));
|
|
299863
|
-
for (let
|
|
299864
|
-
|
|
299899
|
+
for (let plugin2 of this.plugins)
|
|
299900
|
+
plugin2.update(this);
|
|
299865
299901
|
this.observer = new DOMObserver(this);
|
|
299866
299902
|
this.inputState = new InputState(this);
|
|
299867
299903
|
this.inputState.ensureHandlers(this.plugins);
|
|
@@ -299977,13 +300013,13 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
299977
300013
|
this.updateState = 2;
|
|
299978
300014
|
let hadFocus = this.hasFocus;
|
|
299979
300015
|
try {
|
|
299980
|
-
for (let
|
|
299981
|
-
|
|
300016
|
+
for (let plugin2 of this.plugins)
|
|
300017
|
+
plugin2.destroy(this);
|
|
299982
300018
|
this.viewState = new ViewState(newState);
|
|
299983
300019
|
this.plugins = newState.facet(viewPlugin).map((spec) => new PluginInstance(spec));
|
|
299984
300020
|
this.pluginMap.clear();
|
|
299985
|
-
for (let
|
|
299986
|
-
|
|
300021
|
+
for (let plugin2 of this.plugins)
|
|
300022
|
+
plugin2.update(this);
|
|
299987
300023
|
this.docView.destroy();
|
|
299988
300024
|
this.docView = new DocView(this);
|
|
299989
300025
|
this.inputState.ensureHandlers(this.plugins);
|
|
@@ -300006,14 +300042,14 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
300006
300042
|
if (found < 0) {
|
|
300007
300043
|
newPlugins.push(new PluginInstance(spec));
|
|
300008
300044
|
} else {
|
|
300009
|
-
let
|
|
300010
|
-
|
|
300011
|
-
newPlugins.push(
|
|
300045
|
+
let plugin2 = this.plugins[found];
|
|
300046
|
+
plugin2.mustUpdate = update;
|
|
300047
|
+
newPlugins.push(plugin2);
|
|
300012
300048
|
}
|
|
300013
300049
|
}
|
|
300014
|
-
for (let
|
|
300015
|
-
if (
|
|
300016
|
-
|
|
300050
|
+
for (let plugin2 of this.plugins)
|
|
300051
|
+
if (plugin2.mustUpdate != update)
|
|
300052
|
+
plugin2.destroy(this);
|
|
300017
300053
|
this.plugins = newPlugins;
|
|
300018
300054
|
this.pluginMap.clear();
|
|
300019
300055
|
} else {
|
|
@@ -300026,8 +300062,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
300026
300062
|
this.inputState.ensureHandlers(this.plugins);
|
|
300027
300063
|
}
|
|
300028
300064
|
docViewUpdate() {
|
|
300029
|
-
for (let
|
|
300030
|
-
let val =
|
|
300065
|
+
for (let plugin2 of this.plugins) {
|
|
300066
|
+
let val = plugin2.value;
|
|
300031
300067
|
if (val && val.docViewUpdate) {
|
|
300032
300068
|
try {
|
|
300033
300069
|
val.docViewUpdate(this);
|
|
@@ -300212,10 +300248,10 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
300212
300248
|
this.measureRequests.push(request);
|
|
300213
300249
|
}
|
|
300214
300250
|
}
|
|
300215
|
-
plugin(
|
|
300216
|
-
let known = this.pluginMap.get(
|
|
300217
|
-
if (known === void 0 || known && known.spec !=
|
|
300218
|
-
this.pluginMap.set(
|
|
300251
|
+
plugin(plugin2) {
|
|
300252
|
+
let known = this.pluginMap.get(plugin2);
|
|
300253
|
+
if (known === void 0 || known && known.spec != plugin2)
|
|
300254
|
+
this.pluginMap.set(plugin2, known = this.plugins.find((p3) => p3.spec == plugin2) || null);
|
|
300219
300255
|
return known && known.update(this).value;
|
|
300220
300256
|
}
|
|
300221
300257
|
get documentTop() {
|
|
@@ -300340,8 +300376,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
300340
300376
|
destroy() {
|
|
300341
300377
|
if (this.root.activeElement == this.contentDOM)
|
|
300342
300378
|
this.contentDOM.blur();
|
|
300343
|
-
for (let
|
|
300344
|
-
|
|
300379
|
+
for (let plugin2 of this.plugins)
|
|
300380
|
+
plugin2.destroy(this);
|
|
300345
300381
|
this.plugins = [];
|
|
300346
300382
|
this.inputState.destroy();
|
|
300347
300383
|
this.docView.destroy();
|
|
@@ -300593,10 +300629,10 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
300593
300629
|
let ran = /* @__PURE__ */ new Set();
|
|
300594
300630
|
let runFor = (binding) => {
|
|
300595
300631
|
if (binding) {
|
|
300596
|
-
for (let
|
|
300597
|
-
if (!ran.has(
|
|
300598
|
-
ran.add(
|
|
300599
|
-
if (
|
|
300632
|
+
for (let cmd2 of binding.run)
|
|
300633
|
+
if (!ran.has(cmd2)) {
|
|
300634
|
+
ran.add(cmd2);
|
|
300635
|
+
if (cmd2(view)) {
|
|
300600
300636
|
if (binding.stopPropagation)
|
|
300601
300637
|
stopPropagation = true;
|
|
300602
300638
|
return true;
|
|
@@ -300875,6 +300911,9 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
300875
300911
|
nativeSelectionHidden.of(true)
|
|
300876
300912
|
];
|
|
300877
300913
|
}
|
|
300914
|
+
function getDrawSelectionConfig(state) {
|
|
300915
|
+
return state.facet(selectionConfig);
|
|
300916
|
+
}
|
|
300878
300917
|
function configChanged(update) {
|
|
300879
300918
|
return update.startState.facet(selectionConfig) != update.state.facet(selectionConfig);
|
|
300880
300919
|
}
|
|
@@ -300936,6 +300975,361 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
300936
300975
|
if (CanHidePrimary)
|
|
300937
300976
|
themeSpec[".cm-line"].caretColor = themeSpec[".cm-content"].caretColor = "transparent !important";
|
|
300938
300977
|
const hideNativeSelection = /* @__PURE__ */ Prec.highest(/* @__PURE__ */ EditorView.theme(themeSpec));
|
|
300978
|
+
const setDropCursorPos = /* @__PURE__ */ StateEffect.define({
|
|
300979
|
+
map(pos, mapping) {
|
|
300980
|
+
return pos == null ? null : mapping.mapPos(pos);
|
|
300981
|
+
}
|
|
300982
|
+
});
|
|
300983
|
+
const dropCursorPos = /* @__PURE__ */ StateField.define({
|
|
300984
|
+
create() {
|
|
300985
|
+
return null;
|
|
300986
|
+
},
|
|
300987
|
+
update(pos, tr2) {
|
|
300988
|
+
if (pos != null)
|
|
300989
|
+
pos = tr2.changes.mapPos(pos);
|
|
300990
|
+
return tr2.effects.reduce((pos2, e3) => e3.is(setDropCursorPos) ? e3.value : pos2, pos);
|
|
300991
|
+
}
|
|
300992
|
+
});
|
|
300993
|
+
const drawDropCursor = /* @__PURE__ */ ViewPlugin.fromClass(class {
|
|
300994
|
+
constructor(view) {
|
|
300995
|
+
this.view = view;
|
|
300996
|
+
this.cursor = null;
|
|
300997
|
+
this.measureReq = { read: this.readPos.bind(this), write: this.drawCursor.bind(this) };
|
|
300998
|
+
}
|
|
300999
|
+
update(update) {
|
|
301000
|
+
var _a2;
|
|
301001
|
+
let cursorPos = update.state.field(dropCursorPos);
|
|
301002
|
+
if (cursorPos == null) {
|
|
301003
|
+
if (this.cursor != null) {
|
|
301004
|
+
(_a2 = this.cursor) === null || _a2 === void 0 ? void 0 : _a2.remove();
|
|
301005
|
+
this.cursor = null;
|
|
301006
|
+
}
|
|
301007
|
+
} else {
|
|
301008
|
+
if (!this.cursor) {
|
|
301009
|
+
this.cursor = this.view.scrollDOM.appendChild(document.createElement("div"));
|
|
301010
|
+
this.cursor.className = "cm-dropCursor";
|
|
301011
|
+
}
|
|
301012
|
+
if (update.startState.field(dropCursorPos) != cursorPos || update.docChanged || update.geometryChanged)
|
|
301013
|
+
this.view.requestMeasure(this.measureReq);
|
|
301014
|
+
}
|
|
301015
|
+
}
|
|
301016
|
+
readPos() {
|
|
301017
|
+
let { view } = this;
|
|
301018
|
+
let pos = view.state.field(dropCursorPos);
|
|
301019
|
+
let rect = pos != null && view.coordsAtPos(pos);
|
|
301020
|
+
if (!rect)
|
|
301021
|
+
return null;
|
|
301022
|
+
let outer = view.scrollDOM.getBoundingClientRect();
|
|
301023
|
+
return {
|
|
301024
|
+
left: rect.left - outer.left + view.scrollDOM.scrollLeft * view.scaleX,
|
|
301025
|
+
top: rect.top - outer.top + view.scrollDOM.scrollTop * view.scaleY,
|
|
301026
|
+
height: rect.bottom - rect.top
|
|
301027
|
+
};
|
|
301028
|
+
}
|
|
301029
|
+
drawCursor(pos) {
|
|
301030
|
+
if (this.cursor) {
|
|
301031
|
+
let { scaleX, scaleY } = this.view;
|
|
301032
|
+
if (pos) {
|
|
301033
|
+
this.cursor.style.left = pos.left / scaleX + "px";
|
|
301034
|
+
this.cursor.style.top = pos.top / scaleY + "px";
|
|
301035
|
+
this.cursor.style.height = pos.height / scaleY + "px";
|
|
301036
|
+
} else {
|
|
301037
|
+
this.cursor.style.left = "-100000px";
|
|
301038
|
+
}
|
|
301039
|
+
}
|
|
301040
|
+
}
|
|
301041
|
+
destroy() {
|
|
301042
|
+
if (this.cursor)
|
|
301043
|
+
this.cursor.remove();
|
|
301044
|
+
}
|
|
301045
|
+
setDropPos(pos) {
|
|
301046
|
+
if (this.view.state.field(dropCursorPos) != pos)
|
|
301047
|
+
this.view.dispatch({ effects: setDropCursorPos.of(pos) });
|
|
301048
|
+
}
|
|
301049
|
+
}, {
|
|
301050
|
+
eventObservers: {
|
|
301051
|
+
dragover(event) {
|
|
301052
|
+
this.setDropPos(this.view.posAtCoords({ x: event.clientX, y: event.clientY }));
|
|
301053
|
+
},
|
|
301054
|
+
dragleave(event) {
|
|
301055
|
+
if (event.target == this.view.contentDOM || !this.view.contentDOM.contains(event.relatedTarget))
|
|
301056
|
+
this.setDropPos(null);
|
|
301057
|
+
},
|
|
301058
|
+
dragend() {
|
|
301059
|
+
this.setDropPos(null);
|
|
301060
|
+
},
|
|
301061
|
+
drop() {
|
|
301062
|
+
this.setDropPos(null);
|
|
301063
|
+
}
|
|
301064
|
+
}
|
|
301065
|
+
});
|
|
301066
|
+
function dropCursor() {
|
|
301067
|
+
return [dropCursorPos, drawDropCursor];
|
|
301068
|
+
}
|
|
301069
|
+
function iterMatches(doc2, re2, from, to2, f3) {
|
|
301070
|
+
re2.lastIndex = 0;
|
|
301071
|
+
for (let cursor2 = doc2.iterRange(from, to2), pos = from, m3; !cursor2.next().done; pos += cursor2.value.length) {
|
|
301072
|
+
if (!cursor2.lineBreak)
|
|
301073
|
+
while (m3 = re2.exec(cursor2.value))
|
|
301074
|
+
f3(pos + m3.index, m3);
|
|
301075
|
+
}
|
|
301076
|
+
}
|
|
301077
|
+
function matchRanges(view, maxLength) {
|
|
301078
|
+
let visible = view.visibleRanges;
|
|
301079
|
+
if (visible.length == 1 && visible[0].from == view.viewport.from && visible[0].to == view.viewport.to)
|
|
301080
|
+
return visible;
|
|
301081
|
+
let result = [];
|
|
301082
|
+
for (let { from, to: to2 } of visible) {
|
|
301083
|
+
from = Math.max(view.state.doc.lineAt(from).from, from - maxLength);
|
|
301084
|
+
to2 = Math.min(view.state.doc.lineAt(to2).to, to2 + maxLength);
|
|
301085
|
+
if (result.length && result[result.length - 1].to >= from)
|
|
301086
|
+
result[result.length - 1].to = to2;
|
|
301087
|
+
else
|
|
301088
|
+
result.push({ from, to: to2 });
|
|
301089
|
+
}
|
|
301090
|
+
return result;
|
|
301091
|
+
}
|
|
301092
|
+
class MatchDecorator {
|
|
301093
|
+
constructor(config2) {
|
|
301094
|
+
const { regexp, decoration, decorate, boundary, maxLength = 1e3 } = config2;
|
|
301095
|
+
if (!regexp.global)
|
|
301096
|
+
throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");
|
|
301097
|
+
this.regexp = regexp;
|
|
301098
|
+
if (decorate) {
|
|
301099
|
+
this.addMatch = (match2, view, from, add2) => decorate(add2, from, from + match2[0].length, match2, view);
|
|
301100
|
+
} else if (typeof decoration == "function") {
|
|
301101
|
+
this.addMatch = (match2, view, from, add2) => {
|
|
301102
|
+
let deco = decoration(match2, view, from);
|
|
301103
|
+
if (deco)
|
|
301104
|
+
add2(from, from + match2[0].length, deco);
|
|
301105
|
+
};
|
|
301106
|
+
} else if (decoration) {
|
|
301107
|
+
this.addMatch = (match2, _view, from, add2) => add2(from, from + match2[0].length, decoration);
|
|
301108
|
+
} else {
|
|
301109
|
+
throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");
|
|
301110
|
+
}
|
|
301111
|
+
this.boundary = boundary;
|
|
301112
|
+
this.maxLength = maxLength;
|
|
301113
|
+
}
|
|
301114
|
+
createDeco(view) {
|
|
301115
|
+
let build2 = new RangeSetBuilder(), add2 = build2.add.bind(build2);
|
|
301116
|
+
for (let { from, to: to2 } of matchRanges(view, this.maxLength))
|
|
301117
|
+
iterMatches(view.state.doc, this.regexp, from, to2, (from2, m3) => this.addMatch(m3, view, from2, add2));
|
|
301118
|
+
return build2.finish();
|
|
301119
|
+
}
|
|
301120
|
+
updateDeco(update, deco) {
|
|
301121
|
+
let changeFrom = 1e9, changeTo = -1;
|
|
301122
|
+
if (update.docChanged)
|
|
301123
|
+
update.changes.iterChanges((_f, _t2, from, to2) => {
|
|
301124
|
+
if (to2 > update.view.viewport.from && from < update.view.viewport.to) {
|
|
301125
|
+
changeFrom = Math.min(from, changeFrom);
|
|
301126
|
+
changeTo = Math.max(to2, changeTo);
|
|
301127
|
+
}
|
|
301128
|
+
});
|
|
301129
|
+
if (update.viewportChanged || changeTo - changeFrom > 1e3)
|
|
301130
|
+
return this.createDeco(update.view);
|
|
301131
|
+
if (changeTo > -1)
|
|
301132
|
+
return this.updateRange(update.view, deco.map(update.changes), changeFrom, changeTo);
|
|
301133
|
+
return deco;
|
|
301134
|
+
}
|
|
301135
|
+
updateRange(view, deco, updateFrom, updateTo) {
|
|
301136
|
+
for (let r3 of view.visibleRanges) {
|
|
301137
|
+
let from = Math.max(r3.from, updateFrom), to2 = Math.min(r3.to, updateTo);
|
|
301138
|
+
if (to2 > from) {
|
|
301139
|
+
let fromLine = view.state.doc.lineAt(from), toLine = fromLine.to < to2 ? view.state.doc.lineAt(to2) : fromLine;
|
|
301140
|
+
let start2 = Math.max(r3.from, fromLine.from), end2 = Math.min(r3.to, toLine.to);
|
|
301141
|
+
if (this.boundary) {
|
|
301142
|
+
for (; from > fromLine.from; from--)
|
|
301143
|
+
if (this.boundary.test(fromLine.text[from - 1 - fromLine.from])) {
|
|
301144
|
+
start2 = from;
|
|
301145
|
+
break;
|
|
301146
|
+
}
|
|
301147
|
+
for (; to2 < toLine.to; to2++)
|
|
301148
|
+
if (this.boundary.test(toLine.text[to2 - toLine.from])) {
|
|
301149
|
+
end2 = to2;
|
|
301150
|
+
break;
|
|
301151
|
+
}
|
|
301152
|
+
}
|
|
301153
|
+
let ranges = [], m3;
|
|
301154
|
+
let add2 = (from2, to3, deco2) => ranges.push(deco2.range(from2, to3));
|
|
301155
|
+
if (fromLine == toLine) {
|
|
301156
|
+
this.regexp.lastIndex = start2 - fromLine.from;
|
|
301157
|
+
while ((m3 = this.regexp.exec(fromLine.text)) && m3.index < end2 - fromLine.from)
|
|
301158
|
+
this.addMatch(m3, view, m3.index + fromLine.from, add2);
|
|
301159
|
+
} else {
|
|
301160
|
+
iterMatches(view.state.doc, this.regexp, start2, end2, (from2, m10) => this.addMatch(m10, view, from2, add2));
|
|
301161
|
+
}
|
|
301162
|
+
deco = deco.update({ filterFrom: start2, filterTo: end2, filter: (from2, to3) => from2 < start2 || to3 > end2, add: ranges });
|
|
301163
|
+
}
|
|
301164
|
+
}
|
|
301165
|
+
return deco;
|
|
301166
|
+
}
|
|
301167
|
+
}
|
|
301168
|
+
const UnicodeRegexpSupport = /x/.unicode != null ? "gu" : "g";
|
|
301169
|
+
const Specials = /* @__PURE__ */ new RegExp("[\0-\b\n-\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]", UnicodeRegexpSupport);
|
|
301170
|
+
const Names = {
|
|
301171
|
+
0: "null",
|
|
301172
|
+
7: "bell",
|
|
301173
|
+
8: "backspace",
|
|
301174
|
+
10: "newline",
|
|
301175
|
+
11: "vertical tab",
|
|
301176
|
+
13: "carriage return",
|
|
301177
|
+
27: "escape",
|
|
301178
|
+
8203: "zero width space",
|
|
301179
|
+
8204: "zero width non-joiner",
|
|
301180
|
+
8205: "zero width joiner",
|
|
301181
|
+
8206: "left-to-right mark",
|
|
301182
|
+
8207: "right-to-left mark",
|
|
301183
|
+
8232: "line separator",
|
|
301184
|
+
8237: "left-to-right override",
|
|
301185
|
+
8238: "right-to-left override",
|
|
301186
|
+
8294: "left-to-right isolate",
|
|
301187
|
+
8295: "right-to-left isolate",
|
|
301188
|
+
8297: "pop directional isolate",
|
|
301189
|
+
8233: "paragraph separator",
|
|
301190
|
+
65279: "zero width no-break space",
|
|
301191
|
+
65532: "object replacement"
|
|
301192
|
+
};
|
|
301193
|
+
let _supportsTabSize = null;
|
|
301194
|
+
function supportsTabSize() {
|
|
301195
|
+
var _a2;
|
|
301196
|
+
if (_supportsTabSize == null && typeof document != "undefined" && document.body) {
|
|
301197
|
+
let styles2 = document.body.style;
|
|
301198
|
+
_supportsTabSize = ((_a2 = styles2.tabSize) !== null && _a2 !== void 0 ? _a2 : styles2.MozTabSize) != null;
|
|
301199
|
+
}
|
|
301200
|
+
return _supportsTabSize || false;
|
|
301201
|
+
}
|
|
301202
|
+
const specialCharConfig = /* @__PURE__ */ Facet.define({
|
|
301203
|
+
combine(configs) {
|
|
301204
|
+
let config2 = combineConfig(configs, {
|
|
301205
|
+
render: null,
|
|
301206
|
+
specialChars: Specials,
|
|
301207
|
+
addSpecialChars: null
|
|
301208
|
+
});
|
|
301209
|
+
if (config2.replaceTabs = !supportsTabSize())
|
|
301210
|
+
config2.specialChars = new RegExp(" |" + config2.specialChars.source, UnicodeRegexpSupport);
|
|
301211
|
+
if (config2.addSpecialChars)
|
|
301212
|
+
config2.specialChars = new RegExp(config2.specialChars.source + "|" + config2.addSpecialChars.source, UnicodeRegexpSupport);
|
|
301213
|
+
return config2;
|
|
301214
|
+
}
|
|
301215
|
+
});
|
|
301216
|
+
function highlightSpecialChars(config2 = {}) {
|
|
301217
|
+
return [specialCharConfig.of(config2), specialCharPlugin()];
|
|
301218
|
+
}
|
|
301219
|
+
let _plugin = null;
|
|
301220
|
+
function specialCharPlugin() {
|
|
301221
|
+
return _plugin || (_plugin = ViewPlugin.fromClass(class {
|
|
301222
|
+
constructor(view) {
|
|
301223
|
+
this.view = view;
|
|
301224
|
+
this.decorations = Decoration.none;
|
|
301225
|
+
this.decorationCache = /* @__PURE__ */ Object.create(null);
|
|
301226
|
+
this.decorator = this.makeDecorator(view.state.facet(specialCharConfig));
|
|
301227
|
+
this.decorations = this.decorator.createDeco(view);
|
|
301228
|
+
}
|
|
301229
|
+
makeDecorator(conf) {
|
|
301230
|
+
return new MatchDecorator({
|
|
301231
|
+
regexp: conf.specialChars,
|
|
301232
|
+
decoration: (m3, view, pos) => {
|
|
301233
|
+
let { doc: doc2 } = view.state;
|
|
301234
|
+
let code2 = codePointAt(m3[0], 0);
|
|
301235
|
+
if (code2 == 9) {
|
|
301236
|
+
let line = doc2.lineAt(pos);
|
|
301237
|
+
let size2 = view.state.tabSize, col = countColumn(line.text, size2, pos - line.from);
|
|
301238
|
+
return Decoration.replace({
|
|
301239
|
+
widget: new TabWidget((size2 - col % size2) * this.view.defaultCharacterWidth / this.view.scaleX)
|
|
301240
|
+
});
|
|
301241
|
+
}
|
|
301242
|
+
return this.decorationCache[code2] || (this.decorationCache[code2] = Decoration.replace({ widget: new SpecialCharWidget(conf, code2) }));
|
|
301243
|
+
},
|
|
301244
|
+
boundary: conf.replaceTabs ? void 0 : /[^]/
|
|
301245
|
+
});
|
|
301246
|
+
}
|
|
301247
|
+
update(update) {
|
|
301248
|
+
let conf = update.state.facet(specialCharConfig);
|
|
301249
|
+
if (update.startState.facet(specialCharConfig) != conf) {
|
|
301250
|
+
this.decorator = this.makeDecorator(conf);
|
|
301251
|
+
this.decorations = this.decorator.createDeco(update.view);
|
|
301252
|
+
} else {
|
|
301253
|
+
this.decorations = this.decorator.updateDeco(update, this.decorations);
|
|
301254
|
+
}
|
|
301255
|
+
}
|
|
301256
|
+
}, {
|
|
301257
|
+
decorations: (v3) => v3.decorations
|
|
301258
|
+
}));
|
|
301259
|
+
}
|
|
301260
|
+
const DefaultPlaceholder = "\u2022";
|
|
301261
|
+
function placeholder$1(code2) {
|
|
301262
|
+
if (code2 >= 32)
|
|
301263
|
+
return DefaultPlaceholder;
|
|
301264
|
+
if (code2 == 10)
|
|
301265
|
+
return "\u2424";
|
|
301266
|
+
return String.fromCharCode(9216 + code2);
|
|
301267
|
+
}
|
|
301268
|
+
class SpecialCharWidget extends WidgetType {
|
|
301269
|
+
constructor(options, code2) {
|
|
301270
|
+
super();
|
|
301271
|
+
this.options = options;
|
|
301272
|
+
this.code = code2;
|
|
301273
|
+
}
|
|
301274
|
+
eq(other) {
|
|
301275
|
+
return other.code == this.code;
|
|
301276
|
+
}
|
|
301277
|
+
toDOM(view) {
|
|
301278
|
+
let ph2 = placeholder$1(this.code);
|
|
301279
|
+
let desc = view.state.phrase("Control character") + " " + (Names[this.code] || "0x" + this.code.toString(16));
|
|
301280
|
+
let custom = this.options.render && this.options.render(this.code, desc, ph2);
|
|
301281
|
+
if (custom)
|
|
301282
|
+
return custom;
|
|
301283
|
+
let span = document.createElement("span");
|
|
301284
|
+
span.textContent = ph2;
|
|
301285
|
+
span.title = desc;
|
|
301286
|
+
span.setAttribute("aria-label", desc);
|
|
301287
|
+
span.className = "cm-specialChar";
|
|
301288
|
+
return span;
|
|
301289
|
+
}
|
|
301290
|
+
ignoreEvent() {
|
|
301291
|
+
return false;
|
|
301292
|
+
}
|
|
301293
|
+
}
|
|
301294
|
+
class TabWidget extends WidgetType {
|
|
301295
|
+
constructor(width) {
|
|
301296
|
+
super();
|
|
301297
|
+
this.width = width;
|
|
301298
|
+
}
|
|
301299
|
+
eq(other) {
|
|
301300
|
+
return other.width == this.width;
|
|
301301
|
+
}
|
|
301302
|
+
toDOM() {
|
|
301303
|
+
let span = document.createElement("span");
|
|
301304
|
+
span.textContent = " ";
|
|
301305
|
+
span.className = "cm-tab";
|
|
301306
|
+
span.style.width = this.width + "px";
|
|
301307
|
+
return span;
|
|
301308
|
+
}
|
|
301309
|
+
ignoreEvent() {
|
|
301310
|
+
return false;
|
|
301311
|
+
}
|
|
301312
|
+
}
|
|
301313
|
+
const plugin = /* @__PURE__ */ ViewPlugin.fromClass(class {
|
|
301314
|
+
constructor() {
|
|
301315
|
+
this.height = 1e3;
|
|
301316
|
+
this.attrs = { style: "padding-bottom: 1000px" };
|
|
301317
|
+
}
|
|
301318
|
+
update(update) {
|
|
301319
|
+
let { view } = update;
|
|
301320
|
+
let height = view.viewState.editorHeight - view.defaultLineHeight - view.documentPadding.top - 0.5;
|
|
301321
|
+
if (height >= 0 && height != this.height) {
|
|
301322
|
+
this.height = height;
|
|
301323
|
+
this.attrs = { style: `padding-bottom: ${height}px` };
|
|
301324
|
+
}
|
|
301325
|
+
}
|
|
301326
|
+
});
|
|
301327
|
+
function scrollPastEnd() {
|
|
301328
|
+
return [plugin, contentAttributes.of((view) => {
|
|
301329
|
+
var _a2;
|
|
301330
|
+
return ((_a2 = view.plugin(plugin)) === null || _a2 === void 0 ? void 0 : _a2.attrs) || null;
|
|
301331
|
+
})];
|
|
301332
|
+
}
|
|
300939
301333
|
function highlightActiveLine() {
|
|
300940
301334
|
return activeLineHighlighter;
|
|
300941
301335
|
}
|
|
@@ -300962,6 +301356,48 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
300962
301356
|
}, {
|
|
300963
301357
|
decorations: (v3) => v3.decorations
|
|
300964
301358
|
});
|
|
301359
|
+
class Placeholder extends WidgetType {
|
|
301360
|
+
constructor(content2) {
|
|
301361
|
+
super();
|
|
301362
|
+
this.content = content2;
|
|
301363
|
+
}
|
|
301364
|
+
toDOM(view) {
|
|
301365
|
+
let wrap2 = document.createElement("span");
|
|
301366
|
+
wrap2.className = "cm-placeholder";
|
|
301367
|
+
wrap2.style.pointerEvents = "none";
|
|
301368
|
+
wrap2.appendChild(typeof this.content == "string" ? document.createTextNode(this.content) : typeof this.content == "function" ? this.content(view) : this.content.cloneNode(true));
|
|
301369
|
+
if (typeof this.content == "string")
|
|
301370
|
+
wrap2.setAttribute("aria-label", "placeholder " + this.content);
|
|
301371
|
+
else
|
|
301372
|
+
wrap2.setAttribute("aria-hidden", "true");
|
|
301373
|
+
return wrap2;
|
|
301374
|
+
}
|
|
301375
|
+
coordsAt(dom2) {
|
|
301376
|
+
let rects = dom2.firstChild ? clientRectsFor(dom2.firstChild) : [];
|
|
301377
|
+
if (!rects.length)
|
|
301378
|
+
return null;
|
|
301379
|
+
let style2 = window.getComputedStyle(dom2.parentNode);
|
|
301380
|
+
let rect = flattenRect(rects[0], style2.direction != "rtl");
|
|
301381
|
+
let lineHeight = parseInt(style2.lineHeight);
|
|
301382
|
+
if (rect.bottom - rect.top > lineHeight * 1.5)
|
|
301383
|
+
return { left: rect.left, right: rect.right, top: rect.top, bottom: rect.top + lineHeight };
|
|
301384
|
+
return rect;
|
|
301385
|
+
}
|
|
301386
|
+
ignoreEvent() {
|
|
301387
|
+
return false;
|
|
301388
|
+
}
|
|
301389
|
+
}
|
|
301390
|
+
function placeholder(content2) {
|
|
301391
|
+
return ViewPlugin.fromClass(class {
|
|
301392
|
+
constructor(view) {
|
|
301393
|
+
this.view = view;
|
|
301394
|
+
this.placeholder = content2 ? Decoration.set([Decoration.widget({ widget: new Placeholder(content2), side: 1 }).range(0)]) : Decoration.none;
|
|
301395
|
+
}
|
|
301396
|
+
get decorations() {
|
|
301397
|
+
return this.view.state.doc.length ? Decoration.none : this.placeholder;
|
|
301398
|
+
}
|
|
301399
|
+
}, { decorations: (v3) => v3.decorations });
|
|
301400
|
+
}
|
|
300965
301401
|
const MaxOff = 2e3;
|
|
300966
301402
|
function rectangleFor(state, a3, b3) {
|
|
300967
301403
|
let startLine = Math.min(a3.line, b3.line), endLine = Math.max(a3.line, b3.line);
|
|
@@ -301038,7 +301474,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
301038
301474
|
const showCrosshair = { style: "cursor: crosshair" };
|
|
301039
301475
|
function crosshairCursor(options = {}) {
|
|
301040
301476
|
let [code2, getter] = keys[options.key || "Alt"];
|
|
301041
|
-
let
|
|
301477
|
+
let plugin2 = ViewPlugin.fromClass(class {
|
|
301042
301478
|
constructor(view) {
|
|
301043
301479
|
this.view = view;
|
|
301044
301480
|
this.isDown = false;
|
|
@@ -301064,10 +301500,10 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
301064
301500
|
}
|
|
301065
301501
|
});
|
|
301066
301502
|
return [
|
|
301067
|
-
|
|
301503
|
+
plugin2,
|
|
301068
301504
|
EditorView.contentAttributes.of((view) => {
|
|
301069
301505
|
var _a2;
|
|
301070
|
-
return ((_a2 = view.plugin(
|
|
301506
|
+
return ((_a2 = view.plugin(plugin2)) === null || _a2 === void 0 ? void 0 : _a2.isDown) ? showCrosshair : null;
|
|
301071
301507
|
})
|
|
301072
301508
|
];
|
|
301073
301509
|
}
|
|
@@ -301598,9 +302034,9 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
301598
302034
|
}
|
|
301599
302035
|
}
|
|
301600
302036
|
get tooltip() {
|
|
301601
|
-
let
|
|
301602
|
-
let index2 =
|
|
301603
|
-
return index2 > -1 ?
|
|
302037
|
+
let plugin2 = this.view.plugin(tooltipPlugin);
|
|
302038
|
+
let index2 = plugin2 ? plugin2.manager.tooltips.findIndex((t3) => t3.create == HoverTooltipHost.create) : -1;
|
|
302039
|
+
return index2 > -1 ? plugin2.manager.tooltipViews[index2] : null;
|
|
301604
302040
|
}
|
|
301605
302041
|
mousemove(event) {
|
|
301606
302042
|
var _a2, _b2;
|
|
@@ -301708,13 +302144,22 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
301708
302144
|
};
|
|
301709
302145
|
}
|
|
301710
302146
|
function getTooltip(view, tooltip) {
|
|
301711
|
-
let
|
|
301712
|
-
if (!
|
|
302147
|
+
let plugin2 = view.plugin(tooltipPlugin);
|
|
302148
|
+
if (!plugin2)
|
|
301713
302149
|
return null;
|
|
301714
|
-
let found =
|
|
301715
|
-
return found < 0 ? null :
|
|
302150
|
+
let found = plugin2.manager.tooltips.indexOf(tooltip);
|
|
302151
|
+
return found < 0 ? null : plugin2.manager.tooltipViews[found];
|
|
302152
|
+
}
|
|
302153
|
+
function hasHoverTooltips(state) {
|
|
302154
|
+
return state.facet(showHoverTooltip).some((x3) => x3);
|
|
301716
302155
|
}
|
|
301717
302156
|
const closeHoverTooltipEffect = /* @__PURE__ */ StateEffect.define();
|
|
302157
|
+
const closeHoverTooltips = /* @__PURE__ */ closeHoverTooltipEffect.of(null);
|
|
302158
|
+
function repositionTooltips(view) {
|
|
302159
|
+
let plugin2 = view.plugin(tooltipPlugin);
|
|
302160
|
+
if (plugin2)
|
|
302161
|
+
plugin2.maybeMeasure();
|
|
302162
|
+
}
|
|
301718
302163
|
const panelConfig = /* @__PURE__ */ Facet.define({
|
|
301719
302164
|
combine(configs) {
|
|
301720
302165
|
let topContainer, bottomContainer;
|
|
@@ -301725,10 +302170,13 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
301725
302170
|
return { topContainer, bottomContainer };
|
|
301726
302171
|
}
|
|
301727
302172
|
});
|
|
302173
|
+
function panels(config2) {
|
|
302174
|
+
return config2 ? [panelConfig.of(config2)] : [];
|
|
302175
|
+
}
|
|
301728
302176
|
function getPanel(view, panel) {
|
|
301729
|
-
let
|
|
301730
|
-
let index2 =
|
|
301731
|
-
return index2 > -1 ?
|
|
302177
|
+
let plugin2 = view.plugin(panelPlugin);
|
|
302178
|
+
let index2 = plugin2 ? plugin2.specs.indexOf(panel) : -1;
|
|
302179
|
+
return index2 > -1 ? plugin2.panels[index2] : null;
|
|
301732
302180
|
}
|
|
301733
302181
|
const panelPlugin = /* @__PURE__ */ ViewPlugin.fromClass(class {
|
|
301734
302182
|
constructor(view) {
|
|
@@ -301761,7 +302209,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
301761
302209
|
let input = update.state.facet(showPanel);
|
|
301762
302210
|
if (input != this.input) {
|
|
301763
302211
|
let specs = input.filter((x3) => x3);
|
|
301764
|
-
let
|
|
302212
|
+
let panels2 = [], top2 = [], bottom2 = [], mount = [];
|
|
301765
302213
|
for (let spec of specs) {
|
|
301766
302214
|
let known = this.specs.indexOf(spec), panel;
|
|
301767
302215
|
if (known < 0) {
|
|
@@ -301772,11 +302220,11 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
301772
302220
|
if (panel.update)
|
|
301773
302221
|
panel.update(update);
|
|
301774
302222
|
}
|
|
301775
|
-
|
|
302223
|
+
panels2.push(panel);
|
|
301776
302224
|
(panel.top ? top2 : bottom2).push(panel);
|
|
301777
302225
|
}
|
|
301778
302226
|
this.specs = specs;
|
|
301779
|
-
this.panels =
|
|
302227
|
+
this.panels = panels2;
|
|
301780
302228
|
this.top.sync(top2);
|
|
301781
302229
|
this.bottom.sync(bottom2);
|
|
301782
302230
|
for (let p3 of mount) {
|
|
@@ -301795,8 +302243,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
301795
302243
|
this.bottom.sync([]);
|
|
301796
302244
|
}
|
|
301797
302245
|
}, {
|
|
301798
|
-
provide: (
|
|
301799
|
-
let value = view.plugin(
|
|
302246
|
+
provide: (plugin2) => EditorView.scrollMargins.of((view) => {
|
|
302247
|
+
let value = view.plugin(plugin2);
|
|
301800
302248
|
return value && { top: value.top.scrollMargin(), bottom: value.bottom.scrollMargin() };
|
|
301801
302249
|
})
|
|
301802
302250
|
});
|
|
@@ -301810,11 +302258,11 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
301810
302258
|
this.panels = [];
|
|
301811
302259
|
this.syncClasses();
|
|
301812
302260
|
}
|
|
301813
|
-
sync(
|
|
302261
|
+
sync(panels2) {
|
|
301814
302262
|
for (let p3 of this.panels)
|
|
301815
|
-
if (p3.destroy &&
|
|
302263
|
+
if (p3.destroy && panels2.indexOf(p3) < 0)
|
|
301816
302264
|
p3.destroy();
|
|
301817
|
-
this.panels =
|
|
302265
|
+
this.panels = panels2;
|
|
301818
302266
|
this.syncDOM();
|
|
301819
302267
|
}
|
|
301820
302268
|
syncDOM() {
|
|
@@ -302017,8 +302465,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
302017
302465
|
this.dom.remove();
|
|
302018
302466
|
}
|
|
302019
302467
|
}, {
|
|
302020
|
-
provide: (
|
|
302021
|
-
let value = view.plugin(
|
|
302468
|
+
provide: (plugin2) => EditorView.scrollMargins.of((view) => {
|
|
302469
|
+
let value = view.plugin(plugin2);
|
|
302022
302470
|
if (!value || value.gutters.length == 0 || !value.fixed)
|
|
302023
302471
|
return null;
|
|
302024
302472
|
return view.textDirection == Direction.LTR ? { left: value.dom.offsetWidth * view.scaleX } : { right: value.dom.offsetWidth * view.scaleX };
|
|
@@ -302283,19 +302731,111 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
302283
302731
|
}
|
|
302284
302732
|
}();
|
|
302285
302733
|
const activeLineGutterHighlighter = /* @__PURE__ */ gutterLineClass.compute(["selection"], (state) => {
|
|
302286
|
-
let
|
|
302734
|
+
let marks2 = [], last = -1;
|
|
302287
302735
|
for (let range of state.selection.ranges) {
|
|
302288
302736
|
let linePos = state.doc.lineAt(range.head).from;
|
|
302289
302737
|
if (linePos > last) {
|
|
302290
302738
|
last = linePos;
|
|
302291
|
-
|
|
302739
|
+
marks2.push(activeLineGutterMarker.range(linePos));
|
|
302292
302740
|
}
|
|
302293
302741
|
}
|
|
302294
|
-
return RangeSet.of(
|
|
302742
|
+
return RangeSet.of(marks2);
|
|
302295
302743
|
});
|
|
302296
302744
|
function highlightActiveLineGutter() {
|
|
302297
302745
|
return activeLineGutterHighlighter;
|
|
302298
302746
|
}
|
|
302747
|
+
function matcher(decorator) {
|
|
302748
|
+
return ViewPlugin.define((view) => ({
|
|
302749
|
+
decorations: decorator.createDeco(view),
|
|
302750
|
+
update(u3) {
|
|
302751
|
+
this.decorations = decorator.updateDeco(u3, this.decorations);
|
|
302752
|
+
}
|
|
302753
|
+
}), {
|
|
302754
|
+
decorations: (v3) => v3.decorations
|
|
302755
|
+
});
|
|
302756
|
+
}
|
|
302757
|
+
const tabDeco = /* @__PURE__ */ Decoration.mark({ class: "cm-highlightTab" });
|
|
302758
|
+
const spaceDeco = /* @__PURE__ */ Decoration.mark({ class: "cm-highlightSpace" });
|
|
302759
|
+
const whitespaceHighlighter = /* @__PURE__ */ matcher(/* @__PURE__ */ new MatchDecorator({
|
|
302760
|
+
regexp: /\t| /g,
|
|
302761
|
+
decoration: (match2) => match2[0] == " " ? tabDeco : spaceDeco,
|
|
302762
|
+
boundary: /\S/
|
|
302763
|
+
}));
|
|
302764
|
+
function highlightWhitespace() {
|
|
302765
|
+
return whitespaceHighlighter;
|
|
302766
|
+
}
|
|
302767
|
+
const trailingHighlighter = /* @__PURE__ */ matcher(/* @__PURE__ */ new MatchDecorator({
|
|
302768
|
+
regexp: /\s+$/g,
|
|
302769
|
+
decoration: /* @__PURE__ */ Decoration.mark({ class: "cm-trailingSpace" }),
|
|
302770
|
+
boundary: /\S/
|
|
302771
|
+
}));
|
|
302772
|
+
function highlightTrailingWhitespace() {
|
|
302773
|
+
return trailingHighlighter;
|
|
302774
|
+
}
|
|
302775
|
+
const __test = {
|
|
302776
|
+
HeightMap,
|
|
302777
|
+
HeightOracle,
|
|
302778
|
+
MeasuredHeights,
|
|
302779
|
+
QueryType: QueryType$1,
|
|
302780
|
+
ChangedRange,
|
|
302781
|
+
computeOrder,
|
|
302782
|
+
moveVisually,
|
|
302783
|
+
clearHeightChangeFlag,
|
|
302784
|
+
getHeightChangeFlag: () => heightChangeFlag
|
|
302785
|
+
};
|
|
302786
|
+
const index$7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
302787
|
+
__proto__: null,
|
|
302788
|
+
BidiSpan,
|
|
302789
|
+
BlockInfo,
|
|
302790
|
+
get BlockType() {
|
|
302791
|
+
return BlockType;
|
|
302792
|
+
},
|
|
302793
|
+
Decoration,
|
|
302794
|
+
get Direction() {
|
|
302795
|
+
return Direction;
|
|
302796
|
+
},
|
|
302797
|
+
EditorView,
|
|
302798
|
+
GutterMarker,
|
|
302799
|
+
MatchDecorator,
|
|
302800
|
+
RectangleMarker,
|
|
302801
|
+
ViewPlugin,
|
|
302802
|
+
ViewUpdate,
|
|
302803
|
+
WidgetType,
|
|
302804
|
+
__test,
|
|
302805
|
+
closeHoverTooltips,
|
|
302806
|
+
crosshairCursor,
|
|
302807
|
+
drawSelection,
|
|
302808
|
+
dropCursor,
|
|
302809
|
+
getDrawSelectionConfig,
|
|
302810
|
+
getPanel,
|
|
302811
|
+
getTooltip,
|
|
302812
|
+
gutter,
|
|
302813
|
+
gutterLineClass,
|
|
302814
|
+
gutterWidgetClass,
|
|
302815
|
+
gutters,
|
|
302816
|
+
hasHoverTooltips,
|
|
302817
|
+
highlightActiveLine,
|
|
302818
|
+
highlightActiveLineGutter,
|
|
302819
|
+
highlightSpecialChars,
|
|
302820
|
+
highlightTrailingWhitespace,
|
|
302821
|
+
highlightWhitespace,
|
|
302822
|
+
hoverTooltip,
|
|
302823
|
+
keymap,
|
|
302824
|
+
layer,
|
|
302825
|
+
lineNumberMarkers,
|
|
302826
|
+
lineNumberWidgetMarker,
|
|
302827
|
+
lineNumbers,
|
|
302828
|
+
logException,
|
|
302829
|
+
panels,
|
|
302830
|
+
placeholder,
|
|
302831
|
+
rectangularSelection,
|
|
302832
|
+
repositionTooltips,
|
|
302833
|
+
runScopeHandlers,
|
|
302834
|
+
scrollPastEnd,
|
|
302835
|
+
showPanel,
|
|
302836
|
+
showTooltip,
|
|
302837
|
+
tooltips
|
|
302838
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
302299
302839
|
const DefaultBufferLength = 1024;
|
|
302300
302840
|
let nextPropID = 0;
|
|
302301
302841
|
class Range$1 {
|
|
@@ -303113,7 +303653,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
303113
303653
|
get node() {
|
|
303114
303654
|
if (!this.buffer)
|
|
303115
303655
|
return this._tree;
|
|
303116
|
-
let cache2 = this.bufferNode, result = null,
|
|
303656
|
+
let cache2 = this.bufferNode, result = null, depth2 = 0;
|
|
303117
303657
|
if (cache2 && cache2.context == this.buffer) {
|
|
303118
303658
|
scan:
|
|
303119
303659
|
for (let index2 = this.index, d3 = this.stack.length; d3 >= 0; ) {
|
|
@@ -303122,13 +303662,13 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
303122
303662
|
if (index2 == this.index)
|
|
303123
303663
|
return c3;
|
|
303124
303664
|
result = c3;
|
|
303125
|
-
|
|
303665
|
+
depth2 = d3 + 1;
|
|
303126
303666
|
break scan;
|
|
303127
303667
|
}
|
|
303128
303668
|
index2 = this.stack[--d3];
|
|
303129
303669
|
}
|
|
303130
303670
|
}
|
|
303131
|
-
for (let i3 =
|
|
303671
|
+
for (let i3 = depth2; i3 < this.stack.length; i3++)
|
|
303132
303672
|
result = new BufferNode(this.buffer, result, this.stack[i3]);
|
|
303133
303673
|
return this.bufferNode = new BufferNode(this.buffer, result, this.index);
|
|
303134
303674
|
}
|
|
@@ -303136,11 +303676,11 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
303136
303676
|
return this.buffer ? null : this._tree._tree;
|
|
303137
303677
|
}
|
|
303138
303678
|
iterate(enter, leave) {
|
|
303139
|
-
for (let
|
|
303679
|
+
for (let depth2 = 0; ; ) {
|
|
303140
303680
|
let mustLeave = false;
|
|
303141
303681
|
if (this.type.isAnonymous || enter(this) !== false) {
|
|
303142
303682
|
if (this.firstChild()) {
|
|
303143
|
-
|
|
303683
|
+
depth2++;
|
|
303144
303684
|
continue;
|
|
303145
303685
|
}
|
|
303146
303686
|
if (!this.type.isAnonymous)
|
|
@@ -303150,12 +303690,12 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
303150
303690
|
if (mustLeave && leave)
|
|
303151
303691
|
leave(this);
|
|
303152
303692
|
mustLeave = this.type.isAnonymous;
|
|
303153
|
-
if (!
|
|
303693
|
+
if (!depth2)
|
|
303154
303694
|
return;
|
|
303155
303695
|
if (this.nextSibling())
|
|
303156
303696
|
break;
|
|
303157
303697
|
this.parent();
|
|
303158
|
-
|
|
303698
|
+
depth2--;
|
|
303159
303699
|
mustLeave = true;
|
|
303160
303700
|
}
|
|
303161
303701
|
}
|
|
@@ -303182,11 +303722,11 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
303182
303722
|
}
|
|
303183
303723
|
function buildTree(data2) {
|
|
303184
303724
|
var _a2;
|
|
303185
|
-
let { buffer, nodeSet, maxBufferLength = DefaultBufferLength, reused = [], minRepeatType =
|
|
303725
|
+
let { buffer, nodeSet: nodeSet2, maxBufferLength = DefaultBufferLength, reused = [], minRepeatType = nodeSet2.types.length } = data2;
|
|
303186
303726
|
let cursor2 = Array.isArray(buffer) ? new FlatBufferCursor(buffer, buffer.length) : buffer;
|
|
303187
|
-
let types2 =
|
|
303727
|
+
let types2 = nodeSet2.types;
|
|
303188
303728
|
let contextHash = 0, lookAhead = 0;
|
|
303189
|
-
function takeNode(parentStart, minPos, children3, positions2, inRepeat,
|
|
303729
|
+
function takeNode(parentStart, minPos, children3, positions2, inRepeat, depth2) {
|
|
303190
303730
|
let { id: id2, start: start2, end: end2, size: size2 } = cursor2;
|
|
303191
303731
|
let lookAheadAtStart = lookAhead, contextAtStart = contextHash;
|
|
303192
303732
|
while (size2 < 0) {
|
|
@@ -303213,7 +303753,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
303213
303753
|
let endPos = cursor2.pos - buffer2.size, index2 = data3.length;
|
|
303214
303754
|
while (cursor2.pos > endPos)
|
|
303215
303755
|
index2 = copyToBuffer(buffer2.start, data3, index2);
|
|
303216
|
-
node2 = new TreeBuffer(data3, end2 - buffer2.start,
|
|
303756
|
+
node2 = new TreeBuffer(data3, end2 - buffer2.start, nodeSet2);
|
|
303217
303757
|
startPos = buffer2.start - parentStart;
|
|
303218
303758
|
} else {
|
|
303219
303759
|
let endPos = cursor2.pos - size2;
|
|
@@ -303229,10 +303769,10 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
303229
303769
|
lastEnd = cursor2.end;
|
|
303230
303770
|
}
|
|
303231
303771
|
cursor2.next();
|
|
303232
|
-
} else if (
|
|
303772
|
+
} else if (depth2 > 2500) {
|
|
303233
303773
|
takeFlatNode(start2, endPos, localChildren, localPositions);
|
|
303234
303774
|
} else {
|
|
303235
|
-
takeNode(start2, endPos, localChildren, localPositions, localInRepeat,
|
|
303775
|
+
takeNode(start2, endPos, localChildren, localPositions, localInRepeat, depth2 + 1);
|
|
303236
303776
|
}
|
|
303237
303777
|
}
|
|
303238
303778
|
if (localInRepeat >= 0 && lastGroup > 0 && lastGroup < localChildren.length)
|
|
@@ -303275,7 +303815,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
303275
303815
|
buffer2[j3++] = nodes[i3 + 2] - start2;
|
|
303276
303816
|
buffer2[j3++] = j3;
|
|
303277
303817
|
}
|
|
303278
|
-
children3.push(new TreeBuffer(buffer2, nodes[2] - start2,
|
|
303818
|
+
children3.push(new TreeBuffer(buffer2, nodes[2] - start2, nodeSet2));
|
|
303279
303819
|
positions2.push(start2 - parentStart);
|
|
303280
303820
|
}
|
|
303281
303821
|
}
|
|
@@ -303297,7 +303837,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
303297
303837
|
localChildren.push(children3.pop());
|
|
303298
303838
|
localPositions.push(positions2.pop() + base2 - from);
|
|
303299
303839
|
}
|
|
303300
|
-
children3.push(makeTree(
|
|
303840
|
+
children3.push(makeTree(nodeSet2.types[type], localChildren, localPositions, to2 - from, lookAhead2 - to2, contextHash2));
|
|
303301
303841
|
positions2.push(from - base2);
|
|
303302
303842
|
}
|
|
303303
303843
|
function makeTree(type, children3, positions2, length2, lookAhead2, contextHash2, props) {
|
|
@@ -304425,6 +304965,31 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
304425
304965
|
let field = state.field(Language.state, false);
|
|
304426
304966
|
return field ? field.tree : Tree.empty;
|
|
304427
304967
|
}
|
|
304968
|
+
function ensureSyntaxTree(state, upto, timeout2 = 50) {
|
|
304969
|
+
var _a2;
|
|
304970
|
+
let parse2 = (_a2 = state.field(Language.state, false)) === null || _a2 === void 0 ? void 0 : _a2.context;
|
|
304971
|
+
if (!parse2)
|
|
304972
|
+
return null;
|
|
304973
|
+
let oldVieport = parse2.viewport;
|
|
304974
|
+
parse2.updateViewport({ from: 0, to: upto });
|
|
304975
|
+
let result = parse2.isDone(upto) || parse2.work(timeout2, upto) ? parse2.tree : null;
|
|
304976
|
+
parse2.updateViewport(oldVieport);
|
|
304977
|
+
return result;
|
|
304978
|
+
}
|
|
304979
|
+
function syntaxTreeAvailable(state, upto = state.doc.length) {
|
|
304980
|
+
var _a2;
|
|
304981
|
+
return ((_a2 = state.field(Language.state, false)) === null || _a2 === void 0 ? void 0 : _a2.context.isDone(upto)) || false;
|
|
304982
|
+
}
|
|
304983
|
+
function forceParsing(view, upto = view.viewport.to, timeout2 = 100) {
|
|
304984
|
+
let success = ensureSyntaxTree(view.state, upto, timeout2);
|
|
304985
|
+
if (success != syntaxTree(view.state))
|
|
304986
|
+
view.dispatch({});
|
|
304987
|
+
return !!success;
|
|
304988
|
+
}
|
|
304989
|
+
function syntaxParserRunning(view) {
|
|
304990
|
+
var _a2;
|
|
304991
|
+
return ((_a2 = view.plugin(parseWorker)) === null || _a2 === void 0 ? void 0 : _a2.isWorking()) || false;
|
|
304992
|
+
}
|
|
304428
304993
|
class DocInput {
|
|
304429
304994
|
constructor(doc2) {
|
|
304430
304995
|
this.doc = doc2;
|
|
@@ -304851,6 +305416,30 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
304851
305416
|
let tree = syntaxTree(context.state);
|
|
304852
305417
|
return tree.length >= pos ? syntaxIndentation(context, tree, pos) : null;
|
|
304853
305418
|
}
|
|
305419
|
+
function indentRange(state, from, to2) {
|
|
305420
|
+
let updated = /* @__PURE__ */ Object.create(null);
|
|
305421
|
+
let context = new IndentContext(state, { overrideIndentation: (start2) => {
|
|
305422
|
+
var _a2;
|
|
305423
|
+
return (_a2 = updated[start2]) !== null && _a2 !== void 0 ? _a2 : -1;
|
|
305424
|
+
} });
|
|
305425
|
+
let changes = [];
|
|
305426
|
+
for (let pos = from; pos <= to2; ) {
|
|
305427
|
+
let line = state.doc.lineAt(pos);
|
|
305428
|
+
pos = line.to + 1;
|
|
305429
|
+
let indent2 = getIndentation(context, line.from);
|
|
305430
|
+
if (indent2 == null)
|
|
305431
|
+
continue;
|
|
305432
|
+
if (!/\S/.test(line.text))
|
|
305433
|
+
indent2 = 0;
|
|
305434
|
+
let cur2 = /^\s*/.exec(line.text)[0];
|
|
305435
|
+
let norm = indentString(state, indent2);
|
|
305436
|
+
if (cur2 != norm) {
|
|
305437
|
+
updated[line.from] = indent2;
|
|
305438
|
+
changes.push({ from: line.from, to: line.from + cur2.length, insert: norm });
|
|
305439
|
+
}
|
|
305440
|
+
}
|
|
305441
|
+
return state.changes(changes);
|
|
305442
|
+
}
|
|
304854
305443
|
class IndentContext {
|
|
304855
305444
|
constructor(state, options = {}) {
|
|
304856
305445
|
this.state = state;
|
|
@@ -305019,6 +305608,37 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
305019
305608
|
return context.baseIndent + (matchExcept ? 0 : units * context.unit);
|
|
305020
305609
|
};
|
|
305021
305610
|
}
|
|
305611
|
+
const DontIndentBeyond = 200;
|
|
305612
|
+
function indentOnInput() {
|
|
305613
|
+
return EditorState.transactionFilter.of((tr2) => {
|
|
305614
|
+
if (!tr2.docChanged || !tr2.isUserEvent("input.type") && !tr2.isUserEvent("input.complete"))
|
|
305615
|
+
return tr2;
|
|
305616
|
+
let rules = tr2.startState.languageDataAt("indentOnInput", tr2.startState.selection.main.head);
|
|
305617
|
+
if (!rules.length)
|
|
305618
|
+
return tr2;
|
|
305619
|
+
let doc2 = tr2.newDoc, { head } = tr2.newSelection.main, line = doc2.lineAt(head);
|
|
305620
|
+
if (head > line.from + DontIndentBeyond)
|
|
305621
|
+
return tr2;
|
|
305622
|
+
let lineStart = doc2.sliceString(line.from, head);
|
|
305623
|
+
if (!rules.some((r3) => r3.test(lineStart)))
|
|
305624
|
+
return tr2;
|
|
305625
|
+
let { state } = tr2, last = -1, changes = [];
|
|
305626
|
+
for (let { head: head2 } of state.selection.ranges) {
|
|
305627
|
+
let line2 = state.doc.lineAt(head2);
|
|
305628
|
+
if (line2.from == last)
|
|
305629
|
+
continue;
|
|
305630
|
+
last = line2.from;
|
|
305631
|
+
let indent2 = getIndentation(state, line2.from);
|
|
305632
|
+
if (indent2 == null)
|
|
305633
|
+
continue;
|
|
305634
|
+
let cur2 = /^\s*/.exec(line2.text)[0];
|
|
305635
|
+
let norm = indentString(state, indent2);
|
|
305636
|
+
if (cur2 != norm)
|
|
305637
|
+
changes.push({ from: line2.from, to: line2.from + cur2.length, insert: norm });
|
|
305638
|
+
}
|
|
305639
|
+
return changes.length ? [tr2, { changes, sequential: true }] : tr2;
|
|
305640
|
+
});
|
|
305641
|
+
}
|
|
305022
305642
|
const foldService = /* @__PURE__ */ Facet.define();
|
|
305023
305643
|
const foldNodeProp = /* @__PURE__ */ new NodeProp();
|
|
305024
305644
|
function foldInside(node2) {
|
|
@@ -305128,6 +305748,9 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
305128
305748
|
return Decoration.set(ranges, true);
|
|
305129
305749
|
}
|
|
305130
305750
|
});
|
|
305751
|
+
function foldedRanges(state) {
|
|
305752
|
+
return state.field(foldState, false) || RangeSet.empty;
|
|
305753
|
+
}
|
|
305131
305754
|
function findFold(state, from, to2) {
|
|
305132
305755
|
var _a2;
|
|
305133
305756
|
let found = null;
|
|
@@ -305198,6 +305821,32 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
305198
305821
|
view.dispatch({ effects });
|
|
305199
305822
|
return true;
|
|
305200
305823
|
};
|
|
305824
|
+
function foldableContainer(view, lineBlock) {
|
|
305825
|
+
for (let line = lineBlock; ; ) {
|
|
305826
|
+
let foldableRegion = foldable(view.state, line.from, line.to);
|
|
305827
|
+
if (foldableRegion && foldableRegion.to > lineBlock.from)
|
|
305828
|
+
return foldableRegion;
|
|
305829
|
+
if (!line.from)
|
|
305830
|
+
return null;
|
|
305831
|
+
line = view.lineBlockAt(line.from - 1);
|
|
305832
|
+
}
|
|
305833
|
+
}
|
|
305834
|
+
const toggleFold = (view) => {
|
|
305835
|
+
let effects = [];
|
|
305836
|
+
for (let line of selectedLines(view)) {
|
|
305837
|
+
let folded = findFold(view.state, line.from, line.to);
|
|
305838
|
+
if (folded) {
|
|
305839
|
+
effects.push(unfoldEffect.of(folded), announceFold(view, folded, false));
|
|
305840
|
+
} else {
|
|
305841
|
+
let foldRange = foldableContainer(view, line);
|
|
305842
|
+
if (foldRange)
|
|
305843
|
+
effects.push(foldEffect.of(foldRange), announceFold(view, foldRange));
|
|
305844
|
+
}
|
|
305845
|
+
}
|
|
305846
|
+
if (effects.length > 0)
|
|
305847
|
+
view.dispatch({ effects: maybeEnable(view.state, effects) });
|
|
305848
|
+
return !!effects.length;
|
|
305849
|
+
};
|
|
305201
305850
|
const foldKeymap = [
|
|
305202
305851
|
{ key: "Ctrl-Shift-[", mac: "Cmd-Alt-[", run: foldCode },
|
|
305203
305852
|
{ key: "Ctrl-Shift-]", mac: "Cmd-Alt-]", run: unfoldCode },
|
|
@@ -305401,6 +306050,19 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
305401
306050
|
ext.push(highlighterFacet.of(highlighter));
|
|
305402
306051
|
return ext;
|
|
305403
306052
|
}
|
|
306053
|
+
function highlightingFor(state, tags2, scope) {
|
|
306054
|
+
let highlighters = getHighlighters(state);
|
|
306055
|
+
let result = null;
|
|
306056
|
+
if (highlighters)
|
|
306057
|
+
for (let highlighter of highlighters) {
|
|
306058
|
+
if (!highlighter.scope || scope && highlighter.scope(scope)) {
|
|
306059
|
+
let cls = highlighter.style(tags2);
|
|
306060
|
+
if (cls)
|
|
306061
|
+
result = result ? result + " " + cls : cls;
|
|
306062
|
+
}
|
|
306063
|
+
}
|
|
306064
|
+
return result;
|
|
306065
|
+
}
|
|
305404
306066
|
class TreeHighlighter {
|
|
305405
306067
|
constructor(view) {
|
|
305406
306068
|
this.markCache = /* @__PURE__ */ Object.create(null);
|
|
@@ -305597,17 +306259,17 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
305597
306259
|
}
|
|
305598
306260
|
function matchMarkedBrackets(_state, _pos, dir, token, handle2, matching, brackets) {
|
|
305599
306261
|
let parent = token.parent, firstToken = { from: handle2.from, to: handle2.to };
|
|
305600
|
-
let
|
|
306262
|
+
let depth2 = 0, cursor2 = parent === null || parent === void 0 ? void 0 : parent.cursor();
|
|
305601
306263
|
if (cursor2 && (dir < 0 ? cursor2.childBefore(token.from) : cursor2.childAfter(token.to)))
|
|
305602
306264
|
do {
|
|
305603
306265
|
if (dir < 0 ? cursor2.to <= token.from : cursor2.from >= token.to) {
|
|
305604
|
-
if (
|
|
306266
|
+
if (depth2 == 0 && matching.indexOf(cursor2.type.name) > -1 && cursor2.from < cursor2.to) {
|
|
305605
306267
|
let endHandle = findHandle(cursor2);
|
|
305606
306268
|
return { start: firstToken, end: endHandle ? { from: endHandle.from, to: endHandle.to } : void 0, matched: true };
|
|
305607
306269
|
} else if (matchingNodes(cursor2.type, dir, brackets)) {
|
|
305608
|
-
|
|
306270
|
+
depth2++;
|
|
305609
306271
|
} else if (matchingNodes(cursor2.type, -dir, brackets)) {
|
|
305610
|
-
if (
|
|
306272
|
+
if (depth2 == 0) {
|
|
305611
306273
|
let endHandle = findHandle(cursor2);
|
|
305612
306274
|
return {
|
|
305613
306275
|
start: firstToken,
|
|
@@ -305615,7 +306277,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
305615
306277
|
matched: false
|
|
305616
306278
|
};
|
|
305617
306279
|
}
|
|
305618
|
-
|
|
306280
|
+
depth2--;
|
|
305619
306281
|
}
|
|
305620
306282
|
}
|
|
305621
306283
|
} while (dir < 0 ? cursor2.prevSibling() : cursor2.nextSibling());
|
|
@@ -305627,7 +306289,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
305627
306289
|
if (bracket2 < 0 || bracket2 % 2 == 0 != dir > 0)
|
|
305628
306290
|
return null;
|
|
305629
306291
|
let startToken = { from: dir < 0 ? pos - 1 : pos, to: dir > 0 ? pos + 1 : pos };
|
|
305630
|
-
let iter = state.doc.iterRange(pos, dir > 0 ? state.doc.length : 0),
|
|
306292
|
+
let iter = state.doc.iterRange(pos, dir > 0 ? state.doc.length : 0), depth2 = 0;
|
|
305631
306293
|
for (let distance = 0; !iter.next().done && distance <= maxScanDistance; ) {
|
|
305632
306294
|
let text2 = iter.value;
|
|
305633
306295
|
if (dir < 0)
|
|
@@ -305638,11 +306300,11 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
305638
306300
|
if (found < 0 || tree.resolveInner(basePos + pos2, 1).type != tokenType)
|
|
305639
306301
|
continue;
|
|
305640
306302
|
if (found % 2 == 0 == dir > 0) {
|
|
305641
|
-
|
|
305642
|
-
} else if (
|
|
306303
|
+
depth2++;
|
|
306304
|
+
} else if (depth2 == 1) {
|
|
305643
306305
|
return { start: startToken, end: { from: basePos + pos2, to: basePos + pos2 + 1 }, matched: found >> 1 == bracket2 >> 1 };
|
|
305644
306306
|
} else {
|
|
305645
|
-
|
|
306307
|
+
depth2--;
|
|
305646
306308
|
}
|
|
305647
306309
|
}
|
|
305648
306310
|
if (dir > 0)
|
|
@@ -305650,8 +306312,396 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
305650
306312
|
}
|
|
305651
306313
|
return iter.done ? { start: startToken, matched: false } : null;
|
|
305652
306314
|
}
|
|
306315
|
+
function countCol(string2, end2, tabSize, startIndex = 0, startValue = 0) {
|
|
306316
|
+
if (end2 == null) {
|
|
306317
|
+
end2 = string2.search(/[^\s\u00a0]/);
|
|
306318
|
+
if (end2 == -1)
|
|
306319
|
+
end2 = string2.length;
|
|
306320
|
+
}
|
|
306321
|
+
let n3 = startValue;
|
|
306322
|
+
for (let i3 = startIndex; i3 < end2; i3++) {
|
|
306323
|
+
if (string2.charCodeAt(i3) == 9)
|
|
306324
|
+
n3 += tabSize - n3 % tabSize;
|
|
306325
|
+
else
|
|
306326
|
+
n3++;
|
|
306327
|
+
}
|
|
306328
|
+
return n3;
|
|
306329
|
+
}
|
|
306330
|
+
class StringStream {
|
|
306331
|
+
constructor(string2, tabSize, indentUnit2, overrideIndent) {
|
|
306332
|
+
this.string = string2;
|
|
306333
|
+
this.tabSize = tabSize;
|
|
306334
|
+
this.indentUnit = indentUnit2;
|
|
306335
|
+
this.overrideIndent = overrideIndent;
|
|
306336
|
+
this.pos = 0;
|
|
306337
|
+
this.start = 0;
|
|
306338
|
+
this.lastColumnPos = 0;
|
|
306339
|
+
this.lastColumnValue = 0;
|
|
306340
|
+
}
|
|
306341
|
+
eol() {
|
|
306342
|
+
return this.pos >= this.string.length;
|
|
306343
|
+
}
|
|
306344
|
+
sol() {
|
|
306345
|
+
return this.pos == 0;
|
|
306346
|
+
}
|
|
306347
|
+
peek() {
|
|
306348
|
+
return this.string.charAt(this.pos) || void 0;
|
|
306349
|
+
}
|
|
306350
|
+
next() {
|
|
306351
|
+
if (this.pos < this.string.length)
|
|
306352
|
+
return this.string.charAt(this.pos++);
|
|
306353
|
+
}
|
|
306354
|
+
eat(match2) {
|
|
306355
|
+
let ch2 = this.string.charAt(this.pos);
|
|
306356
|
+
let ok2;
|
|
306357
|
+
if (typeof match2 == "string")
|
|
306358
|
+
ok2 = ch2 == match2;
|
|
306359
|
+
else
|
|
306360
|
+
ok2 = ch2 && (match2 instanceof RegExp ? match2.test(ch2) : match2(ch2));
|
|
306361
|
+
if (ok2) {
|
|
306362
|
+
++this.pos;
|
|
306363
|
+
return ch2;
|
|
306364
|
+
}
|
|
306365
|
+
}
|
|
306366
|
+
eatWhile(match2) {
|
|
306367
|
+
let start2 = this.pos;
|
|
306368
|
+
while (this.eat(match2)) {
|
|
306369
|
+
}
|
|
306370
|
+
return this.pos > start2;
|
|
306371
|
+
}
|
|
306372
|
+
eatSpace() {
|
|
306373
|
+
let start2 = this.pos;
|
|
306374
|
+
while (/[\s\u00a0]/.test(this.string.charAt(this.pos)))
|
|
306375
|
+
++this.pos;
|
|
306376
|
+
return this.pos > start2;
|
|
306377
|
+
}
|
|
306378
|
+
skipToEnd() {
|
|
306379
|
+
this.pos = this.string.length;
|
|
306380
|
+
}
|
|
306381
|
+
skipTo(ch2) {
|
|
306382
|
+
let found = this.string.indexOf(ch2, this.pos);
|
|
306383
|
+
if (found > -1) {
|
|
306384
|
+
this.pos = found;
|
|
306385
|
+
return true;
|
|
306386
|
+
}
|
|
306387
|
+
}
|
|
306388
|
+
backUp(n3) {
|
|
306389
|
+
this.pos -= n3;
|
|
306390
|
+
}
|
|
306391
|
+
column() {
|
|
306392
|
+
if (this.lastColumnPos < this.start) {
|
|
306393
|
+
this.lastColumnValue = countCol(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);
|
|
306394
|
+
this.lastColumnPos = this.start;
|
|
306395
|
+
}
|
|
306396
|
+
return this.lastColumnValue;
|
|
306397
|
+
}
|
|
306398
|
+
indentation() {
|
|
306399
|
+
var _a2;
|
|
306400
|
+
return (_a2 = this.overrideIndent) !== null && _a2 !== void 0 ? _a2 : countCol(this.string, null, this.tabSize);
|
|
306401
|
+
}
|
|
306402
|
+
match(pattern, consume, caseInsensitive) {
|
|
306403
|
+
if (typeof pattern == "string") {
|
|
306404
|
+
let cased = (str) => caseInsensitive ? str.toLowerCase() : str;
|
|
306405
|
+
let substr = this.string.substr(this.pos, pattern.length);
|
|
306406
|
+
if (cased(substr) == cased(pattern)) {
|
|
306407
|
+
if (consume !== false)
|
|
306408
|
+
this.pos += pattern.length;
|
|
306409
|
+
return true;
|
|
306410
|
+
} else
|
|
306411
|
+
return null;
|
|
306412
|
+
} else {
|
|
306413
|
+
let match2 = this.string.slice(this.pos).match(pattern);
|
|
306414
|
+
if (match2 && match2.index > 0)
|
|
306415
|
+
return null;
|
|
306416
|
+
if (match2 && consume !== false)
|
|
306417
|
+
this.pos += match2[0].length;
|
|
306418
|
+
return match2;
|
|
306419
|
+
}
|
|
306420
|
+
}
|
|
306421
|
+
current() {
|
|
306422
|
+
return this.string.slice(this.start, this.pos);
|
|
306423
|
+
}
|
|
306424
|
+
}
|
|
306425
|
+
function fullParser(spec) {
|
|
306426
|
+
return {
|
|
306427
|
+
name: spec.name || "",
|
|
306428
|
+
token: spec.token,
|
|
306429
|
+
blankLine: spec.blankLine || (() => {
|
|
306430
|
+
}),
|
|
306431
|
+
startState: spec.startState || (() => true),
|
|
306432
|
+
copyState: spec.copyState || defaultCopyState,
|
|
306433
|
+
indent: spec.indent || (() => null),
|
|
306434
|
+
languageData: spec.languageData || {},
|
|
306435
|
+
tokenTable: spec.tokenTable || noTokens
|
|
306436
|
+
};
|
|
306437
|
+
}
|
|
306438
|
+
function defaultCopyState(state) {
|
|
306439
|
+
if (typeof state != "object")
|
|
306440
|
+
return state;
|
|
306441
|
+
let newState = {};
|
|
306442
|
+
for (let prop in state) {
|
|
306443
|
+
let val = state[prop];
|
|
306444
|
+
newState[prop] = val instanceof Array ? val.slice() : val;
|
|
306445
|
+
}
|
|
306446
|
+
return newState;
|
|
306447
|
+
}
|
|
306448
|
+
const IndentedFrom = /* @__PURE__ */ new WeakMap();
|
|
306449
|
+
class StreamLanguage extends Language {
|
|
306450
|
+
constructor(parser2) {
|
|
306451
|
+
let data2 = defineLanguageFacet(parser2.languageData);
|
|
306452
|
+
let p3 = fullParser(parser2), self2;
|
|
306453
|
+
let impl = new class extends Parser {
|
|
306454
|
+
createParse(input, fragments, ranges) {
|
|
306455
|
+
return new Parse$1(self2, input, fragments, ranges);
|
|
306456
|
+
}
|
|
306457
|
+
}();
|
|
306458
|
+
super(data2, impl, [indentService.of((cx, pos) => this.getIndent(cx, pos))], parser2.name);
|
|
306459
|
+
this.topNode = docID(data2);
|
|
306460
|
+
self2 = this;
|
|
306461
|
+
this.streamParser = p3;
|
|
306462
|
+
this.stateAfter = new NodeProp({ perNode: true });
|
|
306463
|
+
this.tokenTable = parser2.tokenTable ? new TokenTable(p3.tokenTable) : defaultTokenTable;
|
|
306464
|
+
}
|
|
306465
|
+
static define(spec) {
|
|
306466
|
+
return new StreamLanguage(spec);
|
|
306467
|
+
}
|
|
306468
|
+
getIndent(cx, pos) {
|
|
306469
|
+
let tree = syntaxTree(cx.state), at2 = tree.resolve(pos);
|
|
306470
|
+
while (at2 && at2.type != this.topNode)
|
|
306471
|
+
at2 = at2.parent;
|
|
306472
|
+
if (!at2)
|
|
306473
|
+
return null;
|
|
306474
|
+
let from = void 0;
|
|
306475
|
+
let { overrideIndentation } = cx.options;
|
|
306476
|
+
if (overrideIndentation) {
|
|
306477
|
+
from = IndentedFrom.get(cx.state);
|
|
306478
|
+
if (from != null && from < pos - 1e4)
|
|
306479
|
+
from = void 0;
|
|
306480
|
+
}
|
|
306481
|
+
let start2 = findState(this, tree, 0, at2.from, from !== null && from !== void 0 ? from : pos), statePos, state;
|
|
306482
|
+
if (start2) {
|
|
306483
|
+
state = start2.state;
|
|
306484
|
+
statePos = start2.pos + 1;
|
|
306485
|
+
} else {
|
|
306486
|
+
state = this.streamParser.startState(cx.unit);
|
|
306487
|
+
statePos = 0;
|
|
306488
|
+
}
|
|
306489
|
+
if (pos - statePos > 1e4)
|
|
306490
|
+
return null;
|
|
306491
|
+
while (statePos < pos) {
|
|
306492
|
+
let line2 = cx.state.doc.lineAt(statePos), end2 = Math.min(pos, line2.to);
|
|
306493
|
+
if (line2.length) {
|
|
306494
|
+
let indentation2 = overrideIndentation ? overrideIndentation(line2.from) : -1;
|
|
306495
|
+
let stream = new StringStream(line2.text, cx.state.tabSize, cx.unit, indentation2 < 0 ? void 0 : indentation2);
|
|
306496
|
+
while (stream.pos < end2 - line2.from)
|
|
306497
|
+
readToken$1(this.streamParser.token, stream, state);
|
|
306498
|
+
} else {
|
|
306499
|
+
this.streamParser.blankLine(state, cx.unit);
|
|
306500
|
+
}
|
|
306501
|
+
if (end2 == pos)
|
|
306502
|
+
break;
|
|
306503
|
+
statePos = line2.to + 1;
|
|
306504
|
+
}
|
|
306505
|
+
let line = cx.lineAt(pos);
|
|
306506
|
+
if (overrideIndentation && from == null)
|
|
306507
|
+
IndentedFrom.set(cx.state, line.from);
|
|
306508
|
+
return this.streamParser.indent(state, /^\s*(.*)/.exec(line.text)[1], cx);
|
|
306509
|
+
}
|
|
306510
|
+
get allowsNesting() {
|
|
306511
|
+
return false;
|
|
306512
|
+
}
|
|
306513
|
+
}
|
|
306514
|
+
function findState(lang, tree, off, startPos, before) {
|
|
306515
|
+
let state = off >= startPos && off + tree.length <= before && tree.prop(lang.stateAfter);
|
|
306516
|
+
if (state)
|
|
306517
|
+
return { state: lang.streamParser.copyState(state), pos: off + tree.length };
|
|
306518
|
+
for (let i3 = tree.children.length - 1; i3 >= 0; i3--) {
|
|
306519
|
+
let child = tree.children[i3], pos = off + tree.positions[i3];
|
|
306520
|
+
let found = child instanceof Tree && pos < before && findState(lang, child, pos, startPos, before);
|
|
306521
|
+
if (found)
|
|
306522
|
+
return found;
|
|
306523
|
+
}
|
|
306524
|
+
return null;
|
|
306525
|
+
}
|
|
306526
|
+
function cutTree(lang, tree, from, to2, inside2) {
|
|
306527
|
+
if (inside2 && from <= 0 && to2 >= tree.length)
|
|
306528
|
+
return tree;
|
|
306529
|
+
if (!inside2 && tree.type == lang.topNode)
|
|
306530
|
+
inside2 = true;
|
|
306531
|
+
for (let i3 = tree.children.length - 1; i3 >= 0; i3--) {
|
|
306532
|
+
let pos = tree.positions[i3], child = tree.children[i3], inner;
|
|
306533
|
+
if (pos < to2 && child instanceof Tree) {
|
|
306534
|
+
if (!(inner = cutTree(lang, child, from - pos, to2 - pos, inside2)))
|
|
306535
|
+
break;
|
|
306536
|
+
return !inside2 ? inner : new Tree(tree.type, tree.children.slice(0, i3).concat(inner), tree.positions.slice(0, i3 + 1), pos + inner.length);
|
|
306537
|
+
}
|
|
306538
|
+
}
|
|
306539
|
+
return null;
|
|
306540
|
+
}
|
|
306541
|
+
function findStartInFragments(lang, fragments, startPos, editorState) {
|
|
306542
|
+
for (let f3 of fragments) {
|
|
306543
|
+
let from = f3.from + (f3.openStart ? 25 : 0), to2 = f3.to - (f3.openEnd ? 25 : 0);
|
|
306544
|
+
let found = from <= startPos && to2 > startPos && findState(lang, f3.tree, 0 - f3.offset, startPos, to2), tree;
|
|
306545
|
+
if (found && (tree = cutTree(lang, f3.tree, startPos + f3.offset, found.pos + f3.offset, false)))
|
|
306546
|
+
return { state: found.state, tree };
|
|
306547
|
+
}
|
|
306548
|
+
return { state: lang.streamParser.startState(editorState ? getIndentUnit(editorState) : 4), tree: Tree.empty };
|
|
306549
|
+
}
|
|
306550
|
+
class Parse$1 {
|
|
306551
|
+
constructor(lang, input, fragments, ranges) {
|
|
306552
|
+
this.lang = lang;
|
|
306553
|
+
this.input = input;
|
|
306554
|
+
this.fragments = fragments;
|
|
306555
|
+
this.ranges = ranges;
|
|
306556
|
+
this.stoppedAt = null;
|
|
306557
|
+
this.chunks = [];
|
|
306558
|
+
this.chunkPos = [];
|
|
306559
|
+
this.chunk = [];
|
|
306560
|
+
this.chunkReused = void 0;
|
|
306561
|
+
this.rangeIndex = 0;
|
|
306562
|
+
this.to = ranges[ranges.length - 1].to;
|
|
306563
|
+
let context = ParseContext.get(), from = ranges[0].from;
|
|
306564
|
+
let { state, tree } = findStartInFragments(lang, fragments, from, context === null || context === void 0 ? void 0 : context.state);
|
|
306565
|
+
this.state = state;
|
|
306566
|
+
this.parsedPos = this.chunkStart = from + tree.length;
|
|
306567
|
+
for (let i3 = 0; i3 < tree.children.length; i3++) {
|
|
306568
|
+
this.chunks.push(tree.children[i3]);
|
|
306569
|
+
this.chunkPos.push(tree.positions[i3]);
|
|
306570
|
+
}
|
|
306571
|
+
if (context && this.parsedPos < context.viewport.from - 1e5) {
|
|
306572
|
+
this.state = this.lang.streamParser.startState(getIndentUnit(context.state));
|
|
306573
|
+
context.skipUntilInView(this.parsedPos, context.viewport.from);
|
|
306574
|
+
this.parsedPos = context.viewport.from;
|
|
306575
|
+
}
|
|
306576
|
+
this.moveRangeIndex();
|
|
306577
|
+
}
|
|
306578
|
+
advance() {
|
|
306579
|
+
let context = ParseContext.get();
|
|
306580
|
+
let parseEnd = this.stoppedAt == null ? this.to : Math.min(this.to, this.stoppedAt);
|
|
306581
|
+
let end2 = Math.min(parseEnd, this.chunkStart + 2048);
|
|
306582
|
+
if (context)
|
|
306583
|
+
end2 = Math.min(end2, context.viewport.to);
|
|
306584
|
+
while (this.parsedPos < end2)
|
|
306585
|
+
this.parseLine(context);
|
|
306586
|
+
if (this.chunkStart < this.parsedPos)
|
|
306587
|
+
this.finishChunk();
|
|
306588
|
+
if (this.parsedPos >= parseEnd)
|
|
306589
|
+
return this.finish();
|
|
306590
|
+
if (context && this.parsedPos >= context.viewport.to) {
|
|
306591
|
+
context.skipUntilInView(this.parsedPos, parseEnd);
|
|
306592
|
+
return this.finish();
|
|
306593
|
+
}
|
|
306594
|
+
return null;
|
|
306595
|
+
}
|
|
306596
|
+
stopAt(pos) {
|
|
306597
|
+
this.stoppedAt = pos;
|
|
306598
|
+
}
|
|
306599
|
+
lineAfter(pos) {
|
|
306600
|
+
let chunk = this.input.chunk(pos);
|
|
306601
|
+
if (!this.input.lineChunks) {
|
|
306602
|
+
let eol2 = chunk.indexOf("\n");
|
|
306603
|
+
if (eol2 > -1)
|
|
306604
|
+
chunk = chunk.slice(0, eol2);
|
|
306605
|
+
} else if (chunk == "\n") {
|
|
306606
|
+
chunk = "";
|
|
306607
|
+
}
|
|
306608
|
+
return pos + chunk.length <= this.to ? chunk : chunk.slice(0, this.to - pos);
|
|
306609
|
+
}
|
|
306610
|
+
nextLine() {
|
|
306611
|
+
let from = this.parsedPos, line = this.lineAfter(from), end2 = from + line.length;
|
|
306612
|
+
for (let index2 = this.rangeIndex; ; ) {
|
|
306613
|
+
let rangeEnd2 = this.ranges[index2].to;
|
|
306614
|
+
if (rangeEnd2 >= end2)
|
|
306615
|
+
break;
|
|
306616
|
+
line = line.slice(0, rangeEnd2 - (end2 - line.length));
|
|
306617
|
+
index2++;
|
|
306618
|
+
if (index2 == this.ranges.length)
|
|
306619
|
+
break;
|
|
306620
|
+
let rangeStart = this.ranges[index2].from;
|
|
306621
|
+
let after = this.lineAfter(rangeStart);
|
|
306622
|
+
line += after;
|
|
306623
|
+
end2 = rangeStart + after.length;
|
|
306624
|
+
}
|
|
306625
|
+
return { line, end: end2 };
|
|
306626
|
+
}
|
|
306627
|
+
skipGapsTo(pos, offset2, side) {
|
|
306628
|
+
for (; ; ) {
|
|
306629
|
+
let end2 = this.ranges[this.rangeIndex].to, offPos = pos + offset2;
|
|
306630
|
+
if (side > 0 ? end2 > offPos : end2 >= offPos)
|
|
306631
|
+
break;
|
|
306632
|
+
let start2 = this.ranges[++this.rangeIndex].from;
|
|
306633
|
+
offset2 += start2 - end2;
|
|
306634
|
+
}
|
|
306635
|
+
return offset2;
|
|
306636
|
+
}
|
|
306637
|
+
moveRangeIndex() {
|
|
306638
|
+
while (this.ranges[this.rangeIndex].to < this.parsedPos)
|
|
306639
|
+
this.rangeIndex++;
|
|
306640
|
+
}
|
|
306641
|
+
emitToken(id2, from, to2, size2, offset2) {
|
|
306642
|
+
if (this.ranges.length > 1) {
|
|
306643
|
+
offset2 = this.skipGapsTo(from, offset2, 1);
|
|
306644
|
+
from += offset2;
|
|
306645
|
+
let len0 = this.chunk.length;
|
|
306646
|
+
offset2 = this.skipGapsTo(to2, offset2, -1);
|
|
306647
|
+
to2 += offset2;
|
|
306648
|
+
size2 += this.chunk.length - len0;
|
|
306649
|
+
}
|
|
306650
|
+
this.chunk.push(id2, from, to2, size2);
|
|
306651
|
+
return offset2;
|
|
306652
|
+
}
|
|
306653
|
+
parseLine(context) {
|
|
306654
|
+
let { line, end: end2 } = this.nextLine(), offset2 = 0, { streamParser } = this.lang;
|
|
306655
|
+
let stream = new StringStream(line, context ? context.state.tabSize : 4, context ? getIndentUnit(context.state) : 2);
|
|
306656
|
+
if (stream.eol()) {
|
|
306657
|
+
streamParser.blankLine(this.state, stream.indentUnit);
|
|
306658
|
+
} else {
|
|
306659
|
+
while (!stream.eol()) {
|
|
306660
|
+
let token = readToken$1(streamParser.token, stream, this.state);
|
|
306661
|
+
if (token)
|
|
306662
|
+
offset2 = this.emitToken(this.lang.tokenTable.resolve(token), this.parsedPos + stream.start, this.parsedPos + stream.pos, 4, offset2);
|
|
306663
|
+
if (stream.start > 1e4)
|
|
306664
|
+
break;
|
|
306665
|
+
}
|
|
306666
|
+
}
|
|
306667
|
+
this.parsedPos = end2;
|
|
306668
|
+
this.moveRangeIndex();
|
|
306669
|
+
if (this.parsedPos < this.to)
|
|
306670
|
+
this.parsedPos++;
|
|
306671
|
+
}
|
|
306672
|
+
finishChunk() {
|
|
306673
|
+
let tree = Tree.build({
|
|
306674
|
+
buffer: this.chunk,
|
|
306675
|
+
start: this.chunkStart,
|
|
306676
|
+
length: this.parsedPos - this.chunkStart,
|
|
306677
|
+
nodeSet,
|
|
306678
|
+
topID: 0,
|
|
306679
|
+
maxBufferLength: 2048,
|
|
306680
|
+
reused: this.chunkReused
|
|
306681
|
+
});
|
|
306682
|
+
tree = new Tree(tree.type, tree.children, tree.positions, tree.length, [[this.lang.stateAfter, this.lang.streamParser.copyState(this.state)]]);
|
|
306683
|
+
this.chunks.push(tree);
|
|
306684
|
+
this.chunkPos.push(this.chunkStart - this.ranges[0].from);
|
|
306685
|
+
this.chunk = [];
|
|
306686
|
+
this.chunkReused = void 0;
|
|
306687
|
+
this.chunkStart = this.parsedPos;
|
|
306688
|
+
}
|
|
306689
|
+
finish() {
|
|
306690
|
+
return new Tree(this.lang.topNode, this.chunks, this.chunkPos, this.parsedPos - this.ranges[0].from).balance();
|
|
306691
|
+
}
|
|
306692
|
+
}
|
|
306693
|
+
function readToken$1(token, stream, state) {
|
|
306694
|
+
stream.start = stream.pos;
|
|
306695
|
+
for (let i3 = 0; i3 < 10; i3++) {
|
|
306696
|
+
let result = token(stream, state);
|
|
306697
|
+
if (stream.pos > stream.start)
|
|
306698
|
+
return result;
|
|
306699
|
+
}
|
|
306700
|
+
throw new Error("Stream parser failed to advance stream.");
|
|
306701
|
+
}
|
|
305653
306702
|
const noTokens = /* @__PURE__ */ Object.create(null);
|
|
305654
306703
|
const typeArray = [NodeType.none];
|
|
306704
|
+
const nodeSet = /* @__PURE__ */ new NodeSet(typeArray);
|
|
305655
306705
|
const warned = [];
|
|
305656
306706
|
const byTag = /* @__PURE__ */ Object.create(null);
|
|
305657
306707
|
const defaultTable = /* @__PURE__ */ Object.create(null);
|
|
@@ -305670,6 +306720,16 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
305670
306720
|
["property", "propertyName"]
|
|
305671
306721
|
])
|
|
305672
306722
|
defaultTable[legacyName] = /* @__PURE__ */ createTokenType(noTokens, name2);
|
|
306723
|
+
class TokenTable {
|
|
306724
|
+
constructor(extra) {
|
|
306725
|
+
this.extra = extra;
|
|
306726
|
+
this.table = Object.assign(/* @__PURE__ */ Object.create(null), defaultTable);
|
|
306727
|
+
}
|
|
306728
|
+
resolve(tag2) {
|
|
306729
|
+
return !tag2 ? 0 : this.table[tag2] || (this.table[tag2] = createTokenType(this.extra, tag2));
|
|
306730
|
+
}
|
|
306731
|
+
}
|
|
306732
|
+
const defaultTokenTable = /* @__PURE__ */ new TokenTable(noTokens);
|
|
305673
306733
|
function warnForPart(part, msg2) {
|
|
305674
306734
|
if (warned.indexOf(part) > -1)
|
|
305675
306735
|
return;
|
|
@@ -305713,11 +306773,175 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
305713
306773
|
typeArray.push(type);
|
|
305714
306774
|
return type.id;
|
|
305715
306775
|
}
|
|
305716
|
-
({
|
|
306776
|
+
function docID(data2) {
|
|
306777
|
+
let type = NodeType.define({ id: typeArray.length, name: "Document", props: [languageDataProp.add(() => data2)], top: true });
|
|
306778
|
+
typeArray.push(type);
|
|
306779
|
+
return type;
|
|
306780
|
+
}
|
|
306781
|
+
function buildForLine(line) {
|
|
306782
|
+
return line.length <= 4096 && /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/.test(line);
|
|
306783
|
+
}
|
|
306784
|
+
function textHasRTL(text2) {
|
|
306785
|
+
for (let i3 = text2.iter(); !i3.next().done; )
|
|
306786
|
+
if (buildForLine(i3.value))
|
|
306787
|
+
return true;
|
|
306788
|
+
return false;
|
|
306789
|
+
}
|
|
306790
|
+
function changeAddsRTL(change) {
|
|
306791
|
+
let added = false;
|
|
306792
|
+
change.iterChanges((fA2, tA2, fB2, tB2, ins) => {
|
|
306793
|
+
if (!added && textHasRTL(ins))
|
|
306794
|
+
added = true;
|
|
306795
|
+
});
|
|
306796
|
+
return added;
|
|
306797
|
+
}
|
|
306798
|
+
const alwaysIsolate = /* @__PURE__ */ Facet.define({ combine: (values2) => values2.some((x3) => x3) });
|
|
306799
|
+
function bidiIsolates(options = {}) {
|
|
306800
|
+
let extensions = [isolateMarks];
|
|
306801
|
+
if (options.alwaysIsolate)
|
|
306802
|
+
extensions.push(alwaysIsolate.of(true));
|
|
306803
|
+
return extensions;
|
|
306804
|
+
}
|
|
306805
|
+
const isolateMarks = /* @__PURE__ */ ViewPlugin.fromClass(class {
|
|
306806
|
+
constructor(view) {
|
|
306807
|
+
this.always = view.state.facet(alwaysIsolate) || view.textDirection != Direction.LTR || view.state.facet(EditorView.perLineTextDirection);
|
|
306808
|
+
this.hasRTL = !this.always && textHasRTL(view.state.doc);
|
|
306809
|
+
this.tree = syntaxTree(view.state);
|
|
306810
|
+
this.decorations = this.always || this.hasRTL ? buildDeco(view, this.tree, this.always) : Decoration.none;
|
|
306811
|
+
}
|
|
306812
|
+
update(update) {
|
|
306813
|
+
let always = update.state.facet(alwaysIsolate) || update.view.textDirection != Direction.LTR || update.state.facet(EditorView.perLineTextDirection);
|
|
306814
|
+
if (!always && !this.hasRTL && changeAddsRTL(update.changes))
|
|
306815
|
+
this.hasRTL = true;
|
|
306816
|
+
if (!always && !this.hasRTL)
|
|
306817
|
+
return;
|
|
306818
|
+
let tree = syntaxTree(update.state);
|
|
306819
|
+
if (always != this.always || tree != this.tree || update.docChanged || update.viewportChanged) {
|
|
306820
|
+
this.tree = tree;
|
|
306821
|
+
this.always = always;
|
|
306822
|
+
this.decorations = buildDeco(update.view, tree, always);
|
|
306823
|
+
}
|
|
306824
|
+
}
|
|
306825
|
+
}, {
|
|
306826
|
+
provide: (plugin2) => {
|
|
306827
|
+
function access(view) {
|
|
306828
|
+
var _a2, _b2;
|
|
306829
|
+
return (_b2 = (_a2 = view.plugin(plugin2)) === null || _a2 === void 0 ? void 0 : _a2.decorations) !== null && _b2 !== void 0 ? _b2 : Decoration.none;
|
|
306830
|
+
}
|
|
306831
|
+
return [
|
|
306832
|
+
EditorView.outerDecorations.of(access),
|
|
306833
|
+
Prec.lowest(EditorView.bidiIsolatedRanges.of(access))
|
|
306834
|
+
];
|
|
306835
|
+
}
|
|
306836
|
+
});
|
|
306837
|
+
function buildDeco(view, tree, always) {
|
|
306838
|
+
let deco = new RangeSetBuilder();
|
|
306839
|
+
let ranges = view.visibleRanges;
|
|
306840
|
+
if (!always)
|
|
306841
|
+
ranges = clipRTLLines(ranges, view.state.doc);
|
|
306842
|
+
for (let { from, to: to2 } of ranges) {
|
|
306843
|
+
tree.iterate({
|
|
306844
|
+
enter: (node2) => {
|
|
306845
|
+
let iso = node2.type.prop(NodeProp.isolate);
|
|
306846
|
+
if (iso)
|
|
306847
|
+
deco.add(node2.from, node2.to, marks[iso]);
|
|
306848
|
+
},
|
|
306849
|
+
from,
|
|
306850
|
+
to: to2
|
|
306851
|
+
});
|
|
306852
|
+
}
|
|
306853
|
+
return deco.finish();
|
|
306854
|
+
}
|
|
306855
|
+
function clipRTLLines(ranges, doc2) {
|
|
306856
|
+
let cur2 = doc2.iter(), pos = 0, result = [], last = null;
|
|
306857
|
+
for (let { from, to: to2 } of ranges) {
|
|
306858
|
+
if (last && last.to > from) {
|
|
306859
|
+
from = last.to;
|
|
306860
|
+
if (from >= to2)
|
|
306861
|
+
continue;
|
|
306862
|
+
}
|
|
306863
|
+
if (pos + cur2.value.length < from) {
|
|
306864
|
+
cur2.next(from - (pos + cur2.value.length));
|
|
306865
|
+
pos = from;
|
|
306866
|
+
}
|
|
306867
|
+
for (; ; ) {
|
|
306868
|
+
let start2 = pos, end2 = pos + cur2.value.length;
|
|
306869
|
+
if (!cur2.lineBreak && buildForLine(cur2.value)) {
|
|
306870
|
+
if (last && last.to > start2 - 10)
|
|
306871
|
+
last.to = Math.min(to2, end2);
|
|
306872
|
+
else
|
|
306873
|
+
result.push(last = { from: start2, to: Math.min(to2, end2) });
|
|
306874
|
+
}
|
|
306875
|
+
if (end2 >= to2)
|
|
306876
|
+
break;
|
|
306877
|
+
pos = end2;
|
|
306878
|
+
cur2.next();
|
|
306879
|
+
}
|
|
306880
|
+
}
|
|
306881
|
+
return result;
|
|
306882
|
+
}
|
|
306883
|
+
const marks = {
|
|
305717
306884
|
rtl: /* @__PURE__ */ Decoration.mark({ class: "cm-iso", inclusive: true, attributes: { dir: "rtl" }, bidiIsolate: Direction.RTL }),
|
|
305718
306885
|
ltr: /* @__PURE__ */ Decoration.mark({ class: "cm-iso", inclusive: true, attributes: { dir: "ltr" }, bidiIsolate: Direction.LTR }),
|
|
305719
306886
|
auto: /* @__PURE__ */ Decoration.mark({ class: "cm-iso", inclusive: true, attributes: { dir: "auto" }, bidiIsolate: null })
|
|
305720
|
-
}
|
|
306887
|
+
};
|
|
306888
|
+
const index$6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
306889
|
+
__proto__: null,
|
|
306890
|
+
DocInput,
|
|
306891
|
+
HighlightStyle,
|
|
306892
|
+
IndentContext,
|
|
306893
|
+
LRLanguage,
|
|
306894
|
+
Language,
|
|
306895
|
+
LanguageDescription,
|
|
306896
|
+
LanguageSupport,
|
|
306897
|
+
ParseContext,
|
|
306898
|
+
StreamLanguage,
|
|
306899
|
+
StringStream,
|
|
306900
|
+
TreeIndentContext,
|
|
306901
|
+
bidiIsolates,
|
|
306902
|
+
bracketMatching,
|
|
306903
|
+
bracketMatchingHandle,
|
|
306904
|
+
codeFolding,
|
|
306905
|
+
continuedIndent,
|
|
306906
|
+
defaultHighlightStyle,
|
|
306907
|
+
defineLanguageFacet,
|
|
306908
|
+
delimitedIndent,
|
|
306909
|
+
ensureSyntaxTree,
|
|
306910
|
+
flatIndent,
|
|
306911
|
+
foldAll,
|
|
306912
|
+
foldCode,
|
|
306913
|
+
foldEffect,
|
|
306914
|
+
foldGutter,
|
|
306915
|
+
foldInside,
|
|
306916
|
+
foldKeymap,
|
|
306917
|
+
foldNodeProp,
|
|
306918
|
+
foldService,
|
|
306919
|
+
foldState,
|
|
306920
|
+
foldable,
|
|
306921
|
+
foldedRanges,
|
|
306922
|
+
forceParsing,
|
|
306923
|
+
getIndentUnit,
|
|
306924
|
+
getIndentation,
|
|
306925
|
+
highlightingFor,
|
|
306926
|
+
indentNodeProp,
|
|
306927
|
+
indentOnInput,
|
|
306928
|
+
indentRange,
|
|
306929
|
+
indentService,
|
|
306930
|
+
indentString,
|
|
306931
|
+
indentUnit,
|
|
306932
|
+
language,
|
|
306933
|
+
languageDataProp,
|
|
306934
|
+
matchBrackets,
|
|
306935
|
+
sublanguageProp,
|
|
306936
|
+
syntaxHighlighting,
|
|
306937
|
+
syntaxParserRunning,
|
|
306938
|
+
syntaxTree,
|
|
306939
|
+
syntaxTreeAvailable,
|
|
306940
|
+
toggleFold,
|
|
306941
|
+
unfoldAll,
|
|
306942
|
+
unfoldCode,
|
|
306943
|
+
unfoldEffect
|
|
306944
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
305721
306945
|
class CompletionContext {
|
|
305722
306946
|
constructor(state, pos, explicit, view) {
|
|
305723
306947
|
this.state = state;
|
|
@@ -305781,6 +307005,17 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
305781
307005
|
return token || context.explicit ? { from: token ? token.from : context.pos, options, validFor } : null;
|
|
305782
307006
|
};
|
|
305783
307007
|
}
|
|
307008
|
+
function ifIn(nodes, source) {
|
|
307009
|
+
return (context) => {
|
|
307010
|
+
for (let pos = syntaxTree(context.state).resolveInner(context.pos, -1); pos; pos = pos.parent) {
|
|
307011
|
+
if (nodes.indexOf(pos.name) > -1)
|
|
307012
|
+
return source(context);
|
|
307013
|
+
if (pos.type.isTop)
|
|
307014
|
+
break;
|
|
307015
|
+
}
|
|
307016
|
+
return null;
|
|
307017
|
+
};
|
|
307018
|
+
}
|
|
305784
307019
|
function ifNotIn(nodes, source) {
|
|
305785
307020
|
return (context) => {
|
|
305786
307021
|
for (let pos = syntaxTree(context.state).resolveInner(context.pos, -1); pos; pos = pos.parent) {
|
|
@@ -306433,7 +307668,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
306433
307668
|
this.open = open;
|
|
306434
307669
|
}
|
|
306435
307670
|
static start() {
|
|
306436
|
-
return new CompletionState(none$
|
|
307671
|
+
return new CompletionState(none$2, "cm-ac-" + Math.floor(Math.random() * 2e6).toString(36), null);
|
|
306437
307672
|
}
|
|
306438
307673
|
update(tr2) {
|
|
306439
307674
|
let { state } = tr2, conf = state.facet(completionConfig);
|
|
@@ -306494,7 +307729,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
306494
307729
|
result["aria-activedescendant"] = id2 + "-" + selected;
|
|
306495
307730
|
return result;
|
|
306496
307731
|
}
|
|
306497
|
-
const none$
|
|
307732
|
+
const none$2 = [];
|
|
306498
307733
|
function getUpdateType(tr2, conf) {
|
|
306499
307734
|
if (tr2.isUserEvent("input.complete")) {
|
|
306500
307735
|
let completion = tr2.annotation(pickedCompletion);
|
|
@@ -307126,6 +308361,14 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
307126
308361
|
};
|
|
307127
308362
|
const nextSnippetField = /* @__PURE__ */ moveField(1);
|
|
307128
308363
|
const prevSnippetField = /* @__PURE__ */ moveField(-1);
|
|
308364
|
+
function hasNextSnippetField(state) {
|
|
308365
|
+
let active = state.field(snippetState, false);
|
|
308366
|
+
return !!(active && active.ranges.some((r3) => r3.field == active.active + 1));
|
|
308367
|
+
}
|
|
308368
|
+
function hasPrevSnippetField(state) {
|
|
308369
|
+
let active = state.field(snippetState, false);
|
|
308370
|
+
return !!(active && active.active > 0);
|
|
308371
|
+
}
|
|
307129
308372
|
const defaultSnippetKeymap = [
|
|
307130
308373
|
{ key: "Tab", run: nextSnippetField, shift: prevSnippetField },
|
|
307131
308374
|
{ key: "Escape", run: clearSnippet }
|
|
@@ -307155,6 +308398,74 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
307155
308398
|
return true;
|
|
307156
308399
|
}
|
|
307157
308400
|
});
|
|
308401
|
+
function wordRE(wordChars) {
|
|
308402
|
+
let escaped = wordChars.replace(/[\]\-\\]/g, "\\$&");
|
|
308403
|
+
try {
|
|
308404
|
+
return new RegExp(`[\\p{Alphabetic}\\p{Number}_${escaped}]+`, "ug");
|
|
308405
|
+
} catch (_a2) {
|
|
308406
|
+
return new RegExp(`[w${escaped}]`, "g");
|
|
308407
|
+
}
|
|
308408
|
+
}
|
|
308409
|
+
function mapRE(re2, f3) {
|
|
308410
|
+
return new RegExp(f3(re2.source), re2.unicode ? "u" : "");
|
|
308411
|
+
}
|
|
308412
|
+
const wordCaches = /* @__PURE__ */ Object.create(null);
|
|
308413
|
+
function wordCache(wordChars) {
|
|
308414
|
+
return wordCaches[wordChars] || (wordCaches[wordChars] = /* @__PURE__ */ new WeakMap());
|
|
308415
|
+
}
|
|
308416
|
+
function storeWords(doc2, wordRE2, result, seen, ignoreAt) {
|
|
308417
|
+
for (let lines = doc2.iterLines(), pos = 0; !lines.next().done; ) {
|
|
308418
|
+
let { value } = lines, m3;
|
|
308419
|
+
wordRE2.lastIndex = 0;
|
|
308420
|
+
while (m3 = wordRE2.exec(value)) {
|
|
308421
|
+
if (!seen[m3[0]] && pos + m3.index != ignoreAt) {
|
|
308422
|
+
result.push({ type: "text", label: m3[0] });
|
|
308423
|
+
seen[m3[0]] = true;
|
|
308424
|
+
if (result.length >= 2e3)
|
|
308425
|
+
return;
|
|
308426
|
+
}
|
|
308427
|
+
}
|
|
308428
|
+
pos += value.length + 1;
|
|
308429
|
+
}
|
|
308430
|
+
}
|
|
308431
|
+
function collectWords(doc2, cache2, wordRE2, to2, ignoreAt) {
|
|
308432
|
+
let big2 = doc2.length >= 1e3;
|
|
308433
|
+
let cached = big2 && cache2.get(doc2);
|
|
308434
|
+
if (cached)
|
|
308435
|
+
return cached;
|
|
308436
|
+
let result = [], seen = /* @__PURE__ */ Object.create(null);
|
|
308437
|
+
if (doc2.children) {
|
|
308438
|
+
let pos = 0;
|
|
308439
|
+
for (let ch2 of doc2.children) {
|
|
308440
|
+
if (ch2.length >= 1e3) {
|
|
308441
|
+
for (let c3 of collectWords(ch2, cache2, wordRE2, to2 - pos, ignoreAt - pos)) {
|
|
308442
|
+
if (!seen[c3.label]) {
|
|
308443
|
+
seen[c3.label] = true;
|
|
308444
|
+
result.push(c3);
|
|
308445
|
+
}
|
|
308446
|
+
}
|
|
308447
|
+
} else {
|
|
308448
|
+
storeWords(ch2, wordRE2, result, seen, ignoreAt - pos);
|
|
308449
|
+
}
|
|
308450
|
+
pos += ch2.length + 1;
|
|
308451
|
+
}
|
|
308452
|
+
} else {
|
|
308453
|
+
storeWords(doc2, wordRE2, result, seen, ignoreAt);
|
|
308454
|
+
}
|
|
308455
|
+
if (big2 && result.length < 2e3)
|
|
308456
|
+
cache2.set(doc2, result);
|
|
308457
|
+
return result;
|
|
308458
|
+
}
|
|
308459
|
+
const completeAnyWord = (context) => {
|
|
308460
|
+
let wordChars = context.state.languageDataAt("wordChars", context.pos).join("");
|
|
308461
|
+
let re2 = wordRE(wordChars);
|
|
308462
|
+
let token = context.matchBefore(mapRE(re2, (s3) => s3 + "$"));
|
|
308463
|
+
if (!token && !context.explicit)
|
|
308464
|
+
return null;
|
|
308465
|
+
let from = token ? token.from : context.pos;
|
|
308466
|
+
let options = collectWords(context.state.doc, wordCache(wordChars), re2, 5e4, from);
|
|
308467
|
+
return { from, options, validFor: mapRE(re2, (s3) => "^" + s3) };
|
|
308468
|
+
};
|
|
307158
308469
|
const defaults$1 = {
|
|
307159
308470
|
brackets: ["(", "[", "{", "'", '"'],
|
|
307160
308471
|
before: ")]}:;>",
|
|
@@ -307212,6 +308523,31 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
307212
308523
|
view.dispatch(tr2);
|
|
307213
308524
|
return true;
|
|
307214
308525
|
});
|
|
308526
|
+
const deleteBracketPair = ({ state, dispatch: dispatch2 }) => {
|
|
308527
|
+
if (state.readOnly)
|
|
308528
|
+
return false;
|
|
308529
|
+
let conf = config(state, state.selection.main.head);
|
|
308530
|
+
let tokens2 = conf.brackets || defaults$1.brackets;
|
|
308531
|
+
let dont = null, changes = state.changeByRange((range) => {
|
|
308532
|
+
if (range.empty) {
|
|
308533
|
+
let before = prevChar(state.doc, range.head);
|
|
308534
|
+
for (let token of tokens2) {
|
|
308535
|
+
if (token == before && nextChar(state.doc, range.head) == closing(codePointAt(token, 0)))
|
|
308536
|
+
return {
|
|
308537
|
+
changes: { from: range.head - token.length, to: range.head + token.length },
|
|
308538
|
+
range: EditorSelection.cursor(range.head - token.length)
|
|
308539
|
+
};
|
|
308540
|
+
}
|
|
308541
|
+
}
|
|
308542
|
+
return { range: dont = range };
|
|
308543
|
+
});
|
|
308544
|
+
if (!dont)
|
|
308545
|
+
dispatch2(state.update(changes, { scrollIntoView: true, userEvent: "delete.backward" }));
|
|
308546
|
+
return !dont;
|
|
308547
|
+
};
|
|
308548
|
+
const closeBracketsKeymap = [
|
|
308549
|
+
{ key: "Backspace", run: deleteBracketPair }
|
|
308550
|
+
];
|
|
307215
308551
|
function insertBracket(state, bracket2) {
|
|
307216
308552
|
let conf = config(state, state.selection.main.head);
|
|
307217
308553
|
let tokens2 = conf.brackets || defaults$1.brackets;
|
|
@@ -307236,6 +308572,10 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
307236
308572
|
let next = doc2.sliceString(pos, pos + 2);
|
|
307237
308573
|
return next.slice(0, codePointSize(codePointAt(next, 0)));
|
|
307238
308574
|
}
|
|
308575
|
+
function prevChar(doc2, pos) {
|
|
308576
|
+
let prev = doc2.sliceString(pos - 2, pos);
|
|
308577
|
+
return codePointSize(codePointAt(prev, 0)) == prev.length ? prev : prev.slice(1);
|
|
308578
|
+
}
|
|
307239
308579
|
function handleOpen(state, open, close, closeBefore) {
|
|
307240
308580
|
let dont = null, changes = state.changeByRange((range) => {
|
|
307241
308581
|
if (!range.empty)
|
|
@@ -307376,6 +308716,67 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
307376
308716
|
{ key: "Enter", run: acceptCompletion }
|
|
307377
308717
|
];
|
|
307378
308718
|
const completionKeymapExt = /* @__PURE__ */ Prec.highest(/* @__PURE__ */ keymap.computeN([completionConfig], (state) => state.facet(completionConfig).defaultKeymap ? [completionKeymap] : []));
|
|
308719
|
+
function completionStatus(state) {
|
|
308720
|
+
let cState = state.field(completionState, false);
|
|
308721
|
+
return cState && cState.active.some((a3) => a3.state == 1) ? "pending" : cState && cState.active.some((a3) => a3.state != 0) ? "active" : null;
|
|
308722
|
+
}
|
|
308723
|
+
const completionArrayCache = /* @__PURE__ */ new WeakMap();
|
|
308724
|
+
function currentCompletions(state) {
|
|
308725
|
+
var _a2;
|
|
308726
|
+
let open = (_a2 = state.field(completionState, false)) === null || _a2 === void 0 ? void 0 : _a2.open;
|
|
308727
|
+
if (!open || open.disabled)
|
|
308728
|
+
return [];
|
|
308729
|
+
let completions = completionArrayCache.get(open.options);
|
|
308730
|
+
if (!completions)
|
|
308731
|
+
completionArrayCache.set(open.options, completions = open.options.map((o3) => o3.completion));
|
|
308732
|
+
return completions;
|
|
308733
|
+
}
|
|
308734
|
+
function selectedCompletion(state) {
|
|
308735
|
+
var _a2;
|
|
308736
|
+
let open = (_a2 = state.field(completionState, false)) === null || _a2 === void 0 ? void 0 : _a2.open;
|
|
308737
|
+
return open && !open.disabled && open.selected >= 0 ? open.options[open.selected].completion : null;
|
|
308738
|
+
}
|
|
308739
|
+
function selectedCompletionIndex(state) {
|
|
308740
|
+
var _a2;
|
|
308741
|
+
let open = (_a2 = state.field(completionState, false)) === null || _a2 === void 0 ? void 0 : _a2.open;
|
|
308742
|
+
return open && !open.disabled && open.selected >= 0 ? open.selected : null;
|
|
308743
|
+
}
|
|
308744
|
+
function setSelectedCompletion(index2) {
|
|
308745
|
+
return setSelectedEffect.of(index2);
|
|
308746
|
+
}
|
|
308747
|
+
const index$5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
308748
|
+
__proto__: null,
|
|
308749
|
+
CompletionContext,
|
|
308750
|
+
acceptCompletion,
|
|
308751
|
+
autocompletion,
|
|
308752
|
+
clearSnippet,
|
|
308753
|
+
closeBrackets,
|
|
308754
|
+
closeBracketsKeymap,
|
|
308755
|
+
closeCompletion,
|
|
308756
|
+
completeAnyWord,
|
|
308757
|
+
completeFromList,
|
|
308758
|
+
completionKeymap,
|
|
308759
|
+
completionStatus,
|
|
308760
|
+
currentCompletions,
|
|
308761
|
+
deleteBracketPair,
|
|
308762
|
+
hasNextSnippetField,
|
|
308763
|
+
hasPrevSnippetField,
|
|
308764
|
+
ifIn,
|
|
308765
|
+
ifNotIn,
|
|
308766
|
+
insertBracket,
|
|
308767
|
+
insertCompletionText,
|
|
308768
|
+
moveCompletionSelection,
|
|
308769
|
+
nextSnippetField,
|
|
308770
|
+
pickedCompletion,
|
|
308771
|
+
prevSnippetField,
|
|
308772
|
+
selectedCompletion,
|
|
308773
|
+
selectedCompletionIndex,
|
|
308774
|
+
setSelectedCompletion,
|
|
308775
|
+
snippet,
|
|
308776
|
+
snippetCompletion,
|
|
308777
|
+
snippetKeymap,
|
|
308778
|
+
startCompletion
|
|
308779
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
307379
308780
|
const codicon = "";
|
|
307380
308781
|
const noop$1 = () => {
|
|
307381
308782
|
};
|
|
@@ -308814,7 +310215,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
308814
310215
|
},
|
|
308815
310216
|
provide: (field) => showTooltip.from(field)
|
|
308816
310217
|
});
|
|
308817
|
-
const
|
|
310218
|
+
const plugin2 = ViewPlugin.fromClass(
|
|
308818
310219
|
(_a2 = class {
|
|
308819
310220
|
constructor() {
|
|
308820
310221
|
__privateAdd(this, _scheduleUpdate);
|
|
@@ -308852,7 +310253,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
308852
310253
|
}
|
|
308853
310254
|
}, _a2)
|
|
308854
310255
|
);
|
|
308855
|
-
return [state,
|
|
310256
|
+
return [state, plugin2];
|
|
308856
310257
|
}
|
|
308857
310258
|
const SignatureTooltipWrapper = T__default.default.div`
|
|
308858
310259
|
overflow-y: auto;
|
|
@@ -308985,7 +310386,11 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
308985
310386
|
};
|
|
308986
310387
|
}
|
|
308987
310388
|
const toggleLineComment = /* @__PURE__ */ command(changeLineComment, 0);
|
|
310389
|
+
const lineComment = /* @__PURE__ */ command(changeLineComment, 1);
|
|
310390
|
+
const lineUncomment = /* @__PURE__ */ command(changeLineComment, 2);
|
|
308988
310391
|
const toggleBlockComment = /* @__PURE__ */ command(changeBlockComment, 0);
|
|
310392
|
+
const blockComment = /* @__PURE__ */ command(changeBlockComment, 1);
|
|
310393
|
+
const blockUncomment = /* @__PURE__ */ command(changeBlockComment, 2);
|
|
308989
310394
|
const toggleBlockCommentByLine = /* @__PURE__ */ command((o3, s3) => changeBlockComment(o3, s3, selectedLineRanges(s3)), 0);
|
|
308990
310395
|
function getConfig(state, pos) {
|
|
308991
310396
|
let data2 = state.languageDataAt("commentTokens", pos);
|
|
@@ -309112,6 +310517,280 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
309112
310517
|
}
|
|
309113
310518
|
return null;
|
|
309114
310519
|
}
|
|
310520
|
+
const fromHistory = /* @__PURE__ */ Annotation.define();
|
|
310521
|
+
const isolateHistory = /* @__PURE__ */ Annotation.define();
|
|
310522
|
+
const invertedEffects = /* @__PURE__ */ Facet.define();
|
|
310523
|
+
const historyConfig = /* @__PURE__ */ Facet.define({
|
|
310524
|
+
combine(configs) {
|
|
310525
|
+
return combineConfig(configs, {
|
|
310526
|
+
minDepth: 100,
|
|
310527
|
+
newGroupDelay: 500,
|
|
310528
|
+
joinToEvent: (_t2, isAdjacent2) => isAdjacent2
|
|
310529
|
+
}, {
|
|
310530
|
+
minDepth: Math.max,
|
|
310531
|
+
newGroupDelay: Math.min,
|
|
310532
|
+
joinToEvent: (a3, b3) => (tr2, adj) => a3(tr2, adj) || b3(tr2, adj)
|
|
310533
|
+
});
|
|
310534
|
+
}
|
|
310535
|
+
});
|
|
310536
|
+
const historyField_ = /* @__PURE__ */ StateField.define({
|
|
310537
|
+
create() {
|
|
310538
|
+
return HistoryState.empty;
|
|
310539
|
+
},
|
|
310540
|
+
update(state, tr2) {
|
|
310541
|
+
let config2 = tr2.state.facet(historyConfig);
|
|
310542
|
+
let fromHist = tr2.annotation(fromHistory);
|
|
310543
|
+
if (fromHist) {
|
|
310544
|
+
let item = HistEvent.fromTransaction(tr2, fromHist.selection), from = fromHist.side;
|
|
310545
|
+
let other = from == 0 ? state.undone : state.done;
|
|
310546
|
+
if (item)
|
|
310547
|
+
other = updateBranch(other, other.length, config2.minDepth, item);
|
|
310548
|
+
else
|
|
310549
|
+
other = addSelection(other, tr2.startState.selection);
|
|
310550
|
+
return new HistoryState(from == 0 ? fromHist.rest : other, from == 0 ? other : fromHist.rest);
|
|
310551
|
+
}
|
|
310552
|
+
let isolate = tr2.annotation(isolateHistory);
|
|
310553
|
+
if (isolate == "full" || isolate == "before")
|
|
310554
|
+
state = state.isolate();
|
|
310555
|
+
if (tr2.annotation(Transaction.addToHistory) === false)
|
|
310556
|
+
return !tr2.changes.empty ? state.addMapping(tr2.changes.desc) : state;
|
|
310557
|
+
let event = HistEvent.fromTransaction(tr2);
|
|
310558
|
+
let time = tr2.annotation(Transaction.time), userEvent = tr2.annotation(Transaction.userEvent);
|
|
310559
|
+
if (event)
|
|
310560
|
+
state = state.addChanges(event, time, userEvent, config2, tr2);
|
|
310561
|
+
else if (tr2.selection)
|
|
310562
|
+
state = state.addSelection(tr2.startState.selection, time, userEvent, config2.newGroupDelay);
|
|
310563
|
+
if (isolate == "full" || isolate == "after")
|
|
310564
|
+
state = state.isolate();
|
|
310565
|
+
return state;
|
|
310566
|
+
},
|
|
310567
|
+
toJSON(value) {
|
|
310568
|
+
return { done: value.done.map((e3) => e3.toJSON()), undone: value.undone.map((e3) => e3.toJSON()) };
|
|
310569
|
+
},
|
|
310570
|
+
fromJSON(json2) {
|
|
310571
|
+
return new HistoryState(json2.done.map(HistEvent.fromJSON), json2.undone.map(HistEvent.fromJSON));
|
|
310572
|
+
}
|
|
310573
|
+
});
|
|
310574
|
+
function history(config2 = {}) {
|
|
310575
|
+
return [
|
|
310576
|
+
historyField_,
|
|
310577
|
+
historyConfig.of(config2),
|
|
310578
|
+
EditorView.domEventHandlers({
|
|
310579
|
+
beforeinput(e3, view) {
|
|
310580
|
+
let command2 = e3.inputType == "historyUndo" ? undo : e3.inputType == "historyRedo" ? redo : null;
|
|
310581
|
+
if (!command2)
|
|
310582
|
+
return false;
|
|
310583
|
+
e3.preventDefault();
|
|
310584
|
+
return command2(view);
|
|
310585
|
+
}
|
|
310586
|
+
})
|
|
310587
|
+
];
|
|
310588
|
+
}
|
|
310589
|
+
const historyField = historyField_;
|
|
310590
|
+
function cmd(side, selection2) {
|
|
310591
|
+
return function({ state, dispatch: dispatch2 }) {
|
|
310592
|
+
if (!selection2 && state.readOnly)
|
|
310593
|
+
return false;
|
|
310594
|
+
let historyState = state.field(historyField_, false);
|
|
310595
|
+
if (!historyState)
|
|
310596
|
+
return false;
|
|
310597
|
+
let tr2 = historyState.pop(side, state, selection2);
|
|
310598
|
+
if (!tr2)
|
|
310599
|
+
return false;
|
|
310600
|
+
dispatch2(tr2);
|
|
310601
|
+
return true;
|
|
310602
|
+
};
|
|
310603
|
+
}
|
|
310604
|
+
const undo = /* @__PURE__ */ cmd(0, false);
|
|
310605
|
+
const redo = /* @__PURE__ */ cmd(1, false);
|
|
310606
|
+
const undoSelection = /* @__PURE__ */ cmd(0, true);
|
|
310607
|
+
const redoSelection = /* @__PURE__ */ cmd(1, true);
|
|
310608
|
+
function depth(side) {
|
|
310609
|
+
return function(state) {
|
|
310610
|
+
let histState = state.field(historyField_, false);
|
|
310611
|
+
if (!histState)
|
|
310612
|
+
return 0;
|
|
310613
|
+
let branch = side == 0 ? histState.done : histState.undone;
|
|
310614
|
+
return branch.length - (branch.length && !branch[0].changes ? 1 : 0);
|
|
310615
|
+
};
|
|
310616
|
+
}
|
|
310617
|
+
const undoDepth = /* @__PURE__ */ depth(0);
|
|
310618
|
+
const redoDepth = /* @__PURE__ */ depth(1);
|
|
310619
|
+
class HistEvent {
|
|
310620
|
+
constructor(changes, effects, mapped, startSelection, selectionsAfter) {
|
|
310621
|
+
this.changes = changes;
|
|
310622
|
+
this.effects = effects;
|
|
310623
|
+
this.mapped = mapped;
|
|
310624
|
+
this.startSelection = startSelection;
|
|
310625
|
+
this.selectionsAfter = selectionsAfter;
|
|
310626
|
+
}
|
|
310627
|
+
setSelAfter(after) {
|
|
310628
|
+
return new HistEvent(this.changes, this.effects, this.mapped, this.startSelection, after);
|
|
310629
|
+
}
|
|
310630
|
+
toJSON() {
|
|
310631
|
+
var _a2, _b2, _c2;
|
|
310632
|
+
return {
|
|
310633
|
+
changes: (_a2 = this.changes) === null || _a2 === void 0 ? void 0 : _a2.toJSON(),
|
|
310634
|
+
mapped: (_b2 = this.mapped) === null || _b2 === void 0 ? void 0 : _b2.toJSON(),
|
|
310635
|
+
startSelection: (_c2 = this.startSelection) === null || _c2 === void 0 ? void 0 : _c2.toJSON(),
|
|
310636
|
+
selectionsAfter: this.selectionsAfter.map((s3) => s3.toJSON())
|
|
310637
|
+
};
|
|
310638
|
+
}
|
|
310639
|
+
static fromJSON(json2) {
|
|
310640
|
+
return new HistEvent(json2.changes && ChangeSet.fromJSON(json2.changes), [], json2.mapped && ChangeDesc.fromJSON(json2.mapped), json2.startSelection && EditorSelection.fromJSON(json2.startSelection), json2.selectionsAfter.map(EditorSelection.fromJSON));
|
|
310641
|
+
}
|
|
310642
|
+
static fromTransaction(tr2, selection2) {
|
|
310643
|
+
let effects = none$1;
|
|
310644
|
+
for (let invert of tr2.startState.facet(invertedEffects)) {
|
|
310645
|
+
let result = invert(tr2);
|
|
310646
|
+
if (result.length)
|
|
310647
|
+
effects = effects.concat(result);
|
|
310648
|
+
}
|
|
310649
|
+
if (!effects.length && tr2.changes.empty)
|
|
310650
|
+
return null;
|
|
310651
|
+
return new HistEvent(tr2.changes.invert(tr2.startState.doc), effects, void 0, selection2 || tr2.startState.selection, none$1);
|
|
310652
|
+
}
|
|
310653
|
+
static selection(selections) {
|
|
310654
|
+
return new HistEvent(void 0, none$1, void 0, void 0, selections);
|
|
310655
|
+
}
|
|
310656
|
+
}
|
|
310657
|
+
function updateBranch(branch, to2, maxLen, newEvent) {
|
|
310658
|
+
let start2 = to2 + 1 > maxLen + 20 ? to2 - maxLen - 1 : 0;
|
|
310659
|
+
let newBranch = branch.slice(start2, to2);
|
|
310660
|
+
newBranch.push(newEvent);
|
|
310661
|
+
return newBranch;
|
|
310662
|
+
}
|
|
310663
|
+
function isAdjacent(a3, b3) {
|
|
310664
|
+
let ranges = [], isAdjacent2 = false;
|
|
310665
|
+
a3.iterChangedRanges((f3, t3) => ranges.push(f3, t3));
|
|
310666
|
+
b3.iterChangedRanges((_f, _t2, f3, t3) => {
|
|
310667
|
+
for (let i3 = 0; i3 < ranges.length; ) {
|
|
310668
|
+
let from = ranges[i3++], to2 = ranges[i3++];
|
|
310669
|
+
if (t3 >= from && f3 <= to2)
|
|
310670
|
+
isAdjacent2 = true;
|
|
310671
|
+
}
|
|
310672
|
+
});
|
|
310673
|
+
return isAdjacent2;
|
|
310674
|
+
}
|
|
310675
|
+
function eqSelectionShape(a3, b3) {
|
|
310676
|
+
return a3.ranges.length == b3.ranges.length && a3.ranges.filter((r3, i3) => r3.empty != b3.ranges[i3].empty).length === 0;
|
|
310677
|
+
}
|
|
310678
|
+
function conc(a3, b3) {
|
|
310679
|
+
return !a3.length ? b3 : !b3.length ? a3 : a3.concat(b3);
|
|
310680
|
+
}
|
|
310681
|
+
const none$1 = [];
|
|
310682
|
+
const MaxSelectionsPerEvent = 200;
|
|
310683
|
+
function addSelection(branch, selection2) {
|
|
310684
|
+
if (!branch.length) {
|
|
310685
|
+
return [HistEvent.selection([selection2])];
|
|
310686
|
+
} else {
|
|
310687
|
+
let lastEvent = branch[branch.length - 1];
|
|
310688
|
+
let sels = lastEvent.selectionsAfter.slice(Math.max(0, lastEvent.selectionsAfter.length - MaxSelectionsPerEvent));
|
|
310689
|
+
if (sels.length && sels[sels.length - 1].eq(selection2))
|
|
310690
|
+
return branch;
|
|
310691
|
+
sels.push(selection2);
|
|
310692
|
+
return updateBranch(branch, branch.length - 1, 1e9, lastEvent.setSelAfter(sels));
|
|
310693
|
+
}
|
|
310694
|
+
}
|
|
310695
|
+
function popSelection(branch) {
|
|
310696
|
+
let last = branch[branch.length - 1];
|
|
310697
|
+
let newBranch = branch.slice();
|
|
310698
|
+
newBranch[branch.length - 1] = last.setSelAfter(last.selectionsAfter.slice(0, last.selectionsAfter.length - 1));
|
|
310699
|
+
return newBranch;
|
|
310700
|
+
}
|
|
310701
|
+
function addMappingToBranch(branch, mapping) {
|
|
310702
|
+
if (!branch.length)
|
|
310703
|
+
return branch;
|
|
310704
|
+
let length = branch.length, selections = none$1;
|
|
310705
|
+
while (length) {
|
|
310706
|
+
let event = mapEvent(branch[length - 1], mapping, selections);
|
|
310707
|
+
if (event.changes && !event.changes.empty || event.effects.length) {
|
|
310708
|
+
let result = branch.slice(0, length);
|
|
310709
|
+
result[length - 1] = event;
|
|
310710
|
+
return result;
|
|
310711
|
+
} else {
|
|
310712
|
+
mapping = event.mapped;
|
|
310713
|
+
length--;
|
|
310714
|
+
selections = event.selectionsAfter;
|
|
310715
|
+
}
|
|
310716
|
+
}
|
|
310717
|
+
return selections.length ? [HistEvent.selection(selections)] : none$1;
|
|
310718
|
+
}
|
|
310719
|
+
function mapEvent(event, mapping, extraSelections) {
|
|
310720
|
+
let selections = conc(event.selectionsAfter.length ? event.selectionsAfter.map((s3) => s3.map(mapping)) : none$1, extraSelections);
|
|
310721
|
+
if (!event.changes)
|
|
310722
|
+
return HistEvent.selection(selections);
|
|
310723
|
+
let mappedChanges = event.changes.map(mapping), before = mapping.mapDesc(event.changes, true);
|
|
310724
|
+
let fullMapping = event.mapped ? event.mapped.composeDesc(before) : before;
|
|
310725
|
+
return new HistEvent(mappedChanges, StateEffect.mapEffects(event.effects, mapping), fullMapping, event.startSelection.map(before), selections);
|
|
310726
|
+
}
|
|
310727
|
+
const joinableUserEvent = /^(input\.type|delete)($|\.)/;
|
|
310728
|
+
class HistoryState {
|
|
310729
|
+
constructor(done, undone, prevTime = 0, prevUserEvent = void 0) {
|
|
310730
|
+
this.done = done;
|
|
310731
|
+
this.undone = undone;
|
|
310732
|
+
this.prevTime = prevTime;
|
|
310733
|
+
this.prevUserEvent = prevUserEvent;
|
|
310734
|
+
}
|
|
310735
|
+
isolate() {
|
|
310736
|
+
return this.prevTime ? new HistoryState(this.done, this.undone) : this;
|
|
310737
|
+
}
|
|
310738
|
+
addChanges(event, time, userEvent, config2, tr2) {
|
|
310739
|
+
let done = this.done, lastEvent = done[done.length - 1];
|
|
310740
|
+
if (lastEvent && lastEvent.changes && !lastEvent.changes.empty && event.changes && (!userEvent || joinableUserEvent.test(userEvent)) && (!lastEvent.selectionsAfter.length && time - this.prevTime < config2.newGroupDelay && config2.joinToEvent(tr2, isAdjacent(lastEvent.changes, event.changes)) || userEvent == "input.type.compose")) {
|
|
310741
|
+
done = updateBranch(done, done.length - 1, config2.minDepth, new HistEvent(event.changes.compose(lastEvent.changes), conc(StateEffect.mapEffects(event.effects, lastEvent.changes), lastEvent.effects), lastEvent.mapped, lastEvent.startSelection, none$1));
|
|
310742
|
+
} else {
|
|
310743
|
+
done = updateBranch(done, done.length, config2.minDepth, event);
|
|
310744
|
+
}
|
|
310745
|
+
return new HistoryState(done, none$1, time, userEvent);
|
|
310746
|
+
}
|
|
310747
|
+
addSelection(selection2, time, userEvent, newGroupDelay) {
|
|
310748
|
+
let last = this.done.length ? this.done[this.done.length - 1].selectionsAfter : none$1;
|
|
310749
|
+
if (last.length > 0 && time - this.prevTime < newGroupDelay && userEvent == this.prevUserEvent && userEvent && /^select($|\.)/.test(userEvent) && eqSelectionShape(last[last.length - 1], selection2))
|
|
310750
|
+
return this;
|
|
310751
|
+
return new HistoryState(addSelection(this.done, selection2), this.undone, time, userEvent);
|
|
310752
|
+
}
|
|
310753
|
+
addMapping(mapping) {
|
|
310754
|
+
return new HistoryState(addMappingToBranch(this.done, mapping), addMappingToBranch(this.undone, mapping), this.prevTime, this.prevUserEvent);
|
|
310755
|
+
}
|
|
310756
|
+
pop(side, state, onlySelection) {
|
|
310757
|
+
let branch = side == 0 ? this.done : this.undone;
|
|
310758
|
+
if (branch.length == 0)
|
|
310759
|
+
return null;
|
|
310760
|
+
let event = branch[branch.length - 1], selection2 = event.selectionsAfter[0] || state.selection;
|
|
310761
|
+
if (onlySelection && event.selectionsAfter.length) {
|
|
310762
|
+
return state.update({
|
|
310763
|
+
selection: event.selectionsAfter[event.selectionsAfter.length - 1],
|
|
310764
|
+
annotations: fromHistory.of({ side, rest: popSelection(branch), selection: selection2 }),
|
|
310765
|
+
userEvent: side == 0 ? "select.undo" : "select.redo",
|
|
310766
|
+
scrollIntoView: true
|
|
310767
|
+
});
|
|
310768
|
+
} else if (!event.changes) {
|
|
310769
|
+
return null;
|
|
310770
|
+
} else {
|
|
310771
|
+
let rest = branch.length == 1 ? none$1 : branch.slice(0, branch.length - 1);
|
|
310772
|
+
if (event.mapped)
|
|
310773
|
+
rest = addMappingToBranch(rest, event.mapped);
|
|
310774
|
+
return state.update({
|
|
310775
|
+
changes: event.changes,
|
|
310776
|
+
selection: event.startSelection,
|
|
310777
|
+
effects: event.effects,
|
|
310778
|
+
annotations: fromHistory.of({ side, rest, selection: selection2 }),
|
|
310779
|
+
filter: false,
|
|
310780
|
+
userEvent: side == 0 ? "undo" : "redo",
|
|
310781
|
+
scrollIntoView: true
|
|
310782
|
+
});
|
|
310783
|
+
}
|
|
310784
|
+
}
|
|
310785
|
+
}
|
|
310786
|
+
HistoryState.empty = /* @__PURE__ */ new HistoryState(none$1, none$1);
|
|
310787
|
+
const historyKeymap = [
|
|
310788
|
+
{ key: "Mod-z", run: undo, preventDefault: true },
|
|
310789
|
+
{ key: "Mod-y", mac: "Mod-Shift-z", run: redo, preventDefault: true },
|
|
310790
|
+
{ linux: "Ctrl-Shift-z", run: redo, preventDefault: true },
|
|
310791
|
+
{ key: "Mod-u", run: undoSelection, preventDefault: true },
|
|
310792
|
+
{ key: "Alt-u", mac: "Mod-Shift-u", run: redoSelection, preventDefault: true }
|
|
310793
|
+
];
|
|
309115
310794
|
function updateSel(sel, by2) {
|
|
309116
310795
|
return EditorSelection.create(sel.ranges.map(by2), sel.mainIndex);
|
|
309117
310796
|
}
|
|
@@ -309136,11 +310815,85 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
309136
310815
|
}
|
|
309137
310816
|
const cursorCharLeft = (view) => cursorByChar(view, !ltrAtCursor(view));
|
|
309138
310817
|
const cursorCharRight = (view) => cursorByChar(view, ltrAtCursor(view));
|
|
310818
|
+
const cursorCharForward = (view) => cursorByChar(view, true);
|
|
310819
|
+
const cursorCharBackward = (view) => cursorByChar(view, false);
|
|
310820
|
+
function byCharLogical(state, range, forward) {
|
|
310821
|
+
let pos = range.head, line = state.doc.lineAt(pos);
|
|
310822
|
+
if (pos == (forward ? line.to : line.from))
|
|
310823
|
+
pos = forward ? Math.min(state.doc.length, line.to + 1) : Math.max(0, line.from - 1);
|
|
310824
|
+
else
|
|
310825
|
+
pos = line.from + findClusterBreak(line.text, pos - line.from, forward);
|
|
310826
|
+
return EditorSelection.cursor(pos, forward ? -1 : 1);
|
|
310827
|
+
}
|
|
310828
|
+
function moveByCharLogical(target, forward) {
|
|
310829
|
+
return moveSel(target, (range) => range.empty ? byCharLogical(target.state, range, forward) : rangeEnd(range, forward));
|
|
310830
|
+
}
|
|
310831
|
+
const cursorCharForwardLogical = (target) => moveByCharLogical(target, true);
|
|
310832
|
+
const cursorCharBackwardLogical = (target) => moveByCharLogical(target, false);
|
|
309139
310833
|
function cursorByGroup(view, forward) {
|
|
309140
310834
|
return moveSel(view, (range) => range.empty ? view.moveByGroup(range, forward) : rangeEnd(range, forward));
|
|
309141
310835
|
}
|
|
309142
310836
|
const cursorGroupLeft = (view) => cursorByGroup(view, !ltrAtCursor(view));
|
|
309143
310837
|
const cursorGroupRight = (view) => cursorByGroup(view, ltrAtCursor(view));
|
|
310838
|
+
const cursorGroupForward = (view) => cursorByGroup(view, true);
|
|
310839
|
+
const cursorGroupBackward = (view) => cursorByGroup(view, false);
|
|
310840
|
+
const segmenter = typeof Intl != "undefined" && Intl.Segmenter ? /* @__PURE__ */ new Intl.Segmenter(void 0, { granularity: "word" }) : null;
|
|
310841
|
+
function moveBySubword(view, range, forward) {
|
|
310842
|
+
let categorize = view.state.charCategorizer(range.from);
|
|
310843
|
+
let cat = CharCategory.Space, pos = range.from, steps = 0;
|
|
310844
|
+
let done = false, sawUpper = false, sawLower = false;
|
|
310845
|
+
let step = (next) => {
|
|
310846
|
+
if (done)
|
|
310847
|
+
return false;
|
|
310848
|
+
pos += forward ? next.length : -next.length;
|
|
310849
|
+
let nextCat = categorize(next), ahead;
|
|
310850
|
+
if (nextCat == CharCategory.Word && next.charCodeAt(0) < 128 && /[\W_]/.test(next))
|
|
310851
|
+
nextCat = -1;
|
|
310852
|
+
if (cat == CharCategory.Space)
|
|
310853
|
+
cat = nextCat;
|
|
310854
|
+
if (cat != nextCat)
|
|
310855
|
+
return false;
|
|
310856
|
+
if (cat == CharCategory.Word) {
|
|
310857
|
+
if (next.toLowerCase() == next) {
|
|
310858
|
+
if (!forward && sawUpper)
|
|
310859
|
+
return false;
|
|
310860
|
+
sawLower = true;
|
|
310861
|
+
} else if (sawLower) {
|
|
310862
|
+
if (forward)
|
|
310863
|
+
return false;
|
|
310864
|
+
done = true;
|
|
310865
|
+
} else {
|
|
310866
|
+
if (sawUpper && forward && categorize(ahead = view.state.sliceDoc(pos, pos + 1)) == CharCategory.Word && ahead.toLowerCase() == ahead)
|
|
310867
|
+
return false;
|
|
310868
|
+
sawUpper = true;
|
|
310869
|
+
}
|
|
310870
|
+
}
|
|
310871
|
+
steps++;
|
|
310872
|
+
return true;
|
|
310873
|
+
};
|
|
310874
|
+
let end2 = view.moveByChar(range, forward, (start2) => {
|
|
310875
|
+
step(start2);
|
|
310876
|
+
return step;
|
|
310877
|
+
});
|
|
310878
|
+
if (segmenter && cat == CharCategory.Word && end2.from == range.from + steps * (forward ? 1 : -1)) {
|
|
310879
|
+
let from = Math.min(range.head, end2.head), to2 = Math.max(range.head, end2.head);
|
|
310880
|
+
let skipped = view.state.sliceDoc(from, to2);
|
|
310881
|
+
if (skipped.length > 1 && /[\u4E00-\uffff]/.test(skipped)) {
|
|
310882
|
+
let segments = Array.from(segmenter.segment(skipped));
|
|
310883
|
+
if (segments.length > 1) {
|
|
310884
|
+
if (forward)
|
|
310885
|
+
return EditorSelection.cursor(range.head + segments[1].index, -1);
|
|
310886
|
+
return EditorSelection.cursor(end2.head + segments[segments.length - 1].index, 1);
|
|
310887
|
+
}
|
|
310888
|
+
}
|
|
310889
|
+
}
|
|
310890
|
+
return end2;
|
|
310891
|
+
}
|
|
310892
|
+
function cursorBySubword(view, forward) {
|
|
310893
|
+
return moveSel(view, (range) => range.empty ? moveBySubword(view, range, forward) : rangeEnd(range, forward));
|
|
310894
|
+
}
|
|
310895
|
+
const cursorSubwordForward = (view) => cursorBySubword(view, true);
|
|
310896
|
+
const cursorSubwordBackward = (view) => cursorBySubword(view, false);
|
|
309144
310897
|
function interestingNode(state, node2, bracketProp) {
|
|
309145
310898
|
if (node2.type.prop(bracketProp))
|
|
309146
310899
|
return true;
|
|
@@ -309252,6 +311005,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
309252
311005
|
return true;
|
|
309253
311006
|
}
|
|
309254
311007
|
const cursorMatchingBracket = ({ state, dispatch: dispatch2 }) => toMatchingBracket(state, dispatch2, false);
|
|
311008
|
+
const selectMatchingBracket = ({ state, dispatch: dispatch2 }) => toMatchingBracket(state, dispatch2, true);
|
|
309255
311009
|
function extendSel(target, how) {
|
|
309256
311010
|
let selection2 = updateSel(target.state.selection, (range) => {
|
|
309257
311011
|
let head = how(range);
|
|
@@ -309267,11 +311021,22 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
309267
311021
|
}
|
|
309268
311022
|
const selectCharLeft = (view) => selectByChar(view, !ltrAtCursor(view));
|
|
309269
311023
|
const selectCharRight = (view) => selectByChar(view, ltrAtCursor(view));
|
|
311024
|
+
const selectCharForward = (view) => selectByChar(view, true);
|
|
311025
|
+
const selectCharBackward = (view) => selectByChar(view, false);
|
|
311026
|
+
const selectCharForwardLogical = (target) => extendSel(target, (range) => byCharLogical(target.state, range, true));
|
|
311027
|
+
const selectCharBackwardLogical = (target) => extendSel(target, (range) => byCharLogical(target.state, range, false));
|
|
309270
311028
|
function selectByGroup(view, forward) {
|
|
309271
311029
|
return extendSel(view, (range) => view.moveByGroup(range, forward));
|
|
309272
311030
|
}
|
|
309273
311031
|
const selectGroupLeft = (view) => selectByGroup(view, !ltrAtCursor(view));
|
|
309274
311032
|
const selectGroupRight = (view) => selectByGroup(view, ltrAtCursor(view));
|
|
311033
|
+
const selectGroupForward = (view) => selectByGroup(view, true);
|
|
311034
|
+
const selectGroupBackward = (view) => selectByGroup(view, false);
|
|
311035
|
+
function selectBySubword(view, forward) {
|
|
311036
|
+
return extendSel(view, (range) => moveBySubword(view, range, forward));
|
|
311037
|
+
}
|
|
311038
|
+
const selectSubwordForward = (view) => selectBySubword(view, true);
|
|
311039
|
+
const selectSubwordBackward = (view) => selectBySubword(view, false);
|
|
309275
311040
|
const selectSyntaxLeft = (view) => extendSel(view, (range) => moveBySyntax(view.state, range, !ltrAtCursor(view)));
|
|
309276
311041
|
const selectSyntaxRight = (view) => extendSel(view, (range) => moveBySyntax(view.state, range, ltrAtCursor(view)));
|
|
309277
311042
|
function selectByLine(view, forward) {
|
|
@@ -309406,6 +311171,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
309406
311171
|
return targetPos;
|
|
309407
311172
|
});
|
|
309408
311173
|
const deleteCharBackward = (view) => deleteByChar(view, false, true);
|
|
311174
|
+
const deleteCharBackwardStrict = (view) => deleteByChar(view, false, false);
|
|
309409
311175
|
const deleteCharForward = (view) => deleteByChar(view, true, false);
|
|
309410
311176
|
const deleteByGroup = (target, forward) => deleteBy(target, (range) => {
|
|
309411
311177
|
let pos = range.head, { state } = target, line = state.doc.lineAt(pos);
|
|
@@ -309433,6 +311199,10 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
309433
311199
|
let lineEnd2 = view.lineBlockAt(range.head).to;
|
|
309434
311200
|
return range.head < lineEnd2 ? lineEnd2 : Math.min(view.state.doc.length, range.head + 1);
|
|
309435
311201
|
});
|
|
311202
|
+
const deleteToLineStart = (view) => deleteBy(view, (range) => {
|
|
311203
|
+
let lineStart = view.lineBlockAt(range.head).from;
|
|
311204
|
+
return range.head > lineStart ? lineStart : Math.max(0, range.head - 1);
|
|
311205
|
+
});
|
|
309436
311206
|
const deleteLineBoundaryBackward = (view) => deleteBy(view, (range) => {
|
|
309437
311207
|
let lineStart = view.moveToLineBoundary(range, false).head;
|
|
309438
311208
|
return range.head > lineStart ? lineStart : Math.max(0, range.head - 1);
|
|
@@ -309441,6 +311211,29 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
309441
311211
|
let lineStart = view.moveToLineBoundary(range, true).head;
|
|
309442
311212
|
return range.head < lineStart ? lineStart : Math.min(view.state.doc.length, range.head + 1);
|
|
309443
311213
|
});
|
|
311214
|
+
const deleteTrailingWhitespace = ({ state, dispatch: dispatch2 }) => {
|
|
311215
|
+
if (state.readOnly)
|
|
311216
|
+
return false;
|
|
311217
|
+
let changes = [];
|
|
311218
|
+
for (let pos = 0, prev = "", iter = state.doc.iter(); ; ) {
|
|
311219
|
+
iter.next();
|
|
311220
|
+
if (iter.lineBreak || iter.done) {
|
|
311221
|
+
let trailing = prev.search(/\s+$/);
|
|
311222
|
+
if (trailing > -1)
|
|
311223
|
+
changes.push({ from: pos - (prev.length - trailing), to: pos });
|
|
311224
|
+
if (iter.done)
|
|
311225
|
+
break;
|
|
311226
|
+
prev = "";
|
|
311227
|
+
} else {
|
|
311228
|
+
prev = iter.value;
|
|
311229
|
+
}
|
|
311230
|
+
pos += iter.value.length;
|
|
311231
|
+
}
|
|
311232
|
+
if (!changes.length)
|
|
311233
|
+
return false;
|
|
311234
|
+
dispatch2(state.update({ changes, userEvent: "delete" }));
|
|
311235
|
+
return true;
|
|
311236
|
+
};
|
|
309444
311237
|
const splitLine = ({ state, dispatch: dispatch2 }) => {
|
|
309445
311238
|
if (state.readOnly)
|
|
309446
311239
|
return false;
|
|
@@ -309557,6 +311350,20 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
309557
311350
|
view.dispatch({ changes, selection: selection2, scrollIntoView: true, userEvent: "delete.line" });
|
|
309558
311351
|
return true;
|
|
309559
311352
|
};
|
|
311353
|
+
const insertNewline = ({ state, dispatch: dispatch2 }) => {
|
|
311354
|
+
dispatch2(state.update(state.replaceSelection(state.lineBreak), { scrollIntoView: true, userEvent: "input" }));
|
|
311355
|
+
return true;
|
|
311356
|
+
};
|
|
311357
|
+
const insertNewlineKeepIndent = ({ state, dispatch: dispatch2 }) => {
|
|
311358
|
+
dispatch2(state.update(state.changeByRange((range) => {
|
|
311359
|
+
let indent2 = /^\s*/.exec(state.doc.lineAt(range.from).text)[0];
|
|
311360
|
+
return {
|
|
311361
|
+
changes: { from: range.from, to: range.to, insert: state.lineBreak + indent2 },
|
|
311362
|
+
range: EditorSelection.cursor(range.from + indent2.length + 1)
|
|
311363
|
+
};
|
|
311364
|
+
}), { scrollIntoView: true, userEvent: "input" }));
|
|
311365
|
+
return true;
|
|
311366
|
+
};
|
|
309560
311367
|
function isBetweenBrackets(state, pos) {
|
|
309561
311368
|
if (/\(\)|\[\]|\{\}/.test(state.sliceDoc(pos - 1, pos + 1)))
|
|
309562
311369
|
return { from: pos, to: pos };
|
|
@@ -309670,6 +311477,16 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
309670
311477
|
view.setTabFocusMode();
|
|
309671
311478
|
return true;
|
|
309672
311479
|
};
|
|
311480
|
+
const temporarilySetTabFocusMode = (view) => {
|
|
311481
|
+
view.setTabFocusMode(2e3);
|
|
311482
|
+
return true;
|
|
311483
|
+
};
|
|
311484
|
+
const insertTab = ({ state, dispatch: dispatch2 }) => {
|
|
311485
|
+
if (state.selection.ranges.some((r3) => !r3.empty))
|
|
311486
|
+
return indentMore({ state, dispatch: dispatch2 });
|
|
311487
|
+
dispatch2(state.update(state.replaceSelection(" "), { scrollIntoView: true, userEvent: "input" }));
|
|
311488
|
+
return true;
|
|
311489
|
+
};
|
|
309673
311490
|
const emacsStyleKeymap = [
|
|
309674
311491
|
{ key: "Ctrl-b", run: cursorCharLeft, shift: selectCharLeft, preventDefault: true },
|
|
309675
311492
|
{ key: "Ctrl-f", run: cursorCharRight, shift: selectCharRight },
|
|
@@ -309734,6 +311551,117 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
309734
311551
|
{ key: "Ctrl-m", mac: "Shift-Alt-m", run: toggleTabFocusMode }
|
|
309735
311552
|
].concat(standardKeymap);
|
|
309736
311553
|
const indentWithTab = { key: "Tab", run: indentMore, shift: indentLess };
|
|
311554
|
+
const index$4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
311555
|
+
__proto__: null,
|
|
311556
|
+
blockComment,
|
|
311557
|
+
blockUncomment,
|
|
311558
|
+
copyLineDown,
|
|
311559
|
+
copyLineUp,
|
|
311560
|
+
cursorCharBackward,
|
|
311561
|
+
cursorCharBackwardLogical,
|
|
311562
|
+
cursorCharForward,
|
|
311563
|
+
cursorCharForwardLogical,
|
|
311564
|
+
cursorCharLeft,
|
|
311565
|
+
cursorCharRight,
|
|
311566
|
+
cursorDocEnd,
|
|
311567
|
+
cursorDocStart,
|
|
311568
|
+
cursorGroupBackward,
|
|
311569
|
+
cursorGroupForward,
|
|
311570
|
+
cursorGroupLeft,
|
|
311571
|
+
cursorGroupRight,
|
|
311572
|
+
cursorLineBoundaryBackward,
|
|
311573
|
+
cursorLineBoundaryForward,
|
|
311574
|
+
cursorLineBoundaryLeft,
|
|
311575
|
+
cursorLineBoundaryRight,
|
|
311576
|
+
cursorLineDown,
|
|
311577
|
+
cursorLineEnd,
|
|
311578
|
+
cursorLineStart,
|
|
311579
|
+
cursorLineUp,
|
|
311580
|
+
cursorMatchingBracket,
|
|
311581
|
+
cursorPageDown,
|
|
311582
|
+
cursorPageUp,
|
|
311583
|
+
cursorSubwordBackward,
|
|
311584
|
+
cursorSubwordForward,
|
|
311585
|
+
cursorSyntaxLeft,
|
|
311586
|
+
cursorSyntaxRight,
|
|
311587
|
+
defaultKeymap,
|
|
311588
|
+
deleteCharBackward,
|
|
311589
|
+
deleteCharBackwardStrict,
|
|
311590
|
+
deleteCharForward,
|
|
311591
|
+
deleteGroupBackward,
|
|
311592
|
+
deleteGroupForward,
|
|
311593
|
+
deleteLine,
|
|
311594
|
+
deleteLineBoundaryBackward,
|
|
311595
|
+
deleteLineBoundaryForward,
|
|
311596
|
+
deleteToLineEnd,
|
|
311597
|
+
deleteToLineStart,
|
|
311598
|
+
deleteTrailingWhitespace,
|
|
311599
|
+
emacsStyleKeymap,
|
|
311600
|
+
history,
|
|
311601
|
+
historyField,
|
|
311602
|
+
historyKeymap,
|
|
311603
|
+
indentLess,
|
|
311604
|
+
indentMore,
|
|
311605
|
+
indentSelection,
|
|
311606
|
+
indentWithTab,
|
|
311607
|
+
insertBlankLine,
|
|
311608
|
+
insertNewline,
|
|
311609
|
+
insertNewlineAndIndent,
|
|
311610
|
+
insertNewlineKeepIndent,
|
|
311611
|
+
insertTab,
|
|
311612
|
+
invertedEffects,
|
|
311613
|
+
isolateHistory,
|
|
311614
|
+
lineComment,
|
|
311615
|
+
lineUncomment,
|
|
311616
|
+
moveLineDown,
|
|
311617
|
+
moveLineUp,
|
|
311618
|
+
redo,
|
|
311619
|
+
redoDepth,
|
|
311620
|
+
redoSelection,
|
|
311621
|
+
selectAll,
|
|
311622
|
+
selectCharBackward,
|
|
311623
|
+
selectCharBackwardLogical,
|
|
311624
|
+
selectCharForward,
|
|
311625
|
+
selectCharForwardLogical,
|
|
311626
|
+
selectCharLeft,
|
|
311627
|
+
selectCharRight,
|
|
311628
|
+
selectDocEnd,
|
|
311629
|
+
selectDocStart,
|
|
311630
|
+
selectGroupBackward,
|
|
311631
|
+
selectGroupForward,
|
|
311632
|
+
selectGroupLeft,
|
|
311633
|
+
selectGroupRight,
|
|
311634
|
+
selectLine,
|
|
311635
|
+
selectLineBoundaryBackward,
|
|
311636
|
+
selectLineBoundaryForward,
|
|
311637
|
+
selectLineBoundaryLeft,
|
|
311638
|
+
selectLineBoundaryRight,
|
|
311639
|
+
selectLineDown,
|
|
311640
|
+
selectLineEnd,
|
|
311641
|
+
selectLineStart,
|
|
311642
|
+
selectLineUp,
|
|
311643
|
+
selectMatchingBracket,
|
|
311644
|
+
selectPageDown,
|
|
311645
|
+
selectPageUp,
|
|
311646
|
+
selectParentSyntax,
|
|
311647
|
+
selectSubwordBackward,
|
|
311648
|
+
selectSubwordForward,
|
|
311649
|
+
selectSyntaxLeft,
|
|
311650
|
+
selectSyntaxRight,
|
|
311651
|
+
simplifySelection,
|
|
311652
|
+
splitLine,
|
|
311653
|
+
standardKeymap,
|
|
311654
|
+
temporarilySetTabFocusMode,
|
|
311655
|
+
toggleBlockComment,
|
|
311656
|
+
toggleBlockCommentByLine,
|
|
311657
|
+
toggleComment,
|
|
311658
|
+
toggleLineComment,
|
|
311659
|
+
toggleTabFocusMode,
|
|
311660
|
+
transposeChars,
|
|
311661
|
+
undo,
|
|
311662
|
+
undoDepth,
|
|
311663
|
+
undoSelection
|
|
311664
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
309737
311665
|
function crelt() {
|
|
309738
311666
|
var elt2 = arguments[0];
|
|
309739
311667
|
if (typeof elt2 == "string")
|
|
@@ -310232,6 +312160,9 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
310232
312160
|
});
|
|
310233
312161
|
}
|
|
310234
312162
|
});
|
|
312163
|
+
function search(config2) {
|
|
312164
|
+
return config2 ? [searchConfigFacet.of(config2), searchExtensions] : searchExtensions;
|
|
312165
|
+
}
|
|
310235
312166
|
class SearchQuery {
|
|
310236
312167
|
constructor(config2) {
|
|
310237
312168
|
this.search = config2.search;
|
|
@@ -310397,6 +312328,14 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
310397
312328
|
},
|
|
310398
312329
|
provide: (f3) => showPanel.from(f3, (val) => val.panel)
|
|
310399
312330
|
});
|
|
312331
|
+
function getSearchQuery(state) {
|
|
312332
|
+
let curState = state.field(searchState, false);
|
|
312333
|
+
return curState ? curState.query.spec : defaultQuery(state);
|
|
312334
|
+
}
|
|
312335
|
+
function searchPanelOpen(state) {
|
|
312336
|
+
var _a2;
|
|
312337
|
+
return ((_a2 = state.field(searchState, false)) === null || _a2 === void 0 ? void 0 : _a2.panel) != null;
|
|
312338
|
+
}
|
|
310400
312339
|
class SearchState {
|
|
310401
312340
|
constructor(query, panel) {
|
|
310402
312341
|
this.query = query;
|
|
@@ -310790,6 +312729,28 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
310790
312729
|
/* @__PURE__ */ Prec.low(searchHighlighter),
|
|
310791
312730
|
baseTheme$2
|
|
310792
312731
|
];
|
|
312732
|
+
const index$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
312733
|
+
__proto__: null,
|
|
312734
|
+
RegExpCursor,
|
|
312735
|
+
SearchCursor,
|
|
312736
|
+
SearchQuery,
|
|
312737
|
+
closeSearchPanel,
|
|
312738
|
+
findNext,
|
|
312739
|
+
findPrevious,
|
|
312740
|
+
getSearchQuery,
|
|
312741
|
+
gotoLine,
|
|
312742
|
+
highlightSelectionMatches,
|
|
312743
|
+
openSearchPanel,
|
|
312744
|
+
replaceAll,
|
|
312745
|
+
replaceNext,
|
|
312746
|
+
search,
|
|
312747
|
+
searchKeymap,
|
|
312748
|
+
searchPanelOpen,
|
|
312749
|
+
selectMatches,
|
|
312750
|
+
selectNextOccurrence,
|
|
312751
|
+
selectSelectionMatches,
|
|
312752
|
+
setSearchQuery
|
|
312753
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
310793
312754
|
const chalky = "#e5c07b", coral = "#e06c75", cyan = "#56b6c2", invalid = "#ffffff", ivory = "#abb2bf", stone = "#7d8799", malibu = "#61afef", sage = "#98c379", whiskey = "#d19a66", violet = "#c678dd", darkBackground = "#21252b", highlightBackground = "#2c313a", background = "#282c34", tooltipBackground = "#353a42", selection = "#3E4451", cursor = "#528bff";
|
|
310794
312755
|
const oneDarkTheme = /* @__PURE__ */ EditorView.theme({
|
|
310795
312756
|
"&": {
|
|
@@ -311449,7 +313410,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
311449
313410
|
}
|
|
311450
313411
|
reduce(action) {
|
|
311451
313412
|
var _a2;
|
|
311452
|
-
let
|
|
313413
|
+
let depth2 = action >> 19, type = action & 65535;
|
|
311453
313414
|
let { parser: parser2 } = this.p;
|
|
311454
313415
|
let lookaheadRecord = this.reducePos < this.pos - 25;
|
|
311455
313416
|
if (lookaheadRecord)
|
|
@@ -311457,14 +313418,14 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
311457
313418
|
let dPrec = parser2.dynamicPrecedence(type);
|
|
311458
313419
|
if (dPrec)
|
|
311459
313420
|
this.score += dPrec;
|
|
311460
|
-
if (
|
|
313421
|
+
if (depth2 == 0) {
|
|
311461
313422
|
this.pushState(parser2.getGoto(this.state, type, true), this.reducePos);
|
|
311462
313423
|
if (type < parser2.minRepeatTerm)
|
|
311463
313424
|
this.storeNode(type, this.reducePos, this.reducePos, lookaheadRecord ? 8 : 4, true);
|
|
311464
313425
|
this.reduceContext(type, this.reducePos);
|
|
311465
313426
|
return;
|
|
311466
313427
|
}
|
|
311467
|
-
let base2 = this.stack.length - (
|
|
313428
|
+
let base2 = this.stack.length - (depth2 - 1) * 3 - (action & 262144 ? 6 : 0);
|
|
311468
313429
|
let start2 = base2 ? this.stack[base2 - 2] : this.p.ranges[0].from, size2 = this.reducePos - start2;
|
|
311469
313430
|
if (size2 >= 2e3 && !((_a2 = this.p.parser.nodeSet.types[type]) === null || _a2 === void 0 ? void 0 : _a2.isAnonymous)) {
|
|
311470
313431
|
if (start2 == this.p.lastBigReductionStart) {
|
|
@@ -311643,8 +313604,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
311643
313604
|
if ((reduce2 & 65536) == 0)
|
|
311644
313605
|
return false;
|
|
311645
313606
|
if (!parser2.validAction(this.state, reduce2)) {
|
|
311646
|
-
let
|
|
311647
|
-
let target = this.stack.length -
|
|
313607
|
+
let depth2 = reduce2 >> 19, term = reduce2 & 65535;
|
|
313608
|
+
let target = this.stack.length - depth2 * 3;
|
|
311648
313609
|
if (target < 0 || parser2.getGoto(this.stack[target], term, false) < 0) {
|
|
311649
313610
|
let backup = this.findForcedReduction();
|
|
311650
313611
|
if (backup == null)
|
|
@@ -311660,7 +313621,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
311660
313621
|
}
|
|
311661
313622
|
findForcedReduction() {
|
|
311662
313623
|
let { parser: parser2 } = this.p, seen = [];
|
|
311663
|
-
let explore = (state,
|
|
313624
|
+
let explore = (state, depth2) => {
|
|
311664
313625
|
if (seen.includes(state))
|
|
311665
313626
|
return;
|
|
311666
313627
|
seen.push(state);
|
|
@@ -311668,14 +313629,14 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
311668
313629
|
if (action & (262144 | 131072))
|
|
311669
313630
|
;
|
|
311670
313631
|
else if (action & 65536) {
|
|
311671
|
-
let rDepth = (action >> 19) -
|
|
313632
|
+
let rDepth = (action >> 19) - depth2;
|
|
311672
313633
|
if (rDepth > 1) {
|
|
311673
313634
|
let term = action & 65535, target = this.stack.length - rDepth * 3;
|
|
311674
313635
|
if (target >= 0 && parser2.getGoto(this.stack[target], term, false) >= 0)
|
|
311675
313636
|
return rDepth << 19 | 65536 | term;
|
|
311676
313637
|
}
|
|
311677
313638
|
} else {
|
|
311678
|
-
let found = explore(action,
|
|
313639
|
+
let found = explore(action, depth2 + 1);
|
|
311679
313640
|
if (found != null)
|
|
311680
313641
|
return found;
|
|
311681
313642
|
}
|
|
@@ -311771,14 +313732,14 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
311771
313732
|
this.base = this.stack.length;
|
|
311772
313733
|
}
|
|
311773
313734
|
reduce(action) {
|
|
311774
|
-
let term = action & 65535,
|
|
311775
|
-
if (
|
|
313735
|
+
let term = action & 65535, depth2 = action >> 19;
|
|
313736
|
+
if (depth2 == 0) {
|
|
311776
313737
|
if (this.stack == this.start.stack)
|
|
311777
313738
|
this.stack = this.stack.slice();
|
|
311778
313739
|
this.stack.push(this.state, 0, 0);
|
|
311779
313740
|
this.base += 3;
|
|
311780
313741
|
} else {
|
|
311781
|
-
this.base -= (
|
|
313742
|
+
this.base -= (depth2 - 1) * 3;
|
|
311782
313743
|
}
|
|
311783
313744
|
let goto = this.start.p.parser.getGoto(this.stack[this.base - 3], term, true);
|
|
311784
313745
|
this.state = goto;
|
|
@@ -312155,9 +314116,9 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
312155
314116
|
}
|
|
312156
314117
|
}
|
|
312157
314118
|
class FragmentCursor$1 {
|
|
312158
|
-
constructor(fragments,
|
|
314119
|
+
constructor(fragments, nodeSet2) {
|
|
312159
314120
|
this.fragments = fragments;
|
|
312160
|
-
this.nodeSet =
|
|
314121
|
+
this.nodeSet = nodeSet2;
|
|
312161
314122
|
this.i = 0;
|
|
312162
314123
|
this.fragment = null;
|
|
312163
314124
|
this.safeFrom = -1;
|
|
@@ -312939,6 +314900,12 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
312939
314900
|
function json() {
|
|
312940
314901
|
return new LanguageSupport(jsonLanguage);
|
|
312941
314902
|
}
|
|
314903
|
+
const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
314904
|
+
__proto__: null,
|
|
314905
|
+
json,
|
|
314906
|
+
jsonLanguage,
|
|
314907
|
+
jsonParseLinter
|
|
314908
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
312942
314909
|
class SelectedDiagnostic {
|
|
312943
314910
|
constructor(from, to2, diagnostic) {
|
|
312944
314911
|
this.from = from;
|
|
@@ -313030,6 +314997,10 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
313030
314997
|
EditorView.decorations.from(f3, (s3) => s3.diagnostics)
|
|
313031
314998
|
]
|
|
313032
314999
|
});
|
|
315000
|
+
function diagnosticCount(state) {
|
|
315001
|
+
let lint = state.field(lintState, false);
|
|
315002
|
+
return lint ? lint.diagnostics.size : 0;
|
|
315003
|
+
}
|
|
313033
315004
|
const activeMark = /* @__PURE__ */ Decoration.mark({ class: "cm-lintRange cm-lintRange-active" });
|
|
313034
315005
|
function lintTooltip(view, pos, side) {
|
|
313035
315006
|
let { diagnostics } = view.state.field(lintState);
|
|
@@ -313058,6 +315029,15 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
313058
315029
|
function diagnosticsTooltip(view, diagnostics) {
|
|
313059
315030
|
return crelt("ul", { class: "cm-tooltip-lint" }, diagnostics.map((d3) => renderDiagnostic(view, d3, false)));
|
|
313060
315031
|
}
|
|
315032
|
+
const openLintPanel = (view) => {
|
|
315033
|
+
let field = view.state.field(lintState, false);
|
|
315034
|
+
if (!field || !field.panel)
|
|
315035
|
+
view.dispatch({ effects: maybeEnableLint(view.state, [togglePanel.of(true)]) });
|
|
315036
|
+
let panel = getPanel(view, LintPanel.open);
|
|
315037
|
+
if (panel)
|
|
315038
|
+
panel.dom.querySelector(".cm-panel-lint ul").focus();
|
|
315039
|
+
return true;
|
|
315040
|
+
};
|
|
313061
315041
|
const closeLintPanel = (view) => {
|
|
313062
315042
|
let field = view.state.field(lintState, false);
|
|
313063
315043
|
if (!field || !field.panel)
|
|
@@ -313065,6 +315045,44 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
313065
315045
|
view.dispatch({ effects: togglePanel.of(false) });
|
|
313066
315046
|
return true;
|
|
313067
315047
|
};
|
|
315048
|
+
const nextDiagnostic = (view) => {
|
|
315049
|
+
let field = view.state.field(lintState, false);
|
|
315050
|
+
if (!field)
|
|
315051
|
+
return false;
|
|
315052
|
+
let sel = view.state.selection.main, next = field.diagnostics.iter(sel.to + 1);
|
|
315053
|
+
if (!next.value) {
|
|
315054
|
+
next = field.diagnostics.iter(0);
|
|
315055
|
+
if (!next.value || next.from == sel.from && next.to == sel.to)
|
|
315056
|
+
return false;
|
|
315057
|
+
}
|
|
315058
|
+
view.dispatch({ selection: { anchor: next.from, head: next.to }, scrollIntoView: true });
|
|
315059
|
+
return true;
|
|
315060
|
+
};
|
|
315061
|
+
const previousDiagnostic = (view) => {
|
|
315062
|
+
let { state } = view, field = state.field(lintState, false);
|
|
315063
|
+
if (!field)
|
|
315064
|
+
return false;
|
|
315065
|
+
let sel = state.selection.main;
|
|
315066
|
+
let prevFrom, prevTo, lastFrom, lastTo;
|
|
315067
|
+
field.diagnostics.between(0, state.doc.length, (from, to2) => {
|
|
315068
|
+
if (to2 < sel.to && (prevFrom == null || prevFrom < from)) {
|
|
315069
|
+
prevFrom = from;
|
|
315070
|
+
prevTo = to2;
|
|
315071
|
+
}
|
|
315072
|
+
if (lastFrom == null || from > lastFrom) {
|
|
315073
|
+
lastFrom = from;
|
|
315074
|
+
lastTo = to2;
|
|
315075
|
+
}
|
|
315076
|
+
});
|
|
315077
|
+
if (lastFrom == null || prevFrom == null && lastFrom == sel.from)
|
|
315078
|
+
return false;
|
|
315079
|
+
view.dispatch({ selection: { anchor: prevFrom !== null && prevFrom !== void 0 ? prevFrom : lastFrom, head: prevTo !== null && prevTo !== void 0 ? prevTo : lastTo }, scrollIntoView: true });
|
|
315080
|
+
return true;
|
|
315081
|
+
};
|
|
315082
|
+
const lintKeymap = [
|
|
315083
|
+
{ key: "Mod-Shift-m", run: openLintPanel, preventDefault: true },
|
|
315084
|
+
{ key: "F8", run: nextDiagnostic }
|
|
315085
|
+
];
|
|
313068
315086
|
const lintPlugin = /* @__PURE__ */ ViewPlugin.fromClass(class {
|
|
313069
315087
|
constructor(view) {
|
|
313070
315088
|
this.view = view;
|
|
@@ -313144,6 +315162,11 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
313144
315162
|
lintExtensions
|
|
313145
315163
|
];
|
|
313146
315164
|
}
|
|
315165
|
+
function forceLinting(view) {
|
|
315166
|
+
let plugin2 = view.plugin(lintPlugin);
|
|
315167
|
+
if (plugin2)
|
|
315168
|
+
plugin2.force();
|
|
315169
|
+
}
|
|
313147
315170
|
function assignKeys(actions) {
|
|
313148
315171
|
let assigned = [];
|
|
313149
315172
|
if (actions)
|
|
@@ -313466,6 +315489,146 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
313466
315489
|
}
|
|
313467
315490
|
}
|
|
313468
315491
|
});
|
|
315492
|
+
function severityWeight(sev) {
|
|
315493
|
+
return sev == "error" ? 4 : sev == "warning" ? 3 : sev == "info" ? 2 : 1;
|
|
315494
|
+
}
|
|
315495
|
+
class LintGutterMarker extends GutterMarker {
|
|
315496
|
+
constructor(diagnostics) {
|
|
315497
|
+
super();
|
|
315498
|
+
this.diagnostics = diagnostics;
|
|
315499
|
+
this.severity = diagnostics.reduce((max2, d3) => severityWeight(max2) < severityWeight(d3.severity) ? d3.severity : max2, "hint");
|
|
315500
|
+
}
|
|
315501
|
+
toDOM(view) {
|
|
315502
|
+
let elt2 = document.createElement("div");
|
|
315503
|
+
elt2.className = "cm-lint-marker cm-lint-marker-" + this.severity;
|
|
315504
|
+
let diagnostics = this.diagnostics;
|
|
315505
|
+
let diagnosticsFilter = view.state.facet(lintGutterConfig).tooltipFilter;
|
|
315506
|
+
if (diagnosticsFilter)
|
|
315507
|
+
diagnostics = diagnosticsFilter(diagnostics, view.state);
|
|
315508
|
+
if (diagnostics.length)
|
|
315509
|
+
elt2.onmouseover = () => gutterMarkerMouseOver(view, elt2, diagnostics);
|
|
315510
|
+
return elt2;
|
|
315511
|
+
}
|
|
315512
|
+
}
|
|
315513
|
+
function trackHoverOn(view, marker) {
|
|
315514
|
+
let mousemove = (event) => {
|
|
315515
|
+
let rect = marker.getBoundingClientRect();
|
|
315516
|
+
if (event.clientX > rect.left - 10 && event.clientX < rect.right + 10 && event.clientY > rect.top - 10 && event.clientY < rect.bottom + 10)
|
|
315517
|
+
return;
|
|
315518
|
+
for (let target = event.target; target; target = target.parentNode) {
|
|
315519
|
+
if (target.nodeType == 1 && target.classList.contains("cm-tooltip-lint"))
|
|
315520
|
+
return;
|
|
315521
|
+
}
|
|
315522
|
+
window.removeEventListener("mousemove", mousemove);
|
|
315523
|
+
if (view.state.field(lintGutterTooltip))
|
|
315524
|
+
view.dispatch({ effects: setLintGutterTooltip.of(null) });
|
|
315525
|
+
};
|
|
315526
|
+
window.addEventListener("mousemove", mousemove);
|
|
315527
|
+
}
|
|
315528
|
+
function gutterMarkerMouseOver(view, marker, diagnostics) {
|
|
315529
|
+
function hovered() {
|
|
315530
|
+
let line = view.elementAtHeight(marker.getBoundingClientRect().top + 5 - view.documentTop);
|
|
315531
|
+
const linePos = view.coordsAtPos(line.from);
|
|
315532
|
+
if (linePos) {
|
|
315533
|
+
view.dispatch({ effects: setLintGutterTooltip.of({
|
|
315534
|
+
pos: line.from,
|
|
315535
|
+
above: false,
|
|
315536
|
+
create() {
|
|
315537
|
+
return {
|
|
315538
|
+
dom: diagnosticsTooltip(view, diagnostics),
|
|
315539
|
+
getCoords: () => marker.getBoundingClientRect()
|
|
315540
|
+
};
|
|
315541
|
+
}
|
|
315542
|
+
}) });
|
|
315543
|
+
}
|
|
315544
|
+
marker.onmouseout = marker.onmousemove = null;
|
|
315545
|
+
trackHoverOn(view, marker);
|
|
315546
|
+
}
|
|
315547
|
+
let { hoverTime } = view.state.facet(lintGutterConfig);
|
|
315548
|
+
let hoverTimeout = setTimeout(hovered, hoverTime);
|
|
315549
|
+
marker.onmouseout = () => {
|
|
315550
|
+
clearTimeout(hoverTimeout);
|
|
315551
|
+
marker.onmouseout = marker.onmousemove = null;
|
|
315552
|
+
};
|
|
315553
|
+
marker.onmousemove = () => {
|
|
315554
|
+
clearTimeout(hoverTimeout);
|
|
315555
|
+
hoverTimeout = setTimeout(hovered, hoverTime);
|
|
315556
|
+
};
|
|
315557
|
+
}
|
|
315558
|
+
function markersForDiagnostics(doc2, diagnostics) {
|
|
315559
|
+
let byLine = /* @__PURE__ */ Object.create(null);
|
|
315560
|
+
for (let diagnostic of diagnostics) {
|
|
315561
|
+
let line = doc2.lineAt(diagnostic.from);
|
|
315562
|
+
(byLine[line.from] || (byLine[line.from] = [])).push(diagnostic);
|
|
315563
|
+
}
|
|
315564
|
+
let markers = [];
|
|
315565
|
+
for (let line in byLine) {
|
|
315566
|
+
markers.push(new LintGutterMarker(byLine[line]).range(+line));
|
|
315567
|
+
}
|
|
315568
|
+
return RangeSet.of(markers, true);
|
|
315569
|
+
}
|
|
315570
|
+
const lintGutterExtension = /* @__PURE__ */ gutter({
|
|
315571
|
+
class: "cm-gutter-lint",
|
|
315572
|
+
markers: (view) => view.state.field(lintGutterMarkers),
|
|
315573
|
+
widgetMarker: (view, widget, block) => {
|
|
315574
|
+
let diagnostics = [];
|
|
315575
|
+
view.state.field(lintGutterMarkers).between(block.from, block.to, (from, to2, value) => {
|
|
315576
|
+
diagnostics.push(...value.diagnostics);
|
|
315577
|
+
});
|
|
315578
|
+
return diagnostics.length ? new LintGutterMarker(diagnostics) : null;
|
|
315579
|
+
}
|
|
315580
|
+
});
|
|
315581
|
+
const lintGutterMarkers = /* @__PURE__ */ StateField.define({
|
|
315582
|
+
create() {
|
|
315583
|
+
return RangeSet.empty;
|
|
315584
|
+
},
|
|
315585
|
+
update(markers, tr2) {
|
|
315586
|
+
markers = markers.map(tr2.changes);
|
|
315587
|
+
let diagnosticFilter = tr2.state.facet(lintGutterConfig).markerFilter;
|
|
315588
|
+
for (let effect2 of tr2.effects) {
|
|
315589
|
+
if (effect2.is(setDiagnosticsEffect)) {
|
|
315590
|
+
let diagnostics = effect2.value;
|
|
315591
|
+
if (diagnosticFilter)
|
|
315592
|
+
diagnostics = diagnosticFilter(diagnostics || [], tr2.state);
|
|
315593
|
+
markers = markersForDiagnostics(tr2.state.doc, diagnostics.slice(0));
|
|
315594
|
+
}
|
|
315595
|
+
}
|
|
315596
|
+
return markers;
|
|
315597
|
+
}
|
|
315598
|
+
});
|
|
315599
|
+
const setLintGutterTooltip = /* @__PURE__ */ StateEffect.define();
|
|
315600
|
+
const lintGutterTooltip = /* @__PURE__ */ StateField.define({
|
|
315601
|
+
create() {
|
|
315602
|
+
return null;
|
|
315603
|
+
},
|
|
315604
|
+
update(tooltip, tr2) {
|
|
315605
|
+
if (tooltip && tr2.docChanged)
|
|
315606
|
+
tooltip = hideTooltip(tr2, tooltip) ? null : Object.assign(Object.assign({}, tooltip), { pos: tr2.changes.mapPos(tooltip.pos) });
|
|
315607
|
+
return tr2.effects.reduce((t3, e3) => e3.is(setLintGutterTooltip) ? e3.value : t3, tooltip);
|
|
315608
|
+
},
|
|
315609
|
+
provide: (field) => showTooltip.from(field)
|
|
315610
|
+
});
|
|
315611
|
+
const lintGutterTheme = /* @__PURE__ */ EditorView.baseTheme({
|
|
315612
|
+
".cm-gutter-lint": {
|
|
315613
|
+
width: "1.4em",
|
|
315614
|
+
"& .cm-gutterElement": {
|
|
315615
|
+
padding: ".2em"
|
|
315616
|
+
}
|
|
315617
|
+
},
|
|
315618
|
+
".cm-lint-marker": {
|
|
315619
|
+
width: "1em",
|
|
315620
|
+
height: "1em"
|
|
315621
|
+
},
|
|
315622
|
+
".cm-lint-marker-info": {
|
|
315623
|
+
content: /* @__PURE__ */ svg(`<path fill="#aaf" stroke="#77e" stroke-width="6" stroke-linejoin="round" d="M5 5L35 5L35 35L5 35Z"/>`)
|
|
315624
|
+
},
|
|
315625
|
+
".cm-lint-marker-warning": {
|
|
315626
|
+
content: /* @__PURE__ */ svg(`<path fill="#fe8" stroke="#fd7" stroke-width="6" stroke-linejoin="round" d="M20 6L37 35L3 35Z"/>`)
|
|
315627
|
+
},
|
|
315628
|
+
".cm-lint-marker-error": {
|
|
315629
|
+
content: /* @__PURE__ */ svg(`<circle cx="20" cy="20" r="15" fill="#f87" stroke="#f43" stroke-width="6"/>`)
|
|
315630
|
+
}
|
|
315631
|
+
});
|
|
313469
315632
|
const lintExtensions = [
|
|
313470
315633
|
lintState,
|
|
313471
315634
|
/* @__PURE__ */ EditorView.decorations.compute([lintState], (state) => {
|
|
@@ -313477,6 +315640,39 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
313477
315640
|
/* @__PURE__ */ hoverTooltip(lintTooltip, { hideOn: hideTooltip }),
|
|
313478
315641
|
baseTheme
|
|
313479
315642
|
];
|
|
315643
|
+
const lintGutterConfig = /* @__PURE__ */ Facet.define({
|
|
315644
|
+
combine(configs) {
|
|
315645
|
+
return combineConfig(configs, {
|
|
315646
|
+
hoverTime: 300,
|
|
315647
|
+
markerFilter: null,
|
|
315648
|
+
tooltipFilter: null
|
|
315649
|
+
});
|
|
315650
|
+
}
|
|
315651
|
+
});
|
|
315652
|
+
function lintGutter(config2 = {}) {
|
|
315653
|
+
return [lintGutterConfig.of(config2), lintGutterMarkers, lintGutterExtension, lintGutterTheme, lintGutterTooltip];
|
|
315654
|
+
}
|
|
315655
|
+
function forEachDiagnostic(state, f3) {
|
|
315656
|
+
let lState = state.field(lintState, false);
|
|
315657
|
+
if (lState && lState.diagnostics.size)
|
|
315658
|
+
for (let iter = RangeSet.iter([lState.diagnostics]); iter.value; iter.next())
|
|
315659
|
+
f3(iter.value.spec.diagnostic, iter.from, iter.to);
|
|
315660
|
+
}
|
|
315661
|
+
const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
315662
|
+
__proto__: null,
|
|
315663
|
+
closeLintPanel,
|
|
315664
|
+
diagnosticCount,
|
|
315665
|
+
forEachDiagnostic,
|
|
315666
|
+
forceLinting,
|
|
315667
|
+
lintGutter,
|
|
315668
|
+
lintKeymap,
|
|
315669
|
+
linter,
|
|
315670
|
+
nextDiagnostic,
|
|
315671
|
+
openLintPanel,
|
|
315672
|
+
previousDiagnostic,
|
|
315673
|
+
setDiagnostics,
|
|
315674
|
+
setDiagnosticsEffect
|
|
315675
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
313480
315676
|
const getJSONExtensions = () => [
|
|
313481
315677
|
lineNumbers(),
|
|
313482
315678
|
json(),
|
|
@@ -313507,11 +315703,11 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
313507
315703
|
this.children.push(child);
|
|
313508
315704
|
this.positions.push(pos);
|
|
313509
315705
|
}
|
|
313510
|
-
toTree(
|
|
315706
|
+
toTree(nodeSet2, end2 = this.end) {
|
|
313511
315707
|
let last = this.children.length - 1;
|
|
313512
315708
|
if (last >= 0)
|
|
313513
315709
|
end2 = Math.max(end2, this.positions[last] + this.children[last].length + this.from);
|
|
313514
|
-
return new Tree(
|
|
315710
|
+
return new Tree(nodeSet2.types[this.type], this.children, this.positions, end2 - this.from).balance({
|
|
313515
315711
|
makeTree: (children2, positions, length) => new Tree(NodeType.none, children2, positions, length, this.hashProp)
|
|
313516
315712
|
});
|
|
313517
315713
|
}
|
|
@@ -313779,12 +315975,12 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
313779
315975
|
let indented = line.countIndent(line.skipSpace(pos), pos, indentAfter);
|
|
313780
315976
|
return indented >= indentAfter + 5 ? indentAfter + 1 : indented;
|
|
313781
315977
|
}
|
|
313782
|
-
function addCodeText(
|
|
313783
|
-
let last =
|
|
313784
|
-
if (last >= 0 &&
|
|
313785
|
-
|
|
315978
|
+
function addCodeText(marks2, from, to2) {
|
|
315979
|
+
let last = marks2.length - 1;
|
|
315980
|
+
if (last >= 0 && marks2[last].to == from && marks2[last].type == Type$1.CodeText)
|
|
315981
|
+
marks2[last].to = to2;
|
|
313786
315982
|
else
|
|
313787
|
-
|
|
315983
|
+
marks2.push(elt(Type$1.CodeText, from, to2));
|
|
313788
315984
|
}
|
|
313789
315985
|
const DefaultBlockParsers = {
|
|
313790
315986
|
LinkReference: void 0,
|
|
@@ -313794,8 +315990,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
313794
315990
|
return false;
|
|
313795
315991
|
let start2 = line.findColumn(base2);
|
|
313796
315992
|
let from = cx.lineStart + start2, to2 = cx.lineStart + line.text.length;
|
|
313797
|
-
let
|
|
313798
|
-
addCodeText(
|
|
315993
|
+
let marks2 = [], pendingMarks = [];
|
|
315994
|
+
addCodeText(marks2, from, to2);
|
|
313799
315995
|
while (cx.nextLine() && line.depth >= cx.stack.length) {
|
|
313800
315996
|
if (line.pos == line.text.length) {
|
|
313801
315997
|
addCodeText(pendingMarks, cx.lineStart - 1, cx.lineStart);
|
|
@@ -313807,19 +316003,19 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
313807
316003
|
if (pendingMarks.length) {
|
|
313808
316004
|
for (let m3 of pendingMarks) {
|
|
313809
316005
|
if (m3.type == Type$1.CodeText)
|
|
313810
|
-
addCodeText(
|
|
316006
|
+
addCodeText(marks2, m3.from, m3.to);
|
|
313811
316007
|
else
|
|
313812
|
-
|
|
316008
|
+
marks2.push(m3);
|
|
313813
316009
|
}
|
|
313814
316010
|
pendingMarks = [];
|
|
313815
316011
|
}
|
|
313816
|
-
addCodeText(
|
|
316012
|
+
addCodeText(marks2, cx.lineStart - 1, cx.lineStart);
|
|
313817
316013
|
for (let m3 of line.markers)
|
|
313818
|
-
|
|
316014
|
+
marks2.push(m3);
|
|
313819
316015
|
to2 = cx.lineStart + line.text.length;
|
|
313820
316016
|
let codeStart = cx.lineStart + line.findColumn(line.baseIndent + 4);
|
|
313821
316017
|
if (codeStart < to2)
|
|
313822
|
-
addCodeText(
|
|
316018
|
+
addCodeText(marks2, codeStart, to2);
|
|
313823
316019
|
}
|
|
313824
316020
|
}
|
|
313825
316021
|
if (pendingMarks.length) {
|
|
@@ -313827,7 +316023,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
313827
316023
|
if (pendingMarks.length)
|
|
313828
316024
|
line.markers = pendingMarks.concat(line.markers);
|
|
313829
316025
|
}
|
|
313830
|
-
cx.addNode(cx.buffer.writeElements(
|
|
316026
|
+
cx.addNode(cx.buffer.writeElements(marks2, -from).finish(Type$1.CodeBlock, to2 - from), from);
|
|
313831
316027
|
return true;
|
|
313832
316028
|
},
|
|
313833
316029
|
FencedCode(cx, line) {
|
|
@@ -313836,9 +316032,9 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
313836
316032
|
return false;
|
|
313837
316033
|
let from = cx.lineStart + line.pos, ch2 = line.next, len = fenceEnd - line.pos;
|
|
313838
316034
|
let infoFrom = line.skipSpace(fenceEnd), infoTo = skipSpaceBack(line.text, line.text.length, infoFrom);
|
|
313839
|
-
let
|
|
316035
|
+
let marks2 = [elt(Type$1.CodeMark, from, from + len)];
|
|
313840
316036
|
if (infoFrom < infoTo)
|
|
313841
|
-
|
|
316037
|
+
marks2.push(elt(Type$1.CodeInfo, cx.lineStart + infoFrom, cx.lineStart + infoTo));
|
|
313842
316038
|
for (let first = true; cx.nextLine() && line.depth >= cx.stack.length; first = false) {
|
|
313843
316039
|
let i3 = line.pos;
|
|
313844
316040
|
if (line.indent - line.baseIndent < 4)
|
|
@@ -313846,21 +316042,21 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
313846
316042
|
i3++;
|
|
313847
316043
|
if (i3 - line.pos >= len && line.skipSpace(i3) == line.text.length) {
|
|
313848
316044
|
for (let m3 of line.markers)
|
|
313849
|
-
|
|
313850
|
-
|
|
316045
|
+
marks2.push(m3);
|
|
316046
|
+
marks2.push(elt(Type$1.CodeMark, cx.lineStart + line.pos, cx.lineStart + i3));
|
|
313851
316047
|
cx.nextLine();
|
|
313852
316048
|
break;
|
|
313853
316049
|
} else {
|
|
313854
316050
|
if (!first)
|
|
313855
|
-
addCodeText(
|
|
316051
|
+
addCodeText(marks2, cx.lineStart - 1, cx.lineStart);
|
|
313856
316052
|
for (let m3 of line.markers)
|
|
313857
|
-
|
|
316053
|
+
marks2.push(m3);
|
|
313858
316054
|
let textStart = cx.lineStart + line.basePos, textEnd = cx.lineStart + line.text.length;
|
|
313859
316055
|
if (textStart < textEnd)
|
|
313860
|
-
addCodeText(
|
|
316056
|
+
addCodeText(marks2, textStart, textEnd);
|
|
313861
316057
|
}
|
|
313862
316058
|
}
|
|
313863
|
-
cx.addNode(cx.buffer.writeElements(
|
|
316059
|
+
cx.addNode(cx.buffer.writeElements(marks2, -from).finish(Type$1.FencedCode, cx.prevLineEnd() - from), from);
|
|
313864
316060
|
return true;
|
|
313865
316061
|
},
|
|
313866
316062
|
Blockquote(cx, line) {
|
|
@@ -313927,20 +316123,20 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
313927
316123
|
if (type < 0)
|
|
313928
316124
|
return false;
|
|
313929
316125
|
let from = cx.lineStart + line.pos, end2 = HTMLBlockStyle[type][1];
|
|
313930
|
-
let
|
|
316126
|
+
let marks2 = [], trailing = end2 != EmptyLine;
|
|
313931
316127
|
while (!end2.test(line.text) && cx.nextLine()) {
|
|
313932
316128
|
if (line.depth < cx.stack.length) {
|
|
313933
316129
|
trailing = false;
|
|
313934
316130
|
break;
|
|
313935
316131
|
}
|
|
313936
316132
|
for (let m3 of line.markers)
|
|
313937
|
-
|
|
316133
|
+
marks2.push(m3);
|
|
313938
316134
|
}
|
|
313939
316135
|
if (trailing)
|
|
313940
316136
|
cx.nextLine();
|
|
313941
316137
|
let nodeType = end2 == CommentEnd ? Type$1.CommentBlock : end2 == ProcessingEnd ? Type$1.ProcessingInstructionBlock : Type$1.HTMLBlock;
|
|
313942
316138
|
let to2 = cx.prevLineEnd();
|
|
313943
|
-
cx.addNode(cx.buffer.writeElements(
|
|
316139
|
+
cx.addNode(cx.buffer.writeElements(marks2, -from).finish(nodeType, to2 - from), from);
|
|
313944
316140
|
return true;
|
|
313945
316141
|
},
|
|
313946
316142
|
SetextHeading: void 0
|
|
@@ -314172,8 +316368,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
314172
316368
|
get depth() {
|
|
314173
316369
|
return this.stack.length;
|
|
314174
316370
|
}
|
|
314175
|
-
parentType(
|
|
314176
|
-
return this.parser.nodeSet.types[this.stack[
|
|
316371
|
+
parentType(depth2 = this.depth - 1) {
|
|
316372
|
+
return this.parser.nodeSet.types[this.stack[depth2].type];
|
|
314177
316373
|
}
|
|
314178
316374
|
nextLine() {
|
|
314179
316375
|
this.lineStart += this.line.text.length;
|
|
@@ -314322,9 +316518,9 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
314322
316518
|
return new Tree(tree.type, children2, positions, tree.to + offset2 - start2, tree.tree ? tree.tree.propValues : void 0);
|
|
314323
316519
|
}
|
|
314324
316520
|
class MarkdownParser extends Parser {
|
|
314325
|
-
constructor(
|
|
316521
|
+
constructor(nodeSet2, blockParsers, leafBlockParsers, blockNames, endLeafBlock, skipContextMarkup, inlineParsers, inlineNames, wrappers) {
|
|
314326
316522
|
super();
|
|
314327
|
-
this.nodeSet =
|
|
316523
|
+
this.nodeSet = nodeSet2;
|
|
314328
316524
|
this.blockParsers = blockParsers;
|
|
314329
316525
|
this.leafBlockParsers = leafBlockParsers;
|
|
314330
316526
|
this.blockNames = blockNames;
|
|
@@ -314334,7 +316530,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
314334
316530
|
this.inlineNames = inlineNames;
|
|
314335
316531
|
this.wrappers = wrappers;
|
|
314336
316532
|
this.nodeTypes = /* @__PURE__ */ Object.create(null);
|
|
314337
|
-
for (let t3 of
|
|
316533
|
+
for (let t3 of nodeSet2.types)
|
|
314338
316534
|
this.nodeTypes[t3.name] = t3.id;
|
|
314339
316535
|
}
|
|
314340
316536
|
createParse(input, fragments, ranges) {
|
|
@@ -314347,11 +316543,11 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
314347
316543
|
let config2 = resolveConfig(spec);
|
|
314348
316544
|
if (!config2)
|
|
314349
316545
|
return this;
|
|
314350
|
-
let { nodeSet, skipContextMarkup } = this;
|
|
316546
|
+
let { nodeSet: nodeSet2, skipContextMarkup } = this;
|
|
314351
316547
|
let blockParsers = this.blockParsers.slice(), leafBlockParsers = this.leafBlockParsers.slice(), blockNames = this.blockNames.slice(), inlineParsers = this.inlineParsers.slice(), inlineNames = this.inlineNames.slice(), endLeafBlock = this.endLeafBlock.slice(), wrappers = this.wrappers;
|
|
314352
316548
|
if (nonEmpty(config2.defineNodes)) {
|
|
314353
316549
|
skipContextMarkup = Object.assign({}, skipContextMarkup);
|
|
314354
|
-
let nodeTypes2 =
|
|
316550
|
+
let nodeTypes2 = nodeSet2.types.slice(), styles2;
|
|
314355
316551
|
for (let s3 of config2.defineNodes) {
|
|
314356
316552
|
let { name: name2, block, composite, style: style2 } = typeof s3 == "string" ? { name: s3 } : s3;
|
|
314357
316553
|
if (nodeTypes2.some((t3) => t3.name == name2))
|
|
@@ -314374,12 +316570,12 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
314374
316570
|
Object.assign(styles2, style2);
|
|
314375
316571
|
}
|
|
314376
316572
|
}
|
|
314377
|
-
|
|
316573
|
+
nodeSet2 = new NodeSet(nodeTypes2);
|
|
314378
316574
|
if (styles2)
|
|
314379
|
-
|
|
316575
|
+
nodeSet2 = nodeSet2.extend(styleTags(styles2));
|
|
314380
316576
|
}
|
|
314381
316577
|
if (nonEmpty(config2.props))
|
|
314382
|
-
|
|
316578
|
+
nodeSet2 = nodeSet2.extend(...config2.props);
|
|
314383
316579
|
if (nonEmpty(config2.remove)) {
|
|
314384
316580
|
for (let rm2 of config2.remove) {
|
|
314385
316581
|
let block = this.blockNames.indexOf(rm2), inline2 = this.inlineNames.indexOf(rm2);
|
|
@@ -314419,7 +316615,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
314419
316615
|
}
|
|
314420
316616
|
if (config2.wrap)
|
|
314421
316617
|
wrappers = wrappers.concat(config2.wrap);
|
|
314422
|
-
return new MarkdownParser(
|
|
316618
|
+
return new MarkdownParser(nodeSet2, blockParsers, leafBlockParsers, blockNames, endLeafBlock, skipContextMarkup, inlineParsers, inlineNames, wrappers);
|
|
314423
316619
|
}
|
|
314424
316620
|
getNodeType(name2) {
|
|
314425
316621
|
let found = this.nodeTypes[name2];
|
|
@@ -314459,14 +316655,14 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
314459
316655
|
let rest = resolveConfig(spec.slice(1));
|
|
314460
316656
|
if (!rest || !conf)
|
|
314461
316657
|
return conf || rest;
|
|
314462
|
-
let
|
|
316658
|
+
let conc2 = (a3, b3) => (a3 || none).concat(b3 || none);
|
|
314463
316659
|
let wrapA = conf.wrap, wrapB = rest.wrap;
|
|
314464
316660
|
return {
|
|
314465
|
-
props:
|
|
314466
|
-
defineNodes:
|
|
314467
|
-
parseBlock:
|
|
314468
|
-
parseInline:
|
|
314469
|
-
remove:
|
|
316661
|
+
props: conc2(conf.props, rest.props),
|
|
316662
|
+
defineNodes: conc2(conf.defineNodes, rest.defineNodes),
|
|
316663
|
+
parseBlock: conc2(conf.parseBlock, rest.parseBlock),
|
|
316664
|
+
parseInline: conc2(conf.parseInline, rest.parseInline),
|
|
316665
|
+
remove: conc2(conf.remove, rest.remove),
|
|
314470
316666
|
wrap: !wrapA ? wrapB : !wrapB ? wrapA : (inner, input, fragments, ranges) => wrapA(wrapB(inner, input, fragments, ranges), input, fragments, ranges)
|
|
314471
316667
|
};
|
|
314472
316668
|
}
|
|
@@ -314487,8 +316683,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
314487
316683
|
}
|
|
314488
316684
|
const none = [];
|
|
314489
316685
|
class Buffer$1 {
|
|
314490
|
-
constructor(
|
|
314491
|
-
this.nodeSet =
|
|
316686
|
+
constructor(nodeSet2) {
|
|
316687
|
+
this.nodeSet = nodeSet2;
|
|
314492
316688
|
this.content = [];
|
|
314493
316689
|
this.nodes = [];
|
|
314494
316690
|
}
|
|
@@ -314523,8 +316719,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
314523
316719
|
buf.writeElements(this.children, offset2);
|
|
314524
316720
|
buf.content.push(this.type, this.from + offset2, this.to + offset2, buf.content.length + 4 - startOff);
|
|
314525
316721
|
}
|
|
314526
|
-
toTree(
|
|
314527
|
-
return new Buffer$1(
|
|
316722
|
+
toTree(nodeSet2) {
|
|
316723
|
+
return new Buffer$1(nodeSet2).writeElements(this.children, -this.from).finish(this.type, this.to - this.from);
|
|
314528
316724
|
}
|
|
314529
316725
|
}
|
|
314530
316726
|
class TreeElement {
|
|
@@ -314731,7 +316927,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
314731
316927
|
}
|
|
314732
316928
|
return null;
|
|
314733
316929
|
} else {
|
|
314734
|
-
let
|
|
316930
|
+
let depth2 = 0, pos = start2;
|
|
314735
316931
|
for (let escaped = false; pos < text2.length; pos++) {
|
|
314736
316932
|
let ch2 = text2.charCodeAt(pos);
|
|
314737
316933
|
if (space$3(ch2)) {
|
|
@@ -314739,11 +316935,11 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
314739
316935
|
} else if (escaped) {
|
|
314740
316936
|
escaped = false;
|
|
314741
316937
|
} else if (ch2 == 40) {
|
|
314742
|
-
|
|
316938
|
+
depth2++;
|
|
314743
316939
|
} else if (ch2 == 41) {
|
|
314744
|
-
if (!
|
|
316940
|
+
if (!depth2)
|
|
314745
316941
|
break;
|
|
314746
|
-
|
|
316942
|
+
depth2--;
|
|
314747
316943
|
} else if (ch2 == 92) {
|
|
314748
316944
|
escaped = true;
|
|
314749
316945
|
}
|
|
@@ -314891,13 +317087,13 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
314891
317087
|
return new TreeElement(type, from);
|
|
314892
317088
|
}
|
|
314893
317089
|
}
|
|
314894
|
-
function injectMarks(elements,
|
|
314895
|
-
if (!
|
|
317090
|
+
function injectMarks(elements, marks2) {
|
|
317091
|
+
if (!marks2.length)
|
|
314896
317092
|
return elements;
|
|
314897
317093
|
if (!elements.length)
|
|
314898
|
-
return
|
|
317094
|
+
return marks2;
|
|
314899
317095
|
let elts = elements.slice(), eI = 0;
|
|
314900
|
-
for (let mark2 of
|
|
317096
|
+
for (let mark2 of marks2) {
|
|
314901
317097
|
while (eI < elts.length && elts[eI].to < mark2.to)
|
|
314902
317098
|
eI++;
|
|
314903
317099
|
if (eI < elts.length && elts[eI].from < mark2.from) {
|
|
@@ -318252,6 +320448,15 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
318252
320448
|
let result = htmlCompletionSource(new CompletionContext(EditorState.create({ extensions: htmlNoMatch }), 0, true));
|
|
318253
320449
|
return _tagCompletions = result ? result.options : [];
|
|
318254
320450
|
}
|
|
320451
|
+
const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
320452
|
+
__proto__: null,
|
|
320453
|
+
commonmarkLanguage,
|
|
320454
|
+
deleteMarkupBackward,
|
|
320455
|
+
insertNewlineContinueMarkup,
|
|
320456
|
+
markdown,
|
|
320457
|
+
markdownKeymap,
|
|
320458
|
+
markdownLanguage
|
|
320459
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
318255
320460
|
const getMarkdownExtensions = () => [
|
|
318256
320461
|
highlightActiveLine(),
|
|
318257
320462
|
highlightActiveLineGutter(),
|
|
@@ -318313,19 +320518,19 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
318313
320518
|
return;
|
|
318314
320519
|
let prev = input.peek(-1);
|
|
318315
320520
|
if (prev == newline || prev == carriageReturn) {
|
|
318316
|
-
let
|
|
320521
|
+
let depth2 = 0, chars = 0;
|
|
318317
320522
|
for (; ; ) {
|
|
318318
320523
|
if (input.next == space)
|
|
318319
|
-
|
|
320524
|
+
depth2++;
|
|
318320
320525
|
else if (input.next == tab)
|
|
318321
|
-
|
|
320526
|
+
depth2 += 8 - depth2 % 8;
|
|
318322
320527
|
else
|
|
318323
320528
|
break;
|
|
318324
320529
|
input.advance();
|
|
318325
320530
|
chars++;
|
|
318326
320531
|
}
|
|
318327
|
-
if (
|
|
318328
|
-
if (
|
|
320532
|
+
if (depth2 != context.indent && input.next != newline && input.next != carriageReturn && input.next != hash) {
|
|
320533
|
+
if (depth2 < context.indent)
|
|
318329
320534
|
input.acceptToken(dedent, -chars);
|
|
318330
320535
|
else
|
|
318331
320536
|
input.acceptToken(indent);
|
|
@@ -318341,10 +320546,10 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
318341
320546
|
}
|
|
318342
320547
|
const topIndent = new Context(null, 0, 0);
|
|
318343
320548
|
function countIndent(space2) {
|
|
318344
|
-
let
|
|
320549
|
+
let depth2 = 0;
|
|
318345
320550
|
for (let i3 = 0; i3 < space2.length; i3++)
|
|
318346
|
-
|
|
318347
|
-
return
|
|
320551
|
+
depth2 += space2.charCodeAt(i3) == tab ? 8 - depth2 % 8 : 1;
|
|
320552
|
+
return depth2;
|
|
318348
320553
|
}
|
|
318349
320554
|
const stringFlags = new Map([
|
|
318350
320555
|
[stringStart, 0],
|
|
@@ -319119,18 +321324,18 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
319119
321324
|
input.acceptToken(LineComment);
|
|
319120
321325
|
} else if (next == 47 && input.next == 42) {
|
|
319121
321326
|
input.advance();
|
|
319122
|
-
for (let
|
|
321327
|
+
for (let depth2 = 1; ; ) {
|
|
319123
321328
|
let cur2 = input.next;
|
|
319124
321329
|
if (input.next < 0)
|
|
319125
321330
|
break;
|
|
319126
321331
|
input.advance();
|
|
319127
321332
|
if (cur2 == 42 && input.next == 47) {
|
|
319128
|
-
|
|
321333
|
+
depth2--;
|
|
319129
321334
|
input.advance();
|
|
319130
|
-
if (!
|
|
321335
|
+
if (!depth2)
|
|
319131
321336
|
break;
|
|
319132
321337
|
} else if (cur2 == 47 && input.next == 42) {
|
|
319133
|
-
|
|
321338
|
+
depth2++;
|
|
319134
321339
|
input.advance();
|
|
319135
321340
|
}
|
|
319136
321341
|
}
|
|
@@ -391198,6 +393403,15 @@ fn mainFragment(
|
|
|
391198
393403
|
exports2.BulletList = BulletList;
|
|
391199
393404
|
exports2.Button = Button;
|
|
391200
393405
|
exports2.ButtonBar = ButtonBar;
|
|
393406
|
+
exports2.CMAutoComplete = index$5;
|
|
393407
|
+
exports2.CMCommands = index$4;
|
|
393408
|
+
exports2.CMLangJson = index$2;
|
|
393409
|
+
exports2.CMLangMarkdown = index;
|
|
393410
|
+
exports2.CMLanguage = index$6;
|
|
393411
|
+
exports2.CMLint = index$1;
|
|
393412
|
+
exports2.CMSearch = index$3;
|
|
393413
|
+
exports2.CMState = index$8;
|
|
393414
|
+
exports2.CMView = index$7;
|
|
391201
393415
|
exports2.Card = Card$1;
|
|
391202
393416
|
exports2.Carousel = Carousel;
|
|
391203
393417
|
exports2.CausalGraphViewer = CausalGraphViewer;
|