mce 0.32.1 → 0.32.2
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/crdt/collab-realdoc.test.d.ts +1 -0
- package/dist/crdt/collab-setdoc.test.d.ts +1 -0
- package/dist/index.js +474 -462
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Aabb2D as xt, Animation as jt, Camera2D as Oi, DEG_TO_RAD as Vi, DrawboardEffect as Vo, Element2D as Zt, Engine as Fi, IN_BROWSER as Fo, IN_MAC_OS as
|
|
2
|
-
import { Fragment as we, Teleport as
|
|
1
|
+
import { Aabb2D as xt, Animation as jt, Camera2D as Oi, DEG_TO_RAD as Vi, DrawboardEffect as Vo, Element2D as Zt, Engine as Fi, IN_BROWSER as Fo, IN_MAC_OS as Di, Lottie2D as Zo, Node as $n, Obb2D as Hn, Timeline as Ni, TimelineNode as Bi, Video2D as Cn, assets as qi, clamp as Ct, customNodes as ji, render as Qn, renderPixels as Ui } from "modern-canvas";
|
|
2
|
+
import { Fragment as we, Teleport as Do, Transition as Hi, computed as Y, createBlock as Fe, createCommentVNode as _e, createElementBlock as J, createElementVNode as W, createSlots as No, createStaticVNode as Xi, createTextVNode as mt, createVNode as Me, defineComponent as Se, effectScope as Yi, getCurrentInstance as Qt, guardReactiveProps as yt, h as Xt, inject as Ot, isReactive as Gi, isRef as Wn, markRaw as bo, mergeModels as lt, mergeProps as ht, nextTick as zt, normalizeClass as Ne, normalizeProps as gt, normalizeStyle as $e, onActivated as Wi, onBeforeMount as bt, onBeforeUnmount as Qe, onDeactivated as Ki, onMounted as Vt, onScopeDispose as en, onUnmounted as Zi, openBlock as j, provide as Yt, reactive as dt, readonly as Ji, ref as de, renderList as Ie, renderSlot as De, resolveComponent as $s, resolveDynamicComponent as Bo, shallowRef as Ut, toDisplayString as be, toRaw as _o, toRef as Wt, toValue as Qi, unref as F, useAttrs as Ls, useId as qo, useModel as tt, useSlots as er, useTemplateRef as nt, vModelCheckbox as tr, vModelSelect as Jo, vModelText as Ln, vShow as zs, watch as Be, withCtx as Te, withDirectives as pt, withKeys as Qo, withModifiers as Je } from "vue";
|
|
3
3
|
import { isClient as nr, onClickOutside as or, useDebounceFn as Rs, useEventListener as Os, useFileDialog as Vs, useImage as sr, useLocalStorage as ir, useResizeObserver as Fs } from "@vueuse/core";
|
|
4
4
|
import { Observable as jo, getDefaultTextStyle as rr, getObjectValueByPath as ar, idGenerator as Kt, isCRLF as Xn, isEqualObject as lr, normalizeCRLF as mn, normalizeTextContent as pn, property as Ft, setObjectValueByPath as cr, textContentToString as ao } from "modern-idoc";
|
|
5
5
|
import { cloneDeep as En, get as ur, isEqual as dr, isPlainObject as es, merge as un, set as wo } from "lodash-es";
|
|
@@ -9,15 +9,15 @@ import * as ut from "yjs";
|
|
|
9
9
|
import { autoUpdate as mr, flip as pr, offset as vr, shift as yr, useFloating as gr } from "@floating-ui/vue";
|
|
10
10
|
import { vResizeObserver as Uo } from "@vueuse/components";
|
|
11
11
|
import { diffChars as xr } from "diff";
|
|
12
|
-
var br = Object.create,
|
|
12
|
+
var br = Object.create, Ds = Object.defineProperty, _r = Object.getOwnPropertyDescriptor, wr = Object.getOwnPropertyNames, kr = Object.getPrototypeOf, Mr = Object.prototype.hasOwnProperty, Sr = (n, e) => () => (e || (n((e = { exports: {} }).exports, e), n = null), e.exports), Cr = (n, e, t, o) => {
|
|
13
13
|
if (e && typeof e == "object" || typeof e == "function")
|
|
14
14
|
for (var s = wr(e), i = 0, r = s.length, a; i < r; i++)
|
|
15
|
-
a = s[i], !Mr.call(n, a) && a !== t &&
|
|
15
|
+
a = s[i], !Mr.call(n, a) && a !== t && Ds(n, a, {
|
|
16
16
|
get: ((l) => e[l]).bind(null, a),
|
|
17
17
|
enumerable: !(o = _r(e, a)) || o.enumerable
|
|
18
18
|
});
|
|
19
19
|
return n;
|
|
20
|
-
}, Er = (n, e, t) => (t = n != null ? br(kr(n)) : {}, Cr(e || !n || !n.__esModule ?
|
|
20
|
+
}, Er = (n, e, t) => (t = n != null ? br(kr(n)) : {}, Cr(e || !n || !n.__esModule ? Ds(t, "default", {
|
|
21
21
|
value: n,
|
|
22
22
|
enumerable: !0
|
|
23
23
|
}) : t, n));
|
|
@@ -106,16 +106,16 @@ function $r(n, e) {
|
|
|
106
106
|
function ts(n, e = {}) {
|
|
107
107
|
return $r(Ir(n.node), e);
|
|
108
108
|
}
|
|
109
|
-
var
|
|
109
|
+
var Ns = !1;
|
|
110
110
|
function Lr(n) {
|
|
111
|
-
|
|
111
|
+
Ns = n;
|
|
112
112
|
}
|
|
113
113
|
function Rn() {
|
|
114
114
|
return `[mce][${(/* @__PURE__ */ new Date()).toLocaleTimeString()}]`;
|
|
115
115
|
}
|
|
116
116
|
var ft = {
|
|
117
117
|
debug: ((...n) => {
|
|
118
|
-
|
|
118
|
+
Ns && console.log(Rn(), ...n);
|
|
119
119
|
}),
|
|
120
120
|
info: ((...n) => console.info(Rn(), ...n)),
|
|
121
121
|
warn: ((...n) => console.warn(Rn(), ...n)),
|
|
@@ -154,7 +154,7 @@ var qs = {
|
|
|
154
154
|
"image/heif": [".heif"],
|
|
155
155
|
"image/heic": [".heic"],
|
|
156
156
|
"image/avif": [".avif"]
|
|
157
|
-
}, js = Object.values(qs).flat(), Vr = new RegExp(`\\.(?:${js.map((n) => n.substring(1)).join("|")})`, "i"), Fr = Object.keys(qs), Ho = "M0 0h24v24H0z",
|
|
157
|
+
}, js = Object.values(qs).flat(), Vr = new RegExp(`\\.(?:${js.map((n) => n.substring(1)).join("|")})`, "i"), Fr = Object.keys(qs), Ho = "M0 0h24v24H0z", Dr = [
|
|
158
158
|
{
|
|
159
159
|
idx: 0,
|
|
160
160
|
x: 1,
|
|
@@ -180,7 +180,7 @@ var qs = {
|
|
|
180
180
|
ang: -Math.PI / 2
|
|
181
181
|
}
|
|
182
182
|
];
|
|
183
|
-
function
|
|
183
|
+
function Nr(n, e, t) {
|
|
184
184
|
return {
|
|
185
185
|
shape: n,
|
|
186
186
|
fill: e,
|
|
@@ -270,7 +270,7 @@ function ny(n = "", e = {}) {
|
|
|
270
270
|
const { width: t = 160, height: o = 72, fill: s = "#e0edff", outline: i = {
|
|
271
271
|
color: "#4f8cff",
|
|
272
272
|
width: 2
|
|
273
|
-
}, borderRadius: r = 8, textStyle: a, connectionPoints: l =
|
|
273
|
+
}, borderRadius: r = 8, textStyle: a, connectionPoints: l = Dr } = e;
|
|
274
274
|
return {
|
|
275
275
|
style: {
|
|
276
276
|
width: t,
|
|
@@ -746,13 +746,13 @@ function vn(n, e) {
|
|
|
746
746
|
return n.x === e.x && n.y === e.y;
|
|
747
747
|
}
|
|
748
748
|
function Ks(n, e, t, o) {
|
|
749
|
-
const s =
|
|
750
|
-
return !!(s !== i && r !== a || s === 0 &&
|
|
749
|
+
const s = Nn(We(n, e, t)), i = Nn(We(n, e, o)), r = Nn(We(t, o, n)), a = Nn(We(t, o, e));
|
|
750
|
+
return !!(s !== i && r !== a || s === 0 && Dn(n, t, e) || i === 0 && Dn(n, o, e) || r === 0 && Dn(t, n, o) || a === 0 && Dn(t, e, o));
|
|
751
751
|
}
|
|
752
|
-
function
|
|
752
|
+
function Dn(n, e, t) {
|
|
753
753
|
return e.x <= Math.max(n.x, t.x) && e.x >= Math.min(n.x, t.x) && e.y <= Math.max(n.y, t.y) && e.y >= Math.min(n.y, t.y);
|
|
754
754
|
}
|
|
755
|
-
function
|
|
755
|
+
function Nn(n) {
|
|
756
756
|
return n > 0 ? 1 : n < 0 ? -1 : 0;
|
|
757
757
|
}
|
|
758
758
|
function aa(n, e) {
|
|
@@ -813,12 +813,12 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
813
813
|
var C = {
|
|
814
814
|
label: 0,
|
|
815
815
|
sent: function() {
|
|
816
|
-
if (
|
|
817
|
-
return
|
|
816
|
+
if (N[0] & 1) throw N[1];
|
|
817
|
+
return N[1];
|
|
818
818
|
},
|
|
819
819
|
trys: [],
|
|
820
820
|
ops: []
|
|
821
|
-
}, V, B,
|
|
821
|
+
}, V, B, N, re;
|
|
822
822
|
return re = {
|
|
823
823
|
next: se(0),
|
|
824
824
|
throw: se(1),
|
|
@@ -834,11 +834,11 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
834
834
|
function le(ne) {
|
|
835
835
|
if (V) throw new TypeError("Generator is already executing.");
|
|
836
836
|
for (; C; ) try {
|
|
837
|
-
if (V = 1, B && (
|
|
838
|
-
switch (B = 0,
|
|
837
|
+
if (V = 1, B && (N = ne[0] & 2 ? B.return : ne[0] ? B.throw || ((N = B.return) && N.call(B), 0) : B.next) && !(N = N.call(B, ne[1])).done) return N;
|
|
838
|
+
switch (B = 0, N && (ne = [ne[0] & 2, N.value]), ne[0]) {
|
|
839
839
|
case 0:
|
|
840
840
|
case 1:
|
|
841
|
-
|
|
841
|
+
N = ne;
|
|
842
842
|
break;
|
|
843
843
|
case 4:
|
|
844
844
|
return C.label++, {
|
|
@@ -852,30 +852,30 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
852
852
|
ne = C.ops.pop(), C.trys.pop();
|
|
853
853
|
continue;
|
|
854
854
|
default:
|
|
855
|
-
if (
|
|
855
|
+
if (N = C.trys, !(N = N.length > 0 && N[N.length - 1]) && (ne[0] === 6 || ne[0] === 2)) {
|
|
856
856
|
C = 0;
|
|
857
857
|
continue;
|
|
858
858
|
}
|
|
859
|
-
if (ne[0] === 3 && (!
|
|
859
|
+
if (ne[0] === 3 && (!N || ne[1] > N[0] && ne[1] < N[3])) {
|
|
860
860
|
C.label = ne[1];
|
|
861
861
|
break;
|
|
862
862
|
}
|
|
863
|
-
if (ne[0] === 6 && C.label <
|
|
864
|
-
C.label =
|
|
863
|
+
if (ne[0] === 6 && C.label < N[1]) {
|
|
864
|
+
C.label = N[1], N = ne;
|
|
865
865
|
break;
|
|
866
866
|
}
|
|
867
|
-
if (
|
|
868
|
-
C.label =
|
|
867
|
+
if (N && C.label < N[2]) {
|
|
868
|
+
C.label = N[2], C.ops.push(ne);
|
|
869
869
|
break;
|
|
870
870
|
}
|
|
871
|
-
|
|
871
|
+
N[2] && C.ops.pop(), C.trys.pop();
|
|
872
872
|
continue;
|
|
873
873
|
}
|
|
874
874
|
ne = v.call(X, C);
|
|
875
875
|
} catch (me) {
|
|
876
876
|
ne = [6, me], B = 0;
|
|
877
877
|
} finally {
|
|
878
|
-
V =
|
|
878
|
+
V = N = 0;
|
|
879
879
|
}
|
|
880
880
|
if (ne[0] & 5) throw ne[1];
|
|
881
881
|
return {
|
|
@@ -894,7 +894,7 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
894
894
|
return X > v ? 1 : X < v ? -1 : 0;
|
|
895
895
|
}
|
|
896
896
|
function i(X, v, C) {
|
|
897
|
-
for (var V = new o(null, null), B = V,
|
|
897
|
+
for (var V = new o(null, null), B = V, N = V; ; ) {
|
|
898
898
|
var re = C(X, v.key);
|
|
899
899
|
if (re < 0) {
|
|
900
900
|
if (v.left === null) break;
|
|
@@ -902,7 +902,7 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
902
902
|
var se = v.left;
|
|
903
903
|
if (v.left = se.right, se.right = v, v = se, v.left === null) break;
|
|
904
904
|
}
|
|
905
|
-
|
|
905
|
+
N.left = v, N = v, v = v.left;
|
|
906
906
|
} else if (re > 0) {
|
|
907
907
|
if (v.right === null) break;
|
|
908
908
|
if (C(X, v.right.key) > 0) {
|
|
@@ -912,22 +912,22 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
912
912
|
B.right = v, B = v, v = v.right;
|
|
913
913
|
} else break;
|
|
914
914
|
}
|
|
915
|
-
return B.right = v.left,
|
|
915
|
+
return B.right = v.left, N.left = v.right, v.left = V.right, v.right = V.left, v;
|
|
916
916
|
}
|
|
917
917
|
function r(X, v, C, V) {
|
|
918
918
|
var B = new o(X, v);
|
|
919
919
|
if (C === null)
|
|
920
920
|
return B.left = B.right = null, B;
|
|
921
921
|
C = i(X, C, V);
|
|
922
|
-
var
|
|
923
|
-
return
|
|
922
|
+
var N = V(X, C.key);
|
|
923
|
+
return N < 0 ? (B.left = C.left, B.right = C, C.left = null) : N >= 0 && (B.right = C.right, B.left = C, C.right = null), B;
|
|
924
924
|
}
|
|
925
925
|
function a(X, v, C) {
|
|
926
926
|
var V = null, B = null;
|
|
927
927
|
if (v) {
|
|
928
928
|
v = i(X, v, C);
|
|
929
|
-
var
|
|
930
|
-
|
|
929
|
+
var N = C(v.key, X);
|
|
930
|
+
N === 0 ? (V = v.left, B = v.right) : N < 0 ? (B = v.right, v.right = null, V = v) : (V = v.left, v.left = null, B = v);
|
|
931
931
|
}
|
|
932
932
|
return {
|
|
933
933
|
left: V,
|
|
@@ -941,8 +941,8 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
941
941
|
if (X) {
|
|
942
942
|
V("" + v + (C ? "└── " : "├── ") + B(X) + `
|
|
943
943
|
`);
|
|
944
|
-
var
|
|
945
|
-
X.left && c(X.left,
|
|
944
|
+
var N = v + (C ? " " : "│ ");
|
|
945
|
+
X.left && c(X.left, N, !1, V, B), X.right && c(X.right, N, !0, V, B);
|
|
946
946
|
}
|
|
947
947
|
}
|
|
948
948
|
var d = (function() {
|
|
@@ -954,8 +954,8 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
954
954
|
}, X.prototype.add = function(v, C) {
|
|
955
955
|
var V = new o(v, C);
|
|
956
956
|
this._root === null && (V.left = V.right = null, this._size++, this._root = V);
|
|
957
|
-
var B = this._comparator,
|
|
958
|
-
return re === 0 ? this._root =
|
|
957
|
+
var B = this._comparator, N = i(v, this._root, B), re = B(v, N.key);
|
|
958
|
+
return re === 0 ? this._root = N : (re < 0 ? (V.left = N.left, V.right = N, N.left = null) : re > 0 && (V.right = N.right, V.left = N, N.right = null), this._size++, this._root = V), this._root;
|
|
959
959
|
}, X.prototype.remove = function(v) {
|
|
960
960
|
this._root = this._remove(v, this._root, this._comparator);
|
|
961
961
|
}, X.prototype._remove = function(v, C, V) {
|
|
@@ -988,13 +988,13 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
988
988
|
}
|
|
989
989
|
return !1;
|
|
990
990
|
}, X.prototype.forEach = function(v, C) {
|
|
991
|
-
for (var V = this._root, B = [],
|
|
991
|
+
for (var V = this._root, B = [], N = !1; !N; ) V !== null ? (B.push(V), V = V.left) : B.length !== 0 ? (V = B.pop(), v.call(C, V), V = V.right) : N = !0;
|
|
992
992
|
return this;
|
|
993
993
|
}, X.prototype.range = function(v, C, V, B) {
|
|
994
|
-
for (var
|
|
995
|
-
|
|
994
|
+
for (var N = [], re = this._comparator, se = this._root, le; N.length !== 0 || se; ) if (se)
|
|
995
|
+
N.push(se), se = se.left;
|
|
996
996
|
else {
|
|
997
|
-
if (se =
|
|
997
|
+
if (se = N.pop(), le = re(se.key, C), le > 0) break;
|
|
998
998
|
if (re(se.key, v) >= 0 && V.call(B, se))
|
|
999
999
|
return this;
|
|
1000
1000
|
se = se.right;
|
|
@@ -1023,10 +1023,10 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1023
1023
|
if (v === void 0 && (v = this._root), v) for (; v.right; ) v = v.right;
|
|
1024
1024
|
return v;
|
|
1025
1025
|
}, X.prototype.at = function(v) {
|
|
1026
|
-
for (var C = this._root, V = !1, B = 0,
|
|
1027
|
-
|
|
1028
|
-
else if (
|
|
1029
|
-
if (C =
|
|
1026
|
+
for (var C = this._root, V = !1, B = 0, N = []; !V; ) if (C)
|
|
1027
|
+
N.push(C), C = C.left;
|
|
1028
|
+
else if (N.length > 0) {
|
|
1029
|
+
if (C = N.pop(), B === v) return C;
|
|
1030
1030
|
B++, C = C.right;
|
|
1031
1031
|
} else V = !0;
|
|
1032
1032
|
return null;
|
|
@@ -1037,9 +1037,9 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1037
1037
|
return V;
|
|
1038
1038
|
}
|
|
1039
1039
|
for (var B = this._comparator; C; ) {
|
|
1040
|
-
var
|
|
1041
|
-
if (
|
|
1042
|
-
|
|
1040
|
+
var N = B(v.key, C.key);
|
|
1041
|
+
if (N === 0) break;
|
|
1042
|
+
N < 0 ? (V = C, C = C.left) : C = C.right;
|
|
1043
1043
|
}
|
|
1044
1044
|
return V;
|
|
1045
1045
|
}, X.prototype.prev = function(v) {
|
|
@@ -1049,9 +1049,9 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1049
1049
|
return V;
|
|
1050
1050
|
}
|
|
1051
1051
|
for (var B = this._comparator; C; ) {
|
|
1052
|
-
var
|
|
1053
|
-
if (
|
|
1054
|
-
|
|
1052
|
+
var N = B(v.key, C.key);
|
|
1053
|
+
if (N === 0) break;
|
|
1054
|
+
N < 0 ? C = C.left : (V = C, C = C.right);
|
|
1055
1055
|
}
|
|
1056
1056
|
return V;
|
|
1057
1057
|
}, X.prototype.clear = function() {
|
|
@@ -1060,11 +1060,11 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1060
1060
|
return m(this._root);
|
|
1061
1061
|
}, X.prototype.load = function(v, C, V) {
|
|
1062
1062
|
C === void 0 && (C = []), V === void 0 && (V = !1);
|
|
1063
|
-
var B = v.length,
|
|
1064
|
-
if (V && L(v, C, 0, B - 1,
|
|
1063
|
+
var B = v.length, N = this._comparator;
|
|
1064
|
+
if (V && L(v, C, 0, B - 1, N), this._root === null)
|
|
1065
1065
|
this._root = u(v, C, 0, B), this._size = B;
|
|
1066
1066
|
else {
|
|
1067
|
-
var re = _(this.toList(), h(v, C),
|
|
1067
|
+
var re = _(this.toList(), h(v, C), N);
|
|
1068
1068
|
B = this._size + B, this._root = f({ head: re }, 0, B);
|
|
1069
1069
|
}
|
|
1070
1070
|
return this;
|
|
@@ -1091,7 +1091,7 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1091
1091
|
return C.push(V);
|
|
1092
1092
|
}, v), C.join("");
|
|
1093
1093
|
}, X.prototype.update = function(v, C, V) {
|
|
1094
|
-
var B = this._comparator,
|
|
1094
|
+
var B = this._comparator, N = a(v, this._root, B), re = N.left, se = N.right;
|
|
1095
1095
|
B(v, C) < 0 ? se = r(C, V, se, B) : re = r(C, V, re, B), this._root = l(re, se, B);
|
|
1096
1096
|
}, X.prototype.split = function(v) {
|
|
1097
1097
|
return a(v, this._root, this._comparator);
|
|
@@ -1120,8 +1120,8 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1120
1120
|
function u(X, v, C, V) {
|
|
1121
1121
|
var B = V - C;
|
|
1122
1122
|
if (B > 0) {
|
|
1123
|
-
var
|
|
1124
|
-
return le.left = u(X, v, C,
|
|
1123
|
+
var N = C + Math.floor(B / 2), re = X[N], se = v[N], le = new o(re, se);
|
|
1124
|
+
return le.left = u(X, v, C, N), le.right = u(X, v, N + 1, V), le;
|
|
1125
1125
|
}
|
|
1126
1126
|
return null;
|
|
1127
1127
|
}
|
|
@@ -1130,31 +1130,31 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1130
1130
|
return V.next = null, C.next;
|
|
1131
1131
|
}
|
|
1132
1132
|
function m(X) {
|
|
1133
|
-
for (var v = X, C = [], V = !1, B = new o(null, null),
|
|
1134
|
-
return
|
|
1133
|
+
for (var v = X, C = [], V = !1, B = new o(null, null), N = B; !V; ) v ? (C.push(v), v = v.left) : C.length > 0 ? (v = N = N.next = C.pop(), v = v.right) : V = !0;
|
|
1134
|
+
return N.next = null, B.next;
|
|
1135
1135
|
}
|
|
1136
1136
|
function f(X, v, C) {
|
|
1137
1137
|
var V = C - v;
|
|
1138
1138
|
if (V > 0) {
|
|
1139
|
-
var B = v + Math.floor(V / 2),
|
|
1140
|
-
return re.left =
|
|
1139
|
+
var B = v + Math.floor(V / 2), N = f(X, v, B), re = X.head;
|
|
1140
|
+
return re.left = N, X.head = X.head.next, re.right = f(X, B + 1, C), re;
|
|
1141
1141
|
}
|
|
1142
1142
|
return null;
|
|
1143
1143
|
}
|
|
1144
1144
|
function _(X, v, C) {
|
|
1145
|
-
for (var V = new o(null, null), B = V,
|
|
1146
|
-
C(
|
|
1147
|
-
return
|
|
1145
|
+
for (var V = new o(null, null), B = V, N = X, re = v; N !== null && re !== null; )
|
|
1146
|
+
C(N.key, re.key) < 0 ? (B.next = N, N = N.next) : (B.next = re, re = re.next), B = B.next;
|
|
1147
|
+
return N !== null ? B.next = N : re !== null && (B.next = re), V.next;
|
|
1148
1148
|
}
|
|
1149
1149
|
function L(X, v, C, V, B) {
|
|
1150
1150
|
if (!(C >= V)) {
|
|
1151
|
-
for (var
|
|
1151
|
+
for (var N = X[C + V >> 1], re = C - 1, se = V + 1; ; ) {
|
|
1152
1152
|
do
|
|
1153
1153
|
re++;
|
|
1154
|
-
while (B(X[re],
|
|
1154
|
+
while (B(X[re], N) < 0);
|
|
1155
1155
|
do
|
|
1156
1156
|
se--;
|
|
1157
|
-
while (B(X[se],
|
|
1157
|
+
while (B(X[se], N) > 0);
|
|
1158
1158
|
if (re >= se) break;
|
|
1159
1159
|
var le = X[re];
|
|
1160
1160
|
X[re] = X[se], X[se] = le, le = v[re], v[re] = v[se], v[se] = le;
|
|
@@ -1164,7 +1164,7 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1164
1164
|
}
|
|
1165
1165
|
const O = (X, v) => X.ll.x <= v.x && v.x <= X.ur.x && X.ll.y <= v.y && v.y <= X.ur.y, R = (X, v) => {
|
|
1166
1166
|
if (v.ur.x < X.ll.x || X.ur.x < v.ll.x || v.ur.y < X.ll.y || X.ur.y < v.ll.y) return null;
|
|
1167
|
-
const C = X.ll.x < v.ll.x ? v.ll.x : X.ll.x, V = X.ur.x < v.ur.x ? X.ur.x : v.ur.x, B = X.ll.y < v.ll.y ? v.ll.y : X.ll.y,
|
|
1167
|
+
const C = X.ll.x < v.ll.x ? v.ll.x : X.ll.x, V = X.ur.x < v.ur.x ? X.ur.x : v.ur.x, B = X.ll.y < v.ll.y ? v.ll.y : X.ll.y, N = X.ur.y < v.ur.y ? X.ur.y : v.ur.y;
|
|
1168
1168
|
return {
|
|
1169
1169
|
ll: {
|
|
1170
1170
|
x: C,
|
|
@@ -1172,7 +1172,7 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1172
1172
|
},
|
|
1173
1173
|
ur: {
|
|
1174
1174
|
x: V,
|
|
1175
|
-
y:
|
|
1175
|
+
y: N
|
|
1176
1176
|
}
|
|
1177
1177
|
};
|
|
1178
1178
|
};
|
|
@@ -1212,17 +1212,17 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1212
1212
|
}
|
|
1213
1213
|
const p = new P(), g = 11102230246251565e-32, x = 134217729, b = 3.000000000000001 * g;
|
|
1214
1214
|
function w(X, v, C, V, B) {
|
|
1215
|
-
let
|
|
1216
|
-
me > ne == me > -ne ? (
|
|
1215
|
+
let N, re, se, le, ne = v[0], me = V[0], ie = 0, ue = 0;
|
|
1216
|
+
me > ne == me > -ne ? (N = ne, ne = v[++ie]) : (N = me, me = V[++ue]);
|
|
1217
1217
|
let xe = 0;
|
|
1218
1218
|
if (ie < X && ue < C)
|
|
1219
|
-
for (me > ne == me > -ne ? (re = ne +
|
|
1220
|
-
me > ne == me > -ne ? (re =
|
|
1219
|
+
for (me > ne == me > -ne ? (re = ne + N, se = N - (re - ne), ne = v[++ie]) : (re = me + N, se = N - (re - me), me = V[++ue]), N = re, se !== 0 && (B[xe++] = se); ie < X && ue < C; )
|
|
1220
|
+
me > ne == me > -ne ? (re = N + ne, le = re - N, se = N - (re - le) + (ne - le), ne = v[++ie]) : (re = N + me, le = re - N, se = N - (re - le) + (me - le), me = V[++ue]), N = re, se !== 0 && (B[xe++] = se);
|
|
1221
1221
|
for (; ie < X; )
|
|
1222
|
-
re =
|
|
1222
|
+
re = N + ne, le = re - N, se = N - (re - le) + (ne - le), ne = v[++ie], N = re, se !== 0 && (B[xe++] = se);
|
|
1223
1223
|
for (; ue < C; )
|
|
1224
|
-
re =
|
|
1225
|
-
return (
|
|
1224
|
+
re = N + me, le = re - N, se = N - (re - le) + (me - le), me = V[++ue], N = re, se !== 0 && (B[xe++] = se);
|
|
1225
|
+
return (N !== 0 || xe === 0) && (B[xe++] = N), xe;
|
|
1226
1226
|
}
|
|
1227
1227
|
function E(X, v) {
|
|
1228
1228
|
let C = v[0];
|
|
@@ -1232,22 +1232,22 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1232
1232
|
function I(X) {
|
|
1233
1233
|
return new Float64Array(X);
|
|
1234
1234
|
}
|
|
1235
|
-
const k = 3.0000000000000018 * g, T = 2.0000000000000013 * g, z = 9.000000000000007 * g * g,
|
|
1236
|
-
function K(X, v, C, V, B,
|
|
1235
|
+
const k = 3.0000000000000018 * g, T = 2.0000000000000013 * g, z = 9.000000000000007 * g * g, D = I(4), oe = I(8), U = I(12), G = I(16), q = I(4);
|
|
1236
|
+
function K(X, v, C, V, B, N, re) {
|
|
1237
1237
|
let se, le, ne, me, ie, ue, xe, Re, Oe, He, Ve, Ge, ot, Ze, st, it, vt, rt;
|
|
1238
|
-
const wt = X - B, kt = C - B, Mt = v -
|
|
1239
|
-
Ze = wt * St, ue = x * wt, xe = ue - (ue - wt), Re = wt - xe, ue = x * St, Oe = ue - (ue - St), He = St - Oe, st = Re * He - (Ze - xe * Oe - Re * Oe - xe * He), it = Mt * kt, ue = x * Mt, xe = ue - (ue - Mt), Re = Mt - xe, ue = x * kt, Oe = ue - (ue - kt), He = kt - Oe, vt = Re * He - (it - xe * Oe - Re * Oe - xe * He), Ve = st - vt, ie = st - Ve,
|
|
1240
|
-
let $t = E(4,
|
|
1241
|
-
if ($t >= gn || -$t >= gn || (ie = X - wt, se = X - (wt + ie) + (ie - B), ie = C - kt, ne = C - (kt + ie) + (ie - B), ie = v - Mt, le = v - (Mt + ie) + (ie -
|
|
1238
|
+
const wt = X - B, kt = C - B, Mt = v - N, St = V - N;
|
|
1239
|
+
Ze = wt * St, ue = x * wt, xe = ue - (ue - wt), Re = wt - xe, ue = x * St, Oe = ue - (ue - St), He = St - Oe, st = Re * He - (Ze - xe * Oe - Re * Oe - xe * He), it = Mt * kt, ue = x * Mt, xe = ue - (ue - Mt), Re = Mt - xe, ue = x * kt, Oe = ue - (ue - kt), He = kt - Oe, vt = Re * He - (it - xe * Oe - Re * Oe - xe * He), Ve = st - vt, ie = st - Ve, D[0] = st - (Ve + ie) + (ie - vt), Ge = Ze + Ve, ie = Ge - Ze, ot = Ze - (Ge - ie) + (Ve - ie), Ve = ot - it, ie = ot - Ve, D[1] = ot - (Ve + ie) + (ie - it), rt = Ge + Ve, ie = rt - Ge, D[2] = Ge - (rt - ie) + (Ve - ie), D[3] = rt;
|
|
1240
|
+
let $t = E(4, D), gn = T * re;
|
|
1241
|
+
if ($t >= gn || -$t >= gn || (ie = X - wt, se = X - (wt + ie) + (ie - B), ie = C - kt, ne = C - (kt + ie) + (ie - B), ie = v - Mt, le = v - (Mt + ie) + (ie - N), ie = V - St, me = V - (St + ie) + (ie - N), se === 0 && le === 0 && ne === 0 && me === 0) || (gn = z * re + b * Math.abs($t), $t += wt * me + St * se - (Mt * ne + kt * le), $t >= gn || -$t >= gn)) return $t;
|
|
1242
1242
|
Ze = se * St, ue = x * se, xe = ue - (ue - se), Re = se - xe, ue = x * St, Oe = ue - (ue - St), He = St - Oe, st = Re * He - (Ze - xe * Oe - Re * Oe - xe * He), it = le * kt, ue = x * le, xe = ue - (ue - le), Re = le - xe, ue = x * kt, Oe = ue - (ue - kt), He = kt - Oe, vt = Re * He - (it - xe * Oe - Re * Oe - xe * He), Ve = st - vt, ie = st - Ve, q[0] = st - (Ve + ie) + (ie - vt), Ge = Ze + Ve, ie = Ge - Ze, ot = Ze - (Ge - ie) + (Ve - ie), Ve = ot - it, ie = ot - Ve, q[1] = ot - (Ve + ie) + (ie - it), rt = Ge + Ve, ie = rt - Ge, q[2] = Ge - (rt - ie) + (Ve - ie), q[3] = rt;
|
|
1243
|
-
const zi = w(4,
|
|
1243
|
+
const zi = w(4, D, 4, q, oe);
|
|
1244
1244
|
Ze = wt * me, ue = x * wt, xe = ue - (ue - wt), Re = wt - xe, ue = x * me, Oe = ue - (ue - me), He = me - Oe, st = Re * He - (Ze - xe * Oe - Re * Oe - xe * He), it = Mt * ne, ue = x * Mt, xe = ue - (ue - Mt), Re = Mt - xe, ue = x * ne, Oe = ue - (ue - ne), He = ne - Oe, vt = Re * He - (it - xe * Oe - Re * Oe - xe * He), Ve = st - vt, ie = st - Ve, q[0] = st - (Ve + ie) + (ie - vt), Ge = Ze + Ve, ie = Ge - Ze, ot = Ze - (Ge - ie) + (Ve - ie), Ve = ot - it, ie = ot - Ve, q[1] = ot - (Ve + ie) + (ie - it), rt = Ge + Ve, ie = rt - Ge, q[2] = Ge - (rt - ie) + (Ve - ie), q[3] = rt;
|
|
1245
1245
|
const Ri = w(zi, oe, 4, q, U);
|
|
1246
1246
|
return Ze = se * me, ue = x * se, xe = ue - (ue - se), Re = se - xe, ue = x * me, Oe = ue - (ue - me), He = me - Oe, st = Re * He - (Ze - xe * Oe - Re * Oe - xe * He), it = le * ne, ue = x * le, xe = ue - (ue - le), Re = le - xe, ue = x * ne, Oe = ue - (ue - ne), He = ne - Oe, vt = Re * He - (it - xe * Oe - Re * Oe - xe * He), Ve = st - vt, ie = st - Ve, q[0] = st - (Ve + ie) + (ie - vt), Ge = Ze + Ve, ie = Ge - Ze, ot = Ze - (Ge - ie) + (Ve - ie), Ve = ot - it, ie = ot - Ve, q[1] = ot - (Ve + ie) + (ie - it), rt = Ge + Ve, ie = rt - Ge, q[2] = Ge - (rt - ie) + (Ve - ie), q[3] = rt, G[w(Ri, U, 4, q, G) - 1];
|
|
1247
1247
|
}
|
|
1248
|
-
function H(X, v, C, V, B,
|
|
1249
|
-
const re = (v -
|
|
1250
|
-
return Math.abs(le) >= k * ne ? le : -K(X, v, C, V, B,
|
|
1248
|
+
function H(X, v, C, V, B, N) {
|
|
1249
|
+
const re = (v - N) * (C - B), se = (X - B) * (V - N), le = re - se, ne = Math.abs(re + se);
|
|
1250
|
+
return Math.abs(le) >= k * ne ? le : -K(X, v, C, V, B, N, ne);
|
|
1251
1251
|
}
|
|
1252
1252
|
const Q = (X, v) => X.x * v.y - X.y * v.x, $ = (X, v) => X.x * v.x + X.y * v.y, Z = (X, v, C) => {
|
|
1253
1253
|
const V = H(X.x, X.y, v.x, v.y, C.x, C.y);
|
|
@@ -1283,10 +1283,10 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1283
1283
|
if (V.y === 0) return ce(X, v, C.y);
|
|
1284
1284
|
const B = Q(v, V);
|
|
1285
1285
|
if (B == 0) return null;
|
|
1286
|
-
const
|
|
1286
|
+
const N = {
|
|
1287
1287
|
x: C.x - X.x,
|
|
1288
1288
|
y: C.y - X.y
|
|
1289
|
-
}, re = Q(
|
|
1289
|
+
}, re = Q(N, v) / B, se = Q(N, V) / B, le = X.x + se * v.x, ne = C.x + re * V.x, me = X.y + se * v.y, ie = C.y + re * V.y;
|
|
1290
1290
|
return {
|
|
1291
1291
|
x: (le + ne) / 2,
|
|
1292
1292
|
y: (me + ie) / 2
|
|
@@ -1307,8 +1307,8 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1307
1307
|
if (v.point === this.point) throw new Error("Tried to link already linked events");
|
|
1308
1308
|
const C = v.point.events;
|
|
1309
1309
|
for (let V = 0, B = C.length; V < B; V++) {
|
|
1310
|
-
const
|
|
1311
|
-
this.point.events.push(
|
|
1310
|
+
const N = C[V];
|
|
1311
|
+
this.point.events.push(N), N.point = this.point;
|
|
1312
1312
|
}
|
|
1313
1313
|
this.checkForConsuming();
|
|
1314
1314
|
}
|
|
@@ -1318,8 +1318,8 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1318
1318
|
const V = this.point.events[C];
|
|
1319
1319
|
if (V.segment.consumedBy === void 0)
|
|
1320
1320
|
for (let B = C + 1; B < v; B++) {
|
|
1321
|
-
const
|
|
1322
|
-
|
|
1321
|
+
const N = this.point.events[B];
|
|
1322
|
+
N.consumedBy === void 0 && V.otherSE.point.events === N.otherSE.point.events && V.segment.consume(N.segment);
|
|
1323
1323
|
}
|
|
1324
1324
|
}
|
|
1325
1325
|
}
|
|
@@ -1333,15 +1333,15 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1333
1333
|
}
|
|
1334
1334
|
getLeftmostComparator(v) {
|
|
1335
1335
|
const C = /* @__PURE__ */ new Map(), V = (B) => {
|
|
1336
|
-
const
|
|
1336
|
+
const N = B.otherSE;
|
|
1337
1337
|
C.set(B, {
|
|
1338
|
-
sine: ee(this.point, v.point,
|
|
1339
|
-
cosine: ae(this.point, v.point,
|
|
1338
|
+
sine: ee(this.point, v.point, N.point),
|
|
1339
|
+
cosine: ae(this.point, v.point, N.point)
|
|
1340
1340
|
});
|
|
1341
1341
|
};
|
|
1342
|
-
return (B,
|
|
1343
|
-
C.has(B) || V(B), C.has(
|
|
1344
|
-
const { sine: re, cosine: se } = C.get(B), { sine: le, cosine: ne } = C.get(
|
|
1342
|
+
return (B, N) => {
|
|
1343
|
+
C.has(B) || V(B), C.has(N) || V(N);
|
|
1344
|
+
const { sine: re, cosine: se } = C.get(B), { sine: le, cosine: ne } = C.get(N);
|
|
1345
1345
|
return re >= 0 && le >= 0 ? se < ne ? 1 : se > ne ? -1 : 0 : re < 0 && le < 0 ? se < ne ? -1 : se > ne ? 1 : 0 : le < re ? -1 : le > re ? 1 : 0;
|
|
1346
1346
|
};
|
|
1347
1347
|
}
|
|
@@ -1349,9 +1349,9 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1349
1349
|
let ve = 0;
|
|
1350
1350
|
class fe {
|
|
1351
1351
|
static compare(v, C) {
|
|
1352
|
-
const V = v.leftSE.point.x, B = C.leftSE.point.x,
|
|
1352
|
+
const V = v.leftSE.point.x, B = C.leftSE.point.x, N = v.rightSE.point.x, re = C.rightSE.point.x;
|
|
1353
1353
|
if (re < V) return 1;
|
|
1354
|
-
if (
|
|
1354
|
+
if (N < B) return -1;
|
|
1355
1355
|
const se = v.leftSE.point.y, le = C.leftSE.point.y, ne = v.rightSE.point.y, me = C.rightSE.point.y;
|
|
1356
1356
|
if (V < B) {
|
|
1357
1357
|
if (le < se && le < ne) return 1;
|
|
@@ -1372,34 +1372,34 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1372
1372
|
}
|
|
1373
1373
|
if (se < le) return -1;
|
|
1374
1374
|
if (se > le) return 1;
|
|
1375
|
-
if (
|
|
1375
|
+
if (N < re) {
|
|
1376
1376
|
const ie = C.comparePoint(v.rightSE.point);
|
|
1377
1377
|
if (ie !== 0) return ie;
|
|
1378
1378
|
}
|
|
1379
|
-
if (
|
|
1379
|
+
if (N > re) {
|
|
1380
1380
|
const ie = v.comparePoint(C.rightSE.point);
|
|
1381
1381
|
if (ie < 0) return 1;
|
|
1382
1382
|
if (ie > 0) return -1;
|
|
1383
1383
|
}
|
|
1384
|
-
if (
|
|
1385
|
-
const ie = ne - se, ue =
|
|
1384
|
+
if (N !== re) {
|
|
1385
|
+
const ie = ne - se, ue = N - V, xe = me - le, Re = re - B;
|
|
1386
1386
|
if (ie > ue && xe < Re) return 1;
|
|
1387
1387
|
if (ie < ue && xe > Re) return -1;
|
|
1388
1388
|
}
|
|
1389
|
-
return
|
|
1389
|
+
return N > re ? 1 : N < re || ne < me ? -1 : ne > me ? 1 : v.id < C.id ? -1 : v.id > C.id ? 1 : 0;
|
|
1390
1390
|
}
|
|
1391
1391
|
constructor(v, C, V, B) {
|
|
1392
1392
|
this.id = ++ve, this.leftSE = v, v.segment = this, v.otherSE = C, this.rightSE = C, C.segment = this, C.otherSE = v, this.rings = V, this.windings = B;
|
|
1393
1393
|
}
|
|
1394
1394
|
static fromRing(v, C, V) {
|
|
1395
|
-
let B,
|
|
1395
|
+
let B, N, re;
|
|
1396
1396
|
const se = ge.comparePoints(v, C);
|
|
1397
1397
|
if (se < 0)
|
|
1398
|
-
B = v,
|
|
1398
|
+
B = v, N = C, re = 1;
|
|
1399
1399
|
else if (se > 0)
|
|
1400
|
-
B = C,
|
|
1400
|
+
B = C, N = v, re = -1;
|
|
1401
1401
|
else throw new Error(`Tried to create degenerate segment at [${v.x}, ${v.y}]`);
|
|
1402
|
-
return new fe(new ge(B, !0), new ge(
|
|
1402
|
+
return new fe(new ge(B, !0), new ge(N, !1), [V], [re]);
|
|
1403
1403
|
}
|
|
1404
1404
|
replaceRightSE(v) {
|
|
1405
1405
|
this.rightSE = v, this.rightSE.segment = this, this.rightSE.otherSE = this.leftSE, this.leftSE.otherSE = this.rightSE;
|
|
@@ -1431,7 +1431,7 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1431
1431
|
const C = this.leftSE.point, V = this.rightSE.point, B = this.vector();
|
|
1432
1432
|
if (C.x === V.x)
|
|
1433
1433
|
return v.x === C.x ? 0 : v.x < C.x ? 1 : -1;
|
|
1434
|
-
const
|
|
1434
|
+
const N = (v.y - C.y) / B.y, re = C.x + N * B.x;
|
|
1435
1435
|
if (v.x === re) return 0;
|
|
1436
1436
|
const se = (v.x - C.x) / B.x, le = C.y + se * B.y;
|
|
1437
1437
|
return v.y === le ? 0 : v.y < le ? -1 : 1;
|
|
@@ -1439,24 +1439,24 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1439
1439
|
getIntersection(v) {
|
|
1440
1440
|
const C = this.bbox(), V = v.bbox(), B = R(C, V);
|
|
1441
1441
|
if (B === null) return null;
|
|
1442
|
-
const
|
|
1442
|
+
const N = this.leftSE.point, re = this.rightSE.point, se = v.leftSE.point, le = v.rightSE.point, ne = O(C, se) && this.comparePoint(se) === 0, me = O(V, N) && v.comparePoint(N) === 0, ie = O(C, le) && this.comparePoint(le) === 0, ue = O(V, re) && v.comparePoint(re) === 0;
|
|
1443
1443
|
if (me && ne)
|
|
1444
1444
|
return ue && !ie ? re : !ue && ie ? le : null;
|
|
1445
1445
|
if (me)
|
|
1446
|
-
return ie &&
|
|
1446
|
+
return ie && N.x === le.x && N.y === le.y ? null : N;
|
|
1447
1447
|
if (ne)
|
|
1448
1448
|
return ue && re.x === se.x && re.y === se.y ? null : se;
|
|
1449
1449
|
if (ue && ie) return null;
|
|
1450
1450
|
if (ue) return re;
|
|
1451
1451
|
if (ie) return le;
|
|
1452
|
-
const xe = he(
|
|
1452
|
+
const xe = he(N, this.vector(), se, v.vector());
|
|
1453
1453
|
return xe === null || !O(B, xe) ? null : p.round(xe.x, xe.y);
|
|
1454
1454
|
}
|
|
1455
1455
|
split(v) {
|
|
1456
|
-
const C = [], V = v.events !== void 0, B = new ge(v, !0),
|
|
1457
|
-
this.replaceRightSE(
|
|
1456
|
+
const C = [], V = v.events !== void 0, B = new ge(v, !0), N = new ge(v, !1), re = this.rightSE;
|
|
1457
|
+
this.replaceRightSE(N), C.push(N), C.push(B);
|
|
1458
1458
|
const se = new fe(B, re, this.rings.slice(), this.windings.slice());
|
|
1459
|
-
return ge.comparePoints(se.leftSE.point, se.rightSE.point) > 0 && se.swapEvents(), ge.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), V && (B.checkForConsuming(),
|
|
1459
|
+
return ge.comparePoints(se.leftSE.point, se.rightSE.point) > 0 && se.swapEvents(), ge.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), V && (B.checkForConsuming(), N.checkForConsuming()), C;
|
|
1460
1460
|
}
|
|
1461
1461
|
swapEvents() {
|
|
1462
1462
|
const v = this.rightSE;
|
|
@@ -1470,15 +1470,15 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1470
1470
|
const B = fe.compare(C, V);
|
|
1471
1471
|
if (B !== 0) {
|
|
1472
1472
|
if (B > 0) {
|
|
1473
|
-
const
|
|
1474
|
-
C = V, V =
|
|
1473
|
+
const N = C;
|
|
1474
|
+
C = V, V = N;
|
|
1475
1475
|
}
|
|
1476
1476
|
if (C.prev === V) {
|
|
1477
|
-
const
|
|
1478
|
-
C = V, V =
|
|
1477
|
+
const N = C;
|
|
1478
|
+
C = V, V = N;
|
|
1479
1479
|
}
|
|
1480
|
-
for (let
|
|
1481
|
-
const se = V.rings[
|
|
1480
|
+
for (let N = 0, re = V.rings.length; N < re; N++) {
|
|
1481
|
+
const se = V.rings[N], le = V.windings[N], ne = C.rings.indexOf(se);
|
|
1482
1482
|
ne === -1 ? (C.rings.push(se), C.windings.push(le)) : C.windings[ne] += le;
|
|
1483
1483
|
}
|
|
1484
1484
|
V.rings = null, V.windings = null, V.consumedBy = C, V.leftSE.consumedBy = C.leftSE, V.rightSE.consumedBy = C.rightSE;
|
|
@@ -1513,20 +1513,20 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1513
1513
|
const ne = this.rings[se], me = this.windings[se], ie = C.indexOf(ne);
|
|
1514
1514
|
ie === -1 ? (C.push(ne), V.push(me)) : V[ie] += me;
|
|
1515
1515
|
}
|
|
1516
|
-
const
|
|
1516
|
+
const N = [], re = [];
|
|
1517
1517
|
for (let se = 0, le = C.length; se < le; se++) {
|
|
1518
1518
|
if (V[se] === 0) continue;
|
|
1519
1519
|
const ne = C[se], me = ne.poly;
|
|
1520
1520
|
if (re.indexOf(me) === -1)
|
|
1521
|
-
if (ne.isExterior)
|
|
1521
|
+
if (ne.isExterior) N.push(me);
|
|
1522
1522
|
else {
|
|
1523
1523
|
re.indexOf(me) === -1 && re.push(me);
|
|
1524
|
-
const ie =
|
|
1525
|
-
ie !== -1 &&
|
|
1524
|
+
const ie = N.indexOf(ne.poly);
|
|
1525
|
+
ie !== -1 && N.splice(ie, 1);
|
|
1526
1526
|
}
|
|
1527
1527
|
}
|
|
1528
|
-
for (let se = 0, le =
|
|
1529
|
-
const ne =
|
|
1528
|
+
for (let se = 0, le = N.length; se < le; se++) {
|
|
1529
|
+
const ne = N[se].multiPoly;
|
|
1530
1530
|
B.indexOf(ne) === -1 && B.push(ne);
|
|
1531
1531
|
}
|
|
1532
1532
|
return this._afterState;
|
|
@@ -1577,13 +1577,13 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1577
1577
|
y: B.y
|
|
1578
1578
|
}
|
|
1579
1579
|
};
|
|
1580
|
-
let
|
|
1580
|
+
let N = B;
|
|
1581
1581
|
for (let re = 1, se = v.length; re < se; re++) {
|
|
1582
1582
|
if (typeof v[re][0] != "number" || typeof v[re][1] != "number") throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
1583
1583
|
let le = p.round(v[re][0], v[re][1]);
|
|
1584
|
-
le.x ===
|
|
1584
|
+
le.x === N.x && le.y === N.y || (this.segments.push(fe.fromRing(N, le, this)), le.x < this.bbox.ll.x && (this.bbox.ll.x = le.x), le.y < this.bbox.ll.y && (this.bbox.ll.y = le.y), le.x > this.bbox.ur.x && (this.bbox.ur.x = le.x), le.y > this.bbox.ur.y && (this.bbox.ur.y = le.y), N = le);
|
|
1585
1585
|
}
|
|
1586
|
-
(B.x !==
|
|
1586
|
+
(B.x !== N.x || B.y !== N.y) && this.segments.push(fe.fromRing(N, B, this));
|
|
1587
1587
|
}
|
|
1588
1588
|
getSweepEvents() {
|
|
1589
1589
|
const v = [];
|
|
@@ -1608,8 +1608,8 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1608
1608
|
}
|
|
1609
1609
|
}, this.interiorRings = [];
|
|
1610
1610
|
for (let V = 1, B = v.length; V < B; V++) {
|
|
1611
|
-
const
|
|
1612
|
-
|
|
1611
|
+
const N = new Ce(v[V], this, !1);
|
|
1612
|
+
N.bbox.ll.x < this.bbox.ll.x && (this.bbox.ll.x = N.bbox.ll.x), N.bbox.ll.y < this.bbox.ll.y && (this.bbox.ll.y = N.bbox.ll.y), N.bbox.ur.x > this.bbox.ur.x && (this.bbox.ur.x = N.bbox.ur.x), N.bbox.ur.y > this.bbox.ur.y && (this.bbox.ur.y = N.bbox.ur.y), this.interiorRings.push(N);
|
|
1613
1613
|
}
|
|
1614
1614
|
this.multiPoly = C;
|
|
1615
1615
|
}
|
|
@@ -1617,7 +1617,7 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1617
1617
|
const v = this.exteriorRing.getSweepEvents();
|
|
1618
1618
|
for (let C = 0, V = this.interiorRings.length; C < V; C++) {
|
|
1619
1619
|
const B = this.interiorRings[C].getSweepEvents();
|
|
1620
|
-
for (let
|
|
1620
|
+
for (let N = 0, re = B.length; N < re; N++) v.push(B[N]);
|
|
1621
1621
|
}
|
|
1622
1622
|
return v;
|
|
1623
1623
|
}
|
|
@@ -1640,8 +1640,8 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1640
1640
|
}
|
|
1641
1641
|
};
|
|
1642
1642
|
for (let V = 0, B = v.length; V < B; V++) {
|
|
1643
|
-
const
|
|
1644
|
-
|
|
1643
|
+
const N = new ke(v[V], this);
|
|
1644
|
+
N.bbox.ll.x < this.bbox.ll.x && (this.bbox.ll.x = N.bbox.ll.x), N.bbox.ll.y < this.bbox.ll.y && (this.bbox.ll.y = N.bbox.ll.y), N.bbox.ur.x > this.bbox.ur.x && (this.bbox.ur.x = N.bbox.ur.x), N.bbox.ur.y > this.bbox.ur.y && (this.bbox.ur.y = N.bbox.ur.y), this.polys.push(N);
|
|
1645
1645
|
}
|
|
1646
1646
|
this.isSubject = C;
|
|
1647
1647
|
}
|
|
@@ -1649,7 +1649,7 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1649
1649
|
const v = [];
|
|
1650
1650
|
for (let C = 0, V = this.polys.length; C < V; C++) {
|
|
1651
1651
|
const B = this.polys[C].getSweepEvents();
|
|
1652
|
-
for (let
|
|
1652
|
+
for (let N = 0, re = B.length; N < re; N++) v.push(B[N]);
|
|
1653
1653
|
}
|
|
1654
1654
|
return v;
|
|
1655
1655
|
}
|
|
@@ -1658,9 +1658,9 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1658
1658
|
static factory(v) {
|
|
1659
1659
|
const C = [];
|
|
1660
1660
|
for (let V = 0, B = v.length; V < B; V++) {
|
|
1661
|
-
const
|
|
1662
|
-
if (!
|
|
1663
|
-
let re = null, se =
|
|
1661
|
+
const N = v[V];
|
|
1662
|
+
if (!N.isInResult() || N.ringOut) continue;
|
|
1663
|
+
let re = null, se = N.leftSE, le = N.rightSE;
|
|
1664
1664
|
const ne = [se], me = se.point, ie = [];
|
|
1665
1665
|
for (; re = se, se = le, ne.push(se), se.point !== me; )
|
|
1666
1666
|
for (; ; ) {
|
|
@@ -1710,8 +1710,8 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1710
1710
|
if (C.length === 1) return null;
|
|
1711
1711
|
const V = C[0], B = C[1];
|
|
1712
1712
|
Z(V, v, B) === 0 && C.shift(), C.push(C[0]);
|
|
1713
|
-
const
|
|
1714
|
-
for (let ne = re; ne != se; ne +=
|
|
1713
|
+
const N = this.isExteriorRing() ? 1 : -1, re = this.isExteriorRing() ? 0 : C.length - 1, se = this.isExteriorRing() ? C.length : -1, le = [];
|
|
1714
|
+
for (let ne = re; ne != se; ne += N) le.push([C[ne].x, C[ne].y]);
|
|
1715
1715
|
return le;
|
|
1716
1716
|
}
|
|
1717
1717
|
isExteriorRing() {
|
|
@@ -1726,7 +1726,7 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1726
1726
|
}
|
|
1727
1727
|
_calcEnclosingRing() {
|
|
1728
1728
|
let v = this.events[0];
|
|
1729
|
-
for (let B = 1,
|
|
1729
|
+
for (let B = 1, N = this.events.length; B < N; B++) {
|
|
1730
1730
|
const re = this.events[B];
|
|
1731
1731
|
ge.compare(v, re) > 0 && (v = re);
|
|
1732
1732
|
}
|
|
@@ -1771,12 +1771,12 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1771
1771
|
_composePolys(v) {
|
|
1772
1772
|
const C = [];
|
|
1773
1773
|
for (let V = 0, B = v.length; V < B; V++) {
|
|
1774
|
-
const
|
|
1775
|
-
if (!
|
|
1776
|
-
if (
|
|
1774
|
+
const N = v[V];
|
|
1775
|
+
if (!N.poly)
|
|
1776
|
+
if (N.isExteriorRing()) C.push(new Le(N));
|
|
1777
1777
|
else {
|
|
1778
|
-
const re =
|
|
1779
|
-
re.poly || C.push(new Le(re)), re.poly.addInterior(
|
|
1778
|
+
const re = N.enclosingRing();
|
|
1779
|
+
re.poly || C.push(new Le(re)), re.poly.addInterior(N);
|
|
1780
1780
|
}
|
|
1781
1781
|
}
|
|
1782
1782
|
return C;
|
|
@@ -1793,9 +1793,9 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1793
1793
|
return v.isLeft ? this.queue.remove(v.otherSE) : this.tree.remove(C), V;
|
|
1794
1794
|
const B = v.isLeft ? this.tree.add(C) : this.tree.find(C);
|
|
1795
1795
|
if (!B) throw new Error(`Unable to find segment #${C.id} [${C.leftSE.point.x}, ${C.leftSE.point.y}] -> [${C.rightSE.point.x}, ${C.rightSE.point.y}] in SweepLine tree.`);
|
|
1796
|
-
let
|
|
1796
|
+
let N = B, re = B, se, le;
|
|
1797
1797
|
for (; se === void 0; )
|
|
1798
|
-
|
|
1798
|
+
N = this.tree.prev(N), N === null ? se = null : N.key.consumedBy === void 0 && (se = N.key);
|
|
1799
1799
|
for (; le === void 0; )
|
|
1800
1800
|
re = this.tree.next(re), re === null ? le = null : re.key.consumedBy === void 0 && (le = re.key);
|
|
1801
1801
|
if (v.isLeft) {
|
|
@@ -1863,28 +1863,28 @@ var ua = /* @__PURE__ */ Sr(((n, e) => {
|
|
|
1863
1863
|
const ie = B[ne];
|
|
1864
1864
|
for (let ue = ne + 1, xe = B.length; ue < xe; ue++) if (R(ie.bbox, B[ue].bbox) === null) return [];
|
|
1865
1865
|
}
|
|
1866
|
-
const
|
|
1866
|
+
const N = new d(ge.compare);
|
|
1867
1867
|
for (let ne = 0, me = B.length; ne < me; ne++) {
|
|
1868
1868
|
const ie = B[ne].getSweepEvents();
|
|
1869
1869
|
for (let ue = 0, xe = ie.length; ue < xe; ue++)
|
|
1870
|
-
if (
|
|
1870
|
+
if (N.insert(ie[ue]), N.size > je) throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).");
|
|
1871
1871
|
}
|
|
1872
|
-
const re = new Xe(
|
|
1873
|
-
let se =
|
|
1872
|
+
const re = new Xe(N);
|
|
1873
|
+
let se = N.size, le = N.pop();
|
|
1874
1874
|
for (; le; ) {
|
|
1875
1875
|
const ne = le.key;
|
|
1876
|
-
if (
|
|
1876
|
+
if (N.size === se) {
|
|
1877
1877
|
const ie = ne.segment;
|
|
1878
1878
|
throw new Error(`Unable to pop() ${ne.isLeft ? "left" : "right"} SweepEvent [${ne.point.x}, ${ne.point.y}] from segment #${ie.id} [${ie.leftSE.point.x}, ${ie.leftSE.point.y}] -> [${ie.rightSE.point.x}, ${ie.rightSE.point.y}] from queue.`);
|
|
1879
1879
|
}
|
|
1880
|
-
if (
|
|
1880
|
+
if (N.size > je) throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");
|
|
1881
1881
|
if (re.segments.length > ct) throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");
|
|
1882
1882
|
const me = re.process(ne);
|
|
1883
1883
|
for (let ie = 0, ue = me.length; ie < ue; ie++) {
|
|
1884
1884
|
const xe = me[ie];
|
|
1885
|
-
xe.consumedBy === void 0 &&
|
|
1885
|
+
xe.consumedBy === void 0 && N.insert(xe);
|
|
1886
1886
|
}
|
|
1887
|
-
se =
|
|
1887
|
+
se = N.size, le = N.pop();
|
|
1888
1888
|
}
|
|
1889
1889
|
return p.reset(), new ze(Ee.factory(re.segments)).getGeom();
|
|
1890
1890
|
}
|
|
@@ -2444,17 +2444,17 @@ function Po(n, e, t, o, s, i, r, a, l, c, d) {
|
|
|
2444
2444
|
}
|
|
2445
2445
|
Po(n, e, u, h, O, R, M, P, l, c, d + 1), Po(M, P, S, A, _, L, r, a, l, c, d + 1);
|
|
2446
2446
|
}
|
|
2447
|
-
var
|
|
2447
|
+
var Da = 8, Na = 11920929e-14, Ba = 1;
|
|
2448
2448
|
function qa(n, e, t, o, s, i, r = 0.5, a = []) {
|
|
2449
2449
|
let l = (Ba - Math.min(0.99, Math.max(0, r))) / 1;
|
|
2450
2450
|
return l *= l, Io(a, n, e, t, o, s, i, l, 0), a.push(s, i), a;
|
|
2451
2451
|
}
|
|
2452
2452
|
function Io(n, e, t, o, s, i, r, a, l) {
|
|
2453
|
-
if (l >
|
|
2453
|
+
if (l > Da) return;
|
|
2454
2454
|
const c = (e + o) / 2, d = (t + s) / 2, u = (o + i) / 2, h = (s + r) / 2, m = (c + u) / 2, f = (d + h) / 2;
|
|
2455
2455
|
let _ = i - e, L = r - t;
|
|
2456
2456
|
const O = Math.abs((o - i) * L - (s - r) * _);
|
|
2457
|
-
if (O >
|
|
2457
|
+
if (O > Na) {
|
|
2458
2458
|
if (O * O <= a * (_ * _ + L * L)) {
|
|
2459
2459
|
n.push(m, f);
|
|
2460
2460
|
return;
|
|
@@ -2612,19 +2612,19 @@ function el(n, e = {}) {
|
|
|
2612
2612
|
const O = f.length / 2, R = l.width / 2, S = R * R, A = l.miterLimit * l.miterLimit;
|
|
2613
2613
|
let M = n[0], P = n[1], y = n[2], p = n[3], g = 0, x = 0, b = -(P - p), w = M - y, E = 0, I = 0, k = Math.sqrt(b * b + w * w);
|
|
2614
2614
|
b /= k, w /= k, b *= R, w *= R;
|
|
2615
|
-
const T = c, z = (1 - T) * 2,
|
|
2616
|
-
h || (l.cap === "round" ? L += Gt(M - b * (z -
|
|
2615
|
+
const T = c, z = (1 - T) * 2, D = T * 2;
|
|
2616
|
+
h || (l.cap === "round" ? L += Gt(M - b * (z - D) * 0.5, P - w * (z - D) * 0.5, M - b * z, P - w * z, M + b * D, P + w * D, f, !0) + 2 : l.cap === "square" && (L += ps(M, P, b, w, z, D, !0, f))), f.push(M - b * z, P - w * z), f.push(M + b * D, P + w * D);
|
|
2617
2617
|
for (let U = 1; U < _ - 1; ++U) {
|
|
2618
2618
|
M = n[(U - 1) * 2], P = n[(U - 1) * 2 + 1], y = n[U * 2], p = n[U * 2 + 1], g = n[(U + 1) * 2], x = n[(U + 1) * 2 + 1], b = -(P - p), w = M - y, k = Math.sqrt(b * b + w * w), b /= k, w /= k, b *= R, w *= R, E = -(p - x), I = y - g, k = Math.sqrt(E * E + I * I), E /= k, I /= k, E *= R, I *= R;
|
|
2619
2619
|
const G = y - M, q = P - p, K = y - g, H = x - p, Q = G * K + q * H, $ = q * K - H * G, Z = $ < 0;
|
|
2620
2620
|
if (Math.abs($) < 1e-3 * Math.abs(Q)) {
|
|
2621
|
-
f.push(y - b * z, p - w * z), f.push(y + b *
|
|
2621
|
+
f.push(y - b * z, p - w * z), f.push(y + b * D, p + w * D), Q >= 0 && (l.join === "round" ? L += Gt(y, p, y - b * z, p - w * z, y - E * z, p - I * z, f, !1) + 4 : L += 2, f.push(y - E * D, p - I * D), f.push(y + E * z, p + I * z));
|
|
2622
2622
|
continue;
|
|
2623
2623
|
}
|
|
2624
|
-
const te = (-b + M) * (-w + p) - (-b + y) * (-w + P), ee = (-E + g) * (-I + p) - (-E + y) * (-I + x), ae = (G * ee - K * te) / $, ce = (H * te - q * ee) / $, pe = (ae - y) * (ae - y) + (ce - p) * (ce - p), he = y + (ae - y) * z, ge = p + (ce - p) * z, ve = y - (ae - y) *
|
|
2625
|
-
pe <= Ce + ke * ke * S ? l.join === "bevel" || pe / S > A ? (Z ? (f.push(he, ge), f.push(y + b *
|
|
2624
|
+
const te = (-b + M) * (-w + p) - (-b + y) * (-w + P), ee = (-E + g) * (-I + p) - (-E + y) * (-I + x), ae = (G * ee - K * te) / $, ce = (H * te - q * ee) / $, pe = (ae - y) * (ae - y) + (ce - p) * (ce - p), he = y + (ae - y) * z, ge = p + (ce - p) * z, ve = y - (ae - y) * D, fe = p - (ce - p) * D, Ce = Math.min(G * G + q * q, K * K + H * H), ke = Z ? z : D;
|
|
2625
|
+
pe <= Ce + ke * ke * S ? l.join === "bevel" || pe / S > A ? (Z ? (f.push(he, ge), f.push(y + b * D, p + w * D), f.push(he, ge), f.push(y + E * D, p + I * D)) : (f.push(y - b * z, p - w * z), f.push(ve, fe), f.push(y - E * z, p - I * z), f.push(ve, fe)), L += 2) : l.join === "round" ? Z ? (f.push(he, ge), f.push(y + b * D, p + w * D), L += Gt(y, p, y + b * D, p + w * D, y + E * D, p + I * D, f, !0) + 4, f.push(he, ge), f.push(y + E * D, p + I * D)) : (f.push(y - b * z, p - w * z), f.push(ve, fe), L += Gt(y, p, y - b * z, p - w * z, y - E * z, p - I * z, f, !1) + 4, f.push(y - E * z, p - I * z), f.push(ve, fe)) : (f.push(he, ge), f.push(ve, fe)) : (f.push(y - b * z, p - w * z), f.push(y + b * D, p + w * D), l.join === "round" ? Z ? L += Gt(y, p, y + b * D, p + w * D, y + E * D, p + I * D, f, !0) + 2 : L += Gt(y, p, y - b * z, p - w * z, y - E * z, p - I * z, f, !1) + 2 : l.join === "miter" && pe / S <= A && (Z ? (f.push(ve, fe), f.push(ve, fe)) : (f.push(he, ge), f.push(he, ge)), L += 2), f.push(y - E * z, p - I * z), f.push(y + E * D, p + I * D), L += 2);
|
|
2626
2626
|
}
|
|
2627
|
-
M = n[(_ - 2) * 2], P = n[(_ - 2) * 2 + 1], y = n[(_ - 1) * 2], p = n[(_ - 1) * 2 + 1], b = -(P - p), w = M - y, k = Math.sqrt(b * b + w * w), b /= k, w /= k, b *= R, w *= R, f.push(y - b * z, p - w * z), f.push(y + b *
|
|
2627
|
+
M = n[(_ - 2) * 2], P = n[(_ - 2) * 2 + 1], y = n[(_ - 1) * 2], p = n[(_ - 1) * 2 + 1], b = -(P - p), w = M - y, k = Math.sqrt(b * b + w * w), b /= k, w /= k, b *= R, w *= R, f.push(y - b * z, p - w * z), f.push(y + b * D, p + w * D), h || (l.cap === "round" ? L += Gt(y - b * (z - D) * 0.5, p - w * (z - D) * 0.5, y - b * z, p - w * z, y + b * D, p + w * D, f, !1) + 2 : l.cap === "square" && (L += ps(y, p, b, w, z, D, !1, f)));
|
|
2628
2628
|
const oe = ms * ms;
|
|
2629
2629
|
for (let U = O; U < L + O - 2; ++U)
|
|
2630
2630
|
M = f[U * 2], P = f[U * 2 + 1], y = f[(U + 1) * 2], p = f[(U + 1) * 2 + 1], g = f[(U + 2) * 2], x = f[(U + 2) * 2 + 1], !(Math.abs(M * (p - x) + y * (x - P) + g * (P - p)) < oe) && o.push(U, U + 1, U + 2);
|
|
@@ -4962,7 +4962,7 @@ function pi(n, e, t, o = /* @__PURE__ */ new Set()) {
|
|
|
4962
4962
|
if (l !== void 0)
|
|
4963
4963
|
return Vl(l) ? pi(n, l.id, t, o) : l;
|
|
4964
4964
|
}
|
|
4965
|
-
function
|
|
4965
|
+
function Dl(n, e) {
|
|
4966
4966
|
const t = {
|
|
4967
4967
|
id: e.id,
|
|
4968
4968
|
name: e.name,
|
|
@@ -4972,7 +4972,7 @@ function Nl(n, e) {
|
|
|
4972
4972
|
};
|
|
4973
4973
|
return { collections: [...n.collections, t] };
|
|
4974
4974
|
}
|
|
4975
|
-
function
|
|
4975
|
+
function Nl(n, e, t) {
|
|
4976
4976
|
return vi(n, e, (o) => ({
|
|
4977
4977
|
...o,
|
|
4978
4978
|
modes: [...o.modes, t]
|
|
@@ -5559,8 +5559,20 @@ var cc = class extends jo {
|
|
|
5559
5559
|
clearHistory = () => this._yDoc.undoManager.clear();
|
|
5560
5560
|
proxyNode = (n) => this._yDoc._proxyNode(n);
|
|
5561
5561
|
set = (n) => {
|
|
5562
|
-
const { children: e = [], ...t } = n, o =
|
|
5563
|
-
|
|
5562
|
+
const { children: e = [], ...t } = n, o = () => {
|
|
5563
|
+
this._yDoc.reset(), this.stopCapturing(), this.resetProperties(), this.removeChildren(), this.setProperties(t), this.append(e);
|
|
5564
|
+
};
|
|
5565
|
+
if (this._yDoc._transacting === void 0) this._yDoc.transact(o, !0);
|
|
5566
|
+
else {
|
|
5567
|
+
const s = this._yDoc._transacting;
|
|
5568
|
+
this._yDoc._transacting = !0;
|
|
5569
|
+
try {
|
|
5570
|
+
o();
|
|
5571
|
+
} finally {
|
|
5572
|
+
this._yDoc._transacting = s;
|
|
5573
|
+
}
|
|
5574
|
+
}
|
|
5575
|
+
return this;
|
|
5564
5576
|
};
|
|
5565
5577
|
loadIndexeddb = async () => {
|
|
5566
5578
|
await this._yDoc.loadIndexeddb();
|
|
@@ -5575,7 +5587,7 @@ var cc = class extends jo {
|
|
|
5575
5587
|
this._flushYUpdates(), super.destroy(), this._yDoc.destroy();
|
|
5576
5588
|
};
|
|
5577
5589
|
}, uc = (n, e) => {
|
|
5578
|
-
const t = de(new ln(e.db?.local ? "doc" : void 0)), o = de(!1), s = bo(new fr()), i = de(new Oi({ internalMode: "front" })), r = de(new
|
|
5590
|
+
const t = de(new ln(e.db?.local ? "doc" : void 0)), o = de(!1), s = bo(new fr()), i = de(new Oi({ internalMode: "front" })), r = de(new Ni({
|
|
5579
5591
|
startTime: 0,
|
|
5580
5592
|
currentTime: 0,
|
|
5581
5593
|
endTime: 0,
|
|
@@ -5640,7 +5652,7 @@ var cc = class extends jo {
|
|
|
5640
5652
|
function z($) {
|
|
5641
5653
|
return $ instanceof $n;
|
|
5642
5654
|
}
|
|
5643
|
-
function
|
|
5655
|
+
function D($) {
|
|
5644
5656
|
return t.value.equal($);
|
|
5645
5657
|
}
|
|
5646
5658
|
function oe($, Z = !1) {
|
|
@@ -5693,7 +5705,7 @@ var cc = class extends jo {
|
|
|
5693
5705
|
parseAnchor: T,
|
|
5694
5706
|
isNode: z,
|
|
5695
5707
|
getNodeById: w,
|
|
5696
|
-
isRootNode:
|
|
5708
|
+
isRootNode: D,
|
|
5697
5709
|
isElement: U,
|
|
5698
5710
|
inEditorIs: G,
|
|
5699
5711
|
isFrameNode: oe,
|
|
@@ -6253,10 +6265,10 @@ var cc = class extends jo {
|
|
|
6253
6265
|
}), g.style.left += E.left, g.style.top += E.top, g.style.width = E.width, g.style.height = E.height, g.updateGlobalTransform(), g.children.forEach((k, T) => {
|
|
6254
6266
|
if (e(k)) {
|
|
6255
6267
|
k.updateGlobalTransform();
|
|
6256
|
-
const z = I[T],
|
|
6268
|
+
const z = I[T], D = k.toLocal({
|
|
6257
6269
|
x: z.left + z.width / 2,
|
|
6258
6270
|
y: z.top + z.height / 2
|
|
6259
|
-
}), oe = k.pivot, U = k.style, G = [
|
|
6271
|
+
}), oe = k.pivot, U = k.style, G = [D.x - oe.x, D.y - oe.y], q = new eo().scale(k.scale.x, k.scale.y).skew(k.skew.x, k.skew.y).rotate(k.rotation).apply({
|
|
6260
6272
|
x: G[0],
|
|
6261
6273
|
y: G[1]
|
|
6262
6274
|
});
|
|
@@ -6341,7 +6353,7 @@ var cc = class extends jo {
|
|
|
6341
6353
|
const R = Y(() => {
|
|
6342
6354
|
const g = t.value, { position: x, zoom: b } = g;
|
|
6343
6355
|
x.x, x.y, b.x, b.y;
|
|
6344
|
-
const { left: w, top: E, right: I, bottom: k } = a.value, { width: T, height: z } = r.value,
|
|
6356
|
+
const { left: w, top: E, right: I, bottom: k } = a.value, { width: T, height: z } = r.value, D = g.toGlobal({
|
|
6345
6357
|
x: w,
|
|
6346
6358
|
y: E
|
|
6347
6359
|
}), oe = g.toGlobal({
|
|
@@ -6349,10 +6361,10 @@ var cc = class extends jo {
|
|
|
6349
6361
|
y: z - (k + E)
|
|
6350
6362
|
});
|
|
6351
6363
|
return new xt({
|
|
6352
|
-
x:
|
|
6353
|
-
y:
|
|
6354
|
-
width: oe.x -
|
|
6355
|
-
height: oe.y -
|
|
6364
|
+
x: D.x,
|
|
6365
|
+
y: D.y,
|
|
6366
|
+
width: oe.x - D.x,
|
|
6367
|
+
height: oe.y - D.y
|
|
6356
6368
|
});
|
|
6357
6369
|
}), S = Y(() => h(o.value.children)), A = Y(() => h(s.value)), M = Y(() => f(A.value)), P = Y(() => d(s.value)), y = Y(() => _(P.value)), p = Y(() => A.value.contains(l()));
|
|
6358
6370
|
Object.assign(n, {
|
|
@@ -6423,18 +6435,18 @@ var cc = class extends jo {
|
|
|
6423
6435
|
}
|
|
6424
6436
|
};
|
|
6425
6437
|
P && delete z.id;
|
|
6426
|
-
const
|
|
6427
|
-
if (b === void 0 ? T.appendChild(
|
|
6438
|
+
const D = e.value.proxyNode($n.parse(z));
|
|
6439
|
+
if (b === void 0 ? T.appendChild(D) : T.moveChild(D, b), g !== void 0 && g++, D.text.isValid() && (D.style.width || (D.style.width = D.text.base.boundingBox.width), D.style.height || (D.style.height = D.text.base.boundingBox.height)), y && y.width && y.height) {
|
|
6428
6440
|
const { width: oe, height: U } = y, G = oe / 2, q = U / 2;
|
|
6429
|
-
if (
|
|
6430
|
-
const K =
|
|
6431
|
-
m(
|
|
6441
|
+
if (D.style.width || (D.style.width = G), D.style.height || (D.style.height = q), S) {
|
|
6442
|
+
const K = D.style.width / D.style.height;
|
|
6443
|
+
m(D, K > 1 ? G : q * K, K > 1 ? G / K : q, {
|
|
6432
6444
|
deep: !0,
|
|
6433
6445
|
textFontSizeToFit: !0
|
|
6434
6446
|
});
|
|
6435
6447
|
}
|
|
6436
6448
|
}
|
|
6437
|
-
return
|
|
6449
|
+
return D;
|
|
6438
6450
|
}), E = i(w);
|
|
6439
6451
|
let I;
|
|
6440
6452
|
if (typeof A == "string") switch (A) {
|
|
@@ -6915,7 +6927,7 @@ var Rc = (n, e) => {
|
|
|
6915
6927
|
});
|
|
6916
6928
|
}
|
|
6917
6929
|
});
|
|
6918
|
-
}, Vc = 2e3, ws = 48, Fc = 36,
|
|
6930
|
+
}, Vc = 2e3, ws = 48, Fc = 36, Dc = (n) => {
|
|
6919
6931
|
const { registerConfig: e, drawboardAabb: t } = n, o = e("ui.panels", { default: {} });
|
|
6920
6932
|
function s(f, _) {
|
|
6921
6933
|
o.value = {
|
|
@@ -6986,7 +6998,7 @@ function cn(n, e, t) {
|
|
|
6986
6998
|
}
|
|
6987
6999
|
return s < t ? o : void 0;
|
|
6988
7000
|
}
|
|
6989
|
-
var
|
|
7001
|
+
var Nc = (n) => {
|
|
6990
7002
|
const { camera: e } = n, t = dt(/* @__PURE__ */ new Map()), o = Y(() => Math.max(1, 5 / e.value.zoom.x)), s = (u, h) => {
|
|
6991
7003
|
t.set(u, h);
|
|
6992
7004
|
}, i = (u) => {
|
|
@@ -7151,8 +7163,8 @@ var jc = wi, Uc = (n) => {
|
|
|
7151
7163
|
Lc,
|
|
7152
7164
|
Rc,
|
|
7153
7165
|
Oc,
|
|
7154
|
-
Nc,
|
|
7155
7166
|
Dc,
|
|
7167
|
+
Nc,
|
|
7156
7168
|
Bc,
|
|
7157
7169
|
Xc,
|
|
7158
7170
|
Yc
|
|
@@ -7193,15 +7205,15 @@ var Wc = Pe((n) => {
|
|
|
7193
7205
|
const T = c === void 0 ? 0 : k - c;
|
|
7194
7206
|
c = k;
|
|
7195
7207
|
const z = [];
|
|
7196
|
-
a.forEach((
|
|
7197
|
-
if (
|
|
7198
|
-
|
|
7199
|
-
else if (
|
|
7200
|
-
|
|
7208
|
+
a.forEach((D) => {
|
|
7209
|
+
if (D.t += T * D.rate, D.loop)
|
|
7210
|
+
D.span > 0 && (D.t %= D.span);
|
|
7211
|
+
else if (D.t >= D.span) {
|
|
7212
|
+
D.t = D.span, u(D), z.push(D.node);
|
|
7201
7213
|
return;
|
|
7202
7214
|
}
|
|
7203
|
-
u(
|
|
7204
|
-
}), z.forEach((
|
|
7215
|
+
u(D);
|
|
7216
|
+
}), z.forEach((D) => a.delete(D)), a.size ? l = requestAnimationFrame(h) : (l = void 0, c = void 0);
|
|
7205
7217
|
}
|
|
7206
7218
|
function m() {
|
|
7207
7219
|
l === void 0 && (c = void 0, l = requestAnimationFrame(h));
|
|
@@ -7211,11 +7223,11 @@ var Wc = Pe((n) => {
|
|
|
7211
7223
|
const z = d(k);
|
|
7212
7224
|
if (!z.length) return;
|
|
7213
7225
|
z.forEach((G) => G.setStandalone(!0));
|
|
7214
|
-
const
|
|
7226
|
+
const D = Math.max(0, ...z.map((G) => (G.delay ?? 0) + (G.duration ?? 0))), oe = z.some((G) => !!G.loop), U = a.get(k);
|
|
7215
7227
|
a.set(k, {
|
|
7216
7228
|
node: k,
|
|
7217
7229
|
anims: z,
|
|
7218
|
-
span:
|
|
7230
|
+
span: D,
|
|
7219
7231
|
loop: oe,
|
|
7220
7232
|
rate: 1,
|
|
7221
7233
|
t: T || !U ? 0 : U.t
|
|
@@ -7239,7 +7251,7 @@ var Wc = Pe((n) => {
|
|
|
7239
7251
|
z.keyframes = T(z.keyframes ?? []);
|
|
7240
7252
|
}
|
|
7241
7253
|
function A(k, T, z = o.value[0]) {
|
|
7242
|
-
S(z, (
|
|
7254
|
+
S(z, (D) => Sn(D, {
|
|
7243
7255
|
...T,
|
|
7244
7256
|
offset: k
|
|
7245
7257
|
}));
|
|
@@ -7248,7 +7260,7 @@ var Wc = Pe((n) => {
|
|
|
7248
7260
|
S(T, (z) => Xs(z, k));
|
|
7249
7261
|
}
|
|
7250
7262
|
function P(k, T, z = o.value[0]) {
|
|
7251
|
-
S(z, (
|
|
7263
|
+
S(z, (D) => Ys(D, k, T));
|
|
7252
7264
|
}
|
|
7253
7265
|
function y(k, T = o.value[0]) {
|
|
7254
7266
|
if (!T) return;
|
|
@@ -7273,7 +7285,7 @@ var Wc = Pe((n) => {
|
|
|
7273
7285
|
if (!T) return;
|
|
7274
7286
|
const z = n.getAnimationPreset(k);
|
|
7275
7287
|
if (!z) return;
|
|
7276
|
-
const
|
|
7288
|
+
const D = z.build(p(T)), oe = 3e3;
|
|
7277
7289
|
let U = T.duration;
|
|
7278
7290
|
(!U || U <= 0) && (U = oe);
|
|
7279
7291
|
const G = z.category === "out" ? Math.max(0, U - z.duration) : 0, q = T, K = q.children.find((H) => H instanceof jt && g(H) === z.category);
|
|
@@ -7283,7 +7295,7 @@ var Wc = Pe((n) => {
|
|
|
7283
7295
|
H || (H = new jt({
|
|
7284
7296
|
duration: z.duration,
|
|
7285
7297
|
keyframes: []
|
|
7286
|
-
}), q.appendChild(H)), H.keyframes =
|
|
7298
|
+
}), q.appendChild(H)), H.keyframes = D, H.duration = z.duration, H.delay = G, H.loop = !!z.loop, H.meta.presetCategory = z.category, H.meta.presetId = k;
|
|
7287
7299
|
}), n.recomputeTimelineEndTime?.();
|
|
7288
7300
|
}
|
|
7289
7301
|
function b() {
|
|
@@ -7300,7 +7312,7 @@ var Wc = Pe((n) => {
|
|
|
7300
7312
|
});
|
|
7301
7313
|
}
|
|
7302
7314
|
function I(k = {}) {
|
|
7303
|
-
const T = s.value, z = k.width ?? T.width ?? 800,
|
|
7315
|
+
const T = s.value, z = k.width ?? T.width ?? 800, D = k.height ?? T.height ?? 600, oe = k.fps ?? n.fps?.value ?? 30, U = w(), G = [];
|
|
7304
7316
|
let q = 0;
|
|
7305
7317
|
return e.value?.findOne((K) => {
|
|
7306
7318
|
if (t(K)) {
|
|
@@ -7326,7 +7338,7 @@ var Wc = Pe((n) => {
|
|
|
7326
7338
|
return !1;
|
|
7327
7339
|
}), _l({
|
|
7328
7340
|
width: z,
|
|
7329
|
-
height:
|
|
7341
|
+
height: D,
|
|
7330
7342
|
fps: oe,
|
|
7331
7343
|
durationMs: q || 1e3,
|
|
7332
7344
|
layers: G,
|
|
@@ -7517,8 +7529,8 @@ var Wc = Pe((n) => {
|
|
|
7517
7529
|
w[I] = E, E += S[I] + y;
|
|
7518
7530
|
h.forEach((I, k) => {
|
|
7519
7531
|
I.forEach((T, z) => {
|
|
7520
|
-
const
|
|
7521
|
-
T.el.style.left =
|
|
7532
|
+
const D = x[z] + T.width / 2, oe = w[k] + T.height / 2, U = T.el.getParent()?.globalAabb;
|
|
7533
|
+
T.el.style.left = D - T.el.style.width / 2 - (U?.left ?? 0), T.el.style.top = oe - T.el.style.height / 2 - (U?.top ?? 0);
|
|
7522
7534
|
});
|
|
7523
7535
|
});
|
|
7524
7536
|
}
|
|
@@ -8471,7 +8483,7 @@ var ks = Se({
|
|
|
8471
8483
|
return (i, r) => (j(), Fe(Bo(F(o).component), {
|
|
8472
8484
|
icon: F(o).icon,
|
|
8473
8485
|
tag: e.tag,
|
|
8474
|
-
class:
|
|
8486
|
+
class: Ne(["m-icon", { "m-icon--disabled": e.disabled }]),
|
|
8475
8487
|
role: s ? "button" : void 0,
|
|
8476
8488
|
"aria-hidden": !s,
|
|
8477
8489
|
tabindex: s ? e.disabled ? -1 : 0 : void 0
|
|
@@ -8771,10 +8783,10 @@ function Cu(n) {
|
|
|
8771
8783
|
const E = Y(() => L.value.findIndex((k) => k.id === M)), I = Y(() => t.value + h.value.length * 2 - E.value * 2);
|
|
8772
8784
|
return {
|
|
8773
8785
|
layoutItemStyles: Y(() => {
|
|
8774
|
-
const k = y.value === "left" || y.value === "right", T = y.value === "right", z = y.value === "bottom",
|
|
8786
|
+
const k = y.value === "left" || y.value === "right", T = y.value === "right", z = y.value === "bottom", D = g.value ?? p.value, oe = D === 0 ? "%" : "px", U = {
|
|
8775
8787
|
[y.value]: 0,
|
|
8776
8788
|
zIndex: I.value,
|
|
8777
|
-
transform: `translate${k ? "X" : "Y"}(${(x.value ? 0 : -(
|
|
8789
|
+
transform: `translate${k ? "X" : "Y"}(${(x.value ? 0 : -(D === 0 ? 100 : D)) * (T || z ? -1 : 1)}${oe})`,
|
|
8778
8790
|
...m.value ? void 0 : { transition: "none" }
|
|
8779
8791
|
};
|
|
8780
8792
|
if (!S.value) return U;
|
|
@@ -8917,7 +8929,7 @@ var Pu = /* @__PURE__ */ Se({
|
|
|
8917
8929
|
}
|
|
8918
8930
|
return (f, _) => pt((j(), J("div", {
|
|
8919
8931
|
style: $e(F(o)(e.value, "drawboard").toCssStyle()),
|
|
8920
|
-
class:
|
|
8932
|
+
class: Ne(["m-frame", [
|
|
8921
8933
|
n.outline && "m-frame--outline",
|
|
8922
8934
|
F(s)?.equal(e.value) && "m-frame--hover",
|
|
8923
8935
|
F(i).some((L) => L.equal(e.value)) && "m-frame--selected",
|
|
@@ -9064,7 +9076,7 @@ var Pu = /* @__PURE__ */ Se({
|
|
|
9064
9076
|
key: 0,
|
|
9065
9077
|
class: "m-hover-line",
|
|
9066
9078
|
style: { overflow: "visible" }
|
|
9067
|
-
}, Fu = ["d", "transform"],
|
|
9079
|
+
}, Fu = ["d", "transform"], Du = ["data-name"], Nu = /* @__PURE__ */ Se({
|
|
9068
9080
|
__name: "Hover",
|
|
9069
9081
|
setup(n) {
|
|
9070
9082
|
const { selection: e, hoverElement: t, getObb: o, camera: s } = qe();
|
|
@@ -9094,9 +9106,9 @@ var Pu = /* @__PURE__ */ Se({
|
|
|
9094
9106
|
borderRadius: `${(F(t)?.style?.borderRadius ?? 0) * F(s).zoom.x}px`,
|
|
9095
9107
|
...l.value.toCssStyle()
|
|
9096
9108
|
})
|
|
9097
|
-
}, null, 12,
|
|
9109
|
+
}, null, 12, Du)) : _e("", !0);
|
|
9098
9110
|
}
|
|
9099
|
-
}), Bu =
|
|
9111
|
+
}), Bu = Nu, qu = Pe(() => ({
|
|
9100
9112
|
name: "mce:hover",
|
|
9101
9113
|
components: [{
|
|
9102
9114
|
type: "overlay",
|
|
@@ -9328,7 +9340,7 @@ var Pu = /* @__PURE__ */ Se({
|
|
|
9328
9340
|
} });
|
|
9329
9341
|
}
|
|
9330
9342
|
return (M, P) => (j(), J("div", Gu, [W("div", Wu, [W("button", {
|
|
9331
|
-
class:
|
|
9343
|
+
class: Ne(["m-interactions__preview", { "m-interactions__preview--on": F(i) }]),
|
|
9332
9344
|
type: "button",
|
|
9333
9345
|
onClick: P[0] || (P[0] = (y) => F(o)("togglePreview"))
|
|
9334
9346
|
}, [Me(F(Ue), { icon: F(i) ? "$pause" : "$play" }, null, 8, ["icon"]), mt(" " + be(F(i) ? F(s)("exitPreview") : F(s)("preview")), 1)], 2), W("label", Ku, [pt(W("input", {
|
|
@@ -9450,9 +9462,9 @@ var kd = Pe((n) => {
|
|
|
9450
9462
|
return t(T);
|
|
9451
9463
|
}
|
|
9452
9464
|
function _(T) {
|
|
9453
|
-
const z = l("getVariablesState").collections.find((
|
|
9465
|
+
const z = l("getVariablesState").collections.find((D) => D.variables.some((oe) => oe.id === T));
|
|
9454
9466
|
if (z)
|
|
9455
|
-
return z.variables.find((
|
|
9467
|
+
return z.variables.find((D) => D.id === T)?.valuesByMode?.[z.defaultModeId];
|
|
9456
9468
|
}
|
|
9457
9469
|
function L(T) {
|
|
9458
9470
|
const z = _(T.variableId);
|
|
@@ -9471,19 +9483,19 @@ var kd = Pe((n) => {
|
|
|
9471
9483
|
}
|
|
9472
9484
|
function O(T, z) {
|
|
9473
9485
|
if (T.condition?.variableId && !L(T.condition)) return;
|
|
9474
|
-
const
|
|
9486
|
+
const D = R(f(T.target) ?? z) ?? z;
|
|
9475
9487
|
switch (T.action) {
|
|
9476
9488
|
case "restart":
|
|
9477
|
-
l("playElementAnimation",
|
|
9489
|
+
l("playElementAnimation", D, !0);
|
|
9478
9490
|
break;
|
|
9479
9491
|
case "play":
|
|
9480
|
-
l("playElementAnimation",
|
|
9492
|
+
l("playElementAnimation", D, !1);
|
|
9481
9493
|
break;
|
|
9482
9494
|
case "pause":
|
|
9483
|
-
l("pauseElementAnimation",
|
|
9495
|
+
l("pauseElementAnimation", D);
|
|
9484
9496
|
break;
|
|
9485
9497
|
case "toggle":
|
|
9486
|
-
l("toggleElementAnimation",
|
|
9498
|
+
l("toggleElementAnimation", D);
|
|
9487
9499
|
break;
|
|
9488
9500
|
case "openUrl":
|
|
9489
9501
|
T.url && window.open(T.url, "_blank", "noopener");
|
|
@@ -9514,7 +9526,7 @@ var kd = Pe((n) => {
|
|
|
9514
9526
|
}
|
|
9515
9527
|
}
|
|
9516
9528
|
function S(T, z) {
|
|
9517
|
-
T && h(T).filter((
|
|
9529
|
+
T && h(T).filter((D) => D.trigger === z).filter((D) => !D.condition?.variableId || L(D.condition)).forEach((D) => O(D, T));
|
|
9518
9530
|
}
|
|
9519
9531
|
function A(T) {
|
|
9520
9532
|
c.value && S(R(T.target), "click");
|
|
@@ -9539,8 +9551,8 @@ var kd = Pe((n) => {
|
|
|
9539
9551
|
if (T)
|
|
9540
9552
|
for (const z of p) {
|
|
9541
9553
|
if (g.has(z)) continue;
|
|
9542
|
-
const
|
|
9543
|
-
|
|
9554
|
+
const D = n.getAabb(z, "drawboard");
|
|
9555
|
+
D.left < T.width && D.left + D.width > 0 && D.top < T.height && D.top + D.height > 0 && (g.add(z), S(z, "scrollIntoView"));
|
|
9544
9556
|
}
|
|
9545
9557
|
}
|
|
9546
9558
|
function w(T) {
|
|
@@ -9650,10 +9662,10 @@ var kd = Pe((n) => {
|
|
|
9650
9662
|
icon: { type: Boolean }
|
|
9651
9663
|
},
|
|
9652
9664
|
setup(n) {
|
|
9653
|
-
return (e, t) => (j(), J("div", { class:
|
|
9665
|
+
return (e, t) => (j(), J("div", { class: Ne(["m-btn", {
|
|
9654
9666
|
"m-btn--active": n.active,
|
|
9655
9667
|
"m-btn--icon": n.icon
|
|
9656
|
-
}]) }, [
|
|
9668
|
+
}]) }, [De(e.$slots, "default")], 2));
|
|
9657
9669
|
}
|
|
9658
9670
|
}), Ht = Sd, Cd = ["data-id"], Ed = { class: "m-layer__content" }, Td = { class: "m-layer__prepend" }, Ad = {
|
|
9659
9671
|
key: 0,
|
|
@@ -9692,7 +9704,7 @@ var kd = Pe((n) => {
|
|
|
9692
9704
|
function z() {
|
|
9693
9705
|
f.value = !f.value;
|
|
9694
9706
|
}
|
|
9695
|
-
function
|
|
9707
|
+
function D(Q) {
|
|
9696
9708
|
if (Q.button !== 2) {
|
|
9697
9709
|
if (R.value = !0, Q.shiftKey) {
|
|
9698
9710
|
const $ = [...l.value.filter((ee) => !ee.equal(e.node)), e.node];
|
|
@@ -9745,7 +9757,7 @@ var kd = Pe((n) => {
|
|
|
9745
9757
|
return j(), J(we, null, [W("div", {
|
|
9746
9758
|
ref_key: "dom",
|
|
9747
9759
|
ref: _,
|
|
9748
|
-
class:
|
|
9760
|
+
class: Ne(["m-layer", [
|
|
9749
9761
|
e.root && "m-layer--root",
|
|
9750
9762
|
(n.active || p.value) && "m-layer--active",
|
|
9751
9763
|
p.value && "m-layer--selected",
|
|
@@ -9755,7 +9767,7 @@ var kd = Pe((n) => {
|
|
|
9755
9767
|
]]),
|
|
9756
9768
|
style: $e({ "--indent-padding": `${e.indent * 16}px` }),
|
|
9757
9769
|
"data-id": F(P),
|
|
9758
|
-
onMousedown:
|
|
9770
|
+
onMousedown: D,
|
|
9759
9771
|
onMouseenter: G,
|
|
9760
9772
|
onMouseleave: q,
|
|
9761
9773
|
onContextmenu: K
|
|
@@ -9793,7 +9805,7 @@ var kd = Pe((n) => {
|
|
|
9793
9805
|
autofocus: "",
|
|
9794
9806
|
onBlur: H
|
|
9795
9807
|
}, null, 544)), [[Ln, T.value]]) : _e("", !0), W("div", { style: $e({ visibility: k.value ? "hidden" : void 0 }) }, be(T.value || F(O)), 5)], 32)),
|
|
9796
|
-
W("div", { class:
|
|
9808
|
+
W("div", { class: Ne(["m-layer__action", {
|
|
9797
9809
|
"m-layer__action--hover": I.value,
|
|
9798
9810
|
"m-layer__action--show": I.value || F(r)(e.node) || !F(s)(e.node)
|
|
9799
9811
|
}]) }, [e.root ? (j(), J(we, { key: 0 }, [b.value > 1 ? (j(), Fe(Ht, {
|
|
@@ -9808,14 +9820,14 @@ var kd = Pe((n) => {
|
|
|
9808
9820
|
_: 1
|
|
9809
9821
|
})) : _e("", !0)], 64)) : (j(), J(we, { key: 1 }, [Me(Ht, {
|
|
9810
9822
|
icon: "",
|
|
9811
|
-
class:
|
|
9823
|
+
class: Ne(["m-layer__btn", { "m-layer__btn--show": F(r)(e.node) }]),
|
|
9812
9824
|
onClick: $[3] || ($[3] = Je((te) => F(a)(e.node, !F(r)(e.node)), ["prevent", "stop"]))
|
|
9813
9825
|
}, {
|
|
9814
9826
|
default: Te(() => [Me(F(Ue), { icon: F(r)(e.node) ? "$lock" : "$unlock" }, null, 8, ["icon"])]),
|
|
9815
9827
|
_: 1
|
|
9816
9828
|
}, 8, ["class"]), Me(Ht, {
|
|
9817
9829
|
icon: "",
|
|
9818
|
-
class:
|
|
9830
|
+
class: Ne(["m-layer__btn", { "m-layer__btn--show": !F(s)(e.node) }]),
|
|
9819
9831
|
onClick: $[4] || ($[4] = Je((te) => F(i)(e.node, !F(s)(e.node)), ["prevent", "stop"]))
|
|
9820
9832
|
}, {
|
|
9821
9833
|
default: Te(() => [Me(F(Ue), { icon: F(s)(e.node) ? "$visible" : "$unvisible" }, null, 8, ["icon"])]),
|
|
@@ -9881,16 +9893,16 @@ var kd = Pe((n) => {
|
|
|
9881
9893
|
href: "https://github.com/qq15725/mce",
|
|
9882
9894
|
target: "_blank"
|
|
9883
9895
|
};
|
|
9884
|
-
function
|
|
9896
|
+
function Dd(n, e) {
|
|
9885
9897
|
return j(), J("a", Fd, [...e[0] || (e[0] = [W("div", null, "MADE WITH", -1), W("div", null, "MCE", -1)])]);
|
|
9886
9898
|
}
|
|
9887
|
-
var
|
|
9899
|
+
var Nd = /* @__PURE__ */ oo(Vd, [["render", Dd]]), Bd = Pe((n) => {
|
|
9888
9900
|
const { registerConfig: e } = n, t = e("ui.madeWith", { default: { visible: !1 } });
|
|
9889
9901
|
return {
|
|
9890
9902
|
name: "mce:madeWith",
|
|
9891
9903
|
components: [{
|
|
9892
9904
|
type: "overlay",
|
|
9893
|
-
component:
|
|
9905
|
+
component: Nd,
|
|
9894
9906
|
visible: Y({
|
|
9895
9907
|
get: () => t.value.visible,
|
|
9896
9908
|
set: (o) => t.value.visible = o
|
|
@@ -9983,10 +9995,10 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
9983
9995
|
target: c,
|
|
9984
9996
|
contentEl: d,
|
|
9985
9997
|
updateLocation: f
|
|
9986
|
-
}), (S, A) => (j(), J(we, null, [
|
|
9998
|
+
}), (S, A) => (j(), J(we, null, [De(S.$slots, "activator", {
|
|
9987
9999
|
props: O.value,
|
|
9988
10000
|
isActive: r.value
|
|
9989
|
-
}), (j(), Fe(
|
|
10001
|
+
}), (j(), Fe(Do, {
|
|
9990
10002
|
disabled: u.value === !1,
|
|
9991
10003
|
to: typeof u.value == "boolean" ? void 0 : u.value
|
|
9992
10004
|
}, [r.value ? (j(), J("div", ht({
|
|
@@ -9996,8 +10008,8 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
9996
10008
|
}, S.$attrs), [W("div", {
|
|
9997
10009
|
ref: "contentElTpl",
|
|
9998
10010
|
style: $e(L.value),
|
|
9999
|
-
class:
|
|
10000
|
-
}, [
|
|
10011
|
+
class: Ne(["m-overlay-content", o.contentClass])
|
|
10012
|
+
}, [De(S.$slots, "default")], 6)], 16)) : _e("", !0)], 8, ["disabled", "to"]))], 64));
|
|
10001
10013
|
}
|
|
10002
10014
|
}), io = Xd, Yd = ["onMouseenter"], Gd = ["onClick"], Wd = {
|
|
10003
10015
|
key: 0,
|
|
@@ -10072,7 +10084,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
10072
10084
|
class: "m-menu",
|
|
10073
10085
|
"onClick:outside": f
|
|
10074
10086
|
}, {
|
|
10075
|
-
activator: Te((P) => [
|
|
10087
|
+
activator: Te((P) => [De(S.$slots, "activator", ht(P, { props: {
|
|
10076
10088
|
...P.props,
|
|
10077
10089
|
...m.value
|
|
10078
10090
|
} }))]),
|
|
@@ -10092,17 +10104,17 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
10092
10104
|
class: "m-list__item",
|
|
10093
10105
|
onMouseenter: (p) => O(P, y)
|
|
10094
10106
|
}, [W("div", {
|
|
10095
|
-
class:
|
|
10107
|
+
class: Ne(["m-list-item", [P.disabled && "m-list-item--disabled", r.value === y && "m-list-item--opened"]]),
|
|
10096
10108
|
onClick: (p) => L(P, y, p)
|
|
10097
10109
|
}, [
|
|
10098
10110
|
c.value ? (j(), J("div", Wd, [P.checked ? (j(), Fe(F(Ue), {
|
|
10099
10111
|
key: 0,
|
|
10100
10112
|
icon: "$check"
|
|
10101
10113
|
})) : _e("", !0)])) : _e("", !0),
|
|
10102
|
-
S.$slots.prepend ? (j(), J("div", Kd, [
|
|
10103
|
-
W("div", Zd, [
|
|
10104
|
-
S.$slots.kbd ? (j(), J("div", Jd, [
|
|
10105
|
-
P.children?.length || S.$slots.append ? (j(), J("div", Qd, [
|
|
10114
|
+
S.$slots.prepend ? (j(), J("div", Kd, [De(S.$slots, "prepend", { item: P })])) : _e("", !0),
|
|
10115
|
+
W("div", Zd, [De(S.$slots, "title", { item: P }, () => [mt(be(P.key), 1)])]),
|
|
10116
|
+
S.$slots.kbd ? (j(), J("div", Jd, [De(S.$slots, "kbd", { item: P })])) : _e("", !0),
|
|
10117
|
+
P.children?.length || S.$slots.append ? (j(), J("div", Qd, [De(S.$slots, "append", { item: P }), P.children?.length ? (j(), Fe(F(Ue), {
|
|
10106
10118
|
key: 0,
|
|
10107
10119
|
icon: "$arrowRight"
|
|
10108
10120
|
})) : _e("", !0)])) : _e("", !0)
|
|
@@ -10117,25 +10129,25 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
10117
10129
|
offset: 16,
|
|
10118
10130
|
"onUpdate:modelValue": A[0] || (A[0] = (P) => r.value = -1),
|
|
10119
10131
|
"onClick:item": A[1] || (A[1] = (P, y) => s("click:item", P, y))
|
|
10120
|
-
},
|
|
10132
|
+
}, No({ _: 2 }, [
|
|
10121
10133
|
S.$slots.title ? {
|
|
10122
10134
|
name: "title",
|
|
10123
|
-
fn: Te((P) => [
|
|
10135
|
+
fn: Te((P) => [De(S.$slots, "title", gt(yt(P)))]),
|
|
10124
10136
|
key: "0"
|
|
10125
10137
|
} : void 0,
|
|
10126
10138
|
S.$slots.kbd ? {
|
|
10127
10139
|
name: "kbd",
|
|
10128
|
-
fn: Te((P) => [
|
|
10140
|
+
fn: Te((P) => [De(S.$slots, "kbd", gt(yt(P)))]),
|
|
10129
10141
|
key: "1"
|
|
10130
10142
|
} : void 0,
|
|
10131
10143
|
S.$slots.prepend ? {
|
|
10132
10144
|
name: "prepend",
|
|
10133
|
-
fn: Te((P) => [
|
|
10145
|
+
fn: Te((P) => [De(S.$slots, "prepend", gt(yt(P)))]),
|
|
10134
10146
|
key: "2"
|
|
10135
10147
|
} : void 0,
|
|
10136
10148
|
S.$slots.append ? {
|
|
10137
10149
|
name: "append",
|
|
10138
|
-
fn: Te((P) => [
|
|
10150
|
+
fn: Te((P) => [De(S.$slots, "append", gt(yt(P)))]),
|
|
10139
10151
|
key: "3"
|
|
10140
10152
|
} : void 0
|
|
10141
10153
|
]), 1032, [
|
|
@@ -10462,7 +10474,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
10462
10474
|
}, {
|
|
10463
10475
|
key: "toggleSelectionLock",
|
|
10464
10476
|
disabled: !_.value
|
|
10465
|
-
}]),
|
|
10477
|
+
}]), D = Y(() => ({
|
|
10466
10478
|
key: "object",
|
|
10467
10479
|
children: [
|
|
10468
10480
|
...I.value,
|
|
@@ -10519,7 +10531,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
10519
10531
|
O.value,
|
|
10520
10532
|
p.value,
|
|
10521
10533
|
E.value,
|
|
10522
|
-
|
|
10534
|
+
D.value,
|
|
10523
10535
|
U.value
|
|
10524
10536
|
]), q = Y(() => s.value.length > 0 ? r.value ? [...P.value] : s.value.filter(d).length > 0 ? [
|
|
10525
10537
|
...A.value,
|
|
@@ -10775,12 +10787,12 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
10775
10787
|
offset: t.offset,
|
|
10776
10788
|
target: t.target,
|
|
10777
10789
|
attach: t.attach
|
|
10778
|
-
},
|
|
10779
|
-
default: Te(() => [o.value ? (j(), J(we, { key: 0 }, [n.showArrow ? (j(), J("div", dh)) : _e("", !0), W("div", hh, [
|
|
10790
|
+
}, No({
|
|
10791
|
+
default: Te(() => [o.value ? (j(), J(we, { key: 0 }, [n.showArrow ? (j(), J("div", dh)) : _e("", !0), W("div", hh, [De(a.$slots, "default"), a.$slots.kbd ? (j(), J("div", fh, [De(a.$slots, "kbd")])) : _e("", !0)])], 64)) : _e("", !0)]),
|
|
10780
10792
|
_: 2
|
|
10781
10793
|
}, [a.$slots.activator ? {
|
|
10782
10794
|
name: "activator",
|
|
10783
|
-
fn: Te((c) => [
|
|
10795
|
+
fn: Te((c) => [De(a.$slots, "activator", ht(c, { props: {
|
|
10784
10796
|
...c.props,
|
|
10785
10797
|
onMouseenter: () => o.value = !0,
|
|
10786
10798
|
onMouseleave: () => o.value = !1
|
|
@@ -10949,7 +10961,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
10949
10961
|
y: q.clientY
|
|
10950
10962
|
};
|
|
10951
10963
|
}
|
|
10952
|
-
function
|
|
10964
|
+
function D() {
|
|
10953
10965
|
E.value = void 0, i.value = void 0;
|
|
10954
10966
|
}
|
|
10955
10967
|
function oe(q) {
|
|
@@ -10976,7 +10988,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
10976
10988
|
}, F(o), {
|
|
10977
10989
|
onMousedown: T,
|
|
10978
10990
|
onMousemove: K[0] || (K[0] = (H) => z(H, !0)),
|
|
10979
|
-
onMouseleave:
|
|
10991
|
+
onMouseleave: D
|
|
10980
10992
|
}), [W("canvas", {
|
|
10981
10993
|
ref: "canvasTpl",
|
|
10982
10994
|
class: "m-ruler__canvas",
|
|
@@ -10985,7 +10997,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
10985
10997
|
}, null, 8, ph)], 16)), [[F(Uo), F(b)]]),
|
|
10986
10998
|
(j(!0), J(we, null, Ie(I.value, (H, Q) => (j(), J("div", {
|
|
10987
10999
|
key: Q,
|
|
10988
|
-
class:
|
|
11000
|
+
class: Ne(["m-ruler-refline", {
|
|
10989
11001
|
"m-ruler-refline--vertical": t.vertical,
|
|
10990
11002
|
"m-ruler-refline--horizontal": !t.vertical,
|
|
10991
11003
|
"m-ruler-refline--temp": H === E.value,
|
|
@@ -11001,7 +11013,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
11001
11013
|
onDblclick: ($) => oe(Q),
|
|
11002
11014
|
onMousedown: ($) => G($, Q),
|
|
11003
11015
|
onMousemove: ($) => U($, H),
|
|
11004
|
-
onMouseleave:
|
|
11016
|
+
onMouseleave: D
|
|
11005
11017
|
}, null, 46, vh))), 128)),
|
|
11006
11018
|
Me(Ii, {
|
|
11007
11019
|
"model-value": !!i.value,
|
|
@@ -11201,7 +11213,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
11201
11213
|
});
|
|
11202
11214
|
}
|
|
11203
11215
|
return (p, g) => pt((j(), J("div", {
|
|
11204
|
-
class:
|
|
11216
|
+
class: Ne(["m-scrollbar", {
|
|
11205
11217
|
"m-scrollbar--vertical": t.vertical,
|
|
11206
11218
|
"m-scrollbar--horizontal": !t.vertical
|
|
11207
11219
|
}]),
|
|
@@ -11212,7 +11224,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
11212
11224
|
})
|
|
11213
11225
|
}, [W("div", Sh, [W("div", {
|
|
11214
11226
|
ref: "thumbTplRef",
|
|
11215
|
-
class:
|
|
11227
|
+
class: Ne(["m-scrollbar__thumb", { "m-scrollbar__thumb--active": P.value }]),
|
|
11216
11228
|
style: $e({
|
|
11217
11229
|
top: L.value,
|
|
11218
11230
|
bottom: O.value,
|
|
@@ -11326,7 +11338,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
11326
11338
|
"aria-label",
|
|
11327
11339
|
"rx",
|
|
11328
11340
|
"ry"
|
|
11329
|
-
], Fh = ["transform"],
|
|
11341
|
+
], Fh = ["transform"], Dh = { "pointer-events": "all" }, Nh = [
|
|
11330
11342
|
"x",
|
|
11331
11343
|
"y",
|
|
11332
11344
|
"width",
|
|
@@ -11428,13 +11440,13 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
11428
11440
|
};
|
|
11429
11441
|
}
|
|
11430
11442
|
function l() {
|
|
11431
|
-
const b = a(), w = o.scale, E = o.offset, { left: I, top: k, width: T, height: z, rotate:
|
|
11443
|
+
const b = a(), w = o.scale, E = o.offset, { left: I, top: k, width: T, height: z, rotate: D, borderRadius: oe } = b;
|
|
11432
11444
|
return {
|
|
11433
11445
|
left: I * w[0] + E[0],
|
|
11434
11446
|
top: k * w[1] + E[1],
|
|
11435
11447
|
width: T * w[0],
|
|
11436
11448
|
height: z * w[1],
|
|
11437
|
-
rotate:
|
|
11449
|
+
rotate: D,
|
|
11438
11450
|
borderRadius: oe * w[0]
|
|
11439
11451
|
};
|
|
11440
11452
|
}
|
|
@@ -11473,7 +11485,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
11473
11485
|
type: "l",
|
|
11474
11486
|
points: [[0, 0], [0, 1]]
|
|
11475
11487
|
}
|
|
11476
|
-
],
|
|
11488
|
+
], D = [
|
|
11477
11489
|
{
|
|
11478
11490
|
type: "t",
|
|
11479
11491
|
point: [0.5, 0],
|
|
@@ -11523,7 +11535,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
11523
11535
|
width: ae - ee + w,
|
|
11524
11536
|
height: pe - ce + w
|
|
11525
11537
|
};
|
|
11526
|
-
}), U =
|
|
11538
|
+
}), U = D.map(($) => {
|
|
11527
11539
|
const Z = w * ($.width ?? 1), te = w * ($.height ?? 1);
|
|
11528
11540
|
return {
|
|
11529
11541
|
type: $.type,
|
|
@@ -11600,7 +11612,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
11600
11612
|
function S(b, w) {
|
|
11601
11613
|
if (b && b.button !== void 0 && b.button !== 0) return !1;
|
|
11602
11614
|
b?.preventDefault(), b?.stopPropagation();
|
|
11603
|
-
const { left: E, top: I, width: k, height: T, rotate: z, borderRadius:
|
|
11615
|
+
const { left: E, top: I, width: k, height: T, rotate: z, borderRadius: D } = d.value;
|
|
11604
11616
|
let oe = 0;
|
|
11605
11617
|
k && T && (oe = k / T);
|
|
11606
11618
|
const U = w === void 0 ? {
|
|
@@ -11646,7 +11658,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
11646
11658
|
x: 0,
|
|
11647
11659
|
y: 0
|
|
11648
11660
|
}, -z), Xe = -pe.x * ze.x, je = -pe.y * ze.y;
|
|
11649
|
-
ke.borderRadius =
|
|
11661
|
+
ke.borderRadius = D + (Xe < je ? je : Xe);
|
|
11650
11662
|
} else if (ee) {
|
|
11651
11663
|
const ze = y(Ae, ae, -z), Xe = y(te ? {
|
|
11652
11664
|
x: ze.x,
|
|
@@ -11677,7 +11689,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
11677
11689
|
const Xe = p(ze, ge), je = [y(ze, Xe, -z), y(ge, Xe, -z)], [ct, Et] = je[0].x > je[1].x ? [je[1].x, je[0].x] : [je[0].x, je[1].x], [Ye, _t] = je[0].y > je[1].y ? [je[1].y, je[0].y] : [je[0].y, je[1].y];
|
|
11678
11690
|
ke.width = Et - ct, ke.height = _t - Ye, ke.left = ct, ke.top = Ye;
|
|
11679
11691
|
}
|
|
11680
|
-
"width" in ke && (ke.width = Math.max(1, ke.width)), "height" in ke && (ke.height = Math.max(1, ke.height)), (ke.borderRadius ??
|
|
11692
|
+
"width" in ke && (ke.width = Math.max(1, ke.width)), "height" in ke && (ke.height = Math.max(1, ke.height)), (ke.borderRadius ?? D) && (ke.borderRadius = Math.min(Math.max(0, ke.borderRadius ?? D), Math.min((ke.width ?? k) / 2, (ke.height ?? T) / 2)));
|
|
11681
11693
|
const Ee = a(), Le = c({
|
|
11682
11694
|
...d.value,
|
|
11683
11695
|
...ke
|
|
@@ -11767,7 +11779,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
11767
11779
|
}
|
|
11768
11780
|
}
|
|
11769
11781
|
return (b, w) => (j(), Fe(Bo(n.tag), {
|
|
11770
|
-
class:
|
|
11782
|
+
class: Ne(["m-transform", [
|
|
11771
11783
|
!o.ui && "m-transform--ui-hide",
|
|
11772
11784
|
u.value && "m-transform--transforming",
|
|
11773
11785
|
n.resizeStrategy && `m-transform--${n.resizeStrategy}`,
|
|
@@ -11780,7 +11792,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
11780
11792
|
style: $e(O.value)
|
|
11781
11793
|
}, {
|
|
11782
11794
|
default: Te(() => [
|
|
11783
|
-
|
|
11795
|
+
De(b.$slots, "default", {
|
|
11784
11796
|
value: d.value,
|
|
11785
11797
|
props: { onPointerdown: S },
|
|
11786
11798
|
start: S
|
|
@@ -11834,7 +11846,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
11834
11846
|
transform: `matrix(1, 0, 0, 1, -32, ${d.value.height}) rotate(270 16 16)`,
|
|
11835
11847
|
class: "m-transform__rotator"
|
|
11836
11848
|
}, [...w[0] || (w[0] = [W("path", { d: "M22.4789 9.45728L25.9935 12.9942L22.4789 16.5283V14.1032C18.126 14.1502 14.6071 17.6737 14.5675 22.0283H17.05L13.513 25.543L9.97889 22.0283H12.5674C12.6071 16.5691 17.0214 12.1503 22.4789 12.1031L22.4789 9.45728Z" }, null, -1)])], 8, Fh)) : _e("", !0)]),
|
|
11837
|
-
W("g",
|
|
11849
|
+
W("g", Dh, [(j(!0), J(we, null, Ie(m.value, (E, I) => (j(), J("rect", {
|
|
11838
11850
|
key: I,
|
|
11839
11851
|
ref_for: !0,
|
|
11840
11852
|
ref_key: "handlesRef",
|
|
@@ -11847,8 +11859,8 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
11847
11859
|
class: "m-transform__handle-rect",
|
|
11848
11860
|
cursor: u.value ? "auto" : P(E.type),
|
|
11849
11861
|
onPointerdown: (k) => S(k, I)
|
|
11850
|
-
}, null, 40,
|
|
11851
|
-
W("g", Bh, [
|
|
11862
|
+
}, null, 40, Nh))), 128))]),
|
|
11863
|
+
W("g", Bh, [De(b.$slots, "svg", { box: d.value })])
|
|
11852
11864
|
], 4)),
|
|
11853
11865
|
R.value ? (j(), J("div", qh, be(R.value), 1)) : _e("", !0)
|
|
11854
11866
|
]),
|
|
@@ -11896,11 +11908,11 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
11896
11908
|
};
|
|
11897
11909
|
}
|
|
11898
11910
|
function h({ width: w, height: E }) {
|
|
11899
|
-
const { sx: I, sy: k, tx: T, ty: z } = c.value, { scaleX:
|
|
11911
|
+
const { sx: I, sy: k, tx: T, ty: z } = c.value, { scaleX: D = 1, scaleY: oe = 1 } = a.value;
|
|
11900
11912
|
return {
|
|
11901
11913
|
width: I * w,
|
|
11902
11914
|
height: k * E,
|
|
11903
|
-
left: T *
|
|
11915
|
+
left: T * D * (I * w),
|
|
11904
11916
|
top: z * oe * (k * E)
|
|
11905
11917
|
};
|
|
11906
11918
|
}
|
|
@@ -11912,11 +11924,11 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
11912
11924
|
sy: w.height / I,
|
|
11913
11925
|
tx: w.left / w.width / k,
|
|
11914
11926
|
ty: w.top / w.height / T
|
|
11915
|
-
},
|
|
11927
|
+
}, D = -z.tx, oe = -z.ty, U = 1 - 1 / z.sx, G = 1 - 1 / z.sy;
|
|
11916
11928
|
r.value = {
|
|
11917
|
-
left:
|
|
11929
|
+
left: D,
|
|
11918
11930
|
top: oe,
|
|
11919
|
-
right: U -
|
|
11931
|
+
right: U - D,
|
|
11920
11932
|
bottom: G - oe
|
|
11921
11933
|
};
|
|
11922
11934
|
}
|
|
@@ -11978,7 +11990,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
11978
11990
|
}
|
|
11979
11991
|
});
|
|
11980
11992
|
function A(w) {
|
|
11981
|
-
const { sx: E, sy: I } = c.value, { left: k, top: T, right: z, bottom:
|
|
11993
|
+
const { sx: E, sy: I } = c.value, { left: k, top: T, right: z, bottom: D } = r.value, oe = 1 - k - z, U = 1 - T - D, G = k + oe * 0.5, q = T + U * 0.5, K = w, H = w * (I / E), Q = 1 / K, $ = 1 / H, Z = G - Q * 0.5, te = q - $ * 0.5;
|
|
11982
11994
|
r.value = {
|
|
11983
11995
|
left: Z,
|
|
11984
11996
|
top: te,
|
|
@@ -11997,10 +12009,10 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
11997
12009
|
s.value = i, S.stop(), a.value = l, P();
|
|
11998
12010
|
}
|
|
11999
12011
|
function p(w) {
|
|
12000
|
-
const { left: E = 0, top: I = 0 } = a.value, { left: k, top: T, width: z, height:
|
|
12012
|
+
const { left: E = 0, top: I = 0 } = a.value, { left: k, top: T, width: z, height: D } = h(a.value), oe = w === 0 ? z / D : w[0] / w[1];
|
|
12001
12013
|
let U = z, G = z / oe;
|
|
12002
|
-
G >
|
|
12003
|
-
const q = E + k + (z - U) / 2, K = I + T + (
|
|
12014
|
+
G > D && (G = D, U = D * oe);
|
|
12015
|
+
const q = E + k + (z - U) / 2, K = I + T + (D - G) / 2;
|
|
12004
12016
|
a.value = {
|
|
12005
12017
|
...a.value,
|
|
12006
12018
|
width: U,
|
|
@@ -12046,7 +12058,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
12046
12058
|
class: "m-cropper__guide m-cropper__guide--y",
|
|
12047
12059
|
style: $e({ top: `${f.value.y}px` })
|
|
12048
12060
|
}, null, 4)) : _e("", !0),
|
|
12049
|
-
|
|
12061
|
+
De(w.$slots, "default", {
|
|
12050
12062
|
scale: M.value,
|
|
12051
12063
|
setScale: A,
|
|
12052
12064
|
ok: P,
|
|
@@ -12084,7 +12096,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
12084
12096
|
image: o.value.foreground.image,
|
|
12085
12097
|
onEnd: r[2] || (r[2] = () => e.value = void 0)
|
|
12086
12098
|
}, {
|
|
12087
|
-
default: Te((a) => [
|
|
12099
|
+
default: Te((a) => [De(i.$slots, "default", gt(yt(a)))]),
|
|
12088
12100
|
_: 3
|
|
12089
12101
|
}, 8, [
|
|
12090
12102
|
"modelValue",
|
|
@@ -12174,9 +12186,9 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
12174
12186
|
}, T = {
|
|
12175
12187
|
x: p.x - x,
|
|
12176
12188
|
y: p.y - b
|
|
12177
|
-
}, z = s ? Mo(k, T, i) : `M ${k.x} ${k.y} L ${T.x} ${T.y}`,
|
|
12189
|
+
}, z = s ? Mo(k, T, i) : `M ${k.x} ${k.y} L ${T.x} ${T.y}`, D = o.shape.paths ?? [];
|
|
12178
12190
|
o.shape.paths = [{
|
|
12179
|
-
...
|
|
12191
|
+
...D[0] ?? {},
|
|
12180
12192
|
data: z
|
|
12181
12193
|
}];
|
|
12182
12194
|
}
|
|
@@ -12321,7 +12333,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
12321
12333
|
}, X = Tt(1, 0, (Ee - Ye) / te, (Le - _t) / ee);
|
|
12322
12334
|
let v = Tt((Ee - Ye) / te, (Le - _t) / ee, (-Ee - Ye) / te, (-Le - _t) / ee);
|
|
12323
12335
|
!pe && v > 0 && (v -= 2 * Math.PI), pe && v < 0 && (v += 2 * Math.PI);
|
|
12324
|
-
const C = Math.max(1, Math.ceil(Math.abs(v) / (Math.PI / 2))), V = v / C, B = 4 / 3 * Math.tan(V / 4),
|
|
12336
|
+
const C = Math.max(1, Math.ceil(Math.abs(v) / (Math.PI / 2))), V = v / C, B = 4 / 3 * Math.tan(V / 4), N = (ne) => ({
|
|
12325
12337
|
x: Bt + te * fe * Math.cos(ne) - ee * Ce * Math.sin(ne),
|
|
12326
12338
|
y: It + te * Ce * Math.cos(ne) + ee * fe * Math.sin(ne)
|
|
12327
12339
|
}), re = (ne) => ({
|
|
@@ -12330,7 +12342,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
12330
12342
|
}), se = [];
|
|
12331
12343
|
let le = X;
|
|
12332
12344
|
for (let ne = 0; ne < C; ne++) {
|
|
12333
|
-
const me = le + V, ie =
|
|
12345
|
+
const me = le + V, ie = N(le), ue = N(me), xe = re(le), Re = re(me);
|
|
12334
12346
|
se.push([
|
|
12335
12347
|
ie.x + B * xe.x,
|
|
12336
12348
|
ie.y + B * xe.y,
|
|
@@ -12585,7 +12597,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
12585
12597
|
function z() {
|
|
12586
12598
|
s.root.value.stopCapturing?.();
|
|
12587
12599
|
}
|
|
12588
|
-
function
|
|
12600
|
+
function D($, Z, te, ee) {
|
|
12589
12601
|
$.stopPropagation(), $.preventDefault(), ee === "xy" && (L.value = {
|
|
12590
12602
|
pi: Z,
|
|
12591
12603
|
ci: te
|
|
@@ -12786,16 +12798,16 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
12786
12798
|
cx: te.x,
|
|
12787
12799
|
cy: te.y,
|
|
12788
12800
|
r: "4",
|
|
12789
|
-
onPointerdown: (ae) =>
|
|
12801
|
+
onPointerdown: (ae) => D(ae, te.pi, te.ci, te.field)
|
|
12790
12802
|
}, null, 40, af))), 128)),
|
|
12791
12803
|
(j(!0), J(we, null, Ie(x.value, (te, ee) => (j(), J("rect", {
|
|
12792
12804
|
key: `a${ee}`,
|
|
12793
|
-
class:
|
|
12805
|
+
class: Ne(["m-path-editor__anchor", { "m-path-editor__anchor--selected": te.sel }]),
|
|
12794
12806
|
x: te.x - 4,
|
|
12795
12807
|
y: te.y - 4,
|
|
12796
12808
|
width: "8",
|
|
12797
12809
|
height: "8",
|
|
12798
|
-
onPointerdown: (ae) =>
|
|
12810
|
+
onPointerdown: (ae) => D(ae, te.pi, te.ci, "xy"),
|
|
12799
12811
|
onDblclick: Je((ae) => q(te.pi, te.ci), ["stop"])
|
|
12800
12812
|
}, null, 42, lf))), 128))
|
|
12801
12813
|
], 512));
|
|
@@ -12885,7 +12897,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
12885
12897
|
function I(K) {
|
|
12886
12898
|
(i.value === "moving" || i.value === "transforming") && (i.value = void 0), t("selectionTransformEnded", K);
|
|
12887
12899
|
}
|
|
12888
|
-
const k = Y(() => s("getTransform")), T = Y(() => l.value.length === 1 && !!l.value[0].connection?.isValid()), z = Y(() => l.value.length === 1 && !!Kn(l.value[0])),
|
|
12900
|
+
const k = Y(() => s("getTransform")), T = Y(() => l.value.length === 1 && !!l.value[0].connection?.isValid()), z = Y(() => l.value.length === 1 && !!Kn(l.value[0])), D = Y(() => i.value !== "typing" && !R() && !T.value && l.value.every((K) => !_(K) && K.meta.movable !== !1 && K.meta.transformable !== !1)), oe = Y(() => i.value !== "typing" && !R() && !T.value && l.value.every((K) => !_(K) && K.meta.resizable !== !1 && K.meta.transformable !== !1)), U = Y(() => i.value !== "typing" && !R() && !T.value && l.value.every((K) => !_(K) && K.meta.rotatable !== !1 && K.meta.transformable !== !1)), G = Y(() => {
|
|
12889
12901
|
if (i.value !== "typing" && !R() && !T.value && l.value.length === 1) {
|
|
12890
12902
|
const K = l.value[0];
|
|
12891
12903
|
return O.value?.equal(K) && !_(K) && K.foreground.isValid();
|
|
@@ -12927,9 +12939,9 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
12927
12939
|
class: "m-selection__slot",
|
|
12928
12940
|
style: $e(F(d).toCssStyle())
|
|
12929
12941
|
}, [Me(Wh, null, {
|
|
12930
|
-
default: Te((Q) => [
|
|
12942
|
+
default: Te((Q) => [De(K.$slots, "foreground-cropper", gt(yt(Q)))]),
|
|
12931
12943
|
_: 3
|
|
12932
|
-
}),
|
|
12944
|
+
}), De(K.$slots, "default")], 4)) : _e("", !0),
|
|
12933
12945
|
F(i) === "pathEditing" && F(l).length === 1 ? (j(), Fe(uf, {
|
|
12934
12946
|
key: 3,
|
|
12935
12947
|
element: F(l)[0],
|
|
@@ -12956,7 +12968,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
12956
12968
|
ref: "transformTpl"
|
|
12957
12969
|
}, P.value, {
|
|
12958
12970
|
"model-value": k.value,
|
|
12959
|
-
movable:
|
|
12971
|
+
movable: D.value,
|
|
12960
12972
|
resizable: oe.value,
|
|
12961
12973
|
rotatable: U.value,
|
|
12962
12974
|
roundable: G.value,
|
|
@@ -12969,9 +12981,9 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
12969
12981
|
onStart: w,
|
|
12970
12982
|
onMove: E,
|
|
12971
12983
|
onEnd: I
|
|
12972
|
-
}),
|
|
12984
|
+
}), No({ _: 2 }, [K.$slots.transform ? {
|
|
12973
12985
|
name: "svg",
|
|
12974
|
-
fn: Te(() => [
|
|
12986
|
+
fn: Te(() => [De(K.$slots, "transform")]),
|
|
12975
12987
|
key: "0"
|
|
12976
12988
|
} : void 0]), 1040, [
|
|
12977
12989
|
"model-value",
|
|
@@ -13241,7 +13253,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
13241
13253
|
} });
|
|
13242
13254
|
function i(r) {
|
|
13243
13255
|
return (a) => {
|
|
13244
|
-
const l = e(
|
|
13256
|
+
const l = e(Nr(r, "#d9d9d9"), {
|
|
13245
13257
|
position: a,
|
|
13246
13258
|
active: !0
|
|
13247
13259
|
});
|
|
@@ -13374,10 +13386,10 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
13374
13386
|
}
|
|
13375
13387
|
return Be(t, (a) => {
|
|
13376
13388
|
a ? window.addEventListener("keydown", r, !0) : window.removeEventListener("keydown", r, !0);
|
|
13377
|
-
}, { immediate: !0 }), Qe(() => window.removeEventListener("keydown", r, !0)), (a, l) => (j(), J(we, null, [
|
|
13389
|
+
}, { immediate: !0 }), Qe(() => window.removeEventListener("keydown", r, !0)), (a, l) => (j(), J(we, null, [De(a.$slots, "activator", {
|
|
13378
13390
|
props: { onClick: () => t.value = !0 },
|
|
13379
13391
|
isActive: t.value
|
|
13380
|
-
}), (j(), Fe(
|
|
13392
|
+
}), (j(), Fe(Do, {
|
|
13381
13393
|
disabled: s.value === !1,
|
|
13382
13394
|
to: typeof s.value == "boolean" ? void 0 : s.value
|
|
13383
13395
|
}, [Me(Hi, { name: "m-dialog" }, {
|
|
@@ -13395,7 +13407,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
13395
13407
|
style: $e({ width: n.width }),
|
|
13396
13408
|
onPointerdown: l[0] || (l[0] = Je(() => {
|
|
13397
13409
|
}, ["stop"]))
|
|
13398
|
-
}, [
|
|
13410
|
+
}, [De(a.$slots, "default")], 36)], 32)) : _e("", !0)]),
|
|
13399
13411
|
_: 3
|
|
13400
13412
|
})], 8, ["disabled", "to"]))], 64));
|
|
13401
13413
|
}
|
|
@@ -13631,7 +13643,7 @@ var Dd = /* @__PURE__ */ oo(Vd, [["render", Nd]]), Bd = Pe((n) => {
|
|
|
13631
13643
|
const { state: e } = qe();
|
|
13632
13644
|
return (t, o) => F(e) === "transforming" || F(e) === "moving" ? (j(), J("div", zf, [(j(!0), J(we, null, Ie(n.snapLines, (s, i) => (j(), J("div", {
|
|
13633
13645
|
key: i,
|
|
13634
|
-
class:
|
|
13646
|
+
class: Ne(s.class.map((r) => `m-smart-guides__${r}`)),
|
|
13635
13647
|
style: $e({
|
|
13636
13648
|
left: `${s.style.left}px`,
|
|
13637
13649
|
top: `${s.style.top}px`,
|
|
@@ -13650,7 +13662,7 @@ function po(n, e) {
|
|
|
13650
13662
|
function hn(n) {
|
|
13651
13663
|
return typeof n > "u";
|
|
13652
13664
|
}
|
|
13653
|
-
var
|
|
13665
|
+
var Df = class $i {
|
|
13654
13666
|
firstNode = null;
|
|
13655
13667
|
lastNode = null;
|
|
13656
13668
|
nElements = 0;
|
|
@@ -13772,10 +13784,10 @@ var Nf = class $i {
|
|
|
13772
13784
|
next: null
|
|
13773
13785
|
};
|
|
13774
13786
|
}
|
|
13775
|
-
},
|
|
13787
|
+
}, Nf = class {
|
|
13776
13788
|
list;
|
|
13777
13789
|
constructor() {
|
|
13778
|
-
this.list = new
|
|
13790
|
+
this.list = new Df();
|
|
13779
13791
|
}
|
|
13780
13792
|
enqueue(n) {
|
|
13781
13793
|
return this.list.add(n);
|
|
@@ -13908,7 +13920,7 @@ var Nf = class $i {
|
|
|
13908
13920
|
n === null || t.stop || (this.outorderTraversalAux(n.rightCh, e, t), !t.stop && (t.stop = e(n.element) === !1, !t.stop && this.outorderTraversalAux(n.leftCh, e, t)));
|
|
13909
13921
|
}
|
|
13910
13922
|
levelTraversalAux(n, e) {
|
|
13911
|
-
const t = new
|
|
13923
|
+
const t = new Nf();
|
|
13912
13924
|
for (n !== null && t.enqueue(n), n = t.dequeue() || null; n != null; ) {
|
|
13913
13925
|
if (e(n.element) === !1) return;
|
|
13914
13926
|
n.leftCh !== null && t.enqueue(n.leftCh), n.rightCh !== null && t.enqueue(n.rightCh), n = t.dequeue() || null;
|
|
@@ -14091,17 +14103,17 @@ var jf = Pe((n) => {
|
|
|
14091
14103
|
if (x) {
|
|
14092
14104
|
const b = new Set(s.value.map((z) => z.instanceId)), w = h.value.children.filter((z) => !b.has(z.instanceId) && t(z) && !z.connection?.isValid() && c.value.overlap(z.globalAabb)).map((z) => f(z)).filter(Boolean), E = _();
|
|
14093
14105
|
E && w.push(E);
|
|
14094
|
-
const { vLines: I, hLines: k } = w.reduce((z,
|
|
14095
|
-
|
|
14096
|
-
|
|
14097
|
-
|
|
14106
|
+
const { vLines: I, hLines: k } = w.reduce((z, D) => ([
|
|
14107
|
+
D.vt,
|
|
14108
|
+
D.vm,
|
|
14109
|
+
D.vb
|
|
14098
14110
|
].forEach((oe) => z.vLines.add(oe)), [
|
|
14099
|
-
|
|
14100
|
-
|
|
14101
|
-
|
|
14111
|
+
D.hl,
|
|
14112
|
+
D.hm,
|
|
14113
|
+
D.hr
|
|
14102
14114
|
].forEach((oe) => z.hLines.add(oe)), z), {
|
|
14103
|
-
vLines: new Cs((z,
|
|
14104
|
-
hLines: new Cs((z,
|
|
14115
|
+
vLines: new Cs((z, D) => z.pos - D.pos),
|
|
14116
|
+
hLines: new Cs((z, D) => z.pos - D.pos)
|
|
14105
14117
|
}), T = {
|
|
14106
14118
|
vt: [],
|
|
14107
14119
|
vb: [],
|
|
@@ -14122,9 +14134,9 @@ var jf = Pe((n) => {
|
|
|
14122
14134
|
x.hr
|
|
14123
14135
|
],
|
|
14124
14136
|
targets: k
|
|
14125
|
-
}].forEach(({ targets: z, sources:
|
|
14137
|
+
}].forEach(({ targets: z, sources: D }) => {
|
|
14126
14138
|
const oe = [];
|
|
14127
|
-
for (const U of
|
|
14139
|
+
for (const U of D) {
|
|
14128
14140
|
const G = z.searchClosest(U, (K, H, Q) => !Q || Math.abs(K.pos - H.pos) < Math.abs(K.pos - Q.pos));
|
|
14129
14141
|
if (!G) continue;
|
|
14130
14142
|
const q = Math.abs(G.pos - U.pos);
|
|
@@ -14142,16 +14154,16 @@ var jf = Pe((n) => {
|
|
|
14142
14154
|
}, {
|
|
14143
14155
|
sources: [x.hl, x.hr],
|
|
14144
14156
|
targets: k
|
|
14145
|
-
}].forEach(({ sources: z, targets:
|
|
14146
|
-
for (const oe of z) T[oe.type] = O(
|
|
14147
|
-
}), T.vt = T.vt.sort((z,
|
|
14157
|
+
}].forEach(({ sources: z, targets: D }) => {
|
|
14158
|
+
for (const oe of z) T[oe.type] = O(D, oe);
|
|
14159
|
+
}), T.vt = T.vt.sort((z, D) => D.pos - z.pos), T.hl = T.hl.sort((z, D) => D.pos - z.pos), (g ? [] : [{
|
|
14148
14160
|
targets: [T.vt, T.vb],
|
|
14149
14161
|
sources: [x.vt, x.vb]
|
|
14150
14162
|
}, {
|
|
14151
14163
|
targets: [T.hl, T.hr],
|
|
14152
14164
|
sources: [x.hl, x.hr]
|
|
14153
|
-
}]).forEach(({ sources: z, targets:
|
|
14154
|
-
const oe =
|
|
14165
|
+
}]).forEach(({ sources: z, targets: D }) => {
|
|
14166
|
+
const oe = D[0][0], U = z[0], G = D[1][0], q = z[1];
|
|
14155
14167
|
if (oe && G && (!L(oe) || !L(G))) {
|
|
14156
14168
|
const K = Math.abs(U.pos - oe.pos), H = Math.abs(q.pos - G.pos);
|
|
14157
14169
|
if (Math.abs(K - H) < u.value) {
|
|
@@ -14175,15 +14187,15 @@ var jf = Pe((n) => {
|
|
|
14175
14187
|
}
|
|
14176
14188
|
}
|
|
14177
14189
|
for (const K in z) {
|
|
14178
|
-
const H = R(
|
|
14190
|
+
const H = R(D[K], z[K]);
|
|
14179
14191
|
if (H.length) {
|
|
14180
14192
|
p.push(...H);
|
|
14181
14193
|
break;
|
|
14182
14194
|
}
|
|
14183
14195
|
}
|
|
14184
14196
|
}), !g) {
|
|
14185
|
-
const z = (U) => U === "vt" || U === "vm" || U === "vb",
|
|
14186
|
-
for (const U of qf(x, w)) (z(U.target.type) ? !
|
|
14197
|
+
const z = (U) => U === "vt" || U === "vm" || U === "vb", D = p.some((U) => z(U.target.type)), oe = p.some((U) => !z(U.target.type));
|
|
14198
|
+
for (const U of qf(x, w)) (z(U.target.type) ? !D : !oe) && p.push(U);
|
|
14187
14199
|
}
|
|
14188
14200
|
}
|
|
14189
14201
|
S.value = p;
|
|
@@ -14195,12 +14207,12 @@ var jf = Pe((n) => {
|
|
|
14195
14207
|
"vt",
|
|
14196
14208
|
"vm",
|
|
14197
14209
|
"vb"
|
|
14198
|
-
].includes(w.type),
|
|
14210
|
+
].includes(w.type), D = {}, oe = [];
|
|
14199
14211
|
switch (I) {
|
|
14200
14212
|
case "alignment":
|
|
14201
|
-
if (
|
|
14213
|
+
if (D.class = ["alignment"], z) {
|
|
14202
14214
|
const U = Math.min(k.hl.pos, T.hl.pos), G = Math.max(k.hr.pos, T.hr.pos);
|
|
14203
|
-
|
|
14215
|
+
D.style = {
|
|
14204
14216
|
left: g(U) - p.left,
|
|
14205
14217
|
top: x(w.pos) - p.top,
|
|
14206
14218
|
width: g(G - U),
|
|
@@ -14208,7 +14220,7 @@ var jf = Pe((n) => {
|
|
|
14208
14220
|
};
|
|
14209
14221
|
} else {
|
|
14210
14222
|
const U = Math.min(T.vt.pos, k.vt.pos), G = Math.max(T.vb.pos, k.vb.pos);
|
|
14211
|
-
|
|
14223
|
+
D.style = {
|
|
14212
14224
|
left: g(w.pos) - p.left,
|
|
14213
14225
|
top: x(U) - p.top,
|
|
14214
14226
|
width: 1,
|
|
@@ -14217,11 +14229,11 @@ var jf = Pe((n) => {
|
|
|
14217
14229
|
}
|
|
14218
14230
|
break;
|
|
14219
14231
|
case "area": {
|
|
14220
|
-
|
|
14232
|
+
D.class = ["area"], z && D.class.push("area--vertical");
|
|
14221
14233
|
const U = L(w) || L(E);
|
|
14222
14234
|
if (z) {
|
|
14223
14235
|
const G = Math.min(E.pos, w.pos), q = U ? Math.max(k.hl.pos, T.hl.pos) : Math.min(k.hl.pos, T.hl.pos), K = U ? Math.min(k.hr.pos, T.hr.pos) : Math.max(k.hr.pos, T.hr.pos);
|
|
14224
|
-
|
|
14236
|
+
D.style = {
|
|
14225
14237
|
left: g(q) - p.left,
|
|
14226
14238
|
top: x(G) - p.top,
|
|
14227
14239
|
width: g(K - q),
|
|
@@ -14229,21 +14241,21 @@ var jf = Pe((n) => {
|
|
|
14229
14241
|
};
|
|
14230
14242
|
} else {
|
|
14231
14243
|
const G = Math.min(E.pos, w.pos), q = U ? Math.max(T.vt.pos, k.vt.pos) : Math.min(T.vt.pos, k.vt.pos), K = U ? Math.min(T.vb.pos, k.vb.pos) : Math.max(T.vb.pos, k.vb.pos);
|
|
14232
|
-
|
|
14244
|
+
D.style = {
|
|
14233
14245
|
left: g(G) - p.left,
|
|
14234
14246
|
top: x(q) - p.top,
|
|
14235
14247
|
width: g(b.distance),
|
|
14236
14248
|
height: x(K - q)
|
|
14237
14249
|
};
|
|
14238
14250
|
}
|
|
14239
|
-
|
|
14251
|
+
D.label = String(Math.round(b.distance));
|
|
14240
14252
|
break;
|
|
14241
14253
|
}
|
|
14242
14254
|
case "distance":
|
|
14243
|
-
if (
|
|
14244
|
-
|
|
14255
|
+
if (D.class = ["distance"], z) {
|
|
14256
|
+
D.class.push("distance--vertical");
|
|
14245
14257
|
const U = Math.min(E.pos, w.pos);
|
|
14246
|
-
|
|
14258
|
+
D.style = {
|
|
14247
14259
|
left: g(k.hm.pos) - p.left,
|
|
14248
14260
|
top: x(U) - p.top,
|
|
14249
14261
|
width: 1,
|
|
@@ -14260,7 +14272,7 @@ var jf = Pe((n) => {
|
|
|
14260
14272
|
}
|
|
14261
14273
|
});
|
|
14262
14274
|
} else {
|
|
14263
|
-
|
|
14275
|
+
D.style = {
|
|
14264
14276
|
left: g(Math.min(E.pos, w.pos)) - p.left,
|
|
14265
14277
|
top: x(k.vm.pos) - p.top,
|
|
14266
14278
|
width: g(b.distance),
|
|
@@ -14277,10 +14289,10 @@ var jf = Pe((n) => {
|
|
|
14277
14289
|
}
|
|
14278
14290
|
});
|
|
14279
14291
|
}
|
|
14280
|
-
|
|
14292
|
+
D.label = String(Math.round(b.distance));
|
|
14281
14293
|
break;
|
|
14282
14294
|
}
|
|
14283
|
-
return [
|
|
14295
|
+
return [D, ...oe];
|
|
14284
14296
|
});
|
|
14285
14297
|
});
|
|
14286
14298
|
function P() {
|
|
@@ -14412,24 +14424,24 @@ var jf = Pe((n) => {
|
|
|
14412
14424
|
for (let I = 0; I < x.length; I++) {
|
|
14413
14425
|
const k = x[I], T = x[I + 1];
|
|
14414
14426
|
if (!T) break;
|
|
14415
|
-
const z = p === "horizontal" ? "y" : "x",
|
|
14427
|
+
const z = p === "horizontal" ? "y" : "x", D = Math.max(k.globalAabb.min[z], T.globalAabb.min[z]), oe = Math.min(k.globalAabb.max[z], T.globalAabb.max[z]);
|
|
14416
14428
|
let U, G;
|
|
14417
14429
|
switch (p) {
|
|
14418
14430
|
case "horizontal":
|
|
14419
14431
|
U = {
|
|
14420
14432
|
x: k.globalAabb.x + k.globalAabb.width,
|
|
14421
|
-
y:
|
|
14433
|
+
y: D
|
|
14422
14434
|
}, G = {
|
|
14423
14435
|
x: g,
|
|
14424
|
-
y: oe -
|
|
14436
|
+
y: oe - D
|
|
14425
14437
|
};
|
|
14426
14438
|
break;
|
|
14427
14439
|
case "vertical":
|
|
14428
14440
|
U = {
|
|
14429
|
-
x:
|
|
14441
|
+
x: D,
|
|
14430
14442
|
y: k.globalAabb.y + k.globalAabb.height
|
|
14431
14443
|
}, G = {
|
|
14432
|
-
x: oe -
|
|
14444
|
+
x: oe - D,
|
|
14433
14445
|
y: g
|
|
14434
14446
|
};
|
|
14435
14447
|
break;
|
|
@@ -14468,7 +14480,7 @@ var jf = Pe((n) => {
|
|
|
14468
14480
|
I && (E.x -= I.left, E.y -= I.top);
|
|
14469
14481
|
const k = {};
|
|
14470
14482
|
k.width = g.width * b, k.height = g.height * w, k.left = E.x - k.width / 2, k.top = E.y - k.height / 2;
|
|
14471
|
-
const { left: T, top: z, right:
|
|
14483
|
+
const { left: T, top: z, right: D, bottom: oe } = p.globalAabb;
|
|
14472
14484
|
a(p, k.width, k.height, l(p, "Frame") ? void 0 : p.shape.isValid() ? { deep: !0 } : {
|
|
14473
14485
|
deep: !0,
|
|
14474
14486
|
textToFit: !0
|
|
@@ -14478,7 +14490,7 @@ var jf = Pe((n) => {
|
|
|
14478
14490
|
const { direction: G, items: q } = U, K = p.globalAabb, H = {
|
|
14479
14491
|
left: K.left - T,
|
|
14480
14492
|
top: K.top - z,
|
|
14481
|
-
right: K.right -
|
|
14493
|
+
right: K.right - D,
|
|
14482
14494
|
bottom: K.bottom - oe
|
|
14483
14495
|
};
|
|
14484
14496
|
let Q = !1;
|
|
@@ -14504,24 +14516,24 @@ var jf = Pe((n) => {
|
|
|
14504
14516
|
const { direction: b } = x;
|
|
14505
14517
|
let w = [], E = Number.MIN_SAFE_INTEGER, I = Number.MAX_SAFE_INTEGER, k, T;
|
|
14506
14518
|
function z() {
|
|
14507
|
-
const
|
|
14508
|
-
if (!
|
|
14519
|
+
const D = S.value;
|
|
14520
|
+
if (!D) return;
|
|
14509
14521
|
const oe = b === "horizontal" ? "left" : "top";
|
|
14510
|
-
w = [...o.value].sort((G, q) => G.equal(g) ?
|
|
14522
|
+
w = [...o.value].sort((G, q) => G.equal(g) ? D[oe] - q.globalAabb[oe] : q.equal(g) ? G.globalAabb[oe] - D[oe] : G.globalAabb[oe] - q.globalAabb[oe]);
|
|
14511
14523
|
const U = w.findIndex((G) => G.equal(g));
|
|
14512
|
-
k = w[U - 1], T = w[U + 1], b === "horizontal" ? (k && (E = k.globalAabb.left +
|
|
14524
|
+
k = w[U - 1], T = w[U + 1], b === "horizontal" ? (k && (E = k.globalAabb.left + D.width), T && (I = T.globalAabb.right - D.width)) : (k && (E = k.globalAabb.top + D.height), T && (I = T.globalAabb.bottom - D.height));
|
|
14513
14525
|
}
|
|
14514
14526
|
Rt(y, {
|
|
14515
14527
|
threshold: 3,
|
|
14516
14528
|
start: () => {
|
|
14517
14529
|
h.value = !0, S.value = g.globalAabb.clone(), z(), i.value = "moving", m.value = "ring";
|
|
14518
14530
|
},
|
|
14519
|
-
move: ({ movePoint:
|
|
14531
|
+
move: ({ movePoint: D, lastPoint: oe }) => {
|
|
14520
14532
|
const U = S.value;
|
|
14521
14533
|
if (!U) return;
|
|
14522
14534
|
const G = {
|
|
14523
|
-
x:
|
|
14524
|
-
y:
|
|
14535
|
+
x: D.x - oe.x,
|
|
14536
|
+
y: D.y - oe.y
|
|
14525
14537
|
}, { zoom: q } = r.value;
|
|
14526
14538
|
g.position.set(g.position.x + G.x / q.x, g.position.y + G.y / q.y);
|
|
14527
14539
|
const K = g.globalAabb.getCenter();
|
|
@@ -14559,9 +14571,9 @@ var jf = Pe((n) => {
|
|
|
14559
14571
|
}
|
|
14560
14572
|
},
|
|
14561
14573
|
end: () => {
|
|
14562
|
-
const
|
|
14563
|
-
if (
|
|
14564
|
-
let oe =
|
|
14574
|
+
const D = S.value;
|
|
14575
|
+
if (D) {
|
|
14576
|
+
let oe = D.x, U = D.y;
|
|
14565
14577
|
const G = g.getParent()?.globalAabb;
|
|
14566
14578
|
G && (oe -= G.x, U -= G.y), g.style.left = oe, g.style.top = U, g.position.x = oe, g.position.y = U, g.updateGlobalTransform();
|
|
14567
14579
|
}
|
|
@@ -14603,7 +14615,7 @@ var jf = Pe((n) => {
|
|
|
14603
14615
|
}
|
|
14604
14616
|
return (y, p) => u.value && !F(d) ? (j(), J("div", {
|
|
14605
14617
|
key: 0,
|
|
14606
|
-
class:
|
|
14618
|
+
class: Ne(["m-smart-selection", {
|
|
14607
14619
|
"m-smart-selection--hover": !F(i) && F(t),
|
|
14608
14620
|
[`m-smart-selection--${u.value.direction}`]: !0,
|
|
14609
14621
|
[`m-smart-selection--${m.value}`]: m.value !== void 0
|
|
@@ -14611,7 +14623,7 @@ var jf = Pe((n) => {
|
|
|
14611
14623
|
}, [
|
|
14612
14624
|
F(i) !== "moving" ? (j(), J(we, { key: 0 }, [(j(!0), J(we, null, Ie(_.value, (g, x) => (j(), J("div", {
|
|
14613
14625
|
key: x,
|
|
14614
|
-
class:
|
|
14626
|
+
class: Ne(["m-smart-selection__node", { "m-smart-selection__node--active": g.el.equal(e.value) }]),
|
|
14615
14627
|
style: $e(g.style)
|
|
14616
14628
|
}, [W("div", {
|
|
14617
14629
|
class: "m-smart-selection__ring",
|
|
@@ -14802,11 +14814,11 @@ var jf = Pe((n) => {
|
|
|
14802
14814
|
"y1",
|
|
14803
14815
|
"x2",
|
|
14804
14816
|
"y2"
|
|
14805
|
-
], Lm = ["d"], zm = ["cx", "cy"], Rm = ["cx", "cy"], Om = ["cx", "cy"], Vm = ["cx", "cy"], Fm = { class: "m-ease__fields" },
|
|
14817
|
+
], Lm = ["d"], zm = ["cx", "cy"], Rm = ["cx", "cy"], Om = ["cx", "cy"], Vm = ["cx", "cy"], Fm = { class: "m-ease__fields" }, Dm = [
|
|
14806
14818
|
"title",
|
|
14807
14819
|
"value",
|
|
14808
14820
|
"onChange"
|
|
14809
|
-
], yo = 200, go = 96, Ts = 8, As = 28,
|
|
14821
|
+
], yo = 200, go = 96, Ts = 8, As = 28, Nm = /* @__PURE__ */ Se({
|
|
14810
14822
|
__name: "EasingCurve",
|
|
14811
14823
|
props: { modelValue: {} },
|
|
14812
14824
|
emits: ["update:modelValue"],
|
|
@@ -14901,14 +14913,14 @@ var jf = Pe((n) => {
|
|
|
14901
14913
|
r: "2.5"
|
|
14902
14914
|
}, null, 8, Rm),
|
|
14903
14915
|
W("circle", {
|
|
14904
|
-
class:
|
|
14916
|
+
class: Ne(["m-ease__handle", { "m-ease__handle--active": a.value === 1 }]),
|
|
14905
14917
|
cx: l(n.modelValue[0]),
|
|
14906
14918
|
cy: c(n.modelValue[1]),
|
|
14907
14919
|
r: "5",
|
|
14908
14920
|
onMousedown: f[0] || (f[0] = (_) => h(_, 1))
|
|
14909
14921
|
}, null, 42, Om),
|
|
14910
14922
|
W("circle", {
|
|
14911
|
-
class:
|
|
14923
|
+
class: Ne(["m-ease__handle", { "m-ease__handle--active": a.value === 2 }]),
|
|
14912
14924
|
cx: l(n.modelValue[2]),
|
|
14913
14925
|
cy: c(n.modelValue[3]),
|
|
14914
14926
|
r: "5",
|
|
@@ -14927,9 +14939,9 @@ var jf = Pe((n) => {
|
|
|
14927
14939
|
title: _,
|
|
14928
14940
|
value: n.modelValue[L],
|
|
14929
14941
|
onChange: (O) => u(L, O.target.value)
|
|
14930
|
-
}, null, 40,
|
|
14942
|
+
}, null, 40, Dm)), 64))])]));
|
|
14931
14943
|
}
|
|
14932
|
-
}), Bm =
|
|
14944
|
+
}), Bm = Nm, qm = {
|
|
14933
14945
|
key: 0,
|
|
14934
14946
|
class: "m-kfpop__body"
|
|
14935
14947
|
}, jm = { class: "m-kfpop__head" }, Um = { class: "m-kfpop__pct" }, Hm = ["placeholder"], Xm = ["title"], Ym = ["value"], Gm = ["value"], Wm = ["title"], Km = ["title"], Zm = { class: "m-kfpop__channels" }, Jm = [
|
|
@@ -15032,7 +15044,7 @@ var jf = Pe((n) => {
|
|
|
15032
15044
|
Q.keyframes = H;
|
|
15033
15045
|
});
|
|
15034
15046
|
}
|
|
15035
|
-
function
|
|
15047
|
+
function D(H, Q) {
|
|
15036
15048
|
!h.value || !Number.isFinite(Q) || z(Sn(u.value, {
|
|
15037
15049
|
offset: d.value,
|
|
15038
15050
|
[H]: Q
|
|
@@ -15116,7 +15128,7 @@ var jf = Pe((n) => {
|
|
|
15116
15128
|
type: "number",
|
|
15117
15129
|
step: $.step,
|
|
15118
15130
|
value: T(h.value[$.key] ?? $.def, $.fixed),
|
|
15119
|
-
onChange: (Z) =>
|
|
15131
|
+
onChange: (Z) => D($.key, K(Z))
|
|
15120
15132
|
}, null, 40, Jm)]))), 128)),
|
|
15121
15133
|
(j(!0), J(we, null, Ie(w.value, ($, Z) => (j(), J("label", {
|
|
15122
15134
|
key: `t${Z}`,
|
|
@@ -15140,7 +15152,7 @@ var jf = Pe((n) => {
|
|
|
15140
15152
|
type: "number",
|
|
15141
15153
|
step: "0.01",
|
|
15142
15154
|
value: T(h.value[$] ?? 0, 2),
|
|
15143
|
-
onChange: (Z) =>
|
|
15155
|
+
onChange: (Z) => D($, K(Z))
|
|
15144
15156
|
}, null, 40, tp)]))), 128))
|
|
15145
15157
|
]),
|
|
15146
15158
|
x.value ? (j(), J("label", np, [Q[5] || (Q[5] = W("span", null, "origin", -1)), W("input", {
|
|
@@ -15298,10 +15310,10 @@ var jf = Pe((n) => {
|
|
|
15298
15310
|
g.duration = Math.max(k, G - E);
|
|
15299
15311
|
}
|
|
15300
15312
|
}
|
|
15301
|
-
function
|
|
15302
|
-
window.removeEventListener("mousemove", z), window.removeEventListener("mouseup",
|
|
15313
|
+
function D() {
|
|
15314
|
+
window.removeEventListener("mousemove", z), window.removeEventListener("mouseup", D), i();
|
|
15303
15315
|
}
|
|
15304
|
-
window.addEventListener("mousemove", z), window.addEventListener("mouseup",
|
|
15316
|
+
window.addEventListener("mousemove", z), window.addEventListener("mouseup", D);
|
|
15305
15317
|
}
|
|
15306
15318
|
function R(p, g) {
|
|
15307
15319
|
O(p, g.anim ?? e.node, g.kind === "animation");
|
|
@@ -15316,7 +15328,7 @@ var jf = Pe((n) => {
|
|
|
15316
15328
|
r.value = [e.node];
|
|
15317
15329
|
const w = S(g), E = w[x];
|
|
15318
15330
|
if (!E) return;
|
|
15319
|
-
const I = p.currentTarget, k = b.duration || e.endTime - b.delay || 1, T = p.clientX, z = E.offset,
|
|
15331
|
+
const I = p.currentTarget, k = b.duration || e.endTime - b.delay || 1, T = p.clientX, z = E.offset, D = 1e-3, oe = x > 0 ? w[x - 1].offset + D : 0, U = x < w.length - 1 ? w[x + 1].offset - D : 1, G = 1e3 / s.value;
|
|
15320
15332
|
let q = !1;
|
|
15321
15333
|
function K(Q) {
|
|
15322
15334
|
Math.abs(Q.clientX - T) > 2 && (q = !0);
|
|
@@ -15374,13 +15386,13 @@ var jf = Pe((n) => {
|
|
|
15374
15386
|
O(p, e.node, !1);
|
|
15375
15387
|
}
|
|
15376
15388
|
return (p, g) => (j(), J("div", {
|
|
15377
|
-
class:
|
|
15389
|
+
class: Ne(["m-segment", [`m-segment--${(n.node.meta.inEditorIs ?? "none").toLowerCase()}`, n.active && "m-segment--active"]]),
|
|
15378
15390
|
style: $e(m.value),
|
|
15379
15391
|
onMousedown: y
|
|
15380
15392
|
}, [
|
|
15381
15393
|
(j(!0), J(we, null, Ie(u.value, (x) => (j(), J("div", {
|
|
15382
15394
|
key: x.id,
|
|
15383
|
-
class:
|
|
15395
|
+
class: Ne(["m-segment__block", [
|
|
15384
15396
|
`m-segment__block--${x.kind}`,
|
|
15385
15397
|
x.kind === "animation" && x.category && `m-segment__block--${x.category}`,
|
|
15386
15398
|
x.kind === "animation" && x.category === "emphasis" && "m-segment__block--strip"
|
|
@@ -15405,7 +15417,7 @@ var jf = Pe((n) => {
|
|
|
15405
15417
|
}), vp = pp, yp = { class: "m-track" }, gp = /* @__PURE__ */ Se({
|
|
15406
15418
|
__name: "Track",
|
|
15407
15419
|
setup(n) {
|
|
15408
|
-
return (e, t) => (j(), J("div", yp, [
|
|
15420
|
+
return (e, t) => (j(), J("div", yp, [De(e.$slots, "default")]));
|
|
15409
15421
|
}
|
|
15410
15422
|
}), xp = gp, bp = ["data-id"], _p = { class: "m-trackhead__thumbnail" }, wp = { key: 1 }, kp = ["title"], Mp = /* @__PURE__ */ Se({
|
|
15411
15423
|
__name: "Trackhead",
|
|
@@ -15456,7 +15468,7 @@ var jf = Pe((n) => {
|
|
|
15456
15468
|
g.key === "Enter" ? O.value?.blur() : g.key === "Escape" && (_.value = !1);
|
|
15457
15469
|
}
|
|
15458
15470
|
return (g, x) => (j(), J("div", {
|
|
15459
|
-
class:
|
|
15471
|
+
class: Ne(["m-trackhead", [m.value && "m-trackhead--selected"]]),
|
|
15460
15472
|
"data-id": n.node.id,
|
|
15461
15473
|
onMousedown: S,
|
|
15462
15474
|
onMouseenter: A,
|
|
@@ -15481,7 +15493,7 @@ var jf = Pe((n) => {
|
|
|
15481
15493
|
onMousedown: x[1] || (x[1] = Je(() => {
|
|
15482
15494
|
}, ["stop"]))
|
|
15483
15495
|
}, null, 544)), [[Ln, L.value]]) : (j(), J("span", wp, be(F(h)), 1))], 32),
|
|
15484
|
-
W("div", { class:
|
|
15496
|
+
W("div", { class: Ne(["m-trackhead__action", { "m-trackhead__action--show": R.value || c.value }]) }, [F(i)(n.node) && F(l).length ? (j(), Fe(ro, {
|
|
15485
15497
|
key: 0,
|
|
15486
15498
|
modelValue: c.value,
|
|
15487
15499
|
"onUpdate:modelValue": x[3] || (x[3] = (b) => c.value = b),
|
|
@@ -15500,7 +15512,7 @@ var jf = Pe((n) => {
|
|
|
15500
15512
|
}, 8, ["modelValue", "items"])) : _e("", !0)], 2)
|
|
15501
15513
|
], 42, bp));
|
|
15502
15514
|
}
|
|
15503
|
-
}), Sp = Mp, Cp = { class: "m-timeline__toolbar" }, Ep = { class: "m-timeline__time" }, Tp = { class: "m-timeline__time--muted" }, Ap = { class: "m-timeline__controls" }, Pp = ["title"], Ip = ["title"], $p = ["title"], Lp = ["title"], zp = ["title"], Rp = ["title"], Op = ["value"], Vp = ["title"], Fp = ["value"],
|
|
15515
|
+
}), Sp = Mp, Cp = { class: "m-timeline__toolbar" }, Ep = { class: "m-timeline__time" }, Tp = { class: "m-timeline__time--muted" }, Ap = { class: "m-timeline__controls" }, Pp = ["title"], Ip = ["title"], $p = ["title"], Lp = ["title"], zp = ["title"], Rp = ["title"], Op = ["value"], Vp = ["title"], Fp = ["value"], Dp = ["title"], Np = ["title"], Bp = { class: "m-timeline__main" }, qp = { class: "m-timeline__left-wrapper" }, jp = { class: "m-timeline__right-wrapper" }, Up = { class: "m-timeline__ruler" }, Hp = { class: "m-timeline__track" }, Xp = /* @__PURE__ */ Se({
|
|
15504
15516
|
__name: "Timeline",
|
|
15505
15517
|
setup(n) {
|
|
15506
15518
|
const e = qe(), { isElement: t, root: o, msPerPx: s, currentTime: i, endTime: r, selection: a, paused: l, fps: c, playbackRate: d, loopMode: u, exec: h, t: m, assets: f, animationPresets: _ } = e, L = [
|
|
@@ -15546,12 +15558,12 @@ var jf = Pe((n) => {
|
|
|
15546
15558
|
function z(U) {
|
|
15547
15559
|
if (U.ctrlKey || U.metaKey) {
|
|
15548
15560
|
U.preventDefault();
|
|
15549
|
-
const G = U.ctrlKey &&
|
|
15561
|
+
const G = U.ctrlKey && Di ? 10 : 1, q = U.deltaY * (U.deltaMode === 1 ? 0.05 : U.deltaMode ? 1 : 2e-3) * G, K = Math.log(s.value) + q;
|
|
15550
15562
|
s.value = Math.exp(K);
|
|
15551
15563
|
} else
|
|
15552
15564
|
U.preventDefault(), A.value = [Math.min(0, A.value[0] - U.deltaX), Math.min(0, A.value[1] - U.deltaY)];
|
|
15553
15565
|
}
|
|
15554
|
-
function
|
|
15566
|
+
function D(U) {
|
|
15555
15567
|
const G = S.value?.box;
|
|
15556
15568
|
if (G) {
|
|
15557
15569
|
i.value = (U.clientX - G.left - A.value[0]) * s.value;
|
|
@@ -15647,7 +15659,7 @@ var jf = Pe((n) => {
|
|
|
15647
15659
|
type: "button",
|
|
15648
15660
|
class: ["m-timeline__btn m-timeline__add-anim", { "m-timeline__add-anim--active": b.value }],
|
|
15649
15661
|
title: F(m)("addAnimation")
|
|
15650
|
-
}, q), [Me(F(Ue), { icon: "$plus" }), W("span", null, be(F(m)("addAnimation")), 1)], 16,
|
|
15662
|
+
}, q), [Me(F(Ue), { icon: "$plus" }), W("span", null, be(F(m)("addAnimation")), 1)], 16, Dp)]),
|
|
15651
15663
|
title: Te(({ item: q }) => [mt(be(F(m)(q.key)), 1)]),
|
|
15652
15664
|
_: 1
|
|
15653
15665
|
}, 8, ["modelValue", "items"])) : _e("", !0),
|
|
@@ -15657,7 +15669,7 @@ var jf = Pe((n) => {
|
|
|
15657
15669
|
type: "button",
|
|
15658
15670
|
title: F(m)("collapse"),
|
|
15659
15671
|
onClick: G[8] || (G[8] = (q) => F(h)("togglePanel", "timeline"))
|
|
15660
|
-
}, [Me(F(Ue), { icon: "$arrowDown" })], 8,
|
|
15672
|
+
}, [Me(F(Ue), { icon: "$arrowDown" })], 8, Np)
|
|
15661
15673
|
]),
|
|
15662
15674
|
W("div", Bp, [W("div", {
|
|
15663
15675
|
class: "m-timeline__left",
|
|
@@ -15668,7 +15680,7 @@ var jf = Pe((n) => {
|
|
|
15668
15680
|
}, null, 8, ["node"]))), 128))], 4)])], 32), W("div", {
|
|
15669
15681
|
class: "m-timeline__right",
|
|
15670
15682
|
onWheel: z,
|
|
15671
|
-
onMousedown:
|
|
15683
|
+
onMousedown: D
|
|
15672
15684
|
}, [W("div", jp, [
|
|
15673
15685
|
W("div", Up, [Me(Oo, {
|
|
15674
15686
|
ref: "rulerTpl",
|
|
@@ -15894,7 +15906,7 @@ var jf = Pe((n) => {
|
|
|
15894
15906
|
return (l, c) => (j(), J("div", Kp, [
|
|
15895
15907
|
(j(), J(we, null, Ie(o, (d) => W("button", {
|
|
15896
15908
|
key: `w${d}`,
|
|
15897
|
-
class:
|
|
15909
|
+
class: Ne(["m-tool-options__width", { "m-tool-options__width--active": F(t).width === d }]),
|
|
15898
15910
|
onClick: (u) => r(d)
|
|
15899
15911
|
}, [W("span", {
|
|
15900
15912
|
class: "m-tool-options__dot",
|
|
@@ -15906,7 +15918,7 @@ var jf = Pe((n) => {
|
|
|
15906
15918
|
c[0] || (c[0] = W("span", { class: "m-tool-options__divider" }, null, -1)),
|
|
15907
15919
|
(j(), J(we, null, Ie(s, (d) => W("button", {
|
|
15908
15920
|
key: d,
|
|
15909
|
-
class:
|
|
15921
|
+
class: Ne(["m-tool-options__color", { "m-tool-options__color--active": F(t).color === d }]),
|
|
15910
15922
|
style: $e({ background: d }),
|
|
15911
15923
|
onClick: (u) => a(d)
|
|
15912
15924
|
}, null, 14, Jp)), 64))
|
|
@@ -15938,8 +15950,8 @@ var jf = Pe((n) => {
|
|
|
15938
15950
|
start: () => {
|
|
15939
15951
|
h.value = !0;
|
|
15940
15952
|
},
|
|
15941
|
-
move: (
|
|
15942
|
-
const oe = l.value, U =
|
|
15953
|
+
move: (D) => {
|
|
15954
|
+
const oe = l.value, U = D.movePoint.x - oe.left, G = D.movePoint.y - oe.top, q = O(U, G), K = q === "left" || q === "right", H = K ? k : I, Q = K ? oe.height : oe.width, $ = Q / 2, Z = K ? G - z : U - T, te = Math.min(Math.max(Z, H + 8), Q - H - 8);
|
|
15943
15955
|
m.value = {
|
|
15944
15956
|
placement: q,
|
|
15945
15957
|
offset: Math.abs(te - $) < ov ? void 0 : te
|
|
@@ -16043,12 +16055,12 @@ var jf = Pe((n) => {
|
|
|
16043
16055
|
...x.value.filter((w) => w.placement === "after")
|
|
16044
16056
|
]);
|
|
16045
16057
|
return (w, E) => (j(), J("div", {
|
|
16046
|
-
class:
|
|
16058
|
+
class: Ne(["m-toolbelt", [`m-toolbelt--${f.value}`, { "m-toolbelt--dragging": h.value }]]),
|
|
16047
16059
|
style: $e(L.value)
|
|
16048
16060
|
}, [
|
|
16049
16061
|
y.value ? (j(), Fe(ev, {
|
|
16050
16062
|
key: 0,
|
|
16051
|
-
class:
|
|
16063
|
+
class: Ne(["m-toolbelt__options", `m-toolbelt__options--${f.value}`])
|
|
16052
16064
|
}, null, 8, ["class"])) : _e("", !0),
|
|
16053
16065
|
W("div", {
|
|
16054
16066
|
class: "m-toolbelt__grip",
|
|
@@ -16188,11 +16200,11 @@ var jf = Pe((n) => {
|
|
|
16188
16200
|
x: w.left,
|
|
16189
16201
|
y: w.top
|
|
16190
16202
|
});
|
|
16191
|
-
const
|
|
16203
|
+
const D = {
|
|
16192
16204
|
x: (p?.clientX ?? 0) - (z.event?.clientX ?? 0),
|
|
16193
16205
|
y: (p?.clientY ?? 0) - (z.event?.clientY ?? 0)
|
|
16194
16206
|
};
|
|
16195
|
-
Math.abs(
|
|
16207
|
+
Math.abs(D.x) > Math.abs(D.y) ? E.top = z.startPoint.y : E.left = z.startPoint.x;
|
|
16196
16208
|
}
|
|
16197
16209
|
E.rotate || d(E);
|
|
16198
16210
|
} else M === "resize" && !E.rotate && !k && u(E, x);
|
|
@@ -16205,13 +16217,13 @@ var jf = Pe((n) => {
|
|
|
16205
16217
|
borderRadius: E.borderRadius - w.borderRadius
|
|
16206
16218
|
};
|
|
16207
16219
|
k && M === "rotate" && (T.rotate = E.rotate - b.batchRotate, b.batchRotate += T.rotate), I.forEach((z) => {
|
|
16208
|
-
const
|
|
16209
|
-
left:
|
|
16210
|
-
top:
|
|
16211
|
-
width:
|
|
16212
|
-
height:
|
|
16213
|
-
rotate: (
|
|
16214
|
-
borderRadius: Math.round(
|
|
16220
|
+
const D = z.style, oe = {
|
|
16221
|
+
left: D.left + T.left,
|
|
16222
|
+
top: D.top + T.top,
|
|
16223
|
+
width: D.width + T.width,
|
|
16224
|
+
height: D.height + T.height,
|
|
16225
|
+
rotate: (D.rotate + T.rotate + 360) % 360,
|
|
16226
|
+
borderRadius: Math.round(D.borderRadius + T.borderRadius)
|
|
16215
16227
|
};
|
|
16216
16228
|
if (M === "rotate") {
|
|
16217
16229
|
if (k) {
|
|
@@ -16251,7 +16263,7 @@ var jf = Pe((n) => {
|
|
|
16251
16263
|
textToFit: !0
|
|
16252
16264
|
}), oe.width = z.style.width, oe.height = z.style.height;
|
|
16253
16265
|
}
|
|
16254
|
-
Object.assign(
|
|
16266
|
+
Object.assign(D, oe);
|
|
16255
16267
|
});
|
|
16256
16268
|
}, R = (M, P = 1) => {
|
|
16257
16269
|
let y;
|
|
@@ -16457,10 +16469,10 @@ var jf = Pe((n) => {
|
|
|
16457
16469
|
}, null, 544)], 4)], 4)), [[zs, F(t)[0] && F(o) === "typing"]]);
|
|
16458
16470
|
}
|
|
16459
16471
|
}), cv = lv;
|
|
16460
|
-
function
|
|
16472
|
+
function Dt(n, e) {
|
|
16461
16473
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(n, e);
|
|
16462
16474
|
}
|
|
16463
|
-
function
|
|
16475
|
+
function Nt(n, e, t, o) {
|
|
16464
16476
|
var s = arguments.length, i = s < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, t) : o, r;
|
|
16465
16477
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(n, e, t, o);
|
|
16466
16478
|
else for (var a = n.length - 1; a >= 0; a--) (r = n[a]) && (i = (s < 3 ? r(i) : s > 3 ? r(e, t, i) : r(e, t)) || i);
|
|
@@ -16903,30 +16915,30 @@ var xo = "PointerEvent" in globalThis, Pt = class extends HTMLElement {
|
|
|
16903
16915
|
this.selection = void 0;
|
|
16904
16916
|
}
|
|
16905
16917
|
};
|
|
16906
|
-
|
|
16907
|
-
|
|
16908
|
-
|
|
16909
|
-
|
|
16910
|
-
|
|
16918
|
+
Nt([Ft({ fallback: 0 }), Dt("design:type", Number)], Pt.prototype, "left", void 0);
|
|
16919
|
+
Nt([Ft({ fallback: 0 }), Dt("design:type", Number)], Pt.prototype, "top", void 0);
|
|
16920
|
+
Nt([Ft({ fallback: 0 }), Dt("design:type", Number)], Pt.prototype, "rotate", void 0);
|
|
16921
|
+
Nt([Ft(), Dt("design:type", Object)], Pt.prototype, "selection", void 0);
|
|
16922
|
+
Nt([Ft({
|
|
16911
16923
|
internal: !0,
|
|
16912
16924
|
fallback: () => ({
|
|
16913
16925
|
min: -1,
|
|
16914
16926
|
max: -1
|
|
16915
16927
|
})
|
|
16916
|
-
}),
|
|
16917
|
-
|
|
16928
|
+
}), Dt("design:type", Object)], Pt.prototype, "_selectionMinMax", void 0);
|
|
16929
|
+
Nt([Ft({
|
|
16918
16930
|
internal: !0,
|
|
16919
16931
|
fallback: () => []
|
|
16920
|
-
}),
|
|
16921
|
-
|
|
16932
|
+
}), Dt("design:type", Array)], Pt.prototype, "_chars", void 0);
|
|
16933
|
+
Nt([Ft({
|
|
16922
16934
|
internal: !0,
|
|
16923
16935
|
fallback: () => []
|
|
16924
|
-
}),
|
|
16925
|
-
|
|
16926
|
-
|
|
16936
|
+
}), Dt("design:type", Array)], Pt.prototype, "_selectedChars", void 0);
|
|
16937
|
+
Nt([Ft({ internal: !0 }), Dt("design:type", Object)], Pt.prototype, "_cursorPosition", void 0);
|
|
16938
|
+
Nt([Ft({
|
|
16927
16939
|
internal: !0,
|
|
16928
16940
|
fallback: !1
|
|
16929
|
-
}),
|
|
16941
|
+
}), Dt("design:type", Boolean)], Pt.prototype, "_showCursor", void 0);
|
|
16930
16942
|
var fv = Pe((n) => {
|
|
16931
16943
|
const { isElement: e, elementSelection: t, textSelection: o, fonts: s, registerConfig: i, t: r, addElement: a, activateTool: l } = n, c = i("typography", { default: { strategy: "autoHeight" } }), d = Y(() => (o.value?.length ?? 0) > 1 && o.value[0] !== o.value[1]), u = Y(() => o.value?.[0].isFirst && o.value?.[1].isLast && o.value?.[1].isLastSelected);
|
|
16932
16944
|
function h(M, P) {
|
|
@@ -16935,8 +16947,8 @@ var fv = Pe((n) => {
|
|
|
16935
16947
|
const x = p.text.base.characters;
|
|
16936
16948
|
let b = 0, w;
|
|
16937
16949
|
x.forEach((z) => {
|
|
16938
|
-
const
|
|
16939
|
-
|
|
16950
|
+
const D = z.lineBox.left + z.lineBox.width;
|
|
16951
|
+
D > b && (w = z, b = D);
|
|
16940
16952
|
});
|
|
16941
16953
|
const E = {}, I = x.filter((z) => z.lineBox.top === w?.lineBox.top).map((z) => (Object.assign(E, { ...z.parent.style }, { ...z.parent.parent.style }), z.content)).join(""), { boundingBox: k } = ko({
|
|
16942
16954
|
fonts: s,
|
|
@@ -16994,9 +17006,9 @@ var fv = Pe((n) => {
|
|
|
16994
17006
|
p && g.fragments.forEach((w, E, I) => {
|
|
16995
17007
|
if (!p) return;
|
|
16996
17008
|
const { content: k, ...T } = w;
|
|
16997
|
-
Array.from(mn(k)).forEach((z,
|
|
17009
|
+
Array.from(mn(k)).forEach((z, D, oe) => {
|
|
16998
17010
|
p = y({
|
|
16999
|
-
selected: (x > M.paragraphIndex || x === M.paragraphIndex && E > M.fragmentIndex || x === M.paragraphIndex && E === M.fragmentIndex &&
|
|
17011
|
+
selected: (x > M.paragraphIndex || x === M.paragraphIndex && E > M.fragmentIndex || x === M.paragraphIndex && E === M.fragmentIndex && D >= M.charIndex) && (x < P.paragraphIndex || x === P.paragraphIndex && E < P.fragmentIndex || x === P.paragraphIndex && E === P.fragmentIndex && (P.isLastSelected ? D <= P.charIndex : D < P.charIndex)),
|
|
17000
17012
|
p: g,
|
|
17001
17013
|
pIndex: x,
|
|
17002
17014
|
pLength: b.length,
|
|
@@ -17006,7 +17018,7 @@ var fv = Pe((n) => {
|
|
|
17006
17018
|
fLength: I.length,
|
|
17007
17019
|
c: z,
|
|
17008
17020
|
cLength: oe.length,
|
|
17009
|
-
cIndex:
|
|
17021
|
+
cIndex: D
|
|
17010
17022
|
});
|
|
17011
17023
|
});
|
|
17012
17024
|
});
|
|
@@ -17046,15 +17058,15 @@ var fv = Pe((n) => {
|
|
|
17046
17058
|
let g = { fragments: [] }, x;
|
|
17047
17059
|
if (f(o.value, ({ selected: b, fIndex: w, fStyle: E, fLength: I, c: k, cIndex: T, cLength: z }) => {
|
|
17048
17060
|
w === 0 && T === 0 && (g = { fragments: [] }, x = void 0);
|
|
17049
|
-
const
|
|
17050
|
-
if (b && M(
|
|
17061
|
+
const D = { ...E };
|
|
17062
|
+
if (b && M(D), x) {
|
|
17051
17063
|
const { content: oe, ...U } = x;
|
|
17052
|
-
lr(
|
|
17053
|
-
...
|
|
17064
|
+
lr(D, U) ? x.content += k : (g.fragments.push(x), x = {
|
|
17065
|
+
...D,
|
|
17054
17066
|
content: k
|
|
17055
17067
|
});
|
|
17056
17068
|
} else x = {
|
|
17057
|
-
...
|
|
17069
|
+
...D,
|
|
17058
17070
|
content: k
|
|
17059
17071
|
};
|
|
17060
17072
|
return w === I - 1 && T === z - 1 && (x && g.fragments.push(x), g.fragments.length && (p.push(g), g = { fragments: [] })), !0;
|
|
@@ -17245,7 +17257,7 @@ var fv = Pe((n) => {
|
|
|
17245
17257
|
}
|
|
17246
17258
|
function d(R, S = "Default") {
|
|
17247
17259
|
const A = Kt(), M = Kt();
|
|
17248
|
-
return a(
|
|
17260
|
+
return a(Dl(r(), {
|
|
17249
17261
|
id: A,
|
|
17250
17262
|
name: R,
|
|
17251
17263
|
mode: {
|
|
@@ -17256,7 +17268,7 @@ var fv = Pe((n) => {
|
|
|
17256
17268
|
}
|
|
17257
17269
|
function u(R, S) {
|
|
17258
17270
|
const A = Kt();
|
|
17259
|
-
return a(
|
|
17271
|
+
return a(Nl(r(), R, {
|
|
17260
17272
|
id: A,
|
|
17261
17273
|
name: S
|
|
17262
17274
|
})), A;
|
|
@@ -17415,23 +17427,23 @@ var fv = Pe((n) => {
|
|
|
17415
17427
|
const [P, y, p, g] = M.toArray();
|
|
17416
17428
|
if (!p || !g) return;
|
|
17417
17429
|
const x = d.value, { width: b, height: w } = r.value, E = b - (x.left + x.right), I = w - (x.top + x.bottom), k = E / p, T = I / g, z = t.value;
|
|
17418
|
-
let
|
|
17419
|
-
if (typeof _ == "number")
|
|
17430
|
+
let D;
|
|
17431
|
+
if (typeof _ == "number") D = _;
|
|
17420
17432
|
else switch (R) {
|
|
17421
17433
|
case "cover":
|
|
17422
|
-
|
|
17434
|
+
D = Math.max(k, T);
|
|
17423
17435
|
break;
|
|
17424
17436
|
case "containWidth":
|
|
17425
|
-
|
|
17437
|
+
D = k;
|
|
17426
17438
|
break;
|
|
17427
17439
|
case "containHeight":
|
|
17428
|
-
|
|
17440
|
+
D = T;
|
|
17429
17441
|
break;
|
|
17430
17442
|
default:
|
|
17431
|
-
|
|
17443
|
+
D = Math.min(k, T);
|
|
17432
17444
|
break;
|
|
17433
17445
|
}
|
|
17434
|
-
const oe = Math.min(z.zoom.x, z.zoom.y), U = Math.min(Ct(
|
|
17446
|
+
const oe = Math.min(z.zoom.x, z.zoom.y), U = Math.min(Ct(D, z.minZoom.x, z.maxZoom.x), Ct(D, z.minZoom.y, z.maxZoom.y));
|
|
17435
17447
|
let G = x.left, q = x.top;
|
|
17436
17448
|
k < T ? q += (I - g * U) / 2 : G += (E - p * U) / 2;
|
|
17437
17449
|
const K = {
|
|
@@ -17738,10 +17750,10 @@ var xv = { class: "m-panel" }, bv = { class: "m-panel__title" }, _v = /* @__PURE
|
|
|
17738
17750
|
default: Te(() => [Me(F(Ue), { icon: "$close" })]),
|
|
17739
17751
|
_: 1
|
|
17740
17752
|
})) : _e("", !0)], 32)) : _e("", !0), W("div", {
|
|
17741
|
-
class:
|
|
17753
|
+
class: Ne(["m-panel__body", { "m-panel__body--padded": n.padded }]),
|
|
17742
17754
|
onPointerdown: s[3] || (s[3] = Je(() => {
|
|
17743
17755
|
}, ["stop"]))
|
|
17744
|
-
}, [
|
|
17756
|
+
}, [De(o.$slots, "default")], 34)]));
|
|
17745
17757
|
}
|
|
17746
17758
|
}), wv = _v, kv = { class: "m-float-panel__card" }, Mv = 200, Sv = 160, Cv = 28, Ev = /* @__PURE__ */ Se({
|
|
17747
17759
|
__name: "FloatPanel",
|
|
@@ -17831,7 +17843,7 @@ var xv = { class: "m-panel" }, bv = { class: "m-panel__title" }, _v = /* @__PURE
|
|
|
17831
17843
|
onClose: f[0] || (f[0] = (_) => t.value = !1),
|
|
17832
17844
|
onHeaderPointerdown: f[1] || (f[1] = (_) => d(_, "move"))
|
|
17833
17845
|
}, {
|
|
17834
|
-
default: Te(() => [
|
|
17846
|
+
default: Te(() => [De(m.$slots, "default", gt(yt(h)))]),
|
|
17835
17847
|
_: 3
|
|
17836
17848
|
}, 8, ["title"]),
|
|
17837
17849
|
W("div", {
|
|
@@ -17917,15 +17929,15 @@ var xv = { class: "m-panel" }, bv = { class: "m-panel__title" }, _v = /* @__PURE
|
|
|
17917
17929
|
});
|
|
17918
17930
|
}
|
|
17919
17931
|
return (c, d) => (j(), J("div", {
|
|
17920
|
-
class:
|
|
17932
|
+
class: Ne(Ne([
|
|
17921
17933
|
"m-layout-item",
|
|
17922
17934
|
`m-layout-item--${e.position}`,
|
|
17923
17935
|
e.class
|
|
17924
17936
|
])),
|
|
17925
17937
|
style: $e($e([F(i), e.style]))
|
|
17926
|
-
}, [
|
|
17938
|
+
}, [De(c.$slots, "default"), n.resizable && n.modelValue ? (j(), J("div", {
|
|
17927
17939
|
key: 0,
|
|
17928
|
-
class:
|
|
17940
|
+
class: Ne(["m-layout-item__resize", `m-layout-item__resize--${e.position}`]),
|
|
17929
17941
|
style: $e({ cursor: r.value ? "ew-resize" : "ns-resize" }),
|
|
17930
17942
|
onPointerdown: l
|
|
17931
17943
|
}, null, 38)) : _e("", !0)], 6));
|
|
@@ -17947,7 +17959,7 @@ var xv = { class: "m-panel" }, bv = { class: "m-panel__title" }, _v = /* @__PURE
|
|
|
17947
17959
|
ref: (f) => l(f, u)
|
|
17948
17960
|
}, m);
|
|
17949
17961
|
}
|
|
17950
|
-
return (d, u) => (j(!0), J(we, null, Ie(F(t), (h, m) => (j(), J(we, { key: m }, [h.type === "overlay" ? (j(), J(we, { key: 0 }, [F(s) && h.visible.value ? (j(), Fe(
|
|
17962
|
+
return (d, u) => (j(!0), J(we, null, Ie(F(t), (h, m) => (j(), J(we, { key: m }, [h.type === "overlay" ? (j(), J(we, { key: 0 }, [F(s) && h.visible.value ? (j(), Fe(Do, {
|
|
17951
17963
|
key: 0,
|
|
17952
17964
|
to: F(s)
|
|
17953
17965
|
}, [Me(c, { item: h }, null, 8, ["item"])], 8, ["to"])) : _e("", !0)], 64)) : h.type === "panel" ? (j(), J(we, { key: 1 }, [h.position === "float" ? (j(), J(we, { key: 0 }, [F(i).height && h.visible.value ? (j(), Fe(Tv, {
|
|
@@ -18033,7 +18045,7 @@ var xv = { class: "m-panel" }, bv = { class: "m-panel__title" }, _v = /* @__PURE
|
|
|
18033
18045
|
attach: !1,
|
|
18034
18046
|
"model-value": !0
|
|
18035
18047
|
}, {
|
|
18036
|
-
default: Te(() => [F(o).length > 0 ?
|
|
18048
|
+
default: Te(() => [F(o).length > 0 ? De(d.$slots, "default", { key: 0 }) : _e("", !0)]),
|
|
18037
18049
|
_: 3
|
|
18038
18050
|
}, 8, [
|
|
18039
18051
|
"content-style",
|
|
@@ -18068,9 +18080,9 @@ var xv = { class: "m-panel" }, bv = { class: "m-panel__title" }, _v = /* @__PURE
|
|
|
18068
18080
|
getLayoutItem: r
|
|
18069
18081
|
}), (l, c) => (j(), J("div", {
|
|
18070
18082
|
ref: F(a),
|
|
18071
|
-
class:
|
|
18083
|
+
class: Ne(Ne([F(o), t.class])),
|
|
18072
18084
|
style: $e($e([F(s), t.style]))
|
|
18073
|
-
}, [
|
|
18085
|
+
}, [De(l.$slots, "default")], 6));
|
|
18074
18086
|
}
|
|
18075
18087
|
}), Rv = zv, Ov = {
|
|
18076
18088
|
key: 0,
|
|
@@ -18081,11 +18093,11 @@ var xv = { class: "m-panel" }, bv = { class: "m-panel__title" }, _v = /* @__PURE
|
|
|
18081
18093
|
setup(n) {
|
|
18082
18094
|
const e = n, { mainStyles: t } = ku();
|
|
18083
18095
|
return (o, s) => (j(), J("main", {
|
|
18084
|
-
class:
|
|
18096
|
+
class: Ne(["m-main", [{ "m-main--scrollable": e.scrollable }]]),
|
|
18085
18097
|
style: $e([F(t)])
|
|
18086
|
-
}, [e.scrollable ? (j(), J("div", Ov, [
|
|
18098
|
+
}, [e.scrollable ? (j(), J("div", Ov, [De(o.$slots, "default")])) : De(o.$slots, "default", { key: 1 })], 6));
|
|
18087
18099
|
}
|
|
18088
|
-
}), Fv = Vv,
|
|
18100
|
+
}), Fv = Vv, Dv = ["data-pixel-ratio"], Nv = {
|
|
18089
18101
|
ref: "canvasTpl",
|
|
18090
18102
|
class: "m-editor__canvas"
|
|
18091
18103
|
}, Bv = {
|
|
@@ -18106,13 +18118,13 @@ var xv = { class: "m-panel" }, bv = { class: "m-panel__title" }, _v = /* @__PURE
|
|
|
18106
18118
|
const { width: K, height: H } = q[0].contentRect;
|
|
18107
18119
|
l.value.resize(K, H);
|
|
18108
18120
|
}), bt(() => {
|
|
18109
|
-
l.value.on("pointerdown", z), l.value.on("pointermove",
|
|
18121
|
+
l.value.on("pointerdown", z), l.value.on("pointermove", D), l.value.on("pointerover", oe);
|
|
18110
18122
|
});
|
|
18111
18123
|
let w;
|
|
18112
18124
|
Vt(() => {
|
|
18113
18125
|
w = E(x.value, a.value);
|
|
18114
18126
|
}), Qe(() => {
|
|
18115
|
-
l.value.off("pointerdown", z), l.value.off("pointermove",
|
|
18127
|
+
l.value.off("pointerdown", z), l.value.off("pointermove", D), l.value.off("pointerover", oe), w?.();
|
|
18116
18128
|
});
|
|
18117
18129
|
function E(q, K) {
|
|
18118
18130
|
function H() {
|
|
@@ -18308,7 +18320,7 @@ var xv = { class: "m-panel" }, bv = { class: "m-panel__title" }, _v = /* @__PURE
|
|
|
18308
18320
|
command: "pointerDown",
|
|
18309
18321
|
handle: z
|
|
18310
18322
|
});
|
|
18311
|
-
function
|
|
18323
|
+
function D(q) {
|
|
18312
18324
|
q.srcElement === a.value && (c.value.grabbing || q.button === 1 || u.value && u.value !== "typing" || I(q));
|
|
18313
18325
|
}
|
|
18314
18326
|
function oe(q) {
|
|
@@ -18318,7 +18330,7 @@ var xv = { class: "m-panel" }, bv = { class: "m-panel__title" }, _v = /* @__PURE
|
|
|
18318
18330
|
a.value && (a.value.scrollLeft && (a.value.scrollLeft = 0), a.value.scrollTop && (a.value.scrollTop = 0));
|
|
18319
18331
|
}
|
|
18320
18332
|
const G = { editor: o };
|
|
18321
|
-
return (q, K) => (j(), Fe(Rv, { class:
|
|
18333
|
+
return (q, K) => (j(), Fe(Rv, { class: Ne(["m-editor", [
|
|
18322
18334
|
F(u) && `m-editor--${F(u)}`,
|
|
18323
18335
|
F(A) && `m-editor--drawing-tool-${F(A).name}`,
|
|
18324
18336
|
b.value && "m-editor--grabbing"
|
|
@@ -18334,14 +18346,14 @@ var xv = { class: "m-panel" }, bv = { class: "m-panel__title" }, _v = /* @__PURE
|
|
|
18334
18346
|
onWheel: K[0] || (K[0] = Je(() => {
|
|
18335
18347
|
}, ["prevent"]))
|
|
18336
18348
|
}, [
|
|
18337
|
-
W("canvas",
|
|
18349
|
+
W("canvas", Nv, null, 512),
|
|
18338
18350
|
(t["floatbar-top"] || t.floatbar) && !F(M)() ? (j(), Fe(Is, {
|
|
18339
18351
|
key: 0,
|
|
18340
18352
|
location: "top-start",
|
|
18341
18353
|
target: F(u) === "typing" ? F(s)["mce:text"]?.[0]?.textEditor : F(s)["mce:selection"]?.[0]?.transform?.$el,
|
|
18342
18354
|
middlewares: ["offset", "shift"]
|
|
18343
18355
|
}, {
|
|
18344
|
-
default: Te(() => [
|
|
18356
|
+
default: Te(() => [De(q.$slots, "floatbar", gt(yt(G))), De(q.$slots, "floatbar-top", gt(yt(G)))]),
|
|
18345
18357
|
_: 3
|
|
18346
18358
|
}, 8, ["target"])) : _e("", !0),
|
|
18347
18359
|
t["floatbar-bottom"] && !F(M)() ? (j(), Fe(Is, {
|
|
@@ -18350,14 +18362,14 @@ var xv = { class: "m-panel" }, bv = { class: "m-panel__title" }, _v = /* @__PURE
|
|
|
18350
18362
|
target: F(s)["mce:selection"]?.[0]?.transform?.$el,
|
|
18351
18363
|
middlewares: ["offset", "shift"]
|
|
18352
18364
|
}, {
|
|
18353
|
-
default: Te(() => [
|
|
18365
|
+
default: Te(() => [De(q.$slots, "floatbar-bottom", gt(yt(G)))]),
|
|
18354
18366
|
_: 3
|
|
18355
18367
|
}, 8, ["target"])) : _e("", !0),
|
|
18356
|
-
|
|
18357
|
-
], 40,
|
|
18368
|
+
De(q.$slots, "drawboard", gt(yt(G)))
|
|
18369
|
+
], 40, Dv)]),
|
|
18358
18370
|
_: 3
|
|
18359
18371
|
}),
|
|
18360
|
-
|
|
18372
|
+
De(q.$slots, "default", gt(yt(G))),
|
|
18361
18373
|
Me($v, { slots: t }),
|
|
18362
18374
|
W("div", Bv, null, 512),
|
|
18363
18375
|
F(o).previewMode?.value ? (j(), J("button", {
|
|
@@ -18398,7 +18410,7 @@ export {
|
|
|
18398
18410
|
ty as createCardElement,
|
|
18399
18411
|
ny as createFlowNodeElement,
|
|
18400
18412
|
os as createImageElement,
|
|
18401
|
-
|
|
18413
|
+
Nr as createShapeElement,
|
|
18402
18414
|
oy as createStickyElement,
|
|
18403
18415
|
ns as createTextElement,
|
|
18404
18416
|
Qv as defineMixin,
|