jaml-ui 0.32.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/searchPoolWorker-DWobBIhl.js +40 -0
- package/dist/assets/searchPoolWorker-DWobBIhl.js.map +1 -0
- package/dist/chunks/{searchPoolWorker-gPdRA_pa.js → searchPoolWorker-tBaSbLZu.js} +2 -2
- package/dist/chunks/searchPoolWorker-tBaSbLZu.js.map +1 -0
- package/dist/chunks/{ui-CgjJDJdZ.js → ui-Dn8IIoV3.js} +508 -465
- package/dist/chunks/ui-Dn8IIoV3.js.map +1 -0
- package/dist/components/JamlAestheticSelector.d.ts +1 -1
- package/dist/components/SeedFinderApp.d.ts +1 -1
- package/dist/components/jamlMap/JokerPicker.d.ts +1 -1
- package/dist/components/jamlMap/MysterySlot.d.ts +1 -1
- package/dist/decode/motelyItemDecoder.d.ts +6 -0
- package/dist/hooks/searchPoolWorker.d.ts +1 -0
- package/dist/hooks/useAnalyzer.d.ts +2 -2
- package/dist/hooks/useSearch.d.ts +3 -3
- package/dist/hooks/useSearchPool.d.ts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +961 -889
- package/dist/index.js.map +1 -1
- package/dist/lib/hooks/useSeedAnalyzer.d.ts +1 -1
- package/dist/lib/types.d.ts +1 -1
- package/dist/motely.js +143 -125
- package/dist/motely.js.map +1 -1
- package/dist/ui/jimbo.css +1 -1
- package/dist/ui.js +2 -2
- package/package.json +14 -15
- package/dist/assets/searchPoolWorker-Ck5flXVS.js +0 -40
- package/dist/assets/searchPoolWorker-Ck5flXVS.js.map +0 -1
- package/dist/chunks/searchPoolWorker-gPdRA_pa.js.map +0 -1
- package/dist/chunks/ui-CgjJDJdZ.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as f, M as p, N as m, O as h, P as g, Q as _, R as v, S as y, T as b, U as ee, V as x, W as S, Y as C, Z as te, _ as ne, a as re, b as ie, c as ae, d as oe, et as se, f as ce, g as le, h as ue, i as de, j as fe, k as pe, l as me, m as he, n as ge, o as _e, p as ve, q as ye, r as be, s as xe, t as Se, u as Ce, v as we, w as Te, x as Ee, y as De, z as Oe } from "./chunks/ui-
|
|
2
|
+
import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as f, M as p, N as m, O as h, P as g, Q as _, R as v, S as y, T as b, U as ee, V as x, W as S, Y as C, Z as te, _ as ne, a as re, b as ie, c as ae, d as oe, et as se, f as ce, g as le, h as ue, i as de, j as fe, k as pe, l as me, m as he, n as ge, o as _e, p as ve, q as ye, r as be, s as xe, t as Se, u as Ce, v as we, w as Te, x as Ee, y as De, z as Oe } from "./chunks/ui-Dn8IIoV3.js";
|
|
3
3
|
import { n as w, r as ke, t as Ae } from "./chunks/tokens-Qrhlekc4.js";
|
|
4
4
|
import { n as je } from "./chunks/assets-Bb6wV80_.js";
|
|
5
5
|
import { _ as Me, a as Ne, c as Pe, d as Fe, f as Ie, g as Le, h as Re, i as ze, l as Be, m as Ve, o as He, p as T, s as Ue, u as We, v as Ge } from "./chunks/spriteMapper-CajFGgUU.js";
|
|
@@ -7,12 +7,10 @@ import { r as Ke, t as qe } from "./chunks/jamlSeeds-3ILzc_rj.js";
|
|
|
7
7
|
import { r as Je, t as Ye } from "./chunks/motelyItemFormats-CNrFzcCI.js";
|
|
8
8
|
import Xe, { useCallback as E, useEffect as Ze, useLayoutEffect as Qe, useMemo as $e, useRef as D, useState as O } from "react";
|
|
9
9
|
import { Fragment as et, jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
10
|
-
import {
|
|
11
|
-
import { FiX as
|
|
12
|
-
import { Motely as j } from "motely-wasm";
|
|
13
|
-
import { JamlAesthetic as st, JamlAesthetic as ct } from "motely-wasm/motely/filters/jaml";
|
|
10
|
+
import { JamlAesthetic as tt, JamlAesthetic as nt, Motely as j, MotelyBoosterPack as rt, MotelyBossBlind as it, MotelyDeck as at, MotelyJokerRarity as ot, MotelyStake as st, MotelyTag as ct, MotelyVoucher as lt } from "motely-wasm";
|
|
11
|
+
import { FiX as ut } from "react-icons/fi";
|
|
14
12
|
//#region src/render/CanvasRenderer.tsx
|
|
15
|
-
function
|
|
13
|
+
function dt({ layers: t, invert: n = !1, className: r = "", hoverTilt: i = !1 }) {
|
|
16
14
|
let { canvasRef: a, containerRef: o, ratio: s, handlers: c } = e({
|
|
17
15
|
layers: t,
|
|
18
16
|
invert: n,
|
|
@@ -35,23 +33,23 @@ function lt({ layers: t, invert: n = !1, className: r = "", hoverTilt: i = !1 })
|
|
|
35
33
|
}
|
|
36
34
|
//#endregion
|
|
37
35
|
//#region src/components/GameCard.tsx
|
|
38
|
-
function
|
|
36
|
+
function ft(e) {
|
|
39
37
|
let t = e.trim().toUpperCase();
|
|
40
38
|
return t === "A" || t === "ACE" ? "Ace" : t === "K" || t === "KING" ? "King" : t === "Q" || t === "QUEEN" ? "Queen" : t === "J" || t === "JACK" ? "Jack" : e.trim();
|
|
41
39
|
}
|
|
42
|
-
function
|
|
40
|
+
function pt(e) {
|
|
43
41
|
let t = e.trim().toLowerCase();
|
|
44
42
|
return t === "heart" || t === "hearts" ? "Hearts" : t === "club" || t === "clubs" ? "Clubs" : t === "diamond" || t === "diamonds" ? "Diamonds" : t === "spade" || t === "spades" ? "Spades" : e.trim();
|
|
45
43
|
}
|
|
46
|
-
function
|
|
44
|
+
function mt(e) {
|
|
47
45
|
let t = e.trim(), n = /^(A|K|Q|J|10|[2-9]|Ace|King|Queen|Jack)\s+of\s+(Hearts|Clubs|Diamonds|Spades)$/i.exec(t);
|
|
48
46
|
if (n) return {
|
|
49
|
-
rank:
|
|
50
|
-
suit:
|
|
47
|
+
rank: ft(n[1]),
|
|
48
|
+
suit: pt(n[2])
|
|
51
49
|
};
|
|
52
50
|
let r = /^(A|K|Q|J|10|[2-9])\s*([HCDS])$/i.exec(t);
|
|
53
51
|
return r ? {
|
|
54
|
-
rank:
|
|
52
|
+
rank: ft(r[1]),
|
|
55
53
|
suit: {
|
|
56
54
|
H: "Hearts",
|
|
57
55
|
C: "Clubs",
|
|
@@ -60,7 +58,7 @@ function ft(e) {
|
|
|
60
58
|
}[r[2].toUpperCase()]
|
|
61
59
|
} : null;
|
|
62
60
|
}
|
|
63
|
-
var
|
|
61
|
+
var ht = [
|
|
64
62
|
"Eternal",
|
|
65
63
|
"Perishable",
|
|
66
64
|
"Rental",
|
|
@@ -81,11 +79,11 @@ var pt = [
|
|
|
81
79
|
"Blue Seal",
|
|
82
80
|
"Purple Seal"
|
|
83
81
|
];
|
|
84
|
-
function
|
|
82
|
+
function gt(e) {
|
|
85
83
|
let t = e, n, r = !1, i = !1, a = !1, o = !0;
|
|
86
84
|
for (; o;) {
|
|
87
85
|
o = !1;
|
|
88
|
-
for (let e of
|
|
86
|
+
for (let e of ht) if (t.startsWith(e + " ")) {
|
|
89
87
|
let s = t.slice(e.length + 1);
|
|
90
88
|
e === "Foil" || e === "Holographic" || e === "Polychrome" || e === "Negative" ? n = e : e === "Eternal" ? r = !0 : e === "Perishable" ? i = !0 : e === "Rental" && (a = !0), t = s, o = !0;
|
|
91
89
|
break;
|
|
@@ -99,9 +97,9 @@ function mt(e) {
|
|
|
99
97
|
isRental: a
|
|
100
98
|
};
|
|
101
99
|
}
|
|
102
|
-
function
|
|
100
|
+
function _t(e, t) {
|
|
103
101
|
if (typeof e.value != "number" || !Number.isFinite(e.value)) return null;
|
|
104
|
-
let n = String(e.name || "").trim(), { baseName: r, edition: i, isEternal: a, isPerishable: o, isRental: s } =
|
|
102
|
+
let n = String(e.name || "").trim(), { baseName: r, edition: i, isEternal: a, isPerishable: o, isRental: s } = gt(n), c = (e.value & 65535) >> 12 & 15;
|
|
105
103
|
if (c === 5) {
|
|
106
104
|
let e = Be.some((e) => e.name === r) ? r : n;
|
|
107
105
|
if (Be.some((t) => t.name === e)) return {
|
|
@@ -156,7 +154,7 @@ function ht(e, t) {
|
|
|
156
154
|
voucherName: r
|
|
157
155
|
};
|
|
158
156
|
}
|
|
159
|
-
let l =
|
|
157
|
+
let l = mt(n) ?? mt(r);
|
|
160
158
|
return l ? {
|
|
161
159
|
kind: "playing",
|
|
162
160
|
type: "playing",
|
|
@@ -171,13 +169,13 @@ function ht(e, t) {
|
|
|
171
169
|
label: n
|
|
172
170
|
};
|
|
173
171
|
}
|
|
174
|
-
function
|
|
172
|
+
function vt(e, t = 1) {
|
|
175
173
|
let n = String(e.name || "").trim();
|
|
176
174
|
if (!n) return {
|
|
177
175
|
kind: "unknown",
|
|
178
176
|
label: String(e.id || "").trim() || "Unknown Item"
|
|
179
177
|
};
|
|
180
|
-
let r =
|
|
178
|
+
let r = _t(e, t);
|
|
181
179
|
if (r && r.kind !== "unknown") return r;
|
|
182
180
|
if (Ge.some((e) => e.name === n)) return {
|
|
183
181
|
kind: "voucher",
|
|
@@ -199,7 +197,7 @@ function gt(e, t = 1) {
|
|
|
199
197
|
scale: t
|
|
200
198
|
}
|
|
201
199
|
};
|
|
202
|
-
let { baseName: i, edition: a, isEternal: o, isPerishable: s, isRental: c } =
|
|
200
|
+
let { baseName: i, edition: a, isEternal: o, isPerishable: s, isRental: c } = gt(n);
|
|
203
201
|
if (i !== n) {
|
|
204
202
|
if (Be.some((e) => e.name === i)) return {
|
|
205
203
|
kind: "joker",
|
|
@@ -227,7 +225,7 @@ function gt(e, t = 1) {
|
|
|
227
225
|
voucherName: i
|
|
228
226
|
};
|
|
229
227
|
}
|
|
230
|
-
let l =
|
|
228
|
+
let l = mt(n) ?? mt(i);
|
|
231
229
|
return l ? {
|
|
232
230
|
kind: "playing",
|
|
233
231
|
type: "playing",
|
|
@@ -242,7 +240,7 @@ function gt(e, t = 1) {
|
|
|
242
240
|
label: n
|
|
243
241
|
};
|
|
244
242
|
}
|
|
245
|
-
function
|
|
243
|
+
function yt({ card: e, type: t, className: n = "", hoverTilt: r = !1 }) {
|
|
246
244
|
let { name: i, edition: a, isEternal: o, isPerishable: s, isRental: c, rank: l, suit: u, enhancements: d, seal: f, scale: p = 1 } = e, m = [];
|
|
247
245
|
if (t === "joker") {
|
|
248
246
|
let e = Be.find((e) => e.name === i);
|
|
@@ -352,14 +350,14 @@ function _t({ card: e, type: t, className: n = "", hoverTilt: r = !1 }) {
|
|
|
352
350
|
return /* @__PURE__ */ k("div", {
|
|
353
351
|
className: `j-game-card ${n}`.trim(),
|
|
354
352
|
style: { "--j-card-width": `${71 * p}px` },
|
|
355
|
-
children: /* @__PURE__ */ k(
|
|
353
|
+
children: /* @__PURE__ */ k(dt, {
|
|
356
354
|
invert: a === "Negative",
|
|
357
355
|
layers: m,
|
|
358
356
|
hoverTilt: r
|
|
359
357
|
})
|
|
360
358
|
});
|
|
361
359
|
}
|
|
362
|
-
function
|
|
360
|
+
function bt({ voucherName: e, scale: t = 1, className: n = "", hoverTilt: r = !1 }) {
|
|
363
361
|
let i = Ge.find((t) => t.name === e);
|
|
364
362
|
if (!i) return null;
|
|
365
363
|
let a = [new Ke({
|
|
@@ -372,13 +370,13 @@ function vt({ voucherName: e, scale: t = 1, className: n = "", hoverTilt: r = !1
|
|
|
372
370
|
return /* @__PURE__ */ k("div", {
|
|
373
371
|
className: `j-game-card ${n}`.trim(),
|
|
374
372
|
style: { "--j-card-width": `${71 * t}px` },
|
|
375
|
-
children: /* @__PURE__ */ k(
|
|
373
|
+
children: /* @__PURE__ */ k(dt, {
|
|
376
374
|
layers: a,
|
|
377
375
|
hoverTilt: r
|
|
378
376
|
})
|
|
379
377
|
});
|
|
380
378
|
}
|
|
381
|
-
function
|
|
379
|
+
function xt({ tagName: e, scale: t = 1, className: n = "", hoverTilt: r = !1 }) {
|
|
382
380
|
let i = Le.find((t) => t.name === e);
|
|
383
381
|
if (!i) return null;
|
|
384
382
|
let a = [new Ke({
|
|
@@ -391,13 +389,13 @@ function yt({ tagName: e, scale: t = 1, className: n = "", hoverTilt: r = !1 })
|
|
|
391
389
|
return /* @__PURE__ */ k("div", {
|
|
392
390
|
className: `j-game-card ${n}`.trim(),
|
|
393
391
|
style: { "--j-card-width": `${71 * t}px` },
|
|
394
|
-
children: /* @__PURE__ */ k(
|
|
392
|
+
children: /* @__PURE__ */ k(dt, {
|
|
395
393
|
layers: a,
|
|
396
394
|
hoverTilt: r
|
|
397
395
|
})
|
|
398
396
|
});
|
|
399
397
|
}
|
|
400
|
-
function
|
|
398
|
+
function St({ bossName: e, scale: t = 1, className: n = "", hoverTilt: r = !1 }) {
|
|
401
399
|
let i = Ne.find((t) => t.name === e);
|
|
402
400
|
if (!i) return null;
|
|
403
401
|
let a = [new Ke({
|
|
@@ -410,7 +408,7 @@ function bt({ bossName: e, scale: t = 1, className: n = "", hoverTilt: r = !1 })
|
|
|
410
408
|
return /* @__PURE__ */ k("div", {
|
|
411
409
|
className: `j-game-card ${n}`.trim(),
|
|
412
410
|
style: { "--j-card-width": `${71 * t}px` },
|
|
413
|
-
children: /* @__PURE__ */ k(
|
|
411
|
+
children: /* @__PURE__ */ k(dt, {
|
|
414
412
|
layers: a,
|
|
415
413
|
hoverTilt: r
|
|
416
414
|
})
|
|
@@ -418,7 +416,7 @@ function bt({ bossName: e, scale: t = 1, className: n = "", hoverTilt: r = !1 })
|
|
|
418
416
|
}
|
|
419
417
|
//#endregion
|
|
420
418
|
//#region src/utils/jamlMapPreview.ts
|
|
421
|
-
var
|
|
419
|
+
var Ct = {
|
|
422
420
|
joker: "joker",
|
|
423
421
|
jokers: "joker",
|
|
424
422
|
commonJoker: "joker",
|
|
@@ -441,29 +439,29 @@ var xt = {
|
|
|
441
439
|
smallBlindTag: "tag",
|
|
442
440
|
bigBlindTag: "tag"
|
|
443
441
|
};
|
|
444
|
-
function
|
|
442
|
+
function wt() {
|
|
445
443
|
return {
|
|
446
444
|
must: [],
|
|
447
445
|
should: [],
|
|
448
446
|
mustNot: []
|
|
449
447
|
};
|
|
450
448
|
}
|
|
451
|
-
function
|
|
449
|
+
function Tt(e) {
|
|
452
450
|
return e.startsWith("\"") && e.endsWith("\"") || e.startsWith("'") && e.endsWith("'") ? e.slice(1, -1).trim() : e;
|
|
453
451
|
}
|
|
454
|
-
function
|
|
455
|
-
let t =
|
|
452
|
+
function Et(e) {
|
|
453
|
+
let t = Tt(e.trim()).replace(/,$/, "").trim();
|
|
456
454
|
return !t || t === "Any" ? null : t;
|
|
457
455
|
}
|
|
458
|
-
function
|
|
456
|
+
function Dt(e) {
|
|
459
457
|
let t = e.trim();
|
|
460
458
|
if (!t) return [];
|
|
461
|
-
if (t.startsWith("[") && t.includes("]")) return t.slice(1, t.indexOf("]")).split(",").map((e) =>
|
|
462
|
-
let n =
|
|
459
|
+
if (t.startsWith("[") && t.includes("]")) return t.slice(1, t.indexOf("]")).split(",").map((e) => Et(e)).filter((e) => !!e);
|
|
460
|
+
let n = Et(t);
|
|
463
461
|
return n ? [n] : [];
|
|
464
462
|
}
|
|
465
|
-
function
|
|
466
|
-
let t =
|
|
463
|
+
function Ot(e) {
|
|
464
|
+
let t = wt(), n = /* @__PURE__ */ new Set(), r = (e || "").replace(/\r\n/g, "\n").split("\n"), i = null;
|
|
467
465
|
for (let e of r) {
|
|
468
466
|
let r = e.trim();
|
|
469
467
|
if (!r || r.startsWith("#")) continue;
|
|
@@ -475,9 +473,9 @@ function Et(e) {
|
|
|
475
473
|
if (e.search(/\S|$/) === 0 && /^[A-Za-z][A-Za-z0-9]*:\s*/.test(r) && (i = null), !i) continue;
|
|
476
474
|
let o = /^-?\s*([A-Za-z][A-Za-z0-9]*):\s*(.*?)\s*$/.exec(r);
|
|
477
475
|
if (!o) continue;
|
|
478
|
-
let s = o[1], c =
|
|
476
|
+
let s = o[1], c = Ct[s];
|
|
479
477
|
if (!c) continue;
|
|
480
|
-
let l =
|
|
478
|
+
let l = Dt(o[2]);
|
|
481
479
|
for (let r of l) {
|
|
482
480
|
let a = `${i}:${c}:${r.toLowerCase()}`;
|
|
483
481
|
n.has(a) || (n.add(a), t[i].push({
|
|
@@ -494,7 +492,7 @@ function Et(e) {
|
|
|
494
492
|
}
|
|
495
493
|
//#endregion
|
|
496
494
|
//#region src/components/JamlMapPreview.tsx
|
|
497
|
-
var M = w,
|
|
495
|
+
var M = w, kt = {
|
|
498
496
|
must: {
|
|
499
497
|
label: "Must",
|
|
500
498
|
color: M.BLUE,
|
|
@@ -510,18 +508,18 @@ var M = w, Dt = {
|
|
|
510
508
|
color: M.ORANGE,
|
|
511
509
|
glow: M.ORANGE
|
|
512
510
|
}
|
|
513
|
-
},
|
|
511
|
+
}, At = [
|
|
514
512
|
"must",
|
|
515
513
|
"should",
|
|
516
514
|
"mustNot"
|
|
517
|
-
],
|
|
515
|
+
], jt = {
|
|
518
516
|
joker: "Jokers",
|
|
519
517
|
consumable: "Tarots",
|
|
520
518
|
voucher: "Vouchers",
|
|
521
519
|
tag: "tags",
|
|
522
520
|
boss: "BlindChips"
|
|
523
521
|
};
|
|
524
|
-
function
|
|
522
|
+
function Mt({ item: e, glow: t, matchCount: n }) {
|
|
525
523
|
let r = n > 0, i = n !== void 0 && n >= 0;
|
|
526
524
|
return /* @__PURE__ */ A("div", {
|
|
527
525
|
style: {
|
|
@@ -541,7 +539,7 @@ function At({ item: e, glow: t, matchCount: n }) {
|
|
|
541
539
|
children: [
|
|
542
540
|
/* @__PURE__ */ k(te, {
|
|
543
541
|
name: e.value,
|
|
544
|
-
sheet:
|
|
542
|
+
sheet: jt[e.visualType],
|
|
545
543
|
width: 26
|
|
546
544
|
}),
|
|
547
545
|
/* @__PURE__ */ k("div", {
|
|
@@ -571,8 +569,8 @@ function At({ item: e, glow: t, matchCount: n }) {
|
|
|
571
569
|
]
|
|
572
570
|
});
|
|
573
571
|
}
|
|
574
|
-
function
|
|
575
|
-
let i =
|
|
572
|
+
function Nt({ zone: e, items: t, matchMap: n, compact: r = !1 }) {
|
|
573
|
+
let i = kt[e];
|
|
576
574
|
return /* @__PURE__ */ A("div", {
|
|
577
575
|
style: {
|
|
578
576
|
border: `2px dashed ${i.color}55`,
|
|
@@ -630,7 +628,7 @@ function jt({ zone: e, items: t, matchMap: n, compact: r = !1 }) {
|
|
|
630
628
|
children: "drop clauses here"
|
|
631
629
|
}) : t.map((e) => {
|
|
632
630
|
let t = n[`${e.section}: ${e.clauseKey}: ${e.value}`] ?? -1;
|
|
633
|
-
return /* @__PURE__ */ k(
|
|
631
|
+
return /* @__PURE__ */ k(Mt, {
|
|
634
632
|
item: e,
|
|
635
633
|
glow: i.glow,
|
|
636
634
|
matchCount: t
|
|
@@ -639,8 +637,8 @@ function jt({ zone: e, items: t, matchMap: n, compact: r = !1 }) {
|
|
|
639
637
|
})]
|
|
640
638
|
});
|
|
641
639
|
}
|
|
642
|
-
function
|
|
643
|
-
let o = $e(() =>
|
|
640
|
+
function Pt({ jaml: e, className: t = "", emptyMessage: n = "No visual JAML clauses found yet.", tallyColumns: r, tallyLabels: i, compact: a = !1 }) {
|
|
641
|
+
let o = $e(() => Ot(e), [e]), s = At.reduce((e, t) => e + o[t].length, 0), c = $e(() => {
|
|
644
642
|
let e = {};
|
|
645
643
|
return r && i && i.forEach((t, n) => {
|
|
646
644
|
e[t] = r[n] ?? 0;
|
|
@@ -671,7 +669,7 @@ function Mt({ jaml: e, className: t = "", emptyMessage: n = "No visual JAML clau
|
|
|
671
669
|
width: "100%",
|
|
672
670
|
boxSizing: "border-box"
|
|
673
671
|
},
|
|
674
|
-
children:
|
|
672
|
+
children: At.map((e) => /* @__PURE__ */ k(Nt, {
|
|
675
673
|
zone: e,
|
|
676
674
|
items: o[e],
|
|
677
675
|
matchMap: c,
|
|
@@ -681,18 +679,18 @@ function Mt({ jaml: e, className: t = "", emptyMessage: n = "No visual JAML clau
|
|
|
681
679
|
}
|
|
682
680
|
//#endregion
|
|
683
681
|
//#region src/components/jamlMap/MysterySlot.tsx
|
|
684
|
-
var
|
|
685
|
-
must:
|
|
686
|
-
should:
|
|
687
|
-
mustnot:
|
|
682
|
+
var Ft = w, It = {
|
|
683
|
+
must: Ft.BLUE,
|
|
684
|
+
should: Ft.RED,
|
|
685
|
+
mustnot: Ft.ORANGE
|
|
688
686
|
};
|
|
689
|
-
function
|
|
687
|
+
function Lt({ zone: e, sheetType: t, selection: n, width: r = 56, onTap: i, onClear: a, style: o }) {
|
|
690
688
|
let [s, c] = O(!1), [l, u] = O(!1), [d, f] = O({
|
|
691
689
|
rx: 0,
|
|
692
690
|
ry: 0,
|
|
693
691
|
tx: 0,
|
|
694
692
|
ty: 0
|
|
695
|
-
}), p = Xe.useRef(null), m =
|
|
693
|
+
}), p = Xe.useRef(null), m = It[e], h = !n, g = Math.round(r * 95 / 71), _ = n?.packName ?? n?.value ?? "", v = n?.packName ? "Boosters" : n ? Rt(n.category) ?? t : t, y = l ? .95 : s ? Ae.JUICE_UP_SCALE : 1;
|
|
696
694
|
return /* @__PURE__ */ k("div", {
|
|
697
695
|
ref: p,
|
|
698
696
|
onClick: i,
|
|
@@ -733,11 +731,11 @@ function Ft({ zone: e, sheetType: t, selection: n, width: r = 56, onTap: i, onCl
|
|
|
733
731
|
justifyContent: "center",
|
|
734
732
|
borderRadius: 6,
|
|
735
733
|
border: h ? `2px dashed ${ke(m, .4)}` : `3px solid ${m}`,
|
|
736
|
-
background: h ? ke(m, .06) : ke(
|
|
734
|
+
background: h ? ke(m, .06) : ke(Ft.DARKEST, .8),
|
|
737
735
|
transform: `perspective(600px) scale(${y}) rotateX(${d.rx}deg) rotateY(${d.ry}deg) translate(${d.tx}px, ${d.ty}px)`,
|
|
738
736
|
transformStyle: "preserve-3d",
|
|
739
737
|
transition: s ? "border-color 200ms" : `transform 400ms ${Ae.JUICE_EASING}, border-color 200ms`,
|
|
740
|
-
boxShadow: s ? `0 8px 16px ${ke(
|
|
738
|
+
boxShadow: s ? `0 8px 16px ${ke(Ft.BLACK, .4)}` : `0 2px 4px ${ke(Ft.BLACK, .2)}`,
|
|
741
739
|
zIndex: s ? 10 : 1,
|
|
742
740
|
pointerEvents: "none"
|
|
743
741
|
},
|
|
@@ -763,8 +761,8 @@ function Ft({ zone: e, sheetType: t, selection: n, width: r = 56, onTap: i, onCl
|
|
|
763
761
|
width: 18,
|
|
764
762
|
height: 18,
|
|
765
763
|
borderRadius: "50%",
|
|
766
|
-
background:
|
|
767
|
-
color:
|
|
764
|
+
background: Ft.RED,
|
|
765
|
+
color: Ft.WHITE,
|
|
768
766
|
display: "flex",
|
|
769
767
|
alignItems: "center",
|
|
770
768
|
justifyContent: "center",
|
|
@@ -772,7 +770,7 @@ function Ft({ zone: e, sheetType: t, selection: n, width: r = 56, onTap: i, onCl
|
|
|
772
770
|
fontFamily: "m6x11plus, ui-monospace, monospace",
|
|
773
771
|
cursor: "pointer",
|
|
774
772
|
lineHeight: 1,
|
|
775
|
-
boxShadow: `0 1px 4px ${ke(
|
|
773
|
+
boxShadow: `0 1px 4px ${ke(Ft.BLACK, .5)}`,
|
|
776
774
|
transform: "translateZ(10px)"
|
|
777
775
|
},
|
|
778
776
|
children: "×"
|
|
@@ -795,7 +793,7 @@ function Ft({ zone: e, sheetType: t, selection: n, width: r = 56, onTap: i, onCl
|
|
|
795
793
|
})
|
|
796
794
|
});
|
|
797
795
|
}
|
|
798
|
-
function
|
|
796
|
+
function Rt(e) {
|
|
799
797
|
switch (e) {
|
|
800
798
|
case "joker": return "Jokers";
|
|
801
799
|
case "voucher": return "Vouchers";
|
|
@@ -810,36 +808,37 @@ function It(e) {
|
|
|
810
808
|
}
|
|
811
809
|
//#endregion
|
|
812
810
|
//#region src/components/jamlMap/JokerPicker.tsx
|
|
813
|
-
var
|
|
811
|
+
var zt = new Set([
|
|
814
812
|
"Canio",
|
|
815
813
|
"Triboulet",
|
|
816
814
|
"Yorick",
|
|
817
815
|
"Chicot",
|
|
818
816
|
"Perkeo"
|
|
819
|
-
]),
|
|
820
|
-
function
|
|
821
|
-
return
|
|
817
|
+
]), Bt = new Set(/* @__PURE__ */ "Blueprint.Brainstorm.Drivers License.Burnt Joker.Cartomancer.Astronomer.Satellite.Shoot the Moon.The Idol.Seeing Double.Matador.Hit the Road.The Duo.The Trio.The Family.The Order.The Tribe.Stuntman.Invisible Joker.Showman.Flower Pot.Glass Joker.Wee Joker.Merry Andy.Oops! All 6s.Certificate.Smeared Joker.Throwback.Hanging Chad.Rough Gem.Bloodstone.Arrowhead.Onyx Agate".split(".")), Vt = new Set(/* @__PURE__ */ "Greedy Joker,Lusty Joker,Wrathful Joker,Gluttonous Joker,Jolly Joker,Zany Joker,Mad Joker,Crazy Joker,Droll Joker,Sly Joker,Wily Joker,Clever Joker,Devious Joker,Crafty Joker,Joker Stencil,Four Fingers,Mime,Credit Card,Ceremonial Dagger,Banner,Mystic Summit,Marble Joker,Loyalty Card,8 Ball,Misprint,Dusk,Raised Fist,Fibonacci,Steel Joker,Scary Face,Abstract Joker,Delayed Gratification,Hack,Pareidolia,Gros Michel,Even Steven,Odd Todd,Scholar,Business Card,Supernova,Ride the Bus,Space Joker,Egg,Burglar,Blackboard,Runner,Ice Cream,DNA,Splash,Blue Joker,Sixth Sense,Constellation,Hiker,Faceless Joker,Green Joker,Superposition,To Do List,Cavendish,Card Sharp,Red Card,Madness,Square Joker,Seance,Riff-raff,Vampire,Shortcut,Hologram,Vagabond,Baron,Cloud 9,Rocket,Obelisk,Midas Mask,Luchador,Photograph,Gift Card,Turtle Bean,Erosion,Reserved Parking,Mail In Rebate,To the Moon,Hallucination,Fortune Teller,Golden Joker,Lucky Cat,Baseball Card,Bull,Diet Cola,Trading Card,Flash Card,Popcorn,Spare Trousers,Ancient Joker,Ramen,Walkie Talkie,Seltzer,Castle,Smiley Face,Campfire,Golden Ticket,Mr. Bones,Acrobat,Sock and Buskin,Swashbuckler,Troubadour,Bootstraps".split(","));
|
|
818
|
+
function Ht(e) {
|
|
819
|
+
return zt.has(e) ? ot.Legendary : Bt.has(e) ? ot.Rare : Vt.has(e) ? ot.Uncommon : ot.Common;
|
|
822
820
|
}
|
|
823
|
-
function
|
|
821
|
+
function Ut(e) {
|
|
824
822
|
switch (e) {
|
|
825
|
-
case
|
|
826
|
-
case
|
|
827
|
-
case
|
|
828
|
-
case
|
|
823
|
+
case ot.Legendary: return "legendaryJoker";
|
|
824
|
+
case ot.Rare: return "rareJoker";
|
|
825
|
+
case ot.Uncommon: return "uncommonJoker";
|
|
826
|
+
case ot.Common: return "commonJoker";
|
|
827
|
+
default: return "commonJoker";
|
|
829
828
|
}
|
|
830
829
|
}
|
|
831
|
-
var
|
|
832
|
-
function
|
|
830
|
+
var Wt = Be.filter((e) => zt.has(e.name)), Gt = Be.filter((e) => !zt.has(e.name));
|
|
831
|
+
function Kt({ onSelect: e }) {
|
|
833
832
|
let [t, n] = O(""), r = $e(() => {
|
|
834
|
-
if (!t) return
|
|
833
|
+
if (!t) return Gt;
|
|
835
834
|
let e = t.toLowerCase();
|
|
836
835
|
return Be.filter((t) => t.name.toLowerCase().includes(e));
|
|
837
836
|
}, [t]), i = (t) => {
|
|
838
|
-
let n =
|
|
837
|
+
let n = Ht(t.name);
|
|
839
838
|
e({
|
|
840
839
|
category: "joker",
|
|
841
840
|
value: t.name,
|
|
842
|
-
clauseKey:
|
|
841
|
+
clauseKey: Ut(n),
|
|
843
842
|
rarity: n
|
|
844
843
|
});
|
|
845
844
|
}, a = (e) => /* @__PURE__ */ A("div", {
|
|
@@ -869,7 +868,7 @@ function Wt({ onSelect: e }) {
|
|
|
869
868
|
children: "Legendary"
|
|
870
869
|
}), /* @__PURE__ */ k("div", {
|
|
871
870
|
className: "j-picker__grid j-picker__grid--legendary",
|
|
872
|
-
children:
|
|
871
|
+
children: Wt.map(a)
|
|
873
872
|
})]
|
|
874
873
|
}),
|
|
875
874
|
/* @__PURE__ */ k("div", {
|
|
@@ -902,8 +901,8 @@ function Wt({ onSelect: e }) {
|
|
|
902
901
|
}
|
|
903
902
|
//#endregion
|
|
904
903
|
//#region src/components/jamlMap/CategoryPicker.tsx
|
|
905
|
-
var
|
|
906
|
-
function
|
|
904
|
+
var qt = w;
|
|
905
|
+
function Jt({ config: e, onSelect: t }) {
|
|
907
906
|
let [n, r] = O(""), i = $e(() => {
|
|
908
907
|
if (!n) return e.items;
|
|
909
908
|
let t = n.toLowerCase();
|
|
@@ -985,60 +984,60 @@ function Kt({ config: e, onSelect: t }) {
|
|
|
985
984
|
]
|
|
986
985
|
});
|
|
987
986
|
}
|
|
988
|
-
var
|
|
987
|
+
var Yt = Me.filter((e) => e.pos.y <= 2 && e.name !== "The Soul" && e.name !== "Black Hole").filter((e) => e.pos.y <= 1 || e.pos.y === 2 && e.pos.x <= 1), Xt = Me.filter((e) => e.pos.y === 3 || e.name === "Planet X" || e.name === "Ceres" || e.name === "Eris" || e.name === "Black Hole"), Zt = Me.filter((e) => e.pos.y >= 4 || e.name === "The Soul"), Qt = {
|
|
989
988
|
title: "Vouchers",
|
|
990
989
|
category: "voucher",
|
|
991
990
|
clauseKey: "voucher",
|
|
992
991
|
sheet: "Vouchers",
|
|
993
992
|
items: Ge,
|
|
994
|
-
accent:
|
|
995
|
-
},
|
|
993
|
+
accent: qt.ORANGE
|
|
994
|
+
}, $t = {
|
|
996
995
|
title: "Tags",
|
|
997
996
|
category: "tag",
|
|
998
997
|
clauseKey: "tag",
|
|
999
998
|
sheet: "tags",
|
|
1000
999
|
items: Le,
|
|
1001
|
-
accent:
|
|
1002
|
-
},
|
|
1000
|
+
accent: qt.GREEN
|
|
1001
|
+
}, en = {
|
|
1003
1002
|
title: "Boss Blinds",
|
|
1004
1003
|
category: "boss",
|
|
1005
1004
|
clauseKey: "boss",
|
|
1006
1005
|
sheet: "BlindChips",
|
|
1007
1006
|
items: Ne,
|
|
1008
|
-
accent:
|
|
1007
|
+
accent: qt.RED,
|
|
1009
1008
|
hint: "Boss Blinds appear at the end of each Ante."
|
|
1010
|
-
},
|
|
1009
|
+
}, tn = {
|
|
1011
1010
|
title: "Tarot Cards",
|
|
1012
1011
|
category: "tarot",
|
|
1013
1012
|
clauseKey: "tarotCard",
|
|
1014
1013
|
sheet: "Tarots",
|
|
1015
|
-
items:
|
|
1016
|
-
accent:
|
|
1014
|
+
items: Yt,
|
|
1015
|
+
accent: qt.PURPLE,
|
|
1017
1016
|
hint: "Found in Arcana Packs and shops."
|
|
1018
|
-
},
|
|
1017
|
+
}, nn = {
|
|
1019
1018
|
title: "Planet Cards",
|
|
1020
1019
|
category: "planet",
|
|
1021
1020
|
clauseKey: "planetCard",
|
|
1022
1021
|
sheet: "Tarots",
|
|
1023
|
-
items:
|
|
1024
|
-
accent:
|
|
1022
|
+
items: Xt,
|
|
1023
|
+
accent: qt.BLUE,
|
|
1025
1024
|
hint: "Found in Celestial Packs and shops."
|
|
1026
|
-
},
|
|
1025
|
+
}, rn = {
|
|
1027
1026
|
title: "Spectral Cards",
|
|
1028
1027
|
category: "spectral",
|
|
1029
1028
|
clauseKey: "spectralCard",
|
|
1030
1029
|
sheet: "Tarots",
|
|
1031
|
-
items:
|
|
1032
|
-
accent:
|
|
1030
|
+
items: Zt,
|
|
1031
|
+
accent: qt.TEAL_GREY,
|
|
1033
1032
|
hint: "Found in Spectral Packs. Ghost Deck only for shop spawns!"
|
|
1034
|
-
},
|
|
1033
|
+
}, an = {
|
|
1035
1034
|
title: "Booster Packs",
|
|
1036
1035
|
category: "pack",
|
|
1037
1036
|
clauseKey: "pack",
|
|
1038
1037
|
sheet: "Boosters",
|
|
1039
1038
|
items: ze,
|
|
1040
|
-
accent:
|
|
1041
|
-
},
|
|
1039
|
+
accent: qt.ORANGE
|
|
1040
|
+
}, on = w, sn = [
|
|
1042
1041
|
{
|
|
1043
1042
|
key: "joker",
|
|
1044
1043
|
label: "Joker",
|
|
@@ -1103,68 +1102,60 @@ var qt = Me.filter((e) => e.pos.y <= 2 && e.name !== "The Soul" && e.name !== "B
|
|
|
1103
1102
|
tone: "orange",
|
|
1104
1103
|
hint: "Arcana, Celestial, etc."
|
|
1105
1104
|
}
|
|
1106
|
-
],
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
joker: Xt,
|
|
1116
|
-
voucher: Xt,
|
|
1117
|
-
tag: Zt,
|
|
1118
|
-
boss: Qt,
|
|
1119
|
-
tarot: $t,
|
|
1120
|
-
planet: en,
|
|
1121
|
-
spectral: tn,
|
|
1122
|
-
pack: nn
|
|
1105
|
+
], cn = {
|
|
1106
|
+
joker: Qt,
|
|
1107
|
+
voucher: Qt,
|
|
1108
|
+
tag: $t,
|
|
1109
|
+
boss: en,
|
|
1110
|
+
tarot: tn,
|
|
1111
|
+
planet: nn,
|
|
1112
|
+
spectral: rn,
|
|
1113
|
+
pack: an
|
|
1123
1114
|
};
|
|
1124
1115
|
function ln({ zone: e = "must", onChange: t }) {
|
|
1125
|
-
let [n, r] = O(e), [i, a] = O({}), [o,
|
|
1126
|
-
|
|
1116
|
+
let [n, r] = O(e), [i, a] = O({}), [o, l] = O(null), [u, f] = O("category"), p = E((e, t, n) => {
|
|
1117
|
+
l({
|
|
1127
1118
|
ante: e,
|
|
1128
1119
|
id: t,
|
|
1129
1120
|
forceCategory: n
|
|
1130
|
-
}),
|
|
1131
|
-
}, []),
|
|
1121
|
+
}), f(n || "category");
|
|
1122
|
+
}, []), m = E((e, t) => {
|
|
1132
1123
|
a((n) => {
|
|
1133
1124
|
let r = { ...n };
|
|
1134
1125
|
if (!r[e]) return r;
|
|
1135
1126
|
let i = { ...r[e] };
|
|
1136
1127
|
return delete i[t], r[e] = i, r;
|
|
1137
1128
|
});
|
|
1138
|
-
}, []),
|
|
1139
|
-
|
|
1140
|
-
}, []),
|
|
1129
|
+
}, []), h = E((e) => {
|
|
1130
|
+
f(e);
|
|
1131
|
+
}, []), g = E((e) => {
|
|
1141
1132
|
o && (a((t) => {
|
|
1142
1133
|
let r = { ...t }, i = { ...r[o.ante] || {} };
|
|
1143
1134
|
return i[o.id] = {
|
|
1144
1135
|
...e,
|
|
1145
1136
|
zone: n
|
|
1146
1137
|
}, r[o.ante] = i, r;
|
|
1147
|
-
}),
|
|
1148
|
-
}, [o, n]),
|
|
1149
|
-
o?.forceCategory ||
|
|
1150
|
-
}, [o,
|
|
1138
|
+
}), l(null));
|
|
1139
|
+
}, [o, n]), _ = E(() => {
|
|
1140
|
+
o?.forceCategory || u === "category" ? l(null) : f("category");
|
|
1141
|
+
}, [o, u]), v = D(null), y = $e(() => dn(i), [i]);
|
|
1151
1142
|
Ze(() => {
|
|
1152
|
-
t?.(
|
|
1153
|
-
}, [
|
|
1154
|
-
let e =
|
|
1143
|
+
t?.(y);
|
|
1144
|
+
}, [y, t]), Ze(() => {
|
|
1145
|
+
let e = v.current;
|
|
1155
1146
|
if (!e) return;
|
|
1156
1147
|
let t = e.children[1];
|
|
1157
1148
|
t && (e.scrollTop = t.offsetTop);
|
|
1158
1149
|
}, []);
|
|
1159
|
-
let
|
|
1150
|
+
let b = (e, t, r, a, o) => {
|
|
1160
1151
|
let s = (i[e] || {})[t];
|
|
1161
|
-
return /* @__PURE__ */ k(
|
|
1152
|
+
return /* @__PURE__ */ k(Lt, {
|
|
1162
1153
|
zone: s ? s.zone : n,
|
|
1163
1154
|
sheetType: a,
|
|
1164
1155
|
selection: s,
|
|
1165
1156
|
width: r,
|
|
1166
|
-
onTap: () =>
|
|
1167
|
-
onClear: s ? () =>
|
|
1157
|
+
onTap: () => p(e, t, o),
|
|
1158
|
+
onClear: s ? () => m(e, t) : void 0,
|
|
1168
1159
|
style: { flexShrink: 0 }
|
|
1169
1160
|
}, t);
|
|
1170
1161
|
};
|
|
@@ -1181,9 +1172,9 @@ function ln({ zone: e = "must", onChange: t }) {
|
|
|
1181
1172
|
position: "sticky",
|
|
1182
1173
|
top: 0,
|
|
1183
1174
|
zIndex: 10,
|
|
1184
|
-
background:
|
|
1175
|
+
background: on.DARKEST,
|
|
1185
1176
|
padding: "max(32px, env(safe-area-inset-top, 32px)) 0 8px 0",
|
|
1186
|
-
borderBottom: `2px solid ${
|
|
1177
|
+
borderBottom: `2px solid ${on.PANEL_EDGE}`
|
|
1187
1178
|
},
|
|
1188
1179
|
children: [/* @__PURE__ */ k(C, {
|
|
1189
1180
|
size: "md",
|
|
@@ -1193,24 +1184,27 @@ function ln({ zone: e = "must", onChange: t }) {
|
|
|
1193
1184
|
marginBottom: 12
|
|
1194
1185
|
},
|
|
1195
1186
|
children: "Jaml Visual Builder"
|
|
1196
|
-
}), /* @__PURE__ */ k(
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1187
|
+
}), /* @__PURE__ */ k(c, {
|
|
1188
|
+
tabs: [
|
|
1189
|
+
{
|
|
1190
|
+
id: "must",
|
|
1191
|
+
label: "Must"
|
|
1192
|
+
},
|
|
1193
|
+
{
|
|
1194
|
+
id: "should",
|
|
1195
|
+
label: "Should"
|
|
1196
|
+
},
|
|
1197
|
+
{
|
|
1198
|
+
id: "mustnot",
|
|
1199
|
+
label: "Must Not"
|
|
1200
|
+
}
|
|
1201
|
+
],
|
|
1202
|
+
activeTab: n,
|
|
1203
|
+
onTabChange: (e) => r(e)
|
|
1210
1204
|
})]
|
|
1211
1205
|
}),
|
|
1212
1206
|
/* @__PURE__ */ k("div", {
|
|
1213
|
-
ref:
|
|
1207
|
+
ref: v,
|
|
1214
1208
|
className: "hide-scrollbar",
|
|
1215
1209
|
style: {
|
|
1216
1210
|
flex: 1,
|
|
@@ -1218,133 +1212,137 @@ function ln({ zone: e = "must", onChange: t }) {
|
|
|
1218
1212
|
scrollSnapType: "y mandatory",
|
|
1219
1213
|
scrollBehavior: "smooth"
|
|
1220
1214
|
},
|
|
1221
|
-
children: Array.from({ length: 40 }, (e, t) => t).map((e) => /* @__PURE__ */
|
|
1215
|
+
children: Array.from({ length: 40 }, (e, t) => t).map((e) => /* @__PURE__ */ k("div", {
|
|
1222
1216
|
style: {
|
|
1223
1217
|
scrollSnapAlign: "start",
|
|
1224
|
-
padding: "
|
|
1218
|
+
padding: "16px 8px 24px 8px",
|
|
1225
1219
|
minHeight: "100%",
|
|
1226
1220
|
display: "flex",
|
|
1227
1221
|
flexDirection: "column",
|
|
1228
|
-
|
|
1229
|
-
borderBottom: `2px solid ${rn.DARK_GREY}`
|
|
1222
|
+
justifyContent: "center"
|
|
1230
1223
|
},
|
|
1231
|
-
children:
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
size: "xs",
|
|
1249
|
-
tone: "grey",
|
|
1250
|
-
children: "Voucher"
|
|
1251
|
-
}), v(e, `ante_${e}_voucher`, 42, "Vouchers", "voucher")]
|
|
1252
|
-
}),
|
|
1253
|
-
/* @__PURE__ */ A("div", {
|
|
1254
|
-
className: "j-flex-col j-items-center j-gap-xs",
|
|
1255
|
-
children: [/* @__PURE__ */ k(C, {
|
|
1256
|
-
size: "xs",
|
|
1257
|
-
tone: "grey",
|
|
1258
|
-
children: "Small"
|
|
1259
|
-
}), v(e, `ante_${e}_tag_small`, 42, "tags", "tag")]
|
|
1260
|
-
}),
|
|
1261
|
-
/* @__PURE__ */ A("div", {
|
|
1262
|
-
className: "j-flex-col j-items-center j-gap-xs",
|
|
1263
|
-
children: [/* @__PURE__ */ k(C, {
|
|
1264
|
-
size: "xs",
|
|
1265
|
-
tone: "grey",
|
|
1266
|
-
children: "Big"
|
|
1267
|
-
}), v(e, `ante_${e}_tag_big`, 42, "tags", "tag")]
|
|
1268
|
-
}),
|
|
1269
|
-
/* @__PURE__ */ A("div", {
|
|
1270
|
-
className: "j-flex-col j-items-center j-gap-xs",
|
|
1271
|
-
children: [/* @__PURE__ */ k(C, {
|
|
1272
|
-
size: "xs",
|
|
1273
|
-
tone: "grey",
|
|
1274
|
-
children: "Boss"
|
|
1275
|
-
}), v(e, `ante_${e}_boss`, 42, "BlindChips", "boss")]
|
|
1276
|
-
})
|
|
1277
|
-
]
|
|
1278
|
-
}),
|
|
1279
|
-
/* @__PURE__ */ A("div", {
|
|
1280
|
-
className: "j-flex-col j-gap-xs",
|
|
1281
|
-
children: [/* @__PURE__ */ k(C, {
|
|
1282
|
-
size: "sm",
|
|
1283
|
-
tone: "grey",
|
|
1284
|
-
style: {
|
|
1285
|
-
letterSpacing: 1,
|
|
1286
|
-
padding: "0 4px"
|
|
1287
|
-
},
|
|
1288
|
-
children: "Shop Items"
|
|
1289
|
-
}), /* @__PURE__ */ k("div", {
|
|
1290
|
-
className: "j-flex hide-scrollbar j-gap-sm",
|
|
1291
|
-
style: {
|
|
1292
|
-
overflowX: "auto",
|
|
1293
|
-
padding: "0 0 8px 4px"
|
|
1294
|
-
},
|
|
1295
|
-
children: [
|
|
1296
|
-
1,
|
|
1297
|
-
2,
|
|
1298
|
-
3,
|
|
1299
|
-
4,
|
|
1300
|
-
5,
|
|
1301
|
-
6,
|
|
1302
|
-
7,
|
|
1303
|
-
8
|
|
1304
|
-
].map((t) => v(e, `ante_${e}_shop_${t}`, 52, "Jokers"))
|
|
1305
|
-
})]
|
|
1306
|
-
}),
|
|
1307
|
-
/* @__PURE__ */ A("div", {
|
|
1308
|
-
className: "j-flex-col j-gap-xs",
|
|
1309
|
-
children: [/* @__PURE__ */ k(C, {
|
|
1310
|
-
size: "sm",
|
|
1311
|
-
tone: "grey",
|
|
1312
|
-
style: {
|
|
1313
|
-
letterSpacing: 1,
|
|
1314
|
-
padding: "0 4px"
|
|
1315
|
-
},
|
|
1316
|
-
children: "Packs"
|
|
1317
|
-
}), /* @__PURE__ */ k("div", {
|
|
1318
|
-
className: "j-flex j-gap-sm",
|
|
1319
|
-
style: {
|
|
1320
|
-
flexWrap: "wrap",
|
|
1321
|
-
padding: "0 4px"
|
|
1322
|
-
},
|
|
1224
|
+
children: /* @__PURE__ */ A(s, {
|
|
1225
|
+
style: {
|
|
1226
|
+
display: "flex",
|
|
1227
|
+
flexDirection: "column",
|
|
1228
|
+
gap: 16,
|
|
1229
|
+
padding: "12px 8px"
|
|
1230
|
+
},
|
|
1231
|
+
children: [
|
|
1232
|
+
/* @__PURE__ */ A(C, {
|
|
1233
|
+
size: "lg",
|
|
1234
|
+
tone: "white",
|
|
1235
|
+
style: { textAlign: "center" },
|
|
1236
|
+
children: ["Ante ", e]
|
|
1237
|
+
}),
|
|
1238
|
+
/* @__PURE__ */ A("div", {
|
|
1239
|
+
className: "j-flex j-justify-between j-items-end",
|
|
1240
|
+
style: { padding: "0 4px" },
|
|
1323
1241
|
children: [
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1242
|
+
/* @__PURE__ */ A("div", {
|
|
1243
|
+
className: "j-flex-col j-items-center j-gap-xs",
|
|
1244
|
+
children: [/* @__PURE__ */ k(C, {
|
|
1245
|
+
size: "xs",
|
|
1246
|
+
tone: "grey",
|
|
1247
|
+
children: "Voucher"
|
|
1248
|
+
}), b(e, `ante_${e}_voucher`, 42, "Vouchers", "voucher")]
|
|
1249
|
+
}),
|
|
1250
|
+
/* @__PURE__ */ A("div", {
|
|
1251
|
+
className: "j-flex-col j-items-center j-gap-xs",
|
|
1252
|
+
children: [/* @__PURE__ */ k(C, {
|
|
1253
|
+
size: "xs",
|
|
1254
|
+
tone: "grey",
|
|
1255
|
+
children: "Small"
|
|
1256
|
+
}), b(e, `ante_${e}_tag_small`, 42, "tags", "tag")]
|
|
1257
|
+
}),
|
|
1258
|
+
/* @__PURE__ */ A("div", {
|
|
1259
|
+
className: "j-flex-col j-items-center j-gap-xs",
|
|
1260
|
+
children: [/* @__PURE__ */ k(C, {
|
|
1261
|
+
size: "xs",
|
|
1262
|
+
tone: "grey",
|
|
1263
|
+
children: "Big"
|
|
1264
|
+
}), b(e, `ante_${e}_tag_big`, 42, "tags", "tag")]
|
|
1265
|
+
}),
|
|
1266
|
+
/* @__PURE__ */ A("div", {
|
|
1267
|
+
className: "j-flex-col j-items-center j-gap-xs",
|
|
1268
|
+
children: [/* @__PURE__ */ k(C, {
|
|
1269
|
+
size: "xs",
|
|
1270
|
+
tone: "grey",
|
|
1271
|
+
children: "Boss"
|
|
1272
|
+
}), b(e, `ante_${e}_boss`, 42, "BlindChips", "boss")]
|
|
1273
|
+
})
|
|
1274
|
+
]
|
|
1275
|
+
}),
|
|
1276
|
+
/* @__PURE__ */ A("div", {
|
|
1277
|
+
className: "j-flex-col j-gap-xs",
|
|
1278
|
+
children: [/* @__PURE__ */ k(C, {
|
|
1279
|
+
size: "sm",
|
|
1280
|
+
tone: "grey",
|
|
1281
|
+
style: {
|
|
1282
|
+
letterSpacing: 1,
|
|
1283
|
+
padding: "0 4px"
|
|
1284
|
+
},
|
|
1285
|
+
children: "Shop Items"
|
|
1286
|
+
}), /* @__PURE__ */ k("div", {
|
|
1287
|
+
className: "j-flex hide-scrollbar j-gap-sm",
|
|
1288
|
+
style: {
|
|
1289
|
+
overflowX: "auto",
|
|
1290
|
+
padding: "0 0 8px 4px"
|
|
1291
|
+
},
|
|
1292
|
+
children: [
|
|
1293
|
+
1,
|
|
1294
|
+
2,
|
|
1295
|
+
3,
|
|
1296
|
+
4,
|
|
1297
|
+
5,
|
|
1298
|
+
6,
|
|
1299
|
+
7,
|
|
1300
|
+
8
|
|
1301
|
+
].map((t) => b(e, `ante_${e}_shop_${t}`, 52, "Jokers"))
|
|
1302
|
+
})]
|
|
1303
|
+
}),
|
|
1304
|
+
/* @__PURE__ */ A("div", {
|
|
1305
|
+
className: "j-flex-col j-gap-xs",
|
|
1306
|
+
children: [/* @__PURE__ */ k(C, {
|
|
1307
|
+
size: "sm",
|
|
1308
|
+
tone: "grey",
|
|
1309
|
+
style: {
|
|
1310
|
+
letterSpacing: 1,
|
|
1311
|
+
padding: "0 4px"
|
|
1312
|
+
},
|
|
1313
|
+
children: "Packs"
|
|
1314
|
+
}), /* @__PURE__ */ k("div", {
|
|
1315
|
+
className: "j-flex j-gap-sm",
|
|
1316
|
+
style: {
|
|
1317
|
+
flexWrap: "wrap",
|
|
1318
|
+
padding: "0 4px"
|
|
1319
|
+
},
|
|
1320
|
+
children: [
|
|
1321
|
+
1,
|
|
1322
|
+
2,
|
|
1323
|
+
3,
|
|
1324
|
+
4,
|
|
1325
|
+
5,
|
|
1326
|
+
6
|
|
1327
|
+
].map((t) => b(e, `ante_${e}_pack_${t}`, 64, "Boosters", "pack"))
|
|
1328
|
+
})]
|
|
1329
|
+
})
|
|
1330
|
+
]
|
|
1331
|
+
})
|
|
1334
1332
|
}, e))
|
|
1335
1333
|
}),
|
|
1336
1334
|
/* @__PURE__ */ k(d, {
|
|
1337
1335
|
open: o !== null,
|
|
1338
|
-
onClose:
|
|
1339
|
-
title:
|
|
1336
|
+
onClose: _,
|
|
1337
|
+
title: u === "category" ? "Select Category" : u === "joker" ? "Select Joker" : cn[u]?.title ?? "Select Item",
|
|
1340
1338
|
className: "j-picker-modal",
|
|
1341
|
-
children: o !== null && (
|
|
1342
|
-
onSelect:
|
|
1343
|
-
onCancel:
|
|
1344
|
-
}) : /* @__PURE__ */ k(
|
|
1345
|
-
config: cn[
|
|
1346
|
-
onSelect:
|
|
1347
|
-
onCancel:
|
|
1339
|
+
children: o !== null && (u === "category" ? /* @__PURE__ */ k(un, { onSelect: h }) : u === "joker" ? /* @__PURE__ */ k(Kt, {
|
|
1340
|
+
onSelect: g,
|
|
1341
|
+
onCancel: _
|
|
1342
|
+
}) : /* @__PURE__ */ k(Jt, {
|
|
1343
|
+
config: cn[u],
|
|
1344
|
+
onSelect: g,
|
|
1345
|
+
onCancel: _
|
|
1348
1346
|
}))
|
|
1349
1347
|
})
|
|
1350
1348
|
]
|
|
@@ -1361,40 +1359,33 @@ function un({ onSelect: e }) {
|
|
|
1361
1359
|
maxHeight: "70vh",
|
|
1362
1360
|
overflowY: "auto"
|
|
1363
1361
|
},
|
|
1364
|
-
children:
|
|
1365
|
-
tone: t.tone,
|
|
1366
|
-
size: "sm",
|
|
1367
|
-
fullWidth: !0,
|
|
1362
|
+
children: sn.map((t) => /* @__PURE__ */ k(x, {
|
|
1368
1363
|
onClick: () => e(t.key),
|
|
1369
1364
|
children: /* @__PURE__ */ A("div", {
|
|
1370
1365
|
style: {
|
|
1371
1366
|
display: "flex",
|
|
1372
1367
|
alignItems: "center",
|
|
1373
|
-
gap:
|
|
1368
|
+
gap: 10,
|
|
1374
1369
|
width: "100%",
|
|
1375
1370
|
textAlign: "left"
|
|
1376
1371
|
},
|
|
1377
1372
|
children: [/* @__PURE__ */ k(te, {
|
|
1378
1373
|
name: t.sprite,
|
|
1379
1374
|
sheet: t.sheet,
|
|
1380
|
-
width:
|
|
1375
|
+
width: 32
|
|
1381
1376
|
}), /* @__PURE__ */ A("div", {
|
|
1382
1377
|
style: {
|
|
1383
1378
|
display: "flex",
|
|
1384
1379
|
flexDirection: "column",
|
|
1385
|
-
gap:
|
|
1380
|
+
gap: 2
|
|
1386
1381
|
},
|
|
1387
|
-
children: [/* @__PURE__ */ k(
|
|
1388
|
-
|
|
1382
|
+
children: [/* @__PURE__ */ k(C, {
|
|
1383
|
+
size: "sm",
|
|
1384
|
+
tone: "white",
|
|
1389
1385
|
children: t.label
|
|
1390
|
-
}), /* @__PURE__ */ k(
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
opacity: .7,
|
|
1394
|
-
letterSpacing: "0.04em",
|
|
1395
|
-
lineHeight: 1,
|
|
1396
|
-
whiteSpace: "normal"
|
|
1397
|
-
},
|
|
1386
|
+
}), /* @__PURE__ */ k(C, {
|
|
1387
|
+
size: "micro",
|
|
1388
|
+
tone: "grey",
|
|
1398
1389
|
children: t.hint
|
|
1399
1390
|
})]
|
|
1400
1391
|
})]
|
|
@@ -1528,16 +1519,16 @@ function hn({ clause: e, size: t = 40 }) {
|
|
|
1528
1519
|
width: t
|
|
1529
1520
|
}) : null;
|
|
1530
1521
|
}
|
|
1531
|
-
function gn({ clause: e, zone: t, onRemove:
|
|
1532
|
-
let
|
|
1522
|
+
function gn({ clause: e, zone: t, onRemove: r, onEdit: i, onDragStart: a }) {
|
|
1523
|
+
let o = pn[t];
|
|
1533
1524
|
return /* @__PURE__ */ A("div", {
|
|
1534
|
-
onClick:
|
|
1535
|
-
onMouseDown: (n) =>
|
|
1536
|
-
onTouchStart: (n) =>
|
|
1525
|
+
onClick: i,
|
|
1526
|
+
onMouseDown: (n) => a(n, e, t),
|
|
1527
|
+
onTouchStart: (n) => a(n, e, t),
|
|
1537
1528
|
style: {
|
|
1538
1529
|
position: "relative",
|
|
1539
1530
|
background: N.DARK_GREY,
|
|
1540
|
-
border: `2px solid ${
|
|
1531
|
+
border: `2px solid ${o.color}`,
|
|
1541
1532
|
borderRadius: 6,
|
|
1542
1533
|
padding: "8px 8px 8px 6px",
|
|
1543
1534
|
display: "flex",
|
|
@@ -1602,7 +1593,7 @@ function gn({ clause: e, zone: t, onRemove: n, onEdit: r, onDragStart: i }) {
|
|
|
1602
1593
|
fontSize: 9,
|
|
1603
1594
|
padding: "1px 4px",
|
|
1604
1595
|
background: N.DARKEST,
|
|
1605
|
-
color:
|
|
1596
|
+
color: o.accent,
|
|
1606
1597
|
borderRadius: 3,
|
|
1607
1598
|
letterSpacing: .5,
|
|
1608
1599
|
lineHeight: 1
|
|
@@ -1624,16 +1615,16 @@ function gn({ clause: e, zone: t, onRemove: n, onEdit: r, onDragStart: i }) {
|
|
|
1624
1615
|
})]
|
|
1625
1616
|
})]
|
|
1626
1617
|
}),
|
|
1627
|
-
/* @__PURE__ */ k(
|
|
1618
|
+
/* @__PURE__ */ k(n, {
|
|
1628
1619
|
size: "xs",
|
|
1629
1620
|
tone: "destructive",
|
|
1630
1621
|
onMouseDown: (e) => e.stopPropagation(),
|
|
1631
1622
|
onTouchStart: (e) => e.stopPropagation(),
|
|
1632
1623
|
onClick: (e) => {
|
|
1633
|
-
e.stopPropagation(),
|
|
1624
|
+
e.stopPropagation(), r();
|
|
1634
1625
|
},
|
|
1635
1626
|
"aria-label": `Remove ${e.label || e.value}`,
|
|
1636
|
-
children: /* @__PURE__ */ k(
|
|
1627
|
+
children: /* @__PURE__ */ k(ut, {})
|
|
1637
1628
|
})
|
|
1638
1629
|
]
|
|
1639
1630
|
});
|
|
@@ -1761,7 +1752,7 @@ function yn({ filter: e, onChange: t }) {
|
|
|
1761
1752
|
return /* @__PURE__ */ A("div", {
|
|
1762
1753
|
className: "j-inner-panel j-jaml-ide-visual__top-matter",
|
|
1763
1754
|
children: [
|
|
1764
|
-
/* @__PURE__ */ k(
|
|
1755
|
+
/* @__PURE__ */ k(Oe, {
|
|
1765
1756
|
size: "lg",
|
|
1766
1757
|
tone: "white",
|
|
1767
1758
|
value: e.name ?? "",
|
|
@@ -1776,7 +1767,7 @@ function yn({ filter: e, onChange: t }) {
|
|
|
1776
1767
|
children: [/* @__PURE__ */ k("span", {
|
|
1777
1768
|
className: "j-jaml-ide-visual__by-label",
|
|
1778
1769
|
children: "By"
|
|
1779
|
-
}), /* @__PURE__ */ k(
|
|
1770
|
+
}), /* @__PURE__ */ k(Oe, {
|
|
1780
1771
|
size: "sm",
|
|
1781
1772
|
tone: "gold",
|
|
1782
1773
|
value: e.author ?? "",
|
|
@@ -1787,7 +1778,7 @@ function yn({ filter: e, onChange: t }) {
|
|
|
1787
1778
|
})
|
|
1788
1779
|
})]
|
|
1789
1780
|
}),
|
|
1790
|
-
/* @__PURE__ */ k(
|
|
1781
|
+
/* @__PURE__ */ k(Oe, {
|
|
1791
1782
|
size: "xs",
|
|
1792
1783
|
tone: "white",
|
|
1793
1784
|
dim: !0,
|
|
@@ -2291,7 +2282,7 @@ var qn = /\r\n?|\n/, Jn = /* @__PURE__ */ (function(e) {
|
|
|
2291
2282
|
}
|
|
2292
2283
|
}
|
|
2293
2284
|
iterChangedRanges(e, t = !1) {
|
|
2294
|
-
|
|
2285
|
+
Qn(this, e, t);
|
|
2295
2286
|
}
|
|
2296
2287
|
get invertedDesc() {
|
|
2297
2288
|
let t = [];
|
|
@@ -2302,10 +2293,10 @@ var qn = /\r\n?|\n/, Jn = /* @__PURE__ */ (function(e) {
|
|
|
2302
2293
|
return new e(t);
|
|
2303
2294
|
}
|
|
2304
2295
|
composeDesc(e) {
|
|
2305
|
-
return this.empty ? e : e.empty ? this :
|
|
2296
|
+
return this.empty ? e : e.empty ? this : er(this, e);
|
|
2306
2297
|
}
|
|
2307
2298
|
mapDesc(e, t = !1) {
|
|
2308
|
-
return e.empty ? this :
|
|
2299
|
+
return e.empty ? this : $n(this, e, t);
|
|
2309
2300
|
}
|
|
2310
2301
|
mapPos(e, t = -1, n = Jn.Simple) {
|
|
2311
2302
|
let r = 0, i = 0;
|
|
@@ -2356,10 +2347,10 @@ var qn = /\r\n?|\n/, Jn = /* @__PURE__ */ (function(e) {
|
|
|
2356
2347
|
}
|
|
2357
2348
|
apply(e) {
|
|
2358
2349
|
if (this.length != e.length) throw RangeError("Applying change set to a document with the wrong length");
|
|
2359
|
-
return
|
|
2350
|
+
return Qn(this, (t, n, r, i, a) => e = e.replace(r, r + (n - t), a), !1), e;
|
|
2360
2351
|
}
|
|
2361
2352
|
mapDesc(e, t = !1) {
|
|
2362
|
-
return
|
|
2353
|
+
return $n(this, e, t, !0);
|
|
2363
2354
|
}
|
|
2364
2355
|
invert(t) {
|
|
2365
2356
|
let n = this.sections.slice(), r = [];
|
|
@@ -2376,33 +2367,33 @@ var qn = /\r\n?|\n/, Jn = /* @__PURE__ */ (function(e) {
|
|
|
2376
2367
|
return new e(n, r);
|
|
2377
2368
|
}
|
|
2378
2369
|
compose(e) {
|
|
2379
|
-
return this.empty ? e : e.empty ? this :
|
|
2370
|
+
return this.empty ? e : e.empty ? this : er(this, e, !0);
|
|
2380
2371
|
}
|
|
2381
2372
|
map(e, t = !1) {
|
|
2382
|
-
return e.empty ? this :
|
|
2373
|
+
return e.empty ? this : $n(this, e, t, !0);
|
|
2383
2374
|
}
|
|
2384
2375
|
iterChanges(e, t = !1) {
|
|
2385
|
-
|
|
2376
|
+
Qn(this, e, t);
|
|
2386
2377
|
}
|
|
2387
2378
|
get desc() {
|
|
2388
2379
|
return Yn.create(this.sections);
|
|
2389
2380
|
}
|
|
2390
2381
|
filter(t) {
|
|
2391
|
-
let n = [], r = [], i = [], a = new
|
|
2382
|
+
let n = [], r = [], i = [], a = new tr(this);
|
|
2392
2383
|
done: for (let e = 0, o = 0;;) {
|
|
2393
2384
|
let s = e == t.length ? 1e9 : t[e++];
|
|
2394
2385
|
for (; o < s || o == s && a.len == 0;) {
|
|
2395
2386
|
if (a.done) break done;
|
|
2396
2387
|
let e = Math.min(a.len, s - o);
|
|
2397
|
-
|
|
2388
|
+
I(i, e, -1);
|
|
2398
2389
|
let t = a.ins == -1 ? -1 : a.off == 0 ? a.ins : 0;
|
|
2399
|
-
|
|
2390
|
+
I(n, e, t), t > 0 && Zn(r, n, a.text), a.forward(e), o += e;
|
|
2400
2391
|
}
|
|
2401
2392
|
let c = t[e++];
|
|
2402
2393
|
for (; o < c;) {
|
|
2403
2394
|
if (a.done) break done;
|
|
2404
2395
|
let e = Math.min(a.len, c - o);
|
|
2405
|
-
|
|
2396
|
+
I(n, e, -1), I(i, e, a.ins == -1 ? -1 : a.off == 0 ? a.ins : 0), a.forward(e), o += e;
|
|
2406
2397
|
}
|
|
2407
2398
|
}
|
|
2408
2399
|
return {
|
|
@@ -2422,7 +2413,7 @@ var qn = /\r\n?|\n/, Jn = /* @__PURE__ */ (function(e) {
|
|
|
2422
2413
|
let i = [], a = [], o = 0, s = null;
|
|
2423
2414
|
function c(t = !1) {
|
|
2424
2415
|
if (!t && !i.length) return;
|
|
2425
|
-
o < n &&
|
|
2416
|
+
o < n && I(i, n - o, -1);
|
|
2426
2417
|
let r = new e(i, a);
|
|
2427
2418
|
s = s ? s.compose(r.map(s)) : r, i = [], a = [], o = 0;
|
|
2428
2419
|
}
|
|
@@ -2436,7 +2427,7 @@ var qn = /\r\n?|\n/, Jn = /* @__PURE__ */ (function(e) {
|
|
|
2436
2427
|
if (e > s || e < 0 || s > n) throw RangeError(`Invalid change range ${e} to ${s} (in doc of length ${n})`);
|
|
2437
2428
|
let u = l ? typeof l == "string" ? P.of(l.split(r || qn)) : l : P.empty, d = u.length;
|
|
2438
2429
|
if (e == s && d == 0) return;
|
|
2439
|
-
e < o && c(), e > o &&
|
|
2430
|
+
e < o && c(), e > o && I(i, e - o, -1), I(i, s - e, d), Zn(a, i, u), o = s;
|
|
2440
2431
|
}
|
|
2441
2432
|
}
|
|
2442
2433
|
return l(t), c(!s), s;
|
|
@@ -2463,12 +2454,12 @@ var qn = /\r\n?|\n/, Jn = /* @__PURE__ */ (function(e) {
|
|
|
2463
2454
|
return new e(t, n);
|
|
2464
2455
|
}
|
|
2465
2456
|
};
|
|
2466
|
-
function
|
|
2457
|
+
function I(e, t, n, r = !1) {
|
|
2467
2458
|
if (t == 0 && n <= 0) return;
|
|
2468
2459
|
let i = e.length - 2;
|
|
2469
2460
|
i >= 0 && n <= 0 && n == e[i + 1] ? e[i] += t : i >= 0 && t == 0 && e[i] == 0 ? e[i + 1] += n : r ? (e[i] += t, e[i + 1] += n) : e.push(t, n);
|
|
2470
2461
|
}
|
|
2471
|
-
function
|
|
2462
|
+
function Zn(e, t, n) {
|
|
2472
2463
|
if (n.length == 0) return;
|
|
2473
2464
|
let r = t.length - 2 >> 1;
|
|
2474
2465
|
if (r < e.length) e[e.length - 1] = e[e.length - 1].append(n);
|
|
@@ -2477,7 +2468,7 @@ function Qn(e, t, n) {
|
|
|
2477
2468
|
e.push(n);
|
|
2478
2469
|
}
|
|
2479
2470
|
}
|
|
2480
|
-
function
|
|
2471
|
+
function Qn(e, t, n) {
|
|
2481
2472
|
let r = e.inserted;
|
|
2482
2473
|
for (let i = 0, a = 0, o = 0; o < e.sections.length;) {
|
|
2483
2474
|
let s = e.sections[o++], c = e.sections[o++];
|
|
@@ -2489,17 +2480,17 @@ function $n(e, t, n) {
|
|
|
2489
2480
|
}
|
|
2490
2481
|
}
|
|
2491
2482
|
}
|
|
2492
|
-
function
|
|
2493
|
-
let i = [], a = r ? [] : null, o = new
|
|
2483
|
+
function $n(e, t, n, r = !1) {
|
|
2484
|
+
let i = [], a = r ? [] : null, o = new tr(e), s = new tr(t);
|
|
2494
2485
|
for (let e = -1;;) if (o.done && s.len || s.done && o.len) throw Error("Mismatched change set lengths");
|
|
2495
2486
|
else if (o.ins == -1 && s.ins == -1) {
|
|
2496
2487
|
let e = Math.min(o.len, s.len);
|
|
2497
|
-
|
|
2488
|
+
I(i, e, -1), o.forward(e), s.forward(e);
|
|
2498
2489
|
} else if (s.ins >= 0 && (o.ins < 0 || e == o.i || o.off == 0 && (s.len < o.len || s.len == o.len && !n))) {
|
|
2499
2490
|
let t = s.len;
|
|
2500
|
-
for (
|
|
2491
|
+
for (I(i, s.ins, -1); t;) {
|
|
2501
2492
|
let n = Math.min(o.len, t);
|
|
2502
|
-
o.ins >= 0 && e < o.i && o.len <= n && (
|
|
2493
|
+
o.ins >= 0 && e < o.i && o.len <= n && (I(i, 0, o.ins), a && Zn(a, i, o.text), e = o.i), o.forward(n), t -= n;
|
|
2503
2494
|
}
|
|
2504
2495
|
s.next();
|
|
2505
2496
|
} else if (o.ins >= 0) {
|
|
@@ -2509,26 +2500,26 @@ function er(e, t, n, r = !1) {
|
|
|
2509
2500
|
t += e, n -= e, s.forward(e);
|
|
2510
2501
|
} else if (s.ins == 0 && s.len < n) n -= s.len, s.next();
|
|
2511
2502
|
else break;
|
|
2512
|
-
|
|
2503
|
+
I(i, t, e < o.i ? o.ins : 0), a && e < o.i && Zn(a, i, o.text), e = o.i, o.forward(o.len - n);
|
|
2513
2504
|
} else if (o.done && s.done) return a ? Xn.createSet(i, a) : Yn.create(i);
|
|
2514
2505
|
else throw Error("Mismatched change set lengths");
|
|
2515
2506
|
}
|
|
2516
|
-
function
|
|
2517
|
-
let r = [], i = n ? [] : null, a = new
|
|
2507
|
+
function er(e, t, n = !1) {
|
|
2508
|
+
let r = [], i = n ? [] : null, a = new tr(e), o = new tr(t);
|
|
2518
2509
|
for (let e = !1;;) if (a.done && o.done) return i ? Xn.createSet(r, i) : Yn.create(r);
|
|
2519
|
-
else if (a.ins == 0)
|
|
2520
|
-
else if (o.len == 0 && !o.done)
|
|
2510
|
+
else if (a.ins == 0) I(r, a.len, 0, e), a.next();
|
|
2511
|
+
else if (o.len == 0 && !o.done) I(r, 0, o.ins, e), i && Zn(i, r, o.text), o.next();
|
|
2521
2512
|
else if (a.done || o.done) throw Error("Mismatched change set lengths");
|
|
2522
2513
|
else {
|
|
2523
2514
|
let t = Math.min(a.len2, o.len), n = r.length;
|
|
2524
2515
|
if (a.ins == -1) {
|
|
2525
2516
|
let n = o.ins == -1 ? -1 : o.off ? 0 : o.ins;
|
|
2526
|
-
|
|
2527
|
-
} else o.ins == -1 ? (
|
|
2517
|
+
I(r, t, n, e), i && n && Zn(i, r, o.text);
|
|
2518
|
+
} else o.ins == -1 ? (I(r, a.off ? 0 : a.len, t, e), i && Zn(i, r, a.textBit(t))) : (I(r, a.off ? 0 : a.len, o.off ? 0 : o.ins, e), i && !o.off && Zn(i, r, o.text));
|
|
2528
2519
|
e = (a.ins > t || o.ins >= 0 && o.len > t) && (e || r.length > n), a.forward2(t), o.forward(t);
|
|
2529
2520
|
}
|
|
2530
2521
|
}
|
|
2531
|
-
var
|
|
2522
|
+
var tr = class {
|
|
2532
2523
|
constructor(e) {
|
|
2533
2524
|
this.set = e, this.i = 0, this.next();
|
|
2534
2525
|
}
|
|
@@ -2556,7 +2547,7 @@ var nr = class {
|
|
|
2556
2547
|
forward2(e) {
|
|
2557
2548
|
this.ins == -1 ? this.forward(e) : e == this.ins ? this.next() : (this.ins -= e, this.off += e);
|
|
2558
2549
|
}
|
|
2559
|
-
},
|
|
2550
|
+
}, nr = class e {
|
|
2560
2551
|
constructor(e, t, n) {
|
|
2561
2552
|
this.from = e, this.to = t, this.flags = n;
|
|
2562
2553
|
}
|
|
@@ -2585,9 +2576,9 @@ var nr = class {
|
|
|
2585
2576
|
return this.empty ? r = i = t.mapPos(this.from, n) : (r = t.mapPos(this.from, 1), i = t.mapPos(this.to, -1)), r == this.from && i == this.to ? this : new e(r, i, this.flags);
|
|
2586
2577
|
}
|
|
2587
2578
|
extend(e, t = e, n = 0) {
|
|
2588
|
-
if (e <= this.anchor && t >= this.anchor) return
|
|
2579
|
+
if (e <= this.anchor && t >= this.anchor) return L.range(e, t, void 0, void 0, n);
|
|
2589
2580
|
let r = Math.abs(e - this.anchor) > Math.abs(t - this.anchor) ? e : t;
|
|
2590
|
-
return
|
|
2581
|
+
return L.range(this.anchor, r, void 0, void 0, n);
|
|
2591
2582
|
}
|
|
2592
2583
|
eq(e, t = !1) {
|
|
2593
2584
|
return this.anchor == e.anchor && this.head == e.head && this.goalColumn == e.goalColumn && (!t || !this.empty || this.assoc == e.assoc);
|
|
@@ -2600,12 +2591,12 @@ var nr = class {
|
|
|
2600
2591
|
}
|
|
2601
2592
|
static fromJSON(e) {
|
|
2602
2593
|
if (!e || typeof e.anchor != "number" || typeof e.head != "number") throw RangeError("Invalid JSON representation for SelectionRange");
|
|
2603
|
-
return
|
|
2594
|
+
return L.range(e.anchor, e.head);
|
|
2604
2595
|
}
|
|
2605
2596
|
static create(t, n, r) {
|
|
2606
2597
|
return new e(t, n, r);
|
|
2607
2598
|
}
|
|
2608
|
-
},
|
|
2599
|
+
}, L = class e {
|
|
2609
2600
|
constructor(e, t) {
|
|
2610
2601
|
this.ranges = e, this.mainIndex = t;
|
|
2611
2602
|
}
|
|
@@ -2638,7 +2629,7 @@ var nr = class {
|
|
|
2638
2629
|
}
|
|
2639
2630
|
static fromJSON(t) {
|
|
2640
2631
|
if (!t || !Array.isArray(t.ranges) || typeof t.main != "number" || t.main >= t.ranges.length) throw RangeError("Invalid JSON representation for EditorSelection");
|
|
2641
|
-
return new e(t.ranges.map((e) =>
|
|
2632
|
+
return new e(t.ranges.map((e) => nr.fromJSON(e)), t.main);
|
|
2642
2633
|
}
|
|
2643
2634
|
static single(t, n = t) {
|
|
2644
2635
|
return new e([e.range(t, n)], 0);
|
|
@@ -2653,11 +2644,11 @@ var nr = class {
|
|
|
2653
2644
|
return new e(t, n);
|
|
2654
2645
|
}
|
|
2655
2646
|
static cursor(e, t = 0, n, r) {
|
|
2656
|
-
return
|
|
2647
|
+
return nr.create(e, e, (t == 0 ? 0 : t < 0 ? 8 : 16) | (n == null ? 7 : Math.min(6, n)) | (r ?? 16777215) << 6);
|
|
2657
2648
|
}
|
|
2658
2649
|
static range(e, t, n, r, i) {
|
|
2659
2650
|
let a = (n ?? 16777215) << 6 | (r == null ? 7 : Math.min(6, r));
|
|
2660
|
-
return !i && e != t && (i = t < e ? 1 : -1), t < e ?
|
|
2651
|
+
return !i && e != t && (i = t < e ? 1 : -1), t < e ? nr.create(t, e, 48 | a) : nr.create(e, t, (i ? i < 0 ? 8 : 16 : 0) | a);
|
|
2661
2652
|
}
|
|
2662
2653
|
static normalized(t, n = 0) {
|
|
2663
2654
|
let r = t[n];
|
|
@@ -2672,40 +2663,40 @@ var nr = class {
|
|
|
2672
2663
|
return new e(t, n);
|
|
2673
2664
|
}
|
|
2674
2665
|
};
|
|
2675
|
-
function
|
|
2666
|
+
function rr(e, t) {
|
|
2676
2667
|
for (let n of e.ranges) if (n.to > t) throw RangeError("Selection points outside of document");
|
|
2677
2668
|
}
|
|
2678
|
-
var
|
|
2669
|
+
var ir = 0, R = class e {
|
|
2679
2670
|
constructor(e, t, n, r, i) {
|
|
2680
|
-
this.combine = e, this.compareInput = t, this.compare = n, this.isStatic = r, this.id =
|
|
2671
|
+
this.combine = e, this.compareInput = t, this.compare = n, this.isStatic = r, this.id = ir++, this.default = e([]), this.extensions = typeof i == "function" ? i(this) : i;
|
|
2681
2672
|
}
|
|
2682
2673
|
get reader() {
|
|
2683
2674
|
return this;
|
|
2684
2675
|
}
|
|
2685
2676
|
static define(t = {}) {
|
|
2686
|
-
return new e(t.combine || ((e) => e), t.compareInput || ((e, t) => e === t), t.compare || (t.combine ? (e, t) => e === t :
|
|
2677
|
+
return new e(t.combine || ((e) => e), t.compareInput || ((e, t) => e === t), t.compare || (t.combine ? (e, t) => e === t : ar), !!t.static, t.enables);
|
|
2687
2678
|
}
|
|
2688
2679
|
of(e) {
|
|
2689
|
-
return new
|
|
2680
|
+
return new or([], this, 0, e);
|
|
2690
2681
|
}
|
|
2691
2682
|
compute(e, t) {
|
|
2692
2683
|
if (this.isStatic) throw Error("Can't compute a static facet");
|
|
2693
|
-
return new
|
|
2684
|
+
return new or(e, this, 1, t);
|
|
2694
2685
|
}
|
|
2695
2686
|
computeN(e, t) {
|
|
2696
2687
|
if (this.isStatic) throw Error("Can't compute a static facet");
|
|
2697
|
-
return new
|
|
2688
|
+
return new or(e, this, 2, t);
|
|
2698
2689
|
}
|
|
2699
2690
|
from(e, t) {
|
|
2700
2691
|
return t ||= (e) => e, this.compute([e], (n) => t(n.field(e)));
|
|
2701
2692
|
}
|
|
2702
2693
|
};
|
|
2703
|
-
function
|
|
2694
|
+
function ar(e, t) {
|
|
2704
2695
|
return e == t || e.length == t.length && e.every((e, n) => e === t[n]);
|
|
2705
2696
|
}
|
|
2706
|
-
var
|
|
2697
|
+
var or = class {
|
|
2707
2698
|
constructor(e, t, n, r) {
|
|
2708
|
-
this.dependencies = e, this.facet = t, this.type = n, this.value = r, this.id =
|
|
2699
|
+
this.dependencies = e, this.facet = t, this.type = n, this.value = r, this.id = ir++;
|
|
2709
2700
|
}
|
|
2710
2701
|
dynamicSlot(e) {
|
|
2711
2702
|
let t = this.value, n = this.facet.compareInput, r = this.id, i = e[r] >> 1, a = this.type == 2, o = !1, s = !1, c = [];
|
|
@@ -2715,39 +2706,39 @@ var sr = class {
|
|
|
2715
2706
|
return e.values[i] = t(e), 1;
|
|
2716
2707
|
},
|
|
2717
2708
|
update(e, r) {
|
|
2718
|
-
if (o && r.docChanged || s && (r.docChanged || r.selection) ||
|
|
2709
|
+
if (o && r.docChanged || s && (r.docChanged || r.selection) || cr(e, c)) {
|
|
2719
2710
|
let r = t(e);
|
|
2720
|
-
if (a ? !
|
|
2711
|
+
if (a ? !sr(r, e.values[i], n) : !n(r, e.values[i])) return e.values[i] = r, 1;
|
|
2721
2712
|
}
|
|
2722
2713
|
return 0;
|
|
2723
2714
|
},
|
|
2724
2715
|
reconfigure: (e, o) => {
|
|
2725
2716
|
let s, c = o.config.address[r];
|
|
2726
2717
|
if (c != null) {
|
|
2727
|
-
let r =
|
|
2728
|
-
if (this.dependencies.every((t) => t instanceof
|
|
2718
|
+
let r = xr(o, c);
|
|
2719
|
+
if (this.dependencies.every((t) => t instanceof R ? o.facet(t) === e.facet(t) : t instanceof dr ? o.field(t, !1) == e.field(t, !1) : !0) || (a ? sr(s = t(e), r, n) : n(s = t(e), r))) return e.values[i] = r, 0;
|
|
2729
2720
|
} else s = t(e);
|
|
2730
2721
|
return e.values[i] = s, 1;
|
|
2731
2722
|
}
|
|
2732
2723
|
};
|
|
2733
2724
|
}
|
|
2734
2725
|
};
|
|
2735
|
-
function
|
|
2726
|
+
function sr(e, t, n) {
|
|
2736
2727
|
if (e.length != t.length) return !1;
|
|
2737
2728
|
for (let r = 0; r < e.length; r++) if (!n(e[r], t[r])) return !1;
|
|
2738
2729
|
return !0;
|
|
2739
2730
|
}
|
|
2740
|
-
function
|
|
2731
|
+
function cr(e, t) {
|
|
2741
2732
|
let n = !1;
|
|
2742
|
-
for (let r of t)
|
|
2733
|
+
for (let r of t) br(e, r) & 1 && (n = !0);
|
|
2743
2734
|
return n;
|
|
2744
2735
|
}
|
|
2745
|
-
function
|
|
2736
|
+
function lr(e, t, n) {
|
|
2746
2737
|
let r = n.map((t) => e[t.id]), i = n.map((e) => e.type), a = r.filter((e) => !(e & 1)), o = e[t.id] >> 1;
|
|
2747
2738
|
function s(e) {
|
|
2748
2739
|
let n = [];
|
|
2749
2740
|
for (let t = 0; t < r.length; t++) {
|
|
2750
|
-
let a =
|
|
2741
|
+
let a = xr(e, r[t]);
|
|
2751
2742
|
if (i[t] == 2) for (let e of a) n.push(e);
|
|
2752
2743
|
else n.push(a);
|
|
2753
2744
|
}
|
|
@@ -2755,32 +2746,32 @@ function ur(e, t, n) {
|
|
|
2755
2746
|
}
|
|
2756
2747
|
return {
|
|
2757
2748
|
create(e) {
|
|
2758
|
-
for (let t of r)
|
|
2749
|
+
for (let t of r) br(e, t);
|
|
2759
2750
|
return e.values[o] = s(e), 1;
|
|
2760
2751
|
},
|
|
2761
2752
|
update(e, n) {
|
|
2762
|
-
if (!
|
|
2753
|
+
if (!cr(e, a)) return 0;
|
|
2763
2754
|
let r = s(e);
|
|
2764
2755
|
return t.compare(r, e.values[o]) ? 0 : (e.values[o] = r, 1);
|
|
2765
2756
|
},
|
|
2766
2757
|
reconfigure(e, i) {
|
|
2767
|
-
let a =
|
|
2768
|
-
if (c && !a &&
|
|
2758
|
+
let a = cr(e, r), c = i.config.facets[t.id], l = i.facet(t);
|
|
2759
|
+
if (c && !a && ar(n, c)) return e.values[o] = l, 0;
|
|
2769
2760
|
let u = s(e);
|
|
2770
2761
|
return t.compare(u, l) ? (e.values[o] = l, 0) : (e.values[o] = u, 1);
|
|
2771
2762
|
}
|
|
2772
2763
|
};
|
|
2773
2764
|
}
|
|
2774
|
-
var
|
|
2765
|
+
var ur = /* @__PURE__ */ R.define({ static: !0 }), dr = class e {
|
|
2775
2766
|
constructor(e, t, n, r, i) {
|
|
2776
2767
|
this.id = e, this.createF = t, this.updateF = n, this.compareF = r, this.spec = i, this.provides = void 0;
|
|
2777
2768
|
}
|
|
2778
2769
|
static define(t) {
|
|
2779
|
-
let n = new e(
|
|
2770
|
+
let n = new e(ir++, t.create, t.update, t.compare || ((e, t) => e === t), t);
|
|
2780
2771
|
return t.provide && (n.provides = t.provide(n)), n;
|
|
2781
2772
|
}
|
|
2782
2773
|
create(e) {
|
|
2783
|
-
return (e.facet(
|
|
2774
|
+
return (e.facet(ur).find((e) => e.field == this)?.create || this.createF)(e);
|
|
2784
2775
|
}
|
|
2785
2776
|
slot(e) {
|
|
2786
2777
|
let t = e[this.id] >> 1;
|
|
@@ -2791,13 +2782,13 @@ var dr = /* @__PURE__ */ L.define({ static: !0 }), fr = class e {
|
|
|
2791
2782
|
return this.compareF(r, i) ? 0 : (e.values[t] = i, 1);
|
|
2792
2783
|
},
|
|
2793
2784
|
reconfigure: (e, n) => {
|
|
2794
|
-
let r = e.facet(
|
|
2785
|
+
let r = e.facet(ur), i = n.facet(ur), a;
|
|
2795
2786
|
return (a = r.find((e) => e.field == this)) && a != i.find((e) => e.field == this) ? (e.values[t] = a.create(e), 1) : n.config.address[this.id] == null ? (e.values[t] = this.create(e), 1) : (e.values[t] = n.field(this), 0);
|
|
2796
2787
|
}
|
|
2797
2788
|
};
|
|
2798
2789
|
}
|
|
2799
2790
|
init(e) {
|
|
2800
|
-
return [this,
|
|
2791
|
+
return [this, ur.of({
|
|
2801
2792
|
field: this,
|
|
2802
2793
|
create: e
|
|
2803
2794
|
})];
|
|
@@ -2805,29 +2796,29 @@ var dr = /* @__PURE__ */ L.define({ static: !0 }), fr = class e {
|
|
|
2805
2796
|
get extension() {
|
|
2806
2797
|
return this;
|
|
2807
2798
|
}
|
|
2808
|
-
},
|
|
2799
|
+
}, fr = {
|
|
2809
2800
|
lowest: 4,
|
|
2810
2801
|
low: 3,
|
|
2811
2802
|
default: 2,
|
|
2812
2803
|
high: 1,
|
|
2813
2804
|
highest: 0
|
|
2814
2805
|
};
|
|
2815
|
-
function
|
|
2816
|
-
return (t) => new
|
|
2817
|
-
}
|
|
2818
|
-
var
|
|
2819
|
-
highest: /* @__PURE__ */
|
|
2820
|
-
high: /* @__PURE__ */
|
|
2821
|
-
default: /* @__PURE__ */
|
|
2822
|
-
low: /* @__PURE__ */
|
|
2823
|
-
lowest: /* @__PURE__ */
|
|
2824
|
-
},
|
|
2806
|
+
function pr(e) {
|
|
2807
|
+
return (t) => new hr(t, e);
|
|
2808
|
+
}
|
|
2809
|
+
var mr = {
|
|
2810
|
+
highest: /* @__PURE__ */ pr(fr.highest),
|
|
2811
|
+
high: /* @__PURE__ */ pr(fr.high),
|
|
2812
|
+
default: /* @__PURE__ */ pr(fr.default),
|
|
2813
|
+
low: /* @__PURE__ */ pr(fr.low),
|
|
2814
|
+
lowest: /* @__PURE__ */ pr(fr.lowest)
|
|
2815
|
+
}, hr = class {
|
|
2825
2816
|
constructor(e, t) {
|
|
2826
2817
|
this.inner = e, this.prec = t;
|
|
2827
2818
|
}
|
|
2828
|
-
},
|
|
2819
|
+
}, gr = class e {
|
|
2829
2820
|
of(e) {
|
|
2830
|
-
return new
|
|
2821
|
+
return new _r(this, e);
|
|
2831
2822
|
}
|
|
2832
2823
|
reconfigure(t) {
|
|
2833
2824
|
return e.reconfigure.of({
|
|
@@ -2838,11 +2829,11 @@ var hr = {
|
|
|
2838
2829
|
get(e) {
|
|
2839
2830
|
return e.config.compartments.get(this);
|
|
2840
2831
|
}
|
|
2841
|
-
},
|
|
2832
|
+
}, _r = class {
|
|
2842
2833
|
constructor(e, t) {
|
|
2843
2834
|
this.compartment = e, this.inner = t;
|
|
2844
2835
|
}
|
|
2845
|
-
},
|
|
2836
|
+
}, vr = class e {
|
|
2846
2837
|
constructor(e, t, n, r, i, a) {
|
|
2847
2838
|
for (this.base = e, this.compartments = t, this.dynamicSlots = n, this.address = r, this.staticValues = i, this.facets = a, this.statusTemplate = []; this.statusTemplate.length < n.length;) this.statusTemplate.push(0);
|
|
2848
2839
|
}
|
|
@@ -2852,26 +2843,26 @@ var hr = {
|
|
|
2852
2843
|
}
|
|
2853
2844
|
static resolve(t, n, r) {
|
|
2854
2845
|
let i = [], a = Object.create(null), o = /* @__PURE__ */ new Map();
|
|
2855
|
-
for (let e of
|
|
2846
|
+
for (let e of yr(t, n, o)) e instanceof dr ? i.push(e) : (a[e.facet.id] || (a[e.facet.id] = [])).push(e);
|
|
2856
2847
|
let s = Object.create(null), c = [], l = [];
|
|
2857
2848
|
for (let e of i) s[e.id] = l.length << 1, l.push((t) => e.slot(t));
|
|
2858
2849
|
let u = r?.config.facets;
|
|
2859
2850
|
for (let e in a) {
|
|
2860
2851
|
let t = a[e], n = t[0].facet, i = u && u[e] || [];
|
|
2861
|
-
if (t.every((e) => e.type == 0)) if (s[n.id] = c.length << 1 | 1,
|
|
2852
|
+
if (t.every((e) => e.type == 0)) if (s[n.id] = c.length << 1 | 1, ar(i, t)) c.push(r.facet(n));
|
|
2862
2853
|
else {
|
|
2863
2854
|
let e = n.combine(t.map((e) => e.value));
|
|
2864
2855
|
c.push(r && n.compare(e, r.facet(n)) ? r.facet(n) : e);
|
|
2865
2856
|
}
|
|
2866
2857
|
else {
|
|
2867
2858
|
for (let e of t) e.type == 0 ? (s[e.id] = c.length << 1 | 1, c.push(e.value)) : (s[e.id] = l.length << 1, l.push((t) => e.dynamicSlot(t)));
|
|
2868
|
-
s[n.id] = l.length << 1, l.push((e) =>
|
|
2859
|
+
s[n.id] = l.length << 1, l.push((e) => lr(e, n, t));
|
|
2869
2860
|
}
|
|
2870
2861
|
}
|
|
2871
2862
|
return new e(t, o, l.map((e) => e(s)), s, c, a);
|
|
2872
2863
|
}
|
|
2873
2864
|
};
|
|
2874
|
-
function
|
|
2865
|
+
function yr(e, t, n) {
|
|
2875
2866
|
let r = [
|
|
2876
2867
|
[],
|
|
2877
2868
|
[],
|
|
@@ -2884,25 +2875,25 @@ function br(e, t, n) {
|
|
|
2884
2875
|
if (s != null) {
|
|
2885
2876
|
if (s <= o) return;
|
|
2886
2877
|
let t = r[s].indexOf(e);
|
|
2887
|
-
t > -1 && r[s].splice(t, 1), e instanceof
|
|
2878
|
+
t > -1 && r[s].splice(t, 1), e instanceof _r && n.delete(e.compartment);
|
|
2888
2879
|
}
|
|
2889
2880
|
if (i.set(e, o), Array.isArray(e)) for (let t of e) a(t, o);
|
|
2890
|
-
else if (e instanceof
|
|
2881
|
+
else if (e instanceof _r) {
|
|
2891
2882
|
if (n.has(e.compartment)) throw RangeError("Duplicate use of compartment in extensions");
|
|
2892
2883
|
let r = t.get(e.compartment) || e.inner;
|
|
2893
2884
|
n.set(e.compartment, r), a(r, o);
|
|
2894
|
-
} else if (e instanceof
|
|
2895
|
-
else if (e instanceof
|
|
2896
|
-
else if (e instanceof
|
|
2885
|
+
} else if (e instanceof hr) a(e.inner, e.prec);
|
|
2886
|
+
else if (e instanceof dr) r[o].push(e), e.provides && a(e.provides, o);
|
|
2887
|
+
else if (e instanceof or) r[o].push(e), e.facet.extensions && a(e.facet.extensions, fr.default);
|
|
2897
2888
|
else {
|
|
2898
2889
|
let t = e.extension;
|
|
2899
2890
|
if (!t) throw Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);
|
|
2900
2891
|
a(t, o);
|
|
2901
2892
|
}
|
|
2902
2893
|
}
|
|
2903
|
-
return a(e,
|
|
2894
|
+
return a(e, fr.default), r.reduce((e, t) => e.concat(t));
|
|
2904
2895
|
}
|
|
2905
|
-
function
|
|
2896
|
+
function br(e, t) {
|
|
2906
2897
|
if (t & 1) return 2;
|
|
2907
2898
|
let n = t >> 1, r = e.status[n];
|
|
2908
2899
|
if (r == 4) throw Error("Cyclic dependency between fields and/or facets");
|
|
@@ -2911,34 +2902,34 @@ function xr(e, t) {
|
|
|
2911
2902
|
let i = e.computeSlot(e, e.config.dynamicSlots[n]);
|
|
2912
2903
|
return e.status[n] = 2 | i;
|
|
2913
2904
|
}
|
|
2914
|
-
function
|
|
2905
|
+
function xr(e, t) {
|
|
2915
2906
|
return t & 1 ? e.config.staticValues[t >> 1] : e.values[t >> 1];
|
|
2916
2907
|
}
|
|
2917
|
-
var
|
|
2908
|
+
var Sr = /* @__PURE__ */ R.define(), Cr = /* @__PURE__ */ R.define({
|
|
2918
2909
|
combine: (e) => e.some((e) => e),
|
|
2919
2910
|
static: !0
|
|
2920
|
-
}),
|
|
2911
|
+
}), wr = /* @__PURE__ */ R.define({
|
|
2921
2912
|
combine: (e) => e.length ? e[0] : void 0,
|
|
2922
2913
|
static: !0
|
|
2923
|
-
}),
|
|
2914
|
+
}), Tr = /* @__PURE__ */ R.define(), Er = /* @__PURE__ */ R.define(), Dr = /* @__PURE__ */ R.define(), Or = /* @__PURE__ */ R.define({ combine: (e) => e.length ? e[0] : !1 }), kr = class {
|
|
2924
2915
|
constructor(e, t) {
|
|
2925
2916
|
this.type = e, this.value = t;
|
|
2926
2917
|
}
|
|
2927
2918
|
static define() {
|
|
2928
|
-
return new
|
|
2919
|
+
return new Ar();
|
|
2929
2920
|
}
|
|
2930
|
-
},
|
|
2921
|
+
}, Ar = class {
|
|
2931
2922
|
of(e) {
|
|
2932
|
-
return new
|
|
2923
|
+
return new kr(this, e);
|
|
2933
2924
|
}
|
|
2934
|
-
},
|
|
2925
|
+
}, jr = class {
|
|
2935
2926
|
constructor(e) {
|
|
2936
2927
|
this.map = e;
|
|
2937
2928
|
}
|
|
2938
2929
|
of(e) {
|
|
2939
|
-
return new
|
|
2930
|
+
return new z(this, e);
|
|
2940
2931
|
}
|
|
2941
|
-
},
|
|
2932
|
+
}, z = class e {
|
|
2942
2933
|
constructor(e, t) {
|
|
2943
2934
|
this.type = e, this.value = t;
|
|
2944
2935
|
}
|
|
@@ -2950,7 +2941,7 @@ var Cr = /* @__PURE__ */ L.define(), wr = /* @__PURE__ */ L.define({
|
|
|
2950
2941
|
return this.type == e;
|
|
2951
2942
|
}
|
|
2952
2943
|
static define(e = {}) {
|
|
2953
|
-
return new
|
|
2944
|
+
return new jr(e.map || ((e) => e));
|
|
2954
2945
|
}
|
|
2955
2946
|
static mapEffects(e, t) {
|
|
2956
2947
|
if (!e.length) return e;
|
|
@@ -2962,10 +2953,10 @@ var Cr = /* @__PURE__ */ L.define(), wr = /* @__PURE__ */ L.define({
|
|
|
2962
2953
|
return n;
|
|
2963
2954
|
}
|
|
2964
2955
|
};
|
|
2965
|
-
|
|
2966
|
-
var
|
|
2956
|
+
z.reconfigure = /* @__PURE__ */ z.define(), z.appendConfig = /* @__PURE__ */ z.define();
|
|
2957
|
+
var Mr = class e {
|
|
2967
2958
|
constructor(t, n, r, i, a, o) {
|
|
2968
|
-
this.startState = t, this.changes = n, this.selection = r, this.effects = i, this.annotations = a, this.scrollIntoView = o, this._doc = null, this._state = null, r &&
|
|
2959
|
+
this.startState = t, this.changes = n, this.selection = r, this.effects = i, this.annotations = a, this.scrollIntoView = o, this._doc = null, this._state = null, r && rr(r, n.newLength), a.some((t) => t.type == e.time) || (this.annotations = a.concat(e.time.of(Date.now())));
|
|
2969
2960
|
}
|
|
2970
2961
|
static create(t, n, r, i, a, o) {
|
|
2971
2962
|
return new e(t, n, r, i, a, o);
|
|
@@ -2993,8 +2984,8 @@ var Nr = class e {
|
|
|
2993
2984
|
return !!(n && (n == t || n.length > t.length && n.slice(0, t.length) == t && n[t.length] == "."));
|
|
2994
2985
|
}
|
|
2995
2986
|
};
|
|
2996
|
-
|
|
2997
|
-
function
|
|
2987
|
+
Mr.time = /* @__PURE__ */ kr.define(), Mr.userEvent = /* @__PURE__ */ kr.define(), Mr.addToHistory = /* @__PURE__ */ kr.define(), Mr.remote = /* @__PURE__ */ kr.define();
|
|
2988
|
+
function Nr(e, t) {
|
|
2998
2989
|
let n = [];
|
|
2999
2990
|
for (let r = 0, i = 0;;) {
|
|
3000
2991
|
let a, o;
|
|
@@ -3004,46 +2995,46 @@ function Pr(e, t) {
|
|
|
3004
2995
|
!n.length || n[n.length - 1] < a ? n.push(a, o) : n[n.length - 1] < o && (n[n.length - 1] = o);
|
|
3005
2996
|
}
|
|
3006
2997
|
}
|
|
3007
|
-
function
|
|
2998
|
+
function Pr(e, t, n) {
|
|
3008
2999
|
let r, i, a;
|
|
3009
3000
|
return n ? (r = t.changes, i = Xn.empty(t.changes.length), a = e.changes.compose(t.changes)) : (r = t.changes.map(e.changes), i = e.changes.mapDesc(t.changes, !0), a = e.changes.compose(r)), {
|
|
3010
3001
|
changes: a,
|
|
3011
3002
|
selection: t.selection ? t.selection.map(i) : e.selection?.map(r),
|
|
3012
|
-
effects:
|
|
3003
|
+
effects: z.mapEffects(e.effects, r).concat(z.mapEffects(t.effects, i)),
|
|
3013
3004
|
annotations: e.annotations.length ? e.annotations.concat(t.annotations) : t.annotations,
|
|
3014
3005
|
scrollIntoView: e.scrollIntoView || t.scrollIntoView
|
|
3015
3006
|
};
|
|
3016
3007
|
}
|
|
3017
|
-
function
|
|
3018
|
-
let r = t.selection, i =
|
|
3019
|
-
return t.userEvent && (i = i.concat(
|
|
3020
|
-
changes: t.changes instanceof Xn ? t.changes : Xn.of(t.changes || [], n, e.facet(
|
|
3021
|
-
selection: r && (r instanceof
|
|
3022
|
-
effects:
|
|
3008
|
+
function Fr(e, t, n) {
|
|
3009
|
+
let r = t.selection, i = Br(t.annotations);
|
|
3010
|
+
return t.userEvent && (i = i.concat(Mr.userEvent.of(t.userEvent))), {
|
|
3011
|
+
changes: t.changes instanceof Xn ? t.changes : Xn.of(t.changes || [], n, e.facet(wr)),
|
|
3012
|
+
selection: r && (r instanceof L ? r : L.single(r.anchor, r.head)),
|
|
3013
|
+
effects: Br(t.effects),
|
|
3023
3014
|
annotations: i,
|
|
3024
3015
|
scrollIntoView: !!t.scrollIntoView
|
|
3025
3016
|
};
|
|
3026
3017
|
}
|
|
3027
|
-
function
|
|
3028
|
-
let r =
|
|
3018
|
+
function Ir(e, t, n) {
|
|
3019
|
+
let r = Fr(e, t.length ? t[0] : {}, e.doc.length);
|
|
3029
3020
|
t.length && t[0].filter === !1 && (n = !1);
|
|
3030
3021
|
for (let i = 1; i < t.length; i++) {
|
|
3031
3022
|
t[i].filter === !1 && (n = !1);
|
|
3032
3023
|
let a = !!t[i].sequential;
|
|
3033
|
-
r =
|
|
3024
|
+
r = Pr(r, Fr(e, t[i], a ? r.changes.newLength : e.doc.length), a);
|
|
3034
3025
|
}
|
|
3035
|
-
let i =
|
|
3036
|
-
return
|
|
3026
|
+
let i = Mr.create(e, r.changes, r.selection, r.effects, r.annotations, r.scrollIntoView);
|
|
3027
|
+
return Rr(n ? Lr(i) : i);
|
|
3037
3028
|
}
|
|
3038
|
-
function
|
|
3029
|
+
function Lr(e) {
|
|
3039
3030
|
let t = e.startState, n = !0;
|
|
3040
|
-
for (let r of t.facet(
|
|
3031
|
+
for (let r of t.facet(Tr)) {
|
|
3041
3032
|
let t = r(e);
|
|
3042
3033
|
if (t === !1) {
|
|
3043
3034
|
n = !1;
|
|
3044
3035
|
break;
|
|
3045
3036
|
}
|
|
3046
|
-
Array.isArray(t) && (n = n === !0 ? t :
|
|
3037
|
+
Array.isArray(t) && (n = n === !0 ? t : Nr(n, t));
|
|
3047
3038
|
}
|
|
3048
3039
|
if (n !== !0) {
|
|
3049
3040
|
let r, i;
|
|
@@ -3052,53 +3043,53 @@ function Rr(e) {
|
|
|
3052
3043
|
let t = e.changes.filter(n);
|
|
3053
3044
|
r = t.changes, i = t.filtered.mapDesc(t.changes).invertedDesc;
|
|
3054
3045
|
}
|
|
3055
|
-
e =
|
|
3046
|
+
e = Mr.create(t, r, e.selection && e.selection.map(i), z.mapEffects(e.effects, i), e.annotations, e.scrollIntoView);
|
|
3056
3047
|
}
|
|
3057
|
-
let r = t.facet(
|
|
3048
|
+
let r = t.facet(Er);
|
|
3058
3049
|
for (let n = r.length - 1; n >= 0; n--) {
|
|
3059
3050
|
let i = r[n](e);
|
|
3060
|
-
e = i instanceof
|
|
3051
|
+
e = i instanceof Mr ? i : Array.isArray(i) && i.length == 1 && i[0] instanceof Mr ? i[0] : Ir(t, Br(i), !1);
|
|
3061
3052
|
}
|
|
3062
3053
|
return e;
|
|
3063
3054
|
}
|
|
3064
|
-
function
|
|
3065
|
-
let t = e.startState, n = t.facet(
|
|
3055
|
+
function Rr(e) {
|
|
3056
|
+
let t = e.startState, n = t.facet(Dr), r = e;
|
|
3066
3057
|
for (let i = n.length - 1; i >= 0; i--) {
|
|
3067
3058
|
let a = n[i](e);
|
|
3068
|
-
a && Object.keys(a).length && (r =
|
|
3059
|
+
a && Object.keys(a).length && (r = Pr(r, Fr(t, a, e.changes.newLength), !0));
|
|
3069
3060
|
}
|
|
3070
|
-
return r == e ? e :
|
|
3061
|
+
return r == e ? e : Mr.create(t, e.changes, e.selection, r.effects, r.annotations, r.scrollIntoView);
|
|
3071
3062
|
}
|
|
3072
|
-
var
|
|
3073
|
-
function
|
|
3074
|
-
return e == null ?
|
|
3063
|
+
var zr = [];
|
|
3064
|
+
function Br(e) {
|
|
3065
|
+
return e == null ? zr : Array.isArray(e) ? e : [e];
|
|
3075
3066
|
}
|
|
3076
|
-
var
|
|
3067
|
+
var Vr = /* @__PURE__ */ (function(e) {
|
|
3077
3068
|
return e[e.Word = 0] = "Word", e[e.Space = 1] = "Space", e[e.Other = 2] = "Other", e;
|
|
3078
|
-
})(
|
|
3069
|
+
})(Vr ||= {}), Hr = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/, Ur;
|
|
3079
3070
|
try {
|
|
3080
|
-
|
|
3071
|
+
Ur = /* @__PURE__ */ RegExp("[\\p{Alphabetic}\\p{Number}_]", "u");
|
|
3081
3072
|
} catch {}
|
|
3082
|
-
function
|
|
3083
|
-
if (
|
|
3073
|
+
function Wr(e) {
|
|
3074
|
+
if (Ur) return Ur.test(e);
|
|
3084
3075
|
for (let t = 0; t < e.length; t++) {
|
|
3085
3076
|
let n = e[t];
|
|
3086
|
-
if (/\w/.test(n) || n > "" && (n.toUpperCase() != n.toLowerCase() ||
|
|
3077
|
+
if (/\w/.test(n) || n > "" && (n.toUpperCase() != n.toLowerCase() || Hr.test(n))) return !0;
|
|
3087
3078
|
}
|
|
3088
3079
|
return !1;
|
|
3089
3080
|
}
|
|
3090
|
-
function
|
|
3081
|
+
function Gr(e) {
|
|
3091
3082
|
return (t) => {
|
|
3092
|
-
if (!/\S/.test(t)) return
|
|
3093
|
-
if (
|
|
3094
|
-
for (let n = 0; n < e.length; n++) if (t.indexOf(e[n]) > -1) return
|
|
3095
|
-
return
|
|
3083
|
+
if (!/\S/.test(t)) return Vr.Space;
|
|
3084
|
+
if (Wr(t)) return Vr.Word;
|
|
3085
|
+
for (let n = 0; n < e.length; n++) if (t.indexOf(e[n]) > -1) return Vr.Word;
|
|
3086
|
+
return Vr.Other;
|
|
3096
3087
|
};
|
|
3097
3088
|
}
|
|
3098
|
-
var
|
|
3089
|
+
var B = class e {
|
|
3099
3090
|
constructor(e, t, n, r, i, a) {
|
|
3100
3091
|
this.config = e, this.doc = t, this.selection = n, this.values = r, this.status = e.statusTemplate.slice(), this.computeSlot = i, a && (a._state = this);
|
|
3101
|
-
for (let e = 0; e < this.config.dynamicSlots.length; e++)
|
|
3092
|
+
for (let e = 0; e < this.config.dynamicSlots.length; e++) br(this, e << 1);
|
|
3102
3093
|
this.computeSlot = null;
|
|
3103
3094
|
}
|
|
3104
3095
|
field(e, t = !0) {
|
|
@@ -3107,17 +3098,17 @@ var z = class e {
|
|
|
3107
3098
|
if (t) throw RangeError("Field is not present in this state");
|
|
3108
3099
|
return;
|
|
3109
3100
|
}
|
|
3110
|
-
return
|
|
3101
|
+
return br(this, n), xr(this, n);
|
|
3111
3102
|
}
|
|
3112
3103
|
update(...e) {
|
|
3113
|
-
return
|
|
3104
|
+
return Ir(this, e, !0);
|
|
3114
3105
|
}
|
|
3115
3106
|
applyTransaction(t) {
|
|
3116
3107
|
let n = this.config, { base: r, compartments: i } = n;
|
|
3117
|
-
for (let e of t.effects) e.is(
|
|
3108
|
+
for (let e of t.effects) e.is(gr.reconfigure) ? (n &&= (i = /* @__PURE__ */ new Map(), n.compartments.forEach((e, t) => i.set(t, e)), null), i.set(e.value.compartment, e.value.extension)) : e.is(z.reconfigure) ? (n = null, r = e.value) : e.is(z.appendConfig) && (n = null, r = Br(r).concat(e.value));
|
|
3118
3109
|
let a;
|
|
3119
|
-
n ? a = t.startState.values.slice() : (n =
|
|
3120
|
-
let o = t.startState.facet(
|
|
3110
|
+
n ? a = t.startState.values.slice() : (n = vr.resolve(r, i, this), a = new e(n, this.doc, this.selection, n.dynamicSlots.map(() => null), (e, t) => t.reconfigure(e, this), null).values);
|
|
3111
|
+
let o = t.startState.facet(Cr) ? t.newSelection : t.newSelection.asSingle();
|
|
3121
3112
|
new e(n, t.newDoc, o, a, (e, n) => n.update(e, t), t);
|
|
3122
3113
|
}
|
|
3123
3114
|
replaceSelection(e) {
|
|
@@ -3127,20 +3118,20 @@ var z = class e {
|
|
|
3127
3118
|
to: t.to,
|
|
3128
3119
|
insert: e
|
|
3129
3120
|
},
|
|
3130
|
-
range:
|
|
3121
|
+
range: L.cursor(t.from + e.length)
|
|
3131
3122
|
}));
|
|
3132
3123
|
}
|
|
3133
3124
|
changeByRange(e) {
|
|
3134
|
-
let t = this.selection, n = e(t.ranges[0]), r = this.changes(n.changes), i = [n.range], a =
|
|
3125
|
+
let t = this.selection, n = e(t.ranges[0]), r = this.changes(n.changes), i = [n.range], a = Br(n.effects);
|
|
3135
3126
|
for (let n = 1; n < t.ranges.length; n++) {
|
|
3136
3127
|
let o = e(t.ranges[n]), s = this.changes(o.changes), c = s.map(r);
|
|
3137
3128
|
for (let e = 0; e < n; e++) i[e] = i[e].map(c);
|
|
3138
3129
|
let l = r.mapDesc(s, !0);
|
|
3139
|
-
i.push(o.range.map(l)), r = r.compose(c), a =
|
|
3130
|
+
i.push(o.range.map(l)), r = r.compose(c), a = z.mapEffects(a, c).concat(z.mapEffects(Br(o.effects), l));
|
|
3140
3131
|
}
|
|
3141
3132
|
return {
|
|
3142
3133
|
changes: r,
|
|
3143
|
-
selection:
|
|
3134
|
+
selection: L.create(i, t.mainIndex),
|
|
3144
3135
|
effects: a
|
|
3145
3136
|
};
|
|
3146
3137
|
}
|
|
@@ -3155,7 +3146,7 @@ var z = class e {
|
|
|
3155
3146
|
}
|
|
3156
3147
|
facet(e) {
|
|
3157
3148
|
let t = this.config.address[e.id];
|
|
3158
|
-
return t == null ? e.default : (
|
|
3149
|
+
return t == null ? e.default : (br(this, t), xr(this, t));
|
|
3159
3150
|
}
|
|
3160
3151
|
toJSON(e) {
|
|
3161
3152
|
let t = {
|
|
@@ -3164,7 +3155,7 @@ var z = class e {
|
|
|
3164
3155
|
};
|
|
3165
3156
|
if (e) for (let n in e) {
|
|
3166
3157
|
let r = e[n];
|
|
3167
|
-
r instanceof
|
|
3158
|
+
r instanceof dr && this.config.address[r.id] != null && (t[n] = r.spec.toJSON(this.field(e[n]), this));
|
|
3168
3159
|
}
|
|
3169
3160
|
return t;
|
|
3170
3161
|
}
|
|
@@ -3179,13 +3170,13 @@ var z = class e {
|
|
|
3179
3170
|
}
|
|
3180
3171
|
return e.create({
|
|
3181
3172
|
doc: t.doc,
|
|
3182
|
-
selection:
|
|
3173
|
+
selection: L.fromJSON(t.selection),
|
|
3183
3174
|
extensions: n.extensions ? i.concat([n.extensions]) : i
|
|
3184
3175
|
});
|
|
3185
3176
|
}
|
|
3186
3177
|
static create(t = {}) {
|
|
3187
|
-
let n =
|
|
3188
|
-
return
|
|
3178
|
+
let n = vr.resolve(t.extensions || [], /* @__PURE__ */ new Map()), r = t.doc instanceof P ? t.doc : P.of((t.doc || "").split(n.staticFacet(e.lineSeparator) || qn)), i = t.selection ? t.selection instanceof L ? t.selection : L.single(t.selection.anchor, t.selection.head) : L.single(0);
|
|
3179
|
+
return rr(i, r.length), n.staticFacet(Cr) || (i = i.asSingle()), new e(n, r, i, n.dynamicSlots.map(() => null), (e, t) => t.create(e), null);
|
|
3189
3180
|
}
|
|
3190
3181
|
get tabSize() {
|
|
3191
3182
|
return this.facet(e.tabSize);
|
|
@@ -3194,7 +3185,7 @@ var z = class e {
|
|
|
3194
3185
|
return this.facet(e.lineSeparator) || "\n";
|
|
3195
3186
|
}
|
|
3196
3187
|
get readOnly() {
|
|
3197
|
-
return this.facet(
|
|
3188
|
+
return this.facet(Or);
|
|
3198
3189
|
}
|
|
3199
3190
|
phrase(t, ...n) {
|
|
3200
3191
|
for (let n of this.facet(e.phrases)) if (Object.prototype.hasOwnProperty.call(n, t)) {
|
|
@@ -3209,33 +3200,33 @@ var z = class e {
|
|
|
3209
3200
|
}
|
|
3210
3201
|
languageDataAt(e, t, n = -1) {
|
|
3211
3202
|
let r = [];
|
|
3212
|
-
for (let i of this.facet(
|
|
3203
|
+
for (let i of this.facet(Sr)) for (let a of i(this, t, n)) Object.prototype.hasOwnProperty.call(a, e) && r.push(a[e]);
|
|
3213
3204
|
return r;
|
|
3214
3205
|
}
|
|
3215
3206
|
charCategorizer(e) {
|
|
3216
3207
|
let t = this.languageDataAt("wordChars", e);
|
|
3217
|
-
return
|
|
3208
|
+
return Gr(t.length ? t[0] : "");
|
|
3218
3209
|
}
|
|
3219
3210
|
wordAt(e) {
|
|
3220
3211
|
let { text: t, from: n, length: r } = this.doc.lineAt(e), i = this.charCategorizer(e), a = e - n, o = e - n;
|
|
3221
3212
|
for (; a > 0;) {
|
|
3222
3213
|
let e = F(t, a, !1);
|
|
3223
|
-
if (i(t.slice(e, a)) !=
|
|
3214
|
+
if (i(t.slice(e, a)) != Vr.Word) break;
|
|
3224
3215
|
a = e;
|
|
3225
3216
|
}
|
|
3226
3217
|
for (; o < r;) {
|
|
3227
3218
|
let e = F(t, o);
|
|
3228
|
-
if (i(t.slice(o, e)) !=
|
|
3219
|
+
if (i(t.slice(o, e)) != Vr.Word) break;
|
|
3229
3220
|
o = e;
|
|
3230
3221
|
}
|
|
3231
|
-
return a == o ? null :
|
|
3222
|
+
return a == o ? null : L.range(a + n, o + n);
|
|
3232
3223
|
}
|
|
3233
3224
|
};
|
|
3234
|
-
|
|
3225
|
+
B.allowMultipleSelections = Cr, B.tabSize = /* @__PURE__ */ R.define({ combine: (e) => e.length ? e[0] : 4 }), B.lineSeparator = wr, B.readOnly = Or, B.phrases = /* @__PURE__ */ R.define({ compare(e, t) {
|
|
3235
3226
|
let n = Object.keys(e), r = Object.keys(t);
|
|
3236
3227
|
return n.length == r.length && n.every((n) => e[n] == t[n]);
|
|
3237
|
-
} }),
|
|
3238
|
-
function
|
|
3228
|
+
} }), B.languageData = Sr, B.changeFilter = Tr, B.transactionFilter = Er, B.transactionExtender = Dr, gr.reconfigure = /* @__PURE__ */ z.define();
|
|
3229
|
+
function Kr(e, t, n = {}) {
|
|
3239
3230
|
let r = {};
|
|
3240
3231
|
for (let t of e) for (let e of Object.keys(t)) {
|
|
3241
3232
|
let i = t[e], a = r[e];
|
|
@@ -3246,19 +3237,19 @@ function qr(e, t, n = {}) {
|
|
|
3246
3237
|
for (let e in t) r[e] === void 0 && (r[e] = t[e]);
|
|
3247
3238
|
return r;
|
|
3248
3239
|
}
|
|
3249
|
-
var
|
|
3240
|
+
var qr = class {
|
|
3250
3241
|
eq(e) {
|
|
3251
3242
|
return this == e;
|
|
3252
3243
|
}
|
|
3253
3244
|
range(e, t = e) {
|
|
3254
|
-
return
|
|
3245
|
+
return Yr.create(e, t, this);
|
|
3255
3246
|
}
|
|
3256
3247
|
};
|
|
3257
|
-
|
|
3258
|
-
function
|
|
3248
|
+
qr.prototype.startSide = qr.prototype.endSide = 0, qr.prototype.point = !1, qr.prototype.mapMode = Jn.TrackDel;
|
|
3249
|
+
function Jr(e, t) {
|
|
3259
3250
|
return e == t || e.constructor == t.constructor && e.eq(t);
|
|
3260
3251
|
}
|
|
3261
|
-
var
|
|
3252
|
+
var Yr = class e {
|
|
3262
3253
|
constructor(e, t, n) {
|
|
3263
3254
|
this.from = e, this.to = t, this.value = n;
|
|
3264
3255
|
}
|
|
@@ -3266,10 +3257,10 @@ var Xr = class e {
|
|
|
3266
3257
|
return new e(t, n, r);
|
|
3267
3258
|
}
|
|
3268
3259
|
};
|
|
3269
|
-
function
|
|
3260
|
+
function Xr(e, t) {
|
|
3270
3261
|
return e.from - t.from || e.value.startSide - t.value.startSide;
|
|
3271
3262
|
}
|
|
3272
|
-
var
|
|
3263
|
+
var Zr = class e {
|
|
3273
3264
|
constructor(e, t, n, r) {
|
|
3274
3265
|
this.from = e, this.to = t, this.value = n, this.maxPoint = r;
|
|
3275
3266
|
}
|
|
@@ -3303,7 +3294,7 @@ var Qr = class e {
|
|
|
3303
3294
|
pos: o
|
|
3304
3295
|
};
|
|
3305
3296
|
}
|
|
3306
|
-
},
|
|
3297
|
+
}, V = class e {
|
|
3307
3298
|
constructor(e, t, n, r) {
|
|
3308
3299
|
this.chunkPos = e, this.chunk = t, this.nextLayer = n, this.maxPoint = r;
|
|
3309
3300
|
}
|
|
@@ -3326,12 +3317,12 @@ var Qr = class e {
|
|
|
3326
3317
|
update(t) {
|
|
3327
3318
|
let { add: n = [], sort: r = !1, filterFrom: i = 0, filterTo: a = this.length } = t, o = t.filter;
|
|
3328
3319
|
if (n.length == 0 && !o) return this;
|
|
3329
|
-
if (r && (n = n.slice().sort(
|
|
3330
|
-
let s = new
|
|
3320
|
+
if (r && (n = n.slice().sort(Xr)), this.isEmpty) return n.length ? e.of(n) : this;
|
|
3321
|
+
let s = new ti(this, null, -1).goto(0), c = 0, l = [], u = new $r();
|
|
3331
3322
|
for (; s.value || c < n.length;) if (c < n.length && (s.from - n[c].from || s.startSide - n[c].value.startSide) >= 0) {
|
|
3332
3323
|
let e = n[c++];
|
|
3333
3324
|
u.addInner(e.from, e.to, e.value) || l.push(e);
|
|
3334
|
-
} else s.rangeIndex == 1 && s.chunkIndex < this.chunk.length && (c == n.length || this.chunkEnd(s.chunkIndex) < n[c].from) && (!o || i > this.chunkEnd(s.chunkIndex) || a < this.chunkPos[s.chunkIndex]) && u.addChunk(this.chunkPos[s.chunkIndex], this.chunk[s.chunkIndex]) ? s.nextChunk() : ((!o || i > s.to || a < s.from || o(s.from, s.to, s.value)) && (u.addInner(s.from, s.to, s.value) || l.push(
|
|
3325
|
+
} else s.rangeIndex == 1 && s.chunkIndex < this.chunk.length && (c == n.length || this.chunkEnd(s.chunkIndex) < n[c].from) && (!o || i > this.chunkEnd(s.chunkIndex) || a < this.chunkPos[s.chunkIndex]) && u.addChunk(this.chunkPos[s.chunkIndex], this.chunk[s.chunkIndex]) ? s.nextChunk() : ((!o || i > s.to || a < s.from || o(s.from, s.to, s.value)) && (u.addInner(s.from, s.to, s.value) || l.push(Yr.create(s.from, s.to, s.value))), s.next());
|
|
3335
3326
|
return u.finishInner(this.nextLayer.isEmpty && !l.length ? e.empty : this.nextLayer.update({
|
|
3336
3327
|
add: l,
|
|
3337
3328
|
filter: o,
|
|
@@ -3363,32 +3354,32 @@ var Qr = class e {
|
|
|
3363
3354
|
}
|
|
3364
3355
|
}
|
|
3365
3356
|
iter(e = 0) {
|
|
3366
|
-
return
|
|
3357
|
+
return ni.from([this]).goto(e);
|
|
3367
3358
|
}
|
|
3368
3359
|
get isEmpty() {
|
|
3369
3360
|
return this.nextLayer == this;
|
|
3370
3361
|
}
|
|
3371
3362
|
static iter(e, t = 0) {
|
|
3372
|
-
return
|
|
3363
|
+
return ni.from(e).goto(t);
|
|
3373
3364
|
}
|
|
3374
3365
|
static compare(e, t, n, r, i = -1) {
|
|
3375
|
-
let a = e.filter((e) => e.maxPoint > 0 || !e.isEmpty && e.maxPoint >= i), o = t.filter((e) => e.maxPoint > 0 || !e.isEmpty && e.maxPoint >= i), s =
|
|
3376
|
-
n.iterGaps((e, t, n) =>
|
|
3366
|
+
let a = e.filter((e) => e.maxPoint > 0 || !e.isEmpty && e.maxPoint >= i), o = t.filter((e) => e.maxPoint > 0 || !e.isEmpty && e.maxPoint >= i), s = ei(a, o, n), c = new ii(a, s, i), l = new ii(o, s, i);
|
|
3367
|
+
n.iterGaps((e, t, n) => ai(c, e, l, t, n, r)), n.empty && n.length == 0 && ai(c, 0, l, 0, 0, r);
|
|
3377
3368
|
}
|
|
3378
3369
|
static eq(e, t, n = 0, r) {
|
|
3379
3370
|
r ??= 999999999;
|
|
3380
3371
|
let i = e.filter((e) => !e.isEmpty && t.indexOf(e) < 0), a = t.filter((t) => !t.isEmpty && e.indexOf(t) < 0);
|
|
3381
3372
|
if (i.length != a.length) return !1;
|
|
3382
3373
|
if (!i.length) return !0;
|
|
3383
|
-
let o =
|
|
3374
|
+
let o = ei(i, a), s = new ii(i, o, 0).goto(n), c = new ii(a, o, 0).goto(n);
|
|
3384
3375
|
for (;;) {
|
|
3385
|
-
if (s.to != c.to || !
|
|
3376
|
+
if (s.to != c.to || !oi(s.active, c.active) || s.point && (!c.point || !Jr(s.point, c.point))) return !1;
|
|
3386
3377
|
if (s.to > r) return !0;
|
|
3387
3378
|
s.next(), c.next();
|
|
3388
3379
|
}
|
|
3389
3380
|
}
|
|
3390
3381
|
static spans(e, t, n, r, i = -1) {
|
|
3391
|
-
let a = new
|
|
3382
|
+
let a = new ii(e, null, i).goto(t), o = t, s = a.openStart;
|
|
3392
3383
|
for (;;) {
|
|
3393
3384
|
let e = Math.min(a.to, n);
|
|
3394
3385
|
if (a.point) {
|
|
@@ -3400,8 +3391,8 @@ var Qr = class e {
|
|
|
3400
3391
|
}
|
|
3401
3392
|
}
|
|
3402
3393
|
static of(e, t = !1) {
|
|
3403
|
-
let n = new
|
|
3404
|
-
for (let r of e instanceof
|
|
3394
|
+
let n = new $r();
|
|
3395
|
+
for (let r of e instanceof Yr ? [e] : t ? Qr(e) : e) n.add(r.from, r.to, r.value);
|
|
3405
3396
|
return n.finish();
|
|
3406
3397
|
}
|
|
3407
3398
|
static join(t) {
|
|
@@ -3411,19 +3402,19 @@ var Qr = class e {
|
|
|
3411
3402
|
return n;
|
|
3412
3403
|
}
|
|
3413
3404
|
};
|
|
3414
|
-
|
|
3415
|
-
function
|
|
3405
|
+
V.empty = /* @__PURE__ */ new V([], [], null, -1);
|
|
3406
|
+
function Qr(e) {
|
|
3416
3407
|
if (e.length > 1) for (let t = e[0], n = 1; n < e.length; n++) {
|
|
3417
3408
|
let r = e[n];
|
|
3418
|
-
if (
|
|
3409
|
+
if (Xr(t, r) > 0) return e.slice().sort(Xr);
|
|
3419
3410
|
t = r;
|
|
3420
3411
|
}
|
|
3421
3412
|
return e;
|
|
3422
3413
|
}
|
|
3423
|
-
|
|
3424
|
-
var
|
|
3414
|
+
V.empty.nextLayer = V.empty;
|
|
3415
|
+
var $r = class e {
|
|
3425
3416
|
finishChunk(e) {
|
|
3426
|
-
this.chunks.push(new
|
|
3417
|
+
this.chunks.push(new Zr(this.from, this.to, this.value, this.maxPoint)), this.chunkPos.push(this.chunkStart), this.chunkStart = -1, this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint), this.maxPoint = -1, e && (this.from = [], this.to = [], this.value = []);
|
|
3427
3418
|
}
|
|
3428
3419
|
constructor() {
|
|
3429
3420
|
this.chunks = [], this.chunkPos = [], this.chunkStart = -1, this.last = null, this.lastFrom = -1e9, this.lastTo = -1e9, this.from = [], this.to = [], this.value = [], this.maxPoint = -1, this.setMaxPoint = -1, this.nextLayer = null;
|
|
@@ -3443,15 +3434,15 @@ var ei = class e {
|
|
|
3443
3434
|
return this.last = t.value[n], this.lastFrom = t.from[n] + e, this.lastTo = t.to[n] + e, !0;
|
|
3444
3435
|
}
|
|
3445
3436
|
finish() {
|
|
3446
|
-
return this.finishInner(
|
|
3437
|
+
return this.finishInner(V.empty);
|
|
3447
3438
|
}
|
|
3448
3439
|
finishInner(e) {
|
|
3449
3440
|
if (this.from.length && this.finishChunk(!1), this.chunks.length == 0) return e;
|
|
3450
|
-
let t =
|
|
3441
|
+
let t = V.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(e) : e, this.setMaxPoint);
|
|
3451
3442
|
return this.from = null, t;
|
|
3452
3443
|
}
|
|
3453
3444
|
};
|
|
3454
|
-
function
|
|
3445
|
+
function ei(e, t, n) {
|
|
3455
3446
|
let r = /* @__PURE__ */ new Map();
|
|
3456
3447
|
for (let t of e) for (let e = 0; e < t.chunk.length; e++) t.chunk[e].maxPoint <= 0 && r.set(t.chunk[e], t.chunkPos[e]);
|
|
3457
3448
|
let i = /* @__PURE__ */ new Set();
|
|
@@ -3461,7 +3452,7 @@ function ti(e, t, n) {
|
|
|
3461
3452
|
}
|
|
3462
3453
|
return i;
|
|
3463
3454
|
}
|
|
3464
|
-
var
|
|
3455
|
+
var ti = class {
|
|
3465
3456
|
constructor(e, t, n, r = 0) {
|
|
3466
3457
|
this.layer = e, this.skip = t, this.minPoint = n, this.rank = r;
|
|
3467
3458
|
}
|
|
@@ -3510,13 +3501,13 @@ var ni = class {
|
|
|
3510
3501
|
compare(e) {
|
|
3511
3502
|
return this.from - e.from || this.startSide - e.startSide || this.rank - e.rank || this.to - e.to || this.endSide - e.endSide;
|
|
3512
3503
|
}
|
|
3513
|
-
},
|
|
3504
|
+
}, ni = class e {
|
|
3514
3505
|
constructor(e) {
|
|
3515
3506
|
this.heap = e;
|
|
3516
3507
|
}
|
|
3517
3508
|
static from(t, n = null, r = -1) {
|
|
3518
3509
|
let i = [];
|
|
3519
|
-
for (let e = 0; e < t.length; e++) for (let a = t[e]; !a.isEmpty; a = a.nextLayer) a.maxPoint >= r && i.push(new
|
|
3510
|
+
for (let e = 0; e < t.length; e++) for (let a = t[e]; !a.isEmpty; a = a.nextLayer) a.maxPoint >= r && i.push(new ti(a, n, r, e));
|
|
3520
3511
|
return i.length == 1 ? i[0] : new e(i);
|
|
3521
3512
|
}
|
|
3522
3513
|
get startSide() {
|
|
@@ -3524,23 +3515,23 @@ var ni = class {
|
|
|
3524
3515
|
}
|
|
3525
3516
|
goto(e, t = -1e9) {
|
|
3526
3517
|
for (let n of this.heap) n.goto(e, t);
|
|
3527
|
-
for (let e = this.heap.length >> 1; e >= 0; e--)
|
|
3518
|
+
for (let e = this.heap.length >> 1; e >= 0; e--) ri(this.heap, e);
|
|
3528
3519
|
return this.next(), this;
|
|
3529
3520
|
}
|
|
3530
3521
|
forward(e, t) {
|
|
3531
3522
|
for (let n of this.heap) n.forward(e, t);
|
|
3532
|
-
for (let e = this.heap.length >> 1; e >= 0; e--)
|
|
3523
|
+
for (let e = this.heap.length >> 1; e >= 0; e--) ri(this.heap, e);
|
|
3533
3524
|
(this.to - e || this.value.endSide - t) < 0 && this.next();
|
|
3534
3525
|
}
|
|
3535
3526
|
next() {
|
|
3536
3527
|
if (this.heap.length == 0) this.from = this.to = 1e9, this.value = null, this.rank = -1;
|
|
3537
3528
|
else {
|
|
3538
3529
|
let e = this.heap[0];
|
|
3539
|
-
this.from = e.from, this.to = e.to, this.value = e.value, this.rank = e.rank, e.value && e.next(),
|
|
3530
|
+
this.from = e.from, this.to = e.to, this.value = e.value, this.rank = e.rank, e.value && e.next(), ri(this.heap, 0);
|
|
3540
3531
|
}
|
|
3541
3532
|
}
|
|
3542
3533
|
};
|
|
3543
|
-
function
|
|
3534
|
+
function ri(e, t) {
|
|
3544
3535
|
for (let n = e[t];;) {
|
|
3545
3536
|
let r = (t << 1) + 1;
|
|
3546
3537
|
if (r >= e.length) break;
|
|
@@ -3549,9 +3540,9 @@ function ii(e, t) {
|
|
|
3549
3540
|
e[r] = n, e[t] = i, t = r;
|
|
3550
3541
|
}
|
|
3551
3542
|
}
|
|
3552
|
-
var
|
|
3543
|
+
var ii = class {
|
|
3553
3544
|
constructor(e, t, n) {
|
|
3554
|
-
this.minPoint = n, this.active = [], this.activeTo = [], this.activeRank = [], this.minActive = -1, this.point = null, this.pointFrom = 0, this.pointRank = 0, this.to = -1e9, this.endSide = 0, this.openStart = -1, this.cursor =
|
|
3545
|
+
this.minPoint = n, this.active = [], this.activeTo = [], this.activeRank = [], this.minActive = -1, this.point = null, this.pointFrom = 0, this.pointRank = 0, this.to = -1e9, this.endSide = 0, this.openStart = -1, this.cursor = ni.from(e, t, n);
|
|
3555
3546
|
}
|
|
3556
3547
|
goto(e, t = -1e9) {
|
|
3557
3548
|
return this.cursor.goto(e, t), this.active.length = this.activeTo.length = this.activeRank.length = 0, this.minActive = -1, this.to = e, this.endSide = t, this.openStart = -1, this.next(), this;
|
|
@@ -3561,12 +3552,12 @@ var ai = class {
|
|
|
3561
3552
|
this.cursor.forward(e, t);
|
|
3562
3553
|
}
|
|
3563
3554
|
removeActive(e) {
|
|
3564
|
-
|
|
3555
|
+
si(this.active, e), si(this.activeTo, e), si(this.activeRank, e), this.minActive = li(this.active, this.activeTo);
|
|
3565
3556
|
}
|
|
3566
3557
|
addActive(e) {
|
|
3567
3558
|
let t = 0, { value: n, to: r, rank: i } = this.cursor;
|
|
3568
3559
|
for (; t < this.activeRank.length && (i - this.activeRank[t] || r - this.activeTo[t]) > 0;) t++;
|
|
3569
|
-
|
|
3560
|
+
ci(this.active, t, n), ci(this.activeTo, t, r), ci(this.activeRank, t, i), e && ci(e, t, this.cursor.from), this.minActive = li(this.active, this.activeTo);
|
|
3570
3561
|
}
|
|
3571
3562
|
next() {
|
|
3572
3563
|
let e = this.to, t = this.point;
|
|
@@ -3579,7 +3570,7 @@ var ai = class {
|
|
|
3579
3570
|
this.to = this.activeTo[r], this.endSide = this.active[r].endSide;
|
|
3580
3571
|
break;
|
|
3581
3572
|
}
|
|
3582
|
-
this.removeActive(r), n &&
|
|
3573
|
+
this.removeActive(r), n && si(n, r);
|
|
3583
3574
|
} else if (!this.cursor.value) {
|
|
3584
3575
|
this.to = this.endSide = 1e9;
|
|
3585
3576
|
break;
|
|
@@ -3613,39 +3604,39 @@ var ai = class {
|
|
|
3613
3604
|
return t;
|
|
3614
3605
|
}
|
|
3615
3606
|
};
|
|
3616
|
-
function
|
|
3607
|
+
function ai(e, t, n, r, i, a) {
|
|
3617
3608
|
e.goto(t), n.goto(r);
|
|
3618
3609
|
let o = r + i, s = r, c = r - t, l = !!a.boundChange;
|
|
3619
3610
|
for (let t = !1;;) {
|
|
3620
3611
|
let r = e.to + c - n.to, i = r || e.endSide - n.endSide, u = i < 0 ? e.to + c : n.to, d = Math.min(u, o);
|
|
3621
|
-
if (e.point || n.point ? (e.point && n.point &&
|
|
3612
|
+
if (e.point || n.point ? (e.point && n.point && Jr(e.point, n.point) && oi(e.activeForPoint(e.to), n.activeForPoint(n.to)) || a.comparePoint(s, d, e.point, n.point), t = !1) : (t && a.boundChange(s), d > s && !oi(e.active, n.active) && a.compareRange(s, d, e.active, n.active), l && d < o && (r || e.openEnd(u) != n.openEnd(u)) && (t = !0)), u > o) break;
|
|
3622
3613
|
s = u, i <= 0 && e.next(), i >= 0 && n.next();
|
|
3623
3614
|
}
|
|
3624
3615
|
}
|
|
3625
|
-
function
|
|
3616
|
+
function oi(e, t) {
|
|
3626
3617
|
if (e.length != t.length) return !1;
|
|
3627
|
-
for (let n = 0; n < e.length; n++) if (e[n] != t[n] && !
|
|
3618
|
+
for (let n = 0; n < e.length; n++) if (e[n] != t[n] && !Jr(e[n], t[n])) return !1;
|
|
3628
3619
|
return !0;
|
|
3629
3620
|
}
|
|
3630
|
-
function
|
|
3621
|
+
function si(e, t) {
|
|
3631
3622
|
for (let n = t, r = e.length - 1; n < r; n++) e[n] = e[n + 1];
|
|
3632
3623
|
e.pop();
|
|
3633
3624
|
}
|
|
3634
|
-
function
|
|
3625
|
+
function ci(e, t, n) {
|
|
3635
3626
|
for (let n = e.length - 1; n >= t; n--) e[n + 1] = e[n];
|
|
3636
3627
|
e[t] = n;
|
|
3637
3628
|
}
|
|
3638
|
-
function
|
|
3629
|
+
function li(e, t) {
|
|
3639
3630
|
let n = -1, r = 1e9;
|
|
3640
3631
|
for (let i = 0; i < t.length; i++) (t[i] - r || e[i].endSide - e[n].endSide) < 0 && (n = i, r = t[i]);
|
|
3641
3632
|
return n;
|
|
3642
3633
|
}
|
|
3643
|
-
function
|
|
3634
|
+
function ui(e, t, n = e.length) {
|
|
3644
3635
|
let r = 0;
|
|
3645
3636
|
for (let i = 0; i < n && i < e.length;) e.charCodeAt(i) == 9 ? (r += t - r % t, i++) : (r++, i = F(e, i));
|
|
3646
3637
|
return r;
|
|
3647
3638
|
}
|
|
3648
|
-
function
|
|
3639
|
+
function di(e, t, n, r) {
|
|
3649
3640
|
for (let r = 0, i = 0;;) {
|
|
3650
3641
|
if (i >= t) return r;
|
|
3651
3642
|
if (r == e.length) break;
|
|
@@ -3653,7 +3644,7 @@ function fi(e, t, n, r) {
|
|
|
3653
3644
|
}
|
|
3654
3645
|
return r === !0 ? -1 : e.length;
|
|
3655
3646
|
}
|
|
3656
|
-
for (var
|
|
3647
|
+
for (var fi = "ͼ", pi = typeof Symbol > "u" ? "__" + fi : Symbol.for(fi), mi = typeof Symbol > "u" ? "__styleSet" + Math.floor(Math.random() * 1e8) : Symbol("styleSet"), hi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : {}, gi = class {
|
|
3657
3648
|
constructor(e, t) {
|
|
3658
3649
|
this.rules = [];
|
|
3659
3650
|
let { finish: n } = t || {};
|
|
@@ -3679,22 +3670,22 @@ for (var pi = "ͼ", mi = typeof Symbol > "u" ? "__" + pi : Symbol.for(pi), hi =
|
|
|
3679
3670
|
return this.rules.join("\n");
|
|
3680
3671
|
}
|
|
3681
3672
|
static newName() {
|
|
3682
|
-
let e =
|
|
3683
|
-
return
|
|
3673
|
+
let e = hi[pi] || 1;
|
|
3674
|
+
return hi[pi] = e + 1, fi + e.toString(36);
|
|
3684
3675
|
}
|
|
3685
3676
|
static mount(e, t, n) {
|
|
3686
|
-
let r = e[
|
|
3687
|
-
r ? i && r.setNonce(i) : r = new
|
|
3677
|
+
let r = e[mi], i = n && n.nonce;
|
|
3678
|
+
r ? i && r.setNonce(i) : r = new vi(e, i), r.mount(Array.isArray(t) ? t : [t], e);
|
|
3688
3679
|
}
|
|
3689
|
-
},
|
|
3680
|
+
}, _i = /* @__PURE__ */ new Map(), vi = class {
|
|
3690
3681
|
constructor(e, t) {
|
|
3691
3682
|
let n = e.ownerDocument || e, r = n.defaultView;
|
|
3692
3683
|
if (!e.head && e.adoptedStyleSheets && r.CSSStyleSheet) {
|
|
3693
|
-
let t =
|
|
3694
|
-
if (t) return e[
|
|
3695
|
-
this.sheet = new r.CSSStyleSheet(),
|
|
3684
|
+
let t = _i.get(n);
|
|
3685
|
+
if (t) return e[mi] = t;
|
|
3686
|
+
this.sheet = new r.CSSStyleSheet(), _i.set(n, this);
|
|
3696
3687
|
} else this.styleTag = n.createElement("style"), t && this.styleTag.setAttribute("nonce", t);
|
|
3697
|
-
this.modules = [], e[
|
|
3688
|
+
this.modules = [], e[mi] = this;
|
|
3698
3689
|
}
|
|
3699
3690
|
mount(e, t) {
|
|
3700
3691
|
let n = this.sheet, r = 0, i = 0;
|
|
@@ -3719,7 +3710,7 @@ for (var pi = "ͼ", mi = typeof Symbol > "u" ? "__" + pi : Symbol.for(pi), hi =
|
|
|
3719
3710
|
setNonce(e) {
|
|
3720
3711
|
this.styleTag && this.styleTag.getAttribute("nonce") != e && this.styleTag.setAttribute("nonce", e);
|
|
3721
3712
|
}
|
|
3722
|
-
},
|
|
3713
|
+
}, yi = {
|
|
3723
3714
|
8: "Backspace",
|
|
3724
3715
|
9: "Tab",
|
|
3725
3716
|
10: "Enter",
|
|
@@ -3772,7 +3763,7 @@ for (var pi = "ͼ", mi = typeof Symbol > "u" ? "__" + pi : Symbol.for(pi), hi =
|
|
|
3772
3763
|
220: "\\",
|
|
3773
3764
|
221: "]",
|
|
3774
3765
|
222: "'"
|
|
3775
|
-
},
|
|
3766
|
+
}, bi = {
|
|
3776
3767
|
48: ")",
|
|
3777
3768
|
49: "!",
|
|
3778
3769
|
50: "@",
|
|
@@ -3797,52 +3788,52 @@ for (var pi = "ͼ", mi = typeof Symbol > "u" ? "__" + pi : Symbol.for(pi), hi =
|
|
|
3797
3788
|
220: "|",
|
|
3798
3789
|
221: "}",
|
|
3799
3790
|
222: "\""
|
|
3800
|
-
},
|
|
3801
|
-
for (var
|
|
3802
|
-
for (var
|
|
3803
|
-
for (var
|
|
3804
|
-
function
|
|
3805
|
-
var t = !(
|
|
3791
|
+
}, xi = typeof navigator < "u" && /Mac/.test(navigator.platform), Si = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent), Ci = 0; Ci < 10; Ci++) yi[48 + Ci] = yi[96 + Ci] = String(Ci);
|
|
3792
|
+
for (var Ci = 1; Ci <= 24; Ci++) yi[Ci + 111] = "F" + Ci;
|
|
3793
|
+
for (var Ci = 65; Ci <= 90; Ci++) yi[Ci] = String.fromCharCode(Ci + 32), bi[Ci] = String.fromCharCode(Ci);
|
|
3794
|
+
for (var wi in yi) bi.hasOwnProperty(wi) || (bi[wi] = yi[wi]);
|
|
3795
|
+
function Ti(e) {
|
|
3796
|
+
var t = !(xi && e.metaKey && e.shiftKey && !e.ctrlKey && !e.altKey || Si && e.shiftKey && e.key && e.key.length == 1 || e.key == "Unidentified") && e.key || (e.shiftKey ? bi : yi)[e.keyCode] || e.key || "Unidentified";
|
|
3806
3797
|
return t == "Esc" && (t = "Escape"), t == "Del" && (t = "Delete"), t == "Left" && (t = "ArrowLeft"), t == "Up" && (t = "ArrowUp"), t == "Right" && (t = "ArrowRight"), t == "Down" && (t = "ArrowDown"), t;
|
|
3807
3798
|
}
|
|
3808
3799
|
//#endregion
|
|
3809
3800
|
//#region node_modules/.pnpm/@codemirror+view@6.43.0/node_modules/@codemirror/view/dist/index.js
|
|
3810
|
-
var
|
|
3801
|
+
var Ei = typeof navigator < "u" ? navigator : {
|
|
3811
3802
|
userAgent: "",
|
|
3812
3803
|
vendor: "",
|
|
3813
3804
|
platform: ""
|
|
3814
|
-
},
|
|
3815
|
-
mac:
|
|
3816
|
-
windows: /* @__PURE__ */ /Win/.test(
|
|
3817
|
-
linux: /* @__PURE__ */ /Linux|X11/.test(
|
|
3818
|
-
ie:
|
|
3819
|
-
ie_version:
|
|
3820
|
-
gecko:
|
|
3821
|
-
gecko_version:
|
|
3822
|
-
chrome: !!
|
|
3823
|
-
chrome_version:
|
|
3824
|
-
ios:
|
|
3825
|
-
android: /* @__PURE__ */ /Android\b/.test(
|
|
3826
|
-
webkit:
|
|
3827
|
-
webkit_version:
|
|
3828
|
-
safari:
|
|
3829
|
-
safari_version:
|
|
3830
|
-
tabSize:
|
|
3805
|
+
}, Di = typeof document < "u" ? document : { documentElement: { style: {} } }, Oi = /* @__PURE__ */ /Edge\/(\d+)/.exec(Ei.userAgent), ki = /* @__PURE__ */ /MSIE \d/.test(Ei.userAgent), Ai = /* @__PURE__ */ /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ei.userAgent), ji = !!(ki || Ai || Oi), Mi = !ji && /* @__PURE__ */ /gecko\/(\d+)/i.test(Ei.userAgent), Ni = !ji && /* @__PURE__ */ /Chrome\/(\d+)/.exec(Ei.userAgent), Pi = "webkitFontSmoothing" in Di.documentElement.style, Fi = !ji && /* @__PURE__ */ /Apple Computer/.test(Ei.vendor), Ii = Fi && (/* @__PURE__ */ /Mobile\/\w+/.test(Ei.userAgent) || Ei.maxTouchPoints > 2), H = {
|
|
3806
|
+
mac: Ii || /* @__PURE__ */ /Mac/.test(Ei.platform),
|
|
3807
|
+
windows: /* @__PURE__ */ /Win/.test(Ei.platform),
|
|
3808
|
+
linux: /* @__PURE__ */ /Linux|X11/.test(Ei.platform),
|
|
3809
|
+
ie: ji,
|
|
3810
|
+
ie_version: ki ? Di.documentMode || 6 : Ai ? +Ai[1] : Oi ? +Oi[1] : 0,
|
|
3811
|
+
gecko: Mi,
|
|
3812
|
+
gecko_version: Mi ? +(/* @__PURE__ */ /Firefox\/(\d+)/.exec(Ei.userAgent) || [0, 0])[1] : 0,
|
|
3813
|
+
chrome: !!Ni,
|
|
3814
|
+
chrome_version: Ni ? +Ni[1] : 0,
|
|
3815
|
+
ios: Ii,
|
|
3816
|
+
android: /* @__PURE__ */ /Android\b/.test(Ei.userAgent),
|
|
3817
|
+
webkit: Pi,
|
|
3818
|
+
webkit_version: Pi ? +(/* @__PURE__ */ /\bAppleWebKit\/(\d+)/.exec(Ei.userAgent) || [0, 0])[1] : 0,
|
|
3819
|
+
safari: Fi,
|
|
3820
|
+
safari_version: Fi ? +(/* @__PURE__ */ /\bVersion\/(\d+(\.\d+)?)/.exec(Ei.userAgent) || [0, 0])[1] : 0,
|
|
3821
|
+
tabSize: Di.documentElement.style.tabSize == null ? "-moz-tab-size" : "tab-size"
|
|
3831
3822
|
};
|
|
3832
|
-
function
|
|
3823
|
+
function Li(e, t) {
|
|
3833
3824
|
for (let n in e) n == "class" && t.class ? t.class += " " + e.class : n == "style" && t.style ? t.style += ";" + e.style : t[n] = e[n];
|
|
3834
3825
|
return t;
|
|
3835
3826
|
}
|
|
3836
|
-
var
|
|
3837
|
-
function
|
|
3827
|
+
var Ri = /* @__PURE__ */ Object.create(null);
|
|
3828
|
+
function zi(e, t, n) {
|
|
3838
3829
|
if (e == t) return !0;
|
|
3839
|
-
e ||=
|
|
3830
|
+
e ||= Ri, t ||= Ri;
|
|
3840
3831
|
let r = Object.keys(e), i = Object.keys(t);
|
|
3841
3832
|
if (r.length - (n && r.indexOf(n) > -1 ? 1 : 0) != i.length - (n && i.indexOf(n) > -1 ? 1 : 0)) return !1;
|
|
3842
3833
|
for (let a of r) if (a != n && (i.indexOf(a) == -1 || e[a] !== t[a])) return !1;
|
|
3843
3834
|
return !0;
|
|
3844
3835
|
}
|
|
3845
|
-
function
|
|
3836
|
+
function Bi(e, t) {
|
|
3846
3837
|
for (let n = e.attributes.length - 1; n >= 0; n--) {
|
|
3847
3838
|
let r = e.attributes[n].name;
|
|
3848
3839
|
t[r] ?? e.removeAttribute(r);
|
|
@@ -3852,13 +3843,13 @@ function Vi(e, t) {
|
|
|
3852
3843
|
n == "style" ? e.style.cssText = r : e.getAttribute(n) != r && e.setAttribute(n, r);
|
|
3853
3844
|
}
|
|
3854
3845
|
}
|
|
3855
|
-
function
|
|
3846
|
+
function Vi(e, t, n) {
|
|
3856
3847
|
let r = !1;
|
|
3857
3848
|
if (t) for (let i in t) n && i in n || (r = !0, i == "style" ? e.style.cssText = "" : e.removeAttribute(i));
|
|
3858
3849
|
if (n) for (let i in n) t && t[i] == n[i] || (r = !0, i == "style" ? e.style.cssText = n[i] : e.setAttribute(i, n[i]));
|
|
3859
3850
|
return r;
|
|
3860
3851
|
}
|
|
3861
|
-
function
|
|
3852
|
+
function Hi(e) {
|
|
3862
3853
|
let t = Object.create(null);
|
|
3863
3854
|
for (let n = 0; n < e.attributes.length; n++) {
|
|
3864
3855
|
let r = e.attributes[n];
|
|
@@ -3866,7 +3857,7 @@ function Ui(e) {
|
|
|
3866
3857
|
}
|
|
3867
3858
|
return t;
|
|
3868
3859
|
}
|
|
3869
|
-
var
|
|
3860
|
+
var Ui = class {
|
|
3870
3861
|
eq(e) {
|
|
3871
3862
|
return !1;
|
|
3872
3863
|
}
|
|
@@ -3895,9 +3886,9 @@ var Wi = class {
|
|
|
3895
3886
|
return !1;
|
|
3896
3887
|
}
|
|
3897
3888
|
destroy(e) {}
|
|
3898
|
-
},
|
|
3889
|
+
}, Wi = /* @__PURE__ */ (function(e) {
|
|
3899
3890
|
return e[e.Text = 0] = "Text", e[e.WidgetBefore = 1] = "WidgetBefore", e[e.WidgetAfter = 2] = "WidgetAfter", e[e.WidgetRange = 3] = "WidgetRange", e;
|
|
3900
|
-
})(
|
|
3891
|
+
})(Wi ||= {}), U = class extends qr {
|
|
3901
3892
|
constructor(e, t, n, r) {
|
|
3902
3893
|
super(), this.startSide = e, this.endSide = t, this.widget = n, this.spec = r;
|
|
3903
3894
|
}
|
|
@@ -3924,20 +3915,20 @@ var Wi = class {
|
|
|
3924
3915
|
return new Ki(e);
|
|
3925
3916
|
}
|
|
3926
3917
|
static set(e, t = !1) {
|
|
3927
|
-
return
|
|
3918
|
+
return V.of(e, t);
|
|
3928
3919
|
}
|
|
3929
3920
|
hasHeight() {
|
|
3930
3921
|
return this.widget ? this.widget.estimatedHeight > -1 : !1;
|
|
3931
3922
|
}
|
|
3932
3923
|
};
|
|
3933
|
-
U.none =
|
|
3924
|
+
U.none = V.empty;
|
|
3934
3925
|
var Gi = class e extends U {
|
|
3935
3926
|
constructor(e) {
|
|
3936
3927
|
let { start: t, end: n } = Ji(e);
|
|
3937
|
-
super(t ? -1 : 5e8, n ? 1 : -6e8, null, e), this.tagName = e.tagName || "span", this.attrs = e.class && e.attributes ?
|
|
3928
|
+
super(t ? -1 : 5e8, n ? 1 : -6e8, null, e), this.tagName = e.tagName || "span", this.attrs = e.class && e.attributes ? Li(e.attributes, { class: e.class }) : e.class ? { class: e.class } : e.attributes || Ri;
|
|
3938
3929
|
}
|
|
3939
3930
|
eq(t) {
|
|
3940
|
-
return this == t || t instanceof e && this.tagName == t.tagName &&
|
|
3931
|
+
return this == t || t instanceof e && this.tagName == t.tagName && zi(this.attrs, t.attrs);
|
|
3941
3932
|
}
|
|
3942
3933
|
range(e, t = e) {
|
|
3943
3934
|
if (e >= t) throw RangeError("Mark decorations may not be empty");
|
|
@@ -3950,7 +3941,7 @@ var Ki = class e extends U {
|
|
|
3950
3941
|
super(-2e8, -2e8, null, e);
|
|
3951
3942
|
}
|
|
3952
3943
|
eq(t) {
|
|
3953
|
-
return t instanceof e && this.spec.class == t.spec.class &&
|
|
3944
|
+
return t instanceof e && this.spec.class == t.spec.class && zi(this.spec.attributes, t.spec.attributes);
|
|
3954
3945
|
}
|
|
3955
3946
|
range(e, t = e) {
|
|
3956
3947
|
if (t != e) throw RangeError("Line decoration ranges must be zero-length");
|
|
@@ -3963,7 +3954,7 @@ var qi = class e extends U {
|
|
|
3963
3954
|
super(t, n, i, e), this.block = r, this.isReplace = a, this.mapMode = r ? t <= 0 ? Jn.TrackBefore : Jn.TrackAfter : Jn.TrackDel;
|
|
3964
3955
|
}
|
|
3965
3956
|
get type() {
|
|
3966
|
-
return this.startSide == this.endSide ? this.startSide <= 0 ?
|
|
3957
|
+
return this.startSide == this.endSide ? this.startSide <= 0 ? Wi.WidgetBefore : Wi.WidgetAfter : Wi.WidgetRange;
|
|
3967
3958
|
}
|
|
3968
3959
|
get heightRelevant() {
|
|
3969
3960
|
return this.block || !!this.widget && (this.widget.estimatedHeight >= 5 || this.widget.lineBreaks > 0);
|
|
@@ -3992,18 +3983,18 @@ function Xi(e, t, n, r = 0) {
|
|
|
3992
3983
|
let i = n.length - 1;
|
|
3993
3984
|
i >= 0 && n[i] + r >= e ? n[i] = Math.max(n[i], t) : n.push(e, t);
|
|
3994
3985
|
}
|
|
3995
|
-
var Zi = class e extends
|
|
3986
|
+
var Zi = class e extends qr {
|
|
3996
3987
|
constructor(e, t, n) {
|
|
3997
3988
|
super(), this.tagName = e, this.attributes = t, this.rank = n;
|
|
3998
3989
|
}
|
|
3999
3990
|
eq(t) {
|
|
4000
|
-
return t == this || t instanceof e && this.tagName == t.tagName &&
|
|
3991
|
+
return t == this || t instanceof e && this.tagName == t.tagName && zi(this.attributes, t.attributes);
|
|
4001
3992
|
}
|
|
4002
3993
|
static create(t) {
|
|
4003
|
-
return new e(t.tagName, t.attributes ||
|
|
3994
|
+
return new e(t.tagName, t.attributes || Ri, t.rank == null ? 50 : Math.max(0, Math.min(t.rank, 100)));
|
|
4004
3995
|
}
|
|
4005
3996
|
static set(e, t = !1) {
|
|
4006
|
-
return
|
|
3997
|
+
return V.of(e, t);
|
|
4007
3998
|
}
|
|
4008
3999
|
};
|
|
4009
4000
|
Zi.prototype.startSide = Zi.prototype.endSide = -1;
|
|
@@ -4158,7 +4149,7 @@ var fa = class {
|
|
|
4158
4149
|
this.anchorNode = e, this.anchorOffset = t, this.focusNode = n, this.focusOffset = r;
|
|
4159
4150
|
}
|
|
4160
4151
|
}, pa = null;
|
|
4161
|
-
|
|
4152
|
+
H.safari && H.safari_version >= 26 && (pa = !1);
|
|
4162
4153
|
function ma(e) {
|
|
4163
4154
|
if (e.setActive) return e.setActive();
|
|
4164
4155
|
if (pa) return e.focus(pa);
|
|
@@ -4437,7 +4428,7 @@ function Ua(e, t, n, r, i) {
|
|
|
4437
4428
|
let l = F(e.text, a, s.forward(i, n));
|
|
4438
4429
|
(l < s.from || l > s.to) && (l = c), Ha = e.text.slice(Math.min(a, l), Math.max(a, l));
|
|
4439
4430
|
let u = o == (i ? t.length - 1 : 0) ? null : t[o + (i ? 1 : -1)];
|
|
4440
|
-
return u && l == c && u.level + +!i < s.level ?
|
|
4431
|
+
return u && l == c && u.level + +!i < s.level ? L.cursor(u.side(!i, n) + e.from, u.forward(i, n) ? 1 : -1, u.level) : L.cursor(l + e.from, s.forward(i, n) ? -1 : 1, s.level);
|
|
4441
4432
|
}
|
|
4442
4433
|
function Wa(e, t, n) {
|
|
4443
4434
|
for (let r = t; r < n; r++) {
|
|
@@ -4447,7 +4438,7 @@ function Wa(e, t, n) {
|
|
|
4447
4438
|
}
|
|
4448
4439
|
return wa;
|
|
4449
4440
|
}
|
|
4450
|
-
var Ga = /* @__PURE__ */
|
|
4441
|
+
var Ga = /* @__PURE__ */ R.define(), Ka = /* @__PURE__ */ R.define(), qa = /* @__PURE__ */ R.define(), Ja = /* @__PURE__ */ R.define(), Ya = /* @__PURE__ */ R.define(), Xa = /* @__PURE__ */ R.define(), Za = /* @__PURE__ */ R.define(), Qa = /* @__PURE__ */ R.define(), $a = /* @__PURE__ */ R.define(), eo = /* @__PURE__ */ R.define({ combine: (e) => e.some((e) => e) }), to = /* @__PURE__ */ R.define({ combine: (e) => e.some((e) => e) }), no = /* @__PURE__ */ R.define(), ro = class e {
|
|
4451
4442
|
constructor(e, t, n, r, i, a = !1) {
|
|
4452
4443
|
this.range = e, this.y = t, this.x = n, this.yMargin = r, this.xMargin = i, this.isSnapshot = a;
|
|
4453
4444
|
}
|
|
@@ -4455,14 +4446,14 @@ var Ga = /* @__PURE__ */ L.define(), Ka = /* @__PURE__ */ L.define(), qa = /* @_
|
|
|
4455
4446
|
return t.empty ? this : new e(this.range.map(t), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot);
|
|
4456
4447
|
}
|
|
4457
4448
|
clip(t) {
|
|
4458
|
-
return this.range.to <= t.doc.length ? this : new e(
|
|
4449
|
+
return this.range.to <= t.doc.length ? this : new e(L.cursor(t.doc.length), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot);
|
|
4459
4450
|
}
|
|
4460
|
-
}, io = /* @__PURE__ */
|
|
4451
|
+
}, io = /* @__PURE__ */ z.define({ map: (e, t) => e.map(t) }), ao = /* @__PURE__ */ z.define();
|
|
4461
4452
|
function oo(e, t, n) {
|
|
4462
4453
|
let r = e.facet(Ja);
|
|
4463
4454
|
r.length ? r[0](t) : window.onerror && window.onerror(String(t), n, void 0, void 0, t) || (n ? console.error(n + ":", t) : console.error(t));
|
|
4464
4455
|
}
|
|
4465
|
-
var so = /* @__PURE__ */
|
|
4456
|
+
var so = /* @__PURE__ */ R.define({ combine: (e) => e.length ? e[0] : !0 }), co = 0, lo = /* @__PURE__ */ R.define({ combine(e) {
|
|
4466
4457
|
return e.filter((t, n) => {
|
|
4467
4458
|
for (let r = 0; r < n; r++) if (e[r].plugin == t.plugin) return !1;
|
|
4468
4459
|
return !0;
|
|
@@ -4530,12 +4521,12 @@ var so = /* @__PURE__ */ L.define({ combine: (e) => e.length ? e[0] : !0 }), co
|
|
|
4530
4521
|
deactivate() {
|
|
4531
4522
|
this.spec = this.value = null;
|
|
4532
4523
|
}
|
|
4533
|
-
}, po = /* @__PURE__ */
|
|
4524
|
+
}, po = /* @__PURE__ */ R.define(), mo = /* @__PURE__ */ R.define(), ho = /* @__PURE__ */ R.define(), go = /* @__PURE__ */ R.define(), _o = /* @__PURE__ */ R.define(), vo = /* @__PURE__ */ R.define(), yo = /* @__PURE__ */ R.define();
|
|
4534
4525
|
function bo(e, t) {
|
|
4535
4526
|
let n = e.state.facet(yo);
|
|
4536
4527
|
if (!n.length) return n;
|
|
4537
4528
|
let r = n.map((t) => t instanceof Function ? t(e) : t), i = [];
|
|
4538
|
-
return
|
|
4529
|
+
return V.spans(r, t.from, t.to, {
|
|
4539
4530
|
point() {},
|
|
4540
4531
|
span(e, n, r, a) {
|
|
4541
4532
|
let o = e - t.from, s = n - t.from, c = i;
|
|
@@ -4555,7 +4546,7 @@ function bo(e, t) {
|
|
|
4555
4546
|
}
|
|
4556
4547
|
}), i;
|
|
4557
4548
|
}
|
|
4558
|
-
var xo = /* @__PURE__ */
|
|
4549
|
+
var xo = /* @__PURE__ */ R.define();
|
|
4559
4550
|
function So(e) {
|
|
4560
4551
|
let t = 0, n = 0, r = 0, i = 0;
|
|
4561
4552
|
for (let a of e.state.facet(xo)) {
|
|
@@ -4569,7 +4560,7 @@ function So(e) {
|
|
|
4569
4560
|
bottom: i
|
|
4570
4561
|
};
|
|
4571
4562
|
}
|
|
4572
|
-
var Co = /* @__PURE__ */
|
|
4563
|
+
var Co = /* @__PURE__ */ R.define(), wo = class e {
|
|
4573
4564
|
constructor(e, t, n, r) {
|
|
4574
4565
|
this.fromA = e, this.toA = t, this.fromB = n, this.toB = r;
|
|
4575
4566
|
}
|
|
@@ -4676,7 +4667,7 @@ var Co = /* @__PURE__ */ L.define(), wo = class e {
|
|
|
4676
4667
|
if (this.flags |= 2, this.flags & 4) {
|
|
4677
4668
|
this.flags &= -5;
|
|
4678
4669
|
let e = this.domAttrs;
|
|
4679
|
-
e &&
|
|
4670
|
+
e && Bi(this.dom, e);
|
|
4680
4671
|
}
|
|
4681
4672
|
}
|
|
4682
4673
|
toString() {
|
|
@@ -4916,11 +4907,11 @@ var Po = class e extends Do {
|
|
|
4916
4907
|
let n = this.dom.nodeValue.length;
|
|
4917
4908
|
e > n && (e = n);
|
|
4918
4909
|
let r = e, i = e, a = 0;
|
|
4919
|
-
e == 0 && t < 0 || e == n && t >= 0 ?
|
|
4910
|
+
e == 0 && t < 0 || e == n && t >= 0 ? H.chrome || H.gecko || (e ? (r--, a = 1) : i < n && (i++, a = -1)) : t < 0 ? r-- : i < n && i++;
|
|
4920
4911
|
let o = ga(this.dom, r, i).getClientRects();
|
|
4921
4912
|
if (!o.length) return null;
|
|
4922
4913
|
let s = o[(a ? a < 0 : t >= 0) ? 0 : o.length - 1];
|
|
4923
|
-
return
|
|
4914
|
+
return H.safari && !a && s.width == 0 && (s = Array.prototype.find.call(o, (e) => e.width) || s), a ? sa(s, a < 0) : s || null;
|
|
4924
4915
|
}
|
|
4925
4916
|
static of(t, n) {
|
|
4926
4917
|
let r = new e(n || document.createTextNode(t), t);
|
|
@@ -5099,7 +5090,7 @@ var Po = class e extends Do {
|
|
|
5099
5090
|
if (this.curLine) {
|
|
5100
5091
|
this.flushBuffer();
|
|
5101
5092
|
let e = this.curLine.lastChild;
|
|
5102
|
-
(!e || !Go(this.curLine, !1) || e.dom.nodeName != "BR" && e.isWidget() && !(
|
|
5093
|
+
(!e || !Go(this.curLine, !1) || e.dom.nodeName != "BR" && e.isWidget() && !(H.ios && Go(this.curLine, !0))) && this.curLine.append(this.cache.findWidget(Qo, 0, 32) || new Io(Qo.toDOM(), 0, Qo, 32)), this.curLine = this.afterWidget = null;
|
|
5103
5094
|
}
|
|
5104
5095
|
}
|
|
5105
5096
|
updateBlockWrappers() {
|
|
@@ -5202,7 +5193,7 @@ var Uo = class {
|
|
|
5202
5193
|
}
|
|
5203
5194
|
}, Wo = class {
|
|
5204
5195
|
constructor(e, t, n, r, i) {
|
|
5205
|
-
this.view = e, this.decorations = r, this.disallowBlockEffectsFor = i, this.openWidget = !1, this.openMarks = 0, this.cache = new Uo(e), this.text = new Vo(e.state.doc), this.builder = new Bo(this.cache, new ko(e, e.contentDOM),
|
|
5196
|
+
this.view = e, this.decorations = r, this.disallowBlockEffectsFor = i, this.openWidget = !1, this.openMarks = 0, this.cache = new Uo(e), this.text = new Vo(e.state.doc), this.builder = new Bo(this.cache, new ko(e, e.contentDOM), V.iter(n)), this.cache.reused.set(t, 2), this.old = new Ro(t), this.reuseWalker = {
|
|
5206
5197
|
skip: (e, t, n) => {
|
|
5207
5198
|
if (this.cache.add(e), e.isComposite()) return !1;
|
|
5208
5199
|
},
|
|
@@ -5252,7 +5243,7 @@ var Uo = class {
|
|
|
5252
5243
|
}), this.text.skip(e);
|
|
5253
5244
|
}
|
|
5254
5245
|
emit(e, t) {
|
|
5255
|
-
let n = null, r = this.builder, i = 0, a =
|
|
5246
|
+
let n = null, r = this.builder, i = 0, a = V.spans(this.decorations, e, t, {
|
|
5256
5247
|
point: (e, t, a, o, s, c) => {
|
|
5257
5248
|
if (a instanceof qi) {
|
|
5258
5249
|
if (this.disallowBlockEffectsFor[c]) {
|
|
@@ -5287,7 +5278,7 @@ var Uo = class {
|
|
|
5287
5278
|
if (r == this.view.contentDOM) break;
|
|
5288
5279
|
e instanceof Po ? t.push(e) : e?.isLine() ? n = e : e instanceof Ao || (r.nodeName == "DIV" && !n && r != this.view.contentDOM ? n = new jo(r, qo) : n || t.push(Po.of(new Gi({
|
|
5289
5280
|
tagName: r.nodeName.toLowerCase(),
|
|
5290
|
-
attributes:
|
|
5281
|
+
attributes: Hi(r)
|
|
5291
5282
|
}), r)));
|
|
5292
5283
|
}
|
|
5293
5284
|
return {
|
|
@@ -5310,7 +5301,7 @@ function Ko(e) {
|
|
|
5310
5301
|
var qo = { class: "cm-line" };
|
|
5311
5302
|
function Jo(e, t) {
|
|
5312
5303
|
let n = t.spec.attributes, r = t.spec.class;
|
|
5313
|
-
return !n && !r ? e : (e ||= { class: "cm-line" }, n &&
|
|
5304
|
+
return !n && !r ? e : (e ||= { class: "cm-line" }, n && Li(n, e), r && (e.class += " " + r), e);
|
|
5314
5305
|
}
|
|
5315
5306
|
function Yo(e) {
|
|
5316
5307
|
let t = [];
|
|
@@ -5324,7 +5315,7 @@ function Xo(e) {
|
|
|
5324
5315
|
let t = K.get(e);
|
|
5325
5316
|
return t && t.setDOM(e.cloneNode()), e;
|
|
5326
5317
|
}
|
|
5327
|
-
var Zo = class extends
|
|
5318
|
+
var Zo = class extends Ui {
|
|
5328
5319
|
constructor(e) {
|
|
5329
5320
|
super(), this.tag = e;
|
|
5330
5321
|
}
|
|
@@ -5342,7 +5333,7 @@ var Zo = class extends Wi {
|
|
|
5342
5333
|
}
|
|
5343
5334
|
};
|
|
5344
5335
|
Zo.inline = /* @__PURE__ */ new Zo("span"), Zo.block = /* @__PURE__ */ new Zo("div");
|
|
5345
|
-
var Qo = /* @__PURE__ */ new class extends
|
|
5336
|
+
var Qo = /* @__PURE__ */ new class extends Ui {
|
|
5346
5337
|
toDOM() {
|
|
5347
5338
|
return document.createElement("br");
|
|
5348
5339
|
}
|
|
@@ -5369,7 +5360,7 @@ var Qo = /* @__PURE__ */ new class extends Wi {
|
|
|
5369
5360
|
this.hasComposition = r ? {
|
|
5370
5361
|
from: r.range.fromB,
|
|
5371
5362
|
to: r.range.toB
|
|
5372
|
-
} : null, (
|
|
5363
|
+
} : null, (H.ie || H.chrome) && !r && e && e.state.doc.lines != e.startState.doc.lines && (this.forceSelection = !0);
|
|
5373
5364
|
let i = this.decorations, a = this.blockWrappers;
|
|
5374
5365
|
this.updateDeco();
|
|
5375
5366
|
let o = os(i, this.decorations, e.changes);
|
|
@@ -5386,7 +5377,7 @@ var Qo = /* @__PURE__ */ new class extends Wi {
|
|
|
5386
5377
|
t && K.get(t.text) && r.cache.reused.set(K.get(t.text), 2), this.tile = r.run(e, t), es(n, r.cache.reused);
|
|
5387
5378
|
}
|
|
5388
5379
|
this.tile.dom.style.height = this.view.viewState.contentHeight / this.view.scaleY + "px", this.tile.dom.style.flexBasis = this.minWidth ? this.minWidth + "px" : "";
|
|
5389
|
-
let r =
|
|
5380
|
+
let r = H.chrome || H.ios ? {
|
|
5390
5381
|
node: n.selectionRange.focusNode,
|
|
5391
5382
|
written: !1
|
|
5392
5383
|
} : void 0;
|
|
@@ -5407,16 +5398,16 @@ var Qo = /* @__PURE__ */ new class extends Wi {
|
|
|
5407
5398
|
let o = this.forceSelection;
|
|
5408
5399
|
this.forceSelection = !1;
|
|
5409
5400
|
let s = this.view.state.selection.main, c, l;
|
|
5410
|
-
if (s.empty ? l = c = this.inlineDOMNearPos(s.anchor, s.assoc || 1) : (l = this.inlineDOMNearPos(s.head, s.head == s.from ? 1 : -1), c = this.inlineDOMNearPos(s.anchor, s.anchor == s.from ? 1 : -1)),
|
|
5401
|
+
if (s.empty ? l = c = this.inlineDOMNearPos(s.anchor, s.assoc || 1) : (l = this.inlineDOMNearPos(s.head, s.head == s.from ? 1 : -1), c = this.inlineDOMNearPos(s.anchor, s.anchor == s.from ? 1 : -1)), H.gecko && s.empty && !this.hasComposition && ts(c)) {
|
|
5411
5402
|
let e = document.createTextNode("");
|
|
5412
5403
|
this.view.observer.ignore(() => c.node.insertBefore(e, c.node.childNodes[c.offset] || null)), c = l = new Ca(e, 0), o = !0;
|
|
5413
5404
|
}
|
|
5414
5405
|
let u = this.view.observer.selectionRange;
|
|
5415
5406
|
(o || !u.focusNode || (!na(c.node, c.offset, u.anchorNode, u.anchorOffset) || !na(l.node, l.offset, u.focusNode, u.focusOffset)) && !this.suppressWidgetCursorChange(u, s)) && (this.view.observer.ignore(() => {
|
|
5416
|
-
|
|
5407
|
+
H.android && H.chrome && n.contains(u.focusNode) && ls(u.focusNode, n) && (n.blur(), n.focus({ preventScroll: !0 }));
|
|
5417
5408
|
let e = Qi(this.view.root);
|
|
5418
5409
|
if (e) if (s.empty) {
|
|
5419
|
-
if (
|
|
5410
|
+
if (H.gecko) {
|
|
5420
5411
|
let e = is(c.node, c.offset);
|
|
5421
5412
|
if (e && e != 3) {
|
|
5422
5413
|
let t = (e == 1 ? xa : Sa)(c.node, c.offset);
|
|
@@ -5602,7 +5593,7 @@ var Qo = /* @__PURE__ */ new class extends Wi {
|
|
|
5602
5593
|
let r = typeof e == "function";
|
|
5603
5594
|
return r && (n = !0), r ? e(this.view) : e;
|
|
5604
5595
|
});
|
|
5605
|
-
for (r.length && (this.dynamicDecorationMap[e++] = n, t.push(
|
|
5596
|
+
for (r.length && (this.dynamicDecorationMap[e++] = n, t.push(V.join(r))), this.decorations = [
|
|
5606
5597
|
this.editContextFormatting,
|
|
5607
5598
|
...t,
|
|
5608
5599
|
this.computeBlockGapDeco(),
|
|
@@ -5708,7 +5699,7 @@ var as = class {
|
|
|
5708
5699
|
};
|
|
5709
5700
|
function os(e, t, n) {
|
|
5710
5701
|
let r = new as();
|
|
5711
|
-
return
|
|
5702
|
+
return V.compare(e, t, n, r), r.changes;
|
|
5712
5703
|
}
|
|
5713
5704
|
var ss = class {
|
|
5714
5705
|
constructor() {
|
|
@@ -5724,7 +5715,7 @@ var ss = class {
|
|
|
5724
5715
|
};
|
|
5725
5716
|
function cs(e, t, n) {
|
|
5726
5717
|
let r = new ss();
|
|
5727
|
-
return
|
|
5718
|
+
return V.compare(e, t, n, r), r.changes;
|
|
5728
5719
|
}
|
|
5729
5720
|
function ls(e, t) {
|
|
5730
5721
|
for (let n = e; n && n != t; n = n.assignedSlot || n.parentNode) if (n.nodeType == 1 && n.contentEditable == "false") return !0;
|
|
@@ -5736,7 +5727,7 @@ function us(e, t) {
|
|
|
5736
5727
|
e < t.to && r > t.from && (n = !0);
|
|
5737
5728
|
}), n;
|
|
5738
5729
|
}
|
|
5739
|
-
var ds = class extends
|
|
5730
|
+
var ds = class extends Ui {
|
|
5740
5731
|
constructor(e) {
|
|
5741
5732
|
super(), this.height = e;
|
|
5742
5733
|
}
|
|
@@ -5762,7 +5753,7 @@ var ds = class extends Wi {
|
|
|
5762
5753
|
};
|
|
5763
5754
|
function fs(e, t, n = 1) {
|
|
5764
5755
|
let r = e.charCategorizer(t), i = e.doc.lineAt(t), a = t - i.from;
|
|
5765
|
-
if (i.length == 0) return
|
|
5756
|
+
if (i.length == 0) return L.cursor(t);
|
|
5766
5757
|
a == 0 ? n = 1 : a == i.length && (n = -1);
|
|
5767
5758
|
let o = a, s = a;
|
|
5768
5759
|
n < 0 ? o = F(i.text, a, !1) : s = F(i.text, a);
|
|
@@ -5777,7 +5768,7 @@ function fs(e, t, n = 1) {
|
|
|
5777
5768
|
if (r(i.text.slice(s, e)) != c) break;
|
|
5778
5769
|
s = e;
|
|
5779
5770
|
}
|
|
5780
|
-
return
|
|
5771
|
+
return L.range(o + i.from, s + i.from);
|
|
5781
5772
|
}
|
|
5782
5773
|
function ps(e, t, n, r, i) {
|
|
5783
5774
|
let a = Math.round((r - t.left) * e.defaultCharacterWidth);
|
|
@@ -5786,7 +5777,7 @@ function ps(e, t, n, r, i) {
|
|
|
5786
5777
|
a += r * e.viewState.heightOracle.lineLength;
|
|
5787
5778
|
}
|
|
5788
5779
|
let o = e.state.sliceDoc(n.from, n.to);
|
|
5789
|
-
return n.from +
|
|
5780
|
+
return n.from + di(o, a, e.state.tabSize);
|
|
5790
5781
|
}
|
|
5791
5782
|
function ms(e, t, n) {
|
|
5792
5783
|
let r = e.lineBlockAt(t);
|
|
@@ -5796,7 +5787,7 @@ function ms(e, t, n) {
|
|
|
5796
5787
|
if (i.from > t) break;
|
|
5797
5788
|
if (!(i.to < t)) {
|
|
5798
5789
|
if (i.from < t && i.to > t) return i;
|
|
5799
|
-
(!e || i.type ==
|
|
5790
|
+
(!e || i.type == Wi.Text && (e.type != i.type || (n < 0 ? i.from < t : i.to > t))) && (e = i);
|
|
5800
5791
|
}
|
|
5801
5792
|
}
|
|
5802
5793
|
return e || r;
|
|
@@ -5804,15 +5795,15 @@ function ms(e, t, n) {
|
|
|
5804
5795
|
return r;
|
|
5805
5796
|
}
|
|
5806
5797
|
function hs(e, t, n, r) {
|
|
5807
|
-
let i = ms(e, t.head, t.assoc || -1), a = !r || i.type !=
|
|
5798
|
+
let i = ms(e, t.head, t.assoc || -1), a = !r || i.type != Wi.Text || !(e.lineWrapping || i.widgetLineBreaks) ? null : e.coordsAtPos(t.assoc < 0 && t.head > i.from ? t.head - 1 : t.head);
|
|
5808
5799
|
if (a) {
|
|
5809
5800
|
let t = e.dom.getBoundingClientRect(), r = e.textDirectionAt(i.from), o = e.posAtCoords({
|
|
5810
5801
|
x: n == (r == W.LTR) ? t.right - 1 : t.left + 1,
|
|
5811
5802
|
y: (a.top + a.bottom) / 2
|
|
5812
5803
|
});
|
|
5813
|
-
if (o != null) return
|
|
5804
|
+
if (o != null) return L.cursor(o, n ? -1 : 1);
|
|
5814
5805
|
}
|
|
5815
|
-
return
|
|
5806
|
+
return L.cursor(n ? i.to : i.from, n ? -1 : 1);
|
|
5816
5807
|
}
|
|
5817
5808
|
function gs(e, t, n, r) {
|
|
5818
5809
|
let i = e.state.doc.lineAt(t.head), a = e.bidiSpans(i), o = e.textDirectionAt(i.from);
|
|
@@ -5833,12 +5824,12 @@ function _s(e, t, n) {
|
|
|
5833
5824
|
let r = e.state.charCategorizer(t), i = r(n);
|
|
5834
5825
|
return (e) => {
|
|
5835
5826
|
let t = r(e);
|
|
5836
|
-
return i ==
|
|
5827
|
+
return i == Vr.Space && (i = t), i == t;
|
|
5837
5828
|
};
|
|
5838
5829
|
}
|
|
5839
5830
|
function vs(e, t, n, r) {
|
|
5840
5831
|
let i = t.head, a = n ? 1 : -1;
|
|
5841
|
-
if (i == (n ? e.state.doc.length : 0)) return
|
|
5832
|
+
if (i == (n ? e.state.doc.length : 0)) return L.cursor(i, t.assoc);
|
|
5842
5833
|
let o = t.goalColumn, s, c = e.contentDOM.getBoundingClientRect(), l = e.coordsAtPos(i, t.assoc || ((t.empty ? n : t.head == t.from) ? 1 : -1)), u = e.documentTop;
|
|
5843
5834
|
if (l) o ??= l.left - c.left, s = a < 0 ? l.top : l.bottom;
|
|
5844
5835
|
else {
|
|
@@ -5851,9 +5842,9 @@ function vs(e, t, n, r) {
|
|
|
5851
5842
|
x: d,
|
|
5852
5843
|
y: r
|
|
5853
5844
|
}, !1, a);
|
|
5854
|
-
if (n ? r > c.bottom : r < c.top) return
|
|
5845
|
+
if (n ? r > c.bottom : r < c.top) return L.cursor(i.pos, i.assoc);
|
|
5855
5846
|
let l = e.coordsAtPos(i.pos, i.assoc), u = l ? (l.top + l.bottom) / 2 : 0;
|
|
5856
|
-
if (!l || (n ? u > s : u < s)) return
|
|
5847
|
+
if (!l || (n ? u > s : u < s)) return L.cursor(i.pos, i.assoc, void 0, o);
|
|
5857
5848
|
}
|
|
5858
5849
|
}
|
|
5859
5850
|
function ys(e, t, n) {
|
|
@@ -5874,18 +5865,18 @@ function bs(e, t) {
|
|
|
5874
5865
|
let i = t.ranges[r], a = null;
|
|
5875
5866
|
if (i.empty) {
|
|
5876
5867
|
let t = ys(e, i.from, 0);
|
|
5877
|
-
t != i.from && (a =
|
|
5868
|
+
t != i.from && (a = L.cursor(t, -1));
|
|
5878
5869
|
} else {
|
|
5879
5870
|
let t = ys(e, i.from, -1), n = ys(e, i.to, 1);
|
|
5880
|
-
(t != i.from || n != i.to) && (a =
|
|
5871
|
+
(t != i.from || n != i.to) && (a = L.range(i.from == i.anchor ? t : n, i.from == i.head ? t : n));
|
|
5881
5872
|
}
|
|
5882
5873
|
a && (n ||= t.ranges.slice(), n[r] = a);
|
|
5883
5874
|
}
|
|
5884
|
-
return n ?
|
|
5875
|
+
return n ? L.create(n, t.mainIndex) : t;
|
|
5885
5876
|
}
|
|
5886
5877
|
function xs(e, t, n) {
|
|
5887
5878
|
let r = ys(e.state.facet(vo).map((t) => t(e)), n.from, t.head > n.from ? -1 : 1);
|
|
5888
|
-
return r == n.from ? n :
|
|
5879
|
+
return r == n.from ? n : L.cursor(r, r < n.from ? 1 : -1);
|
|
5889
5880
|
}
|
|
5890
5881
|
var Ss = class {
|
|
5891
5882
|
constructor(e, t) {
|
|
@@ -5898,7 +5889,7 @@ function Cs(e, t, n, r) {
|
|
|
5898
5889
|
if (c < 0) return new Ss(0, 1);
|
|
5899
5890
|
if (c > e.viewState.docHeight) return new Ss(e.state.doc.length, -1);
|
|
5900
5891
|
if (l = e.elementAtHeight(c), r == null) break;
|
|
5901
|
-
if (l.type ==
|
|
5892
|
+
if (l.type == Wi.Text) {
|
|
5902
5893
|
if (r < 0 ? l.to < e.viewport.from : l.from > e.viewport.to) break;
|
|
5903
5894
|
let t = e.docView.coordsAt(r < 0 ? l.from : l.to, r > 0 ? -1 : 1);
|
|
5904
5895
|
if (t && (r < 0 ? t.top <= c + a : t.bottom >= c + a)) break;
|
|
@@ -5908,12 +5899,12 @@ function Cs(e, t, n, r) {
|
|
|
5908
5899
|
}
|
|
5909
5900
|
if (e.viewport.from >= l.to || e.viewport.to <= l.from) {
|
|
5910
5901
|
if (n) return null;
|
|
5911
|
-
if (l.type ==
|
|
5902
|
+
if (l.type == Wi.Text) {
|
|
5912
5903
|
let t = ps(e, i, l, o, s);
|
|
5913
5904
|
return new Ss(t, t == l.from ? 1 : -1);
|
|
5914
5905
|
}
|
|
5915
5906
|
}
|
|
5916
|
-
if (l.type !=
|
|
5907
|
+
if (l.type != Wi.Text) return c < (l.top + l.bottom) / 2 ? new Ss(l.from, 1) : new Ss(l.to, -1);
|
|
5917
5908
|
let u = e.docView.lineAt(l.from, 2);
|
|
5918
5909
|
return (!u || u.length != l.length) && (u = e.docView.lineAt(l.from, -2)), new ws(e, o, s, e.textDirectionAt(l.from)).scanTile(u, l.from);
|
|
5919
5910
|
}
|
|
@@ -6008,7 +5999,7 @@ var ws = class {
|
|
|
6008
5999
|
}
|
|
6009
6000
|
}, Ts = "", Es = class {
|
|
6010
6001
|
constructor(e, t) {
|
|
6011
|
-
this.points = e, this.view = t, this.text = "", this.lineSeparator = t.state.facet(
|
|
6002
|
+
this.points = e, this.view = t, this.text = "", this.lineSeparator = t.state.facet(B.lineSeparator);
|
|
6012
6003
|
}
|
|
6013
6004
|
append(e) {
|
|
6014
6005
|
this.text += e;
|
|
@@ -6090,15 +6081,15 @@ var ks = class {
|
|
|
6090
6081
|
n.readRange(this.bounds.startDOM, this.bounds.endDOM), this.text = n.text, this.newSel = Ls(t, this.bounds.from);
|
|
6091
6082
|
} else {
|
|
6092
6083
|
let t = e.observer.selectionRange, n = i && i.node == t.focusNode && i.offset == t.focusOffset || !$i(e.contentDOM, t.focusNode) ? o.main.head : e.docView.posFromDOM(t.focusNode, t.focusOffset), r = a && a.node == t.anchorNode && a.offset == t.anchorOffset || !$i(e.contentDOM, t.anchorNode) ? o.main.anchor : e.docView.posFromDOM(t.anchorNode, t.anchorOffset), s = e.viewport;
|
|
6093
|
-
if ((
|
|
6084
|
+
if ((H.ios || H.chrome) && o.main.empty && n != r && (s.from > 0 || s.to < e.state.doc.length)) {
|
|
6094
6085
|
let t = Math.min(n, r), i = Math.max(n, r), a = s.from - t, o = s.to - i;
|
|
6095
6086
|
(a == 0 || a == 1 || t == 0) && (o == 0 || o == -1 || i == e.state.doc.length) && (n = 0, r = e.state.doc.length);
|
|
6096
6087
|
}
|
|
6097
|
-
if (e.inputState.composing > -1 && o.ranges.length > 1) this.newSel = o.replaceRange(
|
|
6088
|
+
if (e.inputState.composing > -1 && o.ranges.length > 1) this.newSel = o.replaceRange(L.range(r, n));
|
|
6098
6089
|
else if (e.lineWrapping && r == n && !(o.main.empty && o.main.head == n) && e.inputState.lastTouchTime > Date.now() - 100) {
|
|
6099
6090
|
let t = e.coordsAtPos(n, -1), r = 0;
|
|
6100
|
-
t && (r = e.inputState.lastTouchY <= t.bottom ? -1 : 1), this.newSel =
|
|
6101
|
-
} else this.newSel =
|
|
6091
|
+
t && (r = e.inputState.lastTouchY <= t.bottom ? -1 : 1), this.newSel = L.create([L.cursor(n, r)]);
|
|
6092
|
+
} else this.newSel = L.single(r, n);
|
|
6102
6093
|
}
|
|
6103
6094
|
}
|
|
6104
6095
|
};
|
|
@@ -6132,20 +6123,20 @@ function Ms(e, t) {
|
|
|
6132
6123
|
let n, { newSel: r } = t, { state: i } = e, a = i.selection.main, o = e.inputState.lastKeyTime > Date.now() - 100 ? e.inputState.lastKeyCode : -1;
|
|
6133
6124
|
if (t.bounds) {
|
|
6134
6125
|
let { from: e, to: r } = t.bounds, s = a.from, c = null;
|
|
6135
|
-
(o === 8 ||
|
|
6126
|
+
(o === 8 || H.android && t.text.length < r - e) && (s = a.to, c = "end");
|
|
6136
6127
|
let l = i.doc.sliceString(e, r, Ts), u, d;
|
|
6137
6128
|
!a.empty && a.from >= e && a.to <= r && (t.typeOver || l != t.text) && l.slice(0, a.from - e) == t.text.slice(0, a.from - e) && l.slice(a.to - e) == t.text.slice(u = t.text.length - (l.length - (a.to - e))) ? n = {
|
|
6138
6129
|
from: a.from,
|
|
6139
6130
|
to: a.to,
|
|
6140
6131
|
insert: P.of(t.text.slice(a.from - e, u).split(Ts))
|
|
6141
|
-
} : (d = Fs(l, t.text, s - e, c)) && (
|
|
6132
|
+
} : (d = Fs(l, t.text, s - e, c)) && (H.chrome && o == 13 && d.toB == d.from + 2 && t.text.slice(d.from, d.toB) == Ts + Ts && d.toB--, n = {
|
|
6142
6133
|
from: e + d.from,
|
|
6143
6134
|
to: e + d.toA,
|
|
6144
6135
|
insert: P.of(t.text.slice(d.from, d.toB).split(Ts))
|
|
6145
6136
|
});
|
|
6146
6137
|
} else r && (!e.hasFocus && i.facet(so) || Rs(r, a)) && (r = null);
|
|
6147
6138
|
if (!n && !r) return !1;
|
|
6148
|
-
if ((
|
|
6139
|
+
if ((H.mac || H.android) && n && n.from == n.to && n.from == a.head - 1 && /^\. ?$/.test(n.insert.toString()) && e.contentDOM.getAttribute("autocorrect") == "off" ? (r && n.insert.length == 2 && (r = L.single(r.main.anchor - 1, r.main.head - 1)), n = {
|
|
6149
6140
|
from: n.from,
|
|
6150
6141
|
to: n.to,
|
|
6151
6142
|
insert: P.of([n.insert.toString().replace(".", " ")])
|
|
@@ -6153,7 +6144,7 @@ function Ms(e, t) {
|
|
|
6153
6144
|
from: a.from,
|
|
6154
6145
|
to: a.to,
|
|
6155
6146
|
insert: i.toText(e.inputState.insertingText)
|
|
6156
|
-
} :
|
|
6147
|
+
} : H.chrome && n && n.from == n.to && n.from == a.head && n.insert.toString() == "\n " && e.lineWrapping && (r &&= L.single(r.main.anchor - 1, r.main.head - 1), n = {
|
|
6157
6148
|
from: a.from,
|
|
6158
6149
|
to: a.to,
|
|
6159
6150
|
insert: P.of([" "])
|
|
@@ -6168,9 +6159,9 @@ function Ms(e, t) {
|
|
|
6168
6159
|
} else return !1;
|
|
6169
6160
|
}
|
|
6170
6161
|
function Ns(e, t, n, r = -1) {
|
|
6171
|
-
if (
|
|
6162
|
+
if (H.ios && e.inputState.flushIOSKey(t)) return !0;
|
|
6172
6163
|
let i = e.state.selection.main;
|
|
6173
|
-
if (
|
|
6164
|
+
if (H.android && (t.to == i.to && (t.from == i.from || t.from == i.from - 1 && e.state.sliceDoc(t.from, i.from) == " ") && t.insert.length == 1 && t.insert.lines == 2 && _a(e.contentDOM, "Enter", 13) || (t.from == i.from - 1 && t.to == i.to && t.insert.length == 0 || r == 8 && t.insert.length < t.to - t.from && t.to > i.head) && _a(e.contentDOM, "Backspace", 8) || t.from == i.from && t.to == i.to + 1 && t.insert.length == 0 && _a(e.contentDOM, "Delete", 46))) return !0;
|
|
6174
6165
|
let a = t.insert.toString();
|
|
6175
6166
|
e.inputState.composing >= 0 && e.inputState.composing++;
|
|
6176
6167
|
let o, s = () => o ||= Ps(e, t, n);
|
|
@@ -6184,7 +6175,7 @@ function Ps(e, t, n) {
|
|
|
6184
6175
|
}
|
|
6185
6176
|
if (o > -1) r = {
|
|
6186
6177
|
changes: t,
|
|
6187
|
-
selection:
|
|
6178
|
+
selection: L.cursor(t.from + t.insert.length, -1)
|
|
6188
6179
|
};
|
|
6189
6180
|
else if (t.from >= a.from && t.to <= a.to && t.to - t.from >= (a.to - a.from) / 3 && (!n || n.main.empty && n.main.from == t.from + t.insert.length) && e.inputState.composing < 0) {
|
|
6190
6181
|
let n = a.from < t.from ? i.sliceDoc(a.from, t.from) : "", o = a.to > t.to ? i.sliceDoc(t.to, a.to) : "";
|
|
@@ -6215,7 +6206,7 @@ function Ps(e, t, n) {
|
|
|
6215
6206
|
}), p = n.to - a.to;
|
|
6216
6207
|
return {
|
|
6217
6208
|
changes: f,
|
|
6218
|
-
range: s ?
|
|
6209
|
+
range: s ? L.range(Math.max(0, s.anchor + p), Math.max(0, s.head + p)) : n.map(f)
|
|
6219
6210
|
};
|
|
6220
6211
|
});
|
|
6221
6212
|
} else r = {
|
|
@@ -6261,7 +6252,7 @@ function Is(e) {
|
|
|
6261
6252
|
function Ls(e, t) {
|
|
6262
6253
|
if (e.length == 0) return null;
|
|
6263
6254
|
let n = e[0].pos, r = e.length == 2 ? e[1].pos : n;
|
|
6264
|
-
return n > -1 && r > -1 ?
|
|
6255
|
+
return n > -1 && r > -1 ? L.single(n + t, r + t) : null;
|
|
6265
6256
|
}
|
|
6266
6257
|
function Rs(e, t) {
|
|
6267
6258
|
return t.head == e.main.head && t.anchor == e.main.anchor;
|
|
@@ -6271,7 +6262,7 @@ var zs = class {
|
|
|
6271
6262
|
this.lastSelectionOrigin = e, this.lastSelectionTime = Date.now();
|
|
6272
6263
|
}
|
|
6273
6264
|
constructor(e) {
|
|
6274
|
-
this.view = e, this.lastKeyCode = 0, this.lastKeyTime = 0, this.lastTouchTime = 0, this.lastTouchX = 0, this.lastTouchY = 0, this.lastFocusTime = 0, this.lastScrollTop = 0, this.lastScrollLeft = 0, this.lastWheelEvent = 0, this.pendingIOSKey = void 0, this.tabFocusMode = -1, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastContextMenu = 0, this.scrollHandlers = [], this.handlers = Object.create(null), this.composing = -1, this.compositionFirstChange = null, this.compositionEndedAt = 0, this.compositionPendingKey = !1, this.compositionPendingChange = !1, this.insertingText = "", this.insertingTextAt = 0, this.mouseSelection = null, this.draggedContent = null, this.handleEvent = this.handleEvent.bind(this), this.notifiedFocused = e.hasFocus,
|
|
6265
|
+
this.view = e, this.lastKeyCode = 0, this.lastKeyTime = 0, this.lastTouchTime = 0, this.lastTouchX = 0, this.lastTouchY = 0, this.lastFocusTime = 0, this.lastScrollTop = 0, this.lastScrollLeft = 0, this.lastWheelEvent = 0, this.pendingIOSKey = void 0, this.tabFocusMode = -1, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastContextMenu = 0, this.scrollHandlers = [], this.handlers = Object.create(null), this.composing = -1, this.compositionFirstChange = null, this.compositionEndedAt = 0, this.compositionPendingKey = !1, this.compositionPendingChange = !1, this.insertingText = "", this.insertingTextAt = 0, this.mouseSelection = null, this.draggedContent = null, this.handleEvent = this.handleEvent.bind(this), this.notifiedFocused = e.hasFocus, H.safari && e.contentDOM.addEventListener("input", () => null), H.gecko && xc(e.contentDOM.ownerDocument);
|
|
6275
6266
|
}
|
|
6276
6267
|
handleEvent(e) {
|
|
6277
6268
|
!Qs(this.view, e) || this.ignoreDuringComposition(e) || e.type == "keydown" && this.keydown(e) || (this.view.updateState == 0 ? this.runHandlers(e.type, e) : Promise.resolve().then(() => this.runHandlers(e.type, e)));
|
|
@@ -6300,16 +6291,16 @@ var zs = class {
|
|
|
6300
6291
|
}
|
|
6301
6292
|
keydown(e) {
|
|
6302
6293
|
if (this.lastKeyCode = e.keyCode, this.lastKeyTime = Date.now(), e.keyCode == 9 && this.tabFocusMode > -1 && (!this.tabFocusMode || Date.now() <= this.tabFocusMode)) return !0;
|
|
6303
|
-
if (this.tabFocusMode > 0 && e.keyCode != 27 && Ws.indexOf(e.keyCode) < 0 && (this.tabFocusMode = -1),
|
|
6294
|
+
if (this.tabFocusMode > 0 && e.keyCode != 27 && Ws.indexOf(e.keyCode) < 0 && (this.tabFocusMode = -1), H.android && H.chrome && !e.synthetic && (e.keyCode == 13 || e.keyCode == 8)) return this.view.observer.delayAndroidKey(e.key, e.keyCode), !0;
|
|
6304
6295
|
let t;
|
|
6305
|
-
return
|
|
6296
|
+
return H.ios && !e.synthetic && !e.altKey && !e.metaKey && !e.shiftKey && ((t = Hs.find((t) => t.keyCode == e.keyCode)) && !e.ctrlKey || Us.indexOf(e.key) > -1 && e.ctrlKey) ? (this.pendingIOSKey = t || e, setTimeout(() => this.flushIOSKey(), 250), !0) : (e.keyCode != 229 && this.view.observer.forceFlush(), !1);
|
|
6306
6297
|
}
|
|
6307
6298
|
flushIOSKey(e) {
|
|
6308
6299
|
let t = this.pendingIOSKey;
|
|
6309
6300
|
return !t || t.key == "Enter" && e && e.from < e.to && /^\S+$/.test(e.insert.toString()) ? !1 : (this.pendingIOSKey = void 0, _a(this.view.contentDOM, t.key, t.keyCode, t instanceof KeyboardEvent ? t : void 0));
|
|
6310
6301
|
}
|
|
6311
6302
|
ignoreDuringComposition(e) {
|
|
6312
|
-
return !/^key/.test(e.type) || e.synthetic ? !1 : this.composing > 0 ? !0 :
|
|
6303
|
+
return !/^key/.test(e.type) || e.synthetic ? !1 : this.composing > 0 ? !0 : H.safari && !H.ios && this.compositionPendingKey && Date.now() - this.compositionEndedAt < 100 ? (this.compositionPendingKey = !1, !0) : !1;
|
|
6313
6304
|
}
|
|
6314
6305
|
startMouseSelection(e) {
|
|
6315
6306
|
this.mouseSelection && this.mouseSelection.destroy(), this.mouseSelection = e;
|
|
@@ -6397,7 +6388,7 @@ var Js = class {
|
|
|
6397
6388
|
y: 0
|
|
6398
6389
|
}, this.scrolling = -1, this.lastEvent = t, this.scrollParents = da(e.contentDOM), this.atoms = e.state.facet(vo).map((t) => t(e));
|
|
6399
6390
|
let i = e.contentDOM.ownerDocument;
|
|
6400
|
-
i.addEventListener("mousemove", this.move = this.move.bind(this)), i.addEventListener("mouseup", this.up = this.up.bind(this)), this.extend = t.shiftKey, this.multiple = e.state.facet(
|
|
6391
|
+
i.addEventListener("mousemove", this.move = this.move.bind(this)), i.addEventListener("mouseup", this.up = this.up.bind(this)), this.extend = t.shiftKey, this.multiple = e.state.facet(B.allowMultipleSelections) && Ys(e, t), this.dragging = Zs(e, t) && uc(t) == 1 ? null : !1;
|
|
6401
6392
|
}
|
|
6402
6393
|
start(e) {
|
|
6403
6394
|
this.dragging === !1 && this.select(e);
|
|
@@ -6442,11 +6433,11 @@ var Js = class {
|
|
|
6442
6433
|
};
|
|
6443
6434
|
function Ys(e, t) {
|
|
6444
6435
|
let n = e.state.facet(Ga);
|
|
6445
|
-
return n.length ? n[0](t) :
|
|
6436
|
+
return n.length ? n[0](t) : H.mac ? t.metaKey : t.ctrlKey;
|
|
6446
6437
|
}
|
|
6447
6438
|
function Xs(e, t) {
|
|
6448
6439
|
let n = e.state.facet(Ka);
|
|
6449
|
-
return n.length ? n[0](t) :
|
|
6440
|
+
return n.length ? n[0](t) : H.mac ? !t.altKey : !t.ctrlKey;
|
|
6450
6441
|
}
|
|
6451
6442
|
function Zs(e, t) {
|
|
6452
6443
|
let { main: n } = e.state.selection;
|
|
@@ -6466,7 +6457,7 @@ function Qs(e, t) {
|
|
|
6466
6457
|
for (let n = t.target, r; n != e.contentDOM; n = n.parentNode) if (!n || n.nodeType == 11 || (r = K.get(n)) && r.isWidget() && !r.isHidden && r.widget.ignoreEvent(t)) return !1;
|
|
6467
6458
|
return !0;
|
|
6468
6459
|
}
|
|
6469
|
-
var $s = /* @__PURE__ */ Object.create(null), ec = /* @__PURE__ */ Object.create(null), tc =
|
|
6460
|
+
var $s = /* @__PURE__ */ Object.create(null), ec = /* @__PURE__ */ Object.create(null), tc = H.ie && H.ie_version < 15 || H.ios && H.webkit_version < 604;
|
|
6470
6461
|
function nc(e) {
|
|
6471
6462
|
let t = e.dom.parentNode;
|
|
6472
6463
|
if (!t) return;
|
|
@@ -6494,7 +6485,7 @@ function ic(e, t) {
|
|
|
6494
6485
|
from: s.from,
|
|
6495
6486
|
insert: c
|
|
6496
6487
|
},
|
|
6497
|
-
range:
|
|
6488
|
+
range: L.cursor(r.from + c.length)
|
|
6498
6489
|
};
|
|
6499
6490
|
});
|
|
6500
6491
|
} else r = o ? n.changeByRange((e) => {
|
|
@@ -6505,7 +6496,7 @@ function ic(e, t) {
|
|
|
6505
6496
|
to: e.to,
|
|
6506
6497
|
insert: t.text
|
|
6507
6498
|
},
|
|
6508
|
-
range:
|
|
6499
|
+
range: L.cursor(e.from + t.length)
|
|
6509
6500
|
};
|
|
6510
6501
|
}) : n.replaceSelection(a);
|
|
6511
6502
|
e.dispatch(r, {
|
|
@@ -6539,14 +6530,14 @@ ec.scroll = (e) => {
|
|
|
6539
6530
|
return !1;
|
|
6540
6531
|
};
|
|
6541
6532
|
function ac(e, t, n, r) {
|
|
6542
|
-
if (r == 1) return
|
|
6533
|
+
if (r == 1) return L.cursor(t, n);
|
|
6543
6534
|
if (r == 2) return fs(e.state, t, n);
|
|
6544
6535
|
{
|
|
6545
6536
|
let r = e.docView.lineAt(t, n), i = e.state.doc.lineAt(r ? r.posAtEnd : t), a = r ? r.posAtStart : i.from, o = r ? r.posAtEnd : i.to;
|
|
6546
|
-
return o < e.state.doc.length && o == i.to && o++,
|
|
6537
|
+
return o < e.state.doc.length && o == i.to && o++, L.range(a, o);
|
|
6547
6538
|
}
|
|
6548
6539
|
}
|
|
6549
|
-
var oc =
|
|
6540
|
+
var oc = H.ie && H.ie_version <= 11, sc = null, cc = 0, lc = 0;
|
|
6550
6541
|
function uc(e) {
|
|
6551
6542
|
if (!oc) return e.detail;
|
|
6552
6543
|
let t = sc, n = lc;
|
|
@@ -6568,16 +6559,16 @@ function dc(e, t) {
|
|
|
6568
6559
|
}, !1), c, l = ac(e, s.pos, s.assoc, r);
|
|
6569
6560
|
if (n.pos != s.pos && !a) {
|
|
6570
6561
|
let t = ac(e, n.pos, n.assoc, r), i = Math.min(t.from, l.from), a = Math.max(t.to, l.to);
|
|
6571
|
-
l = i < l.from ?
|
|
6562
|
+
l = i < l.from ? L.range(i, a, l.assoc) : L.range(a, i, l.assoc);
|
|
6572
6563
|
}
|
|
6573
|
-
return a ? i.replaceRange(i.main.extend(l.from, l.to, l.assoc)) : o && r == 1 && i.ranges.length > 1 && (c = fc(i, s.pos)) ? c : o ? i.addRange(l) :
|
|
6564
|
+
return a ? i.replaceRange(i.main.extend(l.from, l.to, l.assoc)) : o && r == 1 && i.ranges.length > 1 && (c = fc(i, s.pos)) ? c : o ? i.addRange(l) : L.create([l]);
|
|
6574
6565
|
}
|
|
6575
6566
|
};
|
|
6576
6567
|
}
|
|
6577
6568
|
function fc(e, t) {
|
|
6578
6569
|
for (let n = 0; n < e.ranges.length; n++) {
|
|
6579
6570
|
let { from: r, to: i } = e.ranges[n];
|
|
6580
|
-
if (r <= t && i >= t) return
|
|
6571
|
+
if (r <= t && i >= t) return L.create(e.ranges.slice(0, n).concat(e.ranges.slice(n + 1)), e.mainIndex == n ? 0 : e.mainIndex - +(e.mainIndex > n));
|
|
6581
6572
|
}
|
|
6582
6573
|
return null;
|
|
6583
6574
|
}
|
|
@@ -6587,7 +6578,7 @@ $s.dragstart = (e, t) => {
|
|
|
6587
6578
|
let r = e.docView.tile.nearest(t.target);
|
|
6588
6579
|
if (r && r.isWidget()) {
|
|
6589
6580
|
let e = r.posAtStart, t = e + r.length;
|
|
6590
|
-
(e >= n.to || t <= n.from) && (n =
|
|
6581
|
+
(e >= n.to || t <= n.from) && (n = L.range(e, t));
|
|
6591
6582
|
}
|
|
6592
6583
|
}
|
|
6593
6584
|
let { inputState: r } = e;
|
|
@@ -6681,7 +6672,7 @@ $s.copy = $s.cut = (e, t) => {
|
|
|
6681
6672
|
let a = tc ? null : t.clipboardData;
|
|
6682
6673
|
return a ? (a.clearData(), a.setData("text/plain", n), !0) : (mc(e, n), !1);
|
|
6683
6674
|
};
|
|
6684
|
-
var _c = /* @__PURE__ */
|
|
6675
|
+
var _c = /* @__PURE__ */ kr.define();
|
|
6685
6676
|
function vc(e, t) {
|
|
6686
6677
|
let n = [];
|
|
6687
6678
|
for (let r of e.facet(Za)) {
|
|
@@ -6709,7 +6700,7 @@ ec.focus = (e) => {
|
|
|
6709
6700
|
}, ec.compositionstart = ec.compositionupdate = (e) => {
|
|
6710
6701
|
e.observer.editContext || (e.inputState.compositionFirstChange ?? (e.inputState.compositionFirstChange = !0), e.inputState.composing < 0 && (e.inputState.composing = 0));
|
|
6711
6702
|
}, ec.compositionend = (e) => {
|
|
6712
|
-
e.observer.editContext || (e.inputState.composing = -1, e.inputState.compositionEndedAt = Date.now(), e.inputState.compositionPendingKey = !0, e.inputState.compositionPendingChange = e.observer.pendingRecords().length > 0, e.inputState.compositionFirstChange = null,
|
|
6703
|
+
e.observer.editContext || (e.inputState.composing = -1, e.inputState.compositionEndedAt = Date.now(), e.inputState.compositionPendingKey = !0, e.inputState.compositionPendingChange = e.observer.pendingRecords().length > 0, e.inputState.compositionFirstChange = null, H.chrome && H.android ? e.observer.flushSoon() : e.inputState.compositionPendingChange ? Promise.resolve().then(() => e.observer.flush()) : setTimeout(() => {
|
|
6713
6704
|
e.inputState.composing < 0 && e.docView.hasComposition && e.update([]);
|
|
6714
6705
|
}, 50));
|
|
6715
6706
|
}, ec.contextmenu = (e) => {
|
|
@@ -6727,13 +6718,13 @@ ec.focus = (e) => {
|
|
|
6727
6718
|
}
|
|
6728
6719
|
}
|
|
6729
6720
|
let n;
|
|
6730
|
-
if (
|
|
6721
|
+
if (H.chrome && H.android && (n = Hs.find((e) => e.inputType == t.inputType)) && (e.observer.delayAndroidKey(n.key, n.keyCode), n.key == "Backspace" || n.key == "Delete")) {
|
|
6731
6722
|
let t = window.visualViewport?.height || 0;
|
|
6732
6723
|
setTimeout(() => {
|
|
6733
6724
|
(window.visualViewport?.height || 0) > t + 10 && e.hasFocus && (e.contentDOM.blur(), e.focus());
|
|
6734
6725
|
}, 100);
|
|
6735
6726
|
}
|
|
6736
|
-
return
|
|
6727
|
+
return H.ios && t.inputType == "deleteContentForward" && e.observer.flushSoon(), H.safari && t.inputType == "insertText" && e.inputState.composing >= 0 && setTimeout(() => ec.compositionend(e, t), 20), !1;
|
|
6737
6728
|
};
|
|
6738
6729
|
var bc = /* @__PURE__ */ new Set();
|
|
6739
6730
|
function xc(e) {
|
|
@@ -6796,7 +6787,7 @@ var Tc = class {
|
|
|
6796
6787
|
this.from = e, this.length = t, this.top = n, this.height = r, this._content = i;
|
|
6797
6788
|
}
|
|
6798
6789
|
get type() {
|
|
6799
|
-
return typeof this._content == "number" ?
|
|
6790
|
+
return typeof this._content == "number" ? Wi.Text : Array.isArray(this._content) ? this._content : this._content.type;
|
|
6800
6791
|
}
|
|
6801
6792
|
get to() {
|
|
6802
6793
|
return this.from + this.length;
|
|
@@ -7134,12 +7125,12 @@ var Lc = 5, Rc = class e {
|
|
|
7134
7125
|
}
|
|
7135
7126
|
static build(t, n, r, i) {
|
|
7136
7127
|
let a = new e(r, t);
|
|
7137
|
-
return
|
|
7128
|
+
return V.spans(n, r, i, a, 0), a.finish(r);
|
|
7138
7129
|
}
|
|
7139
7130
|
};
|
|
7140
7131
|
function zc(e, t, n) {
|
|
7141
7132
|
let r = new Bc();
|
|
7142
|
-
return
|
|
7133
|
+
return V.compare(e, t, n, r, 0), r.changes;
|
|
7143
7134
|
}
|
|
7144
7135
|
var Bc = class {
|
|
7145
7136
|
constructor() {
|
|
@@ -7196,7 +7187,7 @@ var Wc = class {
|
|
|
7196
7187
|
draw(e, t) {
|
|
7197
7188
|
return U.replace({ widget: new Gc(this.displaySize * (t ? e.scaleY : e.scaleX), t) }).range(this.from, this.to);
|
|
7198
7189
|
}
|
|
7199
|
-
}, Gc = class extends
|
|
7190
|
+
}, Gc = class extends Ui {
|
|
7200
7191
|
constructor(e, t) {
|
|
7201
7192
|
super(), this.size = e, this.vertical = t;
|
|
7202
7193
|
}
|
|
@@ -7337,7 +7328,7 @@ var Wc = class {
|
|
|
7337
7328
|
let f = Zc(e, (e) => e.from >= c.from && e.to <= c.to && Math.abs(e.from - r) < i && Math.abs(e.to - a) < i && !d.some((t) => e.from < t && e.to > t));
|
|
7338
7329
|
if (!f) {
|
|
7339
7330
|
if (a < c.to && t && n && t.visibleRanges.some((e) => e.from <= a && e.to >= a)) {
|
|
7340
|
-
let e = t.moveToLineBoundary(
|
|
7331
|
+
let e = t.moveToLineBoundary(L.cursor(a), !1, !0).head;
|
|
7341
7332
|
e > r && (a = e);
|
|
7342
7333
|
}
|
|
7343
7334
|
let e = this.gapSize(c, r, a, l);
|
|
@@ -7345,7 +7336,7 @@ var Wc = class {
|
|
|
7345
7336
|
}
|
|
7346
7337
|
o.push(f);
|
|
7347
7338
|
}, c = (t) => {
|
|
7348
|
-
if (t.length < a || t.type !=
|
|
7339
|
+
if (t.length < a || t.type != Wi.Text) return;
|
|
7349
7340
|
let i = Jc(t.from, t.to, this.stateDeco);
|
|
7350
7341
|
if (i.total < a) return;
|
|
7351
7342
|
let o = this.scrollTarget ? this.scrollTarget.range.head : null, c, l;
|
|
@@ -7382,7 +7373,7 @@ var Wc = class {
|
|
|
7382
7373
|
let t = this.stateDeco;
|
|
7383
7374
|
this.lineGaps.length && (t = t.concat(this.lineGapDeco));
|
|
7384
7375
|
let n = [];
|
|
7385
|
-
|
|
7376
|
+
V.spans(t, this.viewport.from, this.viewport.to, {
|
|
7386
7377
|
span(e, t) {
|
|
7387
7378
|
n.push({
|
|
7388
7379
|
from: e,
|
|
@@ -7428,7 +7419,7 @@ var Wc = class {
|
|
|
7428
7419
|
};
|
|
7429
7420
|
function Jc(e, t, n) {
|
|
7430
7421
|
let r = [], i = e, a = 0;
|
|
7431
|
-
return
|
|
7422
|
+
return V.spans(n, e, t, {
|
|
7432
7423
|
span() {},
|
|
7433
7424
|
point(e, t) {
|
|
7434
7425
|
e > i && (r.push({
|
|
@@ -7482,7 +7473,7 @@ var Qc = {
|
|
|
7482
7473
|
};
|
|
7483
7474
|
function $c(e) {
|
|
7484
7475
|
let t = e.facet(ho).filter((e) => typeof e != "function"), n = e.facet(_o).filter((e) => typeof e != "function");
|
|
7485
|
-
return n.length && t.push(
|
|
7476
|
+
return n.length && t.push(V.join(n)), t;
|
|
7486
7477
|
}
|
|
7487
7478
|
var el = class e {
|
|
7488
7479
|
constructor(e, t, n) {
|
|
@@ -7525,12 +7516,12 @@ function tl(e, t) {
|
|
|
7525
7516
|
let n = t.toDOM(e.top), r = t.toDOM(e.bottom);
|
|
7526
7517
|
return new Dc(e.from, e.length, n, r - n, Array.isArray(e._content) ? e._content.map((e) => tl(e, t)) : e._content);
|
|
7527
7518
|
}
|
|
7528
|
-
var nl = /* @__PURE__ */
|
|
7519
|
+
var nl = /* @__PURE__ */ R.define({ combine: (e) => e.join(" ") }), rl = /* @__PURE__ */ R.define({ combine: (e) => e.indexOf(!0) > -1 }), il = /* @__PURE__ */ gi.newName(), al = /* @__PURE__ */ gi.newName(), ol = /* @__PURE__ */ gi.newName(), sl = {
|
|
7529
7520
|
"&light": "." + al,
|
|
7530
7521
|
"&dark": "." + ol
|
|
7531
7522
|
};
|
|
7532
7523
|
function cl(e, t, n) {
|
|
7533
|
-
return new
|
|
7524
|
+
return new gi(t, { finish(t) {
|
|
7534
7525
|
return /&/.test(t) ? t.replace(/&\w*/, (t) => {
|
|
7535
7526
|
if (t == "&") return e;
|
|
7536
7527
|
if (!n || !n[t]) throw RangeError(`Unsupported selector: ${t}`);
|
|
@@ -7772,12 +7763,12 @@ var ll = /* @__PURE__ */ cl("." + il, {
|
|
|
7772
7763
|
subtree: !0,
|
|
7773
7764
|
attributes: !0,
|
|
7774
7765
|
characterDataOldValue: !0
|
|
7775
|
-
}, dl =
|
|
7766
|
+
}, dl = H.ie && H.ie_version <= 11, fl = class {
|
|
7776
7767
|
constructor(e) {
|
|
7777
7768
|
this.view = e, this.active = !1, this.editContext = null, this.selectionRange = new fa(), this.selectionChanged = !1, this.delayedFlush = -1, this.resizeTimeout = -1, this.queue = [], this.delayedAndroidKey = null, this.flushingAndroidKey = -1, this.lastChange = 0, this.scrollTargets = [], this.intersection = null, this.resizeScroll = null, this.intersecting = !1, this.gapIntersection = null, this.gaps = [], this.printQuery = null, this.parentCheck = -1, this.dom = e.contentDOM, this.observer = new MutationObserver((t) => {
|
|
7778
7769
|
for (let e of t) this.queue.push(e);
|
|
7779
|
-
(
|
|
7780
|
-
}), window.EditContext &&
|
|
7770
|
+
(H.ie && H.ie_version <= 11 || H.ios && e.composing) && t.some((e) => e.type == "childList" && e.removedNodes.length || e.type == "characterData" && e.oldValue.length > e.target.nodeValue.length) ? this.flushSoon() : this.flush();
|
|
7771
|
+
}), window.EditContext && H.android && e.constructor.EDIT_CONTEXT !== !1 && !(H.chrome && H.chrome_version < 126) && (this.editContext = new gl(e), e.state.facet(so) && (e.contentDOM.editContext = this.editContext.editContext)), dl && (this.onCharData = (e) => {
|
|
7781
7772
|
this.queue.push({
|
|
7782
7773
|
target: e.target,
|
|
7783
7774
|
type: "characterData",
|
|
@@ -7824,12 +7815,12 @@ var ll = /* @__PURE__ */ cl("." + il, {
|
|
|
7824
7815
|
t || (this.selectionChanged = !1);
|
|
7825
7816
|
return;
|
|
7826
7817
|
}
|
|
7827
|
-
(
|
|
7818
|
+
(H.ie && H.ie_version <= 11 || H.android && H.chrome) && !n.state.selection.main.empty && r.focusNode && na(r.focusNode, r.focusOffset, r.anchorNode, r.anchorOffset) ? this.flushSoon() : this.flush(!1);
|
|
7828
7819
|
}
|
|
7829
7820
|
readSelectionRange() {
|
|
7830
7821
|
let { view: e } = this, t = Qi(e.root);
|
|
7831
7822
|
if (!t) return !1;
|
|
7832
|
-
let n =
|
|
7823
|
+
let n = H.safari && e.root.nodeType == 11 && e.root.activeElement == this.dom && hl(this.view, t) || t;
|
|
7833
7824
|
if (!n || this.selectionRange.eq(n)) return !1;
|
|
7834
7825
|
let r = ea(this.dom, n);
|
|
7835
7826
|
return r && !this.selectionChanged && e.inputState.lastFocusTime > Date.now() - 200 && e.inputState.lastTouchTime < Date.now() - 300 && ya(this.dom, n) ? (this.view.inputState.lastFocusTime = 0, e.docView.updateSelection(), !1) : (this.selectionRange.setRange(n), r && (this.selectionChanged = !0), !0);
|
|
@@ -8015,7 +8006,7 @@ var gl = class {
|
|
|
8015
8006
|
o == this.from && i < this.from ? o = i : s == this.to && i > this.to && (s = i);
|
|
8016
8007
|
let l = Fs(e.state.sliceDoc(o, s), n.text, (c ? r.from : r.to) - o, c ? "end" : null);
|
|
8017
8008
|
if (!l) {
|
|
8018
|
-
let t =
|
|
8009
|
+
let t = L.single(this.toEditorPos(n.selectionStart), this.toEditorPos(n.selectionEnd));
|
|
8019
8010
|
Rs(t, r) || e.dispatch({
|
|
8020
8011
|
selection: t,
|
|
8021
8012
|
userEvent: "select"
|
|
@@ -8027,13 +8018,13 @@ var gl = class {
|
|
|
8027
8018
|
to: l.toA + o,
|
|
8028
8019
|
insert: P.of(n.text.slice(l.from, l.toB).split("\n"))
|
|
8029
8020
|
};
|
|
8030
|
-
if ((
|
|
8021
|
+
if ((H.mac || H.android) && u.from == a - 1 && /^\. ?$/.test(n.text) && e.contentDOM.getAttribute("autocorrect") == "off" && (u = {
|
|
8031
8022
|
from: o,
|
|
8032
8023
|
to: s,
|
|
8033
8024
|
insert: P.of([n.text.replace(".", " ")])
|
|
8034
8025
|
}), this.pendingContextChange = u, !e.state.readOnly) {
|
|
8035
8026
|
let t = this.to - this.from + (u.to - u.from + u.insert.length);
|
|
8036
|
-
Ns(e, u,
|
|
8027
|
+
Ns(e, u, L.single(this.toEditorPos(n.selectionStart, t), this.toEditorPos(n.selectionEnd, t)));
|
|
8037
8028
|
}
|
|
8038
8029
|
this.pendingContextChange && (this.revertPending(e.state), this.setSelection(e.state)), u.from < u.to && !u.insert.length && e.inputState.composing >= 0 && !/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0, n.updateRangeStart - 1), Math.min(t.text.length, n.updateRangeStart + 1))) && this.handlers.compositionend(n);
|
|
8039
8030
|
}, this.handlers.characterboundsupdate = (n) => {
|
|
@@ -8154,14 +8145,14 @@ var gl = class {
|
|
|
8154
8145
|
constructor(e = {}) {
|
|
8155
8146
|
this.plugins = [], this.pluginMap = /* @__PURE__ */ new Map(), this.editorAttrs = {}, this.contentAttrs = {}, this.bidiCache = [], this.destroyed = !1, this.updateState = 2, this.measureScheduled = -1, this.measureRequests = [], this.contentDOM = document.createElement("div"), this.scrollDOM = document.createElement("div"), this.scrollDOM.tabIndex = -1, this.scrollDOM.className = "cm-scroller", this.scrollDOM.appendChild(this.contentDOM), this.announceDOM = document.createElement("div"), this.announceDOM.className = "cm-announced", this.announceDOM.setAttribute("aria-live", "polite"), this.dom = document.createElement("div"), this.dom.appendChild(this.announceDOM), this.dom.appendChild(this.scrollDOM), e.parent && e.parent.appendChild(this.dom);
|
|
8156
8147
|
let { dispatch: t } = e;
|
|
8157
|
-
this.dispatchTransactions = e.dispatchTransactions || t && ((e) => e.forEach((e) => t(e, this))) || ((e) => this.update(e)), this.dispatch = this.dispatch.bind(this), this._root = e.root || va(e.parent) || document, this.viewState = new Kc(this, e.state ||
|
|
8148
|
+
this.dispatchTransactions = e.dispatchTransactions || t && ((e) => e.forEach((e) => t(e, this))) || ((e) => this.update(e)), this.dispatch = this.dispatch.bind(this), this._root = e.root || va(e.parent) || document, this.viewState = new Kc(this, e.state || B.create(e)), e.scrollTo && e.scrollTo.is(io) && (this.viewState.scrollTarget = e.scrollTo.value.clip(this.viewState.state)), this.plugins = this.state.facet(lo).map((e) => new fo(e));
|
|
8158
8149
|
for (let e of this.plugins) e.update(this);
|
|
8159
8150
|
this.observer = new fl(this), this.inputState = new zs(this), this.inputState.ensureHandlers(this.plugins), this.docView = new $o(this), this.mountStyles(), this.updateAttrs(), this.updateState = 0, this.requestMeasure(), document.fonts?.ready && document.fonts.ready.then(() => {
|
|
8160
8151
|
this.viewState.mustMeasureContent = "refresh", this.requestMeasure();
|
|
8161
8152
|
});
|
|
8162
8153
|
}
|
|
8163
8154
|
dispatch(...e) {
|
|
8164
|
-
let t = e.length == 1 && e[0] instanceof
|
|
8155
|
+
let t = e.length == 1 && e[0] instanceof Mr ? e : e.length == 1 && Array.isArray(e[0]) ? e[0] : [this.state.update(...e)];
|
|
8165
8156
|
this.dispatchTransactions(t, this);
|
|
8166
8157
|
}
|
|
8167
8158
|
update(t) {
|
|
@@ -8178,7 +8169,7 @@ var gl = class {
|
|
|
8178
8169
|
let o = this.hasFocus, s = 0, c = null;
|
|
8179
8170
|
t.some((e) => e.annotation(_c)) ? (this.inputState.notifiedFocused = o, s = 1) : o != this.inputState.notifiedFocused && (this.inputState.notifiedFocused = o, c = vc(a, o), c || (s = 1));
|
|
8180
8171
|
let l = this.observer.delayedAndroidKey, u = null;
|
|
8181
|
-
if (l ? (this.observer.clearDelayedAndroidKey(), u = this.observer.readChange(), (u && !this.state.doc.eq(a.doc) || !this.state.selection.eq(a.selection)) && (u = null)) : this.observer.clear(), a.facet(
|
|
8172
|
+
if (l ? (this.observer.clearDelayedAndroidKey(), u = this.observer.readChange(), (u && !this.state.doc.eq(a.doc) || !this.state.selection.eq(a.selection)) && (u = null)) : this.observer.clear(), a.facet(B.phrases) != this.state.facet(B.phrases)) return this.setState(a);
|
|
8182
8173
|
i = To.create(this, a, t), i.flags |= s;
|
|
8183
8174
|
let d = this.viewState.scrollTarget;
|
|
8184
8175
|
try {
|
|
@@ -8186,7 +8177,7 @@ var gl = class {
|
|
|
8186
8177
|
for (let n of t) {
|
|
8187
8178
|
if (d &&= d.map(n.changes), n.scrollIntoView) {
|
|
8188
8179
|
let { main: t } = n.state.selection, { x: r, y: i } = this.state.facet(e.cursorScrollMargin);
|
|
8189
|
-
d = new ro(t.empty ? t :
|
|
8180
|
+
d = new ro(t.empty ? t : L.cursor(t.head, t.head > t.anchor ? -1 : 1), "nearest", "nearest", i, r);
|
|
8190
8181
|
}
|
|
8191
8182
|
for (let e of n.effects) e.is(io) && (d = e.value.clip(this.state));
|
|
8192
8183
|
}
|
|
@@ -8319,13 +8310,13 @@ var gl = class {
|
|
|
8319
8310
|
translate: "no",
|
|
8320
8311
|
contenteditable: this.state.facet(so) ? "true" : "false",
|
|
8321
8312
|
class: "cm-content",
|
|
8322
|
-
style: `${
|
|
8313
|
+
style: `${H.tabSize}: ${this.state.tabSize}`,
|
|
8323
8314
|
role: "textbox",
|
|
8324
8315
|
"aria-multiline": "true"
|
|
8325
8316
|
};
|
|
8326
8317
|
this.state.readOnly && (t["aria-readonly"] = "true"), bl(this, mo, t);
|
|
8327
8318
|
let n = this.observer.ignore(() => {
|
|
8328
|
-
let n =
|
|
8319
|
+
let n = Vi(this.contentDOM, this.contentAttrs, t), r = Vi(this.dom, this.editorAttrs, e);
|
|
8329
8320
|
return n || r;
|
|
8330
8321
|
});
|
|
8331
8322
|
return this.editorAttrs = e, this.contentAttrs = t, n;
|
|
@@ -8341,7 +8332,7 @@ var gl = class {
|
|
|
8341
8332
|
mountStyles() {
|
|
8342
8333
|
this.styleModules = this.state.facet(Co);
|
|
8343
8334
|
let t = this.state.facet(e.cspNonce);
|
|
8344
|
-
|
|
8335
|
+
gi.mount(this.root, this.styleModules.concat(ll).reverse(), t ? { nonce: t } : void 0);
|
|
8345
8336
|
}
|
|
8346
8337
|
readMeasured() {
|
|
8347
8338
|
if (this.updateState == 2) throw Error("Reading the editor layout isn't allowed during an update");
|
|
@@ -8401,7 +8392,7 @@ var gl = class {
|
|
|
8401
8392
|
}
|
|
8402
8393
|
visualLineSide(e, t) {
|
|
8403
8394
|
let n = this.bidiSpans(e), r = this.textDirectionAt(e.from), i = n[t ? n.length - 1 : 0];
|
|
8404
|
-
return
|
|
8395
|
+
return L.cursor(i.side(t, r) + e.from, i.forward(!t, r) ? 1 : -1);
|
|
8405
8396
|
}
|
|
8406
8397
|
moveToLineBoundary(e, t, n = !0) {
|
|
8407
8398
|
return hs(this, e, t, n);
|
|
@@ -8457,7 +8448,7 @@ var gl = class {
|
|
|
8457
8448
|
return this.bidiCache.push(new yl(e.from, e.to, t, n, !0, r)), r;
|
|
8458
8449
|
}
|
|
8459
8450
|
get hasFocus() {
|
|
8460
|
-
return (this.dom.ownerDocument.hasFocus() ||
|
|
8451
|
+
return (this.dom.ownerDocument.hasFocus() || H.safari && this.inputState?.lastContextMenu > Date.now() - 3e4) && this.root.activeElement == this.contentDOM;
|
|
8461
8452
|
}
|
|
8462
8453
|
focus() {
|
|
8463
8454
|
this.observer.ignore(() => {
|
|
@@ -8473,11 +8464,11 @@ var gl = class {
|
|
|
8473
8464
|
this.plugins = [], this.inputState.destroy(), this.docView.destroy(), this.dom.remove(), this.observer.destroy(), this.measureScheduled > -1 && this.win.cancelAnimationFrame(this.measureScheduled), this.destroyed = !0;
|
|
8474
8465
|
}
|
|
8475
8466
|
static scrollIntoView(e, t = {}) {
|
|
8476
|
-
return io.of(new ro(typeof e == "number" ?
|
|
8467
|
+
return io.of(new ro(typeof e == "number" ? L.cursor(e) : e, t.y ?? "nearest", t.x ?? "nearest", t.yMargin ?? 5, t.xMargin ?? 5));
|
|
8477
8468
|
}
|
|
8478
8469
|
scrollSnapshot() {
|
|
8479
8470
|
let { scrollTop: e, scrollLeft: t } = this.scrollDOM, n = this.viewState.scrollAnchorAt(e);
|
|
8480
|
-
return io.of(new ro(
|
|
8471
|
+
return io.of(new ro(L.cursor(n.from), "start", "start", n.top - e, t, !0));
|
|
8481
8472
|
}
|
|
8482
8473
|
setTabFocusMode(e) {
|
|
8483
8474
|
e == null ? this.inputState.tabFocusMode = this.inputState.tabFocusMode < 0 ? 0 : -1 : typeof e == "boolean" ? this.inputState.tabFocusMode = e ? 0 : -1 : this.inputState.tabFocusMode != 0 && (this.inputState.tabFocusMode = Date.now() + e);
|
|
@@ -8489,25 +8480,25 @@ var gl = class {
|
|
|
8489
8480
|
return uo.define(() => ({}), { eventObservers: e });
|
|
8490
8481
|
}
|
|
8491
8482
|
static theme(e, t) {
|
|
8492
|
-
let n =
|
|
8483
|
+
let n = gi.newName(), r = [nl.of(n), Co.of(cl(`.${n}`, e))];
|
|
8493
8484
|
return t && t.dark && r.push(rl.of(!0)), r;
|
|
8494
8485
|
}
|
|
8495
8486
|
static baseTheme(e) {
|
|
8496
|
-
return
|
|
8487
|
+
return mr.lowest(Co.of(cl("." + il, e, sl)));
|
|
8497
8488
|
}
|
|
8498
8489
|
static findFromDOM(e) {
|
|
8499
8490
|
let t = e.querySelector(".cm-content");
|
|
8500
8491
|
return (t && K.get(t) || K.get(e))?.root?.view || null;
|
|
8501
8492
|
}
|
|
8502
8493
|
};
|
|
8503
|
-
J.styleModule = Co, J.inputHandler = Xa, J.clipboardInputFilter = Qa, J.clipboardOutputFilter = $a, J.scrollHandler = no, J.focusChangeEffect = Za, J.perLineTextDirection = eo, J.exceptionSink = Ja, J.updateListener = Ya, J.editable = so, J.mouseSelectionStyle = qa, J.dragMovesSelection = Ka, J.clickAddsSelectionRange = Ga, J.decorations = ho, J.blockWrappers = go, J.outerDecorations = _o, J.atomicRanges = vo, J.bidiIsolatedRanges = yo, J.cursorScrollMargin = /* @__PURE__ */
|
|
8494
|
+
J.styleModule = Co, J.inputHandler = Xa, J.clipboardInputFilter = Qa, J.clipboardOutputFilter = $a, J.scrollHandler = no, J.focusChangeEffect = Za, J.perLineTextDirection = eo, J.exceptionSink = Ja, J.updateListener = Ya, J.editable = so, J.mouseSelectionStyle = qa, J.dragMovesSelection = Ka, J.clickAddsSelectionRange = Ga, J.decorations = ho, J.blockWrappers = go, J.outerDecorations = _o, J.atomicRanges = vo, J.bidiIsolatedRanges = yo, J.cursorScrollMargin = /* @__PURE__ */ R.define({ combine: (e) => {
|
|
8504
8495
|
let t = 5, n = 5;
|
|
8505
8496
|
for (let r of e) typeof r == "number" ? t = n = r : {x: t, y: n} = r;
|
|
8506
8497
|
return {
|
|
8507
8498
|
x: t,
|
|
8508
8499
|
y: n
|
|
8509
8500
|
};
|
|
8510
|
-
} }), J.scrollMargins = xo, J.darkTheme = rl, J.cspNonce = /* @__PURE__ */
|
|
8501
|
+
} }), J.scrollMargins = xo, J.darkTheme = rl, J.cspNonce = /* @__PURE__ */ R.define({ combine: (e) => e.length ? e[0] : "" }), J.contentAttributes = mo, J.editorAttributes = po, J.lineWrapping = /* @__PURE__ */ J.contentAttributes.of({ class: "cm-lineWrapping" }), J.announce = /* @__PURE__ */ z.define();
|
|
8511
8502
|
var _l = 4096, vl = {}, yl = class e {
|
|
8512
8503
|
constructor(e, t, n, r, i, a) {
|
|
8513
8504
|
this.from = e, this.to = t, this.dir = n, this.isolates = r, this.fresh = i, this.order = a;
|
|
@@ -8525,11 +8516,11 @@ var _l = 4096, vl = {}, yl = class e {
|
|
|
8525
8516
|
function bl(e, t, n) {
|
|
8526
8517
|
for (let r = e.state.facet(t), i = r.length - 1; i >= 0; i--) {
|
|
8527
8518
|
let t = r[i], a = typeof t == "function" ? t(e) : t;
|
|
8528
|
-
a &&
|
|
8519
|
+
a && Li(a, n);
|
|
8529
8520
|
}
|
|
8530
8521
|
return n;
|
|
8531
8522
|
}
|
|
8532
|
-
var xl =
|
|
8523
|
+
var xl = H.mac ? "mac" : H.windows ? "win" : H.linux ? "linux" : "key";
|
|
8533
8524
|
function Sl(e, t) {
|
|
8534
8525
|
let n = e.split(/-(?!$)/), r = n[n.length - 1];
|
|
8535
8526
|
r == "Space" && (r = " ");
|
|
@@ -8548,9 +8539,9 @@ function Sl(e, t) {
|
|
|
8548
8539
|
function Cl(e, t, n) {
|
|
8549
8540
|
return t.altKey && (e = "Alt-" + e), t.ctrlKey && (e = "Ctrl-" + e), t.metaKey && (e = "Meta-" + e), n !== !1 && t.shiftKey && (e = "Shift-" + e), e;
|
|
8550
8541
|
}
|
|
8551
|
-
var wl = /* @__PURE__ */
|
|
8542
|
+
var wl = /* @__PURE__ */ mr.default(/* @__PURE__ */ J.domEventHandlers({ keydown(e, t) {
|
|
8552
8543
|
return Ml(Dl(t.state), e, t, "editor");
|
|
8553
|
-
} })), Tl = /* @__PURE__ */
|
|
8544
|
+
} })), Tl = /* @__PURE__ */ R.define({ enables: wl }), El = /* @__PURE__ */ new WeakMap();
|
|
8554
8545
|
function Dl(e) {
|
|
8555
8546
|
let t = e.facet(Tl), n = El.get(t);
|
|
8556
8547
|
return n || El.set(t, n = Al(t.reduce((e, t) => e.concat(t), []))), n;
|
|
@@ -8609,7 +8600,7 @@ function Al(e, t = xl) {
|
|
|
8609
8600
|
var jl = null;
|
|
8610
8601
|
function Ml(e, t, n, r) {
|
|
8611
8602
|
jl = t;
|
|
8612
|
-
let i =
|
|
8603
|
+
let i = Ti(t), a = Kn(Gn(i, 0)) == i.length && i != " ", o = "", s = !1, c = !1, l = !1;
|
|
8613
8604
|
Ol && Ol.view == n && Ol.scope == r && (o = Ol.prefix + " ", Ws.indexOf(t.keyCode) < 0 && (c = !0, Ol = null));
|
|
8614
8605
|
let u = /* @__PURE__ */ new Set(), d = (e) => {
|
|
8615
8606
|
if (e) {
|
|
@@ -8618,7 +8609,7 @@ function Ml(e, t, n, r) {
|
|
|
8618
8609
|
}
|
|
8619
8610
|
return !1;
|
|
8620
8611
|
}, f = e[r], p, m;
|
|
8621
|
-
return f && (d(f[o + Cl(i, t, !a)]) ? s = !0 : a && (t.altKey || t.metaKey || t.ctrlKey) && !(
|
|
8612
|
+
return f && (d(f[o + Cl(i, t, !a)]) ? s = !0 : a && (t.altKey || t.metaKey || t.ctrlKey) && !(H.windows && t.ctrlKey && t.altKey) && !(H.mac && t.altKey && !(t.ctrlKey || t.metaKey)) && (p = yi[t.keyCode]) && p != i ? (d(f[o + Cl(p, t, !0)]) || t.shiftKey && (m = bi[t.keyCode]) != i && m != p && d(f[o + Cl(m, t, !1)])) && (s = !0) : a && t.shiftKey && d(f[o + Cl(i, t, !0)]) && (s = !0), !s && d(f._any) && (s = !0)), c && (s = !0), s && l && t.stopPropagation(), jl = null, s;
|
|
8622
8613
|
}
|
|
8623
8614
|
var Nl = class e {
|
|
8624
8615
|
constructor(e, t, n, r, i) {
|
|
@@ -8670,11 +8661,11 @@ function Fl(e, t, n, r) {
|
|
|
8670
8661
|
}
|
|
8671
8662
|
function Il(e, t, n) {
|
|
8672
8663
|
if (n.to <= e.viewport.from || n.from >= e.viewport.to) return [];
|
|
8673
|
-
let r = Math.max(n.from, e.viewport.from), i = Math.min(n.to, e.viewport.to), a = e.textDirection == W.LTR, o = e.contentDOM, s = o.getBoundingClientRect(), c = Pl(e), l = o.querySelector(".cm-line"), u = l && window.getComputedStyle(l), d = s.left + (u ? parseInt(u.paddingLeft) + Math.min(0, parseInt(u.textIndent)) : 0), f = s.right - (u ? parseInt(u.paddingRight) : 0), p = ms(e, r, 1), m = ms(e, i, -1), h = p.type ==
|
|
8664
|
+
let r = Math.max(n.from, e.viewport.from), i = Math.min(n.to, e.viewport.to), a = e.textDirection == W.LTR, o = e.contentDOM, s = o.getBoundingClientRect(), c = Pl(e), l = o.querySelector(".cm-line"), u = l && window.getComputedStyle(l), d = s.left + (u ? parseInt(u.paddingLeft) + Math.min(0, parseInt(u.textIndent)) : 0), f = s.right - (u ? parseInt(u.paddingRight) : 0), p = ms(e, r, 1), m = ms(e, i, -1), h = p.type == Wi.Text ? p : null, g = m.type == Wi.Text ? m : null;
|
|
8674
8665
|
if (h && (e.lineWrapping || p.widgetLineBreaks) && (h = Fl(e, r, 1, h)), g && (e.lineWrapping || m.widgetLineBreaks) && (g = Fl(e, i, -1, g)), h && g && h.from == g.from && h.to == g.to) return v(y(n.from, n.to, h));
|
|
8675
8666
|
{
|
|
8676
8667
|
let t = h ? y(n.from, null, h) : b(p, !1), r = g ? y(null, n.to, g) : b(m, !0), i = [];
|
|
8677
|
-
return (h || p).to < (g || m).from - (h && g ? 1 : 0) || p.widgetLineBreaks > 1 && t.bottom + e.defaultLineHeight / 2 < r.top ? i.push(_(d, t.bottom, f, r.top)) : t.bottom < r.top && e.elementAtHeight((t.bottom + r.top) / 2).type ==
|
|
8668
|
+
return (h || p).to < (g || m).from - (h && g ? 1 : 0) || p.widgetLineBreaks > 1 && t.bottom + e.defaultLineHeight / 2 < r.top ? i.push(_(d, t.bottom, f, r.top)) : t.bottom < r.top && e.elementAtHeight((t.bottom + r.top) / 2).type == Wi.Text && (t.bottom = r.top = (t.bottom + r.top) / 2), v(t).concat(i).concat(v(r));
|
|
8678
8669
|
}
|
|
8679
8670
|
function _(e, n, r, i) {
|
|
8680
8671
|
return new Nl(t, e - c.left, n - c.top, Math.max(0, r - e), i - n);
|
|
@@ -8751,18 +8742,18 @@ var Rl = class {
|
|
|
8751
8742
|
let e = t.nextSibling;
|
|
8752
8743
|
t.remove(), t = e;
|
|
8753
8744
|
}
|
|
8754
|
-
this.drawn = e,
|
|
8745
|
+
this.drawn = e, H.webkit && (this.dom.style.display = this.dom.firstChild ? "" : "none");
|
|
8755
8746
|
}
|
|
8756
8747
|
}
|
|
8757
8748
|
destroy() {
|
|
8758
8749
|
this.layer.destroy && this.layer.destroy(this.dom, this.view), this.dom.remove();
|
|
8759
8750
|
}
|
|
8760
|
-
}, zl = /* @__PURE__ */
|
|
8751
|
+
}, zl = /* @__PURE__ */ R.define();
|
|
8761
8752
|
function Bl(e) {
|
|
8762
8753
|
return [uo.define((t) => new Rl(t, e)), zl.of(e)];
|
|
8763
8754
|
}
|
|
8764
|
-
var Vl = /* @__PURE__ */
|
|
8765
|
-
return
|
|
8755
|
+
var Vl = /* @__PURE__ */ R.define({ combine(e) {
|
|
8756
|
+
return Kr(e, {
|
|
8766
8757
|
cursorBlinkRate: 1200,
|
|
8767
8758
|
drawRangeCursor: !0,
|
|
8768
8759
|
iosSelectionHandles: !0
|
|
@@ -8789,8 +8780,8 @@ var Wl = /* @__PURE__ */ Bl({
|
|
|
8789
8780
|
let { state: t } = e, n = t.facet(Vl), r = [];
|
|
8790
8781
|
for (let i of t.selection.ranges) {
|
|
8791
8782
|
let a = i == t.selection.main;
|
|
8792
|
-
if (i.empty || n.drawRangeCursor && !(a &&
|
|
8793
|
-
let t = a ? "cm-cursor cm-cursor-primary" : "cm-cursor cm-cursor-secondary", n = i.empty ? i :
|
|
8783
|
+
if (i.empty || n.drawRangeCursor && !(a && H.ios && n.iosSelectionHandles)) {
|
|
8784
|
+
let t = a ? "cm-cursor cm-cursor-primary" : "cm-cursor cm-cursor-secondary", n = i.empty ? i : L.cursor(i.head, i.assoc);
|
|
8794
8785
|
for (let i of Nl.forRange(e, t, n)) r.push(i);
|
|
8795
8786
|
}
|
|
8796
8787
|
}
|
|
@@ -8814,9 +8805,9 @@ var Kl = /* @__PURE__ */ Bl({
|
|
|
8814
8805
|
markers(e) {
|
|
8815
8806
|
let t = [], { main: n, ranges: r } = e.state.selection;
|
|
8816
8807
|
for (let n of r) if (!n.empty) for (let r of Nl.forRange(e, "cm-selectionBackground", n)) t.push(r);
|
|
8817
|
-
if (
|
|
8818
|
-
for (let r of Nl.forRange(e, "cm-selectionHandle cm-selectionHandle-start",
|
|
8819
|
-
for (let r of Nl.forRange(e, "cm-selectionHandle cm-selectionHandle-end",
|
|
8808
|
+
if (H.ios && !n.empty && e.state.facet(Vl).iosSelectionHandles) {
|
|
8809
|
+
for (let r of Nl.forRange(e, "cm-selectionHandle cm-selectionHandle-start", L.cursor(n.from, 1))) t.push(r);
|
|
8810
|
+
for (let r of Nl.forRange(e, "cm-selectionHandle cm-selectionHandle-end", L.cursor(n.to, 1))) t.push(r);
|
|
8820
8811
|
}
|
|
8821
8812
|
return t;
|
|
8822
8813
|
},
|
|
@@ -8824,7 +8815,7 @@ var Kl = /* @__PURE__ */ Bl({
|
|
|
8824
8815
|
return e.docChanged || e.selectionSet || e.viewportChanged || Ul(e);
|
|
8825
8816
|
},
|
|
8826
8817
|
class: "cm-selectionLayer"
|
|
8827
|
-
}), ql = /* @__PURE__ */
|
|
8818
|
+
}), ql = /* @__PURE__ */ mr.highest(/* @__PURE__ */ J.theme({
|
|
8828
8819
|
".cm-line": {
|
|
8829
8820
|
"& ::selection, &::selection": { backgroundColor: "transparent !important" },
|
|
8830
8821
|
caretColor: "transparent !important"
|
|
@@ -8856,7 +8847,7 @@ var Yl = /* @__PURE__ */ U.line({ class: "cm-activeLine" }), Xl = /* @__PURE__ *
|
|
|
8856
8847
|
}
|
|
8857
8848
|
return U.set(n);
|
|
8858
8849
|
}
|
|
8859
|
-
}, { decorations: (e) => e.decorations }), Zl = class extends
|
|
8850
|
+
}, { decorations: (e) => e.decorations }), Zl = class extends Ui {
|
|
8860
8851
|
constructor(e) {
|
|
8861
8852
|
super(), this.content = e;
|
|
8862
8853
|
}
|
|
@@ -8893,7 +8884,7 @@ function Ql(e) {
|
|
|
8893
8884
|
}, { decorations: (e) => e.decorations });
|
|
8894
8885
|
return typeof e == "string" ? [t, J.contentAttributes.of({ "aria-placeholder": e })] : t;
|
|
8895
8886
|
}
|
|
8896
|
-
var $l = class extends
|
|
8887
|
+
var $l = class extends qr {
|
|
8897
8888
|
compare(e) {
|
|
8898
8889
|
return this == e || this.constructor == e.constructor && this.eq(e);
|
|
8899
8890
|
}
|
|
@@ -8903,7 +8894,7 @@ var $l = class extends Jr {
|
|
|
8903
8894
|
destroy(e) {}
|
|
8904
8895
|
};
|
|
8905
8896
|
$l.prototype.elementClass = "", $l.prototype.toDOM = void 0, $l.prototype.mapMode = Jn.TrackBefore, $l.prototype.startSide = $l.prototype.endSide = -1, $l.prototype.point = !0;
|
|
8906
|
-
var eu = /* @__PURE__ */
|
|
8897
|
+
var eu = /* @__PURE__ */ R.define(), tu = /* @__PURE__ */ R.define(), nu = /* @__PURE__ */ R.define(), ru = /* @__PURE__ */ R.define({ combine: (e) => e.some((e) => e) });
|
|
8907
8898
|
function iu(e) {
|
|
8908
8899
|
let t = [au];
|
|
8909
8900
|
return e && e.fixed === !1 && t.push(ru.of(!0)), t;
|
|
@@ -8931,15 +8922,15 @@ var au = /* @__PURE__ */ uo.fromClass(class {
|
|
|
8931
8922
|
syncGutters(e) {
|
|
8932
8923
|
let t = this.dom.nextSibling;
|
|
8933
8924
|
e && (this.dom.remove(), this.domAfter && this.domAfter.remove());
|
|
8934
|
-
let n =
|
|
8925
|
+
let n = V.iter(this.view.state.facet(eu), this.view.viewport.from), r = [], i = this.gutters.map((e) => new cu(e, this.view.viewport, -this.view.documentPadding.top));
|
|
8935
8926
|
for (let e of this.view.viewportLineBlocks) if (r.length && (r = []), Array.isArray(e.type)) {
|
|
8936
8927
|
let t = !0;
|
|
8937
|
-
for (let a of e.type) if (a.type ==
|
|
8928
|
+
for (let a of e.type) if (a.type == Wi.Text && t) {
|
|
8938
8929
|
su(n, r, a.from);
|
|
8939
8930
|
for (let e of i) e.line(this.view, a, r);
|
|
8940
8931
|
t = !1;
|
|
8941
8932
|
} else if (a.widget) for (let e of i) e.widget(this.view, a);
|
|
8942
|
-
} else if (e.type ==
|
|
8933
|
+
} else if (e.type == Wi.Text) {
|
|
8943
8934
|
su(n, r, e.from);
|
|
8944
8935
|
for (let t of i) t.line(this.view, e, r);
|
|
8945
8936
|
} else if (e.widget) for (let t of i) t.widget(this.view, e);
|
|
@@ -8947,7 +8938,7 @@ var au = /* @__PURE__ */ uo.fromClass(class {
|
|
|
8947
8938
|
e && (this.view.scrollDOM.insertBefore(this.dom, t), this.domAfter && this.view.scrollDOM.appendChild(this.domAfter));
|
|
8948
8939
|
}
|
|
8949
8940
|
updateGutters(e) {
|
|
8950
|
-
let t = e.startState.facet(nu), n = e.state.facet(nu), r = e.docChanged || e.heightChanged || e.viewportChanged || !
|
|
8941
|
+
let t = e.startState.facet(nu), n = e.state.facet(nu), r = e.docChanged || e.heightChanged || e.viewportChanged || !V.eq(e.startState.facet(eu), e.state.facet(eu), e.view.viewport.from, e.view.viewport.to);
|
|
8951
8942
|
if (t == n) for (let t of this.gutters) t.update(e) && (r = !0);
|
|
8952
8943
|
else {
|
|
8953
8944
|
r = !0;
|
|
@@ -8986,7 +8977,7 @@ function su(e, t, n) {
|
|
|
8986
8977
|
}
|
|
8987
8978
|
var cu = class {
|
|
8988
8979
|
constructor(e, t, n) {
|
|
8989
|
-
this.gutter = e, this.height = n, this.i = 0, this.cursor =
|
|
8980
|
+
this.gutter = e, this.height = n, this.i = 0, this.cursor = V.iter(e.markers, t.from);
|
|
8990
8981
|
}
|
|
8991
8982
|
addElement(e, t, n) {
|
|
8992
8983
|
let { gutter: r } = this, i = (t.top - this.height) / e.scaleY, a = t.height / e.scaleY;
|
|
@@ -9041,7 +9032,7 @@ var cu = class {
|
|
|
9041
9032
|
t != this.spacer.markers[0] && this.spacer.update(e.view, 0, 0, [t]);
|
|
9042
9033
|
}
|
|
9043
9034
|
let n = e.view.viewport;
|
|
9044
|
-
return !
|
|
9035
|
+
return !V.eq(this.markers, t, n.from, n.to) || (this.config.lineMarkerChange ? this.config.lineMarkerChange(e) : !1);
|
|
9045
9036
|
}
|
|
9046
9037
|
destroy() {
|
|
9047
9038
|
for (let e of this.elements) e.destroy();
|
|
@@ -9087,8 +9078,8 @@ function du(e, t) {
|
|
|
9087
9078
|
for (let n = 0; n < e.length; n++) if (!e[n].compare(t[n])) return !1;
|
|
9088
9079
|
return !0;
|
|
9089
9080
|
}
|
|
9090
|
-
var fu = /* @__PURE__ */
|
|
9091
|
-
return
|
|
9081
|
+
var fu = /* @__PURE__ */ R.define(), pu = /* @__PURE__ */ R.define(), mu = /* @__PURE__ */ R.define({ combine(e) {
|
|
9082
|
+
return Kr(e, {
|
|
9092
9083
|
formatNumber: String,
|
|
9093
9084
|
domEventHandlers: {}
|
|
9094
9085
|
}, { domEventHandlers(e, t) {
|
|
@@ -11502,13 +11493,13 @@ var Yf = new sd((e, t) => {
|
|
|
11502
11493
|
tokenPrec: 0
|
|
11503
11494
|
}), $f = /* @__PURE__ */ new Y();
|
|
11504
11495
|
function ep(e) {
|
|
11505
|
-
return
|
|
11496
|
+
return R.define({ combine: e ? (t) => t.concat(e) : void 0 });
|
|
11506
11497
|
}
|
|
11507
11498
|
var tp = /* @__PURE__ */ new Y(), np = class {
|
|
11508
11499
|
constructor(e, t, n = [], r = "") {
|
|
11509
|
-
this.data = e, this.name = r,
|
|
11500
|
+
this.data = e, this.name = r, B.prototype.hasOwnProperty("tree") || Object.defineProperty(B.prototype, "tree", { get() {
|
|
11510
11501
|
return ap(this);
|
|
11511
|
-
} }), this.parser = t, this.extension = [mp.of(this),
|
|
11502
|
+
} }), this.parser = t, this.extension = [mp.of(this), B.languageData.of((e, t, n) => {
|
|
11512
11503
|
let r = rp(e, t, n), i = r.type.prop($f);
|
|
11513
11504
|
if (!i) return [];
|
|
11514
11505
|
let a = e.facet(i), o = r.type.prop(tp);
|
|
@@ -11568,7 +11559,7 @@ var tp = /* @__PURE__ */ new Y(), np = class {
|
|
|
11568
11559
|
return !0;
|
|
11569
11560
|
}
|
|
11570
11561
|
};
|
|
11571
|
-
np.setState = /* @__PURE__ */
|
|
11562
|
+
np.setState = /* @__PURE__ */ z.define();
|
|
11572
11563
|
function rp(e, t, n) {
|
|
11573
11564
|
let r = e.facet(mp), i = ap(e).topNode;
|
|
11574
11565
|
if (!r || r.allowsNesting) for (let e = i; e; e = e.enter(t, n, X.ExcludeBuffers | X.EnterBracketed)) e.type.isTop && (i = e);
|
|
@@ -11754,7 +11745,7 @@ var up = class e {
|
|
|
11754
11745
|
return r.work(20, n) || r.takeTree(), new e(r);
|
|
11755
11746
|
}
|
|
11756
11747
|
};
|
|
11757
|
-
np.state = /* @__PURE__ */
|
|
11748
|
+
np.state = /* @__PURE__ */ dr.define({
|
|
11758
11749
|
create: up.init,
|
|
11759
11750
|
update(e, t) {
|
|
11760
11751
|
for (let e of t.effects) if (e.is(np.setState)) return e.value;
|
|
@@ -11804,7 +11795,7 @@ var fp = typeof navigator < "u" && navigator.scheduling?.isInputPending ? () =>
|
|
|
11804
11795
|
}
|
|
11805
11796
|
}, { eventHandlers: { focus() {
|
|
11806
11797
|
this.scheduleWork();
|
|
11807
|
-
} } }), mp = /* @__PURE__ */
|
|
11798
|
+
} } }), mp = /* @__PURE__ */ R.define({
|
|
11808
11799
|
combine(e) {
|
|
11809
11800
|
return e.length ? e[0] : null;
|
|
11810
11801
|
},
|
|
@@ -11820,7 +11811,7 @@ var fp = typeof navigator < "u" && navigator.scheduling?.isInputPending ? () =>
|
|
|
11820
11811
|
constructor(e, t = []) {
|
|
11821
11812
|
this.language = e, this.support = t, this.extension = [e, t];
|
|
11822
11813
|
}
|
|
11823
|
-
}, gp = /* @__PURE__ */
|
|
11814
|
+
}, gp = /* @__PURE__ */ R.define(), _p = /* @__PURE__ */ R.define({ combine: (e) => {
|
|
11824
11815
|
if (!e.length) return " ";
|
|
11825
11816
|
let t = e[0];
|
|
11826
11817
|
if (!t || /\S/.test(t) || Array.from(t).some((e) => e != t[0])) throw Error("Invalid indent unit: " + JSON.stringify(e[0]));
|
|
@@ -11840,7 +11831,7 @@ function yp(e, t) {
|
|
|
11840
11831
|
return n;
|
|
11841
11832
|
}
|
|
11842
11833
|
function bp(e, t) {
|
|
11843
|
-
e instanceof
|
|
11834
|
+
e instanceof B && (e = new xp(e));
|
|
11844
11835
|
for (let n of e.state.facet(gp)) {
|
|
11845
11836
|
let r = n(e, t);
|
|
11846
11837
|
if (r !== void 0) return r;
|
|
@@ -11875,7 +11866,7 @@ var xp = class {
|
|
|
11875
11866
|
return a > -1 && (i += a - this.countColumn(n, n.search(/\S|$/))), i;
|
|
11876
11867
|
}
|
|
11877
11868
|
countColumn(e, t = e.length) {
|
|
11878
|
-
return
|
|
11869
|
+
return ui(e, this.state.tabSize, t);
|
|
11879
11870
|
}
|
|
11880
11871
|
lineIndent(e, t = 1) {
|
|
11881
11872
|
let { text: n, from: r } = this.lineAt(e, t), i = this.options.overrideIndentation;
|
|
@@ -11996,19 +11987,19 @@ var Fp = class e {
|
|
|
11996
11987
|
this.specs = e;
|
|
11997
11988
|
let n;
|
|
11998
11989
|
function r(e) {
|
|
11999
|
-
let t =
|
|
11990
|
+
let t = gi.newName();
|
|
12000
11991
|
return (n ||= Object.create(null))["." + t] = e, t;
|
|
12001
11992
|
}
|
|
12002
11993
|
let i = typeof t.all == "string" ? t.all : t.all ? r(t.all) : void 0, a = t.scope;
|
|
12003
11994
|
this.scope = a instanceof np ? (e) => e.prop($f) == a.data : a ? (e) => e == a : void 0, this.style = Pd(e.map((e) => ({
|
|
12004
11995
|
tag: e.tag,
|
|
12005
11996
|
class: e.class || r(Object.assign({}, e, { tag: null }))
|
|
12006
|
-
})), { all: i }).style, this.module = n ? new
|
|
11997
|
+
})), { all: i }).style, this.module = n ? new gi(n) : null, this.themeType = t.themeType;
|
|
12007
11998
|
}
|
|
12008
11999
|
static define(t, n) {
|
|
12009
12000
|
return new e(t, n || {});
|
|
12010
12001
|
}
|
|
12011
|
-
}, Ip = /* @__PURE__ */
|
|
12002
|
+
}, Ip = /* @__PURE__ */ R.define(), Lp = /* @__PURE__ */ R.define({ combine(e) {
|
|
12012
12003
|
return e.length ? [e[0]] : null;
|
|
12013
12004
|
} });
|
|
12014
12005
|
function Rp(e) {
|
|
@@ -12029,13 +12020,13 @@ var Bp = class {
|
|
|
12029
12020
|
}
|
|
12030
12021
|
buildDeco(e, t) {
|
|
12031
12022
|
if (!t || !this.tree.length) return U.none;
|
|
12032
|
-
let n = new
|
|
12023
|
+
let n = new $r();
|
|
12033
12024
|
for (let { from: r, to: i } of e.visibleRanges) Id(this.tree, t, (e, t, r) => {
|
|
12034
12025
|
n.add(e, t, this.markCache[r] || (this.markCache[r] = U.mark({ class: r })));
|
|
12035
12026
|
}, r, i);
|
|
12036
12027
|
return n.finish();
|
|
12037
12028
|
}
|
|
12038
|
-
}, Vp = /* @__PURE__ */
|
|
12029
|
+
}, Vp = /* @__PURE__ */ mr.high(/* @__PURE__ */ uo.fromClass(Bp, { decorations: (e) => e.decorations }));
|
|
12039
12030
|
$.meta, $.link, $.heading, $.emphasis, $.strong, $.strikethrough, $.keyword, $.atom, $.bool, $.url, $.contentSeparator, $.labelName, $.literal, $.inserted, $.string, $.deleted, $.regexp, $.escape, $.string, $.variableName, $.variableName, $.typeName, $.namespace, $.className, $.variableName, $.macroName, $.propertyName, $.comment, $.invalid;
|
|
12040
12031
|
var Hp = 1e4, Up = "()[]{}", Wp = /* @__PURE__ */ new Y();
|
|
12041
12032
|
function Gp(e, t, n) {
|
|
@@ -12342,8 +12333,8 @@ function hm(e, t, n = t.selection.ranges) {
|
|
|
12342
12333
|
}
|
|
12343
12334
|
return null;
|
|
12344
12335
|
}
|
|
12345
|
-
var gm = /* @__PURE__ */
|
|
12346
|
-
return
|
|
12336
|
+
var gm = /* @__PURE__ */ kr.define(), _m = /* @__PURE__ */ kr.define(), vm = /* @__PURE__ */ R.define(), ym = /* @__PURE__ */ R.define({ combine(e) {
|
|
12337
|
+
return Kr(e, {
|
|
12347
12338
|
minDepth: 100,
|
|
12348
12339
|
newGroupDelay: 500,
|
|
12349
12340
|
joinToEvent: (e, t) => t
|
|
@@ -12352,7 +12343,7 @@ var gm = /* @__PURE__ */ Ar.define(), _m = /* @__PURE__ */ Ar.define(), vm = /*
|
|
|
12352
12343
|
newGroupDelay: Math.min,
|
|
12353
12344
|
joinToEvent: (e, t) => (n, r) => e(n, r) || t(n, r)
|
|
12354
12345
|
});
|
|
12355
|
-
} }), bm = /* @__PURE__ */
|
|
12346
|
+
} }), bm = /* @__PURE__ */ dr.define({
|
|
12356
12347
|
create() {
|
|
12357
12348
|
return zm.empty;
|
|
12358
12349
|
},
|
|
@@ -12363,8 +12354,8 @@ var gm = /* @__PURE__ */ Ar.define(), _m = /* @__PURE__ */ Ar.define(), vm = /*
|
|
|
12363
12354
|
return o = i ? Om(o, o.length, n.minDepth, i) : Pm(o, t.startState.selection), new zm(a == 0 ? r.rest : o, a == 0 ? o : r.rest);
|
|
12364
12355
|
}
|
|
12365
12356
|
let i = t.annotation(_m);
|
|
12366
|
-
if ((i == "full" || i == "before") && (e = e.isolate()), t.annotation(
|
|
12367
|
-
let a = Dm.fromTransaction(t), o = t.annotation(
|
|
12357
|
+
if ((i == "full" || i == "before") && (e = e.isolate()), t.annotation(Mr.addToHistory) === !1) return t.changes.empty ? e : e.addMapping(t.changes.desc);
|
|
12358
|
+
let a = Dm.fromTransaction(t), o = t.annotation(Mr.time), s = t.annotation(Mr.userEvent);
|
|
12368
12359
|
return a ? e = e.addChanges(a, o, s, n, t) : t.selection && (e = e.addSelection(t.startState.selection, o, s, n.newGroupDelay)), (i == "full" || i == "after") && (e = e.isolate()), e;
|
|
12369
12360
|
},
|
|
12370
12361
|
toJSON(e) {
|
|
@@ -12412,7 +12403,7 @@ var Cm = /* @__PURE__ */ Sm(0, !1), wm = /* @__PURE__ */ Sm(1, !1), Tm = /* @__P
|
|
|
12412
12403
|
};
|
|
12413
12404
|
}
|
|
12414
12405
|
static fromJSON(t) {
|
|
12415
|
-
return new e(t.changes && Xn.fromJSON(t.changes), [], t.mapped && Yn.fromJSON(t.mapped), t.startSelection &&
|
|
12406
|
+
return new e(t.changes && Xn.fromJSON(t.changes), [], t.mapped && Yn.fromJSON(t.mapped), t.startSelection && L.fromJSON(t.startSelection), t.selectionsAfter.map(L.fromJSON));
|
|
12416
12407
|
}
|
|
12417
12408
|
static fromTransaction(t, n) {
|
|
12418
12409
|
let r = Mm;
|
|
@@ -12472,7 +12463,7 @@ function Lm(e, t, n) {
|
|
|
12472
12463
|
let r = jm(e.selectionsAfter.length ? e.selectionsAfter.map((e) => e.map(t)) : Mm, n);
|
|
12473
12464
|
if (!e.changes) return Dm.selection(r);
|
|
12474
12465
|
let i = e.changes.map(t), a = t.mapDesc(e.changes, !0), o = e.mapped ? e.mapped.composeDesc(a) : a;
|
|
12475
|
-
return new Dm(i,
|
|
12466
|
+
return new Dm(i, z.mapEffects(e.effects, t), o, e.startSelection.map(a), r);
|
|
12476
12467
|
}
|
|
12477
12468
|
var Rm = /^(input\.type|delete)($|\.)/, zm = class e {
|
|
12478
12469
|
constructor(e, t, n = 0, r = void 0) {
|
|
@@ -12483,7 +12474,7 @@ var Rm = /^(input\.type|delete)($|\.)/, zm = class e {
|
|
|
12483
12474
|
}
|
|
12484
12475
|
addChanges(t, n, r, i, a) {
|
|
12485
12476
|
let o = this.done, s = o[o.length - 1];
|
|
12486
|
-
return o = s && s.changes && !s.changes.empty && t.changes && (!r || Rm.test(r)) && (!s.selectionsAfter.length && n - this.prevTime < i.newGroupDelay && i.joinToEvent(a, km(s.changes, t.changes)) || r == "input.type.compose") ? Om(o, o.length - 1, i.minDepth, new Dm(t.changes.compose(s.changes), jm(
|
|
12477
|
+
return o = s && s.changes && !s.changes.empty && t.changes && (!r || Rm.test(r)) && (!s.selectionsAfter.length && n - this.prevTime < i.newGroupDelay && i.joinToEvent(a, km(s.changes, t.changes)) || r == "input.type.compose") ? Om(o, o.length - 1, i.minDepth, new Dm(t.changes.compose(s.changes), jm(z.mapEffects(t.effects, s.changes), s.effects), s.mapped, s.startSelection, Mm)) : Om(o, o.length, i.minDepth, t), new e(o, Mm, n, r);
|
|
12487
12478
|
}
|
|
12488
12479
|
addSelection(t, n, r, i) {
|
|
12489
12480
|
let a = this.done.length ? this.done[this.done.length - 1].selectionsAfter : Mm;
|
|
@@ -12555,7 +12546,7 @@ var Bm = [
|
|
|
12555
12546
|
}
|
|
12556
12547
|
];
|
|
12557
12548
|
function Vm(e, t) {
|
|
12558
|
-
return
|
|
12549
|
+
return L.create(e.ranges.map(t), e.mainIndex);
|
|
12559
12550
|
}
|
|
12560
12551
|
function Hm(e, t) {
|
|
12561
12552
|
return e.update({
|
|
@@ -12569,7 +12560,7 @@ function Um({ state: e, dispatch: t }, n) {
|
|
|
12569
12560
|
return r.eq(e.selection, !0) ? !1 : (t(Hm(e, r)), !0);
|
|
12570
12561
|
}
|
|
12571
12562
|
function Wm(e, t) {
|
|
12572
|
-
return
|
|
12563
|
+
return L.cursor(t ? e.to : e.from);
|
|
12573
12564
|
}
|
|
12574
12565
|
function Gm(e, t) {
|
|
12575
12566
|
return Um(e, (n) => n.empty ? e.moveByChar(n, t) : Wm(n, t));
|
|
@@ -12596,7 +12587,7 @@ function $m(e, t, n) {
|
|
|
12596
12587
|
Qm(e, t, i) ? r = t : a = n ? t.to : t.from;
|
|
12597
12588
|
}
|
|
12598
12589
|
let a = r.type.prop(i), o, s;
|
|
12599
|
-
return s = a && (o = n ? qp(e, r.from, 1) : qp(e, r.to, -1)) && o.matched ? n ? o.end.to : o.end.from : n ? r.to : r.from,
|
|
12590
|
+
return s = a && (o = n ? qp(e, r.from, 1) : qp(e, r.to, -1)) && o.matched ? n ? o.end.to : o.end.from : n ? r.to : r.from, L.cursor(s, n ? -1 : 1);
|
|
12600
12591
|
}
|
|
12601
12592
|
var eh = (e) => Um(e, (t) => $m(e.state, t, !Km(e))), th = (e) => Um(e, (t) => $m(e.state, t, Km(e)));
|
|
12602
12593
|
function nh(e, t) {
|
|
@@ -12641,18 +12632,18 @@ function lh(e, t, n) {
|
|
|
12641
12632
|
let r = e.lineBlockAt(t.head), i = e.moveToLineBoundary(t, n);
|
|
12642
12633
|
if (i.head == t.head && i.head != (n ? r.to : r.from) && (i = e.moveToLineBoundary(t, n, !1)), !n && i.head == r.from && r.length) {
|
|
12643
12634
|
let n = /^\s*/.exec(e.state.sliceDoc(r.from, Math.min(r.from + 100, r.to)))[0].length;
|
|
12644
|
-
n && t.head != r.from + n && (i =
|
|
12635
|
+
n && t.head != r.from + n && (i = L.cursor(r.from + n));
|
|
12645
12636
|
}
|
|
12646
12637
|
return i;
|
|
12647
12638
|
}
|
|
12648
|
-
var uh = (e) => Um(e, (t) => lh(e, t, !0)), dh = (e) => Um(e, (t) => lh(e, t, !1)), fh = (e) => Um(e, (t) => lh(e, t, !Km(e))), ph = (e) => Um(e, (t) => lh(e, t, Km(e))), mh = (e) => Um(e, (t) =>
|
|
12639
|
+
var uh = (e) => Um(e, (t) => lh(e, t, !0)), dh = (e) => Um(e, (t) => lh(e, t, !1)), fh = (e) => Um(e, (t) => lh(e, t, !Km(e))), ph = (e) => Um(e, (t) => lh(e, t, Km(e))), mh = (e) => Um(e, (t) => L.cursor(e.lineBlockAt(t.head).from, 1)), hh = (e) => Um(e, (t) => L.cursor(e.lineBlockAt(t.head).to, -1));
|
|
12649
12640
|
function gh(e, t, n) {
|
|
12650
12641
|
let r = !1, i = Vm(e.selection, (t) => {
|
|
12651
12642
|
let i = qp(e, t.head, -1) || qp(e, t.head, 1) || t.head > 0 && qp(e, t.head - 1, 1) || t.head < e.doc.length && qp(e, t.head + 1, -1);
|
|
12652
12643
|
if (!i || !i.end) return t;
|
|
12653
12644
|
r = !0;
|
|
12654
12645
|
let a = i.start.from == t.head ? i.end.to : i.end.from;
|
|
12655
|
-
return n ?
|
|
12646
|
+
return n ? L.range(t.anchor, a) : L.cursor(a);
|
|
12656
12647
|
});
|
|
12657
12648
|
return r ? (t(Hm(e, i)), !0) : !1;
|
|
12658
12649
|
}
|
|
@@ -12660,7 +12651,7 @@ var _h = ({ state: e, dispatch: t }) => gh(e, t, !1);
|
|
|
12660
12651
|
function vh(e, t) {
|
|
12661
12652
|
let n = Vm(e.state.selection, (e) => {
|
|
12662
12653
|
let n = t(e);
|
|
12663
|
-
return
|
|
12654
|
+
return L.range(e.anchor, n.head, n.goalColumn, n.bidiLevel || void 0, n.assoc);
|
|
12664
12655
|
});
|
|
12665
12656
|
return n.eq(e.state.selection) ? !1 : (e.dispatch(Hm(e.state, n)), !0);
|
|
12666
12657
|
}
|
|
@@ -12679,7 +12670,7 @@ var Oh = (e) => Dh(e, !1), kh = (e) => Dh(e, !0);
|
|
|
12679
12670
|
function Ah(e, t) {
|
|
12680
12671
|
return vh(e, (n) => e.moveVertically(n, t, ah(e).height));
|
|
12681
12672
|
}
|
|
12682
|
-
var jh = (e) => Ah(e, !1), Mh = (e) => Ah(e, !0), Nh = (e) => vh(e, (t) => lh(e, t, !0)), Ph = (e) => vh(e, (t) => lh(e, t, !1)), Fh = (e) => vh(e, (t) => lh(e, t, !Km(e))), Ih = (e) => vh(e, (t) => lh(e, t, Km(e))), Lh = (e) => vh(e, (t) =>
|
|
12673
|
+
var jh = (e) => Ah(e, !1), Mh = (e) => Ah(e, !0), Nh = (e) => vh(e, (t) => lh(e, t, !0)), Ph = (e) => vh(e, (t) => lh(e, t, !1)), Fh = (e) => vh(e, (t) => lh(e, t, !Km(e))), Ih = (e) => vh(e, (t) => lh(e, t, Km(e))), Lh = (e) => vh(e, (t) => L.cursor(e.lineBlockAt(t.head).from)), Rh = (e) => vh(e, (t) => L.cursor(e.lineBlockAt(t.head).to)), zh = ({ state: e, dispatch: t }) => (t(Hm(e, { anchor: 0 })), !0), Bh = ({ state: e, dispatch: t }) => (t(Hm(e, { anchor: e.doc.length })), !0), Vh = ({ state: e, dispatch: t }) => (t(Hm(e, {
|
|
12683
12674
|
anchor: e.selection.main.anchor,
|
|
12684
12675
|
head: 0
|
|
12685
12676
|
})), !0), Hh = ({ state: e, dispatch: t }) => (t(Hm(e, {
|
|
@@ -12692,9 +12683,9 @@ var jh = (e) => Ah(e, !1), Mh = (e) => Ah(e, !0), Nh = (e) => vh(e, (t) => lh(e,
|
|
|
12692
12683
|
},
|
|
12693
12684
|
userEvent: "select"
|
|
12694
12685
|
})), !0), Wh = ({ state: e, dispatch: t }) => {
|
|
12695
|
-
let n = lg(e).map(({ from: t, to: n }) =>
|
|
12686
|
+
let n = lg(e).map(({ from: t, to: n }) => L.range(t, Math.min(n + 1, e.doc.length)));
|
|
12696
12687
|
return t(e.update({
|
|
12697
|
-
selection:
|
|
12688
|
+
selection: L.create(n),
|
|
12698
12689
|
userEvent: "select"
|
|
12699
12690
|
})), !0;
|
|
12700
12691
|
}, Gh = ({ state: e, dispatch: t }) => {
|
|
@@ -12706,7 +12697,7 @@ var jh = (e) => Ah(e, !1), Mh = (e) => Ah(e, !0), Nh = (e) => vh(e, (t) => lh(e,
|
|
|
12706
12697
|
}
|
|
12707
12698
|
for (let e = r; e; e = e.next) {
|
|
12708
12699
|
let { node: n } = e;
|
|
12709
|
-
if ((n.from < t.from && n.to >= t.to || n.to > t.to && n.from <= t.from) && e.next) return
|
|
12700
|
+
if ((n.from < t.from && n.to >= t.to || n.to > t.to && n.from <= t.from) && e.next) return L.range(n.to, n.from);
|
|
12710
12701
|
}
|
|
12711
12702
|
return t;
|
|
12712
12703
|
});
|
|
@@ -12725,11 +12716,11 @@ function Kh(e, t) {
|
|
|
12725
12716
|
else n = r;
|
|
12726
12717
|
}
|
|
12727
12718
|
}
|
|
12728
|
-
return i.length == r.ranges.length ? !1 : (e.dispatch(Hm(n,
|
|
12719
|
+
return i.length == r.ranges.length ? !1 : (e.dispatch(Hm(n, L.create(i, i.length - 1))), !0);
|
|
12729
12720
|
}
|
|
12730
12721
|
var qh = (e) => Kh(e, !1), Jh = (e) => Kh(e, !0), Yh = ({ state: e, dispatch: t }) => {
|
|
12731
12722
|
let n = e.selection, r = null;
|
|
12732
|
-
return n.ranges.length > 1 ? r =
|
|
12723
|
+
return n.ranges.length > 1 ? r = L.create([n.main]) : n.main.empty || (r = L.create([L.cursor(n.main.head)])), r ? (t(Hm(e, r)), !0) : !1;
|
|
12733
12724
|
};
|
|
12734
12725
|
function Xh(e, t) {
|
|
12735
12726
|
if (e.state.readOnly) return !1;
|
|
@@ -12744,7 +12735,7 @@ function Xh(e, t) {
|
|
|
12744
12735
|
from: i,
|
|
12745
12736
|
to: a
|
|
12746
12737
|
},
|
|
12747
|
-
range:
|
|
12738
|
+
range: L.cursor(i, i < r.head ? -1 : 1)
|
|
12748
12739
|
};
|
|
12749
12740
|
});
|
|
12750
12741
|
return i.changes.empty ? !1 : (e.dispatch(r.update(i, {
|
|
@@ -12763,7 +12754,7 @@ var Qh = (e, t, n) => Xh(e, (r) => {
|
|
|
12763
12754
|
let i = r.from, { state: a } = e, o = a.doc.lineAt(i), s, c;
|
|
12764
12755
|
if (n && !t && i > o.from && i < o.from + 200 && !/[^ \t]/.test(s = o.text.slice(0, i - o.from))) {
|
|
12765
12756
|
if (s[s.length - 1] == " ") return i - 1;
|
|
12766
|
-
let e =
|
|
12757
|
+
let e = ui(s, a.tabSize) % vp(a) || vp(a);
|
|
12767
12758
|
for (let t = 0; t < e && s[s.length - 1 - t] == " "; t++) i--;
|
|
12768
12759
|
c = i;
|
|
12769
12760
|
} else c = F(o.text, i - o.from, t, t) + o.from, c == i && o.number != (t ? a.doc.lines : 1) ? c += t ? 1 : -1 : !t && /[\ufe00-\ufe0f]/.test(o.text.slice(c - o.from, i - o.from)) && (c = F(o.text, c - o.from, !1, !1) + o.from);
|
|
@@ -12797,7 +12788,7 @@ var Qh = (e, t, n) => Xh(e, (r) => {
|
|
|
12797
12788
|
to: e.to,
|
|
12798
12789
|
insert: P.of(["", ""])
|
|
12799
12790
|
},
|
|
12800
|
-
range:
|
|
12791
|
+
range: L.cursor(e.from)
|
|
12801
12792
|
}));
|
|
12802
12793
|
return t(e.update(n, {
|
|
12803
12794
|
scrollIntoView: !0,
|
|
@@ -12814,7 +12805,7 @@ var Qh = (e, t, n) => Xh(e, (r) => {
|
|
|
12814
12805
|
to: a,
|
|
12815
12806
|
insert: e.doc.slice(n, a).append(e.doc.slice(i, n))
|
|
12816
12807
|
},
|
|
12817
|
-
range:
|
|
12808
|
+
range: L.cursor(a)
|
|
12818
12809
|
};
|
|
12819
12810
|
});
|
|
12820
12811
|
return n.changes.empty ? !1 : (t(e.update(n, {
|
|
@@ -12852,7 +12843,7 @@ function ug(e, t, n) {
|
|
|
12852
12843
|
from: t.from,
|
|
12853
12844
|
insert: a.text + e.lineBreak
|
|
12854
12845
|
});
|
|
12855
|
-
for (let n of t.ranges) i.push(
|
|
12846
|
+
for (let n of t.ranges) i.push(L.range(Math.min(e.doc.length, n.anchor + o), Math.min(e.doc.length, n.head + o)));
|
|
12856
12847
|
} else {
|
|
12857
12848
|
r.push({
|
|
12858
12849
|
from: a.from,
|
|
@@ -12861,13 +12852,13 @@ function ug(e, t, n) {
|
|
|
12861
12852
|
from: t.to,
|
|
12862
12853
|
insert: e.lineBreak + a.text
|
|
12863
12854
|
});
|
|
12864
|
-
for (let e of t.ranges) i.push(
|
|
12855
|
+
for (let e of t.ranges) i.push(L.range(e.anchor - o, e.head - o));
|
|
12865
12856
|
}
|
|
12866
12857
|
}
|
|
12867
12858
|
return r.length ? (t(e.update({
|
|
12868
12859
|
changes: r,
|
|
12869
12860
|
scrollIntoView: !0,
|
|
12870
|
-
selection:
|
|
12861
|
+
selection: L.create(i, e.selection.mainIndex),
|
|
12871
12862
|
userEvent: "move.line"
|
|
12872
12863
|
})), !0) : !1;
|
|
12873
12864
|
}
|
|
@@ -12932,7 +12923,7 @@ function bg(e) {
|
|
|
12932
12923
|
simulateBreak: r,
|
|
12933
12924
|
simulateDoubleBreak: !!o
|
|
12934
12925
|
}), c = bp(s, r);
|
|
12935
|
-
for (c ??=
|
|
12926
|
+
for (c ??= ui(/^\s*/.exec(t.doc.lineAt(r).text)[0], t.tabSize); i < a.to && /\s/.test(a.text[i - a.from]);) i++;
|
|
12936
12927
|
o ? {from: r, to: i} = o : r > a.from && r < a.from + 100 && !/\S/.test(a.text.slice(0, r)) && (r = a.from);
|
|
12937
12928
|
let l = ["", yp(t, c)];
|
|
12938
12929
|
return o && l.push(yp(t, s.lineIndent(a.from, -1))), {
|
|
@@ -12941,7 +12932,7 @@ function bg(e) {
|
|
|
12941
12932
|
to: i,
|
|
12942
12933
|
insert: P.of(l)
|
|
12943
12934
|
},
|
|
12944
|
-
range:
|
|
12935
|
+
range: L.cursor(r + 1 + l[1].length)
|
|
12945
12936
|
};
|
|
12946
12937
|
});
|
|
12947
12938
|
return n(t.update(r, {
|
|
@@ -12961,7 +12952,7 @@ function xg(e, t) {
|
|
|
12961
12952
|
let a = e.changes(i);
|
|
12962
12953
|
return {
|
|
12963
12954
|
changes: i,
|
|
12964
|
-
range:
|
|
12955
|
+
range: L.range(a.mapPos(r.anchor, 1), a.mapPos(r.head, 1))
|
|
12965
12956
|
};
|
|
12966
12957
|
});
|
|
12967
12958
|
}
|
|
@@ -12987,7 +12978,7 @@ var Sg = ({ state: e, dispatch: t }) => {
|
|
|
12987
12978
|
}), { userEvent: "input.indent" })), !0), wg = ({ state: e, dispatch: t }) => e.readOnly ? !1 : (t(e.update(xg(e, (t, n) => {
|
|
12988
12979
|
let r = /^\s*/.exec(t.text)[0];
|
|
12989
12980
|
if (!r) return;
|
|
12990
|
-
let i =
|
|
12981
|
+
let i = ui(r, e.tabSize), a = 0, o = yp(e, Math.max(0, i - vp(e)));
|
|
12991
12982
|
for (; a < r.length && a < o.length && r.charCodeAt(a) == o.charCodeAt(a);) a++;
|
|
12992
12983
|
n.push({
|
|
12993
12984
|
from: t.from + a,
|
|
@@ -13375,7 +13366,7 @@ function Mg({ value: e, onChange: t, placeholder: n = "", minHeight: r = 320 })
|
|
|
13375
13366
|
}), Ze(() => {
|
|
13376
13367
|
if (!i.current) return;
|
|
13377
13368
|
let e = new J({
|
|
13378
|
-
state:
|
|
13369
|
+
state: B.create({
|
|
13379
13370
|
doc: s.current,
|
|
13380
13371
|
extensions: [
|
|
13381
13372
|
xm(),
|
|
@@ -13486,43 +13477,43 @@ var Pg = Xe.forwardRef(function({ value: e, onChange: t, placeholder: n = "Aleeb
|
|
|
13486
13477
|
});
|
|
13487
13478
|
//#endregion
|
|
13488
13479
|
//#region src/components/JamlSeedSpinner.tsx
|
|
13489
|
-
function Fg({ seeds: e = [], value: t, onChange: n, onCopy: r, editable: i = !1, label: a = "Seed", placeholder: o = "Aleeb", variant: s = "normal", className: c, style:
|
|
13490
|
-
let
|
|
13480
|
+
function Fg({ seeds: e = [], value: t, onChange: n, onCopy: r, editable: i = !1, label: a = "Seed", placeholder: o = "Aleeb", variant: s = "normal", className: c, style: u, ...d }) {
|
|
13481
|
+
let p = $e(() => Array.from(new Set(e.map((e) => Ng(e)).filter(Boolean))), [e]), [m, h] = O(() => Ng(t ?? p[0] ?? "")), g = t === void 0 ? m : Ng(t), _ = p.indexOf(g), y = p.length >= 2, b = (e) => {
|
|
13491
13482
|
let r = Ng(e);
|
|
13492
|
-
t === void 0 &&
|
|
13493
|
-
},
|
|
13494
|
-
|
|
13483
|
+
t === void 0 && h(r), n?.(r);
|
|
13484
|
+
}, ee = (e) => {
|
|
13485
|
+
y && b(p[((_ >= 0 ? _ : 0) + e + p.length) % p.length]);
|
|
13495
13486
|
};
|
|
13496
13487
|
return /* @__PURE__ */ A("div", {
|
|
13497
13488
|
className: ["j-seed-spinner", c].filter(Boolean).join(" "),
|
|
13498
|
-
style:
|
|
13489
|
+
style: u,
|
|
13499
13490
|
children: [/* @__PURE__ */ A("div", {
|
|
13500
13491
|
className: "j-seed-spinner__meta",
|
|
13501
13492
|
children: [a ? /* @__PURE__ */ k("span", {
|
|
13502
13493
|
className: "j-seed-spinner__label",
|
|
13503
13494
|
children: a
|
|
13504
|
-
}) : /* @__PURE__ */ k("span", {}),
|
|
13495
|
+
}) : /* @__PURE__ */ k("span", {}), p.length > 0 ? /* @__PURE__ */ k(v, {
|
|
13505
13496
|
size: "sm",
|
|
13506
13497
|
tone: s === "dark" ? "grey" : "dark",
|
|
13507
|
-
children:
|
|
13498
|
+
children: _ >= 0 ? `${_ + 1} of ${p.length}` : `${p.length} seeds`
|
|
13508
13499
|
}) : null]
|
|
13509
|
-
}), /* @__PURE__ */ k(
|
|
13510
|
-
onPrev: () =>
|
|
13511
|
-
onNext: () =>
|
|
13512
|
-
canPrev:
|
|
13513
|
-
canNext:
|
|
13500
|
+
}), /* @__PURE__ */ k(f, {
|
|
13501
|
+
onPrev: () => ee(-1),
|
|
13502
|
+
onNext: () => ee(1),
|
|
13503
|
+
canPrev: y,
|
|
13504
|
+
canNext: y,
|
|
13514
13505
|
prevLabel: "Previous seed",
|
|
13515
13506
|
nextLabel: "Next seed",
|
|
13516
13507
|
className: "j-seed-spinner__nav",
|
|
13517
13508
|
children: i ? /* @__PURE__ */ k(Pg, {
|
|
13518
|
-
...
|
|
13519
|
-
value:
|
|
13520
|
-
onChange:
|
|
13509
|
+
...d,
|
|
13510
|
+
value: g,
|
|
13511
|
+
onChange: b,
|
|
13521
13512
|
label: void 0,
|
|
13522
13513
|
placeholder: o,
|
|
13523
13514
|
variant: s
|
|
13524
|
-
}) : /* @__PURE__ */ k(
|
|
13525
|
-
value:
|
|
13515
|
+
}) : /* @__PURE__ */ k(l, {
|
|
13516
|
+
value: g,
|
|
13526
13517
|
placeholder: o,
|
|
13527
13518
|
onCopy: r
|
|
13528
13519
|
})
|
|
@@ -13535,32 +13526,32 @@ function Ig(e) {
|
|
|
13535
13526
|
return (e.score ?? 0) >= 1;
|
|
13536
13527
|
}
|
|
13537
13528
|
function Lg(e) {
|
|
13538
|
-
let t =
|
|
13529
|
+
let t = it[e];
|
|
13539
13530
|
if (!t) return "Small Blind";
|
|
13540
13531
|
let n = t.toLowerCase(), r = Ne.find((e) => e.name.replace(/[^a-zA-Z0-9]/g, "").toLowerCase() === n);
|
|
13541
13532
|
return r ? r.name : t;
|
|
13542
13533
|
}
|
|
13543
13534
|
function Rg(e) {
|
|
13544
|
-
let t =
|
|
13535
|
+
let t = lt[e];
|
|
13545
13536
|
if (!t) return "";
|
|
13546
13537
|
let n = t.toLowerCase(), r = Ge.find((e) => e.name.replace(/[^a-zA-Z0-9]/g, "").toLowerCase() === n);
|
|
13547
13538
|
return r ? r.name : t;
|
|
13548
13539
|
}
|
|
13549
13540
|
function zg(e) {
|
|
13550
|
-
let t =
|
|
13541
|
+
let t = ct[e];
|
|
13551
13542
|
if (!t) return "";
|
|
13552
13543
|
let n = t.toLowerCase(), r = Le.find((e) => e.name.replace(/[^a-zA-Z0-9]/g, "").toLowerCase() === n);
|
|
13553
13544
|
return r ? r.name : t;
|
|
13554
13545
|
}
|
|
13555
13546
|
function Bg(e) {
|
|
13556
|
-
let t =
|
|
13547
|
+
let t = rt[e];
|
|
13557
13548
|
if (!t) return "";
|
|
13558
13549
|
let n = (t + "pack").toLowerCase(), r = ze.find((e) => e.name.replace(/[^a-zA-Z0-9]/g, "").toLowerCase() === n);
|
|
13559
13550
|
return r ? r.name : t + " Pack";
|
|
13560
13551
|
}
|
|
13561
13552
|
function Vg(e, t = .5) {
|
|
13562
13553
|
let n = Ye[e];
|
|
13563
|
-
return n ?
|
|
13554
|
+
return n ? vt({
|
|
13564
13555
|
id: String(e),
|
|
13565
13556
|
name: n.displayName,
|
|
13566
13557
|
value: e
|
|
@@ -13570,8 +13561,8 @@ function Vg(e, t = .5) {
|
|
|
13570
13561
|
};
|
|
13571
13562
|
}
|
|
13572
13563
|
function Hg({ jaml: e, className: t = "", style: n }) {
|
|
13573
|
-
let [r, i] = O({ status: "loading" }), [a,
|
|
13574
|
-
e !== d && (f(e), i({ status: "loading" }),
|
|
13564
|
+
let [r, i] = O({ status: "loading" }), [a, c] = O(0), [l, u] = O(1), [d, f] = O(e);
|
|
13565
|
+
e !== d && (f(e), i({ status: "loading" }), c(0), u(1)), Ze(() => {
|
|
13575
13566
|
let t = !1;
|
|
13576
13567
|
return (async () => {
|
|
13577
13568
|
try {
|
|
@@ -13601,7 +13592,7 @@ function Hg({ jaml: e, className: t = "", style: n }) {
|
|
|
13601
13592
|
}, [e]);
|
|
13602
13593
|
let p = $e(() => r.status === "ready" ? r.result.seeds : [], [r]), m = $e(() => p.map((e) => e.seed), [p]), h = p[m.length > 0 ? Math.min(a, m.length - 1) : 0], g = h?.seed ?? "", _ = (e) => {
|
|
13603
13594
|
let t = m.indexOf(e);
|
|
13604
|
-
t >= 0 &&
|
|
13595
|
+
t >= 0 && c(t);
|
|
13605
13596
|
}, v = ["j-jamlyzer", t].filter(Boolean).join(" ");
|
|
13606
13597
|
if (r.status === "loading") return /* @__PURE__ */ k("div", {
|
|
13607
13598
|
className: v,
|
|
@@ -13684,14 +13675,14 @@ function Hg({ jaml: e, className: t = "", style: n }) {
|
|
|
13684
13675
|
}) : null,
|
|
13685
13676
|
te && h.analysis?.antes && /* @__PURE__ */ A(s, {
|
|
13686
13677
|
className: "j-jamlyzer__details",
|
|
13687
|
-
children: [/* @__PURE__ */ k(
|
|
13688
|
-
value: `Ante ${
|
|
13678
|
+
children: [/* @__PURE__ */ k(o, {
|
|
13679
|
+
value: `Ante ${l}`,
|
|
13689
13680
|
onPrev: () => u((e) => Math.max(1, e - 1)),
|
|
13690
13681
|
onNext: () => u((e) => Math.min(8, e + 1)),
|
|
13691
|
-
canPrev:
|
|
13692
|
-
canNext:
|
|
13682
|
+
canPrev: l > 1,
|
|
13683
|
+
canNext: l < 8
|
|
13693
13684
|
}), (() => {
|
|
13694
|
-
let e = h.analysis?.antes.find((e) => e.ante ===
|
|
13685
|
+
let e = h.analysis?.antes.find((e) => e.ante === l);
|
|
13695
13686
|
return e ? /* @__PURE__ */ A("div", {
|
|
13696
13687
|
className: "j-stack j-stack--gap-sm",
|
|
13697
13688
|
children: [
|
|
@@ -13706,9 +13697,12 @@ function Hg({ jaml: e, className: t = "", style: n }) {
|
|
|
13706
13697
|
className: "j-row j-row--gap-md j-row--justify-center j-row--align-center",
|
|
13707
13698
|
children: [/* @__PURE__ */ A("div", {
|
|
13708
13699
|
className: "j-stack j-stack--gap-xs j-stack--align-center",
|
|
13709
|
-
children: [/* @__PURE__ */ k(
|
|
13710
|
-
|
|
13711
|
-
|
|
13700
|
+
children: [/* @__PURE__ */ k("div", {
|
|
13701
|
+
className: `j-jamlyzer__card-wrap ${e.bossMatched ? "j-jamlyzer__card-wrap--matched" : ""}`,
|
|
13702
|
+
children: /* @__PURE__ */ k(St, {
|
|
13703
|
+
bossName: Lg(e.boss),
|
|
13704
|
+
scale: .5
|
|
13705
|
+
})
|
|
13712
13706
|
}), /* @__PURE__ */ k(C, {
|
|
13713
13707
|
size: "micro",
|
|
13714
13708
|
tone: "white",
|
|
@@ -13717,9 +13711,12 @@ function Hg({ jaml: e, className: t = "", style: n }) {
|
|
|
13717
13711
|
})]
|
|
13718
13712
|
}), /* @__PURE__ */ A("div", {
|
|
13719
13713
|
className: "j-stack j-stack--gap-xs j-stack--align-center",
|
|
13720
|
-
children: [/* @__PURE__ */ k(
|
|
13721
|
-
|
|
13722
|
-
|
|
13714
|
+
children: [/* @__PURE__ */ k("div", {
|
|
13715
|
+
className: `j-jamlyzer__card-wrap ${e.voucherMatched ? "j-jamlyzer__card-wrap--matched" : ""}`,
|
|
13716
|
+
children: /* @__PURE__ */ k(bt, {
|
|
13717
|
+
voucherName: Rg(e.voucher),
|
|
13718
|
+
scale: .5
|
|
13719
|
+
})
|
|
13723
13720
|
}), /* @__PURE__ */ k(C, {
|
|
13724
13721
|
size: "micro",
|
|
13725
13722
|
tone: "white",
|
|
@@ -13740,9 +13737,12 @@ function Hg({ jaml: e, className: t = "", style: n }) {
|
|
|
13740
13737
|
className: "j-row j-row--gap-md j-row--justify-center j-row--align-center",
|
|
13741
13738
|
children: [/* @__PURE__ */ A("div", {
|
|
13742
13739
|
className: "j-stack j-stack--gap-xs j-stack--align-center",
|
|
13743
|
-
children: [/* @__PURE__ */ k(
|
|
13744
|
-
|
|
13745
|
-
|
|
13740
|
+
children: [/* @__PURE__ */ k("div", {
|
|
13741
|
+
className: `j-jamlyzer__card-wrap ${e.smallBlindTagMatched ? "j-jamlyzer__card-wrap--matched" : ""}`,
|
|
13742
|
+
children: /* @__PURE__ */ k(xt, {
|
|
13743
|
+
tagName: zg(e.smallBlindTag),
|
|
13744
|
+
scale: .5
|
|
13745
|
+
})
|
|
13746
13746
|
}), /* @__PURE__ */ A(C, {
|
|
13747
13747
|
size: "micro",
|
|
13748
13748
|
tone: "white",
|
|
@@ -13751,9 +13751,12 @@ function Hg({ jaml: e, className: t = "", style: n }) {
|
|
|
13751
13751
|
})]
|
|
13752
13752
|
}), /* @__PURE__ */ A("div", {
|
|
13753
13753
|
className: "j-stack j-stack--gap-xs j-stack--align-center",
|
|
13754
|
-
children: [/* @__PURE__ */ k(
|
|
13755
|
-
|
|
13756
|
-
|
|
13754
|
+
children: [/* @__PURE__ */ k("div", {
|
|
13755
|
+
className: `j-jamlyzer__card-wrap ${e.bigBlindTagMatched ? "j-jamlyzer__card-wrap--matched" : ""}`,
|
|
13756
|
+
children: /* @__PURE__ */ k(xt, {
|
|
13757
|
+
tagName: zg(e.bigBlindTag),
|
|
13758
|
+
scale: .5
|
|
13759
|
+
})
|
|
13757
13760
|
}), /* @__PURE__ */ A(C, {
|
|
13758
13761
|
size: "micro",
|
|
13759
13762
|
tone: "white",
|
|
@@ -13777,26 +13780,17 @@ function Hg({ jaml: e, className: t = "", style: n }) {
|
|
|
13777
13780
|
return /* @__PURE__ */ A("div", {
|
|
13778
13781
|
className: `j-jamlyzer__card-wrap ${r ? "j-jamlyzer__card-wrap--matched" : ""}`,
|
|
13779
13782
|
children: [
|
|
13780
|
-
n.kind === "voucher" && /* @__PURE__ */ k(
|
|
13783
|
+
n.kind === "voucher" && /* @__PURE__ */ k(bt, {
|
|
13781
13784
|
voucherName: n.voucherName,
|
|
13782
13785
|
scale: .45
|
|
13783
13786
|
}),
|
|
13784
|
-
(n.kind === "joker" || n.kind === "consumable" || n.kind === "playing") && /* @__PURE__ */ k(
|
|
13787
|
+
(n.kind === "joker" || n.kind === "consumable" || n.kind === "playing") && /* @__PURE__ */ k(yt, {
|
|
13785
13788
|
card: n.card,
|
|
13786
13789
|
type: n.type
|
|
13787
13790
|
}),
|
|
13788
13791
|
n.kind === "unknown" && /* @__PURE__ */ k("div", {
|
|
13789
13792
|
className: "j-game-card j-game-card--unknown",
|
|
13790
|
-
style: {
|
|
13791
|
-
width: 71 * .45,
|
|
13792
|
-
height: 95 * .45,
|
|
13793
|
-
display: "flex",
|
|
13794
|
-
alignItems: "center",
|
|
13795
|
-
justifyContent: "center",
|
|
13796
|
-
background: "#1a1a1a",
|
|
13797
|
-
border: "1px solid #333",
|
|
13798
|
-
borderRadius: 4
|
|
13799
|
-
},
|
|
13793
|
+
style: { "--j-card-width": `${71 * .45}px` },
|
|
13800
13794
|
children: /* @__PURE__ */ k(C, {
|
|
13801
13795
|
size: "micro",
|
|
13802
13796
|
tone: "grey",
|
|
@@ -13837,26 +13831,17 @@ function Hg({ jaml: e, className: t = "", style: n }) {
|
|
|
13837
13831
|
return /* @__PURE__ */ A("div", {
|
|
13838
13832
|
className: `j-jamlyzer__card-wrap ${r ? "j-jamlyzer__card-wrap--matched" : ""}`,
|
|
13839
13833
|
children: [
|
|
13840
|
-
n.kind === "voucher" && /* @__PURE__ */ k(
|
|
13834
|
+
n.kind === "voucher" && /* @__PURE__ */ k(bt, {
|
|
13841
13835
|
voucherName: n.voucherName,
|
|
13842
13836
|
scale: .45
|
|
13843
13837
|
}),
|
|
13844
|
-
(n.kind === "joker" || n.kind === "consumable" || n.kind === "playing") && /* @__PURE__ */ k(
|
|
13838
|
+
(n.kind === "joker" || n.kind === "consumable" || n.kind === "playing") && /* @__PURE__ */ k(yt, {
|
|
13845
13839
|
card: n.card,
|
|
13846
13840
|
type: n.type
|
|
13847
13841
|
}),
|
|
13848
13842
|
n.kind === "unknown" && /* @__PURE__ */ k("div", {
|
|
13849
13843
|
className: "j-game-card j-game-card--unknown",
|
|
13850
|
-
style: {
|
|
13851
|
-
width: 71 * .45,
|
|
13852
|
-
height: 95 * .45,
|
|
13853
|
-
display: "flex",
|
|
13854
|
-
alignItems: "center",
|
|
13855
|
-
justifyContent: "center",
|
|
13856
|
-
background: "#1a1a1a",
|
|
13857
|
-
border: "1px solid #333",
|
|
13858
|
-
borderRadius: 4
|
|
13859
|
-
},
|
|
13844
|
+
style: { "--j-card-width": `${71 * .45}px` },
|
|
13860
13845
|
children: /* @__PURE__ */ k(C, {
|
|
13861
13846
|
size: "micro",
|
|
13862
13847
|
tone: "grey",
|
|
@@ -13881,7 +13866,7 @@ function Hg({ jaml: e, className: t = "", style: n }) {
|
|
|
13881
13866
|
size: "xs",
|
|
13882
13867
|
tone: "grey",
|
|
13883
13868
|
className: "j-text-center",
|
|
13884
|
-
children: ["No analysis for Ante ",
|
|
13869
|
+
children: ["No analysis for Ante ", l]
|
|
13885
13870
|
});
|
|
13886
13871
|
})()]
|
|
13887
13872
|
})
|
|
@@ -14051,13 +14036,13 @@ function e_(e) {
|
|
|
14051
14036
|
//#endregion
|
|
14052
14037
|
//#region src/components/JamlIde.tsx
|
|
14053
14038
|
var t_ = {
|
|
14054
|
-
voucher:
|
|
14055
|
-
tag:
|
|
14056
|
-
boss:
|
|
14057
|
-
tarot:
|
|
14058
|
-
planet:
|
|
14059
|
-
spectral:
|
|
14060
|
-
pack:
|
|
14039
|
+
voucher: Qt,
|
|
14040
|
+
tag: $t,
|
|
14041
|
+
boss: en,
|
|
14042
|
+
tarot: tn,
|
|
14043
|
+
planet: nn,
|
|
14044
|
+
spectral: rn,
|
|
14045
|
+
pack: an
|
|
14061
14046
|
};
|
|
14062
14047
|
function n_({ value: e, max: t }) {
|
|
14063
14048
|
let n = t > 0 ? Math.min(1, e / t) : 0;
|
|
@@ -14188,7 +14173,7 @@ function r_({ results: e, jaml: t, onVerify: n }) {
|
|
|
14188
14173
|
flexDirection: "column",
|
|
14189
14174
|
gap: 8
|
|
14190
14175
|
},
|
|
14191
|
-
children: [/* @__PURE__ */ k(
|
|
14176
|
+
children: [/* @__PURE__ */ k(Pt, {
|
|
14192
14177
|
jaml: t,
|
|
14193
14178
|
tallyColumns: e.tallyColumns,
|
|
14194
14179
|
tallyLabels: e.tallyLabels
|
|
@@ -14385,7 +14370,9 @@ function a_({ jaml: e, defaultJaml: t, onChange: n, defaultMode: r = "code", sea
|
|
|
14385
14370
|
onClose: () => {
|
|
14386
14371
|
_e === "category" ? ge(null) : ve("category");
|
|
14387
14372
|
},
|
|
14388
|
-
|
|
14373
|
+
title: _e === "category" ? "Select Category" : _e === "joker" ? "Select Joker" : t_[_e]?.title ?? "Select Item",
|
|
14374
|
+
className: "j-picker-modal",
|
|
14375
|
+
children: he !== null && (_e === "category" ? /* @__PURE__ */ k(un, { onSelect: (e) => ve(e) }) : _e === "joker" ? /* @__PURE__ */ k(Kt, { onSelect: be }) : /* @__PURE__ */ k(Jt, {
|
|
14389
14376
|
config: t_[_e],
|
|
14390
14377
|
onSelect: be
|
|
14391
14378
|
}))
|
|
@@ -14453,12 +14440,12 @@ function c_() {
|
|
|
14453
14440
|
j.onScoredResult.unsubscribe(c), j.onProgress.unsubscribe(l);
|
|
14454
14441
|
}, o.predicate) {
|
|
14455
14442
|
let e = o.predicate;
|
|
14456
|
-
j.jimmolateProbe = (t) => e(t);
|
|
14443
|
+
j.jimmolateProbe = (t, n, r) => e(t, n, r), j.enableJimmolate();
|
|
14457
14444
|
}
|
|
14458
|
-
let u = s_(e, a, o, !!o.predicate).start(
|
|
14445
|
+
let u = s_(e, a, o, !!o.predicate).start();
|
|
14459
14446
|
n.current = u;
|
|
14460
14447
|
try {
|
|
14461
|
-
await u.waitForCompletionAsync(
|
|
14448
|
+
await u.waitForCompletionAsync(), t((e) => ({
|
|
14462
14449
|
...e,
|
|
14463
14450
|
status: u.isCompleted ? "completed" : "cancelled",
|
|
14464
14451
|
totalSearched: u.totalSeedsSearched,
|
|
@@ -14572,10 +14559,10 @@ function d_({ seedsPerSecond: e, totalSearched: t, matchingSeeds: n, status: r,
|
|
|
14572
14559
|
//#endregion
|
|
14573
14560
|
//#region src/components/JamlCurator.tsx
|
|
14574
14561
|
function f_() {
|
|
14575
|
-
let [e, t] = O(""), n = c_(), [r, i] = O(0), a = n.status === "running",
|
|
14562
|
+
let [e, t] = O(""), n = c_(), [r, i] = O(0), a = n.status === "running", o = () => {
|
|
14576
14563
|
a ? n.cancel() : (i(0), n.startRandom(e, 1e6));
|
|
14577
|
-
},
|
|
14578
|
-
return /* @__PURE__ */ A(
|
|
14564
|
+
}, s = n.results[r]?.seed;
|
|
14565
|
+
return /* @__PURE__ */ A(p, { children: [
|
|
14579
14566
|
/* @__PURE__ */ k("div", {
|
|
14580
14567
|
className: "j-flex j-items-center j-justify-between",
|
|
14581
14568
|
style: {
|
|
@@ -14589,7 +14576,7 @@ function f_() {
|
|
|
14589
14576
|
children: "JAML Curator"
|
|
14590
14577
|
})
|
|
14591
14578
|
}),
|
|
14592
|
-
/* @__PURE__ */ k(
|
|
14579
|
+
/* @__PURE__ */ k(g, { children: /* @__PURE__ */ A("div", {
|
|
14593
14580
|
className: "j-flex-col j-gap-md",
|
|
14594
14581
|
children: [
|
|
14595
14582
|
/* @__PURE__ */ k(ln, { onChange: (e) => t(e) }),
|
|
@@ -14617,7 +14604,7 @@ function f_() {
|
|
|
14617
14604
|
tone: "gold",
|
|
14618
14605
|
children: [n.matchingSeeds, " found"]
|
|
14619
14606
|
})]
|
|
14620
|
-
}), /* @__PURE__ */ k(
|
|
14607
|
+
}), /* @__PURE__ */ k(f, {
|
|
14621
14608
|
canPrev: r > 0,
|
|
14622
14609
|
canNext: r < n.results.length - 1,
|
|
14623
14610
|
onPrev: () => i((e) => Math.max(0, e - 1)),
|
|
@@ -14628,12 +14615,12 @@ function f_() {
|
|
|
14628
14615
|
size: "lg",
|
|
14629
14616
|
tone: "gold",
|
|
14630
14617
|
style: { letterSpacing: 2 },
|
|
14631
|
-
children:
|
|
14618
|
+
children: s
|
|
14632
14619
|
}), /* @__PURE__ */ k(S, {
|
|
14633
14620
|
tone: "blue",
|
|
14634
14621
|
size: "xs",
|
|
14635
14622
|
onClick: () => {
|
|
14636
|
-
|
|
14623
|
+
s && typeof navigator < "u" && navigator.clipboard && navigator.clipboard.writeText(s);
|
|
14637
14624
|
},
|
|
14638
14625
|
children: "Copy Seed"
|
|
14639
14626
|
})]
|
|
@@ -14642,11 +14629,11 @@ function f_() {
|
|
|
14642
14629
|
}) })
|
|
14643
14630
|
]
|
|
14644
14631
|
}) }),
|
|
14645
|
-
/* @__PURE__ */ k(
|
|
14632
|
+
/* @__PURE__ */ k(m, { children: /* @__PURE__ */ k(S, {
|
|
14646
14633
|
tone: a ? "red" : "green",
|
|
14647
14634
|
size: "md",
|
|
14648
14635
|
fullWidth: !0,
|
|
14649
|
-
onClick:
|
|
14636
|
+
onClick: o,
|
|
14650
14637
|
children: a ? "Stop Searching" : "Search Seeds"
|
|
14651
14638
|
}) })
|
|
14652
14639
|
] });
|
|
@@ -15008,13 +14995,13 @@ function z_({ caps: e, version: t, minimal: n = !1, loading: r = !1, className:
|
|
|
15008
14995
|
tone: "grey",
|
|
15009
14996
|
children: ["v", o]
|
|
15010
14997
|
}),
|
|
15011
|
-
s ? /* @__PURE__ */ k(
|
|
14998
|
+
s ? /* @__PURE__ */ k(v, {
|
|
15012
14999
|
size: "sm",
|
|
15013
15000
|
tone: "blue",
|
|
15014
15001
|
title: "SIMD enabled",
|
|
15015
15002
|
children: "SIMD"
|
|
15016
15003
|
}) : null,
|
|
15017
|
-
c ? /* @__PURE__ */ k(
|
|
15004
|
+
c ? /* @__PURE__ */ k(v, {
|
|
15018
15005
|
size: "sm",
|
|
15019
15006
|
tone: "green",
|
|
15020
15007
|
title: "Multi-threaded",
|
|
@@ -15030,13 +15017,13 @@ function z_({ caps: e, version: t, minimal: n = !1, loading: r = !1, className:
|
|
|
15030
15017
|
tone: "gold",
|
|
15031
15018
|
children: ["motely v", o]
|
|
15032
15019
|
}),
|
|
15033
|
-
s ? /* @__PURE__ */ k(
|
|
15020
|
+
s ? /* @__PURE__ */ k(v, {
|
|
15034
15021
|
size: "sm",
|
|
15035
15022
|
tone: "blue",
|
|
15036
15023
|
title: "SIMD enabled",
|
|
15037
15024
|
children: "SIMD"
|
|
15038
15025
|
}) : null,
|
|
15039
|
-
c ? /* @__PURE__ */ k(
|
|
15026
|
+
c ? /* @__PURE__ */ k(v, {
|
|
15040
15027
|
size: "sm",
|
|
15041
15028
|
tone: "green",
|
|
15042
15029
|
title: "Multi-threaded",
|
|
@@ -15063,7 +15050,7 @@ function V_({ jaml: e = B_, searchCount: t = 5e3 }) {
|
|
|
15063
15050
|
};
|
|
15064
15051
|
j.onScoredResult.subscribe(i), j.onProgress.subscribe(o);
|
|
15065
15052
|
try {
|
|
15066
|
-
let n = j.fromJaml(e).withRandomSearch(t).start(
|
|
15053
|
+
let n = j.fromJaml(e).withRandomSearch(t).start();
|
|
15067
15054
|
p(n), await n.waitForCompletionAsync(void 0), l(n.isCompleted ? "done" : "idle");
|
|
15068
15055
|
} catch (e) {
|
|
15069
15056
|
d(e instanceof Error ? e.message : String(e)), l("error");
|
|
@@ -15073,10 +15060,10 @@ function V_({ jaml: e = B_, searchCount: t = 5e3 }) {
|
|
|
15073
15060
|
}, [e, t]), h = E(() => {
|
|
15074
15061
|
f?.cancel();
|
|
15075
15062
|
}, [f]), g = c === "running" ? "blue" : c === "done" ? "green" : c === "error" ? "red" : "dark";
|
|
15076
|
-
return /* @__PURE__ */ k(ye, { children: /* @__PURE__ */ A(
|
|
15063
|
+
return /* @__PURE__ */ k(ye, { children: /* @__PURE__ */ A(ve, {
|
|
15077
15064
|
gap: "md",
|
|
15078
15065
|
children: [
|
|
15079
|
-
/* @__PURE__ */ A(
|
|
15066
|
+
/* @__PURE__ */ A(ce, {
|
|
15080
15067
|
gap: "sm",
|
|
15081
15068
|
align: "center",
|
|
15082
15069
|
children: [
|
|
@@ -15090,7 +15077,7 @@ function V_({ jaml: e = B_, searchCount: t = 5e3 }) {
|
|
|
15090
15077
|
tone: "gold",
|
|
15091
15078
|
children: j.version()
|
|
15092
15079
|
}),
|
|
15093
|
-
/* @__PURE__ */ k(
|
|
15080
|
+
/* @__PURE__ */ k(v, {
|
|
15094
15081
|
size: "sm",
|
|
15095
15082
|
tone: g,
|
|
15096
15083
|
children: c
|
|
@@ -15130,7 +15117,7 @@ function V_({ jaml: e = B_, searchCount: t = 5e3 }) {
|
|
|
15130
15117
|
tone: "red",
|
|
15131
15118
|
children: u
|
|
15132
15119
|
}) : null,
|
|
15133
|
-
n.length > 0 ? /* @__PURE__ */ k(
|
|
15120
|
+
n.length > 0 ? /* @__PURE__ */ k(ve, {
|
|
15134
15121
|
gap: "xs",
|
|
15135
15122
|
children: n.map((e) => /* @__PURE__ */ k(C, {
|
|
15136
15123
|
size: "md",
|
|
@@ -15235,7 +15222,7 @@ function X_(e, t) {
|
|
|
15235
15222
|
}
|
|
15236
15223
|
var Z_ = null;
|
|
15237
15224
|
async function Q_() {
|
|
15238
|
-
return Z_ || (Z_ = (await import("./chunks/searchPoolWorker-
|
|
15225
|
+
return Z_ || (Z_ = (await import("./chunks/searchPoolWorker-tBaSbLZu.js")).default, Z_);
|
|
15239
15226
|
}
|
|
15240
15227
|
function $_(e = {}) {
|
|
15241
15228
|
let t = e.workerCount ?? K_(), n = e.resultCap ?? W_, r = e.terminationGraceMs ?? G_, [i, a] = O(() => q_(t)), o = D([]), s = D(/* @__PURE__ */ new Map()), c = D(0), l = D(0), u = D(0), d = D(/* @__PURE__ */ new Set()), f = D(!1), p = E(() => {
|
|
@@ -15365,7 +15352,8 @@ function $_(e = {}) {
|
|
|
15365
15352
|
jaml: e,
|
|
15366
15353
|
aesthetic: r.aesthetic ?? 0,
|
|
15367
15354
|
deck: r.deck,
|
|
15368
|
-
stake: r.stake
|
|
15355
|
+
stake: r.stake,
|
|
15356
|
+
predicateStr: r.predicateStr
|
|
15369
15357
|
}];
|
|
15370
15358
|
a({
|
|
15371
15359
|
...q_(1),
|
|
@@ -15383,7 +15371,8 @@ function $_(e = {}) {
|
|
|
15383
15371
|
jaml: e,
|
|
15384
15372
|
count: t,
|
|
15385
15373
|
deck: r.deck,
|
|
15386
|
-
stake: r.stake
|
|
15374
|
+
stake: r.stake,
|
|
15375
|
+
predicateStr: r.predicateStr
|
|
15387
15376
|
}));
|
|
15388
15377
|
else if (n === "seedlist") s = Y_(r.seeds ?? [], o).map((t, n) => ({
|
|
15389
15378
|
type: "start",
|
|
@@ -15393,7 +15382,8 @@ function $_(e = {}) {
|
|
|
15393
15382
|
jaml: e,
|
|
15394
15383
|
seeds: t,
|
|
15395
15384
|
deck: r.deck,
|
|
15396
|
-
stake: r.stake
|
|
15385
|
+
stake: r.stake,
|
|
15386
|
+
predicateStr: r.predicateStr
|
|
15397
15387
|
}));
|
|
15398
15388
|
else if (n === "sequential") {
|
|
15399
15389
|
let t = r.batchCharacterCount ?? 4;
|
|
@@ -15407,7 +15397,8 @@ function $_(e = {}) {
|
|
|
15407
15397
|
startBatchIndex: n.start.toString(),
|
|
15408
15398
|
endBatchIndex: n.end.toString(),
|
|
15409
15399
|
deck: r.deck,
|
|
15410
|
-
stake: r.stake
|
|
15400
|
+
stake: r.stake,
|
|
15401
|
+
predicateStr: r.predicateStr
|
|
15411
15402
|
}));
|
|
15412
15403
|
}
|
|
15413
15404
|
a({
|
|
@@ -15488,19 +15479,19 @@ function ev() {
|
|
|
15488
15479
|
//#endregion
|
|
15489
15480
|
//#region src/components/PaginatedFilterBrowser.tsx
|
|
15490
15481
|
function tv({ filters: e, itemsPerPage: t = 120, onSelectFilter: n, onMainAction: r, onSecondaryAction: i, onDeleteFilter: a, mainActionText: o = "Select", secondaryActionText: s = "Edit", showSecondary: c = !1, showDelete: l = !1, emptyText: u = "No items found." }) {
|
|
15491
|
-
let [d,
|
|
15482
|
+
let [d, p] = O(0), [m, h] = O(null), g = Math.max(1, Math.ceil(e.length / t)), _ = Math.min(d, g - 1), v = e.slice(_ * t, (_ + 1) * t), y = e.find((e) => e.id === m) || null;
|
|
15492
15483
|
return /* @__PURE__ */ A("div", {
|
|
15493
15484
|
className: "j-filter-browser",
|
|
15494
15485
|
children: [/* @__PURE__ */ A(ye, {
|
|
15495
15486
|
className: "j-filter-browser__list-panel",
|
|
15496
15487
|
children: [/* @__PURE__ */ A("div", {
|
|
15497
15488
|
className: "j-filter-browser__list hide-scrollbar",
|
|
15498
|
-
children: [
|
|
15499
|
-
let t =
|
|
15500
|
-
return /* @__PURE__ */ A(
|
|
15489
|
+
children: [v.map((e) => {
|
|
15490
|
+
let t = m === e.id;
|
|
15491
|
+
return /* @__PURE__ */ A(x, {
|
|
15501
15492
|
active: t,
|
|
15502
15493
|
onClick: () => {
|
|
15503
|
-
|
|
15494
|
+
h(e.id), n?.(e);
|
|
15504
15495
|
},
|
|
15505
15496
|
children: [/* @__PURE__ */ A("div", {
|
|
15506
15497
|
className: "j-filter-browser__item-main",
|
|
@@ -15524,7 +15515,7 @@ function tv({ filters: e, itemsPerPage: t = 120, onSelectFilter: n, onMainAction
|
|
|
15524
15515
|
}, e))
|
|
15525
15516
|
}) : null]
|
|
15526
15517
|
}, e.id);
|
|
15527
|
-
}),
|
|
15518
|
+
}), v.length === 0 && /* @__PURE__ */ k("div", {
|
|
15528
15519
|
className: "j-p-md",
|
|
15529
15520
|
children: /* @__PURE__ */ k(C, {
|
|
15530
15521
|
size: "sm",
|
|
@@ -15535,11 +15526,11 @@ function tv({ filters: e, itemsPerPage: t = 120, onSelectFilter: n, onMainAction
|
|
|
15535
15526
|
})]
|
|
15536
15527
|
}), /* @__PURE__ */ k("div", {
|
|
15537
15528
|
className: "j-filter-browser__pager",
|
|
15538
|
-
children: /* @__PURE__ */ k(
|
|
15539
|
-
canPrev:
|
|
15540
|
-
canNext:
|
|
15541
|
-
onPrev: () =>
|
|
15542
|
-
onNext: () =>
|
|
15529
|
+
children: /* @__PURE__ */ k(f, {
|
|
15530
|
+
canPrev: _ > 0,
|
|
15531
|
+
canNext: _ < g - 1,
|
|
15532
|
+
onPrev: () => p((e) => Math.max(0, e - 1)),
|
|
15533
|
+
onNext: () => p((e) => Math.min(g - 1, e + 1)),
|
|
15543
15534
|
children: /* @__PURE__ */ k("div", {
|
|
15544
15535
|
className: "j-filter-browser__page-chip",
|
|
15545
15536
|
children: /* @__PURE__ */ A(C, {
|
|
@@ -15548,9 +15539,9 @@ function tv({ filters: e, itemsPerPage: t = 120, onSelectFilter: n, onMainAction
|
|
|
15548
15539
|
className: "j-text-center",
|
|
15549
15540
|
children: [
|
|
15550
15541
|
"Page ",
|
|
15551
|
-
|
|
15542
|
+
_ + 1,
|
|
15552
15543
|
"/",
|
|
15553
|
-
|
|
15544
|
+
g
|
|
15554
15545
|
]
|
|
15555
15546
|
})
|
|
15556
15547
|
})
|
|
@@ -15643,27 +15634,27 @@ function tv({ filters: e, itemsPerPage: t = 120, onSelectFilter: n, onMainAction
|
|
|
15643
15634
|
//#region src/components/JamlAestheticSelector.tsx
|
|
15644
15635
|
var nv = [
|
|
15645
15636
|
{
|
|
15646
|
-
id:
|
|
15637
|
+
id: nt.Palindrome,
|
|
15647
15638
|
label: "Palindrome",
|
|
15648
15639
|
desc: "Seeds that read the same forwards and backwards"
|
|
15649
15640
|
},
|
|
15650
15641
|
{
|
|
15651
|
-
id:
|
|
15642
|
+
id: nt.Psychosis,
|
|
15652
15643
|
label: "Psychosis",
|
|
15653
15644
|
desc: "Unsettling or eerie seed patterns"
|
|
15654
15645
|
},
|
|
15655
15646
|
{
|
|
15656
|
-
id:
|
|
15647
|
+
id: nt.Gross,
|
|
15657
15648
|
label: "Gross",
|
|
15658
15649
|
desc: "Seeds with crude or disgusting words"
|
|
15659
15650
|
},
|
|
15660
15651
|
{
|
|
15661
|
-
id:
|
|
15652
|
+
id: nt.Funny,
|
|
15662
15653
|
label: "Funny",
|
|
15663
15654
|
desc: "Seeds that spell funny words"
|
|
15664
15655
|
},
|
|
15665
15656
|
{
|
|
15666
|
-
id:
|
|
15657
|
+
id: nt.Balatro,
|
|
15667
15658
|
label: "Balatro",
|
|
15668
15659
|
desc: "Seeds referencing the game itself"
|
|
15669
15660
|
}
|
|
@@ -15677,11 +15668,11 @@ function rv({ value: e, onChange: t, className: n, style: r }) {
|
|
|
15677
15668
|
}
|
|
15678
15669
|
t(nv[r - 1].id);
|
|
15679
15670
|
}, s = a?.label ?? "Any", c = a?.id ?? -1;
|
|
15680
|
-
return /* @__PURE__ */ k(
|
|
15671
|
+
return /* @__PURE__ */ k(Ce, {
|
|
15681
15672
|
label: "Seed aesthetics",
|
|
15682
15673
|
title: s,
|
|
15683
15674
|
description: a?.desc ?? "No aesthetic constraint",
|
|
15684
|
-
meta: /* @__PURE__ */ k(
|
|
15675
|
+
meta: /* @__PURE__ */ k(v, {
|
|
15685
15676
|
size: "md",
|
|
15686
15677
|
tone: a ? "purple" : "dark",
|
|
15687
15678
|
children: c
|
|
@@ -15693,6 +15684,87 @@ function rv({ value: e, onChange: t, className: n, style: r }) {
|
|
|
15693
15684
|
});
|
|
15694
15685
|
}
|
|
15695
15686
|
//#endregion
|
|
15696
|
-
|
|
15687
|
+
//#region src/components/RunConfigModal.tsx
|
|
15688
|
+
var iv = Object.keys(at).filter((e) => isNaN(Number(e))), av = Object.keys(st).filter((e) => isNaN(Number(e))), ov = {
|
|
15689
|
+
Red: "+1 discard every round",
|
|
15690
|
+
Blue: "+1 hand every round",
|
|
15691
|
+
Yellow: "Start with extra $10",
|
|
15692
|
+
Green: "At end of each Round:\n$2 per remaining Hand,\n$1 per remaining Discard.\nEarn no Interest",
|
|
15693
|
+
Black: "+1 Joker slot\n-1 hand every round",
|
|
15694
|
+
Magic: "Start run with the\nCrystal Ball voucher\nand 2 copies of The Fool",
|
|
15695
|
+
Nebula: "Start run with the\nTelescope voucher\n-1 consumable slot",
|
|
15696
|
+
Ghost: "Spectral cards may\nappear in the shop,\nstart with a Hex card",
|
|
15697
|
+
Abandoned: "Start run with no\nFace Cards in your deck",
|
|
15698
|
+
Checkered: "Start run with\n26 Spades and\n26 Hearts in deck",
|
|
15699
|
+
Zodiac: "Start run with\nTarot Merchant,\nPlanet Merchant,\nand Overstock vouchers",
|
|
15700
|
+
Painted: "+2 hand size,\n-1 Joker slot",
|
|
15701
|
+
Anaglyph: "After defeating each\nBoss Blind, gain a\nDouble Tag",
|
|
15702
|
+
Plasma: "Balance Chips and\nMult when calculating\nscore for played hand.\nX2 base Blind size",
|
|
15703
|
+
Erratic: "All Ranks and Suits\nin deck are randomized"
|
|
15704
|
+
}, sv = {
|
|
15705
|
+
White: "Base Difficulty",
|
|
15706
|
+
Red: "Small Blind gives\nno reward money",
|
|
15707
|
+
Green: "Required score scales\nfaster for each Ante",
|
|
15708
|
+
Black: "Shop can have Jokers\nwith Eternal",
|
|
15709
|
+
Blue: "-1 Discard",
|
|
15710
|
+
Purple: "Required score scales\nfaster for each Ante",
|
|
15711
|
+
Orange: "Shop can have Jokers\nwith Perishable",
|
|
15712
|
+
Gold: "-1 hand size\nShop can have Jokers\nwith Rental"
|
|
15713
|
+
};
|
|
15714
|
+
function cv({ open: e, onClose: t, deck: n, stake: r, onChange: i }) {
|
|
15715
|
+
return /* @__PURE__ */ k(d, {
|
|
15716
|
+
open: e,
|
|
15717
|
+
onClose: t,
|
|
15718
|
+
title: "Run Config",
|
|
15719
|
+
children: e ? /* @__PURE__ */ k(lv, {
|
|
15720
|
+
deck: n,
|
|
15721
|
+
stake: r,
|
|
15722
|
+
onChange: i,
|
|
15723
|
+
onClose: t
|
|
15724
|
+
}) : null
|
|
15725
|
+
});
|
|
15726
|
+
}
|
|
15727
|
+
function lv({ deck: e, stake: t, onChange: n, onClose: r }) {
|
|
15728
|
+
let [i, a] = O(e), [o, s] = O(t), c = iv.indexOf(i) >= 0 ? iv.indexOf(i) : 0, l = av.indexOf(o) >= 0 ? av.indexOf(o) : 0;
|
|
15729
|
+
return /* @__PURE__ */ A(et, { children: [
|
|
15730
|
+
/* @__PURE__ */ k(Ce, {
|
|
15731
|
+
label: "Deck",
|
|
15732
|
+
title: `${i} Deck`,
|
|
15733
|
+
description: ov[i] || "Standard 52 card deck",
|
|
15734
|
+
media: /* @__PURE__ */ k(R_, {
|
|
15735
|
+
deck: i,
|
|
15736
|
+
size: 64
|
|
15737
|
+
}),
|
|
15738
|
+
onPrev: () => a(iv[(c - 1 + iv.length) % iv.length]),
|
|
15739
|
+
onNext: () => a(iv[(c + 1) % iv.length])
|
|
15740
|
+
}),
|
|
15741
|
+
/* @__PURE__ */ k(Ce, {
|
|
15742
|
+
label: "Stake",
|
|
15743
|
+
title: `${o} Stake`,
|
|
15744
|
+
description: sv[o] || "Base Difficulty",
|
|
15745
|
+
media: /* @__PURE__ */ k(_, {
|
|
15746
|
+
stake: o,
|
|
15747
|
+
width: 48
|
|
15748
|
+
}),
|
|
15749
|
+
onPrev: () => s(av[(l - 1 + av.length) % av.length]),
|
|
15750
|
+
onNext: () => s(av[(l + 1) % av.length]),
|
|
15751
|
+
className: "j-mt-sm"
|
|
15752
|
+
}),
|
|
15753
|
+
/* @__PURE__ */ k("div", {
|
|
15754
|
+
className: "j-flex-col j-gap-sm j-mt-sm",
|
|
15755
|
+
children: /* @__PURE__ */ k(S, {
|
|
15756
|
+
tone: "blue",
|
|
15757
|
+
size: "lg",
|
|
15758
|
+
fullWidth: !0,
|
|
15759
|
+
onClick: () => {
|
|
15760
|
+
n(i, o), r();
|
|
15761
|
+
},
|
|
15762
|
+
children: "Apply"
|
|
15763
|
+
})
|
|
15764
|
+
})
|
|
15765
|
+
] });
|
|
15766
|
+
}
|
|
15767
|
+
//#endregion
|
|
15768
|
+
export { en as BOSS_PICKER_CONFIG, __ as CardEdition, h_ as CardEnhancement, k_ as CardFan, m_ as CardRank, g_ as CardSeal, p_ as CardSuit, Jt as CategoryPicker, A_ as DECK_SPRITE_POS, R_ as DeckSprite, Ae as JIMBO_ANIMATIONS, tt as JamlAesthetic, rv as JamlAestheticSelector, St as JamlBoss, dt as JamlCardRenderer, Mg as JamlCodeEditor, f_ as JamlCurator, ae as JamlEditor, yt as JamlGameCard, a_ as JamlIde, fn as JamlIdeToolbar, bn as JamlIdeVisual, ln as JamlMapEditor, Pt as JamlMapPreview, Pg as JamlSeedInput, Fg as JamlSeedSpinner, d_ as JamlSpeedometer, xt as JamlTag, bt as JamlVoucher, Hg as Jamlyzer, p as JimboApp, m as JimboAppFooter, g as JimboAppScroll, ee as JimboBackButton, i as JimboBackground, v as JimboBadge, h as JimboBalatroFooter, S as JimboButton, Te as JimboCodeBlock, w as JimboColorOption, b as JimboCopyButton, le as JimboCopyRow, me as JimboDeckAndStakeSelectorModal, ge as JimboDualChip, t as JimboFilterBar, f as JimboFlankNav, n as JimboIconButton, we as JimboInfoCard, De as JimboInfoCardAside, ie as JimboInfoCardBody, Ee as JimboInfoCardSub, y as JimboInfoCardTitle, Oe as JimboInlineEdit, s as JimboInnerPanel, xe as JimboInputModal, oe as JimboInset, pe as JimboLink, x as JimboListItem, d as JimboModal, ye as JimboPanel, Ce as JimboPanelSpinner, Se as JimboPanelSplitter, ce as JimboRow, r as JimboSectionHeader, l as JimboSeedCopyChip, _e as JimboSelect, be as JimboSlider, o as JimboSpinner, te as JimboSprite, ve as JimboStack, he as JimboStatGrid, re as JimboStepper, c as JimboTabs, C as JimboText, u as JimboTextInput, fe as JimboToggleList, a as JimboTooltip, de as JimboValueBadge, ue as JimboWordmark, Kt as JokerPicker, V_ as MotelyHello, z_ as MotelyVersionBadge, Lt as MysterySlot, an as PACK_PICKER_CONFIG, nn as PLANET_PICKER_CONFIG, tv as PaginatedFilterBrowser, cv as RunConfigModal, rn as SPECTRAL_PICKER_CONFIG, j_ as STAKE_SPRITE_POS, ne as Showcase, _ as StakeSprite, b_ as StandardCard, $t as TAG_PICKER_CONFIG, tn as TAROT_PICKER_CONFIG, Qt as VOUCHER_PICKER_CONFIG, Ot as extractVisualJamlItems, Ng as normalizeJamlSeed, vt as resolveAnalyzerShopItem, ev as useAnalyzer, U_ as useMotelyStream, c_ as useSearch, $_ as useSearchPool, ke as withAlpha };
|
|
15697
15769
|
|
|
15698
15770
|
//# sourceMappingURL=index.js.map
|