@digitalsee-ai/rcs 1.0.0 → 1.0.1
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/README.md +40 -208
- package/dist/components/digitalsee/workflow/api/dip.d.ts +1 -1
- package/dist/components/digitalsee/workflow/api/dip.types.d.ts +1 -1
- package/dist/components/digitalsee/workflow/config/globalConfig.d.ts +1 -1
- package/dist/components/digitalsee/workflow/index.d.ts +14 -6
- package/dist/components/digitalsee/workflow/types/engine.d.ts +8 -1
- package/dist/components/digitalsee/workflow/utils/mergeConfig.d.ts +3 -6
- package/dist/rcs.css +1 -1
- package/dist/rcs.es.js +682 -674
- package/dist/rcs.es.js.map +1 -1
- package/dist/rcs.umd.js +47 -47
- package/dist/rcs.umd.js.map +1 -1
- package/package.json +25 -23
package/dist/rcs.es.js
CHANGED
|
@@ -2,16 +2,16 @@ var ZN = Object.defineProperty;
|
|
|
2
2
|
var eT = (t, e, n) => e in t ? ZN(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var mt = (t, e, n) => eT(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
4
|
import { jsx as p, jsxs as M, Fragment as At } from "react/jsx-runtime";
|
|
5
|
-
import { useStoreApi as vr, useReactFlow as yr, useStore as Kg, useConnection as tT, Position as Ie, Handle as
|
|
5
|
+
import { useStoreApi as vr, useReactFlow as yr, useStore as Kg, useConnection as tT, Position as Ie, Handle as Xa, useInternalNode as Oo, useNodeConnections as nT, useNodes as rT, NodeResizer as oT, NodeToolbar as iT, useUpdateNodeInternals as Qx, applyEdgeChanges as sT, applyNodeChanges as Zx, getBezierPath as aT, getSmoothStepPath as M0, EdgeLabelRenderer as P0, MarkerType as ek, Panel as tk, useNodesState as lT, useEdgesState as cT, MiniMap as uT, ReactFlow as dT, ConnectionMode as fT, ConnectionLineType as hT, Background as pT, BackgroundVariant as mT, Controls as gT, ReactFlowProvider as wT } from "@xyflow/react";
|
|
6
6
|
import * as Lt from "react";
|
|
7
7
|
import Ne, { useCallback as V, createContext as rn, useContext as ht, useState as Z, useEffect as le, useMemo as ce, useRef as pe, cloneElement as fm, forwardRef as Zt, useLayoutEffect as Xg, useReducer as Fd, Component as vT, Fragment as so, memo as br, useId as yT, useImperativeHandle as hn, isValidElement as bT } from "react";
|
|
8
8
|
import { useDispatch as CT, useSelector as xT, Provider as kT } from "react-redux";
|
|
9
9
|
import { createIntlCache as ET, createIntl as ST, FormattedMessage as Fe, IntlProvider as DT } from "react-intl";
|
|
10
|
-
import { RobotOutlined as hm, CloseOutlined as Tl, CloseCircleFilled as Bl, CodeOutlined as nk, FunctionOutlined as rk, FontSizeOutlined as ok, CopyOutlined as
|
|
10
|
+
import { RobotOutlined as hm, CloseOutlined as Tl, CloseCircleFilled as Bl, CodeOutlined as nk, FunctionOutlined as rk, FontSizeOutlined as ok, CopyOutlined as Zs, DeleteOutlined as Cr, PlusOutlined as ao, UploadOutlined as AT, RollbackOutlined as OT, CloudUploadOutlined as _T, EditOutlined as _o, FileSearchOutlined as NT, UserAddOutlined as TT, EyeInvisibleOutlined as ik, EyeOutlined as Rd, SyncOutlined as Md, LinkOutlined as BT, ReloadOutlined as Ps, GlobalOutlined as sk, CaretDownOutlined as pm, ApiOutlined as Ou, CheckCircleFilled as Pd, SettingOutlined as Yg, ThunderboltOutlined as ak, FullscreenOutlined as IT, MinusCircleOutlined as _u, PlusCircleOutlined as Es, DownloadOutlined as FT, RocketOutlined as Ti, ExperimentFilled as lk, CheckOutlined as RT, VerticalAlignTopOutlined as MT, ArrowUpOutlined as PT, ArrowDownOutlined as LT, VerticalAlignBottomOutlined as $T, ArrowLeftOutlined as Il, LoadingOutlined as HT, WarningFilled as zT, PlayCircleOutlined as ci, FilterOutlined as ck, SearchOutlined as uk, QuestionCircleOutlined as dk, FormOutlined as fk, ExclamationCircleOutlined as Nu, BookOutlined as jT, UsbOutlined as VT, ExportOutlined as WT, InfoCircleOutlined as L0, SafetyCertificateOutlined as UT, HolderOutlined as qT } from "@ant-design/icons";
|
|
11
11
|
import { createSlice as hk, configureStore as GT } from "@reduxjs/toolkit";
|
|
12
12
|
import { AiOutlinePlusCircle as KT } from "react-icons/ai";
|
|
13
|
-
import { cloneDeep as Tr, isEqual as
|
|
14
|
-
import { message as he, theme as YT, ConfigProvider as pk, Input as qe, Button as ae, Tooltip as Ke, Radio as Ao, InputNumber as Zo, Space as Ye, Form as me, Card as ir, Collapse as JT, DatePicker as Yi, TimePicker as Fl, Divider as Nn, Alert as
|
|
13
|
+
import { cloneDeep as Tr, isEqual as Ya, includes as Jg, omit as Ls, debounce as XT } from "lodash-es";
|
|
14
|
+
import { message as he, theme as YT, ConfigProvider as pk, Input as qe, Button as ae, Tooltip as Ke, Radio as Ao, InputNumber as Zo, Space as Ye, Form as me, Card as ir, Collapse as JT, DatePicker as Yi, TimePicker as Fl, Divider as Nn, Alert as Ja, Cascader as QT, Checkbox as mk, Select as Xe, Switch as Ld, TreeSelect as ZT, AutoComplete as eB, ColorPicker as tB, Mentions as nB, Rate as rB, Slider as oB, Upload as iB, Typography as un, Modal as lo, Empty as $s, Spin as Wn, Tree as mm, Tag as Wt, Progress as gk, Skeleton as $d, Result as wk, Row as vk, Col as Ss, Tabs as yk, Popconfirm as Hd, Badge as Qg, Drawer as sB } from "antd";
|
|
15
15
|
import bk from "antd/locale/zh_CN";
|
|
16
16
|
import aB, { createPortal as Ck, unstable_batchedUpdates as rc } from "react-dom";
|
|
17
17
|
import { useReactive as Gn, useEventEmitter as Zg, useSize as lB, useMount as cB, useClickAway as xk, useUnmount as ew, useDebounceFn as uB, useRequest as dB } from "ahooks";
|
|
@@ -2313,7 +2313,7 @@ function FB(t) {
|
|
|
2313
2313
|
throw new Error(`Base64 编码失败: ${e instanceof Error ? e.message : "未知错误"}`);
|
|
2314
2314
|
}
|
|
2315
2315
|
}
|
|
2316
|
-
function
|
|
2316
|
+
function ea(t) {
|
|
2317
2317
|
try {
|
|
2318
2318
|
const e = JSON.stringify(t);
|
|
2319
2319
|
return FB(e);
|
|
@@ -2332,7 +2332,7 @@ function _k(t, e) {
|
|
|
2332
2332
|
const { toString: RB } = Object.prototype, { getPrototypeOf: tw } = Object, { iterator: zd, toStringTag: Nk } = Symbol, jd = /* @__PURE__ */ ((t) => (e) => {
|
|
2333
2333
|
const n = RB.call(e);
|
|
2334
2334
|
return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
|
|
2335
|
-
})(/* @__PURE__ */ Object.create(null)), Mr = (t) => (t = t.toLowerCase(), (e) => jd(e) === t), Vd = (t) => (e) => typeof e === t, { isArray:
|
|
2335
|
+
})(/* @__PURE__ */ Object.create(null)), Mr = (t) => (t = t.toLowerCase(), (e) => jd(e) === t), Vd = (t) => (e) => typeof e === t, { isArray: ta } = Array, Hs = Vd("undefined");
|
|
2336
2336
|
function Rl(t) {
|
|
2337
2337
|
return t !== null && !Hs(t) && t.constructor !== null && !Hs(t.constructor) && jn(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
2338
2338
|
}
|
|
@@ -2363,7 +2363,7 @@ function Pl(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
|
2363
2363
|
if (t === null || typeof t > "u")
|
|
2364
2364
|
return;
|
|
2365
2365
|
let r, o;
|
|
2366
|
-
if (typeof t != "object" && (t = [t]),
|
|
2366
|
+
if (typeof t != "object" && (t = [t]), ta(t))
|
|
2367
2367
|
for (r = 0, o = t.length; r < o; r++)
|
|
2368
2368
|
e.call(null, t[r], r, t);
|
|
2369
2369
|
else {
|
|
@@ -2390,7 +2390,7 @@ const Si = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typ
|
|
|
2390
2390
|
function gm() {
|
|
2391
2391
|
const { caseless: t, skipUndefined: e } = Fk(this) && this || {}, n = {}, r = (o, i) => {
|
|
2392
2392
|
const s = t && Ik(n, i) || i;
|
|
2393
|
-
ou(n[s]) && ou(o) ? n[s] = gm(n[s], o) : ou(o) ? n[s] = gm({}, o) :
|
|
2393
|
+
ou(n[s]) && ou(o) ? n[s] = gm(n[s], o) : ou(o) ? n[s] = gm({}, o) : ta(o) ? n[s] = o.slice() : (!e || !Hs(o)) && (n[s] = o);
|
|
2394
2394
|
};
|
|
2395
2395
|
for (let o = 0, i = arguments.length; o < i; o++)
|
|
2396
2396
|
arguments[o] && Pl(arguments[o], r);
|
|
@@ -2418,7 +2418,7 @@ const QB = (t, e, n, { allOwnKeys: r } = {}) => (Pl(e, (o, i) => {
|
|
|
2418
2418
|
return r !== -1 && r === n;
|
|
2419
2419
|
}, rI = (t) => {
|
|
2420
2420
|
if (!t) return null;
|
|
2421
|
-
if (
|
|
2421
|
+
if (ta(t)) return t;
|
|
2422
2422
|
let e = t.length;
|
|
2423
2423
|
if (!Bk(e)) return null;
|
|
2424
2424
|
const n = new Array(e);
|
|
@@ -2470,7 +2470,7 @@ const QB = (t, e, n, { allOwnKeys: r } = {}) => (Pl(e, (o, i) => {
|
|
|
2470
2470
|
n[i] = !0;
|
|
2471
2471
|
});
|
|
2472
2472
|
};
|
|
2473
|
-
return
|
|
2473
|
+
return ta(t) ? r(t) : r(String(t).split(e)), n;
|
|
2474
2474
|
}, fI = () => {
|
|
2475
2475
|
}, hI = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
|
|
2476
2476
|
function pI(t) {
|
|
@@ -2485,7 +2485,7 @@ const mI = (t) => {
|
|
|
2485
2485
|
return r;
|
|
2486
2486
|
if (!("toJSON" in r)) {
|
|
2487
2487
|
e[o] = r;
|
|
2488
|
-
const i =
|
|
2488
|
+
const i = ta(r) ? [] : {};
|
|
2489
2489
|
return Pl(r, (s, a) => {
|
|
2490
2490
|
const l = n(s, o + 1);
|
|
2491
2491
|
!Hs(l) && (i[a] = l);
|
|
@@ -2503,7 +2503,7 @@ const mI = (t) => {
|
|
|
2503
2503
|
typeof setImmediate == "function",
|
|
2504
2504
|
jn(Si.postMessage)
|
|
2505
2505
|
), vI = typeof queueMicrotask < "u" ? queueMicrotask.bind(Si) : typeof process < "u" && process.nextTick || Mk, yI = (t) => t != null && jn(t[zd]), re = {
|
|
2506
|
-
isArray:
|
|
2506
|
+
isArray: ta,
|
|
2507
2507
|
isArrayBuffer: Tk,
|
|
2508
2508
|
isBuffer: Rl,
|
|
2509
2509
|
isFormData: UB,
|
|
@@ -2960,7 +2960,7 @@ const MI = re.toObjectSet([
|
|
|
2960
2960
|
o = s.indexOf(":"), n = s.substring(0, o).trim().toLowerCase(), r = s.substring(o + 1).trim(), !(!n || e[n] && MI[n]) && (n === "set-cookie" ? e[n] ? e[n].push(r) : e[n] = [r] : e[n] = e[n] ? e[n] + ", " + r : r);
|
|
2961
2961
|
}), e;
|
|
2962
2962
|
}, W0 = Symbol("internals");
|
|
2963
|
-
function
|
|
2963
|
+
function va(t) {
|
|
2964
2964
|
return t && String(t).trim().toLowerCase();
|
|
2965
2965
|
}
|
|
2966
2966
|
function iu(t) {
|
|
@@ -3005,7 +3005,7 @@ let Vn = class {
|
|
|
3005
3005
|
set(e, n, r) {
|
|
3006
3006
|
const o = this;
|
|
3007
3007
|
function i(a, l, c) {
|
|
3008
|
-
const u =
|
|
3008
|
+
const u = va(l);
|
|
3009
3009
|
if (!u)
|
|
3010
3010
|
throw new Error("header name must be a non-empty string");
|
|
3011
3011
|
const d = re.findKey(o, u);
|
|
@@ -3029,7 +3029,7 @@ let Vn = class {
|
|
|
3029
3029
|
return this;
|
|
3030
3030
|
}
|
|
3031
3031
|
get(e, n) {
|
|
3032
|
-
if (e =
|
|
3032
|
+
if (e = va(e), e) {
|
|
3033
3033
|
const r = re.findKey(this, e);
|
|
3034
3034
|
if (r) {
|
|
3035
3035
|
const o = this[r];
|
|
@@ -3046,7 +3046,7 @@ let Vn = class {
|
|
|
3046
3046
|
}
|
|
3047
3047
|
}
|
|
3048
3048
|
has(e, n) {
|
|
3049
|
-
if (e =
|
|
3049
|
+
if (e = va(e), e) {
|
|
3050
3050
|
const r = re.findKey(this, e);
|
|
3051
3051
|
return !!(r && this[r] !== void 0 && (!n || Lf(this, this[r], r, n)));
|
|
3052
3052
|
}
|
|
@@ -3056,7 +3056,7 @@ let Vn = class {
|
|
|
3056
3056
|
const r = this;
|
|
3057
3057
|
let o = !1;
|
|
3058
3058
|
function i(s) {
|
|
3059
|
-
if (s =
|
|
3059
|
+
if (s = va(s), s) {
|
|
3060
3060
|
const a = re.findKey(r, s);
|
|
3061
3061
|
a && (!n || Lf(r, r[a], a, n)) && (delete r[a], o = !0);
|
|
3062
3062
|
}
|
|
@@ -3118,7 +3118,7 @@ let Vn = class {
|
|
|
3118
3118
|
accessors: {}
|
|
3119
3119
|
}).accessors, o = this.prototype;
|
|
3120
3120
|
function i(s) {
|
|
3121
|
-
const a =
|
|
3121
|
+
const a = va(s);
|
|
3122
3122
|
r[a] || (zI(o, s), r[a] = !0);
|
|
3123
3123
|
}
|
|
3124
3124
|
return re.isArray(e) ? e.forEach(i) : i(e), this;
|
|
@@ -3145,10 +3145,10 @@ function $f(t, e) {
|
|
|
3145
3145
|
function Wk(t) {
|
|
3146
3146
|
return !!(t && t.__CANCEL__);
|
|
3147
3147
|
}
|
|
3148
|
-
function
|
|
3148
|
+
function na(t, e, n) {
|
|
3149
3149
|
Ge.call(this, t ?? "canceled", Ge.ERR_CANCELED, e, n), this.name = "CanceledError";
|
|
3150
3150
|
}
|
|
3151
|
-
re.inherits(
|
|
3151
|
+
re.inherits(na, Ge, {
|
|
3152
3152
|
__CANCEL__: !0
|
|
3153
3153
|
});
|
|
3154
3154
|
function Uk(t, e, n) {
|
|
@@ -3396,7 +3396,7 @@ const Gk = (t) => {
|
|
|
3396
3396
|
}, i === void 0 && s.setContentType(null), "setRequestHeader" in v && re.forEach(s.toJSON(), function(E, b) {
|
|
3397
3397
|
v.setRequestHeader(b, E);
|
|
3398
3398
|
}), re.isUndefined(o.withCredentials) || (v.withCredentials = !!o.withCredentials), a && a !== "json" && (v.responseType = o.responseType), c && ([f, m] = Tu(c, !0), v.addEventListener("progress", f)), l && v.upload && ([d, h] = Tu(l), v.upload.addEventListener("progress", d), v.upload.addEventListener("loadend", h)), (o.cancelToken || o.signal) && (u = (C) => {
|
|
3399
|
-
v && (r(!C || C.type ? new
|
|
3399
|
+
v && (r(!C || C.type ? new na(null, t, v) : C), v.abort(), v = null);
|
|
3400
3400
|
}, o.cancelToken && o.cancelToken.subscribe(u), o.signal && (o.signal.aborted ? u() : o.signal.addEventListener("abort", u)));
|
|
3401
3401
|
const g = jI(o.url);
|
|
3402
3402
|
if (g && Cn.protocols.indexOf(g) === -1) {
|
|
@@ -3413,7 +3413,7 @@ const Gk = (t) => {
|
|
|
3413
3413
|
if (!o) {
|
|
3414
3414
|
o = !0, a();
|
|
3415
3415
|
const u = c instanceof Error ? c : this.reason;
|
|
3416
|
-
r.abort(u instanceof Ge ? u : new
|
|
3416
|
+
r.abort(u instanceof Ge ? u : new na(u instanceof Error ? u.message : u));
|
|
3417
3417
|
}
|
|
3418
3418
|
};
|
|
3419
3419
|
let s = e && setTimeout(() => {
|
|
@@ -3701,7 +3701,7 @@ const Xk = {
|
|
|
3701
3701
|
};
|
|
3702
3702
|
function Hf(t) {
|
|
3703
3703
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
3704
|
-
throw new
|
|
3704
|
+
throw new na(null, t);
|
|
3705
3705
|
}
|
|
3706
3706
|
function ev(t) {
|
|
3707
3707
|
return Hf(t), t.headers = Vn.from(t.headers), t.data = $f.call(
|
|
@@ -3918,7 +3918,7 @@ let aF = class Jk {
|
|
|
3918
3918
|
r.unsubscribe(i);
|
|
3919
3919
|
}, s;
|
|
3920
3920
|
}, e(function(i, s, a) {
|
|
3921
|
-
r.reason || (r.reason = new
|
|
3921
|
+
r.reason || (r.reason = new na(i, s, a), n(r.reason));
|
|
3922
3922
|
});
|
|
3923
3923
|
}
|
|
3924
3924
|
/**
|
|
@@ -4057,7 +4057,7 @@ function Qk(t) {
|
|
|
4057
4057
|
}
|
|
4058
4058
|
const zt = Qk(Ll);
|
|
4059
4059
|
zt.Axios = Bi;
|
|
4060
|
-
zt.CanceledError =
|
|
4060
|
+
zt.CanceledError = na;
|
|
4061
4061
|
zt.CancelToken = aF;
|
|
4062
4062
|
zt.isCancel = Wk;
|
|
4063
4063
|
zt.VERSION = Yk;
|
|
@@ -4256,7 +4256,7 @@ async function oE(t) {
|
|
|
4256
4256
|
headers: {
|
|
4257
4257
|
"Content-Type": "text/plain"
|
|
4258
4258
|
},
|
|
4259
|
-
data:
|
|
4259
|
+
data: ea(t)
|
|
4260
4260
|
});
|
|
4261
4261
|
}
|
|
4262
4262
|
async function qd(t, e) {
|
|
@@ -4267,7 +4267,7 @@ async function qd(t, e) {
|
|
|
4267
4267
|
headers: {
|
|
4268
4268
|
"Content-Type": "text/plain"
|
|
4269
4269
|
},
|
|
4270
|
-
data:
|
|
4270
|
+
data: ea(e)
|
|
4271
4271
|
},
|
|
4272
4272
|
{ id: t }
|
|
4273
4273
|
);
|
|
@@ -4290,7 +4290,7 @@ async function iw(t, e) {
|
|
|
4290
4290
|
headers: {
|
|
4291
4291
|
"Content-Type": "text/plain"
|
|
4292
4292
|
},
|
|
4293
|
-
data:
|
|
4293
|
+
data: ea(e)
|
|
4294
4294
|
},
|
|
4295
4295
|
{ flowId: t }
|
|
4296
4296
|
);
|
|
@@ -4386,7 +4386,7 @@ async function hE(t, e, n, r, o, i, s) {
|
|
|
4386
4386
|
headers: {
|
|
4387
4387
|
"Content-Type": "text/plain"
|
|
4388
4388
|
},
|
|
4389
|
-
data:
|
|
4389
|
+
data: ea(a)
|
|
4390
4390
|
});
|
|
4391
4391
|
}
|
|
4392
4392
|
async function Cm(t, e, n, r, o, i, s, a) {
|
|
@@ -4424,7 +4424,7 @@ async function pE(t, e, n, r, o, i, s, a) {
|
|
|
4424
4424
|
headers: {
|
|
4425
4425
|
"Content-Type": "text/plain"
|
|
4426
4426
|
},
|
|
4427
|
-
data:
|
|
4427
|
+
data: ea(l)
|
|
4428
4428
|
},
|
|
4429
4429
|
{ id: t }
|
|
4430
4430
|
);
|
|
@@ -4437,7 +4437,7 @@ async function mE(t, e) {
|
|
|
4437
4437
|
headers: {
|
|
4438
4438
|
"Content-Type": "text/plain"
|
|
4439
4439
|
},
|
|
4440
|
-
data:
|
|
4440
|
+
data: ea({
|
|
4441
4441
|
connector_id: null,
|
|
4442
4442
|
account_schema_id: null,
|
|
4443
4443
|
auth_type: null,
|
|
@@ -5091,7 +5091,7 @@ const cw = (t) => [new URLSearchParams(location.href)];
|
|
|
5091
5091
|
function No(t) {
|
|
5092
5092
|
const [e] = cw(), [n, r] = Z(
|
|
5093
5093
|
t || e.get("id")
|
|
5094
|
-
), o =
|
|
5094
|
+
), o = da(), {
|
|
5095
5095
|
nodes: i,
|
|
5096
5096
|
edges: s,
|
|
5097
5097
|
selectedNodes: a,
|
|
@@ -5105,7 +5105,7 @@ function No(t) {
|
|
|
5105
5105
|
}, [n, o]);
|
|
5106
5106
|
const f = V(
|
|
5107
5107
|
(_) => {
|
|
5108
|
-
o(
|
|
5108
|
+
o(Qs(_));
|
|
5109
5109
|
},
|
|
5110
5110
|
[o]
|
|
5111
5111
|
), h = V(() => {
|
|
@@ -5212,7 +5212,7 @@ function Er(t, ...e) {
|
|
|
5212
5212
|
`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`
|
|
5213
5213
|
);
|
|
5214
5214
|
}
|
|
5215
|
-
var rr = Object, zs = rr.getPrototypeOf, Fu = "constructor", Gd = "prototype", Sm = "configurable", Ru = "enumerable", lu = "writable",
|
|
5215
|
+
var rr = Object, zs = rr.getPrototypeOf, Fu = "constructor", Gd = "prototype", Sm = "configurable", Ru = "enumerable", lu = "writable", Qa = "value", ei = (t) => !!t && !!t[In];
|
|
5216
5216
|
function To(t) {
|
|
5217
5217
|
var e;
|
|
5218
5218
|
return t ? BE(t) || Xd(t) || !!t[cv] || !!((e = t[Fu]) != null && e[cv]) || Yd(t) || Jd(t) : !1;
|
|
@@ -5275,7 +5275,7 @@ function Am(t, e) {
|
|
|
5275
5275
|
[lu]: !0,
|
|
5276
5276
|
// could live with !!desc.set as well here...
|
|
5277
5277
|
[Ru]: a[Ru],
|
|
5278
|
-
[
|
|
5278
|
+
[Qa]: t[s]
|
|
5279
5279
|
});
|
|
5280
5280
|
}
|
|
5281
5281
|
return rr.create(zs(t), r);
|
|
@@ -5305,7 +5305,7 @@ function WF() {
|
|
|
5305
5305
|
Er(2);
|
|
5306
5306
|
}
|
|
5307
5307
|
var lc = {
|
|
5308
|
-
[
|
|
5308
|
+
[Qa]: WF
|
|
5309
5309
|
};
|
|
5310
5310
|
function Qd(t) {
|
|
5311
5311
|
return t === null || !uw(t) ? !0 : rr.isFrozen(t);
|
|
@@ -5315,7 +5315,7 @@ function Wi(t) {
|
|
|
5315
5315
|
const e = IE[t];
|
|
5316
5316
|
return e || Er(0, t), e;
|
|
5317
5317
|
}
|
|
5318
|
-
var hv = (t) => !!IE[t],
|
|
5318
|
+
var hv = (t) => !!IE[t], Za, FE = () => Za, UF = (t, e) => ({
|
|
5319
5319
|
drafts_: [],
|
|
5320
5320
|
parent_: t,
|
|
5321
5321
|
immer_: e,
|
|
@@ -5335,9 +5335,9 @@ function _m(t) {
|
|
|
5335
5335
|
Nm(t), t.drafts_.forEach(qF), t.drafts_ = null;
|
|
5336
5336
|
}
|
|
5337
5337
|
function Nm(t) {
|
|
5338
|
-
t ===
|
|
5338
|
+
t === Za && (Za = t.parent_);
|
|
5339
5339
|
}
|
|
5340
|
-
var mv = (t) =>
|
|
5340
|
+
var mv = (t) => Za = UF(Za, t);
|
|
5341
5341
|
function qF(t) {
|
|
5342
5342
|
const e = t[In];
|
|
5343
5343
|
e.type_ === 0 || e.type_ === 1 ? e.revoke_() : e.revoked_ = !0;
|
|
@@ -5481,7 +5481,7 @@ function JF(t, e) {
|
|
|
5481
5481
|
callbacks_: void 0
|
|
5482
5482
|
};
|
|
5483
5483
|
let o = r, i = $u;
|
|
5484
|
-
n && (o = [r], i =
|
|
5484
|
+
n && (o = [r], i = el);
|
|
5485
5485
|
const { revoke: s, proxy: a } = Proxy.revocable(o, i);
|
|
5486
5486
|
return r.draft_ = a, r.revoke_ = s, [a, r];
|
|
5487
5487
|
}
|
|
@@ -5541,7 +5541,7 @@ var $u = {
|
|
|
5541
5541
|
[lu]: !0,
|
|
5542
5542
|
[Sm]: t.type_ !== 1 || e !== "length",
|
|
5543
5543
|
[Ru]: r[Ru],
|
|
5544
|
-
[
|
|
5544
|
+
[Qa]: n[e]
|
|
5545
5545
|
};
|
|
5546
5546
|
},
|
|
5547
5547
|
defineProperty() {
|
|
@@ -5553,18 +5553,18 @@ var $u = {
|
|
|
5553
5553
|
setPrototypeOf() {
|
|
5554
5554
|
Er(12);
|
|
5555
5555
|
}
|
|
5556
|
-
},
|
|
5556
|
+
}, el = {};
|
|
5557
5557
|
for (let t in $u) {
|
|
5558
5558
|
let e = $u[t];
|
|
5559
|
-
|
|
5559
|
+
el[t] = function() {
|
|
5560
5560
|
const n = arguments;
|
|
5561
5561
|
return n[0] = n[0][0], e.apply(this, n);
|
|
5562
5562
|
};
|
|
5563
5563
|
}
|
|
5564
|
-
|
|
5565
|
-
return
|
|
5564
|
+
el.deleteProperty = function(t, e) {
|
|
5565
|
+
return el.set.call(this, t, e, void 0);
|
|
5566
5566
|
};
|
|
5567
|
-
|
|
5567
|
+
el.set = function(t, e, n) {
|
|
5568
5568
|
return $u.set.call(this, t[0], e, n, t[0]);
|
|
5569
5569
|
};
|
|
5570
5570
|
function jf(t, e) {
|
|
@@ -5574,7 +5574,7 @@ function jf(t, e) {
|
|
|
5574
5574
|
function QF(t, e, n) {
|
|
5575
5575
|
var o;
|
|
5576
5576
|
const r = LE(e, n);
|
|
5577
|
-
return r ?
|
|
5577
|
+
return r ? Qa in r ? r[Qa] : (
|
|
5578
5578
|
// This is a very special case, if the prop is a getter defined by the
|
|
5579
5579
|
// prototype, we should invoke it with the draft as context!
|
|
5580
5580
|
(o = r.get) == null ? void 0 : o.call(t.draft_)
|
|
@@ -5741,7 +5741,7 @@ const nR = {
|
|
|
5741
5741
|
id: "PLACEHOLDER_NODE",
|
|
5742
5742
|
description: "开始节点"
|
|
5743
5743
|
}
|
|
5744
|
-
},
|
|
5744
|
+
}, ra = () => {
|
|
5745
5745
|
yr();
|
|
5746
5746
|
const t = vr(), e = V(
|
|
5747
5747
|
(s) => {
|
|
@@ -5802,7 +5802,7 @@ const nR = {
|
|
|
5802
5802
|
};
|
|
5803
5803
|
};
|
|
5804
5804
|
var cc = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
5805
|
-
function
|
|
5805
|
+
function oa(t) {
|
|
5806
5806
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
5807
5807
|
}
|
|
5808
5808
|
var Vf = { exports: {} };
|
|
@@ -5845,7 +5845,7 @@ function rR() {
|
|
|
5845
5845
|
})(Vf)), Vf.exports;
|
|
5846
5846
|
}
|
|
5847
5847
|
var oR = rR();
|
|
5848
|
-
const $n = /* @__PURE__ */
|
|
5848
|
+
const $n = /* @__PURE__ */ oa(oR), iR = (t, e, n, r) => (t.edges || []).some((i) => i ? r === Je.SOURCE ? i.source === e && (i.sourceHandle === n || !i.sourceHandle && n === "output") : i.target === e && (i.targetHandle === n || !i.targetHandle && n === "input") : !1), sR = [
|
|
5849
5849
|
He.MEMORY,
|
|
5850
5850
|
He.TOOLS,
|
|
5851
5851
|
He.CHAT_MODEL
|
|
@@ -5872,7 +5872,7 @@ const $n = /* @__PURE__ */ ra(oR), iR = (t, e, n, r) => (t.edges || []).some((i)
|
|
|
5872
5872
|
shape: f = "rhombus",
|
|
5873
5873
|
connectionLimit: h = 1 / 0
|
|
5874
5874
|
}) => {
|
|
5875
|
-
const { getHandleConnections: m, handleStatus: w } = _F(), { getNode: v } = yr(), { getNodes: y } =
|
|
5875
|
+
const { getHandleConnections: m, handleStatus: w } = _F(), { getNode: v } = yr(), { getNodes: y } = ra(), g = y(), C = It(), E = pn(), { openNodeSelector: b, nodeSelectorVisible: k } = fa(), S = (R) => R.inProgress, x = Kg(
|
|
5876
5876
|
V(
|
|
5877
5877
|
(R) => iR(R, n, e, t),
|
|
5878
5878
|
[n, e, t]
|
|
@@ -5969,7 +5969,7 @@ const $n = /* @__PURE__ */ ra(oR), iR = (t, e, n, r) => (t.edges || []).some((i)
|
|
|
5969
5969
|
}, K = $n(
|
|
5970
5970
|
"workflow-handle",
|
|
5971
5971
|
`workflow-${t}-handle`,
|
|
5972
|
-
"
|
|
5972
|
+
"nodrag nopan",
|
|
5973
5973
|
`workflow-handle-${P}`,
|
|
5974
5974
|
`workflow-handle-${u}`,
|
|
5975
5975
|
{
|
|
@@ -6081,7 +6081,7 @@ const $n = /* @__PURE__ */ ra(oR), iR = (t, e, n, r) => (t.edges || []).some((i)
|
|
|
6081
6081
|
return /* @__PURE__ */ M(
|
|
6082
6082
|
"div",
|
|
6083
6083
|
{
|
|
6084
|
-
className: "workflow-handle-extender-container
|
|
6084
|
+
className: "workflow-handle-extender-container nodrag nopan",
|
|
6085
6085
|
style: R.containerStyle,
|
|
6086
6086
|
children: [
|
|
6087
6087
|
/* @__PURE__ */ p("div", { className: "workflow-handle-extender", style: R.extenderStyle }),
|
|
@@ -6100,7 +6100,7 @@ const $n = /* @__PURE__ */ ra(oR), iR = (t, e, n, r) => (t.edges || []).some((i)
|
|
|
6100
6100
|
};
|
|
6101
6101
|
return /* @__PURE__ */ M("div", { children: [
|
|
6102
6102
|
/* @__PURE__ */ p(
|
|
6103
|
-
|
|
6103
|
+
Xa,
|
|
6104
6104
|
{
|
|
6105
6105
|
type: t,
|
|
6106
6106
|
position: r,
|
|
@@ -6671,7 +6671,7 @@ function NR(t) {
|
|
|
6671
6671
|
var e;
|
|
6672
6672
|
return ((e = t.visibleWhen) == null ? void 0 : e.hideStrategy) || "unregister";
|
|
6673
6673
|
}
|
|
6674
|
-
function
|
|
6674
|
+
function Ta(t, e, n = !1) {
|
|
6675
6675
|
return typeof t == "boolean" ? t : _R(t) ? js(t, e) : n;
|
|
6676
6676
|
}
|
|
6677
6677
|
const TR = (t, e) => {
|
|
@@ -6828,7 +6828,7 @@ var FR = {
|
|
|
6828
6828
|
t.current = o, o == null && t.unref();
|
|
6829
6829
|
}
|
|
6830
6830
|
}
|
|
6831
|
-
}, Hu = /* @__PURE__ */ new WeakMap(), zu = /* @__PURE__ */ new WeakMap(),
|
|
6831
|
+
}, Hu = /* @__PURE__ */ new WeakMap(), zu = /* @__PURE__ */ new WeakMap(), Ba = /* @__PURE__ */ new WeakMap(), UE = /* @__PURE__ */ new WeakMap(), Ev = /* @__PURE__ */ new WeakMap(), Sv = /* @__PURE__ */ new WeakMap(), Dv = /* @__PURE__ */ new WeakMap(), W = {
|
|
6832
6832
|
ancestors(t) {
|
|
6833
6833
|
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, {
|
|
6834
6834
|
reverse: n = !1
|
|
@@ -7004,27 +7004,27 @@ var FR = {
|
|
|
7004
7004
|
return r;
|
|
7005
7005
|
}
|
|
7006
7006
|
};
|
|
7007
|
-
function
|
|
7007
|
+
function tl(t) {
|
|
7008
7008
|
"@babel/helpers - typeof";
|
|
7009
|
-
return
|
|
7009
|
+
return tl = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
7010
7010
|
return typeof e;
|
|
7011
7011
|
} : function(e) {
|
|
7012
7012
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
7013
|
-
},
|
|
7013
|
+
}, tl(t);
|
|
7014
7014
|
}
|
|
7015
7015
|
function PR(t, e) {
|
|
7016
|
-
if (
|
|
7016
|
+
if (tl(t) !== "object" || t === null) return t;
|
|
7017
7017
|
var n = t[Symbol.toPrimitive];
|
|
7018
7018
|
if (n !== void 0) {
|
|
7019
7019
|
var r = n.call(t, e);
|
|
7020
|
-
if (
|
|
7020
|
+
if (tl(r) !== "object") return r;
|
|
7021
7021
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
7022
7022
|
}
|
|
7023
7023
|
return (e === "string" ? String : Number)(t);
|
|
7024
7024
|
}
|
|
7025
7025
|
function LR(t) {
|
|
7026
7026
|
var e = PR(t, "string");
|
|
7027
|
-
return
|
|
7027
|
+
return tl(e) === "symbol" ? e : String(e);
|
|
7028
7028
|
}
|
|
7029
7029
|
function mn(t, e, n) {
|
|
7030
7030
|
return e = LR(e), e in t ? Object.defineProperty(t, e, {
|
|
@@ -7597,7 +7597,7 @@ var Go = {
|
|
|
7597
7597
|
if (t[s] === void 0 && e[s] !== void 0)
|
|
7598
7598
|
return !1;
|
|
7599
7599
|
return !0;
|
|
7600
|
-
}, mw = (t) => t.selection ? t.selection : t.children.length > 0 ? I.end(t, []) : [0],
|
|
7600
|
+
}, mw = (t) => t.selection ? t.selection : t.children.length > 0 ? I.end(t, []) : [0], ia = (t, e) => {
|
|
7601
7601
|
var [n] = I.node(t, e);
|
|
7602
7602
|
return (r) => r === n;
|
|
7603
7603
|
}, gw = function(e) {
|
|
@@ -8131,21 +8131,21 @@ var Pv = function(e, n) {
|
|
|
8131
8131
|
for (var r = arguments.length, o = new Array(r > 2 ? r - 2 : 0), i = 2; i < r; i++)
|
|
8132
8132
|
o[i - 2] = arguments[i];
|
|
8133
8133
|
return [...e.slice(0, n), ...o, ...e.slice(n)];
|
|
8134
|
-
},
|
|
8134
|
+
}, nl = function(e, n, r) {
|
|
8135
8135
|
for (var o = arguments.length, i = new Array(o > 3 ? o - 3 : 0), s = 3; s < o; s++)
|
|
8136
8136
|
i[s - 3] = arguments[s];
|
|
8137
8137
|
return [...e.slice(0, n), ...i, ...e.slice(n + r)];
|
|
8138
|
-
}, Fm =
|
|
8138
|
+
}, Fm = nl, vw = (t, e, n) => {
|
|
8139
8139
|
if (e.length === 0)
|
|
8140
8140
|
throw new Error("Cannot modify the editor");
|
|
8141
8141
|
for (var r = be.get(t, e), o = e.slice(), i = n(r); o.length > 1; ) {
|
|
8142
8142
|
var s = o.pop(), a = be.get(t, o);
|
|
8143
8143
|
i = ju(ju({}, a), {}, {
|
|
8144
|
-
children:
|
|
8144
|
+
children: nl(a.children, s, 1, i)
|
|
8145
8145
|
});
|
|
8146
8146
|
}
|
|
8147
8147
|
var l = o.pop();
|
|
8148
|
-
t.children =
|
|
8148
|
+
t.children = nl(t.children, l, 1, i);
|
|
8149
8149
|
}, yi = (t, e, n) => {
|
|
8150
8150
|
e.length === 0 ? t.children = n(t.children) : vw(t, e, (r) => {
|
|
8151
8151
|
if (Te.isText(r))
|
|
@@ -8228,7 +8228,7 @@ var v2 = {
|
|
|
8228
8228
|
});
|
|
8229
8229
|
else
|
|
8230
8230
|
throw new Error('Cannot apply a "merge_node" operation at path ['.concat(l, "] to nodes of different interfaces: ").concat(Jt.stringify(Y), " ").concat(Jt.stringify(X)));
|
|
8231
|
-
return
|
|
8231
|
+
return nl(U, d, 2, se);
|
|
8232
8232
|
}), n = !0;
|
|
8233
8233
|
break;
|
|
8234
8234
|
}
|
|
@@ -8367,15 +8367,15 @@ var v2 = {
|
|
|
8367
8367
|
children: Le
|
|
8368
8368
|
});
|
|
8369
8369
|
}
|
|
8370
|
-
return
|
|
8370
|
+
return nl(U, ee, 1, X, se);
|
|
8371
8371
|
}), n = !0;
|
|
8372
8372
|
break;
|
|
8373
8373
|
}
|
|
8374
8374
|
}
|
|
8375
8375
|
if (n && t.selection) {
|
|
8376
8376
|
var ne = Pt({}, t.selection);
|
|
8377
|
-
for (var [
|
|
8378
|
-
ne[R] = at.transform(
|
|
8377
|
+
for (var [ue, R] of oe.points(ne))
|
|
8378
|
+
ne[R] = at.transform(ue, e);
|
|
8379
8379
|
oe.equals(ne, t.selection) || (t.selection = ne);
|
|
8380
8380
|
}
|
|
8381
8381
|
}
|
|
@@ -8454,12 +8454,12 @@ var v2 = {
|
|
|
8454
8454
|
}))
|
|
8455
8455
|
return;
|
|
8456
8456
|
var s = oe.start(o), a = I.pointRef(t, s), l = I.pointRef(t, i);
|
|
8457
|
-
|
|
8457
|
+
de.delete(t, {
|
|
8458
8458
|
at: o,
|
|
8459
8459
|
voids: r
|
|
8460
8460
|
});
|
|
8461
8461
|
var c = a.unref(), u = l.unref();
|
|
8462
|
-
o = c || u,
|
|
8462
|
+
o = c || u, de.setSelection(t, {
|
|
8463
8463
|
anchor: o,
|
|
8464
8464
|
focus: o
|
|
8465
8465
|
});
|
|
@@ -8504,7 +8504,7 @@ function dc(t) {
|
|
|
8504
8504
|
}
|
|
8505
8505
|
return t;
|
|
8506
8506
|
}
|
|
8507
|
-
var
|
|
8507
|
+
var de = dc(dc(dc(dc({}, v2), y2), b2), C2), uu = /* @__PURE__ */ new WeakMap(), x2 = (t) => uu.get(t) || !1, k2 = (t, e, n) => {
|
|
8508
8508
|
var r = uu.get(t) || !1;
|
|
8509
8509
|
uu.set(t, !0);
|
|
8510
8510
|
try {
|
|
@@ -8543,10 +8543,10 @@ var E2 = (t, e) => {
|
|
|
8543
8543
|
var i = W.operationCanTransformPath(e) ? (s) => W.transform(s, e) : void 0;
|
|
8544
8544
|
GE(t, t.getDirtyPaths(e), i);
|
|
8545
8545
|
}
|
|
8546
|
-
|
|
8546
|
+
de.transform(t, e), t.operations.push(e), I.normalize(t, {
|
|
8547
8547
|
operation: e
|
|
8548
|
-
}), e.type === "set_selection" && (t.marks = null),
|
|
8549
|
-
|
|
8548
|
+
}), e.type === "set_selection" && (t.marks = null), Ba.get(t) || (Ba.set(t, !0), Promise.resolve().then(() => {
|
|
8549
|
+
Ba.set(t, !1), t.onChange({
|
|
8550
8550
|
operation: e
|
|
8551
8551
|
}), t.operations = [];
|
|
8552
8552
|
}));
|
|
@@ -8622,7 +8622,7 @@ var E2 = (t, e) => {
|
|
|
8622
8622
|
var i = {
|
|
8623
8623
|
text: ""
|
|
8624
8624
|
};
|
|
8625
|
-
|
|
8625
|
+
de.insertNodes(t, i, {
|
|
8626
8626
|
at: o.concat(0),
|
|
8627
8627
|
voids: !0
|
|
8628
8628
|
});
|
|
@@ -8633,13 +8633,13 @@ var E2 = (t, e) => {
|
|
|
8633
8633
|
if (!Te.isText(c)) {
|
|
8634
8634
|
var u = c.children[a], d = c.children[a - 1], f = l === r.children.length - 1, h = Te.isText(u) || Be.isElement(u) && t.isInline(u);
|
|
8635
8635
|
if (h !== s)
|
|
8636
|
-
h ? n != null && n.fallbackElement ?
|
|
8636
|
+
h ? n != null && n.fallbackElement ? de.wrapNodes(t, n.fallbackElement(), {
|
|
8637
8637
|
at: o.concat(a),
|
|
8638
8638
|
voids: !0
|
|
8639
|
-
}) :
|
|
8639
|
+
}) : de.removeNodes(t, {
|
|
8640
8640
|
at: o.concat(a),
|
|
8641
8641
|
voids: !0
|
|
8642
|
-
}) :
|
|
8642
|
+
}) : de.unwrapNodes(t, {
|
|
8643
8643
|
at: o.concat(a),
|
|
8644
8644
|
voids: !0
|
|
8645
8645
|
}), a--;
|
|
@@ -8649,7 +8649,7 @@ var E2 = (t, e) => {
|
|
|
8649
8649
|
var m = {
|
|
8650
8650
|
text: ""
|
|
8651
8651
|
};
|
|
8652
|
-
|
|
8652
|
+
de.insertNodes(t, m, {
|
|
8653
8653
|
at: o.concat(a),
|
|
8654
8654
|
voids: !0
|
|
8655
8655
|
}), a++;
|
|
@@ -8657,7 +8657,7 @@ var E2 = (t, e) => {
|
|
|
8657
8657
|
var w = {
|
|
8658
8658
|
text: ""
|
|
8659
8659
|
};
|
|
8660
|
-
|
|
8660
|
+
de.insertNodes(t, w, {
|
|
8661
8661
|
at: o.concat(a + 1),
|
|
8662
8662
|
voids: !0
|
|
8663
8663
|
}), a++;
|
|
@@ -8670,13 +8670,13 @@ var E2 = (t, e) => {
|
|
|
8670
8670
|
}
|
|
8671
8671
|
d != null && Te.isText(d) && (Te.equals(u, d, {
|
|
8672
8672
|
loose: !0
|
|
8673
|
-
}) ? (
|
|
8673
|
+
}) ? (de.mergeNodes(t, {
|
|
8674
8674
|
at: o.concat(a),
|
|
8675
8675
|
voids: !0
|
|
8676
|
-
}), a--) : d.text === "" ? (
|
|
8676
|
+
}), a--) : d.text === "" ? (de.removeNodes(t, {
|
|
8677
8677
|
at: o.concat(a - 1),
|
|
8678
8678
|
voids: !0
|
|
8679
|
-
}), a--) : u.text === "" && (
|
|
8679
|
+
}), a--) : u.text === "" && (de.removeNodes(t, {
|
|
8680
8680
|
at: o.concat(a),
|
|
8681
8681
|
voids: !0
|
|
8682
8682
|
}), a--));
|
|
@@ -8754,7 +8754,7 @@ var N2 = (t, e, n) => {
|
|
|
8754
8754
|
}
|
|
8755
8755
|
}
|
|
8756
8756
|
if (i || s)
|
|
8757
|
-
|
|
8757
|
+
de.setNodes(t, {
|
|
8758
8758
|
[e]: n
|
|
8759
8759
|
}, {
|
|
8760
8760
|
match: o,
|
|
@@ -8765,7 +8765,7 @@ var N2 = (t, e, n) => {
|
|
|
8765
8765
|
var u = zv(zv({}, I.marks(t) || {}), {}, {
|
|
8766
8766
|
[e]: n
|
|
8767
8767
|
});
|
|
8768
|
-
t.marks = u,
|
|
8768
|
+
t.marks = u, Ba.get(t) || t.onChange();
|
|
8769
8769
|
}
|
|
8770
8770
|
}
|
|
8771
8771
|
};
|
|
@@ -8851,7 +8851,7 @@ var B2 = function(e, n) {
|
|
|
8851
8851
|
var {
|
|
8852
8852
|
selection: n
|
|
8853
8853
|
} = t;
|
|
8854
|
-
n && oe.isCollapsed(n) &&
|
|
8854
|
+
n && oe.isCollapsed(n) && de.delete(t, {
|
|
8855
8855
|
unit: e,
|
|
8856
8856
|
reverse: !0
|
|
8857
8857
|
});
|
|
@@ -8859,7 +8859,7 @@ var B2 = function(e, n) {
|
|
|
8859
8859
|
var {
|
|
8860
8860
|
selection: n
|
|
8861
8861
|
} = t;
|
|
8862
|
-
n && oe.isCollapsed(n) &&
|
|
8862
|
+
n && oe.isCollapsed(n) && de.delete(t, {
|
|
8863
8863
|
unit: e
|
|
8864
8864
|
});
|
|
8865
8865
|
}, R2 = function(e) {
|
|
@@ -8868,7 +8868,7 @@ var B2 = function(e, n) {
|
|
|
8868
8868
|
} = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, {
|
|
8869
8869
|
selection: r
|
|
8870
8870
|
} = e;
|
|
8871
|
-
r && oe.isExpanded(r) &&
|
|
8871
|
+
r && oe.isExpanded(r) && de.delete(e, {
|
|
8872
8872
|
reverse: n === "backward"
|
|
8873
8873
|
});
|
|
8874
8874
|
}, M2 = (t, e) => [I.start(t, e), I.end(t, e)];
|
|
@@ -8936,13 +8936,13 @@ var z2 = function(e) {
|
|
|
8936
8936
|
match: (r) => Be.isElement(r) && I.isVoid(e, r)
|
|
8937
8937
|
}));
|
|
8938
8938
|
}, j2 = (t, e) => e.children.some((n) => Be.isElement(n) && I.isBlock(t, n)), V2 = (t, e) => e.children.some((n) => Te.isText(n) || I.isInline(t, n)), W2 = (t, e) => be.has(t, e), U2 = (t, e) => e.children.every((n) => Te.isText(n)), q2 = (t) => {
|
|
8939
|
-
|
|
8939
|
+
de.splitNodes(t, {
|
|
8940
8940
|
always: !0
|
|
8941
8941
|
});
|
|
8942
8942
|
}, G2 = (t, e, n) => {
|
|
8943
|
-
|
|
8943
|
+
de.insertNodes(t, e, n);
|
|
8944
8944
|
}, K2 = (t) => {
|
|
8945
|
-
|
|
8945
|
+
de.splitNodes(t, {
|
|
8946
8946
|
always: !0
|
|
8947
8947
|
});
|
|
8948
8948
|
};
|
|
@@ -8977,12 +8977,12 @@ var Y2 = function(e, n) {
|
|
|
8977
8977
|
var s = X2({
|
|
8978
8978
|
text: n
|
|
8979
8979
|
}, i);
|
|
8980
|
-
|
|
8980
|
+
de.insertNodes(e, s, {
|
|
8981
8981
|
at: r.at,
|
|
8982
8982
|
voids: r.voids
|
|
8983
8983
|
});
|
|
8984
8984
|
} else
|
|
8985
|
-
|
|
8985
|
+
de.insertText(e, n, r);
|
|
8986
8986
|
e.marks = null;
|
|
8987
8987
|
}
|
|
8988
8988
|
}, J2 = (t, e) => !t.isInline(e), Q2 = (t, e, n) => I.isStart(t, e, n) || I.isEnd(t, e, n), Z2 = (t, e) => {
|
|
@@ -9462,14 +9462,14 @@ var DM = (t, e) => {
|
|
|
9462
9462
|
}
|
|
9463
9463
|
}
|
|
9464
9464
|
if (o || i)
|
|
9465
|
-
|
|
9465
|
+
de.unsetNodes(t, e, {
|
|
9466
9466
|
match: r,
|
|
9467
9467
|
split: !0,
|
|
9468
9468
|
voids: !0
|
|
9469
9469
|
});
|
|
9470
9470
|
else {
|
|
9471
9471
|
var c = SM({}, I.marks(t) || {});
|
|
9472
|
-
delete c[e], t.marks = c,
|
|
9472
|
+
delete c[e], t.marks = c, Ba.get(t) || t.onChange();
|
|
9473
9473
|
}
|
|
9474
9474
|
}
|
|
9475
9475
|
}, AM = (t, e) => {
|
|
@@ -9571,7 +9571,7 @@ var DM = (t, e) => {
|
|
|
9571
9571
|
}
|
|
9572
9572
|
}
|
|
9573
9573
|
if (W.isPath(c)) {
|
|
9574
|
-
|
|
9574
|
+
de.removeNodes(e, {
|
|
9575
9575
|
at: c,
|
|
9576
9576
|
voids: l
|
|
9577
9577
|
});
|
|
@@ -9638,27 +9638,27 @@ var DM = (t, e) => {
|
|
|
9638
9638
|
text: K
|
|
9639
9639
|
}), G = K);
|
|
9640
9640
|
}
|
|
9641
|
-
if (P.reverse().map((ie) => ie.unref()).filter((ie) => ie !== null).forEach((ie) =>
|
|
9641
|
+
if (P.reverse().map((ie) => ie.unref()).filter((ie) => ie !== null).forEach((ie) => de.removeNodes(e, {
|
|
9642
9642
|
at: ie,
|
|
9643
9643
|
voids: l
|
|
9644
9644
|
})), !O) {
|
|
9645
9645
|
var ee = z.current, [ne] = I.leaf(e, ee), {
|
|
9646
|
-
path:
|
|
9646
|
+
path: ue
|
|
9647
9647
|
} = ee, R = S ? g.offset : 0, U = ne.text.slice(R, C.offset);
|
|
9648
9648
|
U.length > 0 && (e.apply({
|
|
9649
9649
|
type: "remove_text",
|
|
9650
|
-
path:
|
|
9650
|
+
path: ue,
|
|
9651
9651
|
offset: R,
|
|
9652
9652
|
text: U
|
|
9653
9653
|
}), G = U);
|
|
9654
9654
|
}
|
|
9655
|
-
!S && k && z.current && j.current &&
|
|
9655
|
+
!S && k && z.current && j.current && de.mergeNodes(e, {
|
|
9656
9656
|
at: z.current,
|
|
9657
9657
|
hanging: !0,
|
|
9658
9658
|
voids: l
|
|
9659
|
-
}), d && i && s === "character" && G.length > 1 && G.match(/[\u0980-\u09FF\u0E00-\u0E7F\u1000-\u109F\u0900-\u097F\u1780-\u17FF\u0D00-\u0D7F\u0B00-\u0B7F\u0A00-\u0A7F\u0B80-\u0BFF\u0C00-\u0C7F]+/) &&
|
|
9659
|
+
}), d && i && s === "character" && G.length > 1 && G.match(/[\u0980-\u09FF\u0E00-\u0E7F\u1000-\u109F\u0900-\u097F\u1780-\u17FF\u0D00-\u0D7F\u0B00-\u0B7F\u0A00-\u0A7F\u0B80-\u0BFF\u0C00-\u0C7F]+/) && de.insertText(e, G.slice(0, G.length - a));
|
|
9660
9660
|
var Y = j.unref(), X = z.unref(), se = i ? Y || X : X || Y;
|
|
9661
|
-
n.at == null && se &&
|
|
9661
|
+
n.at == null && se && de.select(e, se);
|
|
9662
9662
|
}
|
|
9663
9663
|
}
|
|
9664
9664
|
});
|
|
@@ -9685,7 +9685,7 @@ var DM = (t, e) => {
|
|
|
9685
9685
|
}))
|
|
9686
9686
|
return;
|
|
9687
9687
|
var c = I.pointRef(e, l);
|
|
9688
|
-
|
|
9688
|
+
de.delete(e, {
|
|
9689
9689
|
at: s
|
|
9690
9690
|
}), s = c.unref();
|
|
9691
9691
|
}
|
|
@@ -9735,7 +9735,7 @@ var DM = (t, e) => {
|
|
|
9735
9735
|
mode: "highest",
|
|
9736
9736
|
voids: i
|
|
9737
9737
|
}), [, B] = T, A = I.isStart(e, s, B), F = I.isEnd(e, s, B), P = I.pathRef(e, y && !O.length ? W.next(w) : w), j = I.pathRef(e, F ? W.next(B) : B), z = O.length > 0;
|
|
9738
|
-
|
|
9738
|
+
de.splitNodes(e, {
|
|
9739
9739
|
at: s,
|
|
9740
9740
|
match: (L) => z ? Be.isElement(L) && I.isBlock(e, L) : Te.isText(L) || I.isInline(e, L),
|
|
9741
9741
|
mode: z ? "lowest" : "highest",
|
|
@@ -9743,22 +9743,22 @@ var DM = (t, e) => {
|
|
|
9743
9743
|
voids: i
|
|
9744
9744
|
});
|
|
9745
9745
|
var G = I.pathRef(e, !A || A && F ? W.next(B) : B);
|
|
9746
|
-
if (
|
|
9746
|
+
if (de.insertNodes(e, S, {
|
|
9747
9747
|
at: G.current,
|
|
9748
9748
|
match: (L) => Te.isText(L) || I.isInline(e, L),
|
|
9749
9749
|
mode: "highest",
|
|
9750
9750
|
voids: i,
|
|
9751
9751
|
batchDirty: a
|
|
9752
|
-
}), g && !S.length && x.length && !O.length &&
|
|
9752
|
+
}), g && !S.length && x.length && !O.length && de.delete(e, {
|
|
9753
9753
|
at: w,
|
|
9754
9754
|
voids: i
|
|
9755
|
-
}),
|
|
9755
|
+
}), de.insertNodes(e, x, {
|
|
9756
9756
|
at: P.current,
|
|
9757
9757
|
match: (L) => Be.isElement(L) && I.isBlock(e, L),
|
|
9758
9758
|
mode: "lowest",
|
|
9759
9759
|
voids: i,
|
|
9760
9760
|
batchDirty: a
|
|
9761
|
-
}),
|
|
9761
|
+
}), de.insertNodes(e, O, {
|
|
9762
9762
|
at: j.current,
|
|
9763
9763
|
match: (L) => Te.isText(L) || I.isInline(e, L),
|
|
9764
9764
|
mode: "highest",
|
|
@@ -9768,7 +9768,7 @@ var DM = (t, e) => {
|
|
|
9768
9768
|
var q;
|
|
9769
9769
|
if (O.length > 0 && j.current ? q = W.previous(j.current) : x.length > 0 && P.current ? q = W.previous(P.current) : G.current && (q = W.previous(G.current)), q) {
|
|
9770
9770
|
var te = I.end(e, q);
|
|
9771
|
-
|
|
9771
|
+
de.select(e, te);
|
|
9772
9772
|
}
|
|
9773
9773
|
}
|
|
9774
9774
|
G.unref(), P.unref(), j.unref();
|
|
@@ -9783,15 +9783,15 @@ var DM = (t, e) => {
|
|
|
9783
9783
|
} = e;
|
|
9784
9784
|
if (o) {
|
|
9785
9785
|
if (r === "anchor")
|
|
9786
|
-
|
|
9786
|
+
de.select(e, o.anchor);
|
|
9787
9787
|
else if (r === "focus")
|
|
9788
|
-
|
|
9788
|
+
de.select(e, o.focus);
|
|
9789
9789
|
else if (r === "start") {
|
|
9790
9790
|
var [i] = oe.edges(o);
|
|
9791
|
-
|
|
9791
|
+
de.select(e, i);
|
|
9792
9792
|
} else if (r === "end") {
|
|
9793
9793
|
var [, s] = oe.edges(o);
|
|
9794
|
-
|
|
9794
|
+
de.select(e, s);
|
|
9795
9795
|
}
|
|
9796
9796
|
} else return;
|
|
9797
9797
|
}, MM = (t) => {
|
|
@@ -9830,14 +9830,14 @@ var DM = (t, e) => {
|
|
|
9830
9830
|
var h = s ? I.before(e, c, u) : I.after(e, c, u);
|
|
9831
9831
|
h && (d.focus = h);
|
|
9832
9832
|
}
|
|
9833
|
-
|
|
9833
|
+
de.setSelection(e, d);
|
|
9834
9834
|
}
|
|
9835
9835
|
}, LM = (t, e) => {
|
|
9836
9836
|
var {
|
|
9837
9837
|
selection: n
|
|
9838
9838
|
} = t;
|
|
9839
9839
|
if (e = I.range(t, e), n) {
|
|
9840
|
-
|
|
9840
|
+
de.setSelection(t, e);
|
|
9841
9841
|
return;
|
|
9842
9842
|
}
|
|
9843
9843
|
if (!oe.isRange(e))
|
|
@@ -9881,7 +9881,7 @@ var $M = function(e, n) {
|
|
|
9881
9881
|
anchor: s,
|
|
9882
9882
|
focus: a
|
|
9883
9883
|
} = o, l = i === "anchor" ? s : a;
|
|
9884
|
-
|
|
9884
|
+
de.setSelection(e, {
|
|
9885
9885
|
[i === "anchor" ? "anchor" : "focus"]: Zv(Zv({}, l), n)
|
|
9886
9886
|
});
|
|
9887
9887
|
}
|
|
@@ -9920,7 +9920,7 @@ var $M = function(e, n) {
|
|
|
9920
9920
|
l = l.anchor;
|
|
9921
9921
|
else {
|
|
9922
9922
|
var [, f] = oe.edges(l), h = I.pointRef(e, f);
|
|
9923
|
-
|
|
9923
|
+
de.delete(e, {
|
|
9924
9924
|
at: l
|
|
9925
9925
|
}), l = h.unref();
|
|
9926
9926
|
}
|
|
@@ -9934,7 +9934,7 @@ var $M = function(e, n) {
|
|
|
9934
9934
|
});
|
|
9935
9935
|
if (m) {
|
|
9936
9936
|
var [, w] = m, v = I.pathRef(e, w), y = I.isEnd(e, l, w);
|
|
9937
|
-
|
|
9937
|
+
de.splitNodes(e, {
|
|
9938
9938
|
at: l,
|
|
9939
9939
|
match: c,
|
|
9940
9940
|
mode: s,
|
|
@@ -9987,7 +9987,7 @@ var $M = function(e, n) {
|
|
|
9987
9987
|
}
|
|
9988
9988
|
if (l = W.previous(l), u) {
|
|
9989
9989
|
var O = I.end(e, l);
|
|
9990
|
-
O &&
|
|
9990
|
+
O && de.select(e, O);
|
|
9991
9991
|
}
|
|
9992
9992
|
}
|
|
9993
9993
|
}
|
|
@@ -10002,7 +10002,7 @@ var $M = function(e, n) {
|
|
|
10002
10002
|
} = n, {
|
|
10003
10003
|
match: s
|
|
10004
10004
|
} = n;
|
|
10005
|
-
if (s == null && (s = W.isPath(r) ?
|
|
10005
|
+
if (s == null && (s = W.isPath(r) ? ia(e, r) : (E) => Be.isElement(E) && I.isBlock(e, E)), !!r) {
|
|
10006
10006
|
var a = I.nodes(e, {
|
|
10007
10007
|
at: r,
|
|
10008
10008
|
match: s,
|
|
@@ -10021,33 +10021,33 @@ var $M = function(e, n) {
|
|
|
10021
10021
|
} = f.children;
|
|
10022
10022
|
if (w === 1) {
|
|
10023
10023
|
var v = W.next(h);
|
|
10024
|
-
|
|
10024
|
+
de.moveNodes(e, {
|
|
10025
10025
|
at: u,
|
|
10026
10026
|
to: v,
|
|
10027
10027
|
voids: i
|
|
10028
|
-
}),
|
|
10028
|
+
}), de.removeNodes(e, {
|
|
10029
10029
|
at: h,
|
|
10030
10030
|
voids: i
|
|
10031
10031
|
});
|
|
10032
10032
|
} else if (m === 0)
|
|
10033
|
-
|
|
10033
|
+
de.moveNodes(e, {
|
|
10034
10034
|
at: u,
|
|
10035
10035
|
to: h,
|
|
10036
10036
|
voids: i
|
|
10037
10037
|
});
|
|
10038
10038
|
else if (m === w - 1) {
|
|
10039
10039
|
var y = W.next(h);
|
|
10040
|
-
|
|
10040
|
+
de.moveNodes(e, {
|
|
10041
10041
|
at: u,
|
|
10042
10042
|
to: y,
|
|
10043
10043
|
voids: i
|
|
10044
10044
|
});
|
|
10045
10045
|
} else {
|
|
10046
10046
|
var g = W.next(u), C = W.next(h);
|
|
10047
|
-
|
|
10047
|
+
de.splitNodes(e, {
|
|
10048
10048
|
at: g,
|
|
10049
10049
|
voids: i
|
|
10050
|
-
}),
|
|
10050
|
+
}), de.moveNodes(e, {
|
|
10051
10051
|
at: u,
|
|
10052
10052
|
to: C,
|
|
10053
10053
|
voids: i
|
|
@@ -10086,9 +10086,9 @@ var $M = function(e, n) {
|
|
|
10086
10086
|
o = o.anchor;
|
|
10087
10087
|
else {
|
|
10088
10088
|
var [, c] = oe.edges(o), u = I.pointRef(e, c);
|
|
10089
|
-
|
|
10089
|
+
de.delete(e, {
|
|
10090
10090
|
at: o
|
|
10091
|
-
}), o = u.unref(), n.at == null &&
|
|
10091
|
+
}), o = u.unref(), n.at == null && de.select(e, o);
|
|
10092
10092
|
}
|
|
10093
10093
|
var [d] = I.nodes(e, {
|
|
10094
10094
|
at: o,
|
|
@@ -10122,14 +10122,14 @@ var $M = function(e, n) {
|
|
|
10122
10122
|
x = w.children.length, S = O;
|
|
10123
10123
|
} else
|
|
10124
10124
|
throw new Error("Cannot merge the node at path [".concat(m, "] with the previous sibling because it is not the same kind: ").concat(Jt.stringify(h), " ").concat(Jt.stringify(w)));
|
|
10125
|
-
C ||
|
|
10125
|
+
C || de.moveNodes(e, {
|
|
10126
10126
|
at: m,
|
|
10127
10127
|
to: y,
|
|
10128
10128
|
voids: s
|
|
10129
|
-
}), k &&
|
|
10129
|
+
}), k && de.removeNodes(e, {
|
|
10130
10130
|
at: k.current,
|
|
10131
10131
|
voids: s
|
|
10132
|
-
}), I.shouldMergeNodesRemovePrevNode(e, f, d) ?
|
|
10132
|
+
}), I.shouldMergeNodesRemovePrevNode(e, f, d) ? de.removeNodes(e, {
|
|
10133
10133
|
at: v,
|
|
10134
10134
|
voids: s
|
|
10135
10135
|
}) : e.apply({
|
|
@@ -10153,7 +10153,7 @@ var $M = function(e, n) {
|
|
|
10153
10153
|
match: s
|
|
10154
10154
|
} = e;
|
|
10155
10155
|
if (r) {
|
|
10156
|
-
s == null && (s = W.isPath(r) ?
|
|
10156
|
+
s == null && (s = W.isPath(r) ? ia(t, r) : (h) => Be.isElement(h) && I.isBlock(t, h));
|
|
10157
10157
|
var a = I.pathRef(t, n), l = I.nodes(t, {
|
|
10158
10158
|
at: r,
|
|
10159
10159
|
match: s,
|
|
@@ -10186,7 +10186,7 @@ var $M = function(e, n) {
|
|
|
10186
10186
|
match: a
|
|
10187
10187
|
} = n;
|
|
10188
10188
|
if (s) {
|
|
10189
|
-
a == null && (a = W.isPath(s) ?
|
|
10189
|
+
a == null && (a = W.isPath(s) ? ia(e, s) : (h) => Be.isElement(h) && I.isBlock(e, h)), !r && oe.isRange(s) && (s = I.unhangRange(e, s, {
|
|
10190
10190
|
voids: o
|
|
10191
10191
|
}));
|
|
10192
10192
|
var l = I.nodes(e, {
|
|
@@ -10226,7 +10226,7 @@ var $M = function(e, n) {
|
|
|
10226
10226
|
voids: d = !1
|
|
10227
10227
|
} = r;
|
|
10228
10228
|
if (i) {
|
|
10229
|
-
if (o == null && (o = W.isPath(i) ?
|
|
10229
|
+
if (o == null && (o = W.isPath(i) ? ia(e, i) : (x) => Be.isElement(x) && I.isBlock(e, x)), !l && oe.isRange(i) && (i = I.unhangRange(e, i, {
|
|
10230
10230
|
voids: d
|
|
10231
10231
|
})), u && oe.isRange(i)) {
|
|
10232
10232
|
if (oe.isCollapsed(i) && I.leaf(e, i.anchor)[0].text.length > 0)
|
|
@@ -10234,7 +10234,7 @@ var $M = function(e, n) {
|
|
|
10234
10234
|
var f = I.rangeRef(e, i, {
|
|
10235
10235
|
affinity: "inward"
|
|
10236
10236
|
}), [h, m] = oe.edges(i), w = c === "lowest" ? "lowest" : "highest", v = I.isEnd(e, m, m.path);
|
|
10237
|
-
|
|
10237
|
+
de.splitNodes(e, {
|
|
10238
10238
|
at: m,
|
|
10239
10239
|
match: o,
|
|
10240
10240
|
mode: w,
|
|
@@ -10242,13 +10242,13 @@ var $M = function(e, n) {
|
|
|
10242
10242
|
always: !v
|
|
10243
10243
|
});
|
|
10244
10244
|
var y = I.isStart(e, h, h.path);
|
|
10245
|
-
|
|
10245
|
+
de.splitNodes(e, {
|
|
10246
10246
|
at: h,
|
|
10247
10247
|
match: o,
|
|
10248
10248
|
mode: w,
|
|
10249
10249
|
voids: d,
|
|
10250
10250
|
always: !y
|
|
10251
|
-
}), i = f.unref(), r.at == null &&
|
|
10251
|
+
}), i = f.unref(), r.at == null && de.select(e, i);
|
|
10252
10252
|
}
|
|
10253
10253
|
s || (s = (x, O) => x !== O);
|
|
10254
10254
|
for (var [g, C] of I.nodes(e, {
|
|
@@ -10276,7 +10276,7 @@ var $M = function(e, n) {
|
|
|
10276
10276
|
if (oe.isCollapsed(e))
|
|
10277
10277
|
return e.anchor;
|
|
10278
10278
|
var [, n] = oe.edges(e), r = I.pointRef(t, n);
|
|
10279
|
-
return
|
|
10279
|
+
return de.delete(t, {
|
|
10280
10280
|
at: e
|
|
10281
10281
|
}), r.unref();
|
|
10282
10282
|
}, YM = function(e) {
|
|
@@ -10320,7 +10320,7 @@ var $M = function(e, n) {
|
|
|
10320
10320
|
var E = {
|
|
10321
10321
|
text: ""
|
|
10322
10322
|
}, b = W.next(g);
|
|
10323
|
-
|
|
10323
|
+
de.insertNodes(e, E, {
|
|
10324
10324
|
at: b,
|
|
10325
10325
|
voids: o
|
|
10326
10326
|
}), C = I.point(e, b);
|
|
@@ -10355,7 +10355,7 @@ var $M = function(e, n) {
|
|
|
10355
10355
|
}
|
|
10356
10356
|
if (n.at == null) {
|
|
10357
10357
|
var P = h.current || I.end(e, []);
|
|
10358
|
-
|
|
10358
|
+
de.select(e, P);
|
|
10359
10359
|
}
|
|
10360
10360
|
} finally {
|
|
10361
10361
|
var j;
|
|
@@ -10369,7 +10369,7 @@ var $M = function(e, n) {
|
|
|
10369
10369
|
var o = {};
|
|
10370
10370
|
for (var i of n)
|
|
10371
10371
|
o[i] = null;
|
|
10372
|
-
|
|
10372
|
+
de.setNodes(e, o, r);
|
|
10373
10373
|
}, QM = function(e) {
|
|
10374
10374
|
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
10375
10375
|
I.withoutNormalizing(e, () => {
|
|
@@ -10382,7 +10382,7 @@ var $M = function(e, n) {
|
|
|
10382
10382
|
match: a
|
|
10383
10383
|
} = n;
|
|
10384
10384
|
if (s) {
|
|
10385
|
-
a == null && (a = W.isPath(s) ?
|
|
10385
|
+
a == null && (a = W.isPath(s) ? ia(e, s) : (h) => Be.isElement(h) && I.isBlock(e, h)), W.isPath(s) && (s = I.range(e, s));
|
|
10386
10386
|
var l = oe.isRange(s) ? I.rangeRef(e, s) : null, c = I.nodes(e, {
|
|
10387
10387
|
at: s,
|
|
10388
10388
|
match: a,
|
|
@@ -10399,7 +10399,7 @@ var $M = function(e, n) {
|
|
|
10399
10399
|
// that wrap target node. So we reverse the order.
|
|
10400
10400
|
).reverse(), d = function() {
|
|
10401
10401
|
var m = f.unref(), [w] = I.node(e, m), v = I.range(e, m);
|
|
10402
|
-
o && l && (v = oe.intersection(l.current, v)),
|
|
10402
|
+
o && l && (v = oe.intersection(l.current, v)), de.liftNodes(e, {
|
|
10403
10403
|
at: v,
|
|
10404
10404
|
match: (y) => Be.isAncestor(w) && w.children.includes(y),
|
|
10405
10405
|
voids: i
|
|
@@ -10444,7 +10444,7 @@ var ZM = function(e, n) {
|
|
|
10444
10444
|
at: l = e.selection
|
|
10445
10445
|
} = r;
|
|
10446
10446
|
if (l) {
|
|
10447
|
-
if (a == null && (W.isPath(l) ? a =
|
|
10447
|
+
if (a == null && (W.isPath(l) ? a = ia(e, l) : e.isInline(n) ? a = (y) => Be.isElement(y) && I.isInline(e, y) || Te.isText(y) : a = (y) => Be.isElement(y) && I.isBlock(e, y)), i && oe.isRange(l)) {
|
|
10448
10448
|
var [c, u] = oe.edges(l), d = I.rangeRef(e, l, {
|
|
10449
10449
|
affinity: "inward"
|
|
10450
10450
|
}), f = (y) => {
|
|
@@ -10454,17 +10454,17 @@ var ZM = function(e, n) {
|
|
|
10454
10454
|
});
|
|
10455
10455
|
return g && I.isEdge(e, y, g[1]);
|
|
10456
10456
|
};
|
|
10457
|
-
|
|
10457
|
+
de.splitNodes(e, {
|
|
10458
10458
|
at: u,
|
|
10459
10459
|
match: a,
|
|
10460
10460
|
voids: s,
|
|
10461
10461
|
always: !f(u)
|
|
10462
|
-
}),
|
|
10462
|
+
}), de.splitNodes(e, {
|
|
10463
10463
|
at: c,
|
|
10464
10464
|
match: a,
|
|
10465
10465
|
voids: s,
|
|
10466
10466
|
always: !f(c)
|
|
10467
|
-
}), l = d.unref(), r.at == null &&
|
|
10467
|
+
}), l = d.unref(), r.at == null && de.select(e, l);
|
|
10468
10468
|
}
|
|
10469
10469
|
var h = Array.from(I.nodes(e, {
|
|
10470
10470
|
at: l,
|
|
@@ -10488,10 +10488,10 @@ var ZM = function(e, n) {
|
|
|
10488
10488
|
var x = W.equals(k, S) ? W.parent(k) : W.common(k, S), O = I.range(e, k, S), D = I.node(e, x), [N] = D, _ = x.length + 1, T = W.next(S.slice(0, _)), B = ty(ty({}, n), {}, {
|
|
10489
10489
|
children: []
|
|
10490
10490
|
});
|
|
10491
|
-
|
|
10491
|
+
de.insertNodes(e, B, {
|
|
10492
10492
|
at: T,
|
|
10493
10493
|
voids: s
|
|
10494
|
-
}),
|
|
10494
|
+
}), de.moveNodes(e, {
|
|
10495
10495
|
at: O,
|
|
10496
10496
|
match: (A) => Be.isAncestor(N) && N.children.includes(A),
|
|
10497
10497
|
to: T.concat(0),
|
|
@@ -11020,7 +11020,7 @@ var tP = {
|
|
|
11020
11020
|
} = r;
|
|
11021
11021
|
if (o.length > 0) {
|
|
11022
11022
|
var i = o[o.length - 1];
|
|
11023
|
-
i.selectionBefore &&
|
|
11023
|
+
i.selectionBefore && de.setSelection(e, i.selectionBefore), Yr.withoutSaving(e, () => {
|
|
11024
11024
|
I.withoutNormalizing(e, () => {
|
|
11025
11025
|
for (var s of i.operations)
|
|
11026
11026
|
e.apply(s);
|
|
@@ -11040,7 +11040,7 @@ var tP = {
|
|
|
11040
11040
|
var s = i.operations.map(Go.inverse).reverse();
|
|
11041
11041
|
for (var a of s)
|
|
11042
11042
|
e.apply(a);
|
|
11043
|
-
i.selectionBefore &&
|
|
11043
|
+
i.selectionBefore && de.setSelection(e, i.selectionBefore);
|
|
11044
11044
|
});
|
|
11045
11045
|
}), e.writeHistory("redos", i), r.undos.pop();
|
|
11046
11046
|
}
|
|
@@ -11080,7 +11080,7 @@ function iP() {
|
|
|
11080
11080
|
return Kf;
|
|
11081
11081
|
}
|
|
11082
11082
|
var sP = iP();
|
|
11083
|
-
const YE = /* @__PURE__ */
|
|
11083
|
+
const YE = /* @__PURE__ */ oa(sP);
|
|
11084
11084
|
var Xf, oy;
|
|
11085
11085
|
function yw() {
|
|
11086
11086
|
if (oy) return Xf;
|
|
@@ -11276,7 +11276,7 @@ function ZE() {
|
|
|
11276
11276
|
return lh = s, lh;
|
|
11277
11277
|
}
|
|
11278
11278
|
var wP = ZE();
|
|
11279
|
-
const vP = /* @__PURE__ */
|
|
11279
|
+
const vP = /* @__PURE__ */ oa(wP);
|
|
11280
11280
|
var ch, vy;
|
|
11281
11281
|
function yP() {
|
|
11282
11282
|
if (vy) return ch;
|
|
@@ -11295,7 +11295,7 @@ function yP() {
|
|
|
11295
11295
|
return ch = r, ch;
|
|
11296
11296
|
}
|
|
11297
11297
|
var bP = yP();
|
|
11298
|
-
const CP = /* @__PURE__ */
|
|
11298
|
+
const CP = /* @__PURE__ */ oa(bP), yy = (t) => typeof t == "object" && t != null && t.nodeType === 1, by = (t, e) => (!e || t !== "hidden") && t !== "visible" && t !== "clip", hc = (t, e) => {
|
|
11299
11299
|
if (t.clientHeight < t.scrollHeight || t.clientWidth < t.scrollWidth) {
|
|
11300
11300
|
const n = getComputedStyle(t, null);
|
|
11301
11301
|
return by(n.overflowY, e) || by(n.overflowX, e) || ((r) => {
|
|
@@ -11337,12 +11337,12 @@ const CP = /* @__PURE__ */ ra(bP), yy = (t) => typeof t == "object" && t != null
|
|
|
11337
11337
|
for (let F = 0; F < h.length; F++) {
|
|
11338
11338
|
const P = h[F], { height: j, width: z, top: G, right: q, bottom: te, left: L } = P.getBoundingClientRect();
|
|
11339
11339
|
if (s === "if-needed" && b >= 0 && x >= 0 && S <= v && k <= w && (P === f && !hc(P) || b >= G && S <= te && x >= L && k <= q)) return A;
|
|
11340
|
-
const H = getComputedStyle(P), K = parseInt(H.borderLeftWidth, 10), ee = parseInt(H.borderTopWidth, 10), ne = parseInt(H.borderRightWidth, 10),
|
|
11340
|
+
const H = getComputedStyle(P), K = parseInt(H.borderLeftWidth, 10), ee = parseInt(H.borderTopWidth, 10), ne = parseInt(H.borderRightWidth, 10), ue = parseInt(H.borderBottomWidth, 10);
|
|
11341
11341
|
let R = 0, U = 0;
|
|
11342
|
-
const Y = "offsetWidth" in P ? P.offsetWidth - P.clientWidth - K - ne : 0, X = "offsetHeight" in P ? P.offsetHeight - P.clientHeight - ee -
|
|
11343
|
-
if (f === P) R = a === "start" ? T : a === "end" ? T - v : a === "nearest" ? pc(g, g + v, v, ee,
|
|
11342
|
+
const Y = "offsetWidth" in P ? P.offsetWidth - P.clientWidth - K - ne : 0, X = "offsetHeight" in P ? P.offsetHeight - P.clientHeight - ee - ue : 0, se = "offsetWidth" in P ? P.offsetWidth === 0 ? 0 : z / P.offsetWidth : 0, ie = "offsetHeight" in P ? P.offsetHeight === 0 ? 0 : j / P.offsetHeight : 0;
|
|
11343
|
+
if (f === P) R = a === "start" ? T : a === "end" ? T - v : a === "nearest" ? pc(g, g + v, v, ee, ue, g + T, g + T + C, C) : T - v / 2, U = l === "start" ? B : l === "center" ? B - w / 2 : l === "end" ? B - w : pc(y, y + w, w, K, ne, y + B, y + B + E, E), R = Math.max(0, R + g), U = Math.max(0, U + y);
|
|
11344
11344
|
else {
|
|
11345
|
-
R = a === "start" ? T - G - ee : a === "end" ? T - te +
|
|
11345
|
+
R = a === "start" ? T - G - ee : a === "end" ? T - te + ue + X : a === "nearest" ? pc(G, te, j, ee, ue + X, T, T + C, C) : T - (G + j / 2) + X / 2, U = l === "start" ? B - L - K : l === "center" ? B - (L + z / 2) + Y / 2 : l === "end" ? B - q + ne + Y : pc(L, q, z, K, ne + Y, B, B + E, E);
|
|
11346
11346
|
const { scrollLeft: we, scrollTop: Ee } = P;
|
|
11347
11347
|
R = ie === 0 ? 0 : Math.max(0, Math.min(Ee + R / ie, P.scrollHeight - j / ie + X)), U = se === 0 ? 0 : Math.max(0, Math.min(we + U / se, P.scrollWidth - z / se + Y)), T += Ee - R, B += we - U;
|
|
11348
11348
|
}
|
|
@@ -11560,7 +11560,7 @@ var uh = SP(), eS = globalThis.Node, DP = globalThis.Text, bw = (t) => t && t.ow
|
|
|
11560
11560
|
}, BP = /data-slate-fragment="(.+?)"/m, IP = (t) => {
|
|
11561
11561
|
var e = t.getData("text/html"), [, n] = e.match(BP) || [];
|
|
11562
11562
|
return n;
|
|
11563
|
-
},
|
|
11563
|
+
}, Ia = (t) => t.getSelection != null ? t.getSelection() : document.getSelection(), Cw = (t, e, n) => {
|
|
11564
11564
|
var {
|
|
11565
11565
|
target: r
|
|
11566
11566
|
} = e;
|
|
@@ -11626,27 +11626,27 @@ typeof navigator < "u" && /Safari/.test(navigator.userAgent) && /Version\/(\d+)/
|
|
|
11626
11626
|
var $o = (!oS || !LP) && !PP && // globalThis is undefined in older browsers
|
|
11627
11627
|
typeof globalThis < "u" && globalThis.InputEvent && // @ts-ignore The `getTargetRanges` property isn't recognized.
|
|
11628
11628
|
typeof globalThis.InputEvent.prototype.getTargetRanges == "function";
|
|
11629
|
-
function
|
|
11629
|
+
function rl(t) {
|
|
11630
11630
|
"@babel/helpers - typeof";
|
|
11631
|
-
return
|
|
11631
|
+
return rl = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
11632
11632
|
return typeof e;
|
|
11633
11633
|
} : function(e) {
|
|
11634
11634
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
11635
|
-
},
|
|
11635
|
+
}, rl(t);
|
|
11636
11636
|
}
|
|
11637
11637
|
function jP(t, e) {
|
|
11638
|
-
if (
|
|
11638
|
+
if (rl(t) !== "object" || t === null) return t;
|
|
11639
11639
|
var n = t[Symbol.toPrimitive];
|
|
11640
11640
|
if (n !== void 0) {
|
|
11641
11641
|
var r = n.call(t, e);
|
|
11642
|
-
if (
|
|
11642
|
+
if (rl(r) !== "object") return r;
|
|
11643
11643
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
11644
11644
|
}
|
|
11645
11645
|
return (e === "string" ? String : Number)(t);
|
|
11646
11646
|
}
|
|
11647
11647
|
function VP(t) {
|
|
11648
11648
|
var e = jP(t, "string");
|
|
11649
|
-
return
|
|
11649
|
+
return rl(e) === "symbol" ? e : String(e);
|
|
11650
11650
|
}
|
|
11651
11651
|
function kw(t, e, n) {
|
|
11652
11652
|
return e = VP(e), e in t ? Object.defineProperty(t, e, {
|
|
@@ -11662,7 +11662,7 @@ class iS {
|
|
|
11662
11662
|
kw(this, "id", void 0), this.id = "".concat(WP++);
|
|
11663
11663
|
}
|
|
11664
11664
|
}
|
|
11665
|
-
var As = /* @__PURE__ */ new WeakMap(), gs = /* @__PURE__ */ new WeakMap(),
|
|
11665
|
+
var As = /* @__PURE__ */ new WeakMap(), gs = /* @__PURE__ */ new WeakMap(), Fa = /* @__PURE__ */ new WeakMap(), sS = /* @__PURE__ */ new WeakMap(), Ra = /* @__PURE__ */ new WeakMap(), Mm = /* @__PURE__ */ new WeakMap(), ol = /* @__PURE__ */ new WeakMap(), Ri = /* @__PURE__ */ new WeakMap(), Wu = /* @__PURE__ */ new WeakMap(), nf = /* @__PURE__ */ new WeakMap(), Pm = /* @__PURE__ */ new WeakMap(), Ko = /* @__PURE__ */ new WeakMap(), Di = /* @__PURE__ */ new WeakMap(), Ma = /* @__PURE__ */ new WeakMap(), Lm = /* @__PURE__ */ new WeakMap(), Ew = /* @__PURE__ */ new WeakMap(), Dr = /* @__PURE__ */ new WeakMap(), So = /* @__PURE__ */ new WeakMap(), Rn = /* @__PURE__ */ new WeakMap(), jo = /* @__PURE__ */ new WeakMap(), bo = /* @__PURE__ */ new WeakMap(), aS = /* @__PURE__ */ new WeakMap(), Vs = Symbol("placeholder"), lS = Symbol("mark-placeholder"), Ue = {
|
|
11666
11666
|
androidPendingDiffs: (t) => Rn.get(t),
|
|
11667
11667
|
androidScheduleFlush: (t) => {
|
|
11668
11668
|
var e;
|
|
@@ -11675,8 +11675,8 @@ var As = /* @__PURE__ */ new WeakMap(), gs = /* @__PURE__ */ new WeakMap(), Ia =
|
|
|
11675
11675
|
deselect: (t) => {
|
|
11676
11676
|
var {
|
|
11677
11677
|
selection: e
|
|
11678
|
-
} = t, n = Ue.findDocumentOrShadowRoot(t), r =
|
|
11679
|
-
r && r.rangeCount > 0 && r.removeAllRanges(), e &&
|
|
11678
|
+
} = t, n = Ue.findDocumentOrShadowRoot(t), r = Ia(n);
|
|
11679
|
+
r && r.rangeCount > 0 && r.removeAllRanges(), e && de.deselect(t);
|
|
11680
11680
|
},
|
|
11681
11681
|
findDocumentOrShadowRoot: (t) => {
|
|
11682
11682
|
var e = Ue.toDOMNode(t, t), n = e.getRootNode();
|
|
@@ -11724,7 +11724,7 @@ var As = /* @__PURE__ */ new WeakMap(), gs = /* @__PURE__ */ new WeakMap(), Ia =
|
|
|
11724
11724
|
},
|
|
11725
11725
|
findPath: (t, e) => {
|
|
11726
11726
|
for (var n = [], r = e; ; ) {
|
|
11727
|
-
var o =
|
|
11727
|
+
var o = Fa.get(r);
|
|
11728
11728
|
if (o == null) {
|
|
11729
11729
|
if (r === t)
|
|
11730
11730
|
return n;
|
|
@@ -11741,7 +11741,7 @@ var As = /* @__PURE__ */ new WeakMap(), gs = /* @__PURE__ */ new WeakMap(), Ia =
|
|
|
11741
11741
|
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
11742
11742
|
retries: 5
|
|
11743
11743
|
};
|
|
11744
|
-
if (!Ko.get(e) &&
|
|
11744
|
+
if (!Ko.get(e) && Ra.get(e)) {
|
|
11745
11745
|
if (n.retries <= 0)
|
|
11746
11746
|
throw new Error("Could not set focus, editor seems stuck with pending operations");
|
|
11747
11747
|
if (e.operations.length > 0) {
|
|
@@ -11755,10 +11755,10 @@ var As = /* @__PURE__ */ new WeakMap(), gs = /* @__PURE__ */ new WeakMap(), Ia =
|
|
|
11755
11755
|
var r = Ue.toDOMNode(e, e), o = Ue.findDocumentOrShadowRoot(e);
|
|
11756
11756
|
if (o.activeElement !== r) {
|
|
11757
11757
|
if (e.selection && o instanceof Document) {
|
|
11758
|
-
var i =
|
|
11758
|
+
var i = Ia(o), s = Ue.toDOMRange(e, e.selection);
|
|
11759
11759
|
i == null || i.removeAllRanges(), i == null || i.addRange(s);
|
|
11760
11760
|
}
|
|
11761
|
-
e.selection ||
|
|
11761
|
+
e.selection || de.select(e, I.start(e, [])), Ko.set(e, !0), r.focus({
|
|
11762
11762
|
preventScroll: !0
|
|
11763
11763
|
});
|
|
11764
11764
|
}
|
|
@@ -11811,7 +11811,7 @@ var As = /* @__PURE__ */ new WeakMap(), gs = /* @__PURE__ */ new WeakMap(), Ia =
|
|
|
11811
11811
|
},
|
|
11812
11812
|
setFragmentData: (t, e, n) => t.setFragmentData(e, n),
|
|
11813
11813
|
toDOMNode: (t, e) => {
|
|
11814
|
-
var n, r = e === t ?
|
|
11814
|
+
var n, r = e === t ? Ra.get(t) : (n = nf.get(t)) === null || n === void 0 ? void 0 : n.get(Ue.findKey(t, e));
|
|
11815
11815
|
if (!r)
|
|
11816
11816
|
throw new Error("Cannot resolve a DOM node from Slate node: ".concat(Jt.stringify(e)));
|
|
11817
11817
|
return r;
|
|
@@ -11865,7 +11865,7 @@ var As = /* @__PURE__ */ new WeakMap(), gs = /* @__PURE__ */ new WeakMap(), Ia =
|
|
|
11865
11865
|
toSlateNode: (t, e) => {
|
|
11866
11866
|
var n = ur(e) ? e : e.parentElement;
|
|
11867
11867
|
n && !n.hasAttribute("data-slate-node") && (n = n.closest("[data-slate-node]"));
|
|
11868
|
-
var r = n ?
|
|
11868
|
+
var r = n ? ol.get(n) : null;
|
|
11869
11869
|
if (!r)
|
|
11870
11870
|
throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));
|
|
11871
11871
|
return r;
|
|
@@ -12334,7 +12334,7 @@ var QP = function(e) {
|
|
|
12334
12334
|
});
|
|
12335
12335
|
if (u) {
|
|
12336
12336
|
var [, d] = u, f = I.range(r, d, r.selection.anchor), h = JP(r, f);
|
|
12337
|
-
oe.isCollapsed(h) ||
|
|
12337
|
+
oe.isCollapsed(h) || de.delete(r, {
|
|
12338
12338
|
at: h
|
|
12339
12339
|
});
|
|
12340
12340
|
}
|
|
@@ -12364,7 +12364,7 @@ var QP = function(e) {
|
|
|
12364
12364
|
}
|
|
12365
12365
|
case "set_selection": {
|
|
12366
12366
|
var y;
|
|
12367
|
-
(y =
|
|
12367
|
+
(y = Ma.get(r)) === null || y === void 0 || y.unref(), Ma.delete(r);
|
|
12368
12368
|
break;
|
|
12369
12369
|
}
|
|
12370
12370
|
case "insert_node":
|
|
@@ -12455,7 +12455,7 @@ var QP = function(e) {
|
|
|
12455
12455
|
if (u) {
|
|
12456
12456
|
var d = u.split(/\r\n|\r|\n/), f = !1;
|
|
12457
12457
|
for (var h of d)
|
|
12458
|
-
f &&
|
|
12458
|
+
f && de.splitNodes(r, {
|
|
12459
12459
|
always: !0
|
|
12460
12460
|
}), r.insertText(h), f = !0;
|
|
12461
12461
|
return !0;
|
|
@@ -12636,10 +12636,10 @@ var sL = (t, e) => Object.keys(t).length === Object.keys(e).length && Object.key
|
|
|
12636
12636
|
typeof ErrorEvent == "function" ? t = new ErrorEvent("error", {
|
|
12637
12637
|
message: Ry
|
|
12638
12638
|
}) : (t = document.createEvent("Event"), t.initEvent("error", !1, !1), t.message = Ry), window.dispatchEvent(t);
|
|
12639
|
-
},
|
|
12639
|
+
}, il;
|
|
12640
12640
|
(function(t) {
|
|
12641
12641
|
t.BORDER_BOX = "border-box", t.CONTENT_BOX = "content-box", t.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
|
|
12642
|
-
})(
|
|
12642
|
+
})(il || (il = {}));
|
|
12643
12643
|
var Pi = function(t) {
|
|
12644
12644
|
return Object.freeze(t);
|
|
12645
12645
|
}, dL = /* @__PURE__ */ (function() {
|
|
@@ -12687,7 +12687,7 @@ var Pi = function(t) {
|
|
|
12687
12687
|
return !0;
|
|
12688
12688
|
}
|
|
12689
12689
|
return !1;
|
|
12690
|
-
},
|
|
12690
|
+
}, Pa = typeof window < "u" ? window : {}, mc = /* @__PURE__ */ new WeakMap(), Py = /auto|scroll/, hL = /^tb|vertical/, pL = /msie|trident/i.test(Pa.navigator && Pa.navigator.userAgent), Vr = function(t) {
|
|
12691
12691
|
return parseFloat(t || "0");
|
|
12692
12692
|
}, Os = function(t, e, n) {
|
|
12693
12693
|
return t === void 0 && (t = 0), e === void 0 && (e = 0), n === void 0 && (n = !1), new dL((n ? e : t) || 0, (n ? t : e) || 0);
|
|
@@ -12711,9 +12711,9 @@ var Pi = function(t) {
|
|
|
12711
12711
|
}, gS = function(t, e, n) {
|
|
12712
12712
|
var r = mS(t, n), o = r.borderBoxSize, i = r.contentBoxSize, s = r.devicePixelContentBoxSize;
|
|
12713
12713
|
switch (e) {
|
|
12714
|
-
case
|
|
12714
|
+
case il.DEVICE_PIXEL_CONTENT_BOX:
|
|
12715
12715
|
return s;
|
|
12716
|
-
case
|
|
12716
|
+
case il.BORDER_BOX:
|
|
12717
12717
|
return o;
|
|
12718
12718
|
default:
|
|
12719
12719
|
return i;
|
|
@@ -12825,16 +12825,16 @@ var Pi = function(t) {
|
|
|
12825
12825
|
var e = this, n = function() {
|
|
12826
12826
|
return e.observer && e.observer.observe(document.body, kL);
|
|
12827
12827
|
};
|
|
12828
|
-
document.body ? n() :
|
|
12828
|
+
document.body ? n() : Pa.addEventListener("DOMContentLoaded", n);
|
|
12829
12829
|
}, t.prototype.start = function() {
|
|
12830
12830
|
var e = this;
|
|
12831
12831
|
this.stopped && (this.stopped = !1, this.observer = new MutationObserver(this.listener), this.observe(), Hy.forEach(function(n) {
|
|
12832
|
-
return
|
|
12832
|
+
return Pa.addEventListener(n, e.listener, !0);
|
|
12833
12833
|
}));
|
|
12834
12834
|
}, t.prototype.stop = function() {
|
|
12835
12835
|
var e = this;
|
|
12836
12836
|
this.stopped || (this.observer && this.observer.disconnect(), Hy.forEach(function(n) {
|
|
12837
|
-
return
|
|
12837
|
+
return Pa.removeEventListener(n, e.listener, !0);
|
|
12838
12838
|
}), this.stopped = !0);
|
|
12839
12839
|
}, t;
|
|
12840
12840
|
})(), zm = new EL(), jy = function(t) {
|
|
@@ -12843,7 +12843,7 @@ var Pi = function(t) {
|
|
|
12843
12843
|
return !Dw(t) && !fL(t) && getComputedStyle(t).display === "inline";
|
|
12844
12844
|
}, DL = (function() {
|
|
12845
12845
|
function t(e, n) {
|
|
12846
|
-
this.target = e, this.observedBox = n ||
|
|
12846
|
+
this.target = e, this.observedBox = n || il.CONTENT_BOX, this.lastReportedSize = {
|
|
12847
12847
|
inlineSize: 0,
|
|
12848
12848
|
blockSize: 0
|
|
12849
12849
|
};
|
|
@@ -12923,27 +12923,27 @@ function Uu(t, e) {
|
|
|
12923
12923
|
}
|
|
12924
12924
|
return n;
|
|
12925
12925
|
}
|
|
12926
|
-
function
|
|
12926
|
+
function sl(t) {
|
|
12927
12927
|
"@babel/helpers - typeof";
|
|
12928
|
-
return
|
|
12928
|
+
return sl = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
12929
12929
|
return typeof e;
|
|
12930
12930
|
} : function(e) {
|
|
12931
12931
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
12932
|
-
},
|
|
12932
|
+
}, sl(t);
|
|
12933
12933
|
}
|
|
12934
12934
|
function NL(t, e) {
|
|
12935
|
-
if (
|
|
12935
|
+
if (sl(t) !== "object" || t === null) return t;
|
|
12936
12936
|
var n = t[Symbol.toPrimitive];
|
|
12937
12937
|
if (n !== void 0) {
|
|
12938
12938
|
var r = n.call(t, e);
|
|
12939
|
-
if (
|
|
12939
|
+
if (sl(r) !== "object") return r;
|
|
12940
12940
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
12941
12941
|
}
|
|
12942
12942
|
return (e === "string" ? String : Number)(t);
|
|
12943
12943
|
}
|
|
12944
12944
|
function TL(t) {
|
|
12945
12945
|
var e = NL(t, "string");
|
|
12946
|
-
return
|
|
12946
|
+
return sl(e) === "symbol" ? e : String(e);
|
|
12947
12947
|
}
|
|
12948
12948
|
function St(t, e, n) {
|
|
12949
12949
|
return e = TL(e), e in t ? Object.defineProperty(t, e, {
|
|
@@ -12993,7 +12993,7 @@ function ML(t) {
|
|
|
12993
12993
|
var {
|
|
12994
12994
|
selection: T
|
|
12995
12995
|
} = e, B = Dy(e, _);
|
|
12996
|
-
B && (!T || !oe.equals(B, T)) &&
|
|
12996
|
+
B && (!T || !oe.equals(B, T)) && de.select(e, B);
|
|
12997
12997
|
}
|
|
12998
12998
|
}, d = () => {
|
|
12999
12999
|
var _ = jo.get(e);
|
|
@@ -13003,7 +13003,7 @@ function ML(t) {
|
|
|
13003
13003
|
if (!T)
|
|
13004
13004
|
return;
|
|
13005
13005
|
var B = I.range(e, T);
|
|
13006
|
-
(!e.selection || !oe.equals(e.selection, B)) &&
|
|
13006
|
+
(!e.selection || !oe.equals(e.selection, B)) && de.select(e, T);
|
|
13007
13007
|
}
|
|
13008
13008
|
_.run();
|
|
13009
13009
|
}
|
|
@@ -13021,7 +13021,7 @@ function ML(t) {
|
|
|
13021
13021
|
var A, F, P = Dr.get(e);
|
|
13022
13022
|
P !== void 0 && (Dr.delete(e), e.marks = P), P && c === !1 && (c = null);
|
|
13023
13023
|
var j = XP(B);
|
|
13024
|
-
(!e.selection || !oe.equals(e.selection, j)) &&
|
|
13024
|
+
(!e.selection || !oe.equals(e.selection, j)) && de.select(e, j), B.diff.text ? I.insertText(e, B.diff.text) : I.deleteFragment(e), Rn.set(e, (F = Rn.get(e)) === null || F === void 0 ? void 0 : F.filter((q) => {
|
|
13025
13025
|
var {
|
|
13026
13026
|
id: te
|
|
13027
13027
|
} = q;
|
|
@@ -13029,7 +13029,7 @@ function ML(t) {
|
|
|
13029
13029
|
})), UP(e, B) || (T = !1, jo.delete(e), So.delete(e), o = "action", bo.delete(e), n.cancel(), r.cancel(), _ == null || _.unref());
|
|
13030
13030
|
}
|
|
13031
13031
|
var z = _ == null ? void 0 : _.unref();
|
|
13032
|
-
if (z && !bo.get(e) && (!e.selection || !oe.equals(z, e.selection)) &&
|
|
13032
|
+
if (z && !bo.get(e) && (!e.selection || !oe.equals(z, e.selection)) && de.select(e, z), C()) {
|
|
13033
13033
|
d();
|
|
13034
13034
|
return;
|
|
13035
13035
|
}
|
|
@@ -13117,7 +13117,7 @@ function ML(t) {
|
|
|
13117
13117
|
text: "",
|
|
13118
13118
|
start: te.offset,
|
|
13119
13119
|
end: L.offset
|
|
13120
|
-
},
|
|
13120
|
+
}, ue = Rn.get(e), R = ue == null ? void 0 : ue.find((Ft) => W.equals(Ft.path, K)), U = R ? [R.diff, ne] : [ne], Y = cS(H.text, ...U);
|
|
13121
13121
|
if (Y.length === 0 && (G = !1), oe.isExpanded(A)) {
|
|
13122
13122
|
if (G && W.equals(A.anchor.path, A.focus.path)) {
|
|
13123
13123
|
var X = {
|
|
@@ -13272,7 +13272,7 @@ function ML(t) {
|
|
|
13272
13272
|
offset: ge.offset + je.length
|
|
13273
13273
|
};
|
|
13274
13274
|
y(() => {
|
|
13275
|
-
|
|
13275
|
+
de.select(e, {
|
|
13276
13276
|
anchor: sn,
|
|
13277
13277
|
focus: sn
|
|
13278
13278
|
});
|
|
@@ -13657,7 +13657,7 @@ var e3 = (t) => /* @__PURE__ */ Ne.createElement(n3, kS({}, t)), t3 = (t) => {
|
|
|
13657
13657
|
}
|
|
13658
13658
|
var y = V((C) => {
|
|
13659
13659
|
var E = nf.get(l);
|
|
13660
|
-
C ? (E == null || E.set(f, C), Ri.set(a, C),
|
|
13660
|
+
C ? (E == null || E.set(f, C), Ri.set(a, C), ol.set(C, a)) : (E == null || E.delete(f), Ri.delete(a), c.current && ol.delete(c.current)), c.current = C;
|
|
13661
13661
|
}, [c, l, f, a]), g = {
|
|
13662
13662
|
"data-slate-node": "text",
|
|
13663
13663
|
ref: y
|
|
@@ -13706,7 +13706,7 @@ var r3 = (t) => /* @__PURE__ */ Ne.createElement(s3, jm({}, t)), o3 = (t) => {
|
|
|
13706
13706
|
renderText: a
|
|
13707
13707
|
} = t, l = Pr(), c = g3(), u = l.isInline(n), d = xS(n, e), f = ve.findKey(l, n), h = V((E) => {
|
|
13708
13708
|
var b = nf.get(l);
|
|
13709
|
-
E ? (b == null || b.set(f, E), Ri.set(n, E),
|
|
13709
|
+
E ? (b == null || b.set(f, E), Ri.set(n, E), ol.set(E, n)) : (b == null || b.delete(f), Ri.delete(n));
|
|
13710
13710
|
}, [l, f, n]), m = OS({
|
|
13711
13711
|
decorations: d,
|
|
13712
13712
|
node: n,
|
|
@@ -13740,7 +13740,7 @@ var r3 = (t) => /* @__PURE__ */ Ne.createElement(s3, jm({}, t)), o3 = (t) => {
|
|
|
13740
13740
|
isLast: !1,
|
|
13741
13741
|
parent: n,
|
|
13742
13742
|
text: C
|
|
13743
|
-
})), gs.set(C, 0),
|
|
13743
|
+
})), gs.set(C, 0), Fa.set(C, n);
|
|
13744
13744
|
}
|
|
13745
13745
|
return r({
|
|
13746
13746
|
attributes: w,
|
|
@@ -14218,7 +14218,7 @@ var Zy = /* @__PURE__ */ new WeakMap(), SS = function(e, n) {
|
|
|
14218
14218
|
childrenToRedecorate: w
|
|
14219
14219
|
} = m3(l, n, e);
|
|
14220
14220
|
h || n.children.forEach((C, E) => {
|
|
14221
|
-
gs.set(C, E),
|
|
14221
|
+
gs.set(C, E), Fa.set(C, n);
|
|
14222
14222
|
});
|
|
14223
14223
|
var v = V((C, E, b) => {
|
|
14224
14224
|
var k = b ?? ve.findKey(l, C);
|
|
@@ -14255,10 +14255,10 @@ var Zy = /* @__PURE__ */ new WeakMap(), SS = function(e, n) {
|
|
|
14255
14255
|
chunkSize: f,
|
|
14256
14256
|
rerenderChildren: w,
|
|
14257
14257
|
onInsert: (C, E) => {
|
|
14258
|
-
gs.set(C, E),
|
|
14258
|
+
gs.set(C, E), Fa.set(C, n);
|
|
14259
14259
|
},
|
|
14260
14260
|
onUpdate: (C, E) => {
|
|
14261
|
-
gs.set(C, E),
|
|
14261
|
+
gs.set(C, E), Fa.set(C, n);
|
|
14262
14262
|
},
|
|
14263
14263
|
onIndexChange: (C, E) => {
|
|
14264
14264
|
gs.set(C, E);
|
|
@@ -14483,16 +14483,16 @@ var _3 = (t) => /* @__PURE__ */ Ne.createElement(Ne.Fragment, null, OS(t)), TS =
|
|
|
14483
14483
|
if (!O.current && bi && U instanceof ShadowRoot) {
|
|
14484
14484
|
O.current = !0;
|
|
14485
14485
|
var Y = FP();
|
|
14486
|
-
Y ? document.execCommand("indent") :
|
|
14486
|
+
Y ? document.execCommand("indent") : de.deselect(g), O.current = !1;
|
|
14487
14487
|
return;
|
|
14488
14488
|
}
|
|
14489
14489
|
var X = B.current;
|
|
14490
14490
|
if ((kn || !ve.isComposing(g)) && (!T.isUpdatingSelection || X != null && X.isFlushing()) && !T.isDraggingInternally) {
|
|
14491
14491
|
var se = ve.findDocumentOrShadowRoot(g), {
|
|
14492
14492
|
activeElement: ie
|
|
14493
|
-
} = se, we = ve.toDOMNode(g, g), Ee =
|
|
14493
|
+
} = se, we = ve.toDOMNode(g, g), Ee = Ia(se);
|
|
14494
14494
|
if (ie === we ? (T.latestElement = ie, Ko.set(g, !0)) : Ko.delete(g), !Ee)
|
|
14495
|
-
return
|
|
14495
|
+
return de.deselect(g);
|
|
14496
14496
|
var {
|
|
14497
14497
|
anchorNode: Le,
|
|
14498
14498
|
focusNode: Ze
|
|
@@ -14502,9 +14502,9 @@ var _3 = (t) => /* @__PURE__ */ Ne.createElement(Ne.Fragment, null, OS(t)), TS =
|
|
|
14502
14502
|
exactMatch: !1,
|
|
14503
14503
|
suppressThrow: !0
|
|
14504
14504
|
});
|
|
14505
|
-
Re && (!ve.isComposing(g) && !(X != null && X.hasPendingChanges()) && !(X != null && X.isFlushing()) ?
|
|
14505
|
+
Re && (!ve.isComposing(g) && !(X != null && X.hasPendingChanges()) && !(X != null && X.isFlushing()) ? de.select(g, Re) : X == null || X.handleUserSelect(Re));
|
|
14506
14506
|
}
|
|
14507
|
-
a && (!je || !ge) &&
|
|
14507
|
+
a && (!je || !ge) && de.deselect(g);
|
|
14508
14508
|
}
|
|
14509
14509
|
}, 100), [g, a, T]), F = ce(() => vP(A, 0), [A]);
|
|
14510
14510
|
B.current = jL({
|
|
@@ -14513,10 +14513,10 @@ var _3 = (t) => /* @__PURE__ */ Ne.createElement(Ne.Fragment, null, OS(t)), TS =
|
|
|
14513
14513
|
scheduleOnDOMSelectionChange: F
|
|
14514
14514
|
}), oo(() => {
|
|
14515
14515
|
var R, U, Y;
|
|
14516
|
-
b.current && (Y = bw(b.current)) ? (sS.set(g, Y),
|
|
14516
|
+
b.current && (Y = bw(b.current)) ? (sS.set(g, Y), Ra.set(g, b.current), Ri.set(g, b.current), ol.set(b.current, g)) : Ri.delete(g);
|
|
14517
14517
|
var {
|
|
14518
14518
|
selection: X
|
|
14519
|
-
} = g, se = ve.findDocumentOrShadowRoot(g), ie =
|
|
14519
|
+
} = g, se = ve.findDocumentOrShadowRoot(g), ie = Ia(se);
|
|
14520
14520
|
if (!(!ie || !ve.isFocused(g) || (R = B.current) !== null && R !== void 0 && R.hasPendingAction())) {
|
|
14521
14521
|
var we = (je) => {
|
|
14522
14522
|
var ge = ie.type !== "None";
|
|
@@ -14527,7 +14527,7 @@ var _3 = (t) => /* @__PURE__ */ Ne.createElement(Ne.Fragment, null, OS(t)), TS =
|
|
|
14527
14527
|
ut.startContainer === Re ? Me = gn.endContainer : Me = ut.startContainer;
|
|
14528
14528
|
} else
|
|
14529
14529
|
Me = ie.anchorNode;
|
|
14530
|
-
var Jn =
|
|
14530
|
+
var Jn = Ra.get(g), sn = !1;
|
|
14531
14531
|
if (Fi(Jn, Me) && Fi(Jn, Re) && (sn = !0), ge && sn && X && !je) {
|
|
14532
14532
|
var Ft = ve.toSlateRange(g, ie, {
|
|
14533
14533
|
exactMatch: !0,
|
|
@@ -14594,7 +14594,7 @@ var _3 = (t) => /* @__PURE__ */ Ne.createElement(Ne.Fragment, null, OS(t)), TS =
|
|
|
14594
14594
|
exactMatch: !1,
|
|
14595
14595
|
suppressThrow: !1
|
|
14596
14596
|
});
|
|
14597
|
-
|
|
14597
|
+
de.select(g, we), R.preventDefault(), R.stopImmediatePropagation();
|
|
14598
14598
|
return;
|
|
14599
14599
|
}
|
|
14600
14600
|
if (D(), !a && ve.hasEditableTarget(g, R.target) && !I3(R, i)) {
|
|
@@ -14642,7 +14642,7 @@ var _3 = (t) => /* @__PURE__ */ Ne.createElement(Ne.Fragment, null, OS(t)), TS =
|
|
|
14642
14642
|
if (!Le || !oe.equals(Le, Qi)) {
|
|
14643
14643
|
Re = !1;
|
|
14644
14644
|
var Zi = !ge && g.selection && I.rangeRef(g, g.selection);
|
|
14645
|
-
|
|
14645
|
+
de.select(g, Qi), Zi && Ma.set(g, Zi);
|
|
14646
14646
|
}
|
|
14647
14647
|
}
|
|
14648
14648
|
}
|
|
@@ -14732,11 +14732,11 @@ var _3 = (t) => /* @__PURE__ */ Ne.createElement(Ne.Fragment, null, OS(t)), TS =
|
|
|
14732
14732
|
break;
|
|
14733
14733
|
}
|
|
14734
14734
|
}
|
|
14735
|
-
var Hr = (Ee =
|
|
14736
|
-
|
|
14735
|
+
var Hr = (Ee = Ma.get(g)) === null || Ee === void 0 ? void 0 : Ee.unref();
|
|
14736
|
+
Ma.delete(g), Hr && (!g.selection || !oe.equals(g.selection, Hr)) && de.select(g, Hr);
|
|
14737
14737
|
}
|
|
14738
14738
|
}, [g, A, D, i, a, F]), j = V((R) => {
|
|
14739
|
-
R == null ? (A.cancel(), F.cancel(),
|
|
14739
|
+
R == null ? (A.cancel(), F.cancel(), Ra.delete(g), Ri.delete(g), b.current && $o && b.current.removeEventListener("beforeinput", P)) : $o && R.addEventListener("beforeinput", P), b.current = R, typeof e == "function" ? e(R) : e && (e.current = R);
|
|
14740
14740
|
}, [A, F, g, P, e]);
|
|
14741
14741
|
oo(() => {
|
|
14742
14742
|
var R = ve.getWindow(g), U = (X) => {
|
|
@@ -14781,10 +14781,10 @@ var _3 = (t) => /* @__PURE__ */ Ne.createElement(Ne.Fragment, null, OS(t)), TS =
|
|
|
14781
14781
|
loose: !0
|
|
14782
14782
|
})) {
|
|
14783
14783
|
T.hasMarkPlaceholder = !0;
|
|
14784
|
-
var
|
|
14784
|
+
var ue = Object.fromEntries(Object.keys(ne).map((R) => [R, null]));
|
|
14785
14785
|
z.push(Kr(Kr(Kr({
|
|
14786
14786
|
[lS]: !0
|
|
14787
|
-
},
|
|
14787
|
+
}, ue), H), {}, {
|
|
14788
14788
|
anchor: K,
|
|
14789
14789
|
focus: K
|
|
14790
14790
|
}));
|
|
@@ -14881,7 +14881,7 @@ var _3 = (t) => /* @__PURE__ */ Ne.createElement(Ne.Fragment, null, OS(t)), TS =
|
|
|
14881
14881
|
return;
|
|
14882
14882
|
}
|
|
14883
14883
|
if (bi) {
|
|
14884
|
-
var ie =
|
|
14884
|
+
var ie = Ia(U);
|
|
14885
14885
|
ie == null || ie.removeAllRanges();
|
|
14886
14886
|
}
|
|
14887
14887
|
Ko.delete(g);
|
|
@@ -14904,7 +14904,7 @@ var _3 = (t) => /* @__PURE__ */ Ne.createElement(Ne.Fragment, null, OS(t)), TS =
|
|
|
14904
14904
|
X = (se = ie == null ? void 0 : ie[1]) !== null && se !== void 0 ? se : Y.slice(0, 1);
|
|
14905
14905
|
}
|
|
14906
14906
|
var we = I.range(g, X);
|
|
14907
|
-
|
|
14907
|
+
de.select(g, we);
|
|
14908
14908
|
return;
|
|
14909
14909
|
}
|
|
14910
14910
|
if (a)
|
|
@@ -14916,12 +14916,12 @@ var _3 = (t) => /* @__PURE__ */ Ne.createElement(Ne.Fragment, null, OS(t)), TS =
|
|
|
14916
14916
|
});
|
|
14917
14917
|
if (Ze && je && W.equals(Ze[1], je[1])) {
|
|
14918
14918
|
var ge = I.range(g, Ee);
|
|
14919
|
-
|
|
14919
|
+
de.select(g, ge);
|
|
14920
14920
|
}
|
|
14921
14921
|
}
|
|
14922
14922
|
}, [g, y.onClick, a]),
|
|
14923
14923
|
onCompositionEnd: V((R) => {
|
|
14924
|
-
if (!
|
|
14924
|
+
if (!ya(R) && ve.hasSelectableTarget(g, R.target)) {
|
|
14925
14925
|
var U;
|
|
14926
14926
|
if (ve.isComposing(g) && Promise.resolve().then(() => {
|
|
14927
14927
|
E(!1), Di.set(g, !1);
|
|
@@ -14936,10 +14936,10 @@ var _3 = (t) => /* @__PURE__ */ Ne.createElement(Ne.Fragment, null, OS(t)), TS =
|
|
|
14936
14936
|
}
|
|
14937
14937
|
}, [y.onCompositionEnd, g]),
|
|
14938
14938
|
onCompositionUpdate: V((R) => {
|
|
14939
|
-
ve.hasSelectableTarget(g, R.target) && !Dn(R, y.onCompositionUpdate) && !
|
|
14939
|
+
ve.hasSelectableTarget(g, R.target) && !Dn(R, y.onCompositionUpdate) && !ya(R) && (ve.isComposing(g) || (E(!0), Di.set(g, !0)));
|
|
14940
14940
|
}, [y.onCompositionUpdate, g]),
|
|
14941
14941
|
onCompositionStart: V((R) => {
|
|
14942
|
-
if (!
|
|
14942
|
+
if (!ya(R) && ve.hasSelectableTarget(g, R.target)) {
|
|
14943
14943
|
var U;
|
|
14944
14944
|
if ((U = B.current) === null || U === void 0 || U.handleCompositionStart(R), Dn(R, y.onCompositionStart) || kn)
|
|
14945
14945
|
return;
|
|
@@ -14954,10 +14954,10 @@ var _3 = (t) => /* @__PURE__ */ Ne.createElement(Ne.Fragment, null, OS(t)), TS =
|
|
|
14954
14954
|
}
|
|
14955
14955
|
}, [y.onCompositionStart, g]),
|
|
14956
14956
|
onCopy: V((R) => {
|
|
14957
|
-
ve.hasSelectableTarget(g, R.target) && !Dn(R, y.onCopy) && !
|
|
14957
|
+
ve.hasSelectableTarget(g, R.target) && !Dn(R, y.onCopy) && !ya(R) && (R.preventDefault(), ve.setFragmentData(g, R.clipboardData, "copy"));
|
|
14958
14958
|
}, [y.onCopy, g]),
|
|
14959
14959
|
onCut: V((R) => {
|
|
14960
|
-
if (!a && ve.hasSelectableTarget(g, R.target) && !Dn(R, y.onCut) && !
|
|
14960
|
+
if (!a && ve.hasSelectableTarget(g, R.target) && !Dn(R, y.onCut) && !ya(R)) {
|
|
14961
14961
|
R.preventDefault(), ve.setFragmentData(g, R.clipboardData, "cut");
|
|
14962
14962
|
var {
|
|
14963
14963
|
selection: U
|
|
@@ -14967,7 +14967,7 @@ var _3 = (t) => /* @__PURE__ */ Ne.createElement(Ne.Fragment, null, OS(t)), TS =
|
|
|
14967
14967
|
I.deleteFragment(g);
|
|
14968
14968
|
else {
|
|
14969
14969
|
var Y = be.parent(g, U.anchor.path);
|
|
14970
|
-
I.isVoid(g, Y) &&
|
|
14970
|
+
I.isVoid(g, Y) && de.delete(g);
|
|
14971
14971
|
}
|
|
14972
14972
|
}
|
|
14973
14973
|
}, [a, g, y.onCut]),
|
|
@@ -14985,7 +14985,7 @@ var _3 = (t) => /* @__PURE__ */ Ne.createElement(Ne.Fragment, null, OS(t)), TS =
|
|
|
14985
14985
|
});
|
|
14986
14986
|
if (X) {
|
|
14987
14987
|
var se = I.range(g, Y);
|
|
14988
|
-
|
|
14988
|
+
de.select(g, se);
|
|
14989
14989
|
}
|
|
14990
14990
|
T.isDraggingInternally = !0, ve.setFragmentData(g, R.dataTransfer, "drag");
|
|
14991
14991
|
}
|
|
@@ -14994,10 +14994,10 @@ var _3 = (t) => /* @__PURE__ */ Ne.createElement(Ne.Fragment, null, OS(t)), TS =
|
|
|
14994
14994
|
if (!a && ve.hasTarget(g, R.target) && !Dn(R, y.onDrop)) {
|
|
14995
14995
|
R.preventDefault();
|
|
14996
14996
|
var U = g.selection, Y = ve.findEventRange(g, R), X = R.dataTransfer;
|
|
14997
|
-
|
|
14997
|
+
de.select(g, Y), T.isDraggingInternally && U && !oe.equals(U, Y) && !I.void(g, {
|
|
14998
14998
|
at: Y,
|
|
14999
14999
|
voids: !0
|
|
15000
|
-
}) &&
|
|
15000
|
+
}) && de.delete(g, {
|
|
15001
15001
|
at: U
|
|
15002
15002
|
}), ve.insertData(g, X), ve.isFocused(g) || ve.focus(g);
|
|
15003
15003
|
}
|
|
@@ -15040,20 +15040,20 @@ var _3 = (t) => /* @__PURE__ */ Ne.createElement(Ne.Fragment, null, OS(t)), TS =
|
|
|
15040
15040
|
return;
|
|
15041
15041
|
}
|
|
15042
15042
|
if (Tt.isMoveLineBackward(Y)) {
|
|
15043
|
-
R.preventDefault(),
|
|
15043
|
+
R.preventDefault(), de.move(g, {
|
|
15044
15044
|
unit: "line",
|
|
15045
15045
|
reverse: !0
|
|
15046
15046
|
});
|
|
15047
15047
|
return;
|
|
15048
15048
|
}
|
|
15049
15049
|
if (Tt.isMoveLineForward(Y)) {
|
|
15050
|
-
R.preventDefault(),
|
|
15050
|
+
R.preventDefault(), de.move(g, {
|
|
15051
15051
|
unit: "line"
|
|
15052
15052
|
});
|
|
15053
15053
|
return;
|
|
15054
15054
|
}
|
|
15055
15055
|
if (Tt.isExtendLineBackward(Y)) {
|
|
15056
|
-
R.preventDefault(),
|
|
15056
|
+
R.preventDefault(), de.move(g, {
|
|
15057
15057
|
unit: "line",
|
|
15058
15058
|
edge: "focus",
|
|
15059
15059
|
reverse: !0
|
|
@@ -15061,41 +15061,41 @@ var _3 = (t) => /* @__PURE__ */ Ne.createElement(Ne.Fragment, null, OS(t)), TS =
|
|
|
15061
15061
|
return;
|
|
15062
15062
|
}
|
|
15063
15063
|
if (Tt.isExtendLineForward(Y)) {
|
|
15064
|
-
R.preventDefault(),
|
|
15064
|
+
R.preventDefault(), de.move(g, {
|
|
15065
15065
|
unit: "line",
|
|
15066
15066
|
edge: "focus"
|
|
15067
15067
|
});
|
|
15068
15068
|
return;
|
|
15069
15069
|
}
|
|
15070
15070
|
if (Tt.isMoveBackward(Y)) {
|
|
15071
|
-
R.preventDefault(), X && oe.isCollapsed(X) ?
|
|
15071
|
+
R.preventDefault(), X && oe.isCollapsed(X) ? de.move(g, {
|
|
15072
15072
|
reverse: !ie
|
|
15073
|
-
}) :
|
|
15073
|
+
}) : de.collapse(g, {
|
|
15074
15074
|
edge: ie ? "end" : "start"
|
|
15075
15075
|
});
|
|
15076
15076
|
return;
|
|
15077
15077
|
}
|
|
15078
15078
|
if (Tt.isMoveForward(Y)) {
|
|
15079
|
-
R.preventDefault(), X && oe.isCollapsed(X) ?
|
|
15079
|
+
R.preventDefault(), X && oe.isCollapsed(X) ? de.move(g, {
|
|
15080
15080
|
reverse: ie
|
|
15081
|
-
}) :
|
|
15081
|
+
}) : de.collapse(g, {
|
|
15082
15082
|
edge: ie ? "start" : "end"
|
|
15083
15083
|
});
|
|
15084
15084
|
return;
|
|
15085
15085
|
}
|
|
15086
15086
|
if (Tt.isMoveWordBackward(Y)) {
|
|
15087
|
-
R.preventDefault(), X && oe.isExpanded(X) &&
|
|
15087
|
+
R.preventDefault(), X && oe.isExpanded(X) && de.collapse(g, {
|
|
15088
15088
|
edge: "focus"
|
|
15089
|
-
}),
|
|
15089
|
+
}), de.move(g, {
|
|
15090
15090
|
unit: "word",
|
|
15091
15091
|
reverse: !ie
|
|
15092
15092
|
});
|
|
15093
15093
|
return;
|
|
15094
15094
|
}
|
|
15095
15095
|
if (Tt.isMoveWordForward(Y)) {
|
|
15096
|
-
R.preventDefault(), X && oe.isExpanded(X) &&
|
|
15096
|
+
R.preventDefault(), X && oe.isExpanded(X) && de.collapse(g, {
|
|
15097
15097
|
edge: "focus"
|
|
15098
|
-
}),
|
|
15098
|
+
}), de.move(g, {
|
|
15099
15099
|
unit: "word",
|
|
15100
15100
|
reverse: ie
|
|
15101
15101
|
});
|
|
@@ -15211,7 +15211,7 @@ var _3 = (t) => /* @__PURE__ */ Ne.createElement(Ne.Fragment, null, OS(t)), TS =
|
|
|
15211
15211
|
return !1;
|
|
15212
15212
|
var n = e(t);
|
|
15213
15213
|
return n ?? (t.isDefaultPrevented() || t.isPropagationStopped());
|
|
15214
|
-
},
|
|
15214
|
+
}, ya = (t) => ti(t.target) && (t.target instanceof HTMLInputElement || t.target instanceof HTMLTextAreaElement), I3 = (t, e) => {
|
|
15215
15215
|
if (!e)
|
|
15216
15216
|
return !1;
|
|
15217
15217
|
var n = e(t);
|
|
@@ -15339,7 +15339,7 @@ const MS = Lt.createContext(null), P3 = () => {
|
|
|
15339
15339
|
if (C.preventDefault(), C.stopPropagation(), !(c || u))
|
|
15340
15340
|
try {
|
|
15341
15341
|
const E = ve.findPath(h, n);
|
|
15342
|
-
|
|
15342
|
+
de.removeNodes(h, { at: E });
|
|
15343
15343
|
} catch {
|
|
15344
15344
|
}
|
|
15345
15345
|
}, y = s ? s(n.value, d) : m, g = a ? a(n.value) : n.value;
|
|
@@ -15374,7 +15374,7 @@ const MS = Lt.createContext(null), P3 = () => {
|
|
|
15374
15374
|
if (c) {
|
|
15375
15375
|
const [u] = I.node(t, c);
|
|
15376
15376
|
if (Be.isElement(u) && cs(u)) {
|
|
15377
|
-
|
|
15377
|
+
de.removeNodes(t, { at: l });
|
|
15378
15378
|
return;
|
|
15379
15379
|
}
|
|
15380
15380
|
}
|
|
@@ -15388,7 +15388,7 @@ const MS = Lt.createContext(null), P3 = () => {
|
|
|
15388
15388
|
if (a) {
|
|
15389
15389
|
const [l, c] = I.node(t, a);
|
|
15390
15390
|
if (Be.isElement(l) && cs(l)) {
|
|
15391
|
-
|
|
15391
|
+
de.removeNodes(t, { at: c });
|
|
15392
15392
|
return;
|
|
15393
15393
|
}
|
|
15394
15394
|
}
|
|
@@ -15426,7 +15426,7 @@ const MS = Lt.createContext(null), P3 = () => {
|
|
|
15426
15426
|
ve.focus(S);
|
|
15427
15427
|
} catch {
|
|
15428
15428
|
}
|
|
15429
|
-
|
|
15429
|
+
de.insertNodes(S, te), de.move(S, { distance: 1, unit: "offset" });
|
|
15430
15430
|
const L = qf(S.children);
|
|
15431
15431
|
e == null || e(L);
|
|
15432
15432
|
},
|
|
@@ -15461,16 +15461,16 @@ const MS = Lt.createContext(null), P3 = () => {
|
|
|
15461
15461
|
if (!(g === z || g === k.current)) {
|
|
15462
15462
|
k.current = g;
|
|
15463
15463
|
try {
|
|
15464
|
-
|
|
15464
|
+
de.select(S, {
|
|
15465
15465
|
anchor: I.start(S, []),
|
|
15466
15466
|
focus: I.end(S, [])
|
|
15467
|
-
}),
|
|
15467
|
+
}), de.delete(S);
|
|
15468
15468
|
const G = Uf(g, u);
|
|
15469
|
-
|
|
15469
|
+
de.insertNodes(S, G, { at: [0] });
|
|
15470
15470
|
const q = S.children;
|
|
15471
15471
|
if (q.length > 1 && q[0].type === "paragraph") {
|
|
15472
15472
|
const te = q[0];
|
|
15473
|
-
te.children.length === 1 && "text" in te.children[0] && te.children[0].text === "" &&
|
|
15473
|
+
te.children.length === 1 && "text" in te.children[0] && te.children[0].text === "" && de.removeNodes(S, { at: [0] });
|
|
15474
15474
|
}
|
|
15475
15475
|
} catch {
|
|
15476
15476
|
S.children = Uf(g, u), S.onChange();
|
|
@@ -16006,7 +16006,7 @@ const K3 = Ji(zS, {
|
|
|
16006
16006
|
ae,
|
|
16007
16007
|
{
|
|
16008
16008
|
type: "link",
|
|
16009
|
-
icon: /* @__PURE__ */ p(
|
|
16009
|
+
icon: /* @__PURE__ */ p(Zs, {}),
|
|
16010
16010
|
onClick: () => {
|
|
16011
16011
|
const v = _r(a, `${t.name}.${m.name}`);
|
|
16012
16012
|
d(v, w + 1);
|
|
@@ -16439,7 +16439,7 @@ const c4 = Ji(QS, {
|
|
|
16439
16439
|
needsFormItemName: !0,
|
|
16440
16440
|
isHidden: !0
|
|
16441
16441
|
}), ZS = ({ field: t }) => /* @__PURE__ */ p(
|
|
16442
|
-
|
|
16442
|
+
Ja,
|
|
16443
16443
|
{
|
|
16444
16444
|
message: t.label,
|
|
16445
16445
|
description: t.description || t.placeholder,
|
|
@@ -16821,7 +16821,7 @@ const mD = ({
|
|
|
16821
16821
|
renderVariableTooltip: c,
|
|
16822
16822
|
eventHandlers: u
|
|
16823
16823
|
}) => {
|
|
16824
|
-
const d = pw(), f = e ??
|
|
16824
|
+
const d = pw(), f = e ?? Ta(t.disabled, i, !1), h = n ?? Ta(t.required, i, !1), m = r ?? Ta(t.readOnly, i, !1), w = o ?? Hl(t.rules || [], i, t.type), v = {
|
|
16825
16825
|
values: i,
|
|
16826
16826
|
optionsLoader: s,
|
|
16827
16827
|
validateVariable: a,
|
|
@@ -16985,8 +16985,8 @@ function zl({
|
|
|
16985
16985
|
}) {
|
|
16986
16986
|
var K;
|
|
16987
16987
|
const [O] = me.useForm(), D = l || O, N = Lt.useMemo(() => {
|
|
16988
|
-
const ee = t.enableAutoEvents !== !1, ne = t.events || [],
|
|
16989
|
-
return z4(t, [...ne, ...
|
|
16988
|
+
const ee = t.enableAutoEvents !== !1, ne = t.events || [], ue = b || [];
|
|
16989
|
+
return z4(t, [...ne, ...ue], ee);
|
|
16990
16990
|
}, [t, b]), _ = SR({
|
|
16991
16991
|
events: N,
|
|
16992
16992
|
form: D,
|
|
@@ -17001,13 +17001,13 @@ function zl({
|
|
|
17001
17001
|
Lt.useEffect(() => {
|
|
17002
17002
|
var ne;
|
|
17003
17003
|
const ee = {};
|
|
17004
|
-
for (const
|
|
17005
|
-
const R = kv(
|
|
17006
|
-
if (ee[
|
|
17007
|
-
const Y = NR(
|
|
17004
|
+
for (const ue of t.fields) {
|
|
17005
|
+
const R = kv(ue, P);
|
|
17006
|
+
if (ee[ue.name] = R, G.current[ue.name] === !0 && R === !1) {
|
|
17007
|
+
const Y = NR(ue), X = ((ne = ue.visibleWhen) == null ? void 0 : ne.clearOnHide) ?? !0;
|
|
17008
17008
|
Y === "unregister" && D.setFieldValue(
|
|
17009
|
-
|
|
17010
|
-
X ? void 0 : D.getFieldValue(
|
|
17009
|
+
ue.name,
|
|
17010
|
+
X ? void 0 : D.getFieldValue(ue.name)
|
|
17011
17011
|
);
|
|
17012
17012
|
}
|
|
17013
17013
|
}
|
|
@@ -17018,9 +17018,9 @@ function zl({
|
|
|
17018
17018
|
await (n == null ? void 0 : n(ne));
|
|
17019
17019
|
}, te = (ee, ne) => {
|
|
17020
17020
|
if (r == null || r(ee, ne), _.triggerFieldChange && ee) {
|
|
17021
|
-
const
|
|
17021
|
+
const ue = T.current;
|
|
17022
17022
|
for (const R in ee) {
|
|
17023
|
-
const U = _r(
|
|
17023
|
+
const U = _r(ue, R), Y = ee[R];
|
|
17024
17024
|
_.triggerFieldChange(R, Y, U);
|
|
17025
17025
|
}
|
|
17026
17026
|
}
|
|
@@ -17058,7 +17058,7 @@ function zl({
|
|
|
17058
17058
|
children: [
|
|
17059
17059
|
t.fields.map((ee) => {
|
|
17060
17060
|
if (!kv(ee, P)) return null;
|
|
17061
|
-
const
|
|
17061
|
+
const ue = Ta(ee.disabled, P, !1), R = Ta(ee.required, P, !1), U = Hl(
|
|
17062
17062
|
ee.rules || [],
|
|
17063
17063
|
P,
|
|
17064
17064
|
ee.type
|
|
@@ -17070,7 +17070,7 @@ function zl({
|
|
|
17070
17070
|
mD,
|
|
17071
17071
|
{
|
|
17072
17072
|
field: ee,
|
|
17073
|
-
disabled:
|
|
17073
|
+
disabled: ue,
|
|
17074
17074
|
required: R,
|
|
17075
17075
|
rules: Y,
|
|
17076
17076
|
values: P,
|
|
@@ -17280,8 +17280,8 @@ function W4() {
|
|
|
17280
17280
|
case d:
|
|
17281
17281
|
return z ? q(1, H) : q(0, H + 1);
|
|
17282
17282
|
case u:
|
|
17283
|
-
var ne = this.$locale().weekStart || 0,
|
|
17284
|
-
return q(z ? K -
|
|
17283
|
+
var ne = this.$locale().weekStart || 0, ue = (L < ne ? L + 7 : L) - ne;
|
|
17284
|
+
return q(z ? K - ue : K + (6 - ue), H);
|
|
17285
17285
|
case c:
|
|
17286
17286
|
case m:
|
|
17287
17287
|
return te(ee + "Hours", 0);
|
|
@@ -17327,7 +17327,7 @@ function W4() {
|
|
|
17327
17327
|
if (!this.isValid()) return j.invalidDate || w;
|
|
17328
17328
|
var z = F || "YYYY-MM-DDTHH:mm:ssZ", G = N.z(this), q = this.$H, te = this.$m, L = this.$M, H = j.weekdays, K = j.months, ee = j.meridiem, ne = function(U, Y, X, se) {
|
|
17329
17329
|
return U && (U[Y] || U(P, z)) || X[Y].slice(0, se);
|
|
17330
|
-
},
|
|
17330
|
+
}, ue = function(U) {
|
|
17331
17331
|
return N.s(q % 12 || 12, U, "0");
|
|
17332
17332
|
}, R = ee || function(U, Y, X) {
|
|
17333
17333
|
var se = U < 12 ? "AM" : "PM";
|
|
@@ -17365,9 +17365,9 @@ function W4() {
|
|
|
17365
17365
|
case "HH":
|
|
17366
17366
|
return N.s(q, 2, "0");
|
|
17367
17367
|
case "h":
|
|
17368
|
-
return
|
|
17368
|
+
return ue(1);
|
|
17369
17369
|
case "hh":
|
|
17370
|
-
return
|
|
17370
|
+
return ue(2);
|
|
17371
17371
|
case "a":
|
|
17372
17372
|
return R(q, te, !0);
|
|
17373
17373
|
case "A":
|
|
@@ -17456,7 +17456,7 @@ function W4() {
|
|
|
17456
17456
|
})(hu)), hu.exports;
|
|
17457
17457
|
}
|
|
17458
17458
|
var U4 = W4();
|
|
17459
|
-
const Br = /* @__PURE__ */
|
|
17459
|
+
const Br = /* @__PURE__ */ oa(U4), q4 = (t) => /* @__PURE__ */ p(
|
|
17460
17460
|
Yi,
|
|
17461
17461
|
{
|
|
17462
17462
|
style: { width: "100%" },
|
|
@@ -17579,7 +17579,7 @@ Qe.isolate = new Qe({ deserialize: (t) => {
|
|
|
17579
17579
|
Qe.contextHash = new Qe({ perNode: !0 });
|
|
17580
17580
|
Qe.lookAhead = new Qe({ perNode: !0 });
|
|
17581
17581
|
Qe.mounted = new Qe({ perNode: !0 });
|
|
17582
|
-
class
|
|
17582
|
+
class La {
|
|
17583
17583
|
constructor(e, n, r, o = !1) {
|
|
17584
17584
|
this.tree = e, this.overlay = n, this.parser = r, this.bracketed = o;
|
|
17585
17585
|
}
|
|
@@ -17740,7 +17740,7 @@ class Ht {
|
|
|
17740
17740
|
@internal
|
|
17741
17741
|
*/
|
|
17742
17742
|
toString() {
|
|
17743
|
-
let e =
|
|
17743
|
+
let e = La.get(this);
|
|
17744
17744
|
if (e && !e.overlay)
|
|
17745
17745
|
return e.tree.toString();
|
|
17746
17746
|
let n = "";
|
|
@@ -17786,7 +17786,7 @@ class Ht {
|
|
|
17786
17786
|
[`resolveInner`](#common.Tree.resolveInner) instead.
|
|
17787
17787
|
*/
|
|
17788
17788
|
resolve(e, n = 0) {
|
|
17789
|
-
let r =
|
|
17789
|
+
let r = al(bc.get(this) || this.topNode, e, n, !1);
|
|
17790
17790
|
return bc.set(this, r), r;
|
|
17791
17791
|
}
|
|
17792
17792
|
/**
|
|
@@ -17797,7 +17797,7 @@ class Ht {
|
|
|
17797
17797
|
the host trees).
|
|
17798
17798
|
*/
|
|
17799
17799
|
resolveInner(e, n = 0) {
|
|
17800
|
-
let r =
|
|
17800
|
+
let r = al(ab.get(this) || this.topNode, e, n, !0);
|
|
17801
17801
|
return ab.set(this, r), r;
|
|
17802
17802
|
}
|
|
17803
17803
|
/**
|
|
@@ -17967,7 +17967,7 @@ function bD(t, e, n, r) {
|
|
|
17967
17967
|
return !0;
|
|
17968
17968
|
}
|
|
17969
17969
|
}
|
|
17970
|
-
function
|
|
17970
|
+
function al(t, e, n, r) {
|
|
17971
17971
|
for (var o; t.from == t.to || (n < 1 ? t.from >= e : t.from > e) || (n > -1 ? t.to <= e : t.to < e); ) {
|
|
17972
17972
|
let s = !r && t instanceof pr && t.index < 0 ? null : t.parent;
|
|
17973
17973
|
if (!s)
|
|
@@ -17997,10 +17997,10 @@ class CD {
|
|
|
17997
17997
|
return lb(this, e, n, r);
|
|
17998
17998
|
}
|
|
17999
17999
|
resolve(e, n = 0) {
|
|
18000
|
-
return
|
|
18000
|
+
return al(this, e, n, !1);
|
|
18001
18001
|
}
|
|
18002
18002
|
resolveInner(e, n = 0) {
|
|
18003
|
-
return
|
|
18003
|
+
return al(this, e, n, !0);
|
|
18004
18004
|
}
|
|
18005
18005
|
matchContext(e) {
|
|
18006
18006
|
return Vm(this.parent, e);
|
|
@@ -18040,7 +18040,7 @@ class pr extends CD {
|
|
|
18040
18040
|
for (let a = this; ; ) {
|
|
18041
18041
|
for (let { children: l, positions: c } = a._tree, u = n > 0 ? l.length : -1; e != u; e += n) {
|
|
18042
18042
|
let d = l[e], f = c[e] + a.from;
|
|
18043
|
-
if (!(!(i & Mt.EnterBracketed && d instanceof Ht && ((s =
|
|
18043
|
+
if (!(!(i & Mt.EnterBracketed && d instanceof Ht && ((s = La.get(d)) === null || s === void 0 ? void 0 : s.overlay) === null && (f >= r || f + d.length <= r)) && !bD(o, r, f, f + d.length))) {
|
|
18044
18044
|
if (d instanceof ni) {
|
|
18045
18045
|
if (i & Mt.ExcludeBuffers)
|
|
18046
18046
|
continue;
|
|
@@ -18049,7 +18049,7 @@ class pr extends CD {
|
|
|
18049
18049
|
return new Xo(new Q4(a, d, e, f), null, h);
|
|
18050
18050
|
} else if (i & Mt.IncludeAnonymous || !d.type.isAnonymous || Tw(d)) {
|
|
18051
18051
|
let h;
|
|
18052
|
-
if (!(i & Mt.IgnoreMounts) && (h =
|
|
18052
|
+
if (!(i & Mt.IgnoreMounts) && (h = La.get(d)) && !h.overlay)
|
|
18053
18053
|
return new pr(h.tree, f, e, a);
|
|
18054
18054
|
let m = new pr(d, f, e, a);
|
|
18055
18055
|
return i & Mt.IncludeAnonymous || !m.type.isAnonymous ? m : m.nextChild(n < 0 ? d.children.length - 1 : 0, n, r, o, i);
|
|
@@ -18101,7 +18101,7 @@ class pr extends CD {
|
|
|
18101
18101
|
}
|
|
18102
18102
|
enter(e, n, r = 0) {
|
|
18103
18103
|
let o;
|
|
18104
|
-
if (!(r & Mt.IgnoreOverlays) && (o =
|
|
18104
|
+
if (!(r & Mt.IgnoreOverlays) && (o = La.get(this._tree)) && o.overlay) {
|
|
18105
18105
|
let i = e - this.from, s = r & Mt.EnterBracketed && o.bracketed;
|
|
18106
18106
|
for (let { from: a, to: l } of o.overlay)
|
|
18107
18107
|
if ((n > 0 || s ? a <= i : a < i) && (n < 0 || s ? l >= i : l > i))
|
|
@@ -18311,10 +18311,10 @@ function e8(t, e, n) {
|
|
|
18311
18311
|
let s = i.parent;
|
|
18312
18312
|
(o || (o = [r])).push(s.resolve(e, n)), i = s;
|
|
18313
18313
|
} else {
|
|
18314
|
-
let s =
|
|
18314
|
+
let s = La.get(i.tree);
|
|
18315
18315
|
if (s && s.overlay && s.overlay[0].from <= e && s.overlay[s.overlay.length - 1].to >= e) {
|
|
18316
18316
|
let a = new pr(s.tree, s.overlay[0].from + i.from, -1, i);
|
|
18317
|
-
(o || (o = [r])).push(
|
|
18317
|
+
(o || (o = [r])).push(al(a, e, n, !1));
|
|
18318
18318
|
}
|
|
18319
18319
|
}
|
|
18320
18320
|
return o ? xD(o) : r;
|
|
@@ -20274,7 +20274,7 @@ function ED(t) {
|
|
|
20274
20274
|
let l = i.length - 1, c = i[l];
|
|
20275
20275
|
if (!c)
|
|
20276
20276
|
throw new RangeError("Invalid path: " + o);
|
|
20277
|
-
let u = new
|
|
20277
|
+
let u = new ll(r, s, l > 0 ? i.slice(0, l) : null);
|
|
20278
20278
|
e[c] = u.sort(e[c]);
|
|
20279
20279
|
}
|
|
20280
20280
|
}
|
|
@@ -20286,13 +20286,13 @@ const SD = new Qe({
|
|
|
20286
20286
|
for (; t || e; ) {
|
|
20287
20287
|
if (!t || e && t.depth >= e.depth ? (o = e, e = e.next) : (o = t, t = t.next), n && n.mode == o.mode && !o.context && !n.context)
|
|
20288
20288
|
continue;
|
|
20289
|
-
let i = new
|
|
20289
|
+
let i = new ll(o.tags, o.mode, o.context);
|
|
20290
20290
|
n ? n.next = i : r = i, n = i;
|
|
20291
20291
|
}
|
|
20292
20292
|
return r;
|
|
20293
20293
|
}
|
|
20294
20294
|
});
|
|
20295
|
-
class
|
|
20295
|
+
class ll {
|
|
20296
20296
|
constructor(e, n, r, o) {
|
|
20297
20297
|
this.tags = e, this.mode = n, this.context = r, this.next = o;
|
|
20298
20298
|
}
|
|
@@ -20309,7 +20309,7 @@ class al {
|
|
|
20309
20309
|
return this.context ? this.context.length : 0;
|
|
20310
20310
|
}
|
|
20311
20311
|
}
|
|
20312
|
-
|
|
20312
|
+
ll.empty = new ll([], 2, null);
|
|
20313
20313
|
function DD(t, e) {
|
|
20314
20314
|
let n = /* @__PURE__ */ Object.create(null);
|
|
20315
20315
|
for (let i of t)
|
|
@@ -20362,7 +20362,7 @@ class v8 {
|
|
|
20362
20362
|
if (a >= r || l <= n)
|
|
20363
20363
|
return;
|
|
20364
20364
|
s.isTop && (i = this.highlighters.filter((h) => !h.scope || h.scope(s)));
|
|
20365
|
-
let c = o, u = y8(e) ||
|
|
20365
|
+
let c = o, u = y8(e) || ll.empty, d = g8(i, u.tags);
|
|
20366
20366
|
if (d && (c && (c += " "), c += d, u.mode == 1 && (o += (o ? " " : "") + d)), this.startSpan(Math.max(n, a), c), u.opaque)
|
|
20367
20367
|
return;
|
|
20368
20368
|
let f = e.tree && e.tree.prop(Qe.mounted);
|
|
@@ -20397,7 +20397,7 @@ function y8(t) {
|
|
|
20397
20397
|
e = e.next;
|
|
20398
20398
|
return e || null;
|
|
20399
20399
|
}
|
|
20400
|
-
const ke = cr.define, xc = ke(), Vo = ke(), gb = ke(Vo), wb = ke(Vo), Wo = ke(), kc = ke(Wo), vh = ke(Wo), Xr = ke(), wi = ke(Xr), Wr = ke(), Ur = ke(), Um = ke(),
|
|
20400
|
+
const ke = cr.define, xc = ke(), Vo = ke(), gb = ke(Vo), wb = ke(Vo), Wo = ke(), kc = ke(Wo), vh = ke(Wo), Xr = ke(), wi = ke(Xr), Wr = ke(), Ur = ke(), Um = ke(), ba = ke(Um), Ec = ke(), $ = {
|
|
20401
20401
|
/**
|
|
20402
20402
|
A comment.
|
|
20403
20403
|
*/
|
|
@@ -20601,27 +20601,27 @@ const ke = cr.define, xc = ke(), Vo = ke(), gb = ke(Vo), wb = ke(Vo), Wo = ke(),
|
|
|
20601
20601
|
/**
|
|
20602
20602
|
Bracket-style [punctuation](#highlight.tags.punctuation).
|
|
20603
20603
|
*/
|
|
20604
|
-
bracket:
|
|
20604
|
+
bracket: ba,
|
|
20605
20605
|
/**
|
|
20606
20606
|
Angle [brackets](#highlight.tags.bracket) (usually `<` and `>`
|
|
20607
20607
|
tokens).
|
|
20608
20608
|
*/
|
|
20609
|
-
angleBracket: ke(
|
|
20609
|
+
angleBracket: ke(ba),
|
|
20610
20610
|
/**
|
|
20611
20611
|
Square [brackets](#highlight.tags.bracket) (usually `[` and `]`
|
|
20612
20612
|
tokens).
|
|
20613
20613
|
*/
|
|
20614
|
-
squareBracket: ke(
|
|
20614
|
+
squareBracket: ke(ba),
|
|
20615
20615
|
/**
|
|
20616
20616
|
Parentheses (usually `(` and `)` tokens). Subtag of
|
|
20617
20617
|
[bracket](#highlight.tags.bracket).
|
|
20618
20618
|
*/
|
|
20619
|
-
paren: ke(
|
|
20619
|
+
paren: ke(ba),
|
|
20620
20620
|
/**
|
|
20621
20621
|
Braces (usually `{` and `}` tokens). Subtag of
|
|
20622
20622
|
[bracket](#highlight.tags.bracket).
|
|
20623
20623
|
*/
|
|
20624
|
-
brace: ke(
|
|
20624
|
+
brace: ke(ba),
|
|
20625
20625
|
/**
|
|
20626
20626
|
Content, for example plain text in XML or markup documents.
|
|
20627
20627
|
*/
|
|
@@ -20958,7 +20958,7 @@ let ct = class TD {
|
|
|
20958
20958
|
return !0;
|
|
20959
20959
|
if (e.length != this.length || e.lines != this.lines)
|
|
20960
20960
|
return !1;
|
|
20961
|
-
let n = this.scanIdentical(e, 1), r = this.length - this.scanIdentical(e, -1), o = new
|
|
20961
|
+
let n = this.scanIdentical(e, 1), r = this.length - this.scanIdentical(e, -1), o = new $a(this), i = new $a(e);
|
|
20962
20962
|
for (let s = n, a = n; ; ) {
|
|
20963
20963
|
if (o.next(s), i.next(s), s = 0, o.lineBreak != i.lineBreak || o.done != i.done || o.value != i.value)
|
|
20964
20964
|
return !1;
|
|
@@ -20972,7 +20972,7 @@ let ct = class TD {
|
|
|
20972
20972
|
them as separate strings.
|
|
20973
20973
|
*/
|
|
20974
20974
|
iter(e = 1) {
|
|
20975
|
-
return new
|
|
20975
|
+
return new $a(this, e);
|
|
20976
20976
|
}
|
|
20977
20977
|
/**
|
|
20978
20978
|
Iterate over a range of the text. When `from` > `to`, the
|
|
@@ -21204,7 +21204,7 @@ function gu(t, e, n = 0, r = 1e9) {
|
|
|
21204
21204
|
function Cb(t, e, n) {
|
|
21205
21205
|
return gu(t, [""], e, n);
|
|
21206
21206
|
}
|
|
21207
|
-
class
|
|
21207
|
+
class $a {
|
|
21208
21208
|
constructor(e, n = 1) {
|
|
21209
21209
|
this.dir = n, this.done = !1, this.lineBreak = !1, this.value = "", this.nodes = [e], this.offsets = [n > 0 ? 1 : (e instanceof $t ? e.text.length : e.children.length) << 1];
|
|
21210
21210
|
}
|
|
@@ -21237,7 +21237,7 @@ class La {
|
|
|
21237
21237
|
}
|
|
21238
21238
|
class BD {
|
|
21239
21239
|
constructor(e, n, r) {
|
|
21240
|
-
this.value = "", this.done = !1, this.cursor = new
|
|
21240
|
+
this.value = "", this.done = !1, this.cursor = new $a(e, n > r ? -1 : 1), this.pos = n > r ? e.length : 0, this.from = Math.min(n, r), this.to = Math.max(n, r);
|
|
21241
21241
|
}
|
|
21242
21242
|
nextInner(e, n) {
|
|
21243
21243
|
if (n < 0 ? this.pos <= this.from : this.pos >= this.to)
|
|
@@ -21269,7 +21269,7 @@ class ID {
|
|
|
21269
21269
|
}
|
|
21270
21270
|
typeof Symbol < "u" && (ct.prototype[Symbol.iterator] = function() {
|
|
21271
21271
|
return this.iter();
|
|
21272
|
-
},
|
|
21272
|
+
}, $a.prototype[Symbol.iterator] = BD.prototype[Symbol.iterator] = ID.prototype[Symbol.iterator] = function() {
|
|
21273
21273
|
return this;
|
|
21274
21274
|
});
|
|
21275
21275
|
class D8 {
|
|
@@ -21560,7 +21560,7 @@ class Xt extends ro {
|
|
|
21560
21560
|
@internal
|
|
21561
21561
|
*/
|
|
21562
21562
|
filter(e) {
|
|
21563
|
-
let n = [], r = [], o = [], i = new
|
|
21563
|
+
let n = [], r = [], o = [], i = new cl(this);
|
|
21564
21564
|
e: for (let s = 0, a = 0; ; ) {
|
|
21565
21565
|
let l = s == e.length ? 1e9 : e[s++];
|
|
21566
21566
|
for (; a < l || a == l && i.len == 0; ) {
|
|
@@ -21700,7 +21700,7 @@ function Km(t, e, n) {
|
|
|
21700
21700
|
}
|
|
21701
21701
|
}
|
|
21702
21702
|
function Xm(t, e, n, r = !1) {
|
|
21703
|
-
let o = [], i = r ? [] : null, s = new
|
|
21703
|
+
let o = [], i = r ? [] : null, s = new cl(t), a = new cl(e);
|
|
21704
21704
|
for (let l = -1; ; ) {
|
|
21705
21705
|
if (s.done && a.len || a.done && s.len)
|
|
21706
21706
|
throw new Error("Mismatched change set lengths");
|
|
@@ -21733,7 +21733,7 @@ function Xm(t, e, n, r = !1) {
|
|
|
21733
21733
|
}
|
|
21734
21734
|
}
|
|
21735
21735
|
function FD(t, e, n = !1) {
|
|
21736
|
-
let r = [], o = n ? [] : null, i = new
|
|
21736
|
+
let r = [], o = n ? [] : null, i = new cl(t), s = new cl(e);
|
|
21737
21737
|
for (let a = !1; ; ) {
|
|
21738
21738
|
if (i.done && s.done)
|
|
21739
21739
|
return o ? Xt.createSet(r, o) : ro.create(r);
|
|
@@ -21755,7 +21755,7 @@ function FD(t, e, n = !1) {
|
|
|
21755
21755
|
}
|
|
21756
21756
|
}
|
|
21757
21757
|
}
|
|
21758
|
-
class
|
|
21758
|
+
class cl {
|
|
21759
21759
|
constructor(e) {
|
|
21760
21760
|
this.set = e, this.i = 0, this.next();
|
|
21761
21761
|
}
|
|
@@ -22104,7 +22104,7 @@ function xb(t, e, n) {
|
|
|
22104
22104
|
function Ym(t, e) {
|
|
22105
22105
|
let n = !1;
|
|
22106
22106
|
for (let r of e)
|
|
22107
|
-
|
|
22107
|
+
Ha(t, r) & 1 && (n = !0);
|
|
22108
22108
|
return n;
|
|
22109
22109
|
}
|
|
22110
22110
|
function _8(t, e, n) {
|
|
@@ -22124,7 +22124,7 @@ function _8(t, e, n) {
|
|
|
22124
22124
|
return {
|
|
22125
22125
|
create(l) {
|
|
22126
22126
|
for (let c of r)
|
|
22127
|
-
|
|
22127
|
+
Ha(l, c);
|
|
22128
22128
|
return l.values[s] = a(l), 1;
|
|
22129
22129
|
},
|
|
22130
22130
|
update(l, c) {
|
|
@@ -22193,7 +22193,7 @@ class on {
|
|
|
22193
22193
|
}
|
|
22194
22194
|
}
|
|
22195
22195
|
const xi = { lowest: 4, low: 3, default: 2, high: 1, highest: 0 };
|
|
22196
|
-
function
|
|
22196
|
+
function Ca(t) {
|
|
22197
22197
|
return (e) => new MD(e, t);
|
|
22198
22198
|
}
|
|
22199
22199
|
const ui = {
|
|
@@ -22201,26 +22201,26 @@ const ui = {
|
|
|
22201
22201
|
The highest precedence level, for extensions that should end up
|
|
22202
22202
|
near the start of the precedence ordering.
|
|
22203
22203
|
*/
|
|
22204
|
-
highest: /* @__PURE__ */
|
|
22204
|
+
highest: /* @__PURE__ */ Ca(xi.highest),
|
|
22205
22205
|
/**
|
|
22206
22206
|
A higher-than-default precedence, for extensions that should
|
|
22207
22207
|
come before those with default precedence.
|
|
22208
22208
|
*/
|
|
22209
|
-
high: /* @__PURE__ */
|
|
22209
|
+
high: /* @__PURE__ */ Ca(xi.high),
|
|
22210
22210
|
/**
|
|
22211
22211
|
The default precedence, which is also used for extensions
|
|
22212
22212
|
without an explicit precedence.
|
|
22213
22213
|
*/
|
|
22214
|
-
default: /* @__PURE__ */
|
|
22214
|
+
default: /* @__PURE__ */ Ca(xi.default),
|
|
22215
22215
|
/**
|
|
22216
22216
|
A lower-than-default precedence.
|
|
22217
22217
|
*/
|
|
22218
|
-
low: /* @__PURE__ */
|
|
22218
|
+
low: /* @__PURE__ */ Ca(xi.low),
|
|
22219
22219
|
/**
|
|
22220
22220
|
The lowest precedence level. Meant for things that should end up
|
|
22221
22221
|
near the end of the extension order.
|
|
22222
22222
|
*/
|
|
22223
|
-
lowest: /* @__PURE__ */
|
|
22223
|
+
lowest: /* @__PURE__ */ Ca(xi.lowest)
|
|
22224
22224
|
};
|
|
22225
22225
|
class MD {
|
|
22226
22226
|
constructor(e, n) {
|
|
@@ -22330,7 +22330,7 @@ function N8(t, e, n) {
|
|
|
22330
22330
|
}
|
|
22331
22331
|
return i(t, xi.default), r.reduce((s, a) => s.concat(a));
|
|
22332
22332
|
}
|
|
22333
|
-
function
|
|
22333
|
+
function Ha(t, e) {
|
|
22334
22334
|
if (e & 1)
|
|
22335
22335
|
return 2;
|
|
22336
22336
|
let n = e >> 1, r = t.status[n];
|
|
@@ -22636,7 +22636,7 @@ class st {
|
|
|
22636
22636
|
constructor(e, n, r, o, i, s) {
|
|
22637
22637
|
this.config = e, this.doc = n, this.selection = r, this.values = o, this.status = e.statusTemplate.slice(), this.computeSlot = i, s && (s._state = this);
|
|
22638
22638
|
for (let a = 0; a < this.config.dynamicSlots.length; a++)
|
|
22639
|
-
|
|
22639
|
+
Ha(this, a << 1);
|
|
22640
22640
|
this.computeSlot = null;
|
|
22641
22641
|
}
|
|
22642
22642
|
field(e, n = !0) {
|
|
@@ -22646,7 +22646,7 @@ class st {
|
|
|
22646
22646
|
throw new RangeError("Field is not present in this state");
|
|
22647
22647
|
return;
|
|
22648
22648
|
}
|
|
22649
|
-
return
|
|
22649
|
+
return Ha(this, r), Qu(this, r);
|
|
22650
22650
|
}
|
|
22651
22651
|
/**
|
|
22652
22652
|
Create a [transaction](https://codemirror.net/6/docs/ref/#state.Transaction) that updates this
|
|
@@ -22741,7 +22741,7 @@ class st {
|
|
|
22741
22741
|
*/
|
|
22742
22742
|
facet(e) {
|
|
22743
22743
|
let n = this.config.address[e.id];
|
|
22744
|
-
return n == null ? e.default : (
|
|
22744
|
+
return n == null ? e.default : (Ha(this, n), Qu(this, n));
|
|
22745
22745
|
}
|
|
22746
22746
|
/**
|
|
22747
22747
|
Convert this state to a JSON-serializable object. When custom
|
|
@@ -22947,7 +22947,7 @@ class ri {
|
|
|
22947
22947
|
Create a [range](https://codemirror.net/6/docs/ref/#state.Range) with this value.
|
|
22948
22948
|
*/
|
|
22949
22949
|
range(e, n = e) {
|
|
22950
|
-
return
|
|
22950
|
+
return ul.create(e, n, this);
|
|
22951
22951
|
}
|
|
22952
22952
|
}
|
|
22953
22953
|
ri.prototype.startSide = ri.prototype.endSide = 0;
|
|
@@ -22956,7 +22956,7 @@ ri.prototype.mapMode = dn.TrackDel;
|
|
|
22956
22956
|
function Mw(t, e) {
|
|
22957
22957
|
return t == e || t.constructor == e.constructor && t.eq(e);
|
|
22958
22958
|
}
|
|
22959
|
-
class
|
|
22959
|
+
class ul {
|
|
22960
22960
|
constructor(e, n, r) {
|
|
22961
22961
|
this.from = e, this.to = n, this.value = r;
|
|
22962
22962
|
}
|
|
@@ -22964,7 +22964,7 @@ class cl {
|
|
|
22964
22964
|
@internal
|
|
22965
22965
|
*/
|
|
22966
22966
|
static create(e, n, r) {
|
|
22967
|
-
return new
|
|
22967
|
+
return new ul(e, n, r);
|
|
22968
22968
|
}
|
|
22969
22969
|
}
|
|
22970
22970
|
function tg(t, e) {
|
|
@@ -23064,7 +23064,7 @@ class tt {
|
|
|
23064
23064
|
if (l < n.length && (a.from - n[l].from || a.startSide - n[l].value.startSide) >= 0) {
|
|
23065
23065
|
let d = n[l++];
|
|
23066
23066
|
u.addInner(d.from, d.to, d.value) || c.push(d);
|
|
23067
|
-
} else a.rangeIndex == 1 && a.chunkIndex < this.chunk.length && (l == n.length || this.chunkEnd(a.chunkIndex) < n[l].from) && (!s || o > this.chunkEnd(a.chunkIndex) || i < this.chunkPos[a.chunkIndex]) && u.addChunk(this.chunkPos[a.chunkIndex], this.chunk[a.chunkIndex]) ? a.nextChunk() : ((!s || o > a.to || i < a.from || s(a.from, a.to, a.value)) && (u.addInner(a.from, a.to, a.value) || c.push(
|
|
23067
|
+
} else a.rangeIndex == 1 && a.chunkIndex < this.chunk.length && (l == n.length || this.chunkEnd(a.chunkIndex) < n[l].from) && (!s || o > this.chunkEnd(a.chunkIndex) || i < this.chunkPos[a.chunkIndex]) && u.addChunk(this.chunkPos[a.chunkIndex], this.chunk[a.chunkIndex]) ? a.nextChunk() : ((!s || o > a.to || i < a.from || s(a.from, a.to, a.value)) && (u.addInner(a.from, a.to, a.value) || c.push(ul.create(a.from, a.to, a.value))), a.next());
|
|
23068
23068
|
return u.finishInner(this.nextLayer.isEmpty && !c.length ? tt.empty : this.nextLayer.update({ add: c, filter: s, filterFrom: o, filterTo: i }));
|
|
23069
23069
|
}
|
|
23070
23070
|
/**
|
|
@@ -23107,7 +23107,7 @@ class tt {
|
|
|
23107
23107
|
ranges that end at or after `from`.
|
|
23108
23108
|
*/
|
|
23109
23109
|
iter(e = 0) {
|
|
23110
|
-
return
|
|
23110
|
+
return dl.from([this]).goto(e);
|
|
23111
23111
|
}
|
|
23112
23112
|
/**
|
|
23113
23113
|
@internal
|
|
@@ -23120,14 +23120,14 @@ class tt {
|
|
|
23120
23120
|
starting from `from`.
|
|
23121
23121
|
*/
|
|
23122
23122
|
static iter(e, n = 0) {
|
|
23123
|
-
return
|
|
23123
|
+
return dl.from(e).goto(n);
|
|
23124
23124
|
}
|
|
23125
23125
|
/**
|
|
23126
23126
|
Iterate over two groups of sets, calling methods on `comparator`
|
|
23127
23127
|
to notify it of possible differences.
|
|
23128
23128
|
*/
|
|
23129
23129
|
static compare(e, n, r, o, i = -1) {
|
|
23130
|
-
let s = e.filter((d) => d.maxPoint > 0 || !d.isEmpty && d.maxPoint >= i), a = n.filter((d) => d.maxPoint > 0 || !d.isEmpty && d.maxPoint >= i), l = kb(s, a, r), c = new
|
|
23130
|
+
let s = e.filter((d) => d.maxPoint > 0 || !d.isEmpty && d.maxPoint >= i), a = n.filter((d) => d.maxPoint > 0 || !d.isEmpty && d.maxPoint >= i), l = kb(s, a, r), c = new xa(s, l, i), u = new xa(a, l, i);
|
|
23131
23131
|
r.iterGaps((d, f, h) => Eb(c, d, u, f, h, o)), r.empty && r.length == 0 && Eb(c, 0, u, 0, 0, o);
|
|
23132
23132
|
}
|
|
23133
23133
|
/**
|
|
@@ -23141,7 +23141,7 @@ class tt {
|
|
|
23141
23141
|
return !1;
|
|
23142
23142
|
if (!i.length)
|
|
23143
23143
|
return !0;
|
|
23144
|
-
let a = kb(i, s), l = new
|
|
23144
|
+
let a = kb(i, s), l = new xa(i, a, 0).goto(r), c = new xa(s, a, 0).goto(r);
|
|
23145
23145
|
for (; ; ) {
|
|
23146
23146
|
if (l.to != c.to || !ng(l.active, c.active) || l.point && (!c.point || !Mw(l.point, c.point)))
|
|
23147
23147
|
return !1;
|
|
@@ -23158,7 +23158,7 @@ class tt {
|
|
|
23158
23158
|
of the iteration.
|
|
23159
23159
|
*/
|
|
23160
23160
|
static spans(e, n, r, o, i = -1) {
|
|
23161
|
-
let s = new
|
|
23161
|
+
let s = new xa(e, null, i).goto(n), a = n, l = s.openStart;
|
|
23162
23162
|
for (; ; ) {
|
|
23163
23163
|
let c = Math.min(s.to, r);
|
|
23164
23164
|
if (s.point) {
|
|
@@ -23179,7 +23179,7 @@ class tt {
|
|
|
23179
23179
|
*/
|
|
23180
23180
|
static of(e, n = !1) {
|
|
23181
23181
|
let r = new Io();
|
|
23182
|
-
for (let o of e instanceof
|
|
23182
|
+
for (let o of e instanceof ul ? [e] : n ? H8(e) : e)
|
|
23183
23183
|
r.add(o.from, o.to, o.value);
|
|
23184
23184
|
return r.finish();
|
|
23185
23185
|
}
|
|
@@ -23330,7 +23330,7 @@ class UD {
|
|
|
23330
23330
|
return this.from - e.from || this.startSide - e.startSide || this.rank - e.rank || this.to - e.to || this.endSide - e.endSide;
|
|
23331
23331
|
}
|
|
23332
23332
|
}
|
|
23333
|
-
class
|
|
23333
|
+
class dl {
|
|
23334
23334
|
constructor(e) {
|
|
23335
23335
|
this.heap = e;
|
|
23336
23336
|
}
|
|
@@ -23339,7 +23339,7 @@ class ul {
|
|
|
23339
23339
|
for (let i = 0; i < e.length; i++)
|
|
23340
23340
|
for (let s = e[i]; !s.isEmpty; s = s.nextLayer)
|
|
23341
23341
|
s.maxPoint >= r && o.push(new UD(s, n, r, i));
|
|
23342
|
-
return o.length == 1 ? o[0] : new
|
|
23342
|
+
return o.length == 1 ? o[0] : new dl(o);
|
|
23343
23343
|
}
|
|
23344
23344
|
get startSide() {
|
|
23345
23345
|
return this.value ? this.value.startSide : 0;
|
|
@@ -23378,9 +23378,9 @@ function bh(t, e) {
|
|
|
23378
23378
|
t[r] = n, t[e] = o, e = r;
|
|
23379
23379
|
}
|
|
23380
23380
|
}
|
|
23381
|
-
class
|
|
23381
|
+
class xa {
|
|
23382
23382
|
constructor(e, n, r) {
|
|
23383
|
-
this.minPoint = r, 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 =
|
|
23383
|
+
this.minPoint = r, 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 = dl.from(e, n, r);
|
|
23384
23384
|
}
|
|
23385
23385
|
goto(e, n = -1e9) {
|
|
23386
23386
|
return this.cursor.goto(e, n), this.active.length = this.activeTo.length = this.activeRank.length = 0, this.minActive = -1, this.to = e, this.endSide = n, this.openStart = -1, this.next(), this;
|
|
@@ -23488,7 +23488,7 @@ function Sb(t, e) {
|
|
|
23488
23488
|
(e[o] - r || t[o].endSide - t[n].endSide) < 0 && (n = o, r = e[o]);
|
|
23489
23489
|
return n;
|
|
23490
23490
|
}
|
|
23491
|
-
function
|
|
23491
|
+
function sa(t, e, n = t.length) {
|
|
23492
23492
|
let r = 0;
|
|
23493
23493
|
for (let o = 0; o < n && o < t.length; )
|
|
23494
23494
|
t.charCodeAt(o) == 9 ? (r += e - r % e, o++) : (r++, o = Qt(t, o));
|
|
@@ -23663,7 +23663,7 @@ var ii = {
|
|
|
23663
23663
|
220: "\\",
|
|
23664
23664
|
221: "]",
|
|
23665
23665
|
222: "'"
|
|
23666
|
-
},
|
|
23666
|
+
}, fl = {
|
|
23667
23667
|
48: ")",
|
|
23668
23668
|
49: "!",
|
|
23669
23669
|
50: "@",
|
|
@@ -23692,10 +23692,10 @@ var ii = {
|
|
|
23692
23692
|
for (var cn = 0; cn < 10; cn++) ii[48 + cn] = ii[96 + cn] = String(cn);
|
|
23693
23693
|
for (var cn = 1; cn <= 24; cn++) ii[cn + 111] = "F" + cn;
|
|
23694
23694
|
for (var cn = 65; cn <= 90; cn++)
|
|
23695
|
-
ii[cn] = String.fromCharCode(cn + 32),
|
|
23696
|
-
for (var Ch in ii)
|
|
23695
|
+
ii[cn] = String.fromCharCode(cn + 32), fl[cn] = String.fromCharCode(cn);
|
|
23696
|
+
for (var Ch in ii) fl.hasOwnProperty(Ch) || (fl[Ch] = ii[Ch]);
|
|
23697
23697
|
function W8(t) {
|
|
23698
|
-
var e = j8 && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || V8 && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ?
|
|
23698
|
+
var e = j8 && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || V8 && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? fl : ii)[t.keyCode] || t.key || "Unidentified";
|
|
23699
23699
|
return n == "Esc" && (n = "Escape"), n == "Del" && (n = "Delete"), n == "Left" && (n = "ArrowLeft"), n == "Up" && (n = "ArrowUp"), n == "Right" && (n = "ArrowRight"), n == "Down" && (n = "ArrowDown"), n;
|
|
23700
23700
|
}
|
|
23701
23701
|
function gt() {
|
|
@@ -24005,19 +24005,19 @@ function Ts(t, e, n, r = 0) {
|
|
|
24005
24005
|
let o = n.length - 1;
|
|
24006
24006
|
o >= 0 && n[o] + r >= t ? n[o] = Math.max(n[o], e) : n.push(t, e);
|
|
24007
24007
|
}
|
|
24008
|
-
class
|
|
24008
|
+
class hl extends ri {
|
|
24009
24009
|
constructor(e, n) {
|
|
24010
24010
|
super(), this.tagName = e, this.attributes = n;
|
|
24011
24011
|
}
|
|
24012
24012
|
eq(e) {
|
|
24013
|
-
return e == this || e instanceof
|
|
24013
|
+
return e == this || e instanceof hl && this.tagName == e.tagName && $w(this.attributes, e.attributes);
|
|
24014
24014
|
}
|
|
24015
24015
|
/**
|
|
24016
24016
|
Create a block wrapper object with the given tag name and
|
|
24017
24017
|
attributes.
|
|
24018
24018
|
*/
|
|
24019
24019
|
static create(e) {
|
|
24020
|
-
return new
|
|
24020
|
+
return new hl(e.tagName, e.attributes || Zu);
|
|
24021
24021
|
}
|
|
24022
24022
|
/**
|
|
24023
24023
|
Create a range set from the given block wrapper ranges.
|
|
@@ -24026,7 +24026,7 @@ class fl extends ri {
|
|
|
24026
24026
|
return tt.of(e, n);
|
|
24027
24027
|
}
|
|
24028
24028
|
}
|
|
24029
|
-
|
|
24029
|
+
hl.prototype.startSide = hl.prototype.endSide = -1;
|
|
24030
24030
|
function Us(t) {
|
|
24031
24031
|
let e;
|
|
24032
24032
|
return t.nodeType == 11 ? e = t.getSelection ? t : t.ownerDocument : e = t, e.getSelection();
|
|
@@ -24034,7 +24034,7 @@ function Us(t) {
|
|
|
24034
24034
|
function ug(t, e) {
|
|
24035
24035
|
return e ? t == e || t.contains(e.nodeType != 1 ? e.parentNode : e) : !1;
|
|
24036
24036
|
}
|
|
24037
|
-
function
|
|
24037
|
+
function za(t, e) {
|
|
24038
24038
|
if (!e.anchorNode)
|
|
24039
24039
|
return !1;
|
|
24040
24040
|
try {
|
|
@@ -24043,10 +24043,10 @@ function Ha(t, e) {
|
|
|
24043
24043
|
return !1;
|
|
24044
24044
|
}
|
|
24045
24045
|
}
|
|
24046
|
-
function
|
|
24047
|
-
return t.nodeType == 3 ?
|
|
24046
|
+
function ja(t) {
|
|
24047
|
+
return t.nodeType == 3 ? ml(t, 0, t.nodeValue.length).getClientRects() : t.nodeType == 1 ? t.getClientRects() : [];
|
|
24048
24048
|
}
|
|
24049
|
-
function
|
|
24049
|
+
function Va(t, e, n, r) {
|
|
24050
24050
|
return n ? Bb(t, e, n, r, -1) || Bb(t, e, n, r, 1) : !1;
|
|
24051
24051
|
}
|
|
24052
24052
|
function si(t) {
|
|
@@ -24079,7 +24079,7 @@ function Bb(t, e, n, r, o) {
|
|
|
24079
24079
|
function Fo(t) {
|
|
24080
24080
|
return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
|
|
24081
24081
|
}
|
|
24082
|
-
function
|
|
24082
|
+
function pl(t, e) {
|
|
24083
24083
|
let n = e ? t.left : t.right;
|
|
24084
24084
|
return { left: n, right: n, top: t.top, bottom: t.bottom };
|
|
24085
24085
|
}
|
|
@@ -24210,7 +24210,7 @@ function YD(t) {
|
|
|
24210
24210
|
}
|
|
24211
24211
|
}
|
|
24212
24212
|
let Ib;
|
|
24213
|
-
function
|
|
24213
|
+
function ml(t, e, n = e) {
|
|
24214
24214
|
let r = Ib || (Ib = document.createRange());
|
|
24215
24215
|
return r.setEnd(t, n), r.setStart(t, e), r;
|
|
24216
24216
|
}
|
|
@@ -24713,7 +24713,7 @@ function Uw(t) {
|
|
|
24713
24713
|
}
|
|
24714
24714
|
return { left: e, right: n, top: r, bottom: o };
|
|
24715
24715
|
}
|
|
24716
|
-
const
|
|
24716
|
+
const Sa = /* @__PURE__ */ De.define();
|
|
24717
24717
|
class dr {
|
|
24718
24718
|
constructor(e, n, r, o) {
|
|
24719
24719
|
this.fromA = e, this.toA = n, this.fromB = r, this.toB = o;
|
|
@@ -25095,7 +25095,7 @@ function f5(t) {
|
|
|
25095
25095
|
let e = t.dom.lastChild;
|
|
25096
25096
|
if (!e)
|
|
25097
25097
|
return t.dom.getBoundingClientRect();
|
|
25098
|
-
let n =
|
|
25098
|
+
let n = ja(e);
|
|
25099
25099
|
return n[n.length - 1] || null;
|
|
25100
25100
|
}
|
|
25101
25101
|
function h5(t, e) {
|
|
@@ -25132,11 +25132,11 @@ class Oi extends qt {
|
|
|
25132
25132
|
e > r && (e = r);
|
|
25133
25133
|
let o = e, i = e, s = 0;
|
|
25134
25134
|
e == 0 && n < 0 || e == r && n >= 0 ? Ae.chrome || Ae.gecko || (e ? (o--, s = 1) : i < r && (i++, s = -1)) : n < 0 ? o-- : i < r && i++;
|
|
25135
|
-
let a =
|
|
25135
|
+
let a = ml(this.dom, o, i).getClientRects();
|
|
25136
25136
|
if (!a.length)
|
|
25137
25137
|
return null;
|
|
25138
25138
|
let l = a[(s ? s < 0 : n >= 0) ? 0 : a.length - 1];
|
|
25139
|
-
return Ae.safari && !s && l.width == 0 && (l = Array.prototype.find.call(a, (c) => c.width) || l), s ?
|
|
25139
|
+
return Ae.safari && !s && l.width == 0 && (l = Array.prototype.find.call(a, (c) => c.width) || l), s ? pl(l, s < 0) : l || null;
|
|
25140
25140
|
}
|
|
25141
25141
|
static of(e, n) {
|
|
25142
25142
|
let r = new Oi(n || document.createTextNode(e), e);
|
|
@@ -25164,7 +25164,7 @@ class Gi extends qt {
|
|
|
25164
25164
|
if (o)
|
|
25165
25165
|
return o;
|
|
25166
25166
|
if (r)
|
|
25167
|
-
return
|
|
25167
|
+
return pl(this.dom.getBoundingClientRect(), this.length ? e == 0 : n <= 0);
|
|
25168
25168
|
{
|
|
25169
25169
|
let i = this.dom.getClientRects(), s = null;
|
|
25170
25170
|
if (!i.length)
|
|
@@ -25172,7 +25172,7 @@ class Gi extends qt {
|
|
|
25172
25172
|
let a = this.flags & 16 ? !0 : this.flags & 32 ? !1 : e > 0;
|
|
25173
25173
|
for (let l = a ? i.length - 1 : 0; s = i[l], !(e > 0 ? l == 0 : l == i.length - 1 || s.top < s.bottom); l += a ? -1 : 1)
|
|
25174
25174
|
;
|
|
25175
|
-
return
|
|
25175
|
+
return pl(s, !a);
|
|
25176
25176
|
}
|
|
25177
25177
|
}
|
|
25178
25178
|
get overrideDOMText() {
|
|
@@ -25727,7 +25727,7 @@ class Pb {
|
|
|
25727
25727
|
// Sync the DOM selection to this.state.selection
|
|
25728
25728
|
updateSelection(e = !1, n = !1) {
|
|
25729
25729
|
(e || !this.view.observer.selectionRange.focusNode) && this.view.observer.readSelectionRange();
|
|
25730
|
-
let { dom: r } = this.tile, o = this.view.root.activeElement, i = o == r, s = !i && !(this.view.state.facet(xo) || r.tabIndex > -1) &&
|
|
25730
|
+
let { dom: r } = this.tile, o = this.view.root.activeElement, i = o == r, s = !i && !(this.view.state.facet(xo) || r.tabIndex > -1) && za(r, this.view.observer.selectionRange) && !(o && r.contains(o));
|
|
25731
25731
|
if (!(i || n || s))
|
|
25732
25732
|
return;
|
|
25733
25733
|
let a = this.forceSelection;
|
|
@@ -25738,7 +25738,7 @@ class Pb {
|
|
|
25738
25738
|
this.view.observer.ignore(() => c.node.insertBefore(f, c.node.childNodes[c.offset] || null)), c = u = new Ar(f, 0), a = !0;
|
|
25739
25739
|
}
|
|
25740
25740
|
let d = this.view.observer.selectionRange;
|
|
25741
|
-
(a || !d.focusNode || (!
|
|
25741
|
+
(a || !d.focusNode || (!Va(c.node, c.offset, d.anchorNode, d.anchorOffset) || !Va(u.node, u.offset, d.focusNode, d.focusOffset)) && !this.suppressWidgetCursorChange(d, l)) && (this.view.observer.ignore(() => {
|
|
25742
25742
|
Ae.android && Ae.chrome && r.contains(d.focusNode) && N5(d.focusNode, r) && (r.blur(), r.focus({ preventScroll: !0 }));
|
|
25743
25743
|
let f = Us(this.view.root);
|
|
25744
25744
|
if (f) if (l.empty) {
|
|
@@ -25767,7 +25767,7 @@ class Pb {
|
|
|
25767
25767
|
// composition, avoid moving it across it and disrupting the
|
|
25768
25768
|
// composition.
|
|
25769
25769
|
suppressWidgetCursorChange(e, n) {
|
|
25770
|
-
return this.hasComposition && n.empty &&
|
|
25770
|
+
return this.hasComposition && n.empty && Va(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset) && this.posFromDOM(e.focusNode, e.focusOffset) == n.head;
|
|
25771
25771
|
}
|
|
25772
25772
|
enforceCursorAssoc() {
|
|
25773
25773
|
if (this.hasComposition)
|
|
@@ -25867,7 +25867,7 @@ class Pb {
|
|
|
25867
25867
|
let a = Qt(i.text, s);
|
|
25868
25868
|
if (a == s)
|
|
25869
25869
|
return null;
|
|
25870
|
-
let l =
|
|
25870
|
+
let l = ml(i.dom, s, a).getClientRects();
|
|
25871
25871
|
for (let c = 0; c < l.length; c++) {
|
|
25872
25872
|
let u = l[c];
|
|
25873
25873
|
if (c == l.length - 1 || u.top < u.bottom && u.left < u.right)
|
|
@@ -25885,7 +25885,7 @@ class Pb {
|
|
|
25885
25885
|
if (h && !m && (c += y.top - h.top), w instanceof Jo)
|
|
25886
25886
|
v > r && u(w, f, y);
|
|
25887
25887
|
else if (f >= r && (c > 0 && n.push(-c), n.push(g + c), c = 0, s)) {
|
|
25888
|
-
let C = w.dom.lastChild, E = C ?
|
|
25888
|
+
let C = w.dom.lastChild, E = C ? ja(C) : [];
|
|
25889
25889
|
if (E.length) {
|
|
25890
25890
|
let b = E[E.length - 1], k = l ? b.right - y.left : y.right - b.left;
|
|
25891
25891
|
k > a && (a = k, this.minWidth = i, this.minWidthFrom = f, this.minWidthTo = v);
|
|
@@ -25907,7 +25907,7 @@ class Pb {
|
|
|
25907
25907
|
for (let c of s.children) {
|
|
25908
25908
|
if (!c.isText() || /[^ -~]/.test(c.text))
|
|
25909
25909
|
return;
|
|
25910
|
-
let u =
|
|
25910
|
+
let u = ja(c.dom);
|
|
25911
25911
|
if (u.length != 1)
|
|
25912
25912
|
return;
|
|
25913
25913
|
a += u[0].width, l = u[0].height;
|
|
@@ -25925,7 +25925,7 @@ class Pb {
|
|
|
25925
25925
|
let n = document.createElement("div"), r, o, i;
|
|
25926
25926
|
return n.className = "cm-line", n.style.width = "99999px", n.style.position = "absolute", n.textContent = "abc def ghi jkl mno pqr stu", this.view.observer.ignore(() => {
|
|
25927
25927
|
this.tile.dom.appendChild(n);
|
|
25928
|
-
let s =
|
|
25928
|
+
let s = ja(n.firstChild)[0];
|
|
25929
25929
|
r = n.getBoundingClientRect().height, o = s && s.width ? s.width / 27 : 7, i = s && s.height ? s.height : r, n.remove();
|
|
25930
25930
|
}), { lineHeight: r, charWidth: o, textHeight: i };
|
|
25931
25931
|
}
|
|
@@ -26216,7 +26216,7 @@ function M5(t, e, n, r) {
|
|
|
26216
26216
|
let d = l.left + s, f = r ?? t.viewState.heightOracle.textHeight >> 1, h = wg(t, { x: d, y: a + f * i }, !1, i);
|
|
26217
26217
|
return fe.cursor(h.pos, h.assoc, void 0, s);
|
|
26218
26218
|
}
|
|
26219
|
-
function
|
|
26219
|
+
function Wa(t, e, n) {
|
|
26220
26220
|
for (; ; ) {
|
|
26221
26221
|
let r = 0;
|
|
26222
26222
|
for (let o of t)
|
|
@@ -26235,10 +26235,10 @@ function CA(t, e) {
|
|
|
26235
26235
|
for (let r = 0; r < e.ranges.length; r++) {
|
|
26236
26236
|
let o = e.ranges[r], i = null;
|
|
26237
26237
|
if (o.empty) {
|
|
26238
|
-
let s =
|
|
26238
|
+
let s = Wa(t, o.from, 0);
|
|
26239
26239
|
s != o.from && (i = fe.cursor(s, -1));
|
|
26240
26240
|
} else {
|
|
26241
|
-
let s =
|
|
26241
|
+
let s = Wa(t, o.from, -1), a = Wa(t, o.to, 1);
|
|
26242
26242
|
(s != o.from || a != o.to) && (i = fe.range(o.from == o.anchor ? s : a, o.from == o.head ? s : a));
|
|
26243
26243
|
}
|
|
26244
26244
|
i && (n || (n = e.ranges.slice()), n[r] = i);
|
|
@@ -26246,7 +26246,7 @@ function CA(t, e) {
|
|
|
26246
26246
|
return n ? fe.create(n, e.mainIndex) : e;
|
|
26247
26247
|
}
|
|
26248
26248
|
function Ah(t, e, n) {
|
|
26249
|
-
let r =
|
|
26249
|
+
let r = Wa(t.state.facet(Wl).map((o) => o(t)), n.from, e.head > n.from ? -1 : 1);
|
|
26250
26250
|
return r == n.from ? n : fe.cursor(r, r < n.from ? 1 : -1);
|
|
26251
26251
|
}
|
|
26252
26252
|
class Zr {
|
|
@@ -26297,7 +26297,7 @@ function xA(t, e, n, r, o) {
|
|
|
26297
26297
|
if (e.isText()) {
|
|
26298
26298
|
for (let h = 0; h < e.length; ) {
|
|
26299
26299
|
let m = Qt(e.text, h);
|
|
26300
|
-
if (d(
|
|
26300
|
+
if (d(ml(e.dom, h, m).getClientRects(), h), !a && !l)
|
|
26301
26301
|
break;
|
|
26302
26302
|
h = m;
|
|
26303
26303
|
}
|
|
@@ -26309,7 +26309,7 @@ function xA(t, e, n, r, o) {
|
|
|
26309
26309
|
let v = e.children[w];
|
|
26310
26310
|
if (v.flags & 48)
|
|
26311
26311
|
continue;
|
|
26312
|
-
let y = (v.dom.nodeType == 1 ? v.dom :
|
|
26312
|
+
let y = (v.dom.nodeType == 1 ? v.dom : ml(v.dom, 0, v.length)).getClientRects();
|
|
26313
26313
|
if (d(y, w), !a && !l)
|
|
26314
26314
|
break;
|
|
26315
26315
|
}
|
|
@@ -26321,7 +26321,7 @@ function $b(t, e) {
|
|
|
26321
26321
|
let n = t.state.doc.lineAt(e);
|
|
26322
26322
|
return t.bidiSpans(n)[Do.find(t.bidiSpans(n), e - n.from, -1, 1)].dir;
|
|
26323
26323
|
}
|
|
26324
|
-
const
|
|
26324
|
+
const Da = "";
|
|
26325
26325
|
class P5 {
|
|
26326
26326
|
constructor(e, n) {
|
|
26327
26327
|
this.points = e, this.view = n, this.text = "", this.lineSeparator = n.state.facet(st.lineSeparator);
|
|
@@ -26330,7 +26330,7 @@ class P5 {
|
|
|
26330
26330
|
this.text += e;
|
|
26331
26331
|
}
|
|
26332
26332
|
lineBreak() {
|
|
26333
|
-
this.text +=
|
|
26333
|
+
this.text += Da;
|
|
26334
26334
|
}
|
|
26335
26335
|
readRange(e, n) {
|
|
26336
26336
|
if (!e)
|
|
@@ -26456,11 +26456,11 @@ function EA(t, e) {
|
|
|
26456
26456
|
if (e.bounds) {
|
|
26457
26457
|
let { from: s, to: a } = e.bounds, l = o.from, c = null;
|
|
26458
26458
|
(i === 8 || Ae.android && e.text.length < a - s) && (l = o.to, c = "end");
|
|
26459
|
-
let u = SA(t.state.doc.sliceString(s, a,
|
|
26460
|
-
u && (Ae.chrome && i == 13 && u.toB == u.from + 2 && e.text.slice(u.from, u.toB) ==
|
|
26459
|
+
let u = SA(t.state.doc.sliceString(s, a, Da), e.text, l - s, c);
|
|
26460
|
+
u && (Ae.chrome && i == 13 && u.toB == u.from + 2 && e.text.slice(u.from, u.toB) == Da + Da && u.toB--, n = {
|
|
26461
26461
|
from: s + u.from,
|
|
26462
26462
|
to: s + u.toA,
|
|
26463
|
-
insert: ct.of(e.text.slice(u.from, u.toB).split(
|
|
26463
|
+
insert: ct.of(e.text.slice(u.from, u.toB).split(Da))
|
|
26464
26464
|
});
|
|
26465
26465
|
} else r && (!t.hasFocus && t.state.facet(xo) || od(r, o)) && (r = null);
|
|
26466
26466
|
if (!n && !r)
|
|
@@ -26498,7 +26498,7 @@ function qw(t, e, n, r = -1) {
|
|
|
26498
26498
|
function z5(t, e, n) {
|
|
26499
26499
|
let r, o = t.state, i = o.selection.main, s = -1;
|
|
26500
26500
|
if (e.from == e.to && e.from < i.from || e.from > i.to) {
|
|
26501
|
-
let l = e.from < i.from ? -1 : 1, c = l < 0 ? i.from : i.to, u =
|
|
26501
|
+
let l = e.from < i.from ? -1 : 1, c = l < 0 ? i.from : i.to, u = Wa(o.facet(Wl).map((d) => d(t)), c, l);
|
|
26502
26502
|
e.from == u && (s = u);
|
|
26503
26503
|
}
|
|
26504
26504
|
if (s > -1)
|
|
@@ -26963,7 +26963,7 @@ function o$(t) {
|
|
|
26963
26963
|
let vg = null;
|
|
26964
26964
|
Ir.copy = Ir.cut = (t, e) => {
|
|
26965
26965
|
let n = Us(t.root);
|
|
26966
|
-
if (n && !
|
|
26966
|
+
if (n && !za(t.contentDOM, n))
|
|
26967
26967
|
return !1;
|
|
26968
26968
|
let { text: r, ranges: o, linewise: i } = o$(t.state);
|
|
26969
26969
|
if (!r && !i)
|
|
@@ -27594,7 +27594,7 @@ class Jb {
|
|
|
27594
27594
|
}
|
|
27595
27595
|
updateViewportLines() {
|
|
27596
27596
|
this.viewportLines = [], this.heightMap.forEachLine(this.viewport.from, this.viewport.to, this.heightOracle.setDoc(this.state.doc), 0, 0, (e) => {
|
|
27597
|
-
this.viewportLines.push(
|
|
27597
|
+
this.viewportLines.push(Aa(e, this.scaler));
|
|
27598
27598
|
});
|
|
27599
27599
|
}
|
|
27600
27600
|
update(e, n = null) {
|
|
@@ -27783,17 +27783,17 @@ class Jb {
|
|
|
27783
27783
|
return this.visibleRanges = r, o;
|
|
27784
27784
|
}
|
|
27785
27785
|
lineBlockAt(e) {
|
|
27786
|
-
return e >= this.viewport.from && e <= this.viewport.to && this.viewportLines.find((n) => n.from <= e && n.to >= e) ||
|
|
27786
|
+
return e >= this.viewport.from && e <= this.viewport.to && this.viewportLines.find((n) => n.from <= e && n.to >= e) || Aa(this.heightMap.lineAt(e, xt.ByPos, this.heightOracle, 0, 0), this.scaler);
|
|
27787
27787
|
}
|
|
27788
27788
|
lineBlockAtHeight(e) {
|
|
27789
|
-
return e >= this.viewportLines[0].top && e <= this.viewportLines[this.viewportLines.length - 1].bottom && this.viewportLines.find((n) => n.top <= e && n.bottom >= e) ||
|
|
27789
|
+
return e >= this.viewportLines[0].top && e <= this.viewportLines[this.viewportLines.length - 1].bottom && this.viewportLines.find((n) => n.top <= e && n.bottom >= e) || Aa(this.heightMap.lineAt(this.scaler.fromDOM(e), xt.ByHeight, this.heightOracle, 0, 0), this.scaler);
|
|
27790
27790
|
}
|
|
27791
27791
|
scrollAnchorAt(e) {
|
|
27792
27792
|
let n = this.lineBlockAtHeight(e + 8);
|
|
27793
27793
|
return n.from >= this.viewport.from || this.viewportLines[0].top - e > 200 ? n : this.viewportLines[0];
|
|
27794
27794
|
}
|
|
27795
27795
|
elementAtHeight(e) {
|
|
27796
|
-
return
|
|
27796
|
+
return Aa(this.heightMap.blockAt(this.scaler.fromDOM(e), this.heightOracle, 0, 0), this.scaler);
|
|
27797
27797
|
}
|
|
27798
27798
|
get docHeight() {
|
|
27799
27799
|
return this.scaler.toDOM(this.heightMap.height);
|
|
@@ -27896,11 +27896,11 @@ class Kw {
|
|
|
27896
27896
|
return e instanceof Kw ? this.scale == e.scale && this.viewports.length == e.viewports.length && this.viewports.every((n, r) => n.from == e.viewports[r].from && n.to == e.viewports[r].to) : !1;
|
|
27897
27897
|
}
|
|
27898
27898
|
}
|
|
27899
|
-
function
|
|
27899
|
+
function Aa(t, e) {
|
|
27900
27900
|
if (e.scale == 1)
|
|
27901
27901
|
return t;
|
|
27902
27902
|
let n = e.toDOM(t.top), r = e.toDOM(t.bottom);
|
|
27903
|
-
return new Sr(t.from, t.length, n, r - n, Array.isArray(t._content) ? t._content.map((o) =>
|
|
27903
|
+
return new Sr(t.from, t.length, n, r - n, Array.isArray(t._content) ? t._content.map((o) => Aa(o, e)) : t._content);
|
|
27904
27904
|
}
|
|
27905
27905
|
const Fc = /* @__PURE__ */ De.define({ combine: (t) => t.join(" ") }), yg = /* @__PURE__ */ De.define({ combine: (t) => t.indexOf(!0) > -1 }), bg = /* @__PURE__ */ oi.newName(), RA = /* @__PURE__ */ oi.newName(), MA = /* @__PURE__ */ oi.newName(), PA = { "&light": "." + RA, "&dark": "." + MA };
|
|
27906
27906
|
function Cg(t, e, n) {
|
|
@@ -28242,7 +28242,7 @@ class C$ {
|
|
|
28242
28242
|
if (!this.readSelectionRange() || this.delayedAndroidKey)
|
|
28243
28243
|
return;
|
|
28244
28244
|
let { view: r } = this, o = this.selectionRange;
|
|
28245
|
-
if (r.state.facet(xo) ? r.root.activeElement != this.dom : !
|
|
28245
|
+
if (r.state.facet(xo) ? r.root.activeElement != this.dom : !za(this.dom, o))
|
|
28246
28246
|
return;
|
|
28247
28247
|
let i = o.anchorNode && r.docView.tile.nearest(o.anchorNode);
|
|
28248
28248
|
if (i && i.isWidget() && i.widget.ignoreEvent(e)) {
|
|
@@ -28250,7 +28250,7 @@ class C$ {
|
|
|
28250
28250
|
return;
|
|
28251
28251
|
}
|
|
28252
28252
|
(Ae.ie && Ae.ie_version <= 11 || Ae.android && Ae.chrome) && !r.state.selection.main.empty && // (Selection.isCollapsed isn't reliable on IE)
|
|
28253
|
-
o.focusNode &&
|
|
28253
|
+
o.focusNode && Va(o.focusNode, o.focusOffset, o.anchorNode, o.anchorOffset) ? this.flushSoon() : this.flush(!1);
|
|
28254
28254
|
}
|
|
28255
28255
|
readSelectionRange() {
|
|
28256
28256
|
let { view: e } = this, n = Us(e.root);
|
|
@@ -28259,7 +28259,7 @@ class C$ {
|
|
|
28259
28259
|
let r = Ae.safari && e.root.nodeType == 11 && e.root.activeElement == this.dom && x$(this.view, n) || n;
|
|
28260
28260
|
if (!r || this.selectionRange.eq(r))
|
|
28261
28261
|
return !1;
|
|
28262
|
-
let o =
|
|
28262
|
+
let o = za(this.dom, r);
|
|
28263
28263
|
return o && !this.selectionChanged && e.inputState.lastFocusTime > Date.now() - 200 && e.inputState.lastTouchTime < Date.now() - 300 && e5(this.dom, r) ? (this.view.inputState.lastFocusTime = 0, e.docView.updateSelection(), !1) : (this.selectionRange.setRange(r), o && (this.selectionChanged = !0), !0);
|
|
28264
28264
|
}
|
|
28265
28265
|
setSelectionRange(e, n) {
|
|
@@ -28358,7 +28358,7 @@ class C$ {
|
|
|
28358
28358
|
return { from: n, to: r, typeOver: o };
|
|
28359
28359
|
}
|
|
28360
28360
|
readChange() {
|
|
28361
|
-
let { from: e, to: n, typeOver: r } = this.processRecords(), o = this.selectionChanged &&
|
|
28361
|
+
let { from: e, to: n, typeOver: r } = this.processRecords(), o = this.selectionChanged && za(this.dom, this.selectionRange);
|
|
28362
28362
|
if (e < 0 && !o)
|
|
28363
28363
|
return null;
|
|
28364
28364
|
e > -1 && (this.lastChange = Date.now()), this.view.inputState.lastFocusTime = 0, this.selectionChanged = !1;
|
|
@@ -28421,7 +28421,7 @@ function eC(t, e, n) {
|
|
|
28421
28421
|
}
|
|
28422
28422
|
function tC(t, e) {
|
|
28423
28423
|
let n = e.startContainer, r = e.startOffset, o = e.endContainer, i = e.endOffset, s = t.docView.domAtPos(t.state.selection.main.anchor, 1);
|
|
28424
|
-
return
|
|
28424
|
+
return Va(s.node, s.offset, o, i) && ([n, r, o, i] = [o, i, n, r]), { anchorNode: n, anchorOffset: r, focusNode: o, focusOffset: i };
|
|
28425
28425
|
}
|
|
28426
28426
|
function x$(t, e) {
|
|
28427
28427
|
if (e.getComposedRanges) {
|
|
@@ -28692,7 +28692,7 @@ class Ce {
|
|
|
28692
28692
|
for (let h of f.effects)
|
|
28693
28693
|
h.is(Oc) && (d = h.value.clip(this.state));
|
|
28694
28694
|
}
|
|
28695
|
-
this.viewState.update(o, d), this.bidiCache = sd.update(this.bidiCache, o.changes), o.empty || (this.updatePlugins(o), this.inputState.update(o)), n = this.docView.update(o), this.state.facet(
|
|
28695
|
+
this.viewState.update(o, d), this.bidiCache = sd.update(this.bidiCache, o.changes), o.empty || (this.updatePlugins(o), this.inputState.update(o)), n = this.docView.update(o), this.state.facet(Sa) != this.styleModules && this.mountStyles(), r = this.updateAttrs(), this.showAnnouncements(e), this.docView.updateSelection(n, e.some((f) => f.isUserEvent("select.pointer")));
|
|
28696
28696
|
} finally {
|
|
28697
28697
|
this.updateState = 0;
|
|
28698
28698
|
}
|
|
@@ -28878,7 +28878,7 @@ class Ce {
|
|
|
28878
28878
|
}
|
|
28879
28879
|
}
|
|
28880
28880
|
mountStyles() {
|
|
28881
|
-
this.styleModules = this.state.facet(
|
|
28881
|
+
this.styleModules = this.state.facet(Sa);
|
|
28882
28882
|
let e = this.state.facet(Ce.cspNonce);
|
|
28883
28883
|
oi.mount(this.root, this.styleModules.concat(y$).reverse(), e ? { nonce: e } : void 0);
|
|
28884
28884
|
}
|
|
@@ -29095,7 +29095,7 @@ class Ce {
|
|
|
29095
29095
|
if (!r || r.left == r.right)
|
|
29096
29096
|
return r;
|
|
29097
29097
|
let o = this.state.doc.lineAt(e), i = this.bidiSpans(o), s = i[Do.find(i, e - o.from, -1, n)];
|
|
29098
|
-
return
|
|
29098
|
+
return pl(r, s.dir == bt.LTR == n > 0);
|
|
29099
29099
|
}
|
|
29100
29100
|
/**
|
|
29101
29101
|
Return the rectangle around a given character. If `pos` does not
|
|
@@ -29287,7 +29287,7 @@ class Ce {
|
|
|
29287
29287
|
`&light` when a light theme is active).
|
|
29288
29288
|
*/
|
|
29289
29289
|
static theme(e, n) {
|
|
29290
|
-
let r = oi.newName(), o = [Fc.of(r),
|
|
29290
|
+
let r = oi.newName(), o = [Fc.of(r), Sa.of(Cg(`.${r}`, e))];
|
|
29291
29291
|
return n && n.dark && o.push(yg.of(!0)), o;
|
|
29292
29292
|
}
|
|
29293
29293
|
/**
|
|
@@ -29298,7 +29298,7 @@ class Ce {
|
|
|
29298
29298
|
target editors with a dark or light theme.
|
|
29299
29299
|
*/
|
|
29300
29300
|
static baseTheme(e) {
|
|
29301
|
-
return ui.lowest(
|
|
29301
|
+
return ui.lowest(Sa.of(Cg("." + bg, e, PA)));
|
|
29302
29302
|
}
|
|
29303
29303
|
/**
|
|
29304
29304
|
Retrieve an editor view instance from the view's DOM
|
|
@@ -29310,7 +29310,7 @@ class Ce {
|
|
|
29310
29310
|
return ((n = o == null ? void 0 : o.root) === null || n === void 0 ? void 0 : n.view) || null;
|
|
29311
29311
|
}
|
|
29312
29312
|
}
|
|
29313
|
-
Ce.styleModule =
|
|
29313
|
+
Ce.styleModule = Sa;
|
|
29314
29314
|
Ce.inputHandler = cA;
|
|
29315
29315
|
Ce.clipboardInputFilter = zw;
|
|
29316
29316
|
Ce.clipboardOutputFilter = jw;
|
|
@@ -29463,7 +29463,7 @@ function $A(t, e, n, r) {
|
|
|
29463
29463
|
}, h = t[r], m, w;
|
|
29464
29464
|
return h && (f(h[a + Rc(o, e, !s)]) ? l = !0 : s && (e.altKey || e.metaKey || e.ctrlKey) && // Ctrl-Alt may be used for AltGr on Windows
|
|
29465
29465
|
!(Ae.windows && e.ctrlKey && e.altKey) && // Alt-combinations on macOS tend to be typed characters
|
|
29466
|
-
!(Ae.mac && e.altKey && !(e.ctrlKey || e.metaKey)) && (m = ii[e.keyCode]) && m != o ? (f(h[a + Rc(m, e, !0)]) || e.shiftKey && (w =
|
|
29466
|
+
!(Ae.mac && e.altKey && !(e.ctrlKey || e.metaKey)) && (m = ii[e.keyCode]) && m != o ? (f(h[a + Rc(m, e, !0)]) || e.shiftKey && (w = fl[e.keyCode]) != o && w != m && f(h[a + Rc(w, e, !1)])) && (l = !0) : s && e.shiftKey && f(h[a + Rc(o, e, !0)]) && (l = !0), !l && f(h._any) && (l = !0)), c && (l = !0), l && u && e.stopPropagation(), xg = null, l;
|
|
29467
29467
|
}
|
|
29468
29468
|
class ql {
|
|
29469
29469
|
/**
|
|
@@ -29610,7 +29610,7 @@ function zA(t) {
|
|
|
29610
29610
|
yu.of(t)
|
|
29611
29611
|
];
|
|
29612
29612
|
}
|
|
29613
|
-
const
|
|
29613
|
+
const gl = /* @__PURE__ */ De.define({
|
|
29614
29614
|
combine(t) {
|
|
29615
29615
|
return uo(t, {
|
|
29616
29616
|
cursorBlinkRate: 1200,
|
|
@@ -29623,7 +29623,7 @@ const ml = /* @__PURE__ */ De.define({
|
|
|
29623
29623
|
});
|
|
29624
29624
|
function F$(t = {}) {
|
|
29625
29625
|
return [
|
|
29626
|
-
|
|
29626
|
+
gl.of(t),
|
|
29627
29627
|
R$,
|
|
29628
29628
|
M$,
|
|
29629
29629
|
P$,
|
|
@@ -29631,12 +29631,12 @@ function F$(t = {}) {
|
|
|
29631
29631
|
];
|
|
29632
29632
|
}
|
|
29633
29633
|
function jA(t) {
|
|
29634
|
-
return t.startState.facet(
|
|
29634
|
+
return t.startState.facet(gl) != t.state.facet(gl);
|
|
29635
29635
|
}
|
|
29636
29636
|
const R$ = /* @__PURE__ */ zA({
|
|
29637
29637
|
above: !0,
|
|
29638
29638
|
markers(t) {
|
|
29639
|
-
let { state: e } = t, n = e.facet(
|
|
29639
|
+
let { state: e } = t, n = e.facet(gl), r = [];
|
|
29640
29640
|
for (let o of e.selection.ranges) {
|
|
29641
29641
|
let i = o == e.selection.main;
|
|
29642
29642
|
if (o.empty || n.drawRangeCursor) {
|
|
@@ -29658,7 +29658,7 @@ const R$ = /* @__PURE__ */ zA({
|
|
|
29658
29658
|
class: "cm-cursorLayer"
|
|
29659
29659
|
});
|
|
29660
29660
|
function sC(t, e) {
|
|
29661
|
-
e.style.animationDuration = t.facet(
|
|
29661
|
+
e.style.animationDuration = t.facet(gl).cursorBlinkRate + "ms";
|
|
29662
29662
|
}
|
|
29663
29663
|
const M$ = /* @__PURE__ */ zA({
|
|
29664
29664
|
above: !1,
|
|
@@ -29687,7 +29687,7 @@ const M$ = /* @__PURE__ */ zA({
|
|
|
29687
29687
|
map(t, e) {
|
|
29688
29688
|
return t == null ? null : e.mapPos(t);
|
|
29689
29689
|
}
|
|
29690
|
-
}),
|
|
29690
|
+
}), Oa = /* @__PURE__ */ on.define({
|
|
29691
29691
|
create() {
|
|
29692
29692
|
return null;
|
|
29693
29693
|
},
|
|
@@ -29700,11 +29700,11 @@ const M$ = /* @__PURE__ */ zA({
|
|
|
29700
29700
|
}
|
|
29701
29701
|
update(t) {
|
|
29702
29702
|
var e;
|
|
29703
|
-
let n = t.state.field(
|
|
29704
|
-
n == null ? this.cursor != null && ((e = this.cursor) === null || e === void 0 || e.remove(), this.cursor = null) : (this.cursor || (this.cursor = this.view.scrollDOM.appendChild(document.createElement("div")), this.cursor.className = "cm-dropCursor"), (t.startState.field(
|
|
29703
|
+
let n = t.state.field(Oa);
|
|
29704
|
+
n == null ? this.cursor != null && ((e = this.cursor) === null || e === void 0 || e.remove(), this.cursor = null) : (this.cursor || (this.cursor = this.view.scrollDOM.appendChild(document.createElement("div")), this.cursor.className = "cm-dropCursor"), (t.startState.field(Oa) != n || t.docChanged || t.geometryChanged) && this.view.requestMeasure(this.measureReq));
|
|
29705
29705
|
}
|
|
29706
29706
|
readPos() {
|
|
29707
|
-
let { view: t } = this, e = t.state.field(
|
|
29707
|
+
let { view: t } = this, e = t.state.field(Oa), n = e != null && t.coordsAtPos(e);
|
|
29708
29708
|
if (!n)
|
|
29709
29709
|
return null;
|
|
29710
29710
|
let r = t.scrollDOM.getBoundingClientRect();
|
|
@@ -29724,7 +29724,7 @@ const M$ = /* @__PURE__ */ zA({
|
|
|
29724
29724
|
this.cursor && this.cursor.remove();
|
|
29725
29725
|
}
|
|
29726
29726
|
setDropPos(t) {
|
|
29727
|
-
this.view.state.field(
|
|
29727
|
+
this.view.state.field(Oa) != t && this.view.dispatch({ effects: VA.of(t) });
|
|
29728
29728
|
}
|
|
29729
29729
|
}, {
|
|
29730
29730
|
eventObservers: {
|
|
@@ -29743,7 +29743,7 @@ const M$ = /* @__PURE__ */ zA({
|
|
|
29743
29743
|
}
|
|
29744
29744
|
});
|
|
29745
29745
|
function $$() {
|
|
29746
|
-
return [
|
|
29746
|
+
return [Oa, L$];
|
|
29747
29747
|
}
|
|
29748
29748
|
function aC(t, e, n, r, o) {
|
|
29749
29749
|
e.lastIndex = 0;
|
|
@@ -29891,7 +29891,7 @@ function U$() {
|
|
|
29891
29891
|
decoration: (e, n, r) => {
|
|
29892
29892
|
let { doc: o } = n.state, i = Mn(e[0], 0);
|
|
29893
29893
|
if (i == 9) {
|
|
29894
|
-
let s = o.lineAt(r), a = n.state.tabSize, l =
|
|
29894
|
+
let s = o.lineAt(r), a = n.state.tabSize, l = sa(s.text, a, r - s.from);
|
|
29895
29895
|
return _e.replace({
|
|
29896
29896
|
widget: new X$((a - l % a) * this.view.defaultCharacterWidth / this.view.scaleX)
|
|
29897
29897
|
});
|
|
@@ -29976,10 +29976,10 @@ class Z$ extends ar {
|
|
|
29976
29976
|
return n.className = "cm-placeholder", n.style.pointerEvents = "none", n.appendChild(typeof this.content == "string" ? document.createTextNode(this.content) : typeof this.content == "function" ? this.content(e) : this.content.cloneNode(!0)), n.setAttribute("aria-hidden", "true"), n;
|
|
29977
29977
|
}
|
|
29978
29978
|
coordsAt(e) {
|
|
29979
|
-
let n = e.firstChild ?
|
|
29979
|
+
let n = e.firstChild ? ja(e.firstChild) : [];
|
|
29980
29980
|
if (!n.length)
|
|
29981
29981
|
return null;
|
|
29982
|
-
let r = window.getComputedStyle(e.parentNode), o =
|
|
29982
|
+
let r = window.getComputedStyle(e.parentNode), o = pl(n[0], r.direction != "rtl"), i = parseInt(r.lineHeight);
|
|
29983
29983
|
return o.bottom - o.top > i * 1.5 ? { left: o.left, right: o.right, top: o.top, bottom: o.top + i } : o;
|
|
29984
29984
|
}
|
|
29985
29985
|
ignoreEvent() {
|
|
@@ -30028,7 +30028,7 @@ function n6(t, e) {
|
|
|
30028
30028
|
return n ? Math.round(Math.abs((n.left - e) / t.defaultCharacterWidth)) : -1;
|
|
30029
30029
|
}
|
|
30030
30030
|
function cC(t, e) {
|
|
30031
|
-
let n = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1), r = t.state.doc.lineAt(n), o = n - r.from, i = o > Eg ? -1 : o == r.length ? n6(t, e.clientX) :
|
|
30031
|
+
let n = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1), r = t.state.doc.lineAt(n), o = n - r.from, i = o > Eg ? -1 : o == r.length ? n6(t, e.clientX) : sa(r.text, t.state.tabSize, n - r.from);
|
|
30032
30032
|
return { line: r.number, col: i, off: o };
|
|
30033
30033
|
}
|
|
30034
30034
|
function r6(t, e) {
|
|
@@ -30565,7 +30565,7 @@ function Jw(t, e) {
|
|
|
30565
30565
|
}
|
|
30566
30566
|
const qA = /* @__PURE__ */ Ot.fromClass(class {
|
|
30567
30567
|
constructor(t) {
|
|
30568
|
-
this.input = t.state.facet(
|
|
30568
|
+
this.input = t.state.facet(wl), this.specs = this.input.filter((n) => n), this.panels = this.specs.map((n) => n(t));
|
|
30569
30569
|
let e = t.state.facet(fC);
|
|
30570
30570
|
this.top = new Lc(t, !0, e.topContainer), this.bottom = new Lc(t, !1, e.bottomContainer), this.top.sync(this.panels.filter((n) => n.top)), this.bottom.sync(this.panels.filter((n) => !n.top));
|
|
30571
30571
|
for (let n of this.panels)
|
|
@@ -30574,7 +30574,7 @@ const qA = /* @__PURE__ */ Ot.fromClass(class {
|
|
|
30574
30574
|
update(t) {
|
|
30575
30575
|
let e = t.state.facet(fC);
|
|
30576
30576
|
this.top.container != e.topContainer && (this.top.sync([]), this.top = new Lc(t.view, !0, e.topContainer)), this.bottom.container != e.bottomContainer && (this.bottom.sync([]), this.bottom = new Lc(t.view, !1, e.bottomContainer)), this.top.syncClasses(), this.bottom.syncClasses();
|
|
30577
|
-
let n = t.state.facet(
|
|
30577
|
+
let n = t.state.facet(wl);
|
|
30578
30578
|
if (n != this.input) {
|
|
30579
30579
|
let r = n.filter((l) => l), o = [], i = [], s = [], a = [];
|
|
30580
30580
|
for (let l of r) {
|
|
@@ -30643,7 +30643,7 @@ function hC(t) {
|
|
|
30643
30643
|
let e = t.nextSibling;
|
|
30644
30644
|
return t.remove(), e;
|
|
30645
30645
|
}
|
|
30646
|
-
const
|
|
30646
|
+
const wl = /* @__PURE__ */ De.define({
|
|
30647
30647
|
enables: qA
|
|
30648
30648
|
});
|
|
30649
30649
|
function w6(t, e) {
|
|
@@ -30663,7 +30663,7 @@ const Bh = /* @__PURE__ */ on.define({
|
|
|
30663
30663
|
n.is(GA) ? t = [n.value].concat(t) : n.is(KA) && (t = t.filter((r) => r != n.value));
|
|
30664
30664
|
return t;
|
|
30665
30665
|
},
|
|
30666
|
-
provide: (t) =>
|
|
30666
|
+
provide: (t) => wl.computeN([t], (e) => e.field(t))
|
|
30667
30667
|
}), GA = /* @__PURE__ */ Ve.define(), KA = /* @__PURE__ */ Ve.define();
|
|
30668
30668
|
function v6(t, e, n) {
|
|
30669
30669
|
let r = e.content ? e.content(t, () => s(null)) : null;
|
|
@@ -30742,9 +30742,9 @@ const Cu = /* @__PURE__ */ De.define(), y6 = /* @__PURE__ */ De.define(), b6 = {
|
|
|
30742
30742
|
updateSpacer: null,
|
|
30743
30743
|
domEventHandlers: {},
|
|
30744
30744
|
side: "before"
|
|
30745
|
-
},
|
|
30745
|
+
}, Ua = /* @__PURE__ */ De.define();
|
|
30746
30746
|
function C6(t) {
|
|
30747
|
-
return [XA(),
|
|
30747
|
+
return [XA(), Ua.of({ ...b6, ...t })];
|
|
30748
30748
|
}
|
|
30749
30749
|
const pC = /* @__PURE__ */ De.define({
|
|
30750
30750
|
combine: (t) => t.some((e) => e)
|
|
@@ -30756,7 +30756,7 @@ function XA(t) {
|
|
|
30756
30756
|
}
|
|
30757
30757
|
const x6 = /* @__PURE__ */ Ot.fromClass(class {
|
|
30758
30758
|
constructor(t) {
|
|
30759
|
-
this.view = t, this.domAfter = null, this.prevViewport = t.viewport, this.dom = document.createElement("div"), this.dom.className = "cm-gutters cm-gutters-before", this.dom.setAttribute("aria-hidden", "true"), this.dom.style.minHeight = this.view.contentHeight / this.view.scaleY + "px", this.gutters = t.state.facet(
|
|
30759
|
+
this.view = t, this.domAfter = null, this.prevViewport = t.viewport, this.dom = document.createElement("div"), this.dom.className = "cm-gutters cm-gutters-before", this.dom.setAttribute("aria-hidden", "true"), this.dom.style.minHeight = this.view.contentHeight / this.view.scaleY + "px", this.gutters = t.state.facet(Ua).map((e) => new gC(t, e)), this.fixed = !t.state.facet(pC);
|
|
30760
30760
|
for (let e of this.gutters)
|
|
30761
30761
|
e.config.side == "after" ? this.getDOMAfter().appendChild(e.dom) : this.dom.appendChild(e.dom);
|
|
30762
30762
|
this.fixed && (this.dom.style.position = "sticky"), this.syncGutters(!1), t.scrollDOM.insertBefore(this.dom, t.contentDOM);
|
|
@@ -30803,7 +30803,7 @@ const x6 = /* @__PURE__ */ Ot.fromClass(class {
|
|
|
30803
30803
|
t && (this.view.scrollDOM.insertBefore(this.dom, e), this.domAfter && this.view.scrollDOM.appendChild(this.domAfter));
|
|
30804
30804
|
}
|
|
30805
30805
|
updateGutters(t) {
|
|
30806
|
-
let e = t.startState.facet(
|
|
30806
|
+
let e = t.startState.facet(Ua), n = t.state.facet(Ua), r = t.docChanged || t.heightChanged || t.viewportChanged || !tt.eq(t.startState.facet(Cu), t.state.facet(Cu), t.view.viewport.from, t.view.viewport.to);
|
|
30807
30807
|
if (e == n)
|
|
30808
30808
|
for (let o of this.gutters)
|
|
30809
30809
|
o.update(t) && (r = !0);
|
|
@@ -30987,7 +30987,7 @@ class Ih extends Ro {
|
|
|
30987
30987
|
function Fh(t, e) {
|
|
30988
30988
|
return t.state.facet(vs).formatNumber(e, t.state);
|
|
30989
30989
|
}
|
|
30990
|
-
const A6 = /* @__PURE__ */
|
|
30990
|
+
const A6 = /* @__PURE__ */ Ua.compute([vs], (t) => ({
|
|
30991
30991
|
class: "cm-lineNumbers",
|
|
30992
30992
|
renderEmptyElements: !1,
|
|
30993
30993
|
markers(e) {
|
|
@@ -31193,7 +31193,7 @@ class F6 {
|
|
|
31193
31193
|
return e < r || n >= this.cursorPos ? this.doc.sliceString(e, n) : this.string.slice(e - r, n - r);
|
|
31194
31194
|
}
|
|
31195
31195
|
}
|
|
31196
|
-
let
|
|
31196
|
+
let ka = null;
|
|
31197
31197
|
class cd {
|
|
31198
31198
|
constructor(e, n, r = [], o, i, s, a, l) {
|
|
31199
31199
|
this.parser = e, this.state = n, this.fragments = r, this.tree = o, this.treeLen = i, this.viewport = s, this.skipped = a, this.scheduleOn = l, this.parse = null, this.tempSkipped = [];
|
|
@@ -31240,12 +31240,12 @@ class cd {
|
|
|
31240
31240
|
}), this.treeLen = e, this.tree = n, this.fragments = this.withoutTempSkipped(Li.addTree(this.tree, this.fragments, !0)), this.parse = null);
|
|
31241
31241
|
}
|
|
31242
31242
|
withContext(e) {
|
|
31243
|
-
let n =
|
|
31244
|
-
|
|
31243
|
+
let n = ka;
|
|
31244
|
+
ka = this;
|
|
31245
31245
|
try {
|
|
31246
31246
|
return e();
|
|
31247
31247
|
} finally {
|
|
31248
|
-
|
|
31248
|
+
ka = n;
|
|
31249
31249
|
}
|
|
31250
31250
|
}
|
|
31251
31251
|
withoutTempSkipped(e) {
|
|
@@ -31314,7 +31314,7 @@ class cd {
|
|
|
31314
31314
|
return {
|
|
31315
31315
|
parsedPos: i,
|
|
31316
31316
|
advance() {
|
|
31317
|
-
let l =
|
|
31317
|
+
let l = ka;
|
|
31318
31318
|
if (l) {
|
|
31319
31319
|
for (let c of o)
|
|
31320
31320
|
l.tempSkipped.push(c);
|
|
@@ -31342,7 +31342,7 @@ class cd {
|
|
|
31342
31342
|
parse is in progress.
|
|
31343
31343
|
*/
|
|
31344
31344
|
static get() {
|
|
31345
|
-
return
|
|
31345
|
+
return ka;
|
|
31346
31346
|
}
|
|
31347
31347
|
}
|
|
31348
31348
|
function yC(t, e, n) {
|
|
@@ -31469,7 +31469,7 @@ function ud(t) {
|
|
|
31469
31469
|
let e = t.facet(Gl);
|
|
31470
31470
|
return e.charCodeAt(0) == 9 ? t.tabSize * e.length : e.length;
|
|
31471
31471
|
}
|
|
31472
|
-
function
|
|
31472
|
+
function vl(t, e) {
|
|
31473
31473
|
let n = "", r = t.tabSize, o = t.facet(Gl)[0];
|
|
31474
31474
|
if (o == " ") {
|
|
31475
31475
|
for (; e >= r; )
|
|
@@ -31531,7 +31531,7 @@ class hf {
|
|
|
31531
31531
|
position in the given string.
|
|
31532
31532
|
*/
|
|
31533
31533
|
countColumn(e, n = e.length) {
|
|
31534
|
-
return
|
|
31534
|
+
return sa(e, this.state.tabSize, n);
|
|
31535
31535
|
}
|
|
31536
31536
|
/**
|
|
31537
31537
|
Find the indentation column of the line at the given point.
|
|
@@ -31706,7 +31706,7 @@ function q6() {
|
|
|
31706
31706
|
let d = Qw(s, u.from);
|
|
31707
31707
|
if (d == null)
|
|
31708
31708
|
continue;
|
|
31709
|
-
let f = /^\s*/.exec(u.text)[0], h =
|
|
31709
|
+
let f = /^\s*/.exec(u.text)[0], h = vl(s, d);
|
|
31710
31710
|
f != h && l.push({ from: u.from, to: u.from + f.length, insert: h });
|
|
31711
31711
|
}
|
|
31712
31712
|
return l.length ? [t, { changes: l, sequential: !0 }] : t;
|
|
@@ -31981,7 +31981,7 @@ const a9 = /* @__PURE__ */ Ce.baseTheme({
|
|
|
31981
31981
|
cursor: "pointer"
|
|
31982
31982
|
}
|
|
31983
31983
|
});
|
|
31984
|
-
class
|
|
31984
|
+
class aa {
|
|
31985
31985
|
constructor(e, n) {
|
|
31986
31986
|
this.specs = e;
|
|
31987
31987
|
let r;
|
|
@@ -32013,7 +32013,7 @@ class sa {
|
|
|
32013
32013
|
defined earlier.
|
|
32014
32014
|
*/
|
|
32015
32015
|
static define(e, n) {
|
|
32016
|
-
return new
|
|
32016
|
+
return new aa(e, n || {});
|
|
32017
32017
|
}
|
|
32018
32018
|
}
|
|
32019
32019
|
const Dg = /* @__PURE__ */ De.define(), lO = /* @__PURE__ */ De.define({
|
|
@@ -32027,7 +32027,7 @@ function Lh(t) {
|
|
|
32027
32027
|
}
|
|
32028
32028
|
function e0(t, e) {
|
|
32029
32029
|
let n = [c9], r;
|
|
32030
|
-
return t instanceof
|
|
32030
|
+
return t instanceof aa && (t.module && n.push(Ce.styleModule.of(t.module)), r = t.themeType), e != null && e.fallback ? n.push(lO.of(t)) : r ? n.push(Dg.computeN([Ce.darkTheme], (o) => o.facet(Ce.darkTheme) == (r == "dark") ? [t] : [])) : n.push(Dg.of(t)), n;
|
|
32031
32031
|
}
|
|
32032
32032
|
class l9 {
|
|
32033
32033
|
constructor(e) {
|
|
@@ -32050,7 +32050,7 @@ class l9 {
|
|
|
32050
32050
|
}
|
|
32051
32051
|
const c9 = /* @__PURE__ */ ui.high(/* @__PURE__ */ Ot.fromClass(l9, {
|
|
32052
32052
|
decorations: (t) => t.decorations
|
|
32053
|
-
})), u9 = /* @__PURE__ */
|
|
32053
|
+
})), u9 = /* @__PURE__ */ aa.define([
|
|
32054
32054
|
{
|
|
32055
32055
|
tag: $.meta,
|
|
32056
32056
|
color: "#404740"
|
|
@@ -32335,7 +32335,7 @@ var fO = (t) => {
|
|
|
32335
32335
|
});
|
|
32336
32336
|
var a = Ce.theme(o, {
|
|
32337
32337
|
dark: e === "dark"
|
|
32338
|
-
}), l =
|
|
32338
|
+
}), l = aa.define(r), c = [a, e0(l)];
|
|
32339
32339
|
return c;
|
|
32340
32340
|
}, D9 = {
|
|
32341
32341
|
background: "#282828",
|
|
@@ -32644,16 +32644,16 @@ function n0(t, e) {
|
|
|
32644
32644
|
let n = t.languageDataAt("commentTokens", e, 1);
|
|
32645
32645
|
return n.length ? n[0] : {};
|
|
32646
32646
|
}
|
|
32647
|
-
const
|
|
32647
|
+
const Ea = 50;
|
|
32648
32648
|
function M9(t, { open: e, close: n }, r, o) {
|
|
32649
|
-
let i = t.sliceDoc(r -
|
|
32649
|
+
let i = t.sliceDoc(r - Ea, r), s = t.sliceDoc(o, o + Ea), a = /\s*$/.exec(i)[0].length, l = /^\s*/.exec(s)[0].length, c = i.length - a;
|
|
32650
32650
|
if (i.slice(c - e.length, c) == e && s.slice(l, l + n.length) == n)
|
|
32651
32651
|
return {
|
|
32652
32652
|
open: { pos: r - a, margin: a && 1 },
|
|
32653
32653
|
close: { pos: o + l, margin: l && 1 }
|
|
32654
32654
|
};
|
|
32655
32655
|
let u, d;
|
|
32656
|
-
o - r <= 2 *
|
|
32656
|
+
o - r <= 2 * Ea ? u = d = t.sliceDoc(r, o) : (u = t.sliceDoc(r, r + Ea), d = t.sliceDoc(o - Ea, o));
|
|
32657
32657
|
let f = /^\s*/.exec(u)[0].length, h = /\s*$/.exec(d)[0].length, m = d.length - h - n.length;
|
|
32658
32658
|
return u.slice(f, f + e.length) == e && d.slice(m, m + n.length) == n ? {
|
|
32659
32659
|
open: {
|
|
@@ -32931,14 +32931,14 @@ const Y9 = [
|
|
|
32931
32931
|
{ key: "Mod-u", run: j9, preventDefault: !0 },
|
|
32932
32932
|
{ key: "Alt-u", mac: "Mod-Shift-u", run: V9, preventDefault: !0 }
|
|
32933
32933
|
];
|
|
32934
|
-
function
|
|
32934
|
+
function la(t, e) {
|
|
32935
32935
|
return fe.create(t.ranges.map(e), t.mainIndex);
|
|
32936
32936
|
}
|
|
32937
32937
|
function Lr(t, e) {
|
|
32938
32938
|
return t.update({ selection: e, scrollIntoView: !0, userEvent: "select" });
|
|
32939
32939
|
}
|
|
32940
32940
|
function $r({ state: t, dispatch: e }, n) {
|
|
32941
|
-
let r =
|
|
32941
|
+
let r = la(t.selection, n);
|
|
32942
32942
|
return r.eq(t.selection, !0) ? !1 : (e(Lr(t, r)), !0);
|
|
32943
32943
|
}
|
|
32944
32944
|
function gf(t, e) {
|
|
@@ -33000,7 +33000,7 @@ function AO(t) {
|
|
|
33000
33000
|
};
|
|
33001
33001
|
}
|
|
33002
33002
|
function OO(t, e) {
|
|
33003
|
-
let n = AO(t), { state: r } = t, o =
|
|
33003
|
+
let n = AO(t), { state: r } = t, o = la(r.selection, (s) => s.empty ? t.moveVertically(s, e, n.height) : gf(s, e));
|
|
33004
33004
|
if (o.eq(r.selection))
|
|
33005
33005
|
return !1;
|
|
33006
33006
|
let i;
|
|
@@ -33021,7 +33021,7 @@ function di(t, e, n) {
|
|
|
33021
33021
|
}
|
|
33022
33022
|
const nH = (t) => $r(t, (e) => di(t, e, !0)), rH = (t) => $r(t, (e) => di(t, e, !1)), oH = (t) => $r(t, (e) => di(t, e, !Sn(t))), iH = (t) => $r(t, (e) => di(t, e, Sn(t))), sH = (t) => $r(t, (e) => fe.cursor(t.lineBlockAt(e.head).from, 1)), aH = (t) => $r(t, (e) => fe.cursor(t.lineBlockAt(e.head).to, -1));
|
|
33023
33023
|
function lH(t, e, n) {
|
|
33024
|
-
let r = !1, o =
|
|
33024
|
+
let r = !1, o = la(t.selection, (i) => {
|
|
33025
33025
|
let s = eo(t, i.head, -1) || eo(t, i.head, 1) || i.head > 0 && eo(t, i.head - 1, 1) || i.head < t.doc.length && eo(t, i.head + 1, -1);
|
|
33026
33026
|
if (!s || !s.end)
|
|
33027
33027
|
return i;
|
|
@@ -33033,7 +33033,7 @@ function lH(t, e, n) {
|
|
|
33033
33033
|
}
|
|
33034
33034
|
const cH = ({ state: t, dispatch: e }) => lH(t, e);
|
|
33035
33035
|
function xr(t, e) {
|
|
33036
|
-
let n =
|
|
33036
|
+
let n = la(t.state.selection, (r) => {
|
|
33037
33037
|
let o = e(r);
|
|
33038
33038
|
return fe.range(r.anchor, o.head, o.goalColumn, o.bidiLevel || void 0);
|
|
33039
33039
|
});
|
|
@@ -33058,7 +33058,7 @@ const AC = (t) => MO(t, !1), OC = (t) => MO(t, !0), pH = (t) => xr(t, (e) => di(
|
|
|
33058
33058
|
let n = vf(t).map(({ from: r, to: o }) => fe.range(r, Math.min(o + 1, t.doc.length)));
|
|
33059
33059
|
return e(t.update({ selection: fe.create(n), userEvent: "select" })), !0;
|
|
33060
33060
|
}, xH = ({ state: t, dispatch: e }) => {
|
|
33061
|
-
let n =
|
|
33061
|
+
let n = la(t.selection, (r) => {
|
|
33062
33062
|
let o = En(t), i = o.resolveStack(r.from, 1);
|
|
33063
33063
|
if (r.empty) {
|
|
33064
33064
|
let s = o.resolveStack(r.from, -1);
|
|
@@ -33127,7 +33127,7 @@ const LO = (t, e, n) => Xl(t, (r) => {
|
|
|
33127
33127
|
if (n && !e && o > s.from && o < s.from + 200 && !/[^ \t]/.test(a = s.text.slice(0, o - s.from))) {
|
|
33128
33128
|
if (a[a.length - 1] == " ")
|
|
33129
33129
|
return o - 1;
|
|
33130
|
-
let c =
|
|
33130
|
+
let c = sa(a, i.tabSize), u = c % ud(i) || ud(i);
|
|
33131
33131
|
for (let d = 0; d < u && a[a.length - 1 - d] == " "; d++)
|
|
33132
33132
|
o--;
|
|
33133
33133
|
l = o;
|
|
@@ -33234,7 +33234,7 @@ function VO(t, e, n) {
|
|
|
33234
33234
|
const FH = ({ state: t, dispatch: e }) => VO(t, e, !1), RH = ({ state: t, dispatch: e }) => VO(t, e, !0), MH = (t) => {
|
|
33235
33235
|
if (t.state.readOnly)
|
|
33236
33236
|
return !1;
|
|
33237
|
-
let { state: e } = t, n = e.changes(vf(e).map(({ from: o, to: i }) => (o > 0 ? o-- : i < e.doc.length && i++, { from: o, to: i }))), r =
|
|
33237
|
+
let { state: e } = t, n = e.changes(vf(e).map(({ from: o, to: i }) => (o > 0 ? o-- : i < e.doc.length && i++, { from: o, to: i }))), r = la(e.selection, (o) => {
|
|
33238
33238
|
let i;
|
|
33239
33239
|
if (t.lineWrapping) {
|
|
33240
33240
|
let s = t.lineBlockAt(o.head), a = t.coordsAtPos(o.head, o.assoc || 1);
|
|
@@ -33259,11 +33259,11 @@ function WO(t) {
|
|
|
33259
33259
|
let { from: i, to: s } = o, a = e.doc.lineAt(i), l = !t && i == s && PH(e, i);
|
|
33260
33260
|
t && (i = s = (s <= a.to ? a : e.doc.lineAt(s)).to);
|
|
33261
33261
|
let c = new hf(e, { simulateBreak: i, simulateDoubleBreak: !!l }), u = Qw(c, i);
|
|
33262
|
-
for (u == null && (u =
|
|
33262
|
+
for (u == null && (u = sa(/^\s*/.exec(e.doc.lineAt(i).text)[0], e.tabSize)); s < a.to && /\s/.test(a.text[s - a.from]); )
|
|
33263
33263
|
s++;
|
|
33264
33264
|
l ? { from: i, to: s } = l : i > a.from && i < a.from + 100 && !/\S/.test(a.text.slice(0, i)) && (i = a.from);
|
|
33265
|
-
let d = ["",
|
|
33266
|
-
return l && d.push(
|
|
33265
|
+
let d = ["", vl(e, u)];
|
|
33266
|
+
return l && d.push(vl(e, c.lineIndent(a.from, -1))), {
|
|
33267
33267
|
changes: { from: i, to: s, insert: ct.of(d) },
|
|
33268
33268
|
range: fe.cursor(i + 1 + d[1].length)
|
|
33269
33269
|
};
|
|
@@ -33297,7 +33297,7 @@ const $H = ({ state: t, dispatch: e }) => {
|
|
|
33297
33297
|
if (l == null)
|
|
33298
33298
|
return;
|
|
33299
33299
|
/\S/.test(i.text) || (l = 0);
|
|
33300
|
-
let c = /^\s*/.exec(i.text)[0], u =
|
|
33300
|
+
let c = /^\s*/.exec(i.text)[0], u = vl(t, l);
|
|
33301
33301
|
(c != u || a.from < i.from + c.length) && (n[i.from] = l, s.push({ from: i.from, to: i.from + c.length, insert: u }));
|
|
33302
33302
|
});
|
|
33303
33303
|
return o.changes.empty || e(t.update(o, { userEvent: "indent" })), !0;
|
|
@@ -33307,7 +33307,7 @@ const $H = ({ state: t, dispatch: e }) => {
|
|
|
33307
33307
|
let o = /^\s*/.exec(n.text)[0];
|
|
33308
33308
|
if (!o)
|
|
33309
33309
|
return;
|
|
33310
|
-
let i =
|
|
33310
|
+
let i = sa(o, t.tabSize), s = 0, a = vl(t, Math.max(0, i - ud(t)));
|
|
33311
33311
|
for (; s < o.length && s < a.length && o.charCodeAt(s) == a.charCodeAt(s); )
|
|
33312
33312
|
s++;
|
|
33313
33313
|
r.push({ from: n.from + s, to: n.from + o.length, insert: a.slice(s) });
|
|
@@ -33675,7 +33675,7 @@ const rz = ({ state: t, dispatch: e }) => {
|
|
|
33675
33675
|
selection: t.selection.addRange(fe.range(o.from, o.to), !1),
|
|
33676
33676
|
effects: Ce.scrollIntoView(o.to)
|
|
33677
33677
|
})), !0) : !1;
|
|
33678
|
-
},
|
|
33678
|
+
}, ca = /* @__PURE__ */ De.define({
|
|
33679
33679
|
combine(t) {
|
|
33680
33680
|
return uo(t, {
|
|
33681
33681
|
top: !1,
|
|
@@ -33863,16 +33863,16 @@ class cz extends JO {
|
|
|
33863
33863
|
o(i.value.from, i.value.to);
|
|
33864
33864
|
}
|
|
33865
33865
|
}
|
|
33866
|
-
const
|
|
33866
|
+
const yl = /* @__PURE__ */ Ve.define(), i0 = /* @__PURE__ */ Ve.define(), Qo = /* @__PURE__ */ on.define({
|
|
33867
33867
|
create(t) {
|
|
33868
33868
|
return new jh(Ig(t).create(), null);
|
|
33869
33869
|
},
|
|
33870
33870
|
update(t, e) {
|
|
33871
33871
|
for (let n of e.effects)
|
|
33872
|
-
n.is(
|
|
33872
|
+
n.is(yl) ? t = new jh(n.value.create(), t.panel) : n.is(i0) && (t = new jh(t.query, n.value ? s0 : null));
|
|
33873
33873
|
return t;
|
|
33874
33874
|
},
|
|
33875
|
-
provide: (t) =>
|
|
33875
|
+
provide: (t) => wl.from(t, (e) => e.panel)
|
|
33876
33876
|
});
|
|
33877
33877
|
class jh {
|
|
33878
33878
|
constructor(e, n) {
|
|
@@ -33915,7 +33915,7 @@ const wd = /* @__PURE__ */ Yl((t, { query: e }) => {
|
|
|
33915
33915
|
let { to: n } = t.state.selection.main, r = e.nextMatch(t.state, n, n);
|
|
33916
33916
|
if (!r)
|
|
33917
33917
|
return !1;
|
|
33918
|
-
let o = fe.single(r.from, r.to), i = t.state.facet(
|
|
33918
|
+
let o = fe.single(r.from, r.to), i = t.state.facet(ca);
|
|
33919
33919
|
return t.dispatch({
|
|
33920
33920
|
selection: o,
|
|
33921
33921
|
effects: [a0(t, r), i.scrollToMatch(o.main, t)],
|
|
@@ -33925,7 +33925,7 @@ const wd = /* @__PURE__ */ Yl((t, { query: e }) => {
|
|
|
33925
33925
|
let { state: n } = t, { from: r } = n.selection.main, o = e.prevMatch(n, r, r);
|
|
33926
33926
|
if (!o)
|
|
33927
33927
|
return !1;
|
|
33928
|
-
let i = fe.single(o.from, o.to), s = t.state.facet(
|
|
33928
|
+
let i = fe.single(o.from, o.to), s = t.state.facet(ca);
|
|
33929
33929
|
return t.dispatch({
|
|
33930
33930
|
selection: i,
|
|
33931
33931
|
effects: [a0(t, o), s.scrollToMatch(i.main, t)],
|
|
@@ -33961,7 +33961,7 @@ const wd = /* @__PURE__ */ Yl((t, { query: e }) => {
|
|
|
33961
33961
|
let s = i, a = [], l, c, u = [];
|
|
33962
33962
|
s.from == r && s.to == o && (c = n.toText(e.getReplacement(s)), a.push({ from: s.from, to: s.to, insert: c }), s = e.nextMatch(n, s.from, s.to), u.push(Ce.announce.of(n.phrase("replaced match on line $", n.doc.lineAt(r).number) + ".")));
|
|
33963
33963
|
let d = t.state.changes(a);
|
|
33964
|
-
return s && (l = fe.single(s.from, s.to).map(d), u.push(a0(t, s)), u.push(n.facet(
|
|
33964
|
+
return s && (l = fe.single(s.from, s.to).map(d), u.push(a0(t, s)), u.push(n.facet(ca).scrollToMatch(l.main, t))), t.dispatch({
|
|
33965
33965
|
changes: d,
|
|
33966
33966
|
selection: l,
|
|
33967
33967
|
effects: u,
|
|
@@ -33984,14 +33984,14 @@ const wd = /* @__PURE__ */ Yl((t, { query: e }) => {
|
|
|
33984
33984
|
}), !0;
|
|
33985
33985
|
});
|
|
33986
33986
|
function s0(t) {
|
|
33987
|
-
return t.state.facet(
|
|
33987
|
+
return t.state.facet(ca).createPanel(t);
|
|
33988
33988
|
}
|
|
33989
33989
|
function Ig(t, e) {
|
|
33990
33990
|
var n, r, o, i, s;
|
|
33991
33991
|
let a = t.selection.main, l = a.empty || a.to > a.from + 100 ? "" : t.sliceDoc(a.from, a.to);
|
|
33992
33992
|
if (e && !l)
|
|
33993
33993
|
return e;
|
|
33994
|
-
let c = t.facet(
|
|
33994
|
+
let c = t.facet(ca);
|
|
33995
33995
|
return new YO({
|
|
33996
33996
|
search: ((n = e == null ? void 0 : e.literal) !== null && n !== void 0 ? n : c.literal) ? l : l.replace(/\n/g, "\\n"),
|
|
33997
33997
|
caseSensitive: (r = e == null ? void 0 : e.caseSensitive) !== null && r !== void 0 ? r : c.caseSensitive,
|
|
@@ -34014,12 +34014,12 @@ const e_ = (t) => {
|
|
|
34014
34014
|
let n = QO(t);
|
|
34015
34015
|
if (n && n != t.root.activeElement) {
|
|
34016
34016
|
let r = Ig(t.state, e.query.spec);
|
|
34017
|
-
r.valid && t.dispatch({ effects:
|
|
34017
|
+
r.valid && t.dispatch({ effects: yl.of(r) }), n.focus(), n.select();
|
|
34018
34018
|
}
|
|
34019
34019
|
} else
|
|
34020
34020
|
t.dispatch({ effects: [
|
|
34021
34021
|
i0.of(!0),
|
|
34022
|
-
e ?
|
|
34022
|
+
e ? yl.of(Ig(t.state, e.query.spec)) : Ve.appendConfig.of(yz)
|
|
34023
34023
|
] });
|
|
34024
34024
|
return !0;
|
|
34025
34025
|
}, t_ = (t) => {
|
|
@@ -34112,7 +34112,7 @@ class wz {
|
|
|
34112
34112
|
wholeWord: this.wordField.checked,
|
|
34113
34113
|
replace: this.replaceField.value
|
|
34114
34114
|
});
|
|
34115
|
-
e.eq(this.query) || (this.query = e, this.view.dispatch({ effects:
|
|
34115
|
+
e.eq(this.query) || (this.query = e, this.view.dispatch({ effects: yl.of(e) }));
|
|
34116
34116
|
}
|
|
34117
34117
|
keydown(e) {
|
|
34118
34118
|
O$(this.view, e, "search-panel") ? e.preventDefault() : e.keyCode == 13 && e.target == this.searchField ? (e.preventDefault(), (e.shiftKey ? vd : wd)(this.view)) : e.keyCode == 13 && e.target == this.replaceField && (e.preventDefault(), MC(this.view));
|
|
@@ -34120,7 +34120,7 @@ class wz {
|
|
|
34120
34120
|
update(e) {
|
|
34121
34121
|
for (let n of e.transactions)
|
|
34122
34122
|
for (let r of n.effects)
|
|
34123
|
-
r.is(
|
|
34123
|
+
r.is(yl) && !r.value.eq(this.query) && this.setQuery(r.value);
|
|
34124
34124
|
}
|
|
34125
34125
|
setQuery(e) {
|
|
34126
34126
|
this.query = e, this.searchField.value = e.search, this.replaceField.value = e.replace, this.caseField.checked = e.caseSensitive, this.reField.checked = e.regexp, this.wordField.checked = e.wholeWord;
|
|
@@ -34132,7 +34132,7 @@ class wz {
|
|
|
34132
34132
|
return 80;
|
|
34133
34133
|
}
|
|
34134
34134
|
get top() {
|
|
34135
|
-
return this.view.state.facet(
|
|
34135
|
+
return this.view.state.facet(ca).top;
|
|
34136
34136
|
}
|
|
34137
34137
|
}
|
|
34138
34138
|
function er(t, e) {
|
|
@@ -34305,7 +34305,7 @@ function kz(t) {
|
|
|
34305
34305
|
let e = $C.get(t);
|
|
34306
34306
|
return e || $C.set(t, e = Cz(t)), e;
|
|
34307
34307
|
}
|
|
34308
|
-
const yd = /* @__PURE__ */ Ve.define(),
|
|
34308
|
+
const yd = /* @__PURE__ */ Ve.define(), bl = /* @__PURE__ */ Ve.define();
|
|
34309
34309
|
class Ez {
|
|
34310
34310
|
constructor(e) {
|
|
34311
34311
|
this.pattern = e, this.chars = [], this.folded = [], this.any = [], this.precise = [], this.byWord = [], this.score = 0, this.matched = [];
|
|
@@ -34495,7 +34495,7 @@ class Oz {
|
|
|
34495
34495
|
}
|
|
34496
34496
|
}), this.dom.addEventListener("focusout", (l) => {
|
|
34497
34497
|
let c = e.state.field(this.stateField, !1);
|
|
34498
|
-
c && c.tooltip && e.state.facet(nn).closeOnBlur && l.relatedTarget != e.contentDOM && e.dispatch({ effects:
|
|
34498
|
+
c && c.tooltip && e.state.facet(nn).closeOnBlur && l.relatedTarget != e.contentDOM && e.dispatch({ effects: bl.of(null) });
|
|
34499
34499
|
}), this.showOptions(i, o.id);
|
|
34500
34500
|
}
|
|
34501
34501
|
mount() {
|
|
@@ -34794,7 +34794,7 @@ class hr {
|
|
|
34794
34794
|
for (let i of e.effects)
|
|
34795
34795
|
if (i.is(yd))
|
|
34796
34796
|
o = new hr(o.source, 1, i.value);
|
|
34797
|
-
else if (i.is(
|
|
34797
|
+
else if (i.is(bl))
|
|
34798
34798
|
o = new hr(
|
|
34799
34799
|
o.source,
|
|
34800
34800
|
0
|
|
@@ -34899,7 +34899,7 @@ const Lz = (t) => {
|
|
|
34899
34899
|
return !e || !e.active.some(
|
|
34900
34900
|
(n) => n.state != 0
|
|
34901
34901
|
/* State.Inactive */
|
|
34902
|
-
) ? !1 : (t.dispatch({ effects:
|
|
34902
|
+
) ? !1 : (t.dispatch({ effects: bl.of(null) }), !0);
|
|
34903
34903
|
};
|
|
34904
34904
|
class Hz {
|
|
34905
34905
|
constructor(e, n) {
|
|
@@ -34951,7 +34951,7 @@ const zz = 50, jz = 1e3, Vz = /* @__PURE__ */ Ot.fromClass(class {
|
|
|
34951
34951
|
this.running.push(o), Promise.resolve(t.source(r)).then((i) => {
|
|
34952
34952
|
o.context.aborted || (o.done = i || null, this.scheduleAccept());
|
|
34953
34953
|
}, (i) => {
|
|
34954
|
-
this.view.dispatch({ effects:
|
|
34954
|
+
this.view.dispatch({ effects: bl.of(null) }), Hn(this.view.state, i);
|
|
34955
34955
|
});
|
|
34956
34956
|
}
|
|
34957
34957
|
scheduleAccept() {
|
|
@@ -34998,7 +34998,7 @@ const zz = 50, jz = 1e3, Vz = /* @__PURE__ */ Ot.fromClass(class {
|
|
|
34998
34998
|
let e = this.view.state.field(Pn, !1);
|
|
34999
34999
|
if (e && e.tooltip && this.view.state.facet(nn).closeOnBlur) {
|
|
35000
35000
|
let n = e.open && UA(this.view, e.open.tooltip);
|
|
35001
|
-
(!n || !n.dom.contains(t.relatedTarget)) && setTimeout(() => this.view.dispatch({ effects:
|
|
35001
|
+
(!n || !n.dom.contains(t.relatedTarget)) && setTimeout(() => this.view.dispatch({ effects: bl.of(null) }), 10);
|
|
35002
35002
|
}
|
|
35003
35003
|
},
|
|
35004
35004
|
compositionstart() {
|
|
@@ -35212,7 +35212,7 @@ let Gz = /* @__PURE__ */ _e.widget({ widget: /* @__PURE__ */ new class extends a
|
|
|
35212
35212
|
return !1;
|
|
35213
35213
|
}
|
|
35214
35214
|
}() }), Kz = /* @__PURE__ */ _e.mark({ class: "cm-snippetField" });
|
|
35215
|
-
class
|
|
35215
|
+
class ua {
|
|
35216
35216
|
constructor(e, n) {
|
|
35217
35217
|
this.ranges = e, this.active = n, this.deco = _e.set(e.map((r) => (r.from == r.to ? Gz : Kz).range(r.from, r.to)), !0);
|
|
35218
35218
|
}
|
|
@@ -35224,7 +35224,7 @@ class ca {
|
|
|
35224
35224
|
return null;
|
|
35225
35225
|
n.push(o);
|
|
35226
35226
|
}
|
|
35227
|
-
return new
|
|
35227
|
+
return new ua(n, this.active);
|
|
35228
35228
|
}
|
|
35229
35229
|
selectionInsideField(e) {
|
|
35230
35230
|
return e.ranges.every((n) => this.ranges.some((r) => r.field == this.active && r.from <= n.from && r.to >= n.to));
|
|
@@ -35234,7 +35234,7 @@ const Jl = /* @__PURE__ */ Ve.define({
|
|
|
35234
35234
|
map(t, e) {
|
|
35235
35235
|
return t && t.map(e);
|
|
35236
35236
|
}
|
|
35237
|
-
}), Xz = /* @__PURE__ */ Ve.define(),
|
|
35237
|
+
}), Xz = /* @__PURE__ */ Ve.define(), Cl = /* @__PURE__ */ on.define({
|
|
35238
35238
|
create() {
|
|
35239
35239
|
return null;
|
|
35240
35240
|
},
|
|
@@ -35243,7 +35243,7 @@ const Jl = /* @__PURE__ */ Ve.define({
|
|
|
35243
35243
|
if (n.is(Jl))
|
|
35244
35244
|
return n.value;
|
|
35245
35245
|
if (n.is(Xz) && t)
|
|
35246
|
-
return new
|
|
35246
|
+
return new ua(t.ranges, n.value);
|
|
35247
35247
|
}
|
|
35248
35248
|
return t && e.docChanged && (t = t.map(e.changes)), t && e.selection && !t.selectionInsideField(e.selection) && (t = null), t;
|
|
35249
35249
|
},
|
|
@@ -35261,26 +35261,26 @@ function Yz(t) {
|
|
|
35261
35261
|
annotations: r ? [l0.of(r), Ut.userEvent.of("input.complete")] : void 0
|
|
35262
35262
|
};
|
|
35263
35263
|
if (a.length && (c.selection = h0(a, 0)), a.some((u) => u.field > 0)) {
|
|
35264
|
-
let u = new
|
|
35265
|
-
n.state.field(
|
|
35264
|
+
let u = new ua(a, 0), d = c.effects = [Jl.of(u)];
|
|
35265
|
+
n.state.field(Cl, !1) === void 0 && d.push(Ve.appendConfig.of([Cl, tj, nj, s_]));
|
|
35266
35266
|
}
|
|
35267
35267
|
n.dispatch(n.state.update(c));
|
|
35268
35268
|
};
|
|
35269
35269
|
}
|
|
35270
35270
|
function a_(t) {
|
|
35271
35271
|
return ({ state: e, dispatch: n }) => {
|
|
35272
|
-
let r = e.field(
|
|
35272
|
+
let r = e.field(Cl, !1);
|
|
35273
35273
|
if (!r || t < 0 && r.active == 0)
|
|
35274
35274
|
return !1;
|
|
35275
35275
|
let o = r.active + t, i = t > 0 && !r.ranges.some((s) => s.field == o + t);
|
|
35276
35276
|
return n(e.update({
|
|
35277
35277
|
selection: h0(r.ranges, o),
|
|
35278
|
-
effects: Jl.of(i ? null : new
|
|
35278
|
+
effects: Jl.of(i ? null : new ua(r.ranges, o)),
|
|
35279
35279
|
scrollIntoView: !0
|
|
35280
35280
|
})), !0;
|
|
35281
35281
|
};
|
|
35282
35282
|
}
|
|
35283
|
-
const Jz = ({ state: t, dispatch: e }) => t.field(
|
|
35283
|
+
const Jz = ({ state: t, dispatch: e }) => t.field(Cl, !1) ? (e(t.update({ effects: Jl.of(null) })), !0) : !1, Qz = /* @__PURE__ */ a_(1), Zz = /* @__PURE__ */ a_(-1), ej = [
|
|
35284
35284
|
{ key: "Tab", run: Qz, shift: Zz },
|
|
35285
35285
|
{ key: "Escape", run: Jz }
|
|
35286
35286
|
], VC = /* @__PURE__ */ De.define({
|
|
@@ -35293,17 +35293,17 @@ function xu(t, e) {
|
|
|
35293
35293
|
}
|
|
35294
35294
|
const nj = /* @__PURE__ */ Ce.domEventHandlers({
|
|
35295
35295
|
mousedown(t, e) {
|
|
35296
|
-
let n = e.state.field(
|
|
35296
|
+
let n = e.state.field(Cl, !1), r;
|
|
35297
35297
|
if (!n || (r = e.posAtCoords({ x: t.clientX, y: t.clientY })) == null)
|
|
35298
35298
|
return !1;
|
|
35299
35299
|
let o = n.ranges.find((i) => i.from <= r && i.to >= r);
|
|
35300
35300
|
return !o || o.field == n.active ? !1 : (e.dispatch({
|
|
35301
35301
|
selection: h0(n.ranges, o.field),
|
|
35302
|
-
effects: Jl.of(n.ranges.some((i) => i.field > o.field) ? new
|
|
35302
|
+
effects: Jl.of(n.ranges.some((i) => i.field > o.field) ? new ua(n.ranges, o.field) : null),
|
|
35303
35303
|
scrollIntoView: !0
|
|
35304
35304
|
}), !0);
|
|
35305
35305
|
}
|
|
35306
|
-
}),
|
|
35306
|
+
}), xl = {
|
|
35307
35307
|
brackets: ["(", "[", "{", "'", '"'],
|
|
35308
35308
|
before: ")]}:;>",
|
|
35309
35309
|
stringPrefixes: []
|
|
@@ -35341,7 +35341,7 @@ function c_(t) {
|
|
|
35341
35341
|
return Iw(t < 128 ? t : t + 1);
|
|
35342
35342
|
}
|
|
35343
35343
|
function u_(t, e) {
|
|
35344
|
-
return t.languageDataAt("closeBrackets", e)[0] ||
|
|
35344
|
+
return t.languageDataAt("closeBrackets", e)[0] || xl;
|
|
35345
35345
|
}
|
|
35346
35346
|
const oj = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), ij = /* @__PURE__ */ Ce.inputHandler.of((t, e, n, r) => {
|
|
35347
35347
|
if ((oj ? t.composing : t.compositionStarted) || t.state.readOnly)
|
|
@@ -35354,7 +35354,7 @@ const oj = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navi
|
|
|
35354
35354
|
}), sj = ({ state: t, dispatch: e }) => {
|
|
35355
35355
|
if (t.readOnly)
|
|
35356
35356
|
return !1;
|
|
35357
|
-
let r = u_(t, t.selection.main.head).brackets ||
|
|
35357
|
+
let r = u_(t, t.selection.main.head).brackets || xl.brackets, o = null, i = t.changeByRange((s) => {
|
|
35358
35358
|
if (s.empty) {
|
|
35359
35359
|
let a = cj(t.doc, s.head);
|
|
35360
35360
|
for (let l of r)
|
|
@@ -35371,11 +35371,11 @@ const oj = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navi
|
|
|
35371
35371
|
{ key: "Backspace", run: sj }
|
|
35372
35372
|
];
|
|
35373
35373
|
function lj(t, e) {
|
|
35374
|
-
let n = u_(t, t.selection.main.head), r = n.brackets ||
|
|
35374
|
+
let n = u_(t, t.selection.main.head), r = n.brackets || xl.brackets;
|
|
35375
35375
|
for (let o of r) {
|
|
35376
35376
|
let i = c_(Mn(o, 0));
|
|
35377
35377
|
if (e == o)
|
|
35378
|
-
return i == o ? fj(t, o, r.indexOf(o + o + o) > -1, n) : uj(t, o, i, n.before ||
|
|
35378
|
+
return i == o ? fj(t, o, r.indexOf(o + o + o) > -1, n) : uj(t, o, i, n.before || xl.before);
|
|
35379
35379
|
if (e == i && d_(t, t.selection.main.from))
|
|
35380
35380
|
return dj(t, o, i);
|
|
35381
35381
|
}
|
|
@@ -35426,7 +35426,7 @@ function dj(t, e, n) {
|
|
|
35426
35426
|
});
|
|
35427
35427
|
}
|
|
35428
35428
|
function fj(t, e, n, r) {
|
|
35429
|
-
let o = r.stringPrefixes ||
|
|
35429
|
+
let o = r.stringPrefixes || xl.stringPrefixes, i = null, s = t.changeByRange((a) => {
|
|
35430
35430
|
if (!a.empty)
|
|
35431
35431
|
return {
|
|
35432
35432
|
changes: [{ insert: e, from: a.from }, { insert: e, from: a.to }],
|
|
@@ -35535,7 +35535,7 @@ class ki {
|
|
|
35535
35535
|
this.diagnostics = e, this.panel = n, this.selected = r;
|
|
35536
35536
|
}
|
|
35537
35537
|
static init(e, n, r) {
|
|
35538
|
-
let o = r.facet(
|
|
35538
|
+
let o = r.facet(kl).markerFilter;
|
|
35539
35539
|
o && (e = o(e, r));
|
|
35540
35540
|
let i = e.slice().sort((h, m) => h.from - m.from || h.to - m.to), s = new Io(), a = [], l = 0, c = r.doc.iter(), u = 0, d = r.doc.length;
|
|
35541
35541
|
for (let h = 0; ; ) {
|
|
@@ -35611,7 +35611,7 @@ function Js(t, e = null, n = 0) {
|
|
|
35611
35611
|
}), r;
|
|
35612
35612
|
}
|
|
35613
35613
|
function mj(t, e) {
|
|
35614
|
-
let n = e.pos, r = e.end || n, o = t.state.facet(
|
|
35614
|
+
let n = e.pos, r = e.end || n, o = t.state.facet(kl).hideOn(t, n, r);
|
|
35615
35615
|
if (o != null)
|
|
35616
35616
|
return o;
|
|
35617
35617
|
let i = t.startState.doc.lineAt(e.pos);
|
|
@@ -35631,17 +35631,17 @@ const p_ = /* @__PURE__ */ Ve.define(), m0 = /* @__PURE__ */ Ve.define(), m_ = /
|
|
|
35631
35631
|
let i = e.changes.mapPos(t.selected.from, 1);
|
|
35632
35632
|
r = Js(n, t.selected.diagnostic, i) || Js(n, null, i);
|
|
35633
35633
|
}
|
|
35634
|
-
!n.size && o && e.state.facet(
|
|
35634
|
+
!n.size && o && e.state.facet(kl).autoPanel && (o = null), t = new ki(n, o, r);
|
|
35635
35635
|
}
|
|
35636
35636
|
for (let n of e.effects)
|
|
35637
35637
|
if (n.is(p_)) {
|
|
35638
|
-
let r = e.state.facet(
|
|
35638
|
+
let r = e.state.facet(kl).autoPanel ? n.value.length ? El.open : null : t.panel;
|
|
35639
35639
|
t = ki.init(n.value, r, e.state);
|
|
35640
|
-
} else n.is(m0) ? t = new ki(t.diagnostics, n.value ?
|
|
35640
|
+
} else n.is(m0) ? t = new ki(t.diagnostics, n.value ? El.open : null, t.selected) : n.is(m_) && (t = new ki(t.diagnostics, t.panel, n.value));
|
|
35641
35641
|
return t;
|
|
35642
35642
|
},
|
|
35643
35643
|
provide: (t) => [
|
|
35644
|
-
|
|
35644
|
+
wl.from(t, (e) => e.panel),
|
|
35645
35645
|
Ce.decorations.from(t, (e) => e.diagnostics)
|
|
35646
35646
|
]
|
|
35647
35647
|
}), wj = /* @__PURE__ */ _e.mark({ class: "cm-lintRange cm-lintRange-active" });
|
|
@@ -35651,7 +35651,7 @@ function vj(t, e, n) {
|
|
|
35651
35651
|
if (e >= l && e <= c && (l == c || (e > l || n > 0) && (e < c || n < 0)))
|
|
35652
35652
|
return o = u.diagnostics, i = l, s = c, !1;
|
|
35653
35653
|
});
|
|
35654
|
-
let a = t.state.facet(
|
|
35654
|
+
let a = t.state.facet(kl).tooltipFilter;
|
|
35655
35655
|
return o && a && (o = a(o, t.state)), o ? {
|
|
35656
35656
|
pos: i,
|
|
35657
35657
|
end: s,
|
|
@@ -35667,7 +35667,7 @@ function yj(t, e) {
|
|
|
35667
35667
|
const bj = (t) => {
|
|
35668
35668
|
let e = t.state.field(or, !1);
|
|
35669
35669
|
(!e || !e.panel) && t.dispatch({ effects: gj(t.state, [m0.of(!0)]) });
|
|
35670
|
-
let n = Jw(t,
|
|
35670
|
+
let n = Jw(t, El.open);
|
|
35671
35671
|
return n && n.dom.querySelector(".cm-panel-lint ul").focus(), !0;
|
|
35672
35672
|
}, GC = (t) => {
|
|
35673
35673
|
let e = t.state.field(or, !1);
|
|
@@ -35681,7 +35681,7 @@ const bj = (t) => {
|
|
|
35681
35681
|
}, xj = [
|
|
35682
35682
|
{ key: "Mod-Shift-m", run: bj, preventDefault: !0 },
|
|
35683
35683
|
{ key: "F8", run: Cj }
|
|
35684
|
-
],
|
|
35684
|
+
], kl = /* @__PURE__ */ De.define({
|
|
35685
35685
|
combine(t) {
|
|
35686
35686
|
return {
|
|
35687
35687
|
sources: t.map((e) => e.source).filter((e) => e != null),
|
|
@@ -35760,7 +35760,7 @@ class XC {
|
|
|
35760
35760
|
this.diagnostic = n, this.id = "item_" + Math.floor(Math.random() * 4294967295).toString(16), this.dom = w_(e, n, !0), this.dom.id = this.id, this.dom.setAttribute("role", "option");
|
|
35761
35761
|
}
|
|
35762
35762
|
}
|
|
35763
|
-
class
|
|
35763
|
+
class El {
|
|
35764
35764
|
constructor(e) {
|
|
35765
35765
|
this.view = e, this.items = [];
|
|
35766
35766
|
let n = (o) => {
|
|
@@ -35870,7 +35870,7 @@ class kl {
|
|
|
35870
35870
|
});
|
|
35871
35871
|
}
|
|
35872
35872
|
static open(e) {
|
|
35873
|
-
return new
|
|
35873
|
+
return new El(e);
|
|
35874
35874
|
}
|
|
35875
35875
|
}
|
|
35876
35876
|
function Ej(t, e = 'viewBox="0 0 40 40"') {
|
|
@@ -36059,7 +36059,7 @@ const _j = "#e5c07b", JC = "#e06c75", Nj = "#56b6c2", Tj = "#ffffff", ku = "#abb
|
|
|
36059
36059
|
color: ku
|
|
36060
36060
|
}
|
|
36061
36061
|
}
|
|
36062
|
-
}, { dark: !0 }), Lj = /* @__PURE__ */
|
|
36062
|
+
}, { dark: !0 }), Lj = /* @__PURE__ */ aa.define([
|
|
36063
36063
|
{
|
|
36064
36064
|
tag: $.keyword,
|
|
36065
36065
|
color: Fj
|
|
@@ -37404,7 +37404,7 @@ const { Option: D7 } = Xe, { Text: A7, Title: Bee } = un, O7 = (t) => !!(t && /^
|
|
|
37404
37404
|
placeholder: J("components.authTokenField.placeholder")
|
|
37405
37405
|
}
|
|
37406
37406
|
),
|
|
37407
|
-
/* @__PURE__ */ p(Ke, { title: J("components.authTokenField.copy"), children: /* @__PURE__ */ p(ae, { icon: /* @__PURE__ */ p(
|
|
37407
|
+
/* @__PURE__ */ p(Ke, { title: J("components.authTokenField.copy"), children: /* @__PURE__ */ p(ae, { icon: /* @__PURE__ */ p(Zs, {}), onClick: u, disabled: r || !o }) }),
|
|
37408
37408
|
/* @__PURE__ */ p(
|
|
37409
37409
|
Ke,
|
|
37410
37410
|
{
|
|
@@ -37487,7 +37487,7 @@ const { Option: D7 } = Xe, { Text: A7, Title: Bee } = un, O7 = (t) => !!(t && /^
|
|
|
37487
37487
|
placeholder: J("components.authTokenField.placeholder")
|
|
37488
37488
|
}
|
|
37489
37489
|
),
|
|
37490
|
-
/* @__PURE__ */ p(Ke, { title: J("components.authTokenField.copy"), children: /* @__PURE__ */ p(ae, { icon: /* @__PURE__ */ p(
|
|
37490
|
+
/* @__PURE__ */ p(Ke, { title: J("components.authTokenField.copy"), children: /* @__PURE__ */ p(ae, { icon: /* @__PURE__ */ p(Zs, {}), onClick: u, disabled: r || !o }) }),
|
|
37491
37491
|
/* @__PURE__ */ p(
|
|
37492
37492
|
Ke,
|
|
37493
37493
|
{
|
|
@@ -37659,7 +37659,7 @@ const { Option: D7 } = Xe, { Text: A7, Title: Bee } = un, O7 = (t) => !!(t && /^
|
|
|
37659
37659
|
ae,
|
|
37660
37660
|
{
|
|
37661
37661
|
type: "text",
|
|
37662
|
-
icon: /* @__PURE__ */ p(
|
|
37662
|
+
icon: /* @__PURE__ */ p(Zs, {}),
|
|
37663
37663
|
onClick: E,
|
|
37664
37664
|
disabled: r,
|
|
37665
37665
|
children: J("components.selectOAuth2ClientField.copy")
|
|
@@ -38024,8 +38024,8 @@ const rV = (t) => ({
|
|
|
38024
38024
|
};
|
|
38025
38025
|
});
|
|
38026
38026
|
a(
|
|
38027
|
-
(O) =>
|
|
38028
|
-
), c((O) =>
|
|
38027
|
+
(O) => Ya(O, b) ? O : b
|
|
38028
|
+
), c((O) => Ya(O, x) ? O : x);
|
|
38029
38029
|
} catch (y) {
|
|
38030
38030
|
console.error("Failed to fetch variables:", y);
|
|
38031
38031
|
} finally {
|
|
@@ -39108,7 +39108,7 @@ const iW = /{{(.*?)}}/, sW = (t, e) => t ? t.split(e).map((n, r) => r % 2 ? { ty
|
|
|
39108
39108
|
},
|
|
39109
39109
|
{ text: "" }
|
|
39110
39110
|
];
|
|
39111
|
-
|
|
39111
|
+
de.insertNodes(t, r, n);
|
|
39112
39112
|
}, cW = (t, e) => [...t.slice(0, -1), t[t.length - 1] + e], uW = ({ attributes: t, element: e, children: n }) => /* @__PURE__ */ p("p", { ...t, children: n }), dW = ({
|
|
39113
39113
|
attributes: t,
|
|
39114
39114
|
element: e,
|
|
@@ -39187,11 +39187,11 @@ const iW = /{{(.*?)}}/, sW = (t, e) => t ? t.split(e).map((n, r) => r % 2 ? { ty
|
|
|
39187
39187
|
const a = be.string(i), l = lW(a, e);
|
|
39188
39188
|
if (l) {
|
|
39189
39189
|
const { tagContent: c, tagLength: u, tagStartIndex: d, isTagLastItem: f } = l, h = { path: s, offset: d };
|
|
39190
|
-
|
|
39190
|
+
de.delete(t, {
|
|
39191
39191
|
at: h,
|
|
39192
39192
|
distance: u,
|
|
39193
39193
|
unit: "character"
|
|
39194
|
-
}), x_(t, c, { at: h }), f &&
|
|
39194
|
+
}), x_(t, c, { at: h }), f && de.select(t, {
|
|
39195
39195
|
path: cW(s, 1),
|
|
39196
39196
|
offset: 0
|
|
39197
39197
|
});
|
|
@@ -39247,13 +39247,13 @@ const iW = /{{(.*?)}}/, sW = (t, e) => t ? t.split(e).map((n, r) => r % 2 ? { ty
|
|
|
39247
39247
|
const b = mW(E);
|
|
39248
39248
|
b !== m && (m = E, h(E), t(b));
|
|
39249
39249
|
}, []), y = (E) => {
|
|
39250
|
-
|
|
39250
|
+
de.delete(d, { at: [0] });
|
|
39251
39251
|
const b = Uc(E, l);
|
|
39252
|
-
d.children = Uc("", l),
|
|
39252
|
+
d.children = Uc("", l), de.insertNodes(d, b, { at: [0] });
|
|
39253
39253
|
}, g = (E) => {
|
|
39254
39254
|
x_(d, E, {
|
|
39255
39255
|
at: u.current.focus
|
|
39256
|
-
}),
|
|
39256
|
+
}), de.move(d, {
|
|
39257
39257
|
distance: f.length - 1
|
|
39258
39258
|
});
|
|
39259
39259
|
};
|
|
@@ -40121,10 +40121,10 @@ const FW = [
|
|
|
40121
40121
|
return o === "EQUALS" ? s === i : s !== i;
|
|
40122
40122
|
}) : !0;
|
|
40123
40123
|
}, S_ = Zt((t, e) => {
|
|
40124
|
-
var
|
|
40124
|
+
var ue, R, U, Y, X;
|
|
40125
40125
|
const { action: n, connector: r, nodeId: o, account_id: i, mcpMode: s } = t, a = pn(), l = vr(), c = Gn({
|
|
40126
40126
|
proxyId: "0"
|
|
40127
|
-
}), { config_schema: u, proxy_id: d, protocol: f } = n, h = n.action_key || n.nodeKey, m = n.action_ver ?? n.nodeVersion ?? ((
|
|
40127
|
+
}), { config_schema: u, proxy_id: d, protocol: f } = n, h = n.action_key || n.nodeKey, m = n.action_ver ?? n.nodeVersion ?? ((ue = n.node_schema) == null ? void 0 : ue.version), w = n.node_schema, v = Array.isArray(u == null ? void 0 : u.sub_params), y = ce(() => v || !h ? null : `${h}@${m ?? "latest"}`, [v, h, m]), g = y ? `${o}:${y}` : o, C = n.account_id ?? i, E = !v && ((R = w == null ? void 0 : w.input_fields) != null && R.length || (U = w == null ? void 0 : w.credentials) != null && U.length) ? w : null, [b, k] = Z(
|
|
40128
40128
|
() => y && E ? {
|
|
40129
40129
|
identity: y,
|
|
40130
40130
|
schema: E,
|
|
@@ -40514,7 +40514,7 @@ const FW = [
|
|
|
40514
40514
|
)
|
|
40515
40515
|
] });
|
|
40516
40516
|
}),
|
|
40517
|
-
(t, e) => t.nodeId === e.nodeId &&
|
|
40517
|
+
(t, e) => t.nodeId === e.nodeId && Ya(Ls(t.data, ["isHovered"]), Ls(e.data, ["isHovered"]))
|
|
40518
40518
|
), D_ = [
|
|
40519
40519
|
{ operator: ot.eq, label: J("common.eq") },
|
|
40520
40520
|
{ operator: ot.ne, label: J("common.ne") },
|
|
@@ -40894,7 +40894,7 @@ const y0 = (t) => t === ot.is_null || t === ot.is_not_null, HW = (t, e = "") =>
|
|
|
40894
40894
|
l(a === "dark" ? "light" : "dark");
|
|
40895
40895
|
}, [a]), d ? /* @__PURE__ */ M("div", { className: `json-renderer ${a} ${o}`, children: [
|
|
40896
40896
|
/* @__PURE__ */ p("div", { className: "json-toolbar", children: /* @__PURE__ */ M(Ye, { children: [
|
|
40897
|
-
n && /* @__PURE__ */ p(Ke, { title: u.copy, children: /* @__PURE__ */ p(ae, { icon: /* @__PURE__ */ p(
|
|
40897
|
+
n && /* @__PURE__ */ p(Ke, { title: u.copy, children: /* @__PURE__ */ p(ae, { icon: /* @__PURE__ */ p(Zs, {}), size: "small", onClick: h }) }),
|
|
40898
40898
|
/* @__PURE__ */ p(Ke, { title: u.download, children: /* @__PURE__ */ p(ae, { icon: /* @__PURE__ */ p(FT, {}), size: "small", onClick: m }) })
|
|
40899
40899
|
] }) }),
|
|
40900
40900
|
/* @__PURE__ */ p(
|
|
@@ -41068,7 +41068,7 @@ const y0 = (t) => t === ot.is_null || t === ot.is_not_null, HW = (t, e = "") =>
|
|
|
41068
41068
|
}
|
|
41069
41069
|
),
|
|
41070
41070
|
u.isError && u.showErrorAlert && /* @__PURE__ */ p(
|
|
41071
|
-
|
|
41071
|
+
Ja,
|
|
41072
41072
|
{
|
|
41073
41073
|
className: "error-alert",
|
|
41074
41074
|
showIcon: !0,
|
|
@@ -41084,7 +41084,7 @@ const y0 = (t) => t === ot.is_null || t === ot.is_not_null, HW = (t, e = "") =>
|
|
|
41084
41084
|
}
|
|
41085
41085
|
),
|
|
41086
41086
|
!u.isError && u.successShown && a && !u.testing && /* @__PURE__ */ p(
|
|
41087
|
-
|
|
41087
|
+
Ja,
|
|
41088
41088
|
{
|
|
41089
41089
|
className: "success-alert",
|
|
41090
41090
|
showIcon: !0,
|
|
@@ -42444,7 +42444,7 @@ const y0 = (t) => t === ot.is_null || t === ot.is_not_null, HW = (t, e = "") =>
|
|
|
42444
42444
|
}
|
|
42445
42445
|
);
|
|
42446
42446
|
},
|
|
42447
|
-
(t, e) =>
|
|
42447
|
+
(t, e) => Ya(Ls(t, ["isHovered"]), Ls(e, ["isHovered"]))
|
|
42448
42448
|
), { Text: h1 } = un, { TextArea: oU } = qe, iU = ({
|
|
42449
42449
|
title: t,
|
|
42450
42450
|
description: e,
|
|
@@ -42500,7 +42500,7 @@ const y0 = (t) => t === ot.is_null || t === ot.is_not_null, HW = (t, e = "") =>
|
|
|
42500
42500
|
placeholder: "请输入备注...",
|
|
42501
42501
|
autoSize: { minRows: 1, maxRows: 4 },
|
|
42502
42502
|
autoFocus: !0,
|
|
42503
|
-
className: "workflow-node-note-editor
|
|
42503
|
+
className: "workflow-node-note-editor nodrag"
|
|
42504
42504
|
}
|
|
42505
42505
|
) }) : h ? /* @__PURE__ */ M(
|
|
42506
42506
|
"div",
|
|
@@ -42564,7 +42564,7 @@ const y0 = (t) => t === ot.is_null || t === ot.is_not_null, HW = (t, e = "") =>
|
|
|
42564
42564
|
placeholder: "请输入备注...",
|
|
42565
42565
|
autoSize: { minRows: 1, maxRows: 4 },
|
|
42566
42566
|
autoFocus: !0,
|
|
42567
|
-
className: "workflow-node-note-editor
|
|
42567
|
+
className: "workflow-node-note-editor nodrag"
|
|
42568
42568
|
}
|
|
42569
42569
|
) : u ? /* @__PURE__ */ M(
|
|
42570
42570
|
"div",
|
|
@@ -42601,7 +42601,7 @@ const y0 = (t) => t === ot.is_null || t === ot.is_not_null, HW = (t, e = "") =>
|
|
|
42601
42601
|
className: o,
|
|
42602
42602
|
type: i
|
|
42603
42603
|
}) => {
|
|
42604
|
-
const { handleNodeDataUpdate: s } = ho(), { addNodes: a, getNodes: l } =
|
|
42604
|
+
const { handleNodeDataUpdate: s } = ho(), { addNodes: a, getNodes: l } = ra(), c = pn(), u = Oo(t), d = It(), f = ce(() => {
|
|
42605
42605
|
var D;
|
|
42606
42606
|
const k = c.nodeTypes;
|
|
42607
42607
|
if (!u) return;
|
|
@@ -42808,7 +42808,7 @@ const y0 = (t) => t === ot.is_null || t === ot.is_not_null, HW = (t, e = "") =>
|
|
|
42808
42808
|
className: r,
|
|
42809
42809
|
type: o
|
|
42810
42810
|
}) => {
|
|
42811
|
-
const { handleNodeDataUpdate: i } = ho(), { addNodes: s, getNodes: a } =
|
|
42811
|
+
const { handleNodeDataUpdate: i } = ho(), { addNodes: s, getNodes: a } = ra(), { handleNodesDelete: l } = xf(), c = pn(), u = Oo(t), d = It(), f = ce(() => {
|
|
42812
42812
|
var O;
|
|
42813
42813
|
const k = c.nodeTypes;
|
|
42814
42814
|
if (!u) return;
|
|
@@ -43397,13 +43397,13 @@ const is = {
|
|
|
43397
43397
|
transition: "all 0.2s ease",
|
|
43398
43398
|
background: r ? "rgba(0, 127, 255, 0.08)" : "#fff"
|
|
43399
43399
|
}, children: [
|
|
43400
|
-
/* @__PURE__ */ p(
|
|
43400
|
+
/* @__PURE__ */ p(Xa, { type: "target", position: Ie.Top, style: { background: "#555" }, id: "input" }),
|
|
43401
43401
|
/* @__PURE__ */ M("div", { className: "node-content", children: [
|
|
43402
43402
|
/* @__PURE__ */ p("div", { className: "node-title", children: t.name || "Node" }),
|
|
43403
43403
|
t.description && /* @__PURE__ */ p("div", { className: "node-description", children: t.description }),
|
|
43404
43404
|
r && /* @__PURE__ */ p("div", { className: "hover-indicator", children: /* @__PURE__ */ p("span", { className: "hover-badge", children: "悬停中" }) })
|
|
43405
43405
|
] }),
|
|
43406
|
-
/* @__PURE__ */ p(
|
|
43406
|
+
/* @__PURE__ */ p(Xa, { type: "source", position: Ie.Bottom, style: { background: "#555" }, id: "output" })
|
|
43407
43407
|
] });
|
|
43408
43408
|
}), { Option: Iee } = Xe, yU = (t) => {
|
|
43409
43409
|
const { id: e, data: n, selected: r } = t, o = n;
|
|
@@ -43531,13 +43531,13 @@ const is = {
|
|
|
43531
43531
|
}
|
|
43532
43532
|
);
|
|
43533
43533
|
}, kU = br(xU), F_ = () => {
|
|
43534
|
-
const t = rT(), e = It(), { openNodeSelector: n } =
|
|
43534
|
+
const t = rT(), e = It(), { openNodeSelector: n } = fa(), r = (o) => {
|
|
43535
43535
|
o.stopPropagation(), n({ trigger: !0 });
|
|
43536
43536
|
};
|
|
43537
43537
|
return t.some((o) => {
|
|
43538
43538
|
var i;
|
|
43539
43539
|
return (i = o.type) == null ? void 0 : i.includes(Q.TRIGGER);
|
|
43540
|
-
}) || !e ? null : /* @__PURE__ */ M("div", { onClick: r, className: "
|
|
43540
|
+
}) || !e ? null : /* @__PURE__ */ M("div", { onClick: r, className: "nodrag nopan start-node", children: [
|
|
43541
43541
|
/* @__PURE__ */ p("div", { className: "start-node-icon", children: /* @__PURE__ */ p(Es, {}) }),
|
|
43542
43542
|
/* @__PURE__ */ M("div", { className: "start-node-text", children: [
|
|
43543
43543
|
/* @__PURE__ */ p("h3", { className: "start-node-text-title", children: "添加触发节点" }),
|
|
@@ -43554,7 +43554,7 @@ function g1(t, e) {
|
|
|
43554
43554
|
r++, o = n.indexOf(e, o + e.length);
|
|
43555
43555
|
return r;
|
|
43556
43556
|
}
|
|
43557
|
-
const
|
|
43557
|
+
const Sl = Ef(/[A-Za-z]/), b0 = Ef(/[\dA-Za-z]/);
|
|
43558
43558
|
function EU(t) {
|
|
43559
43559
|
return (
|
|
43560
43560
|
// Special whitespace codes (which have negative values), C0 and Control
|
|
@@ -44255,7 +44255,7 @@ function Dq(t) {
|
|
|
44255
44255
|
);
|
|
44256
44256
|
return e;
|
|
44257
44257
|
}
|
|
44258
|
-
function
|
|
44258
|
+
function Dl(t) {
|
|
44259
44259
|
return "&#x" + t.toString(16).toUpperCase() + ";";
|
|
44260
44260
|
}
|
|
44261
44261
|
function kd(t) {
|
|
@@ -44312,9 +44312,9 @@ function z_(t, e, n, r) {
|
|
|
44312
44312
|
c,
|
|
44313
44313
|
o
|
|
44314
44314
|
);
|
|
44315
|
-
u.inside && (l =
|
|
44315
|
+
u.inside && (l = Dl(c) + l.slice(1));
|
|
44316
44316
|
const d = l.charCodeAt(l.length - 1), f = Ed(r.after.charCodeAt(0), d, o);
|
|
44317
|
-
f.inside && (l = l.slice(0, -1) +
|
|
44317
|
+
f.inside && (l = l.slice(0, -1) + Dl(d));
|
|
44318
44318
|
const h = s.move(o);
|
|
44319
44319
|
return i(), n.attentionEncodeSurroundingInfo = {
|
|
44320
44320
|
after: f.outside,
|
|
@@ -44392,7 +44392,7 @@ function Bq(t, e, n, r) {
|
|
|
44392
44392
|
`,
|
|
44393
44393
|
...i.current()
|
|
44394
44394
|
});
|
|
44395
|
-
return /^[\t ]/.test(c) && (c =
|
|
44395
|
+
return /^[\t ]/.test(c) && (c = Dl(c.charCodeAt(0)) + c.slice(1)), c = c ? s + " " + c : s, n.options.closeAtx && (c += " " + s), l(), a(), c;
|
|
44396
44396
|
}
|
|
44397
44397
|
W_.peek = Iq;
|
|
44398
44398
|
function W_(t) {
|
|
@@ -44702,9 +44702,9 @@ function Q_(t, e, n, r) {
|
|
|
44702
44702
|
c,
|
|
44703
44703
|
o
|
|
44704
44704
|
);
|
|
44705
|
-
u.inside && (l =
|
|
44705
|
+
u.inside && (l = Dl(c) + l.slice(1));
|
|
44706
44706
|
const d = l.charCodeAt(l.length - 1), f = Ed(r.after.charCodeAt(0), d, o);
|
|
44707
|
-
f.inside && (l = l.slice(0, -1) +
|
|
44707
|
+
f.inside && (l = l.slice(0, -1) + Dl(d));
|
|
44708
44708
|
const h = s.move(o + o);
|
|
44709
44709
|
return i(), n.attentionEncodeSurroundingInfo = {
|
|
44710
44710
|
after: f.outside,
|
|
@@ -45053,7 +45053,7 @@ function wG(t, e, n) {
|
|
|
45053
45053
|
return t.consume(d), o = !0, l;
|
|
45054
45054
|
}
|
|
45055
45055
|
function u(d) {
|
|
45056
|
-
return i && o &&
|
|
45056
|
+
return i && o && Sl(r.previous) ? (t.exit("literalAutolinkEmail"), t.exit("literalAutolink"), e(d)) : n(d);
|
|
45057
45057
|
}
|
|
45058
45058
|
}
|
|
45059
45059
|
function vG(t, e, n) {
|
|
@@ -45074,7 +45074,7 @@ function yG(t, e, n) {
|
|
|
45074
45074
|
return (d === 72 || d === 104) && sN.call(r, r.previous) && !k0(r.events) ? (t.enter("literalAutolink"), t.enter("literalAutolinkHttp"), o += String.fromCodePoint(d), t.consume(d), a) : n(d);
|
|
45075
45075
|
}
|
|
45076
45076
|
function a(d) {
|
|
45077
|
-
if (
|
|
45077
|
+
if (Sl(d) && o.length < 5)
|
|
45078
45078
|
return o += String.fromCodePoint(d), t.consume(d), a;
|
|
45079
45079
|
if (d === 58) {
|
|
45080
45080
|
const f = o.toLowerCase();
|
|
@@ -45139,10 +45139,10 @@ function kG(t, e, n) {
|
|
|
45139
45139
|
return a === null || a === 40 || a === 91 || qn(a) || Xi(a) ? e(a) : r(a);
|
|
45140
45140
|
}
|
|
45141
45141
|
function i(a) {
|
|
45142
|
-
return
|
|
45142
|
+
return Sl(a) ? s(a) : n(a);
|
|
45143
45143
|
}
|
|
45144
45144
|
function s(a) {
|
|
45145
|
-
return a === 59 ? (t.consume(a), r) :
|
|
45145
|
+
return a === 59 ? (t.consume(a), r) : Sl(a) ? (t.consume(a), s) : n(a);
|
|
45146
45146
|
}
|
|
45147
45147
|
}
|
|
45148
45148
|
function EG(t, e, n) {
|
|
@@ -45158,7 +45158,7 @@ function iN(t) {
|
|
|
45158
45158
|
return t === null || t === 40 || t === 42 || t === 95 || t === 91 || t === 93 || t === 126 || qn(t);
|
|
45159
45159
|
}
|
|
45160
45160
|
function sN(t) {
|
|
45161
|
-
return !
|
|
45161
|
+
return !Sl(t);
|
|
45162
45162
|
}
|
|
45163
45163
|
function aN(t) {
|
|
45164
45164
|
return !(t === 47 || Lg(t));
|
|
@@ -45794,7 +45794,7 @@ const cN = `
|
|
|
45794
45794
|
return op;
|
|
45795
45795
|
}
|
|
45796
45796
|
return op;
|
|
45797
|
-
}, [i == null ? void 0 : i.value]), { handleNodeDataUpdate: l } = ho(), [c, u] = Z(!1), [d, f] = Z(a.content), [h, m] = Z(a.content), [w, v] = Z(a.color), { addNodes: y, getNodes: g } =
|
|
45797
|
+
}, [i == null ? void 0 : i.value]), { handleNodeDataUpdate: l } = ho(), [c, u] = Z(!1), [d, f] = Z(a.content), [h, m] = Z(a.content), [w, v] = Z(a.color), { addNodes: y, getNodes: g } = ra(), { handleNodesDelete: C } = xf(), E = pn();
|
|
45798
45798
|
le(() => {
|
|
45799
45799
|
f(a.content), v(a.color);
|
|
45800
45800
|
}, [a.content, a.color]);
|
|
@@ -45908,7 +45908,7 @@ const cN = `
|
|
|
45908
45908
|
} catch (j) {
|
|
45909
45909
|
he.error("便签复制失败"), console.error("复制便签失败:", j);
|
|
45910
45910
|
}
|
|
45911
|
-
}, children: /* @__PURE__ */ p(
|
|
45911
|
+
}, children: /* @__PURE__ */ p(Zs, {}) }),
|
|
45912
45912
|
/* @__PURE__ */ p(
|
|
45913
45913
|
"div",
|
|
45914
45914
|
{
|
|
@@ -46174,7 +46174,7 @@ class sr {
|
|
|
46174
46174
|
}), n;
|
|
46175
46175
|
}
|
|
46176
46176
|
}
|
|
46177
|
-
const
|
|
46177
|
+
const _a = [
|
|
46178
46178
|
// {
|
|
46179
46179
|
// type: NodeType.START,
|
|
46180
46180
|
// id: 'PLACEHOLDER_NODE',
|
|
@@ -46182,7 +46182,7 @@ const Oa = [
|
|
|
46182
46182
|
// data: { type: NodeType.START, name: '开始', nodeId:'PLACEHOLDER_NODE', id: 'PLACEHOLDER_NODE', description: '开始节点' },
|
|
46183
46183
|
// }
|
|
46184
46184
|
], tK = {
|
|
46185
|
-
nodes:
|
|
46185
|
+
nodes: _a,
|
|
46186
46186
|
edges: [],
|
|
46187
46187
|
selectedNodes: [],
|
|
46188
46188
|
selectedEdges: [],
|
|
@@ -46210,7 +46210,7 @@ const Oa = [
|
|
|
46210
46210
|
// 应用节点变更
|
|
46211
46211
|
applyNodesChanges: (t, e) => {
|
|
46212
46212
|
const n = Zx(e.payload, t.nodes);
|
|
46213
|
-
t.nodes = n.length > 0 ? n :
|
|
46213
|
+
t.nodes = n.length > 0 ? n : _a;
|
|
46214
46214
|
},
|
|
46215
46215
|
// 应用边变更
|
|
46216
46216
|
applyEdgesChanges: (t, e) => {
|
|
@@ -46239,7 +46239,7 @@ const Oa = [
|
|
|
46239
46239
|
// 添加多个节点
|
|
46240
46240
|
addNodes: (t, e) => {
|
|
46241
46241
|
const n = t.nodes.concat(e.payload);
|
|
46242
|
-
t.nodes = n.length > 0 ? n.filter((r) => r.id !== "PLACEHOLDER_NODE") :
|
|
46242
|
+
t.nodes = n.length > 0 ? n.filter((r) => r.id !== "PLACEHOLDER_NODE") : _a;
|
|
46243
46243
|
},
|
|
46244
46244
|
// 添加多个边
|
|
46245
46245
|
addEdges: (t, e) => {
|
|
@@ -46251,7 +46251,7 @@ const Oa = [
|
|
|
46251
46251
|
// 移除节点
|
|
46252
46252
|
removeNodes: (t, e) => {
|
|
46253
46253
|
const n = e.payload, r = t.nodes.filter((o) => !n.includes(o.id));
|
|
46254
|
-
t.nodes = r.length > 0 ? r :
|
|
46254
|
+
t.nodes = r.length > 0 ? r : _a, t.edges = t.edges.filter(
|
|
46255
46255
|
(o) => !n.includes(o.source) && !n.includes(o.target)
|
|
46256
46256
|
);
|
|
46257
46257
|
},
|
|
@@ -46280,7 +46280,7 @@ const Oa = [
|
|
|
46280
46280
|
},
|
|
46281
46281
|
// 直接设置节点 - 新增
|
|
46282
46282
|
setNodes: (t, e) => {
|
|
46283
|
-
t.nodes = e.payload.length > 0 ? e.payload :
|
|
46283
|
+
t.nodes = e.payload.length > 0 ? e.payload : _a;
|
|
46284
46284
|
},
|
|
46285
46285
|
// 直接设置边 - 新增
|
|
46286
46286
|
setEdges: (t, e) => {
|
|
@@ -46328,7 +46328,7 @@ const Oa = [
|
|
|
46328
46328
|
setNodes: dK,
|
|
46329
46329
|
setEdges: fK,
|
|
46330
46330
|
updateNode: hK,
|
|
46331
|
-
setFlowOpStatus:
|
|
46331
|
+
setFlowOpStatus: Qs,
|
|
46332
46332
|
refreshFlow: fN,
|
|
46333
46333
|
setCurrentNodeConfigVisibleId: pK,
|
|
46334
46334
|
setLocked: mK,
|
|
@@ -46347,9 +46347,9 @@ const Oa = [
|
|
|
46347
46347
|
ignoredPaths: ["panel.nodeAddCallback"]
|
|
46348
46348
|
}
|
|
46349
46349
|
})
|
|
46350
|
-
}),
|
|
46351
|
-
function
|
|
46352
|
-
const t =
|
|
46350
|
+
}), da = () => CT(), li = xT;
|
|
46351
|
+
function fa() {
|
|
46352
|
+
const t = da(), { nodeSelectorVisible: e, nodeAddInfo: n, nodeAddCallback: r } = li(
|
|
46353
46353
|
(c) => c.panel
|
|
46354
46354
|
), o = V(
|
|
46355
46355
|
(c) => {
|
|
@@ -46433,7 +46433,7 @@ function yK(t) {
|
|
|
46433
46433
|
};
|
|
46434
46434
|
}
|
|
46435
46435
|
const bK = () => {
|
|
46436
|
-
const t = pe(null), { nodeSelectorVisible: e, closeNodeSelector: n, handleNodeSelect: r, nodeAddInfo: o } =
|
|
46436
|
+
const t = pe(null), { nodeSelectorVisible: e, closeNodeSelector: n, handleNodeSelect: r, nodeAddInfo: o } = fa(), { groupedNodes: i, loading: s, searchText: a, setSearchText: l } = yK(e), c = V(
|
|
46437
46437
|
(u) => {
|
|
46438
46438
|
console.log(`[DIP] 选中节点: ${u.key} v${u.version}`);
|
|
46439
46439
|
const d = {
|
|
@@ -46579,8 +46579,8 @@ const Hg = () => {
|
|
|
46579
46579
|
animated: h = !1,
|
|
46580
46580
|
className: m = "workflow-main-edge"
|
|
46581
46581
|
}) => {
|
|
46582
|
-
var
|
|
46583
|
-
const w = Mo(), { removeEdges: v } = Hg(), { getNodes: y } =
|
|
46582
|
+
var ue, R;
|
|
46583
|
+
const w = Mo(), { removeEdges: v } = Hg(), { getNodes: y } = ra(), { openNodeSelector: g } = fa(), C = Oo(l), E = C == null ? void 0 : C.data, b = (E == null ? void 0 : E.status) || ye.IDLE, k = It(), S = Oo(u), x = S == null ? void 0 : S.data, O = NF.includes((R = (ue = x == null ? void 0 : x.protocol) == null ? void 0 : ue.toUpperCase) == null ? void 0 : R.call(ue)) || TF.includes(S == null ? void 0 : S.type), D = pn(), N = D.edgeRules, _ = ce(() => s === Ie.Left ? r + Qc : s === Ie.Right ? r - Qc : r, [r, s]), T = ce(() => s === Ie.Top ? o + Qc : s === Ie.Bottom ? o - Qc : o, [o, s]), B = ce(
|
|
46584
46584
|
() => e - kK > _,
|
|
46585
46585
|
[e, _]
|
|
46586
46586
|
), A = (a == null ? void 0 : a.connectionType) || "main", F = (a == null ? void 0 : a.isLoopEdge) || !1, P = EK.includes(S == null ? void 0 : S.type), j = SK.includes(S == null ? void 0 : S.type), { edgePath: z, labelX: G, labelY: q } = ce(() => {
|
|
@@ -46693,7 +46693,7 @@ const Hg = () => {
|
|
|
46693
46693
|
zIndex: 1e3,
|
|
46694
46694
|
pointerEvents: "all"
|
|
46695
46695
|
},
|
|
46696
|
-
className: "
|
|
46696
|
+
className: "nodrag nopan workflow-edge-buttons",
|
|
46697
46697
|
children: [
|
|
46698
46698
|
!j && (!N || N.allowAddNodeOnEdge !== !1) && /* @__PURE__ */ p(
|
|
46699
46699
|
"button",
|
|
@@ -46980,7 +46980,7 @@ const MK = Vt.getEdgeTypes(), PK = {
|
|
|
46980
46980
|
canvasApi: a
|
|
46981
46981
|
}) => {
|
|
46982
46982
|
var te, L;
|
|
46983
|
-
const l =
|
|
46983
|
+
const l = da(), c = It(), u = li((H) => H.workflow.workflowName), d = li((H) => H.workflow.op_status), [f, h] = Z(!1), [m, w] = Z(u), [v, y] = Z(!1), [g, C] = Z(!1), E = pe(null), { getNodes: b } = yr(), k = b(), S = pn(), x = S.toolbar, O = Mo(), D = S.history ?? Ds, N = ((te = k.filter((H) => H.type !== Q.START)) == null ? void 0 : te.length) > 0;
|
|
46984
46984
|
le(() => {
|
|
46985
46985
|
w(u);
|
|
46986
46986
|
}, [u]), le(() => {
|
|
@@ -47000,7 +47000,7 @@ const MK = Vt.getEdgeTypes(), PK = {
|
|
|
47000
47000
|
}, [l, m, u, O, g]), B = async () => {
|
|
47001
47001
|
y(!0);
|
|
47002
47002
|
try {
|
|
47003
|
-
await vF(O), he.success("上线成功"), l(
|
|
47003
|
+
await vF(O), he.success("上线成功"), l(Qs(rt.ONLINE));
|
|
47004
47004
|
} catch {
|
|
47005
47005
|
} finally {
|
|
47006
47006
|
y(!1);
|
|
@@ -47008,7 +47008,7 @@ const MK = Vt.getEdgeTypes(), PK = {
|
|
|
47008
47008
|
}, A = async () => {
|
|
47009
47009
|
y(!0);
|
|
47010
47010
|
try {
|
|
47011
|
-
await yF(O), he.success("下线成功"), l(
|
|
47011
|
+
await yF(O), he.success("下线成功"), l(Qs(rt.OFFLINE));
|
|
47012
47012
|
} catch {
|
|
47013
47013
|
} finally {
|
|
47014
47014
|
y(!1);
|
|
@@ -47021,12 +47021,12 @@ const MK = Vt.getEdgeTypes(), PK = {
|
|
|
47021
47021
|
}, z = async () => {
|
|
47022
47022
|
var ee;
|
|
47023
47023
|
const H = d === rt.ONLINE || d === rt.ON_WARN, K = () => {
|
|
47024
|
-
var ne,
|
|
47024
|
+
var ne, ue;
|
|
47025
47025
|
if ((ne = x == null ? void 0 : x.nav) != null && ne.onBack) {
|
|
47026
47026
|
x.nav.onBack();
|
|
47027
47027
|
return;
|
|
47028
47028
|
}
|
|
47029
|
-
if ((
|
|
47029
|
+
if ((ue = x == null ? void 0 : x.nav) != null && ue.backTo) {
|
|
47030
47030
|
D.push(x.nav.backTo);
|
|
47031
47031
|
return;
|
|
47032
47032
|
}
|
|
@@ -47061,7 +47061,7 @@ const MK = Vt.getEdgeTypes(), PK = {
|
|
|
47061
47061
|
return /* @__PURE__ */ M("div", { className: "workflow-canvas-header", children: [
|
|
47062
47062
|
P,
|
|
47063
47063
|
/* @__PURE__ */ p("div", { className: "workflow-heder-left-area", children: (() => {
|
|
47064
|
-
var K, ee, ne,
|
|
47064
|
+
var K, ee, ne, ue;
|
|
47065
47065
|
const H = [];
|
|
47066
47066
|
return ((K = x == null ? void 0 : x.nav) == null ? void 0 : K.showBack) !== !1 && H.push(
|
|
47067
47067
|
/* @__PURE__ */ p(
|
|
@@ -47126,7 +47126,7 @@ const MK = Vt.getEdgeTypes(), PK = {
|
|
|
47126
47126
|
)
|
|
47127
47127
|
] }),
|
|
47128
47128
|
/* @__PURE__ */ p(Nn, { type: "vertical" }),
|
|
47129
|
-
((ne = x == null ? void 0 : x.flowStatusTag) == null ? void 0 : ne.enabled) !== !1 && /* @__PURE__ */ p("span", { style: (
|
|
47129
|
+
((ne = x == null ? void 0 : x.flowStatusTag) == null ? void 0 : ne.enabled) !== !1 && /* @__PURE__ */ p("span", { style: (ue = x == null ? void 0 : x.flowStatusTag) == null ? void 0 : ue.style, children: /* @__PURE__ */ p(WK, { opStatus: d }) })
|
|
47130
47130
|
] }, "online-area")
|
|
47131
47131
|
), H.push(/* @__PURE__ */ p(Nn, { type: "vertical" }, "divider-status")), !c && !n && H.push(
|
|
47132
47132
|
/* @__PURE__ */ p(sp, { type: "secondary", children: "当前流为只读模式,如需编辑,请下线流程" }, "readonly-hint")
|
|
@@ -47821,6 +47821,9 @@ function oX({
|
|
|
47821
47821
|
refresh() {
|
|
47822
47822
|
t(fN());
|
|
47823
47823
|
},
|
|
47824
|
+
setFlowOpStatus(c) {
|
|
47825
|
+
t(Qs(c));
|
|
47826
|
+
},
|
|
47824
47827
|
getData() {
|
|
47825
47828
|
const { nodes: c, edges: u } = o.getState();
|
|
47826
47829
|
return {
|
|
@@ -50170,10 +50173,10 @@ function HX() {
|
|
|
50170
50173
|
d.pick(K, g)
|
|
50171
50174
|
)), L.nodes().forEach((ee) => {
|
|
50172
50175
|
let ne = te(L.node(ee));
|
|
50173
|
-
const
|
|
50176
|
+
const ue = q(ne, C);
|
|
50174
50177
|
Object.keys(E).forEach((R) => {
|
|
50175
|
-
|
|
50176
|
-
}), H.setNode(ee,
|
|
50178
|
+
ue[R] === void 0 && (ue[R] = E[R]);
|
|
50179
|
+
}), H.setNode(ee, ue), H.setParent(ee, L.parent(ee));
|
|
50177
50180
|
}), L.edges().forEach((ee) => {
|
|
50178
50181
|
let ne = te(L.edge(ee));
|
|
50179
50182
|
H.setEdge(ee, Object.assign(
|
|
@@ -50195,8 +50198,8 @@ function HX() {
|
|
|
50195
50198
|
L.edges().forEach((H) => {
|
|
50196
50199
|
let K = L.edge(H);
|
|
50197
50200
|
if (K.width && K.height) {
|
|
50198
|
-
let ee = L.node(H.v),
|
|
50199
|
-
d.addDummyNode(L, "edge-proxy",
|
|
50201
|
+
let ee = L.node(H.v), ue = { rank: (L.node(H.w).rank - ee.rank) / 2 + ee.rank, e: H };
|
|
50202
|
+
d.addDummyNode(L, "edge-proxy", ue, "_ep");
|
|
50200
50203
|
}
|
|
50201
50204
|
});
|
|
50202
50205
|
}
|
|
@@ -50214,7 +50217,7 @@ function HX() {
|
|
|
50214
50217
|
});
|
|
50215
50218
|
}
|
|
50216
50219
|
function T(L) {
|
|
50217
|
-
let H = Number.POSITIVE_INFINITY, K = 0, ee = Number.POSITIVE_INFINITY, ne = 0,
|
|
50220
|
+
let H = Number.POSITIVE_INFINITY, K = 0, ee = Number.POSITIVE_INFINITY, ne = 0, ue = L.graph(), R = ue.marginx || 0, U = ue.marginy || 0;
|
|
50218
50221
|
function Y(X) {
|
|
50219
50222
|
let se = X.x, ie = X.y, we = X.width, Ee = X.height;
|
|
50220
50223
|
H = Math.min(H, se - we / 2), K = Math.max(K, se + we / 2), ee = Math.min(ee, ie - Ee / 2), ne = Math.max(ne, ie + Ee / 2);
|
|
@@ -50230,12 +50233,12 @@ function HX() {
|
|
|
50230
50233
|
se.points.forEach((ie) => {
|
|
50231
50234
|
ie.x -= H, ie.y -= ee;
|
|
50232
50235
|
}), Object.hasOwn(se, "x") && (se.x -= H), Object.hasOwn(se, "y") && (se.y -= ee);
|
|
50233
|
-
}),
|
|
50236
|
+
}), ue.width = K - H + R, ue.height = ne - ee + U;
|
|
50234
50237
|
}
|
|
50235
50238
|
function B(L) {
|
|
50236
50239
|
L.edges().forEach((H) => {
|
|
50237
|
-
let K = L.edge(H), ee = L.node(H.v), ne = L.node(H.w),
|
|
50238
|
-
K.points ? (
|
|
50240
|
+
let K = L.edge(H), ee = L.node(H.v), ne = L.node(H.w), ue, R;
|
|
50241
|
+
K.points ? (ue = K.points[0], R = K.points[K.points.length - 1]) : (K.points = [], ue = ne, R = ee), K.points.unshift(d.intersectRect(ee, ue)), K.points.push(d.intersectRect(ne, R));
|
|
50239
50242
|
});
|
|
50240
50243
|
}
|
|
50241
50244
|
function A(L) {
|
|
@@ -50261,8 +50264,8 @@ function HX() {
|
|
|
50261
50264
|
function P(L) {
|
|
50262
50265
|
L.nodes().forEach((H) => {
|
|
50263
50266
|
if (L.children(H).length) {
|
|
50264
|
-
let K = L.node(H), ee = L.node(K.borderTop), ne = L.node(K.borderBottom),
|
|
50265
|
-
K.width = Math.abs(R.x -
|
|
50267
|
+
let K = L.node(H), ee = L.node(K.borderTop), ne = L.node(K.borderBottom), ue = L.node(K.borderLeft[K.borderLeft.length - 1]), R = L.node(K.borderRight[K.borderRight.length - 1]);
|
|
50268
|
+
K.width = Math.abs(R.x - ue.x), K.height = Math.abs(ne.y - ee.y), K.x = ue.x + K.width / 2, K.y = ee.y + K.height / 2;
|
|
50266
50269
|
}
|
|
50267
50270
|
}), L.nodes().forEach((H) => {
|
|
50268
50271
|
L.node(H).dummy === "border" && L.removeNode(H);
|
|
@@ -50280,14 +50283,14 @@ function HX() {
|
|
|
50280
50283
|
var H = d.buildLayerMatrix(L);
|
|
50281
50284
|
H.forEach((K) => {
|
|
50282
50285
|
var ee = 0;
|
|
50283
|
-
K.forEach((ne,
|
|
50286
|
+
K.forEach((ne, ue) => {
|
|
50284
50287
|
var R = L.node(ne);
|
|
50285
|
-
R.order =
|
|
50288
|
+
R.order = ue + ee, (R.selfEdges || []).forEach((U) => {
|
|
50286
50289
|
d.addDummyNode(L, "selfedge", {
|
|
50287
50290
|
width: U.label.width,
|
|
50288
50291
|
height: U.label.height,
|
|
50289
50292
|
rank: R.rank,
|
|
50290
|
-
order:
|
|
50293
|
+
order: ue + ++ee,
|
|
50291
50294
|
e: U.e,
|
|
50292
50295
|
label: U.label
|
|
50293
50296
|
}, "_se");
|
|
@@ -50299,13 +50302,13 @@ function HX() {
|
|
|
50299
50302
|
L.nodes().forEach((H) => {
|
|
50300
50303
|
var K = L.node(H);
|
|
50301
50304
|
if (K.dummy === "selfedge") {
|
|
50302
|
-
var ee = L.node(K.e.v), ne = ee.x + ee.width / 2,
|
|
50305
|
+
var ee = L.node(K.e.v), ne = ee.x + ee.width / 2, ue = ee.y, R = K.x - ne, U = ee.height / 2;
|
|
50303
50306
|
L.setEdge(K.e, K.label), L.removeNode(H), K.label.points = [
|
|
50304
|
-
{ x: ne + 2 * R / 3, y:
|
|
50305
|
-
{ x: ne + 5 * R / 6, y:
|
|
50306
|
-
{ x: ne + R, y:
|
|
50307
|
-
{ x: ne + 5 * R / 6, y:
|
|
50308
|
-
{ x: ne + 2 * R / 3, y:
|
|
50307
|
+
{ x: ne + 2 * R / 3, y: ue - U },
|
|
50308
|
+
{ x: ne + 5 * R / 6, y: ue - U },
|
|
50309
|
+
{ x: ne + R, y: ue },
|
|
50310
|
+
{ x: ne + 5 * R / 6, y: ue + U },
|
|
50311
|
+
{ x: ne + 2 * R / 3, y: ue + U }
|
|
50309
50312
|
], K.label.x = K.x, K.label.y = K.y;
|
|
50310
50313
|
}
|
|
50311
50314
|
});
|
|
@@ -50358,7 +50361,7 @@ function VX() {
|
|
|
50358
50361
|
}), Zp;
|
|
50359
50362
|
}
|
|
50360
50363
|
var WX = VX();
|
|
50361
|
-
const yx = /* @__PURE__ */
|
|
50364
|
+
const yx = /* @__PURE__ */ oa(WX), S0 = 20, nt = 300, xs = S0 * 15, jg = S0 * 10, ks = S0 * 3;
|
|
50362
50365
|
function bx(t) {
|
|
50363
50366
|
return t.type === Q.AGENT || t.type === Q.MCPServer;
|
|
50364
50367
|
}
|
|
@@ -50765,7 +50768,7 @@ const xN = () => (/* @__PURE__ */ new Date()).toLocaleTimeString("zh-CN", {
|
|
|
50765
50768
|
});
|
|
50766
50769
|
function QX(t, e) {
|
|
50767
50770
|
var wn, vn;
|
|
50768
|
-
const { workflowId: n, preview: r = !1, previewId: o, linkMode: i = !1, onInit: s } = t, a =
|
|
50771
|
+
const { workflowId: n, preview: r = !1, previewId: o, linkMode: i = !1, onInit: s } = t, a = da(), { setLocked: l, op_status: c } = No(), u = It(), [d, f] = Z(!1), [h, m] = Z(!1), w = pn(), v = yr(), { autoLayout: y } = YX(), [g, C] = Z(!0), E = !!(r && o || w.canvas.mode === "preview"), b = c === rt.ONLINE || c === rt.ON_WARN, k = ce(() => !E && w.canvas.miniMap, [E, w.canvas.miniMap]), S = ce(() => !E && !i && w.canvas.controls, [E, i, w.canvas.controls]), x = ce(() => !E && !i && w.canvas.header, [E, i, w.canvas.header]), O = ce(() => {
|
|
50769
50772
|
var Oe;
|
|
50770
50773
|
return (Oe = w.canvas.grid) == null ? void 0 : Oe.enabled;
|
|
50771
50774
|
}, [(wn = w.canvas.grid) == null ? void 0 : wn.enabled]), D = ce(() => u && !E && w.canvas.fastOperationButtons, [u, E, w.canvas.fastOperationButtons]);
|
|
@@ -50785,11 +50788,11 @@ function QX(t, e) {
|
|
|
50785
50788
|
});
|
|
50786
50789
|
},
|
|
50787
50790
|
[v]
|
|
50788
|
-
), [T, B] = Z(Tn.IDLE), [A, F] = Z(""), { setFlowOpStatusAction: P, setNodeConfigVisible: j } = No(n), { addNodes: z, addEdges: G } =
|
|
50791
|
+
), [T, B] = Z(Tn.IDLE), [A, F] = Z(""), { setFlowOpStatusAction: P, setNodeConfigVisible: j } = No(n), { addNodes: z, addEdges: G } = ra(), {
|
|
50789
50792
|
removeEdges: q,
|
|
50790
50793
|
onConnect: te,
|
|
50791
50794
|
handleEdgesChange: L
|
|
50792
|
-
} = Hg(), H = vr(), K = H.getState().edges, ee = li((Oe) => Oe.workflow.refreshWorkFlowNum), [ne,
|
|
50795
|
+
} = Hg(), H = vr(), K = H.getState().edges, ee = li((Oe) => Oe.workflow.refreshWorkFlowNum), [ne, ue] = lT([]), [R, U] = cT([]), [Y, X] = Z(void 0), [se, ie] = Z(void 0), we = V(
|
|
50793
50796
|
(Oe) => {
|
|
50794
50797
|
var jt, Fn;
|
|
50795
50798
|
if (!Oe) return !0;
|
|
@@ -50825,19 +50828,19 @@ function QX(t, e) {
|
|
|
50825
50828
|
const vt = Zx(et, wt);
|
|
50826
50829
|
wt.splice(0, vt.length, ...vt), wt.splice(vt.length);
|
|
50827
50830
|
});
|
|
50828
|
-
|
|
50831
|
+
ue(dt), et.forEach((wt) => {
|
|
50829
50832
|
wt.type !== "select" && wt.type !== "replace" && f(!0);
|
|
50830
50833
|
});
|
|
50831
50834
|
},
|
|
50832
|
-
[we,
|
|
50835
|
+
[we, ue, H, Ee]
|
|
50833
50836
|
), { onEdgeMouseEnter: je, onEdgeMouseLeave: ge } = Hg(), { onNodeMouseEnter: Re, onNodeMouseLeave: Me, autoSaveNum: ut } = xf(), gn = V(
|
|
50834
50837
|
(Oe, Pe) => {
|
|
50835
50838
|
B(Oe), Oe === Tn.SAVED ? (F(xN()), window.__AI_FLOW_IN_QUEUE_NODE_ID && (j(window.__AI_FLOW_IN_QUEUE_NODE_ID), window.__AI_FLOW_IN_QUEUE_NODE_ID = "")) : Oe === Tn.ERROR && Pe && console.error("保存失败:", Pe);
|
|
50836
50839
|
},
|
|
50837
50840
|
[j]
|
|
50838
|
-
), { setNodeAddCallback: Jn, openNodeSelector: sn, handleManualAdd: Ft } =
|
|
50841
|
+
), { setNodeAddCallback: Jn, openNodeSelector: sn, handleManualAdd: Ft } = fa();
|
|
50839
50842
|
ew(() => {
|
|
50840
|
-
a(Af()), U([]),
|
|
50843
|
+
a(Af()), U([]), ue([]);
|
|
50841
50844
|
});
|
|
50842
50845
|
const Ct = pe(async () => {
|
|
50843
50846
|
}), pt = V((Oe) => {
|
|
@@ -50929,7 +50932,7 @@ function QX(t, e) {
|
|
|
50929
50932
|
dispatch: a,
|
|
50930
50933
|
reactFlow: v,
|
|
50931
50934
|
setEdges: U,
|
|
50932
|
-
setNodes:
|
|
50935
|
+
setNodes: ue,
|
|
50933
50936
|
store: H,
|
|
50934
50937
|
setNodeConfigVisible: j,
|
|
50935
50938
|
saveFlowRef: Ct
|
|
@@ -50955,7 +50958,7 @@ function QX(t, e) {
|
|
|
50955
50958
|
return {
|
|
50956
50959
|
nodes: ne,
|
|
50957
50960
|
edges: R,
|
|
50958
|
-
setNodes:
|
|
50961
|
+
setNodes: ue,
|
|
50959
50962
|
setEdges: U,
|
|
50960
50963
|
unSave: d,
|
|
50961
50964
|
setUnSave: f,
|
|
@@ -51048,7 +51051,7 @@ function eY(t) {
|
|
|
51048
51051
|
}
|
|
51049
51052
|
);
|
|
51050
51053
|
}
|
|
51051
|
-
const tY = 200, Du = 150,
|
|
51054
|
+
const tY = 200, Du = 150, Na = 44, Ex = (t) => {
|
|
51052
51055
|
try {
|
|
51053
51056
|
return JSON.stringify(t);
|
|
51054
51057
|
} catch (e) {
|
|
@@ -51160,7 +51163,7 @@ const tY = 200, Du = 150, _a = 44, Ex = (t) => {
|
|
|
51160
51163
|
})), d = t.filter((f) => !l.has(f.id));
|
|
51161
51164
|
return { levels: u, unvisited: d };
|
|
51162
51165
|
}, iY = (t, e) => {
|
|
51163
|
-
const { levels: n, unvisited: r } = kN(t, e), o = Du, i =
|
|
51166
|
+
const { levels: n, unvisited: r } = kN(t, e), o = Du, i = Na, s = 200, a = 90, l = [], c = e.map((m) => ({
|
|
51164
51167
|
id: m.id,
|
|
51165
51168
|
source: m.source,
|
|
51166
51169
|
target: m.target
|
|
@@ -51512,7 +51515,7 @@ ${n}` : ""}`;
|
|
|
51512
51515
|
const F = O.get(A.source), P = O.get(A.target);
|
|
51513
51516
|
if (!F || !P)
|
|
51514
51517
|
return null;
|
|
51515
|
-
const j = b.has(A.id), z = F.x + Du, G = F.y +
|
|
51518
|
+
const j = b.has(A.id), z = F.x + Du, G = F.y + Na / 2, q = P.x, te = P.y + Na / 2;
|
|
51516
51519
|
return /* @__PURE__ */ p(
|
|
51517
51520
|
"line",
|
|
51518
51521
|
{
|
|
@@ -51532,7 +51535,7 @@ ${n}` : ""}`;
|
|
|
51532
51535
|
"rect",
|
|
51533
51536
|
{
|
|
51534
51537
|
width: Du,
|
|
51535
|
-
height:
|
|
51538
|
+
height: Na,
|
|
51536
51539
|
rx: 6,
|
|
51537
51540
|
fill: "#ffffff",
|
|
51538
51541
|
stroke: "#91caff",
|
|
@@ -51543,7 +51546,7 @@ ${n}` : ""}`;
|
|
|
51543
51546
|
"text",
|
|
51544
51547
|
{
|
|
51545
51548
|
x: Du / 2,
|
|
51546
|
-
y:
|
|
51549
|
+
y: Na / 2 + 4,
|
|
51547
51550
|
textAnchor: "middle",
|
|
51548
51551
|
fontSize: "11",
|
|
51549
51552
|
fill: "#1f1f1f",
|
|
@@ -52064,7 +52067,7 @@ const gY = Zt((t, e) => {
|
|
|
52064
52067
|
}
|
|
52065
52068
|
),
|
|
52066
52069
|
u.isError && u.showErrorAlert && /* @__PURE__ */ p(
|
|
52067
|
-
|
|
52070
|
+
Ja,
|
|
52068
52071
|
{
|
|
52069
52072
|
className: "error-alert",
|
|
52070
52073
|
showIcon: !0,
|
|
@@ -52080,7 +52083,7 @@ const gY = Zt((t, e) => {
|
|
|
52080
52083
|
}
|
|
52081
52084
|
),
|
|
52082
52085
|
!u.isError && u.successShown && l && !u.testing && /* @__PURE__ */ p(
|
|
52083
|
-
|
|
52086
|
+
Ja,
|
|
52084
52087
|
{
|
|
52085
52088
|
className: "success-alert",
|
|
52086
52089
|
showIcon: !0,
|
|
@@ -53172,7 +53175,7 @@ const EY = {
|
|
|
53172
53175
|
}
|
|
53173
53176
|
);
|
|
53174
53177
|
},
|
|
53175
|
-
(t, e) =>
|
|
53178
|
+
(t, e) => Ya(Ls(t, ["isHovered"]), Ls(e, ["isHovered"]))
|
|
53176
53179
|
);
|
|
53177
53180
|
function MY() {
|
|
53178
53181
|
const t = pe(/* @__PURE__ */ new Map()), e = V((i) => t.current.get(i), []), n = V((i, s) => {
|
|
@@ -53458,7 +53461,7 @@ function JY(t) {
|
|
|
53458
53461
|
}
|
|
53459
53462
|
}
|
|
53460
53463
|
const { Text: rm } = un, QY = () => {
|
|
53461
|
-
const [t, e] = Z(!1), [n, r] = Z(!1), [o] = me.useForm(), i = me.useWatch("enableControl", o), s =
|
|
53464
|
+
const [t, e] = Z(!1), [n, r] = Z(!1), [o] = me.useForm(), i = me.useWatch("enableControl", o), s = da(), a = li((h) => h.workflow.executionControl), l = lY(), c = () => {
|
|
53462
53465
|
e(!0), o.setFieldsValue(
|
|
53463
53466
|
a ? YY(a) : KY()
|
|
53464
53467
|
);
|
|
@@ -53575,7 +53578,7 @@ const { Text: rm } = un, QY = () => {
|
|
|
53575
53578
|
canvasApi: a
|
|
53576
53579
|
}) => {
|
|
53577
53580
|
var K, ee;
|
|
53578
|
-
const l =
|
|
53581
|
+
const l = da(), c = It(), u = li((ne) => ne.workflow.workflowName), d = li((ne) => ne.workflow.op_status), [f, h] = Z(!1), [m, w] = Z(u), [v, y] = Z(!1), g = pe(null), { getNodes: C } = yr(), E = pn(), b = E.toolbar, k = Mo(), S = ((K = C().filter((ne) => ne.type !== Q.START)) == null ? void 0 : K.length) > 0;
|
|
53579
53582
|
le(() => {
|
|
53580
53583
|
w(u);
|
|
53581
53584
|
}, [u]), le(() => {
|
|
@@ -53594,7 +53597,7 @@ const { Text: rm } = un, QY = () => {
|
|
|
53594
53597
|
}))
|
|
53595
53598
|
}), R.length === 0;
|
|
53596
53599
|
}, [C]), O = V(() => {
|
|
53597
|
-
const ne = C().filter((R) => R.type !== Q.START),
|
|
53600
|
+
const ne = C().filter((R) => R.type !== Q.START), ue = (R, U, Y) => (console.warn(`${Ix} required config check failed`, {
|
|
53598
53601
|
node: {
|
|
53599
53602
|
id: R.id,
|
|
53600
53603
|
name: R.data.name,
|
|
@@ -53609,33 +53612,33 @@ const { Text: rm } = un, QY = () => {
|
|
|
53609
53612
|
const { data: U, type: Y } = R, { config_schema: X } = U;
|
|
53610
53613
|
if (Y === Q.LOOP) {
|
|
53611
53614
|
if (!(X != null && X.asc))
|
|
53612
|
-
return
|
|
53615
|
+
return ue(R, "loop config is missing asc");
|
|
53613
53616
|
const se = Object.keys(X ?? {});
|
|
53614
53617
|
if (se.length === 0)
|
|
53615
|
-
return
|
|
53618
|
+
return ue(R, "loop config schema is empty");
|
|
53616
53619
|
if (se.some((ie) => typeof X[ie] > "u"))
|
|
53617
|
-
return
|
|
53620
|
+
return ue(R, "loop config contains undefined values", {
|
|
53618
53621
|
undefinedKeys: se.filter((ie) => typeof X[ie] > "u")
|
|
53619
53622
|
});
|
|
53620
53623
|
} else if (Y === Q.CONDITION) {
|
|
53621
53624
|
if (!(X != null && X.or_list) || !X.or_list.length)
|
|
53622
|
-
return
|
|
53625
|
+
return ue(R, "condition config is missing or_list");
|
|
53623
53626
|
if (!X.or_list.every((ie) => ie.and_list.every((we) => we.query && we.operator)))
|
|
53624
|
-
return
|
|
53627
|
+
return ue(R, "condition config contains incomplete rules");
|
|
53625
53628
|
} else if (Y === Q.SWITCH) {
|
|
53626
53629
|
if (!(X != null && X.branches) || !X.branches.length)
|
|
53627
|
-
return
|
|
53630
|
+
return ue(R, "switch config is missing branches");
|
|
53628
53631
|
if (!X.branches.every((ie) => ie.or_list.every(
|
|
53629
53632
|
(we) => we.and_list.every((Ee) => Ee.query && Ee.operator)
|
|
53630
53633
|
)))
|
|
53631
|
-
return
|
|
53634
|
+
return ue(R, "switch config contains incomplete branch rules");
|
|
53632
53635
|
} else if (Y !== Q.STICKY) {
|
|
53633
53636
|
const se = X == null ? void 0 : X.sub_params;
|
|
53634
53637
|
if (!Array.isArray(se))
|
|
53635
|
-
return
|
|
53638
|
+
return ue(R, "config_schema.sub_params is missing or invalid");
|
|
53636
53639
|
const ie = se.every((Ee) => (console.log("subParams :", se), Ee.required ? typeof Ee.value < "u" && Ee.value !== null : !0));
|
|
53637
53640
|
if (!ie)
|
|
53638
|
-
return
|
|
53641
|
+
return ue(R, "required parameters are missing", {
|
|
53639
53642
|
missingParams: se.filter(
|
|
53640
53643
|
(Ee) => Ee.required && (typeof Ee.value > "u" || Ee.value === null)
|
|
53641
53644
|
).map((Ee) => ({
|
|
@@ -53646,7 +53649,7 @@ const { Text: rm } = un, QY = () => {
|
|
|
53646
53649
|
});
|
|
53647
53650
|
const we = X != null && X.account_schema_id ? !!X.account_id : !0;
|
|
53648
53651
|
if (!ie || !we)
|
|
53649
|
-
return
|
|
53652
|
+
return ue(R, "account is required but account_id is missing", {
|
|
53650
53653
|
accountSchemaId: X == null ? void 0 : X.account_schema_id,
|
|
53651
53654
|
accountId: X == null ? void 0 : X.account_id
|
|
53652
53655
|
});
|
|
@@ -53666,7 +53669,7 @@ const { Text: rm } = un, QY = () => {
|
|
|
53666
53669
|
l(Af()), Hi("");
|
|
53667
53670
|
});
|
|
53668
53671
|
const _ = V(() => {
|
|
53669
|
-
const ne = u,
|
|
53672
|
+
const ne = u, ue = m.trim(), R = ue || "未命名工作流";
|
|
53670
53673
|
l(Hi(R)), iw(k, { name: R }).then(() => {
|
|
53671
53674
|
}).catch(() => {
|
|
53672
53675
|
l(Hi(ne));
|
|
@@ -53697,7 +53700,7 @@ const { Text: rm } = un, QY = () => {
|
|
|
53697
53700
|
}
|
|
53698
53701
|
}, [P, j] = lo.useModal(), z = async () => {
|
|
53699
53702
|
var R;
|
|
53700
|
-
const ne = d === rt.ONLINE || d === rt.ON_WARN,
|
|
53703
|
+
const ne = d === rt.ONLINE || d === rt.ON_WARN, ue = () => {
|
|
53701
53704
|
var U, Y;
|
|
53702
53705
|
if ((U = b == null ? void 0 : b.nav) != null && U.onBack) {
|
|
53703
53706
|
b.nav.onBack();
|
|
@@ -53713,20 +53716,21 @@ const { Text: rm } = un, QY = () => {
|
|
|
53713
53716
|
await P.confirm({
|
|
53714
53717
|
title: J("user.common.operation_title"),
|
|
53715
53718
|
content: b.nav.backConfirmMessage || "当前流程未保存,是否确认返回?"
|
|
53716
|
-
}) &&
|
|
53719
|
+
}) && ue();
|
|
53717
53720
|
return;
|
|
53718
53721
|
}
|
|
53722
|
+
ue();
|
|
53719
53723
|
}, G = async (ne = {}) => {
|
|
53720
53724
|
if (!k) return;
|
|
53721
53725
|
y(!0);
|
|
53722
|
-
const { force:
|
|
53723
|
-
return (
|
|
53726
|
+
const { force: ue = !1, customFn: R } = ne;
|
|
53727
|
+
return (ue ? bE(k) : R ? R(k) : xm(k, rt.ONLINE)).then(() => (he.success(J("link.flow.online_success")), l(Qs(rt.ONLINE)), { success: !0 })).catch((Y) => ({ success: !1, error: Y })).finally(() => {
|
|
53724
53728
|
y(!1);
|
|
53725
53729
|
});
|
|
53726
53730
|
}, q = async (ne) => {
|
|
53727
53731
|
if (!k) return;
|
|
53728
53732
|
y(!0), (ne ? ne(k) : xm(k, rt.OFFLINE)).then(() => {
|
|
53729
|
-
he.success(J("link.flow.offline_success")), l(
|
|
53733
|
+
he.success(J("link.flow.offline_success")), l(Qs(rt.OFFLINE));
|
|
53730
53734
|
}).catch(() => {
|
|
53731
53735
|
}).finally(() => {
|
|
53732
53736
|
y(!1);
|
|
@@ -53755,9 +53759,9 @@ const { Text: rm } = un, QY = () => {
|
|
|
53755
53759
|
return /* @__PURE__ */ M("div", { className: "workflow-canvas-header", children: [
|
|
53756
53760
|
j,
|
|
53757
53761
|
/* @__PURE__ */ p("div", { className: "workflow-heder-left-area", children: (() => {
|
|
53758
|
-
var
|
|
53762
|
+
var ue, R, U, Y;
|
|
53759
53763
|
const ne = [];
|
|
53760
|
-
return ((
|
|
53764
|
+
return ((ue = b == null ? void 0 : b.nav) == null ? void 0 : ue.showBack) !== !1 && (ne.push(
|
|
53761
53765
|
/* @__PURE__ */ p(
|
|
53762
53766
|
ae,
|
|
53763
53767
|
{
|
|
@@ -54276,7 +54280,7 @@ const { Text: rm } = un, QY = () => {
|
|
|
54276
54280
|
onFetchNodesByCategory: o,
|
|
54277
54281
|
restrictToCategory: i
|
|
54278
54282
|
}) => {
|
|
54279
|
-
const s = pe(null), a = pe(null), [l, c] = Z([]), [u, d] = Z({}), f = n || Rx, h = r || mJ, m = o || Rx, { nodeSelectorVisible: w, closeNodeSelector: v, handleNodeSelect: y, nodeAddInfo: g } =
|
|
54283
|
+
const s = pe(null), a = pe(null), [l, c] = Z([]), [u, d] = Z({}), f = n || Rx, h = r || mJ, m = o || Rx, { nodeSelectorVisible: w, closeNodeSelector: v, handleNodeSelect: y, nodeAddInfo: g } = fa(), C = Mo(), { fetchNodeActions: E } = lJ({ nodeSelectorVisible: w, nodeAddInfo: g }), { categories: b, isLoadingCategories: k } = cJ({
|
|
54280
54284
|
onFetchCategories: h,
|
|
54281
54285
|
restrictToCategory: i,
|
|
54282
54286
|
nodeSelectorVisible: w,
|
|
@@ -54312,7 +54316,7 @@ const { Text: rm } = un, QY = () => {
|
|
|
54312
54316
|
if (ge === $e.AI_LANGUAGE_MODEL || ge === $e.AI_MEMORY)
|
|
54313
54317
|
return ge;
|
|
54314
54318
|
}
|
|
54315
|
-
}, [g == null ? void 0 : g.protocol]),
|
|
54319
|
+
}, [g == null ? void 0 : g.protocol]), ue = ce(() => {
|
|
54316
54320
|
const ge = g == null ? void 0 : g.protocol;
|
|
54317
54321
|
if (ge === $e.AI_TOOL) return "tool";
|
|
54318
54322
|
if (ge === $e.AI_LANGUAGE_MODEL) return "model";
|
|
@@ -54320,10 +54324,10 @@ const { Text: rm } = un, QY = () => {
|
|
|
54320
54324
|
}, [g == null ? void 0 : g.protocol]), R = V(() => ({
|
|
54321
54325
|
app_domain_category: q && q !== "ALL" ? q : void 0,
|
|
54322
54326
|
trigger: !!F,
|
|
54323
|
-
type:
|
|
54327
|
+
type: ue,
|
|
54324
54328
|
protocol: ne,
|
|
54325
54329
|
flow_id: C
|
|
54326
|
-
}), [q, F,
|
|
54330
|
+
}), [q, F, ue, ne, C]), { run: U, cancel: Y } = uB(
|
|
54327
54331
|
(ge) => {
|
|
54328
54332
|
const Re = ge.trim();
|
|
54329
54333
|
if (!Re) {
|
|
@@ -54861,7 +54865,7 @@ function AJ() {
|
|
|
54861
54865
|
);
|
|
54862
54866
|
}
|
|
54863
54867
|
const _f = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
54864
|
-
function
|
|
54868
|
+
function ha(t) {
|
|
54865
54869
|
const e = Object.prototype.toString.call(t);
|
|
54866
54870
|
return e === "[object Window]" || // In Electron context the Window object serializes to [object global]
|
|
54867
54871
|
e === "[object global]";
|
|
@@ -54871,7 +54875,7 @@ function D0(t) {
|
|
|
54871
54875
|
}
|
|
54872
54876
|
function Yn(t) {
|
|
54873
54877
|
var e, n;
|
|
54874
|
-
return t ?
|
|
54878
|
+
return t ? ha(t) ? t : D0(t) && (e = (n = t.ownerDocument) == null ? void 0 : n.defaultView) != null ? e : window : window;
|
|
54875
54879
|
}
|
|
54876
54880
|
function A0(t) {
|
|
54877
54881
|
const {
|
|
@@ -54880,13 +54884,13 @@ function A0(t) {
|
|
|
54880
54884
|
return t instanceof e;
|
|
54881
54885
|
}
|
|
54882
54886
|
function ec(t) {
|
|
54883
|
-
return
|
|
54887
|
+
return ha(t) ? !1 : t instanceof Yn(t).HTMLElement;
|
|
54884
54888
|
}
|
|
54885
54889
|
function _N(t) {
|
|
54886
54890
|
return t instanceof Yn(t).SVGElement;
|
|
54887
54891
|
}
|
|
54888
|
-
function
|
|
54889
|
-
return t ?
|
|
54892
|
+
function pa(t) {
|
|
54893
|
+
return t ? ha(t) ? t.document : D0(t) ? A0(t) ? t : ec(t) || _N(t) ? t.ownerDocument : document : document : document;
|
|
54890
54894
|
}
|
|
54891
54895
|
const io = _f ? Xg : le;
|
|
54892
54896
|
function O0(t) {
|
|
@@ -55474,7 +55478,7 @@ function JJ(t, e, n) {
|
|
|
55474
55478
|
const QJ = {
|
|
55475
55479
|
ignoreTransform: !1
|
|
55476
55480
|
};
|
|
55477
|
-
function
|
|
55481
|
+
function ma(t, e) {
|
|
55478
55482
|
e === void 0 && (e = QJ);
|
|
55479
55483
|
let n = t.getBoundingClientRect();
|
|
55480
55484
|
if (e.ignoreTransform) {
|
|
@@ -55502,7 +55506,7 @@ function pa(t, e) {
|
|
|
55502
55506
|
};
|
|
55503
55507
|
}
|
|
55504
55508
|
function Hx(t) {
|
|
55505
|
-
return
|
|
55509
|
+
return ma(t, {
|
|
55506
55510
|
ignoreTransform: !0
|
|
55507
55511
|
});
|
|
55508
55512
|
}
|
|
@@ -55547,13 +55551,13 @@ function MN(t) {
|
|
|
55547
55551
|
return e ?? null;
|
|
55548
55552
|
}
|
|
55549
55553
|
function lm(t) {
|
|
55550
|
-
return !_f || !t ? null :
|
|
55554
|
+
return !_f || !t ? null : ha(t) ? t : D0(t) ? A0(t) || t === pa(t).scrollingElement ? window : ec(t) ? t : null : null;
|
|
55551
55555
|
}
|
|
55552
55556
|
function PN(t) {
|
|
55553
|
-
return
|
|
55557
|
+
return ha(t) ? t.scrollX : t.scrollLeft;
|
|
55554
55558
|
}
|
|
55555
55559
|
function LN(t) {
|
|
55556
|
-
return
|
|
55560
|
+
return ha(t) ? t.scrollY : t.scrollTop;
|
|
55557
55561
|
}
|
|
55558
55562
|
function Ug(t) {
|
|
55559
55563
|
return {
|
|
@@ -55663,7 +55667,7 @@ function sQ(t) {
|
|
|
55663
55667
|
return t.reduce((e, n) => e + LN(n), 0);
|
|
55664
55668
|
}
|
|
55665
55669
|
function aQ(t, e) {
|
|
55666
|
-
if (e === void 0 && (e =
|
|
55670
|
+
if (e === void 0 && (e = ma), !t)
|
|
55667
55671
|
return;
|
|
55668
55672
|
const {
|
|
55669
55673
|
top: n,
|
|
@@ -55698,7 +55702,7 @@ class N0 {
|
|
|
55698
55702
|
});
|
|
55699
55703
|
}
|
|
55700
55704
|
}
|
|
55701
|
-
class
|
|
55705
|
+
class qa {
|
|
55702
55706
|
constructor(e) {
|
|
55703
55707
|
this.target = void 0, this.listeners = [], this.removeAll = () => {
|
|
55704
55708
|
this.listeners.forEach((n) => {
|
|
@@ -55716,7 +55720,7 @@ function cQ(t) {
|
|
|
55716
55720
|
const {
|
|
55717
55721
|
EventTarget: e
|
|
55718
55722
|
} = Yn(t);
|
|
55719
|
-
return t instanceof e ? t :
|
|
55723
|
+
return t instanceof e ? t : pa(t);
|
|
55720
55724
|
}
|
|
55721
55725
|
function cm(t, e) {
|
|
55722
55726
|
const n = Math.abs(t.x), r = Math.abs(t.y);
|
|
@@ -55775,7 +55779,7 @@ class T0 {
|
|
|
55775
55779
|
target: n
|
|
55776
55780
|
}
|
|
55777
55781
|
} = e;
|
|
55778
|
-
this.props = e, this.listeners = new
|
|
55782
|
+
this.props = e, this.listeners = new qa(pa(n)), this.windowListeners = new qa(Yn(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
|
|
55779
55783
|
}
|
|
55780
55784
|
attach() {
|
|
55781
55785
|
this.handleStart(), this.windowListeners.add(lr.Resize, this.handleCancel), this.windowListeners.add(lr.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(lr.Keydown, this.handleKeyDown));
|
|
@@ -55931,7 +55935,7 @@ class B0 {
|
|
|
55931
55935
|
} = e, {
|
|
55932
55936
|
target: s
|
|
55933
55937
|
} = i;
|
|
55934
|
-
this.props = e, this.events = n, this.document =
|
|
55938
|
+
this.props = e, this.events = n, this.document = pa(s), this.documentListeners = new qa(this.document), this.listeners = new qa(r), this.windowListeners = new qa(Yn(s)), this.initialCoordinates = (o = Wg(i)) != null ? o : Rr, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
|
|
55935
55939
|
}
|
|
55936
55940
|
attach() {
|
|
55937
55941
|
const {
|
|
@@ -56049,7 +56053,7 @@ class I0 extends B0 {
|
|
|
56049
56053
|
constructor(e) {
|
|
56050
56054
|
const {
|
|
56051
56055
|
event: n
|
|
56052
|
-
} = e, r =
|
|
56056
|
+
} = e, r = pa(n.target);
|
|
56053
56057
|
super(e, fQ, r);
|
|
56054
56058
|
}
|
|
56055
56059
|
}
|
|
@@ -56080,7 +56084,7 @@ var qg;
|
|
|
56080
56084
|
})(qg || (qg = {}));
|
|
56081
56085
|
class pQ extends B0 {
|
|
56082
56086
|
constructor(e) {
|
|
56083
|
-
super(e, hQ,
|
|
56087
|
+
super(e, hQ, pa(e.event.target));
|
|
56084
56088
|
}
|
|
56085
56089
|
}
|
|
56086
56090
|
pQ.activators = [{
|
|
@@ -56138,10 +56142,10 @@ mQ.activators = [{
|
|
|
56138
56142
|
}), !0);
|
|
56139
56143
|
}
|
|
56140
56144
|
}];
|
|
56141
|
-
var
|
|
56145
|
+
var Ga;
|
|
56142
56146
|
(function(t) {
|
|
56143
56147
|
t[t.Pointer = 0] = "Pointer", t[t.DraggableRect = 1] = "DraggableRect";
|
|
56144
|
-
})(
|
|
56148
|
+
})(Ga || (Ga = {}));
|
|
56145
56149
|
var Td;
|
|
56146
56150
|
(function(t) {
|
|
56147
56151
|
t[t.TreeOrder = 0] = "TreeOrder", t[t.ReversedTreeOrder = 1] = "ReversedTreeOrder";
|
|
@@ -56149,7 +56153,7 @@ var Td;
|
|
|
56149
56153
|
function gQ(t) {
|
|
56150
56154
|
let {
|
|
56151
56155
|
acceleration: e,
|
|
56152
|
-
activator: n =
|
|
56156
|
+
activator: n = Ga.Pointer,
|
|
56153
56157
|
canScroll: r,
|
|
56154
56158
|
draggingRect: o,
|
|
56155
56159
|
enabled: i,
|
|
@@ -56172,14 +56176,14 @@ function gQ(t) {
|
|
|
56172
56176
|
y: 0
|
|
56173
56177
|
}), g = ce(() => {
|
|
56174
56178
|
switch (n) {
|
|
56175
|
-
case
|
|
56179
|
+
case Ga.Pointer:
|
|
56176
56180
|
return l ? {
|
|
56177
56181
|
top: l.y,
|
|
56178
56182
|
bottom: l.y,
|
|
56179
56183
|
left: l.x,
|
|
56180
56184
|
right: l.x
|
|
56181
56185
|
} : null;
|
|
56182
|
-
case
|
|
56186
|
+
case Ga.DraggableRect:
|
|
56183
56187
|
return o;
|
|
56184
56188
|
}
|
|
56185
56189
|
}, [n, o, l]), C = pe(null), E = V(() => {
|
|
@@ -56413,7 +56417,7 @@ function Tf(t) {
|
|
|
56413
56417
|
return le(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
|
|
56414
56418
|
}
|
|
56415
56419
|
function EQ(t) {
|
|
56416
|
-
return new N0(
|
|
56420
|
+
return new N0(ma(t), t);
|
|
56417
56421
|
}
|
|
56418
56422
|
function Ux(t, e, n) {
|
|
56419
56423
|
e === void 0 && (e = EQ);
|
|
@@ -56549,7 +56553,7 @@ function WN(t) {
|
|
|
56549
56553
|
}
|
|
56550
56554
|
const Kx = [];
|
|
56551
56555
|
function NQ(t, e) {
|
|
56552
|
-
e === void 0 && (e =
|
|
56556
|
+
e === void 0 && (e = ma);
|
|
56553
56557
|
const [n] = t, r = WN(n ? Yn(n) : null), [o, i] = Z(Kx);
|
|
56554
56558
|
function s() {
|
|
56555
56559
|
i(() => t.length ? t.map((l) => $N(l) ? r : new N0(e(l), l)) : Kx);
|
|
@@ -56618,10 +56622,10 @@ const IQ = [{
|
|
|
56618
56622
|
frequency: Gg.Optimized
|
|
56619
56623
|
},
|
|
56620
56624
|
dragOverlay: {
|
|
56621
|
-
measure:
|
|
56625
|
+
measure: ma
|
|
56622
56626
|
}
|
|
56623
56627
|
};
|
|
56624
|
-
class
|
|
56628
|
+
class Ka extends Map {
|
|
56625
56629
|
get(e) {
|
|
56626
56630
|
var n;
|
|
56627
56631
|
return e != null && (n = super.get(e)) != null ? n : void 0;
|
|
@@ -56651,7 +56655,7 @@ const RQ = {
|
|
|
56651
56655
|
containerNodeRect: null,
|
|
56652
56656
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
56653
56657
|
droppableRects: /* @__PURE__ */ new Map(),
|
|
56654
|
-
droppableContainers: /* @__PURE__ */ new
|
|
56658
|
+
droppableContainers: /* @__PURE__ */ new Ka(),
|
|
56655
56659
|
over: null,
|
|
56656
56660
|
dragOverlay: {
|
|
56657
56661
|
nodeRef: {
|
|
@@ -56694,7 +56698,7 @@ function PQ() {
|
|
|
56694
56698
|
}
|
|
56695
56699
|
},
|
|
56696
56700
|
droppable: {
|
|
56697
|
-
containers: new
|
|
56701
|
+
containers: new Ka()
|
|
56698
56702
|
}
|
|
56699
56703
|
};
|
|
56700
56704
|
}
|
|
@@ -56742,7 +56746,7 @@ function LQ(t, e) {
|
|
|
56742
56746
|
element: n
|
|
56743
56747
|
} = e, {
|
|
56744
56748
|
id: r
|
|
56745
|
-
} = n, o = new
|
|
56749
|
+
} = n, o = new Ka(t.droppable.containers);
|
|
56746
56750
|
return o.set(r, n), {
|
|
56747
56751
|
...t,
|
|
56748
56752
|
droppable: {
|
|
@@ -56759,7 +56763,7 @@ function LQ(t, e) {
|
|
|
56759
56763
|
} = e, i = t.droppable.containers.get(n);
|
|
56760
56764
|
if (!i || r !== i.key)
|
|
56761
56765
|
return t;
|
|
56762
|
-
const s = new
|
|
56766
|
+
const s = new Ka(t.droppable.containers);
|
|
56763
56767
|
return s.set(n, {
|
|
56764
56768
|
...i,
|
|
56765
56769
|
disabled: o
|
|
@@ -56778,7 +56782,7 @@ function LQ(t, e) {
|
|
|
56778
56782
|
} = e, o = t.droppable.containers.get(n);
|
|
56779
56783
|
if (!o || r !== o.key)
|
|
56780
56784
|
return t;
|
|
56781
|
-
const i = new
|
|
56785
|
+
const i = new Ka(t.droppable.containers);
|
|
56782
56786
|
return i.delete(n), {
|
|
56783
56787
|
...t,
|
|
56784
56788
|
droppable: {
|
|
@@ -56941,10 +56945,10 @@ const VQ = /* @__PURE__ */ br(function(e) {
|
|
|
56941
56945
|
dragging: k,
|
|
56942
56946
|
dependencies: [O.x, O.y],
|
|
56943
56947
|
config: te.droppable
|
|
56944
|
-
}), ee = yQ(x, S), ne = ce(() => P ? Wg(P) : null, [P]),
|
|
56948
|
+
}), ee = yQ(x, S), ne = ce(() => P ? Wg(P) : null, [P]), ue = Ff(), R = xQ(ee, te.draggable.measure);
|
|
56945
56949
|
jQ({
|
|
56946
56950
|
activeNode: S != null ? x.get(S) : null,
|
|
56947
|
-
config:
|
|
56951
|
+
config: ue.layoutShiftCompensation,
|
|
56948
56952
|
initialRect: R,
|
|
56949
56953
|
measure: te.draggable.measure
|
|
56950
56954
|
});
|
|
@@ -57023,14 +57027,14 @@ const VQ = /* @__PURE__ */ br(function(e) {
|
|
|
57023
57027
|
if (!x.get(vt))
|
|
57024
57028
|
return;
|
|
57025
57029
|
const {
|
|
57026
|
-
onDragPending:
|
|
57030
|
+
onDragPending: ga
|
|
57027
57031
|
} = z.current, Lo = {
|
|
57028
57032
|
id: vt,
|
|
57029
57033
|
constraint: Nt,
|
|
57030
57034
|
initialCoordinates: jt,
|
|
57031
57035
|
offset: Fn
|
|
57032
57036
|
};
|
|
57033
|
-
|
|
57037
|
+
ga == null || ga(Lo), g({
|
|
57034
57038
|
type: "onDragPending",
|
|
57035
57039
|
event: Lo
|
|
57036
57040
|
});
|
|
@@ -57079,30 +57083,30 @@ const VQ = /* @__PURE__ */ br(function(e) {
|
|
|
57079
57083
|
active: jt,
|
|
57080
57084
|
collisions: Fn,
|
|
57081
57085
|
over: zr,
|
|
57082
|
-
scrollAdjustedTranslate:
|
|
57086
|
+
scrollAdjustedTranslate: ga
|
|
57083
57087
|
} = X.current;
|
|
57084
57088
|
let Lo = null;
|
|
57085
|
-
if (jt &&
|
|
57089
|
+
if (jt && ga) {
|
|
57086
57090
|
const {
|
|
57087
|
-
cancelDrop:
|
|
57091
|
+
cancelDrop: wa
|
|
57088
57092
|
} = z.current;
|
|
57089
57093
|
Lo = {
|
|
57090
57094
|
activatorEvent: et,
|
|
57091
57095
|
active: jt,
|
|
57092
57096
|
collisions: Fn,
|
|
57093
|
-
delta:
|
|
57097
|
+
delta: ga,
|
|
57094
57098
|
over: zr
|
|
57095
|
-
}, vt === Yt.DragEnd && typeof
|
|
57099
|
+
}, vt === Yt.DragEnd && typeof wa == "function" && await Promise.resolve(wa(Lo)) && (vt = Yt.DragCancel);
|
|
57096
57100
|
}
|
|
57097
57101
|
B.current = null, rc(() => {
|
|
57098
57102
|
y({
|
|
57099
57103
|
type: vt
|
|
57100
57104
|
}), b(Uo.Uninitialized), fi(null), F(null), j(null), hi.current = null;
|
|
57101
|
-
const
|
|
57105
|
+
const wa = vt === Yt.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
57102
57106
|
if (Lo) {
|
|
57103
|
-
const Rf = z.current[
|
|
57107
|
+
const Rf = z.current[wa];
|
|
57104
57108
|
Rf == null || Rf(Lo), g({
|
|
57105
|
-
type:
|
|
57109
|
+
type: wa,
|
|
57106
57110
|
event: Lo
|
|
57107
57111
|
});
|
|
57108
57112
|
}
|
|
@@ -57218,7 +57222,7 @@ const VQ = /* @__PURE__ */ br(function(e) {
|
|
|
57218
57222
|
translated: Ct
|
|
57219
57223
|
};
|
|
57220
57224
|
}, [T, ee, pt, Ct, x, we, Ee, L, D, Qn, ge, Ft]), gQ({
|
|
57221
|
-
...
|
|
57225
|
+
...ue,
|
|
57222
57226
|
delta: O,
|
|
57223
57227
|
draggingRect: Ct,
|
|
57224
57228
|
pointerCoordinates: ut,
|
|
@@ -57607,7 +57611,7 @@ function cZ(t) {
|
|
|
57607
57611
|
if (!e && n !== a.current && r.current) {
|
|
57608
57612
|
const l = o.current;
|
|
57609
57613
|
if (l) {
|
|
57610
|
-
const c =
|
|
57614
|
+
const c = ma(r.current, {
|
|
57611
57615
|
ignoreTransform: !0
|
|
57612
57616
|
}), u = {
|
|
57613
57617
|
x: l.left - c.left,
|
|
@@ -57690,7 +57694,7 @@ function uZ(t) {
|
|
|
57690
57694
|
activeIndex: f,
|
|
57691
57695
|
overIndex: v,
|
|
57692
57696
|
index: E
|
|
57693
|
-
}) : null,
|
|
57697
|
+
}) : null, ue = eu(f) && eu(v) ? i({
|
|
57694
57698
|
id: s,
|
|
57695
57699
|
items: u,
|
|
57696
57700
|
activeIndex: f,
|
|
@@ -57698,7 +57702,7 @@ function uZ(t) {
|
|
|
57698
57702
|
}) : E, R = N == null ? void 0 : N.id, U = pe({
|
|
57699
57703
|
activeId: R,
|
|
57700
57704
|
items: u,
|
|
57701
|
-
newIndex:
|
|
57705
|
+
newIndex: ue,
|
|
57702
57706
|
containerId: d
|
|
57703
57707
|
}), Y = u !== U.current.items, X = e({
|
|
57704
57708
|
active: N,
|
|
@@ -57720,8 +57724,8 @@ function uZ(t) {
|
|
|
57720
57724
|
rect: S
|
|
57721
57725
|
});
|
|
57722
57726
|
return le(() => {
|
|
57723
|
-
te && U.current.newIndex !==
|
|
57724
|
-
}, [te,
|
|
57727
|
+
te && U.current.newIndex !== ue && (U.current.newIndex = ue), d !== U.current.containerId && (U.current.containerId = d), u !== U.current.items && (U.current.items = u);
|
|
57728
|
+
}, [te, ue, d, u]), le(() => {
|
|
57725
57729
|
if (R === U.current.activeId)
|
|
57726
57730
|
return;
|
|
57727
57731
|
if (R != null && U.current.activeId == null) {
|
|
@@ -57739,7 +57743,7 @@ function uZ(t) {
|
|
|
57739
57743
|
data: b,
|
|
57740
57744
|
rect: S,
|
|
57741
57745
|
index: E,
|
|
57742
|
-
newIndex:
|
|
57746
|
+
newIndex: ue,
|
|
57743
57747
|
items: u,
|
|
57744
57748
|
isOver: O,
|
|
57745
57749
|
isSorting: te,
|
|
@@ -58549,7 +58553,7 @@ const Mee = (t) => {
|
|
|
58549
58553
|
isValidConnection: o,
|
|
58550
58554
|
onConnect: i
|
|
58551
58555
|
}) => /* @__PURE__ */ p(
|
|
58552
|
-
|
|
58556
|
+
Xa,
|
|
58553
58557
|
{
|
|
58554
58558
|
type: "target",
|
|
58555
58559
|
id: t,
|
|
@@ -58568,7 +58572,7 @@ const Mee = (t) => {
|
|
|
58568
58572
|
isValidConnection: o,
|
|
58569
58573
|
onConnect: i
|
|
58570
58574
|
}) => /* @__PURE__ */ p(
|
|
58571
|
-
|
|
58575
|
+
Xa,
|
|
58572
58576
|
{
|
|
58573
58577
|
type: "source",
|
|
58574
58578
|
id: t,
|
|
@@ -58704,7 +58708,8 @@ const Hee = (t = 100) => {
|
|
|
58704
58708
|
previewId: t.previewId,
|
|
58705
58709
|
appFlowMode: t.appFlowMode,
|
|
58706
58710
|
linkMode: t.linkMode,
|
|
58707
|
-
onSave: t.onSave
|
|
58711
|
+
onSave: t.onSave,
|
|
58712
|
+
onInit: t.onInit
|
|
58708
58713
|
}
|
|
58709
58714
|
) }) }) }) }) });
|
|
58710
58715
|
}, ru = (t) => typeof t != "string" ? !1 : /\{\{.*\}\}/.test(t), jee = ({
|
|
@@ -58894,6 +58899,7 @@ export {
|
|
|
58894
58899
|
Ow as VariableInput,
|
|
58895
58900
|
HE as VariableSelectorProvider,
|
|
58896
58901
|
j3 as VariableTextarea,
|
|
58902
|
+
rt as WorkflowOpStatus,
|
|
58897
58903
|
NF as aiProtocolTypes,
|
|
58898
58904
|
kee as arrowStyles,
|
|
58899
58905
|
IF as canvasGeometry,
|
|
@@ -58918,7 +58924,9 @@ export {
|
|
|
58918
58924
|
xn as nodeTypeColors,
|
|
58919
58925
|
S4 as registerBuiltinFields,
|
|
58920
58926
|
Lee as resetGlobalWorkflowConfig,
|
|
58921
|
-
|
|
58927
|
+
Ta as resolveBool,
|
|
58928
|
+
lY as useCanvasApi,
|
|
58929
|
+
pn as useCanvasConfig,
|
|
58922
58930
|
YX as useCanvasLayout,
|
|
58923
58931
|
Vee as useDataLoader,
|
|
58924
58932
|
See as useDynamicFormContext,
|