x-block-lib 0.6.13 → 0.6.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +200 -192
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
var Sl = Object.defineProperty;
|
|
11
11
|
var Bl = (e, t, n) => t in e ? Sl(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
12
12
|
var tt = (e, t, n) => Bl(e, typeof t != "symbol" ? t + "" : t, n);
|
|
13
|
-
import { getCurrentScope as Rl, onScopeDispose as Dl, computed as Be, toValue as Na, watch as Lt, shallowRef as Ml, getCurrentInstance as Uo, onMounted as dn, defineComponent as ft, onBeforeUnmount as Zi, resolveComponent as De, createBlock as pt, openBlock as Ne, unref as
|
|
13
|
+
import { getCurrentScope as Rl, onScopeDispose as Dl, computed as Be, toValue as Na, watch as Lt, shallowRef as Ml, getCurrentInstance as Uo, onMounted as dn, defineComponent as ft, onBeforeUnmount as Zi, resolveComponent as De, createBlock as pt, openBlock as Ne, unref as X, withCtx as _t, createVNode as Oe, mergeProps as es, useModel as Di, toRefs as Pl, ref as Mt, reactive as Ul, h as Mi, nextTick as ts, onUnmounted as ka, isRef as kn, resolveDirective as xl, withDirectives as wl, createElementBlock as rt, normalizeStyle as ct, createElementVNode as lt, toDisplayString as xo, withModifiers as Ln, Fragment as La, renderList as Vl, withKeys as Sa, createCommentVNode as $t, mergeModels as ks } from "vue";
|
|
14
14
|
import { d as C, j as r, O as p, E as w, u as L, X as Fl, M as T, B as U, i as ce, F as $, a as Wt, b as wo, c as be, C as Ba, e as Yl, P as Pi, N as ns, V as po, g as Pt, f as Kl, h as Ra, s as Hl, S as Fe, k as _o, l as rn, m as sn, n as no, o as ci, p as On, q as Ls, G as ui, r as $l, t as Gl, v as pi, U as oo, D as io, w as en, x as jl, T as Vo, y as Da, z as Wl, A as Xl, H as Ss, I as zl, J as ql } from "./blockly-djhb27mv.js";
|
|
15
15
|
import { openConfirmDlg as Jl, openPromptDlg as Ql, eventBus as ut, messageWarning as Ma, useColor as Fo, useViewStack as Yo, useSystem as Pa } from "x-essential-lib";
|
|
16
16
|
import { pkgs as Zl, elements as Ye, getPropTag as Ko } from "x-runtime-lib";
|
|
@@ -661,9 +661,9 @@ function Qa(e, t, n, o, i, s) {
|
|
|
661
661
|
break;
|
|
662
662
|
}
|
|
663
663
|
if (m) {
|
|
664
|
-
if (!V_(t, function(D,
|
|
665
|
-
if (!F_(m,
|
|
666
|
-
return m.push(
|
|
664
|
+
if (!V_(t, function(D, z) {
|
|
665
|
+
if (!F_(m, z) && (I === D || i(I, D, n, o, s)))
|
|
666
|
+
return m.push(z);
|
|
667
667
|
})) {
|
|
668
668
|
g = !1;
|
|
669
669
|
break;
|
|
@@ -740,18 +740,18 @@ function ld(e, t, n, o, i, s) {
|
|
|
740
740
|
s.set(e, t), s.set(t, e);
|
|
741
741
|
for (var G = a; ++d < c; ) {
|
|
742
742
|
g = l[d];
|
|
743
|
-
var D = e[g],
|
|
743
|
+
var D = e[g], z = t[g];
|
|
744
744
|
if (o)
|
|
745
|
-
var ee = a ? o(
|
|
746
|
-
if (!(ee === void 0 ? D ===
|
|
745
|
+
var ee = a ? o(z, D, g, t, e, s) : o(D, z, g, e, t, s);
|
|
746
|
+
if (!(ee === void 0 ? D === z || i(D, z, n, o, s) : ee)) {
|
|
747
747
|
v = !1;
|
|
748
748
|
break;
|
|
749
749
|
}
|
|
750
750
|
G || (G = g == "constructor");
|
|
751
751
|
}
|
|
752
752
|
if (v && !G) {
|
|
753
|
-
var _e = e.constructor,
|
|
754
|
-
_e !=
|
|
753
|
+
var _e = e.constructor, J = t.constructor;
|
|
754
|
+
_e != J && "constructor" in e && "constructor" in t && !(typeof _e == "function" && _e instanceof _e && typeof J == "function" && J instanceof J) && (v = !1);
|
|
755
755
|
}
|
|
756
756
|
return s.delete(e), s.delete(t), v;
|
|
757
757
|
}
|
|
@@ -10073,14 +10073,14 @@ const Xo = {
|
|
|
10073
10073
|
}), (i, s) => {
|
|
10074
10074
|
const a = De("v-btn"), l = De("v-tooltip");
|
|
10075
10075
|
return Ne(), pt(l, {
|
|
10076
|
-
text:
|
|
10076
|
+
text: X(t)("x-block-lib.tip.hotkeyCtrlQ")
|
|
10077
10077
|
}, {
|
|
10078
10078
|
activator: _t(({ props: c }) => [
|
|
10079
10079
|
Oe(a, es(c, {
|
|
10080
10080
|
variant: "outlined",
|
|
10081
10081
|
density: "comfortable",
|
|
10082
|
-
icon:
|
|
10083
|
-
onClick: s[0] || (s[0] = (_) =>
|
|
10082
|
+
icon: X(tc),
|
|
10083
|
+
onClick: s[0] || (s[0] = (_) => X(ut).emit("cleanWorkspace"))
|
|
10084
10084
|
}), null, 16, ["icon"])
|
|
10085
10085
|
]),
|
|
10086
10086
|
_: 1
|
|
@@ -10099,13 +10099,13 @@ const Xo = {
|
|
|
10099
10099
|
return (o, i) => {
|
|
10100
10100
|
const s = De("v-btn"), a = De("v-tooltip");
|
|
10101
10101
|
return Ne(), pt(a, {
|
|
10102
|
-
text:
|
|
10102
|
+
text: X(t)("x-block-lib.tip.hotkeyCtrlW")
|
|
10103
10103
|
}, {
|
|
10104
10104
|
activator: _t(({ props: l }) => [
|
|
10105
10105
|
Oe(s, es(l, {
|
|
10106
10106
|
variant: "outlined",
|
|
10107
10107
|
density: "comfortable",
|
|
10108
|
-
icon: n.value ?
|
|
10108
|
+
icon: n.value ? X(ic) : X(sc),
|
|
10109
10109
|
onClick: i[0] || (i[0] = (c) => n.value = !n.value)
|
|
10110
10110
|
}), null, 16, ["icon"])
|
|
10111
10111
|
]),
|
|
@@ -10617,9 +10617,9 @@ function Rf(e) {
|
|
|
10617
10617
|
bubbles: !0,
|
|
10618
10618
|
cancelable: !0
|
|
10619
10619
|
}) : (v = document.createEvent("Event"), v.initEvent(o, !0, !0)), v.to = a || n, v.from = l || n, v.item = i || n, v.clone = s, v.oldIndex = c, v.newIndex = _, v.oldDraggableIndex = h, v.newDraggableIndex = d, v.originalEvent = g, v.pullMode = m ? m.lastPutMode : void 0;
|
|
10620
|
-
var
|
|
10621
|
-
for (var ee in
|
|
10622
|
-
v[ee] =
|
|
10620
|
+
var z = ht(ht({}, I), Wn.getEventProperties(o, t));
|
|
10621
|
+
for (var ee in z)
|
|
10622
|
+
v[ee] = z[ee];
|
|
10623
10623
|
n && n.dispatchEvent(v), G[D] && G[D].call(t, v);
|
|
10624
10624
|
}
|
|
10625
10625
|
}
|
|
@@ -11008,7 +11008,7 @@ P.prototype = /** @lends Sortable.prototype */
|
|
|
11008
11008
|
onMove: function(Ze, mt) {
|
|
11009
11009
|
return uo(pe, t, A, o, Ze, Ce(Ze), e, mt);
|
|
11010
11010
|
},
|
|
11011
|
-
changed:
|
|
11011
|
+
changed: z
|
|
11012
11012
|
}, Te));
|
|
11013
11013
|
}
|
|
11014
11014
|
function G() {
|
|
@@ -11021,7 +11021,7 @@ P.prototype = /** @lends Sortable.prototype */
|
|
|
11021
11021
|
v("dragOverAnimationComplete"), m._ignoreWhileAnimating = null;
|
|
11022
11022
|
}), m !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === A && !A.animated || n === t && !n.animated) && (on = null), !a.dragoverBubble && !e.rootEl && n !== document && (A.parentNode[Je]._isOutsideThisEl(e.target), !We && Kt(e)), !a.dragoverBubble && e.stopPropagation && e.stopPropagation(), I = !0;
|
|
11023
11023
|
}
|
|
11024
|
-
function
|
|
11024
|
+
function z() {
|
|
11025
11025
|
qe = Qe(A), kt = Qe(A, a.draggable), He({
|
|
11026
11026
|
sortable: m,
|
|
11027
11027
|
name: "change",
|
|
@@ -11045,32 +11045,32 @@ P.prototype = /** @lends Sortable.prototype */
|
|
|
11045
11045
|
if (ee === A)
|
|
11046
11046
|
return D(!1);
|
|
11047
11047
|
if (ee && t === e.target && (n = ee), n && (i = Ce(n)), uo(pe, t, A, o, n, i, e, !!n) !== !1)
|
|
11048
|
-
return G(), ee && ee.nextSibling ? t.insertBefore(A, ee.nextSibling) : t.appendChild(A), he = t,
|
|
11048
|
+
return G(), ee && ee.nextSibling ? t.insertBefore(A, ee.nextSibling) : t.appendChild(A), he = t, z(), D(!0);
|
|
11049
11049
|
} else if (ee && Ff(e, g, this)) {
|
|
11050
11050
|
var _e = mn(t, 0, a, !0);
|
|
11051
11051
|
if (_e === A)
|
|
11052
11052
|
return D(!1);
|
|
11053
11053
|
if (n = _e, i = Ce(n), uo(pe, t, A, o, n, i, e, !1) !== !1)
|
|
11054
|
-
return G(), t.insertBefore(A, _e), he = t,
|
|
11054
|
+
return G(), t.insertBefore(A, _e), he = t, z(), D(!0);
|
|
11055
11055
|
} else if (n.parentNode === t) {
|
|
11056
11056
|
i = Ce(n);
|
|
11057
|
-
var
|
|
11058
|
-
on !== n && (ke = i[F], Pn = !1, lo = !R && a.invertSwap || $e),
|
|
11059
|
-
var
|
|
11060
|
-
if (
|
|
11061
|
-
var
|
|
11057
|
+
var J = 0, ke, $e = A.parentNode !== t, R = !Pf(A.animated && A.toRect || o, n.animated && n.toRect || i, g), F = g ? "top" : "left", se = ma(n, "top", "top") || ma(A, "top", "top"), me = se ? se.scrollTop : void 0;
|
|
11058
|
+
on !== n && (ke = i[F], Pn = !1, lo = !R && a.invertSwap || $e), J = Kf(e, n, i, g, R ? 1 : a.swapThreshold, a.invertedSwapThreshold == null ? a.swapThreshold : a.invertedSwapThreshold, lo, on === n);
|
|
11059
|
+
var N;
|
|
11060
|
+
if (J !== 0) {
|
|
11061
|
+
var W = Qe(A);
|
|
11062
11062
|
do
|
|
11063
|
-
|
|
11064
|
-
while (
|
|
11063
|
+
W -= J, N = he.children[W];
|
|
11064
|
+
while (N && (M(N, "display") === "none" || N === K));
|
|
11065
11065
|
}
|
|
11066
|
-
if (
|
|
11066
|
+
if (J === 0 || N === n)
|
|
11067
11067
|
return D(!1);
|
|
11068
|
-
on = n, Mn =
|
|
11068
|
+
on = n, Mn = J;
|
|
11069
11069
|
var ne = n.nextElementSibling, ie = !1;
|
|
11070
|
-
ie =
|
|
11070
|
+
ie = J === 1;
|
|
11071
11071
|
var Le = uo(pe, t, A, o, n, i, e, ie);
|
|
11072
11072
|
if (Le !== !1)
|
|
11073
|
-
return (Le === 1 || Le === -1) && (ie = Le === 1), Xi = !0, setTimeout(Vf, 30), G(), ie && !ne ? t.appendChild(A) : n.parentNode.insertBefore(A, ie ? ne : n), se && Cr(se, 0, me - se.scrollTop), he = A.parentNode, ke !== void 0 && !lo && (To = Math.abs(ke - Ce(n)[F])),
|
|
11073
|
+
return (Le === 1 || Le === -1) && (ie = Le === 1), Xi = !0, setTimeout(Vf, 30), G(), ie && !ne ? t.appendChild(A) : n.parentNode.insertBefore(A, ie ? ne : n), se && Cr(se, 0, me - se.scrollTop), he = A.parentNode, ke !== void 0 && !lo && (To = Math.abs(ke - Ce(n)[F])), z(), D(!0);
|
|
11074
11074
|
}
|
|
11075
11075
|
if (t.contains(A))
|
|
11076
11076
|
return D(!1);
|
|
@@ -11402,13 +11402,13 @@ var Si = yr(function(e, t, n, o) {
|
|
|
11402
11402
|
qi !== n && (qi = n, Ao(), Cn = t.scroll, h = t.scrollFn, Cn === !0 && (Cn = Dt(n, !0)));
|
|
11403
11403
|
var d = 0, g = Cn;
|
|
11404
11404
|
do {
|
|
11405
|
-
var m = g, I = Ce(m), v = I.top, G = I.bottom, D = I.left,
|
|
11406
|
-
m === c ? (
|
|
11407
|
-
var
|
|
11405
|
+
var m = g, I = Ce(m), v = I.top, G = I.bottom, D = I.left, z = I.right, ee = I.width, _e = I.height, J = void 0, ke = void 0, $e = m.scrollWidth, R = m.scrollHeight, F = M(m), se = m.scrollLeft, me = m.scrollTop;
|
|
11406
|
+
m === c ? (J = ee < $e && (F.overflowX === "auto" || F.overflowX === "scroll" || F.overflowX === "visible"), ke = _e < R && (F.overflowY === "auto" || F.overflowY === "scroll" || F.overflowY === "visible")) : (J = ee < $e && (F.overflowX === "auto" || F.overflowX === "scroll"), ke = _e < R && (F.overflowY === "auto" || F.overflowY === "scroll"));
|
|
11407
|
+
var N = J && (Math.abs(z - i) <= a && se + ee < $e) - (Math.abs(D - i) <= a && !!se), W = ke && (Math.abs(G - s) <= a && me + _e < R) - (Math.abs(v - s) <= a && !!me);
|
|
11408
11408
|
if (!ye[d])
|
|
11409
11409
|
for (var ne = 0; ne <= d; ne++)
|
|
11410
11410
|
ye[ne] || (ye[ne] = {});
|
|
11411
|
-
(ye[d].vx !=
|
|
11411
|
+
(ye[d].vx != N || ye[d].vy != W || ye[d].el !== m) && (ye[d].el = m, ye[d].vx = N, ye[d].vy = W, clearInterval(ye[d].pid), (N != 0 || W != 0) && (_ = !0, ye[d].pid = setInterval((function() {
|
|
11412
11412
|
o && this.layer === 0 && P.active._onTouchMove(Po);
|
|
11413
11413
|
var ie = ye[this.layer].vy ? ye[this.layer].vy * l : 0, Le = ye[this.layer].vx ? ye[this.layer].vx * l : 0;
|
|
11414
11414
|
typeof h == "function" && h.call(P.dragged.parentNode[Je], Le, ie, e, Po, ye[this.layer].el) !== "continue" || Cr(ye[this.layer].el, Le, ie);
|
|
@@ -11489,83 +11489,83 @@ function Jf(...e) {
|
|
|
11489
11489
|
let i = null;
|
|
11490
11490
|
const s = e[0];
|
|
11491
11491
|
let [, a, l] = e;
|
|
11492
|
-
Array.isArray(
|
|
11492
|
+
Array.isArray(X(a)) || (l = a, a = null);
|
|
11493
11493
|
let c = null;
|
|
11494
11494
|
const {
|
|
11495
11495
|
immediate: _ = !0,
|
|
11496
11496
|
clone: h = Wf,
|
|
11497
11497
|
customUpdate: d
|
|
11498
|
-
} = (n =
|
|
11498
|
+
} = (n = X(l)) != null ? n : {};
|
|
11499
11499
|
function g(R) {
|
|
11500
11500
|
var F;
|
|
11501
|
-
const { from: se, oldIndex: me, item:
|
|
11501
|
+
const { from: se, oldIndex: me, item: N } = R;
|
|
11502
11502
|
i = Array.from(se.childNodes);
|
|
11503
|
-
const
|
|
11504
|
-
ba(
|
|
11503
|
+
const W = X((F = X(a)) == null ? void 0 : F[me]), ne = h(W);
|
|
11504
|
+
ba(W, ne), N[Ia] = ne;
|
|
11505
11505
|
}
|
|
11506
11506
|
function m(R) {
|
|
11507
11507
|
const F = R.item[Ia];
|
|
11508
11508
|
if (!df(F)) {
|
|
11509
11509
|
if (vi(R.item), kn(a)) {
|
|
11510
|
-
const se = [...
|
|
11510
|
+
const se = [...X(a)];
|
|
11511
11511
|
a.value = pa(se, R.newDraggableIndex, F);
|
|
11512
11512
|
return;
|
|
11513
11513
|
}
|
|
11514
|
-
pa(
|
|
11514
|
+
pa(X(a), R.newDraggableIndex, F);
|
|
11515
11515
|
}
|
|
11516
11516
|
}
|
|
11517
11517
|
function I(R) {
|
|
11518
|
-
const { from: F, item: se, oldIndex: me, oldDraggableIndex:
|
|
11519
|
-
if (_a(F, se, me),
|
|
11518
|
+
const { from: F, item: se, oldIndex: me, oldDraggableIndex: N, pullMode: W, clone: ne } = R;
|
|
11519
|
+
if (_a(F, se, me), W === "clone") {
|
|
11520
11520
|
vi(ne);
|
|
11521
11521
|
return;
|
|
11522
11522
|
}
|
|
11523
11523
|
if (kn(a)) {
|
|
11524
|
-
const ie = [...
|
|
11525
|
-
a.value = ua(ie,
|
|
11524
|
+
const ie = [...X(a)];
|
|
11525
|
+
a.value = ua(ie, N);
|
|
11526
11526
|
return;
|
|
11527
11527
|
}
|
|
11528
|
-
ua(
|
|
11528
|
+
ua(X(a), N);
|
|
11529
11529
|
}
|
|
11530
11530
|
function v(R) {
|
|
11531
11531
|
if (d) {
|
|
11532
11532
|
d(R);
|
|
11533
11533
|
return;
|
|
11534
11534
|
}
|
|
11535
|
-
const { from: F, item: se, oldIndex: me, oldDraggableIndex:
|
|
11535
|
+
const { from: F, item: se, oldIndex: me, oldDraggableIndex: N, newDraggableIndex: W } = R;
|
|
11536
11536
|
if (vi(se), _a(F, se, me), kn(a)) {
|
|
11537
|
-
const ne = [...
|
|
11537
|
+
const ne = [...X(a)];
|
|
11538
11538
|
a.value = ca(
|
|
11539
11539
|
ne,
|
|
11540
|
-
|
|
11541
|
-
|
|
11540
|
+
N,
|
|
11541
|
+
W
|
|
11542
11542
|
);
|
|
11543
11543
|
return;
|
|
11544
11544
|
}
|
|
11545
|
-
ca(
|
|
11545
|
+
ca(X(a), N, W);
|
|
11546
11546
|
}
|
|
11547
11547
|
function G(R) {
|
|
11548
|
-
const { newIndex: F, oldIndex: se, from: me, to:
|
|
11549
|
-
let
|
|
11550
|
-
const ne = F === se && me ===
|
|
11548
|
+
const { newIndex: F, oldIndex: se, from: me, to: N } = R;
|
|
11549
|
+
let W = null;
|
|
11550
|
+
const ne = F === se && me === N;
|
|
11551
11551
|
try {
|
|
11552
11552
|
if (ne) {
|
|
11553
11553
|
let ie = null;
|
|
11554
11554
|
i == null || i.some((Le, We) => {
|
|
11555
|
-
if (ie && (i == null ? void 0 : i.length) !==
|
|
11555
|
+
if (ie && (i == null ? void 0 : i.length) !== N.childNodes.length)
|
|
11556
11556
|
return me.insertBefore(ie, Le.nextSibling), !0;
|
|
11557
|
-
const Te =
|
|
11558
|
-
ie =
|
|
11557
|
+
const Te = N.childNodes[We];
|
|
11558
|
+
ie = N == null ? void 0 : N.replaceChild(Le, Te);
|
|
11559
11559
|
});
|
|
11560
11560
|
}
|
|
11561
11561
|
} catch (ie) {
|
|
11562
|
-
|
|
11562
|
+
W = ie;
|
|
11563
11563
|
} finally {
|
|
11564
11564
|
i = null;
|
|
11565
11565
|
}
|
|
11566
11566
|
ts(() => {
|
|
11567
|
-
if (ba(),
|
|
11568
|
-
throw
|
|
11567
|
+
if (ba(), W)
|
|
11568
|
+
throw W;
|
|
11569
11569
|
});
|
|
11570
11570
|
}
|
|
11571
11571
|
const D = {
|
|
@@ -11575,25 +11575,25 @@ function Jf(...e) {
|
|
|
11575
11575
|
onRemove: I,
|
|
11576
11576
|
onEnd: G
|
|
11577
11577
|
};
|
|
11578
|
-
function
|
|
11579
|
-
const F =
|
|
11578
|
+
function z(R) {
|
|
11579
|
+
const F = X(s);
|
|
11580
11580
|
return R || (R = hf(F) ? ff(F, o == null ? void 0 : o.$el) : F), R && !Tf(R) && (R = R.$el), R || uf("Root element not found"), R;
|
|
11581
11581
|
}
|
|
11582
11582
|
function ee() {
|
|
11583
11583
|
var R;
|
|
11584
|
-
const F = (R =
|
|
11585
|
-
return da(
|
|
11586
|
-
Ef(
|
|
11584
|
+
const F = (R = X(l)) != null ? R : {}, { immediate: se, clone: me } = F, N = Er(F, ["immediate", "clone"]);
|
|
11585
|
+
return da(N, (W, ne) => {
|
|
11586
|
+
Ef(W) && (N[W] = (ie, ...Le) => {
|
|
11587
11587
|
const We = qf();
|
|
11588
11588
|
return Af(ie, We), ne(ie, ...Le);
|
|
11589
11589
|
});
|
|
11590
11590
|
}), mf(
|
|
11591
11591
|
a === null ? {} : D,
|
|
11592
|
-
|
|
11592
|
+
N
|
|
11593
11593
|
);
|
|
11594
11594
|
}
|
|
11595
11595
|
const _e = (R) => {
|
|
11596
|
-
R =
|
|
11596
|
+
R = z(R), c && J.destroy(), c = new P(R, ee());
|
|
11597
11597
|
};
|
|
11598
11598
|
Lt(
|
|
11599
11599
|
() => l,
|
|
@@ -11604,7 +11604,7 @@ function Jf(...e) {
|
|
|
11604
11604
|
},
|
|
11605
11605
|
{ deep: !0 }
|
|
11606
11606
|
);
|
|
11607
|
-
const
|
|
11607
|
+
const J = {
|
|
11608
11608
|
option: (R, F) => c == null ? void 0 : c.option(R, F),
|
|
11609
11609
|
destroy: () => {
|
|
11610
11610
|
c == null || c.destroy(), c = null;
|
|
@@ -11612,10 +11612,10 @@ function Jf(...e) {
|
|
|
11612
11612
|
save: () => c == null ? void 0 : c.save(),
|
|
11613
11613
|
toArray: () => c == null ? void 0 : c.toArray(),
|
|
11614
11614
|
closest: (...R) => c == null ? void 0 : c.closest(...R)
|
|
11615
|
-
}, ke = () =>
|
|
11615
|
+
}, ke = () => J == null ? void 0 : J.option("disabled", !0), $e = () => J == null ? void 0 : J.option("disabled", !1);
|
|
11616
11616
|
return zf(() => {
|
|
11617
11617
|
_ && _e();
|
|
11618
|
-
}), Xf(
|
|
11618
|
+
}), Xf(J.destroy), ln({ start: _e, pause: ke, resume: $e }, J);
|
|
11619
11619
|
}
|
|
11620
11620
|
const Qi = [
|
|
11621
11621
|
"update",
|
|
@@ -11689,7 +11689,7 @@ const Qi = [
|
|
|
11689
11689
|
return h[g] = (...m) => n(d, ...m), h;
|
|
11690
11690
|
}, {}), a = Be(() => {
|
|
11691
11691
|
const h = Pl(e), { modelValue: d } = h, g = Er(h, ["modelValue"]), m = Object.entries(g).reduce((I, [v, G]) => {
|
|
11692
|
-
const D =
|
|
11692
|
+
const D = X(G);
|
|
11693
11693
|
return D !== void 0 && (I[v] = D), I;
|
|
11694
11694
|
}, {});
|
|
11695
11695
|
return ln(ln({}, s), _f(ln(ln({}, i), m)));
|
|
@@ -11742,7 +11742,7 @@ const Qi = [
|
|
|
11742
11742
|
Oe(g),
|
|
11743
11743
|
Oe(m, {
|
|
11744
11744
|
class: "x-handle cursor-move mr-3",
|
|
11745
|
-
icon:
|
|
11745
|
+
icon: X(oc),
|
|
11746
11746
|
onMousedown: d[0] || (d[0] = Ln(() => {
|
|
11747
11747
|
}, ["stop"]))
|
|
11748
11748
|
}, null, 8, ["icon"]),
|
|
@@ -11775,8 +11775,8 @@ const Qi = [
|
|
|
11775
11775
|
const v = I.id === ((D = sn()) == null ? void 0 : D.id);
|
|
11776
11776
|
let G = "<n/a>";
|
|
11777
11777
|
if (I.type.startsWith("on_node_event_v")) {
|
|
11778
|
-
const
|
|
11779
|
-
ee && (G = t(ee.name),
|
|
11778
|
+
const z = I, ee = Ye[z.node.key];
|
|
11779
|
+
ee && (G = t(ee.name), z.node.alias && (G += " / " + z.node.alias), G += " - " + T[z.event.name]);
|
|
11780
11780
|
} else I.type.startsWith("func_entry_v") ? G = t("x-block-lib.funcEntry") : I.type.startsWith("procedure_def_v") ? (console.log(I), G = t("x-block-lib.procedure") + " - " + I.getFieldValue("NAME")) : G = t("x-block-lib.temporaryBlock");
|
|
11781
11781
|
g.push({
|
|
11782
11782
|
id: I.id,
|
|
@@ -11832,7 +11832,7 @@ const Qi = [
|
|
|
11832
11832
|
const m = g.getBlockById(d);
|
|
11833
11833
|
Wl.setSelected(m), pr(d), _.value = !1;
|
|
11834
11834
|
};
|
|
11835
|
-
return (d, g) => o.value.length > 0 ? (Ne(), pt(
|
|
11835
|
+
return (d, g) => o.value.length > 0 ? (Ne(), pt(X(Zf), {
|
|
11836
11836
|
key: 0,
|
|
11837
11837
|
modelValue: o.value,
|
|
11838
11838
|
"onUpdate:modelValue": g[0] || (g[0] = (m) => o.value = m),
|
|
@@ -11853,7 +11853,7 @@ const Qi = [
|
|
|
11853
11853
|
}, null, 8, ["id", "title", "select"]))), 128))
|
|
11854
11854
|
]),
|
|
11855
11855
|
_: 1
|
|
11856
|
-
}, 8, ["modelValue"])) : (Ne(), rt("span", ng, xo(
|
|
11856
|
+
}, 8, ["modelValue"])) : (Ne(), rt("span", ng, xo(X(t)("x-block-lib.noOption")), 1));
|
|
11857
11857
|
}
|
|
11858
11858
|
}), xr = (e, t) => {
|
|
11859
11859
|
const n = e.__vccOpts || e;
|
|
@@ -11891,7 +11891,7 @@ const rg = /* @__PURE__ */ xr(sg, [["render", ag]]), lg = { class: "text-subtitl
|
|
|
11891
11891
|
const g = De("v-sheet"), m = De("v-btn"), I = De("v-spacer"), v = De("v-dialog"), G = De("v-tooltip");
|
|
11892
11892
|
return Ne(), rt(La, null, [
|
|
11893
11893
|
Oe(v, {
|
|
11894
|
-
modelValue:
|
|
11894
|
+
modelValue: X(_),
|
|
11895
11895
|
"onUpdate:modelValue": d[3] || (d[3] = (D) => kn(_) ? _.value = D : null),
|
|
11896
11896
|
transition: "scroll-x-reverse-transition",
|
|
11897
11897
|
persistent: "",
|
|
@@ -11910,7 +11910,7 @@ const rg = /* @__PURE__ */ xr(sg, [["render", ag]]), lg = { class: "text-subtitl
|
|
|
11910
11910
|
class: "elevation-2",
|
|
11911
11911
|
style: ct(a.value)
|
|
11912
11912
|
}, [
|
|
11913
|
-
|
|
11913
|
+
X(o) ? (Ne(), pt(g, {
|
|
11914
11914
|
key: 0,
|
|
11915
11915
|
color: "transparent",
|
|
11916
11916
|
height: 24
|
|
@@ -11924,10 +11924,10 @@ const rg = /* @__PURE__ */ xr(sg, [["render", ag]]), lg = { class: "text-subtitl
|
|
|
11924
11924
|
Oe(m, {
|
|
11925
11925
|
variant: "text",
|
|
11926
11926
|
density: "comfortable",
|
|
11927
|
-
icon:
|
|
11927
|
+
icon: X(Ua),
|
|
11928
11928
|
onClick: d[0] || (d[0] = (D) => _.value = !1)
|
|
11929
11929
|
}, null, 8, ["icon"]),
|
|
11930
|
-
lt("span", lg, xo(
|
|
11930
|
+
lt("span", lg, xo(X(t)("x-block-lib.navigator")), 1),
|
|
11931
11931
|
Oe(I)
|
|
11932
11932
|
]),
|
|
11933
11933
|
_: 1
|
|
@@ -11950,14 +11950,14 @@ const rg = /* @__PURE__ */ xr(sg, [["render", ag]]), lg = { class: "text-subtitl
|
|
|
11950
11950
|
_: 1
|
|
11951
11951
|
}, 8, ["modelValue"]),
|
|
11952
11952
|
Oe(G, {
|
|
11953
|
-
text:
|
|
11953
|
+
text: X(t)("x-block-lib.tip.hotkeyCtrlE")
|
|
11954
11954
|
}, {
|
|
11955
11955
|
activator: _t(({ props: D }) => [
|
|
11956
11956
|
Oe(m, es(D, {
|
|
11957
11957
|
variant: "outlined",
|
|
11958
11958
|
density: "comfortable",
|
|
11959
|
-
icon:
|
|
11960
|
-
onClick: d[5] || (d[5] = (
|
|
11959
|
+
icon: X(ac),
|
|
11960
|
+
onClick: d[5] || (d[5] = (z) => _.value = !0)
|
|
11961
11961
|
}), null, 16, ["icon"])
|
|
11962
11962
|
]),
|
|
11963
11963
|
_: 1
|
|
@@ -12076,36 +12076,44 @@ const hg = { class: "position-relative w-100 h-100" }, fg = /* @__PURE__ */ ft({
|
|
|
12076
12076
|
console.assert(!1);
|
|
12077
12077
|
return;
|
|
12078
12078
|
}
|
|
12079
|
-
await ra(e.locale), l = ug(a.value, e.type, e.version, e.dark), l.addChangeListener(w.disableOrphans), l.addChangeListener(G)
|
|
12080
|
-
const
|
|
12079
|
+
await ra(e.locale), l = ug(a.value, e.type, e.version, e.dark), l.addChangeListener(w.disableOrphans), l.addChangeListener(G);
|
|
12080
|
+
const N = document.querySelector("#blocklyEditor .blocklyFlyout");
|
|
12081
12081
|
new MutationObserver((ne) => {
|
|
12082
12082
|
ne.forEach((ie) => {
|
|
12083
12083
|
ie.type === "attributes" && ie.attributeName === "style" && (v.value = l.getFlyout().isVisible());
|
|
12084
12084
|
});
|
|
12085
|
-
}).observe(
|
|
12085
|
+
}).observe(N, { attributes: !0 }), v.value = l.getFlyout().isVisible(), _e(), J(), await ts(), s("ready");
|
|
12086
12086
|
}), Zi(() => {
|
|
12087
12087
|
v.value = !1;
|
|
12088
|
+
const N = [
|
|
12089
|
+
document.querySelector(".blocklyWidgetDiv"),
|
|
12090
|
+
document.querySelector(".blocklyDropDownDiv"),
|
|
12091
|
+
document.querySelector(".blocklyTooltipDiv"),
|
|
12092
|
+
document.querySelector(".blocklyComputeCanvas")
|
|
12093
|
+
];
|
|
12094
|
+
for (const W of N)
|
|
12095
|
+
W == null || W.remove();
|
|
12088
12096
|
}), _c(a, () => {
|
|
12089
12097
|
l && zl(l);
|
|
12090
12098
|
});
|
|
12091
|
-
async function G(
|
|
12092
|
-
if (
|
|
12099
|
+
async function G(N) {
|
|
12100
|
+
if (N.type === w.FINISHED_LOADING) {
|
|
12093
12101
|
_r(), ut.emit("codeUpdate"), c.value = !1;
|
|
12094
12102
|
return;
|
|
12095
12103
|
}
|
|
12096
12104
|
if (!c.value) {
|
|
12097
|
-
if (
|
|
12105
|
+
if (N.type === w.VIEWPORT_CHANGE) {
|
|
12098
12106
|
i.value = l.getScale();
|
|
12099
12107
|
return;
|
|
12100
12108
|
}
|
|
12101
|
-
|
|
12109
|
+
N.type === w.BLOCK_DRAG && (N.isStart ? _.value = !0 : _.value = !1), ut.emit("codeUpdate");
|
|
12102
12110
|
}
|
|
12103
12111
|
}
|
|
12104
|
-
const D = (
|
|
12105
|
-
c.value = !0, Ss.workspaces.load(
|
|
12106
|
-
},
|
|
12112
|
+
const D = (N) => {
|
|
12113
|
+
c.value = !0, Ss.workspaces.load(N, l);
|
|
12114
|
+
}, z = () => Ss.workspaces.save(l), ee = () => r.workspaceToCode(l), _e = () => {
|
|
12107
12115
|
l.options.readOnly = o.value, l.options.readOnly && (v.value = !1);
|
|
12108
|
-
},
|
|
12116
|
+
}, J = () => {
|
|
12109
12117
|
l.setScale(i.value);
|
|
12110
12118
|
};
|
|
12111
12119
|
class ke extends w.Abstract {
|
|
@@ -12116,16 +12124,16 @@ const hg = { class: "position-relative w-100 h-100" }, fg = /* @__PURE__ */ ft({
|
|
|
12116
12124
|
}
|
|
12117
12125
|
const $e = () => {
|
|
12118
12126
|
l.fireChangeListener(new ke());
|
|
12119
|
-
}, R = (
|
|
12120
|
-
if (
|
|
12127
|
+
}, R = (N) => {
|
|
12128
|
+
if (N.key === "q" && N.ctrlKey) {
|
|
12121
12129
|
F();
|
|
12122
12130
|
return;
|
|
12123
12131
|
}
|
|
12124
|
-
if (
|
|
12132
|
+
if (N.key === "w" && N.ctrlKey) {
|
|
12125
12133
|
se();
|
|
12126
12134
|
return;
|
|
12127
12135
|
}
|
|
12128
|
-
if (
|
|
12136
|
+
if (N.key === "e" && N.ctrlKey) {
|
|
12129
12137
|
me();
|
|
12130
12138
|
return;
|
|
12131
12139
|
}
|
|
@@ -12142,21 +12150,21 @@ const hg = { class: "position-relative w-100 h-100" }, fg = /* @__PURE__ */ ft({
|
|
|
12142
12150
|
window.removeEventListener("keydown", R, !1);
|
|
12143
12151
|
}), Lt(
|
|
12144
12152
|
() => e.locale,
|
|
12145
|
-
(
|
|
12146
|
-
ra(
|
|
12153
|
+
(N) => {
|
|
12154
|
+
ra(N);
|
|
12147
12155
|
}
|
|
12148
12156
|
), Lt(
|
|
12149
12157
|
() => e.dark,
|
|
12150
|
-
(
|
|
12151
|
-
ef(
|
|
12158
|
+
(N) => {
|
|
12159
|
+
ef(N ? "dark" : "light");
|
|
12152
12160
|
}
|
|
12153
|
-
), Lt(v, (
|
|
12154
|
-
|
|
12161
|
+
), Lt(v, (N) => {
|
|
12162
|
+
N || l.hideChaff();
|
|
12155
12163
|
}), Lt(o, () => {
|
|
12156
12164
|
_e();
|
|
12157
12165
|
}), Lt(i, () => {
|
|
12158
|
-
|
|
12159
|
-
}), t({ loading: c, load: D, save:
|
|
12166
|
+
J();
|
|
12167
|
+
}), t({ loading: c, load: D, save: z, generateCode: ee, fireStateChange: $e }), (N, W) => {
|
|
12160
12168
|
const ne = De("v-icon"), ie = De("x-loading");
|
|
12161
12169
|
return Ne(), rt("div", hg, [
|
|
12162
12170
|
lt("div", {
|
|
@@ -12172,7 +12180,7 @@ const hg = { class: "position-relative w-100 h-100" }, fg = /* @__PURE__ */ ft({
|
|
|
12172
12180
|
}, [
|
|
12173
12181
|
Oe(ne, {
|
|
12174
12182
|
size: "x-large",
|
|
12175
|
-
icon:
|
|
12183
|
+
icon: X(nc)
|
|
12176
12184
|
}, null, 8, ["icon"])
|
|
12177
12185
|
], 4)) : $t("", !0),
|
|
12178
12186
|
c.value ? $t("", !0) : (Ne(), rt("div", {
|
|
@@ -12183,7 +12191,7 @@ const hg = { class: "position-relative w-100 h-100" }, fg = /* @__PURE__ */ ft({
|
|
|
12183
12191
|
Oe(af, { lock: o.value }, null, 8, ["lock"]),
|
|
12184
12192
|
Oe(rf, {
|
|
12185
12193
|
modelValue: o.value,
|
|
12186
|
-
"onUpdate:modelValue":
|
|
12194
|
+
"onUpdate:modelValue": W[0] || (W[0] = (Le) => o.value = Le)
|
|
12187
12195
|
}, null, 8, ["modelValue"]),
|
|
12188
12196
|
Oe(cg, {
|
|
12189
12197
|
type: h.value,
|
|
@@ -12420,7 +12428,7 @@ function gg() {
|
|
|
12420
12428
|
function D(...u) {
|
|
12421
12429
|
return "(" + (G(u).capture ? "" : "?:") + u.map((Y) => d(Y)).join("|") + ")";
|
|
12422
12430
|
}
|
|
12423
|
-
function
|
|
12431
|
+
function z(u) {
|
|
12424
12432
|
return new RegExp(u.toString() + "|").exec("").length - 1;
|
|
12425
12433
|
}
|
|
12426
12434
|
function ee(u, f) {
|
|
@@ -12428,24 +12436,24 @@ function gg() {
|
|
|
12428
12436
|
return O && O.index === 0;
|
|
12429
12437
|
}
|
|
12430
12438
|
const _e = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
|
12431
|
-
function
|
|
12439
|
+
function J(u, { joinWith: f }) {
|
|
12432
12440
|
let O = 0;
|
|
12433
12441
|
return u.map((Y) => {
|
|
12434
12442
|
O += 1;
|
|
12435
12443
|
const Ee = O;
|
|
12436
|
-
let Ae = d(Y),
|
|
12444
|
+
let Ae = d(Y), k = "";
|
|
12437
12445
|
for (; Ae.length > 0; ) {
|
|
12438
12446
|
const y = _e.exec(Ae);
|
|
12439
12447
|
if (!y) {
|
|
12440
|
-
|
|
12448
|
+
k += Ae;
|
|
12441
12449
|
break;
|
|
12442
12450
|
}
|
|
12443
|
-
|
|
12451
|
+
k += Ae.substring(0, y.index), Ae = Ae.substring(y.index + y[0].length), y[0][0] === "\\" && y[1] ? k += "\\" + String(Number(y[1]) + Ee) : (k += y[0], y[0] === "(" && O++);
|
|
12444
12452
|
}
|
|
12445
|
-
return
|
|
12453
|
+
return k;
|
|
12446
12454
|
}).map((Y) => `(${Y})`).join(f);
|
|
12447
12455
|
}
|
|
12448
|
-
const ke = /\b\B/, $e = "[a-zA-Z]\\w*", R = "[a-zA-Z_]\\w*", F = "\\b\\d+(\\.\\d+)?", se = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", me = "\\b(0b[01]+)",
|
|
12456
|
+
const ke = /\b\B/, $e = "[a-zA-Z]\\w*", R = "[a-zA-Z_]\\w*", F = "\\b\\d+(\\.\\d+)?", se = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", me = "\\b(0b[01]+)", N = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", W = (u = {}) => {
|
|
12449
12457
|
const f = /^#![ ]*\//;
|
|
12450
12458
|
return u.binary && (u.begin = v(
|
|
12451
12459
|
f,
|
|
@@ -12618,8 +12626,8 @@ function gg() {
|
|
|
12618
12626
|
PHRASAL_WORDS_MODE: We,
|
|
12619
12627
|
QUOTE_STRING_MODE: Le,
|
|
12620
12628
|
REGEXP_MODE: Kr,
|
|
12621
|
-
RE_STARTERS_RE:
|
|
12622
|
-
SHEBANG:
|
|
12629
|
+
RE_STARTERS_RE: N,
|
|
12630
|
+
SHEBANG: W,
|
|
12623
12631
|
TITLE_MODE: Hr,
|
|
12624
12632
|
UNDERSCORE_IDENT_RE: R,
|
|
12625
12633
|
UNDERSCORE_TITLE_MODE: $r
|
|
@@ -12681,8 +12689,8 @@ function gg() {
|
|
|
12681
12689
|
_s(u[Ae], f, Ae)
|
|
12682
12690
|
);
|
|
12683
12691
|
}), Y;
|
|
12684
|
-
function Ee(Ae,
|
|
12685
|
-
f && (
|
|
12692
|
+
function Ee(Ae, k) {
|
|
12693
|
+
f && (k = k.map((y) => y.toLowerCase())), k.forEach(function(y) {
|
|
12686
12694
|
const x = y.split("|");
|
|
12687
12695
|
Y[x[0]] = [Ae, tl(x[0], x[1])];
|
|
12688
12696
|
});
|
|
@@ -12703,10 +12711,10 @@ function gg() {
|
|
|
12703
12711
|
}, qn = new Error();
|
|
12704
12712
|
function fs(u, f, { key: O }) {
|
|
12705
12713
|
let Y = 0;
|
|
12706
|
-
const Ee = u[O], Ae = {},
|
|
12714
|
+
const Ee = u[O], Ae = {}, k = {};
|
|
12707
12715
|
for (let y = 1; y <= f.length; y++)
|
|
12708
|
-
|
|
12709
|
-
u[O] =
|
|
12716
|
+
k[y + Y] = Ee[y], Ae[y + Y] = !0, Y += z(f[y - 1]);
|
|
12717
|
+
u[O] = k, u[O]._emit = Ae, u[O]._multi = !0;
|
|
12710
12718
|
}
|
|
12711
12719
|
function ol(u) {
|
|
12712
12720
|
if (Array.isArray(u.begin)) {
|
|
@@ -12714,7 +12722,7 @@ function gg() {
|
|
|
12714
12722
|
throw Vt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), qn;
|
|
12715
12723
|
if (typeof u.beginScope != "object" || u.beginScope === null)
|
|
12716
12724
|
throw Vt("beginScope must be object"), qn;
|
|
12717
|
-
fs(u, u.begin, { key: "beginScope" }), u.begin =
|
|
12725
|
+
fs(u, u.begin, { key: "beginScope" }), u.begin = J(u.begin, { joinWith: "" });
|
|
12718
12726
|
}
|
|
12719
12727
|
}
|
|
12720
12728
|
function il(u) {
|
|
@@ -12723,7 +12731,7 @@ function gg() {
|
|
|
12723
12731
|
throw Vt("skip, excludeEnd, returnEnd not compatible with endScope: {}"), qn;
|
|
12724
12732
|
if (typeof u.endScope != "object" || u.endScope === null)
|
|
12725
12733
|
throw Vt("endScope must be object"), qn;
|
|
12726
|
-
fs(u, u.end, { key: "endScope" }), u.end =
|
|
12734
|
+
fs(u, u.end, { key: "endScope" }), u.end = J(u.end, { joinWith: "" });
|
|
12727
12735
|
}
|
|
12728
12736
|
}
|
|
12729
12737
|
function sl(u) {
|
|
@@ -12733,9 +12741,9 @@ function gg() {
|
|
|
12733
12741
|
sl(u), typeof u.beginScope == "string" && (u.beginScope = { _wrap: u.beginScope }), typeof u.endScope == "string" && (u.endScope = { _wrap: u.endScope }), ol(u), il(u);
|
|
12734
12742
|
}
|
|
12735
12743
|
function rl(u) {
|
|
12736
|
-
function f(
|
|
12744
|
+
function f(k, y) {
|
|
12737
12745
|
return new RegExp(
|
|
12738
|
-
d(
|
|
12746
|
+
d(k),
|
|
12739
12747
|
"m" + (u.case_insensitive ? "i" : "") + (u.unicodeRegex ? "u" : "") + (y ? "g" : "")
|
|
12740
12748
|
);
|
|
12741
12749
|
}
|
|
@@ -12745,12 +12753,12 @@ function gg() {
|
|
|
12745
12753
|
}
|
|
12746
12754
|
// @ts-ignore
|
|
12747
12755
|
addRule(y, x) {
|
|
12748
|
-
x.position = this.position++, this.matchIndexes[this.matchAt] = x, this.regexes.push([x, y]), this.matchAt +=
|
|
12756
|
+
x.position = this.position++, this.matchIndexes[this.matchAt] = x, this.regexes.push([x, y]), this.matchAt += z(y) + 1;
|
|
12749
12757
|
}
|
|
12750
12758
|
compile() {
|
|
12751
12759
|
this.regexes.length === 0 && (this.exec = () => null);
|
|
12752
12760
|
const y = this.regexes.map((x) => x[1]);
|
|
12753
|
-
this.matcherRe = f(
|
|
12761
|
+
this.matcherRe = f(J(y, { joinWith: "|" }), !0), this.lastIndex = 0;
|
|
12754
12762
|
}
|
|
12755
12763
|
/** @param {string} s */
|
|
12756
12764
|
exec(y) {
|
|
@@ -12794,16 +12802,16 @@ function gg() {
|
|
|
12794
12802
|
return Re && (this.regexIndex += Re.position + 1, this.regexIndex === this.count && this.considerAll()), Re;
|
|
12795
12803
|
}
|
|
12796
12804
|
}
|
|
12797
|
-
function Ee(
|
|
12805
|
+
function Ee(k) {
|
|
12798
12806
|
const y = new Y();
|
|
12799
|
-
return
|
|
12807
|
+
return k.contains.forEach((x) => y.addRule(x.begin, { rule: x, type: "begin" })), k.terminatorEnd && y.addRule(k.terminatorEnd, { type: "end" }), k.illegal && y.addRule(k.illegal, { type: "illegal" }), y;
|
|
12800
12808
|
}
|
|
12801
|
-
function Ae(
|
|
12809
|
+
function Ae(k, y) {
|
|
12802
12810
|
const x = (
|
|
12803
12811
|
/** @type CompiledMode */
|
|
12804
|
-
|
|
12812
|
+
k
|
|
12805
12813
|
);
|
|
12806
|
-
if (
|
|
12814
|
+
if (k.isCompiled) return x;
|
|
12807
12815
|
[
|
|
12808
12816
|
Wr,
|
|
12809
12817
|
// do this early so compiler extensions generally don't have to worry about
|
|
@@ -12811,27 +12819,27 @@ function gg() {
|
|
|
12811
12819
|
qr,
|
|
12812
12820
|
al,
|
|
12813
12821
|
Qr
|
|
12814
|
-
].forEach((Ie) => Ie(
|
|
12822
|
+
].forEach((Ie) => Ie(k, y)), u.compilerExtensions.forEach((Ie) => Ie(k, y)), k.__beforeBegin = null, [
|
|
12815
12823
|
Xr,
|
|
12816
12824
|
// do this later so compiler extensions that come earlier have access to the
|
|
12817
12825
|
// raw array if they wanted to perhaps manipulate it, etc.
|
|
12818
12826
|
zr,
|
|
12819
12827
|
// default to 1 relevance if not specified
|
|
12820
12828
|
Jr
|
|
12821
|
-
].forEach((Ie) => Ie(
|
|
12829
|
+
].forEach((Ie) => Ie(k, y)), k.isCompiled = !0;
|
|
12822
12830
|
let Re = null;
|
|
12823
|
-
return typeof
|
|
12831
|
+
return typeof k.keywords == "object" && k.keywords.$pattern && (k.keywords = Object.assign({}, k.keywords), Re = k.keywords.$pattern, delete k.keywords.$pattern), Re = Re || /\w+/, k.keywords && (k.keywords = _s(k.keywords, u.case_insensitive)), x.keywordPatternRe = f(Re, !0), y && (k.begin || (k.begin = /\B|\b/), x.beginRe = f(x.begin), !k.end && !k.endsWithParent && (k.end = /\B|\b/), k.end && (x.endRe = f(x.end)), x.terminatorEnd = d(x.end) || "", k.endsWithParent && y.terminatorEnd && (x.terminatorEnd += (k.end ? "|" : "") + y.terminatorEnd)), k.illegal && (x.illegalRe = f(
|
|
12824
12832
|
/** @type {RegExp | string} */
|
|
12825
|
-
|
|
12826
|
-
)),
|
|
12827
|
-
return ll(Ie === "self" ?
|
|
12828
|
-
})),
|
|
12833
|
+
k.illegal
|
|
12834
|
+
)), k.contains || (k.contains = []), k.contains = [].concat(...k.contains.map(function(Ie) {
|
|
12835
|
+
return ll(Ie === "self" ? k : Ie);
|
|
12836
|
+
})), k.contains.forEach(function(Ie) {
|
|
12829
12837
|
Ae(
|
|
12830
12838
|
/** @type Mode */
|
|
12831
12839
|
Ie,
|
|
12832
12840
|
x
|
|
12833
12841
|
);
|
|
12834
|
-
}),
|
|
12842
|
+
}), k.starts && Ae(k.starts, y), x.matcher = Ee(x), x;
|
|
12835
12843
|
}
|
|
12836
12844
|
if (u.compilerExtensions || (u.compilerExtensions = []), u.contains && u.contains.includes("self"))
|
|
12837
12845
|
throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
|
|
@@ -12857,7 +12865,7 @@ function gg() {
|
|
|
12857
12865
|
const ni = n, ms = o, Ts = Symbol("nomatch"), pl = 7, Es = function(u) {
|
|
12858
12866
|
const f = /* @__PURE__ */ Object.create(null), O = /* @__PURE__ */ Object.create(null), Y = [];
|
|
12859
12867
|
let Ee = !0;
|
|
12860
|
-
const Ae = "Could not find the language '{}', did you forget to load/include a language module?",
|
|
12868
|
+
const Ae = "Could not find the language '{}', did you forget to load/include a language module?", k = { disableAutodetect: !0, name: "Plain text", contains: [] };
|
|
12861
12869
|
let y = {
|
|
12862
12870
|
ignoreUnescapedHTML: !1,
|
|
12863
12871
|
throwUnescapedHTML: !1,
|
|
@@ -12876,26 +12884,26 @@ function gg() {
|
|
|
12876
12884
|
function Re(E) {
|
|
12877
12885
|
let B = E.className + " ";
|
|
12878
12886
|
B += E.parentNode ? E.parentNode.className : "";
|
|
12879
|
-
const
|
|
12880
|
-
if (
|
|
12881
|
-
const ae = Ct(
|
|
12882
|
-
return ae || (hs(Ae.replace("{}",
|
|
12887
|
+
const q = y.languageDetectRe.exec(B);
|
|
12888
|
+
if (q) {
|
|
12889
|
+
const ae = Ct(q[1]);
|
|
12890
|
+
return ae || (hs(Ae.replace("{}", q[1])), hs("Falling back to no-highlight mode for this block.", E)), ae ? q[1] : "no-highlight";
|
|
12883
12891
|
}
|
|
12884
12892
|
return B.split(/\s+/).find((ae) => x(ae) || Ct(ae));
|
|
12885
12893
|
}
|
|
12886
|
-
function Ie(E, B,
|
|
12894
|
+
function Ie(E, B, q) {
|
|
12887
12895
|
let ae = "", Se = "";
|
|
12888
|
-
typeof B == "object" ? (ae = E,
|
|
12889
|
-
https://github.com/highlightjs/highlight.js/issues/2277`), Se = E, ae = B),
|
|
12896
|
+
typeof B == "object" ? (ae = E, q = B.ignoreIllegals, Se = B.language) : (Qt("10.7.0", "highlight(lang, code, ...args) has been deprecated."), Qt("10.7.0", `Please use highlight(code, options) instead.
|
|
12897
|
+
https://github.com/highlightjs/highlight.js/issues/2277`), Se = E, ae = B), q === void 0 && (q = !0);
|
|
12890
12898
|
const et = {
|
|
12891
12899
|
code: ae,
|
|
12892
12900
|
language: Se
|
|
12893
12901
|
};
|
|
12894
12902
|
Qn("before:highlight", et);
|
|
12895
|
-
const Nt = et.result ? et.result : vn(et.language, et.code,
|
|
12903
|
+
const Nt = et.result ? et.result : vn(et.language, et.code, q);
|
|
12896
12904
|
return Nt.code = et.code, Qn("after:highlight", Nt), Nt;
|
|
12897
12905
|
}
|
|
12898
|
-
function vn(E, B,
|
|
12906
|
+
function vn(E, B, q, ae) {
|
|
12899
12907
|
const Se = /* @__PURE__ */ Object.create(null);
|
|
12900
12908
|
function et(b, S) {
|
|
12901
12909
|
return b.keywords[S];
|
|
@@ -13017,7 +13025,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Se = E, ae = B), z ==
|
|
|
13017
13025
|
}
|
|
13018
13026
|
if (eo = S, S.type === "begin")
|
|
13019
13027
|
return Il(S);
|
|
13020
|
-
if (S.type === "illegal" && !
|
|
13028
|
+
if (S.type === "illegal" && !q) {
|
|
13021
13029
|
const oe = new Error('Illegal lexeme "' + j + '" for mode "' + (H.scope || "<unnamed>") + '"');
|
|
13022
13030
|
throw oe.mode = H, oe;
|
|
13023
13031
|
} else if (S.type === "end") {
|
|
@@ -13095,17 +13103,17 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Se = E, ae = B), z ==
|
|
|
13095
13103
|
value: ni(E),
|
|
13096
13104
|
illegal: !1,
|
|
13097
13105
|
relevance: 0,
|
|
13098
|
-
_top:
|
|
13106
|
+
_top: k,
|
|
13099
13107
|
_emitter: new y.__emitter(y)
|
|
13100
13108
|
};
|
|
13101
13109
|
return B._emitter.addText(E), B;
|
|
13102
13110
|
}
|
|
13103
13111
|
function ii(E, B) {
|
|
13104
13112
|
B = B || y.languages || Object.keys(f);
|
|
13105
|
-
const
|
|
13113
|
+
const q = oi(E), ae = B.filter(Ct).filter(Os).map(
|
|
13106
13114
|
(Xe) => vn(Xe, E, !1)
|
|
13107
13115
|
);
|
|
13108
|
-
ae.unshift(
|
|
13116
|
+
ae.unshift(q);
|
|
13109
13117
|
const Se = ae.sort((Xe, st) => {
|
|
13110
13118
|
if (Xe.relevance !== st.relevance) return st.relevance - Xe.relevance;
|
|
13111
13119
|
if (Xe.language && st.language) {
|
|
@@ -13118,17 +13126,17 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Se = E, ae = B), z ==
|
|
|
13118
13126
|
}), [et, Nt] = Se, Zn = et;
|
|
13119
13127
|
return Zn.secondBest = Nt, Zn;
|
|
13120
13128
|
}
|
|
13121
|
-
function _l(E, B,
|
|
13122
|
-
const ae = B && O[B] ||
|
|
13129
|
+
function _l(E, B, q) {
|
|
13130
|
+
const ae = B && O[B] || q;
|
|
13123
13131
|
E.classList.add("hljs"), E.classList.add(`language-${ae}`);
|
|
13124
13132
|
}
|
|
13125
13133
|
function si(E) {
|
|
13126
13134
|
let B = null;
|
|
13127
|
-
const
|
|
13128
|
-
if (x(
|
|
13135
|
+
const q = Re(E);
|
|
13136
|
+
if (x(q)) return;
|
|
13129
13137
|
if (Qn(
|
|
13130
13138
|
"before:highlightElement",
|
|
13131
|
-
{ el: E, language:
|
|
13139
|
+
{ el: E, language: q }
|
|
13132
13140
|
), E.dataset.highlighted) {
|
|
13133
13141
|
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", E);
|
|
13134
13142
|
return;
|
|
@@ -13139,8 +13147,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Se = E, ae = B), z ==
|
|
|
13139
13147
|
E.innerHTML
|
|
13140
13148
|
);
|
|
13141
13149
|
B = E;
|
|
13142
|
-
const ae = B.textContent, Se =
|
|
13143
|
-
E.innerHTML = Se.value, E.dataset.highlighted = "yes", _l(E,
|
|
13150
|
+
const ae = B.textContent, Se = q ? Ie(ae, { language: q, ignoreIllegals: !0 }) : ii(ae);
|
|
13151
|
+
E.innerHTML = Se.value, E.dataset.highlighted = "yes", _l(E, q, Se.language), E.result = {
|
|
13144
13152
|
language: Se.language,
|
|
13145
13153
|
// TODO: remove with version 11.0
|
|
13146
13154
|
re: Se.relevance,
|
|
@@ -13171,17 +13179,17 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Se = E, ae = B), z ==
|
|
|
13171
13179
|
document.querySelectorAll(y.cssSelector).forEach(si);
|
|
13172
13180
|
}
|
|
13173
13181
|
function gl(E, B) {
|
|
13174
|
-
let
|
|
13182
|
+
let q = null;
|
|
13175
13183
|
try {
|
|
13176
|
-
|
|
13184
|
+
q = B(u);
|
|
13177
13185
|
} catch (ae) {
|
|
13178
13186
|
if (Vt("Language definition for '{}' could not be registered.".replace("{}", E)), Ee)
|
|
13179
13187
|
Vt(ae);
|
|
13180
13188
|
else
|
|
13181
13189
|
throw ae;
|
|
13182
|
-
|
|
13190
|
+
q = k;
|
|
13183
13191
|
}
|
|
13184
|
-
|
|
13192
|
+
q.name || (q.name = E), f[E] = q, q.rawDefinition = B.bind(null, u), q.aliases && vs(q.aliases, { languageName: E });
|
|
13185
13193
|
}
|
|
13186
13194
|
function ml(E) {
|
|
13187
13195
|
delete f[E];
|
|
@@ -13195,8 +13203,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Se = E, ae = B), z ==
|
|
|
13195
13203
|
return E = (E || "").toLowerCase(), f[E] || f[O[E]];
|
|
13196
13204
|
}
|
|
13197
13205
|
function vs(E, { languageName: B }) {
|
|
13198
|
-
typeof E == "string" && (E = [E]), E.forEach((
|
|
13199
|
-
O[
|
|
13206
|
+
typeof E == "string" && (E = [E]), E.forEach((q) => {
|
|
13207
|
+
O[q.toLowerCase()] = B;
|
|
13200
13208
|
});
|
|
13201
13209
|
}
|
|
13202
13210
|
function Os(E) {
|
|
@@ -13222,9 +13230,9 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Se = E, ae = B), z ==
|
|
|
13222
13230
|
B !== -1 && Y.splice(B, 1);
|
|
13223
13231
|
}
|
|
13224
13232
|
function Qn(E, B) {
|
|
13225
|
-
const
|
|
13233
|
+
const q = E;
|
|
13226
13234
|
Y.forEach(function(ae) {
|
|
13227
|
-
ae[
|
|
13235
|
+
ae[q] && ae[q](B);
|
|
13228
13236
|
});
|
|
13229
13237
|
}
|
|
13230
13238
|
function Ol(E) {
|
|
@@ -13526,7 +13534,7 @@ function Og(e) {
|
|
|
13526
13534
|
e.BACKSLASH_ESCAPE,
|
|
13527
13535
|
g
|
|
13528
13536
|
]
|
|
13529
|
-
},
|
|
13537
|
+
}, z = {
|
|
13530
13538
|
className: "comment",
|
|
13531
13539
|
variants: [
|
|
13532
13540
|
e.COMMENT(
|
|
@@ -13595,7 +13603,7 @@ function Og(e) {
|
|
|
13595
13603
|
"self"
|
|
13596
13604
|
].concat(ee)
|
|
13597
13605
|
});
|
|
13598
|
-
const _e = [].concat(
|
|
13606
|
+
const _e = [].concat(z, g.contains), J = _e.concat([
|
|
13599
13607
|
// eat recursive parens in sub expressions
|
|
13600
13608
|
{
|
|
13601
13609
|
begin: /(\s*)\(/,
|
|
@@ -13612,7 +13620,7 @@ function Og(e) {
|
|
|
13612
13620
|
excludeBegin: !0,
|
|
13613
13621
|
excludeEnd: !0,
|
|
13614
13622
|
keywords: l,
|
|
13615
|
-
contains:
|
|
13623
|
+
contains: J
|
|
13616
13624
|
}, $e = {
|
|
13617
13625
|
variants: [
|
|
13618
13626
|
// class Car extends vehicle
|
|
@@ -13705,13 +13713,13 @@ function Og(e) {
|
|
|
13705
13713
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
13706
13714
|
className: "variable.constant"
|
|
13707
13715
|
};
|
|
13708
|
-
function
|
|
13716
|
+
function N(Te) {
|
|
13709
13717
|
return t.concat("(?!", Te.join("|"), ")");
|
|
13710
13718
|
}
|
|
13711
|
-
const
|
|
13719
|
+
const W = {
|
|
13712
13720
|
match: t.concat(
|
|
13713
13721
|
/\b/,
|
|
13714
|
-
|
|
13722
|
+
N([
|
|
13715
13723
|
...Fr,
|
|
13716
13724
|
"super",
|
|
13717
13725
|
"import"
|
|
@@ -13773,7 +13781,7 @@ function Og(e) {
|
|
|
13773
13781
|
aliases: ["js", "jsx", "mjs", "cjs"],
|
|
13774
13782
|
keywords: l,
|
|
13775
13783
|
// this will be extended by TypeScript
|
|
13776
|
-
exports: { PARAMS_CONTAINS:
|
|
13784
|
+
exports: { PARAMS_CONTAINS: J, CLASS_REFERENCE: R },
|
|
13777
13785
|
illegal: /#(?![$_A-z])/,
|
|
13778
13786
|
contains: [
|
|
13779
13787
|
e.SHEBANG({
|
|
@@ -13788,7 +13796,7 @@ function Og(e) {
|
|
|
13788
13796
|
I,
|
|
13789
13797
|
v,
|
|
13790
13798
|
G,
|
|
13791
|
-
|
|
13799
|
+
z,
|
|
13792
13800
|
// Skip numbers when they are part of a variable name
|
|
13793
13801
|
{ match: /\$\d+/ },
|
|
13794
13802
|
d,
|
|
@@ -13805,7 +13813,7 @@ function Og(e) {
|
|
|
13805
13813
|
keywords: "return throw case",
|
|
13806
13814
|
relevance: 0,
|
|
13807
13815
|
contains: [
|
|
13808
|
-
|
|
13816
|
+
z,
|
|
13809
13817
|
e.REGEXP_MODE,
|
|
13810
13818
|
{
|
|
13811
13819
|
className: "function",
|
|
@@ -13834,7 +13842,7 @@ function Og(e) {
|
|
|
13834
13842
|
excludeBegin: !0,
|
|
13835
13843
|
excludeEnd: !0,
|
|
13836
13844
|
keywords: l,
|
|
13837
|
-
contains:
|
|
13845
|
+
contains: J
|
|
13838
13846
|
}
|
|
13839
13847
|
]
|
|
13840
13848
|
}
|
|
@@ -13911,7 +13919,7 @@ function Og(e) {
|
|
|
13911
13919
|
className: { 1: "title.function" },
|
|
13912
13920
|
contains: [ke]
|
|
13913
13921
|
},
|
|
13914
|
-
|
|
13922
|
+
W,
|
|
13915
13923
|
me,
|
|
13916
13924
|
$e,
|
|
13917
13925
|
ie,
|
|
@@ -13960,12 +13968,12 @@ const yg = /* @__PURE__ */ ft({
|
|
|
13960
13968
|
return (i, s) => {
|
|
13961
13969
|
const a = De("v-sheet");
|
|
13962
13970
|
return Ne(), pt(a, {
|
|
13963
|
-
color:
|
|
13971
|
+
color: X(o),
|
|
13964
13972
|
width: "100%",
|
|
13965
13973
|
height: "100%"
|
|
13966
13974
|
}, {
|
|
13967
13975
|
default: _t(() => [
|
|
13968
|
-
Oe(
|
|
13976
|
+
Oe(X(n), {
|
|
13969
13977
|
language: "js",
|
|
13970
13978
|
code: t.code
|
|
13971
13979
|
}, null, 8, ["code"])
|
|
@@ -13990,7 +13998,7 @@ const yg = /* @__PURE__ */ ft({
|
|
|
13990
13998
|
return (_, h) => {
|
|
13991
13999
|
const d = De("v-sheet"), g = De("v-icon"), m = De("v-spacer"), I = De("v-dialog");
|
|
13992
14000
|
return Ne(), pt(I, {
|
|
13993
|
-
modelValue:
|
|
14001
|
+
modelValue: X(c),
|
|
13994
14002
|
"onUpdate:modelValue": h[1] || (h[1] = (v) => kn(c) ? c.value = v : null),
|
|
13995
14003
|
transition: "dialog-bottom-transition",
|
|
13996
14004
|
persistent: "",
|
|
@@ -14000,27 +14008,27 @@ const yg = /* @__PURE__ */ ft({
|
|
|
14000
14008
|
}, {
|
|
14001
14009
|
default: _t(() => [
|
|
14002
14010
|
Oe(d, {
|
|
14003
|
-
color:
|
|
14011
|
+
color: X(o),
|
|
14004
14012
|
width: "100%",
|
|
14005
14013
|
height: "100%"
|
|
14006
14014
|
}, {
|
|
14007
14015
|
default: _t(() => [
|
|
14008
|
-
|
|
14016
|
+
X(n) ? (Ne(), pt(d, {
|
|
14009
14017
|
key: 0,
|
|
14010
|
-
color:
|
|
14018
|
+
color: X(i),
|
|
14011
14019
|
height: 24
|
|
14012
14020
|
}, null, 8, ["color"])) : $t("", !0),
|
|
14013
14021
|
Oe(d, {
|
|
14014
14022
|
class: "d-flex align-center px-3",
|
|
14015
|
-
color:
|
|
14023
|
+
color: X(i),
|
|
14016
14024
|
height: 48
|
|
14017
14025
|
}, {
|
|
14018
14026
|
default: _t(() => [
|
|
14019
14027
|
Oe(g, {
|
|
14020
|
-
icon:
|
|
14028
|
+
icon: X(Ua),
|
|
14021
14029
|
onClick: h[0] || (h[0] = (v) => c.value = !1)
|
|
14022
14030
|
}, null, 8, ["icon"]),
|
|
14023
|
-
lt("span", Cg, xo(
|
|
14031
|
+
lt("span", Cg, xo(X(t)("x-block-lib.dlg.source.title")), 1),
|
|
14024
14032
|
Oe(m)
|
|
14025
14033
|
]),
|
|
14026
14034
|
_: 1
|