vue-data-ui 3.26.1 → 3.26.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/{PackageVersion-DERnsek2.js → PackageVersion-BEPMhtFD.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-hill.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-label.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{package-Dibf8apW.js → package-Z9m3lUgv.js} +1 -1
- package/dist/{render-common-Cud0raX_.js → render-common-BGgH-o7M.js} +1 -1
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +2 -2
- package/dist/style.css +1 -1
- package/dist/{vue-data-ui-DOlARc51.js → vue-data-ui-B1nJEZZd.js} +62 -62
- package/dist/vue-data-ui.js +62 -62
- package/dist/{vue-ui-3d-bar-Df32scS7.js → vue-ui-3d-bar-DOlebgJU.js} +1 -1
- package/dist/{vue-ui-age-pyramid-BLNN6OOC.js → vue-ui-age-pyramid-WCUbSc4I.js} +1 -1
- package/dist/{vue-ui-bullet-CMQJziWk.js → vue-ui-bullet-HCCMPG8c.js} +1 -1
- package/dist/{vue-ui-bump-DbK1KgVX.js → vue-ui-bump-WpOTEgBs.js} +1 -1
- package/dist/{vue-ui-candlestick-B9nQ1qHm.js → vue-ui-candlestick-PBAZcPnG.js} +1 -1
- package/dist/{vue-ui-carousel-table-TKhLf3RQ.js → vue-ui-carousel-table-CSbj5FQD.js} +1 -1
- package/dist/{vue-ui-chestnut-CkR1_nhi.js → vue-ui-chestnut-_lab15WI.js} +1 -1
- package/dist/{vue-ui-chord-BxIYFULI.js → vue-ui-chord-Yz_Y2416.js} +1 -1
- package/dist/{vue-ui-circle-pack-DIwyZm41.js → vue-ui-circle-pack-B6DRb9Y8.js} +1 -1
- package/dist/{vue-ui-cursor-bFtmW5_Z.js → vue-ui-cursor-Dn1ybFBp.js} +1 -1
- package/dist/{vue-ui-dag-CgKeYLCC.js → vue-ui-dag-D6hig70T.js} +1 -1
- package/dist/{vue-ui-dashboard-C4kdXgXO.js → vue-ui-dashboard-DhRVpj8N.js} +57 -57
- package/dist/{vue-ui-digits-M5IsN9M5.js → vue-ui-digits-PxLlo-CM.js} +1 -1
- package/dist/{vue-ui-donut-D4JlPCcI.js → vue-ui-donut-30tufQoZ.js} +1 -1
- package/dist/{vue-ui-donut-BJ_e1CgL.js → vue-ui-donut-BCPpEny9.js} +1 -1
- package/dist/{vue-ui-donut-evolution-D8o94a8l.js → vue-ui-donut-evolution-D01OJjf2.js} +1 -1
- package/dist/{vue-ui-dumbbell-ctWAlEeZ.js → vue-ui-dumbbell-Ca9DaPlN.js} +1 -1
- package/dist/{vue-ui-flow-CsGyrH1B.js → vue-ui-flow-D1NVGMrT.js} +1 -1
- package/dist/{vue-ui-funnel-DDy-RAyJ.js → vue-ui-funnel-goru-QCU.js} +1 -1
- package/dist/{vue-ui-galaxy-74KclP1r.js → vue-ui-galaxy-yZIMvOg6.js} +1 -1
- package/dist/{vue-ui-gauge-CXuS6LeW.js → vue-ui-gauge-Egg_Vg1A.js} +1 -1
- package/dist/{vue-ui-geo-DRx6ttQM.js → vue-ui-geo-Dfz_qotE.js} +1 -1
- package/dist/{vue-ui-gizmo-BC3_uVXJ.js → vue-ui-gizmo-DzSJQJyI.js} +1 -1
- package/dist/{vue-ui-heatmap-BQPkd1Jj.js → vue-ui-heatmap-Cqk2tB4G.js} +1 -1
- package/dist/{vue-ui-hill-CPugDy_O.js → vue-ui-hill-BwUwkVy1.js} +1 -1
- package/dist/{vue-ui-history-plot-C0D8oTwR.js → vue-ui-history-plot-C43YqSxd.js} +1 -1
- package/dist/{vue-ui-horizontal-bar-Ckj9QBRq.js → vue-ui-horizontal-bar-DcttDEaL.js} +1 -1
- package/dist/{vue-ui-kpi-I5S9hgLg.js → vue-ui-kpi-B0r6I1Fo.js} +1 -1
- package/dist/{vue-ui-label-BDP67zvQ.js → vue-ui-label-DfBFm4hK.js} +331 -335
- package/dist/{vue-ui-molecule-BbOptg_w.js → vue-ui-molecule-DtCE2Y4f.js} +1 -1
- package/dist/{vue-ui-mood-radar-C06wzRuu.js → vue-ui-mood-radar-DUTaPxkh.js} +1 -1
- package/dist/{vue-ui-nested-donuts-fARAt2q9.js → vue-ui-nested-donuts-BtBJnH9I.js} +1 -1
- package/dist/{vue-ui-onion-DGBmy-ZB.js → vue-ui-onion-fQ7czuGC.js} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-Ckpv7Oid.js → vue-ui-parallel-coordinate-plot-C5zmfb4B.js} +1 -1
- package/dist/{vue-ui-quadrant-Bu5ocCTV.js → vue-ui-quadrant-1A10Y-VF.js} +1 -1
- package/dist/{vue-ui-quick-chart-KeuJQWP4.js → vue-ui-quick-chart-DNL0Q2CF.js} +1 -1
- package/dist/{vue-ui-radar-NAjasgLl.js → vue-ui-radar-CB62kQ2o.js} +1 -1
- package/dist/{vue-ui-relation-circle-C6OmMeVY.js → vue-ui-relation-circle-DyTMR3Xd.js} +1 -1
- package/dist/{vue-ui-ridgeline-oDvdFUnn.js → vue-ui-ridgeline-1-6ULP95.js} +1 -1
- package/dist/{vue-ui-rings-DPcokr-u.js → vue-ui-rings-WqwQYIJS.js} +1 -1
- package/dist/{vue-ui-scatter-Dlh3WcZX.js → vue-ui-scatter-CK95iCay.js} +1 -1
- package/dist/{vue-ui-skeleton-jfSZUph3.js → vue-ui-skeleton-6wUNrAgh.js} +1 -1
- package/dist/{vue-ui-spark-trend-BdCB9Plx.js → vue-ui-spark-trend-BIeum0ir.js} +1 -1
- package/dist/{vue-ui-sparkbar-OJvxIPIq.js → vue-ui-sparkbar-C8M__S7L.js} +1 -1
- package/dist/{vue-ui-sparkgauge-Bt47Swwf.js → vue-ui-sparkgauge-COePNpyn.js} +1 -1
- package/dist/{vue-ui-sparkhistogram-CmNafTZC.js → vue-ui-sparkhistogram-Cupz7sUb.js} +1 -1
- package/dist/{vue-ui-sparkline-DjgwE1DS.js → vue-ui-sparkline-DoD9fpC0.js} +1 -1
- package/dist/{vue-ui-sparkstackbar-Czi2P5h9.js → vue-ui-sparkstackbar-8RhZwvlv.js} +1 -1
- package/dist/{vue-ui-stackbar-BSBF6YPX.js → vue-ui-stackbar-CXJtds5H.js} +1 -1
- package/dist/{vue-ui-stackline-B9xei8gO.js → vue-ui-stackline-WIDO75JZ.js} +1 -1
- package/dist/{vue-ui-strip-plot-BW-fMH1M.js → vue-ui-strip-plot-DiHk8f-N.js} +1 -1
- package/dist/{vue-ui-table-Cet5h90u.js → vue-ui-table-DPpR5FZm.js} +2 -2
- package/dist/{vue-ui-table-sparkline-rCuKhRpq.js → vue-ui-table-sparkline-xxPIRGUL.js} +1 -1
- package/dist/{vue-ui-thermometer-DFkfgAH-.js → vue-ui-thermometer-Dly84Zo6.js} +1 -1
- package/dist/{vue-ui-timer-CEXJpgKN.js → vue-ui-timer-rb9_fs0J.js} +1 -1
- package/dist/{vue-ui-tiremarks-CTHWbW22.js → vue-ui-tiremarks-5msdNX8I.js} +1 -1
- package/dist/{vue-ui-treemap-DI0fLyyX.js → vue-ui-treemap-swB3RyK0.js} +1 -1
- package/dist/{vue-ui-waffle-BpoJNZ-c.js → vue-ui-waffle-DXYytGC3.js} +1 -1
- package/dist/{vue-ui-wheel-Bz6x9z0B.js → vue-ui-wheel-B8T6rwqo.js} +1 -1
- package/dist/{vue-ui-word-cloud-CAGYzPIL.js → vue-ui-word-cloud-BSZPpdXe.js} +1 -1
- package/dist/{vue-ui-world-BQzakZZs.js → vue-ui-world-DOoyrxxG.js} +1 -1
- package/dist/{vue-ui-xy-DN-TEW8z.js → vue-ui-xy-BwN86L64.js} +1 -1
- package/dist/{vue-ui-xy-BwIdWnOp.js → vue-ui-xy-Ce1A0lrV.js} +1 -1
- package/package.json +1 -1
|
@@ -130,67 +130,67 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
130
130
|
defaultConfig: e
|
|
131
131
|
}) : (Ue(e), t = e) : t = e, t;
|
|
132
132
|
}
|
|
133
|
-
let k = d(() => We()), Ge = te(), Ke = n(),
|
|
133
|
+
let k = d(() => We()), Ge = te(), Ke = n(), qe = v("wrapperRef"), A = v("labelRef"), Je = v("contentRef"), Ye = v("boxRef"), Xe = v("titleTextRef"), Ze = v("contentTextRef"), j = _(null), M = _(null), N = _(null), P = _({
|
|
134
134
|
x: 0,
|
|
135
135
|
y: 0
|
|
136
|
-
}),
|
|
136
|
+
}), Qe = _(!1), F = _(!1), $e = _("pointer"), et = d(() => k.value.title.fontSize), tt = d(() => k.value.title.lineHeight), nt = d(() => k.value.content.fontSize), rt = d(() => k.value.content.lineHeight), it = d(() => k.value.title.gap), at = d(() => k.value.drag.handleWidth), ot = d(() => k.value.collisionGap), st = null, ct = null, I = null, L = {
|
|
137
137
|
inputType: null,
|
|
138
138
|
touchId: null,
|
|
139
139
|
startPointer: null,
|
|
140
140
|
startOffset: null,
|
|
141
141
|
lastRequestedOffset: null
|
|
142
|
-
},
|
|
142
|
+
}, lt = d(() => ({
|
|
143
143
|
x: D.dataset?.x ?? null,
|
|
144
144
|
y: D.dataset?.y ?? null
|
|
145
|
-
})),
|
|
146
|
-
let e =
|
|
145
|
+
})), R = d(() => t(lt.value.x) && t(lt.value.y)), z = d(() => Number(lt.value.x)), B = d(() => Number(lt.value.y)), V = d(() => k.value.link), H = d(() => k.value.box), ut = d(() => k.value.drag), U = d(() => k.value.title.marker), dt = d(() => k.value.overlap === !0), W = d(() => ut.value?.enable === !0), ft = d(() => !!(Ge?.vnode?.props ?? {}).onClick), pt = d(() => ft.value), mt = d(() => [String(k.value.title?.text ?? "").trim(), String(k.value.content?.text ?? "").trim()].filter(Boolean).join(", ") || "Label"), ht = d(() => `Move ${mt.value}`), gt = `label_${Ke}_drag_instructions`, _t = d(() => k.value.a11y.translations.keyboardNavigation), vt = d(() => t(ut.value?.iconSize) ? Math.max(0, Number(ut.value.iconSize)) : 0), yt = d(() => vt.value * .15), bt = d(() => {
|
|
146
|
+
let e = ut.value?.handlePosition;
|
|
147
147
|
return [
|
|
148
148
|
"left",
|
|
149
149
|
"right",
|
|
150
150
|
"top",
|
|
151
151
|
"bottom"
|
|
152
152
|
].includes(e) ? e : "left";
|
|
153
|
-
}),
|
|
153
|
+
}), xt = d(() => {
|
|
154
154
|
let e = D.dataset?.position;
|
|
155
155
|
return !e || !t(e.x) || !t(e.y) ? null : {
|
|
156
156
|
x: Number(e.x),
|
|
157
157
|
y: Number(e.y)
|
|
158
158
|
};
|
|
159
|
-
}),
|
|
160
|
-
let e =
|
|
159
|
+
}), St = d(() => Qe.value ? null : xt.value), Ct = d(() => t(V.value.length) ? Math.max(0, Number(V.value.length)) : ke), wt = d(() => Hn(k.value.title.textAlign)), Tt = d(() => Hn(k.value.content.textAlign)), Et = d(() => Un(wt.value)), Dt = d(() => Un(Tt.value)), Ot = d(() => U.value?.color !== null && U.value?.color !== void 0 && String(k.value.title.text ?? "") !== ""), kt = d(() => Ot.value && t(U.value?.size) ? Math.max(0, Number(U.value.size)) : 0), At = d(() => kt.value / 2), jt = d(() => U.value?.beforeText !== !1), Mt = d(() => Ot.value && kt.value > 0 ? 6 : 0), Nt = d(() => kt.value > 0 ? kt.value + Mt.value : 0), G = d(() => {
|
|
160
|
+
let e = H.value.padding ?? {};
|
|
161
161
|
return {
|
|
162
162
|
top: t(e.top) ? Math.max(0, Number(e.top)) : 0,
|
|
163
163
|
right: t(e.right) ? Math.max(0, Number(e.right)) : 0,
|
|
164
164
|
bottom: t(e.bottom) ? Math.max(0, Number(e.bottom)) : 0,
|
|
165
165
|
left: t(e.left) ? Math.max(0, Number(e.left)) : 0
|
|
166
166
|
};
|
|
167
|
-
}),
|
|
168
|
-
if (!
|
|
169
|
-
let e =
|
|
170
|
-
return Math.max(1,
|
|
171
|
-
}),
|
|
172
|
-
if (!
|
|
173
|
-
let e =
|
|
167
|
+
}), Pt = d(() => t(H.value.borderWidth) ? Math.max(0, Number(H.value.borderWidth)) : 0), Ft = d(() => t(H.value.borderRadius) ? Math.max(0, Number(H.value.borderRadius)) : 0), K = d(() => t(H.value.maxWidth) ? Math.max(0, Number(H.value.maxWidth)) : null), It = d(() => W.value && H.value.show ? at.value : 0), Lt = d(() => ["left", "right"].includes(bt.value)), Rt = d(() => {
|
|
168
|
+
if (!H.value.show || !t(K.value) || K.value <= 0) return null;
|
|
169
|
+
let e = Lt.value ? It.value : 0;
|
|
170
|
+
return Math.max(1, K.value - G.value.left - G.value.right - e);
|
|
171
|
+
}), zt = d(() => Rt.value ? Math.max(1, Rt.value - Nt.value) : null), q = d(() => {
|
|
172
|
+
if (!H.value.show || !N.value) return null;
|
|
173
|
+
let e = Pt.value / 2, t = Math.max(0, N.value.width - Pt.value), n = Math.max(0, N.value.height - Pt.value);
|
|
174
174
|
return {
|
|
175
|
-
x:
|
|
176
|
-
y:
|
|
175
|
+
x: N.value.x + e,
|
|
176
|
+
y: N.value.y + e,
|
|
177
177
|
width: t,
|
|
178
178
|
height: n,
|
|
179
|
-
rx: Math.min(
|
|
179
|
+
rx: Math.min(Ft.value, t / 2, n / 2)
|
|
180
180
|
};
|
|
181
|
-
}),
|
|
182
|
-
if (!
|
|
183
|
-
let e =
|
|
184
|
-
if (n <= 0 ||
|
|
185
|
-
let r =
|
|
181
|
+
}), Bt = d(() => {
|
|
182
|
+
if (!W.value || !q.value) return null;
|
|
183
|
+
let e = bt.value, t = ["left", "right"].includes(e), n = Math.min(at.value, Math.max(0, t ? q.value.width : q.value.height));
|
|
184
|
+
if (n <= 0 || q.value.width <= 0 || q.value.height <= 0) return null;
|
|
185
|
+
let r = q.value.x, i = q.value.y, a = q.value.width, o = q.value.height, s = "", c = "";
|
|
186
186
|
if (e === "left" || e === "right") {
|
|
187
|
-
a = n, r = e === "left" ?
|
|
187
|
+
a = n, r = e === "left" ? q.value.x : q.value.x + q.value.width - n;
|
|
188
188
|
let t = e === "left" ? r + n : r, l = r + n / 2, u = i + o / 2;
|
|
189
189
|
s = `
|
|
190
190
|
M ${t} ${i}
|
|
191
191
|
V ${i + o}
|
|
192
192
|
`;
|
|
193
|
-
let d =
|
|
193
|
+
let d = vt.value, f = yt.value / 2, p = Math.max(0, d / 2 - f), m = d * .14;
|
|
194
194
|
c = [
|
|
195
195
|
-.7,
|
|
196
196
|
0,
|
|
@@ -200,13 +200,13 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
200
200
|
return [`M ${l - m} ${t} h 0`, `M ${l + m} ${t} h 0`];
|
|
201
201
|
}).join(" ");
|
|
202
202
|
} else {
|
|
203
|
-
o = n, i = e === "top" ?
|
|
203
|
+
o = n, i = e === "top" ? q.value.y : q.value.y + q.value.height - n;
|
|
204
204
|
let t = e === "top" ? i + n : i, l = r + a / 2, u = i + n / 2;
|
|
205
205
|
s = `
|
|
206
206
|
M ${r} ${t}
|
|
207
207
|
H ${r + a}
|
|
208
208
|
`;
|
|
209
|
-
let d =
|
|
209
|
+
let d = vt.value, f = yt.value / 2, p = Math.max(0, d / 2 - f), m = d * .14;
|
|
210
210
|
c = [
|
|
211
211
|
-.7,
|
|
212
212
|
0,
|
|
@@ -225,8 +225,8 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
225
225
|
gripPath: c,
|
|
226
226
|
position: e
|
|
227
227
|
};
|
|
228
|
-
}),
|
|
229
|
-
let e =
|
|
228
|
+
}), J = d(() => {
|
|
229
|
+
let e = Bt.value;
|
|
230
230
|
if (!e) return null;
|
|
231
231
|
let t = Math.max(je, e.width), n = Math.max(je, e.height), r = e.x, i = e.y;
|
|
232
232
|
return e.position === "left" ? r = e.x + e.width - t : e.position === "top" && (i = e.y + e.height - n), e.position === "left" || e.position === "right" ? i = e.y + e.height / 2 - n / 2 : r = e.x + e.width / 2 - t / 2, {
|
|
@@ -235,27 +235,27 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
235
235
|
width: t,
|
|
236
236
|
height: n
|
|
237
237
|
};
|
|
238
|
-
}),
|
|
239
|
-
if (!
|
|
238
|
+
}), Y = d(() => {
|
|
239
|
+
if (!pt.value) return null;
|
|
240
240
|
let e = null;
|
|
241
|
-
if (
|
|
242
|
-
x:
|
|
243
|
-
y:
|
|
244
|
-
width:
|
|
245
|
-
height:
|
|
241
|
+
if (q.value ? e = { ...q.value } : M.value && (e = {
|
|
242
|
+
x: M.value.x - P.value.x,
|
|
243
|
+
y: M.value.y - P.value.y,
|
|
244
|
+
width: M.value.width,
|
|
245
|
+
height: M.value.height,
|
|
246
246
|
rx: 0
|
|
247
247
|
}), !e) return null;
|
|
248
|
-
let t =
|
|
248
|
+
let t = Bt.value;
|
|
249
249
|
return t && (t.position === "left" ? (e.x += t.width, e.width -= t.width) : t.position === "right" ? e.width -= t.width : (t.position === "top" && (e.y += t.height), e.height -= t.height)), e.width <= 0 || e.height <= 0 ? null : e;
|
|
250
|
-
}),
|
|
251
|
-
let e = qt.value + (
|
|
252
|
-
return
|
|
253
|
-
}), Yt = d(() => !
|
|
254
|
-
x:
|
|
255
|
-
y:
|
|
256
|
-
}), Xt = d(() =>
|
|
257
|
-
if (!
|
|
258
|
-
let e =
|
|
250
|
+
}), X = _(Gn(k.value.title.text)), Vt = _(Gn(k.value.content.text)), Z = _(0), Ht = _(0), Ut = _(0), Wt = d(() => Z.value + Nt.value), Gt = d(() => z.value - Ut.value / 2), Kt = d(() => z.value + Ut.value / 2), qt = d(() => wt.value === "left" ? Gt.value : wt.value === "right" ? Kt.value - Wt.value : z.value - Wt.value / 2), Jt = d(() => {
|
|
251
|
+
let e = qt.value + (jt.value ? Nt.value : 0);
|
|
252
|
+
return wt.value === "left" ? e : wt.value === "right" ? e + Z.value : e + Z.value / 2;
|
|
253
|
+
}), Yt = d(() => !Ot.value || At.value <= 0 ? null : {
|
|
254
|
+
x: jt.value ? qt.value + At.value : qt.value + Z.value + Mt.value + At.value,
|
|
255
|
+
y: B.value - et.value * .35 + U.value.offsetY
|
|
256
|
+
}), Xt = d(() => Wn(Tt.value)), Zt = d(() => X.value.length ? B.value + X.value.length * tt.value + it.value : B.value), Qt = d(() => {
|
|
257
|
+
if (!V.value.show || !R.value || !M.value) return null;
|
|
258
|
+
let e = M.value, t = z.value, n = B.value, i = e.x + e.width / 2, a = e.y + e.height / 2, o = i - t, s = a - n, c, l, u, d = H.value.show ? Math.min(Ft.value, e.width / 2, e.height / 2) : 0, f = Math.abs(i - t) < .001, p = Math.abs(a - n) < .001;
|
|
259
259
|
return Math.abs(o) >= Math.abs(s) ? (o >= 0 ? (u = "left", c = e.x) : (u = "right", c = e.x + e.width), l = p ? a : r(n, e.y + d, e.y + e.height - d)) : (s >= 0 ? (u = "top", l = e.y) : (u = "bottom", l = e.y + e.height), c = f ? i : r(t, e.x + d, e.x + e.width - d)), {
|
|
260
260
|
d: `M ${t} ${n} L ${c} ${l}`,
|
|
261
261
|
side: u,
|
|
@@ -270,7 +270,7 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
270
270
|
};
|
|
271
271
|
});
|
|
272
272
|
function $t(e, t) {
|
|
273
|
-
let n =
|
|
273
|
+
let n = j.value;
|
|
274
274
|
if (!n?.createSVGPoint || !Number.isFinite(e) || !Number.isFinite(t)) return null;
|
|
275
275
|
let r = n.getScreenCTM?.();
|
|
276
276
|
if (!r) return null;
|
|
@@ -286,18 +286,18 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
286
286
|
return null;
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
|
-
function en(e =
|
|
289
|
+
function en(e = P.value) {
|
|
290
290
|
return {
|
|
291
291
|
dataset: D.dataset,
|
|
292
292
|
offset: {
|
|
293
293
|
x: Number(e?.x) || 0,
|
|
294
294
|
y: Number(e?.y) || 0
|
|
295
295
|
},
|
|
296
|
-
rect:
|
|
296
|
+
rect: M.value ? { ...M.value } : null
|
|
297
297
|
};
|
|
298
298
|
}
|
|
299
299
|
function tn(e) {
|
|
300
|
-
let t =
|
|
300
|
+
let t = j.value;
|
|
301
301
|
t && e && (Number.isFinite(t[ze]) || (t[ze] = 0), t[ze] += 1, e[Re] = t[ze]);
|
|
302
302
|
}
|
|
303
303
|
function nn() {
|
|
@@ -319,13 +319,13 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
319
319
|
rn(), on();
|
|
320
320
|
}
|
|
321
321
|
function cn({ event: e, inputType: t, touchId: n = null, pointer: r }) {
|
|
322
|
-
if (
|
|
322
|
+
if (F.value || !W.value || !A.value || !j.value || !r) return;
|
|
323
323
|
e.preventDefault(), e.stopPropagation();
|
|
324
|
-
let i =
|
|
325
|
-
x: Number(
|
|
326
|
-
y: Number(
|
|
324
|
+
let i = A.value, a = {
|
|
325
|
+
x: Number(P.value?.x) || 0,
|
|
326
|
+
y: Number(P.value?.y) || 0
|
|
327
327
|
};
|
|
328
|
-
|
|
328
|
+
L.inputType = t, L.touchId = n, L.startPointer = r, L.startOffset = a, L.lastRequestedOffset = a, F.value = !0, i[w] = !0, i[S] = { ...a }, i[C] = { ...a }, j.value[E] = /* @__PURE__ */ new Map(), tn(i), t === "mouse" ? nn() : an(), O("dragStart", en(a));
|
|
329
329
|
}
|
|
330
330
|
function ln(e) {
|
|
331
331
|
e.button === 0 && cn({
|
|
@@ -344,32 +344,32 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
344
344
|
});
|
|
345
345
|
}
|
|
346
346
|
function dn() {
|
|
347
|
-
if (
|
|
347
|
+
if (I || typeof document > "u") return I;
|
|
348
348
|
let e = document.createElement("div");
|
|
349
|
-
return e.setAttribute("role", "status"), e.setAttribute("aria-live", "polite"), e.setAttribute("aria-atomic", "true"), e.style.position = "fixed", e.style.width = "1px", e.style.height = "1px", e.style.padding = "0", e.style.margin = "-1px", e.style.overflow = "hidden", e.style.clip = "rect(0, 0, 0, 0)", e.style.whiteSpace = "nowrap", e.style.border = "0", document.body.append(e),
|
|
349
|
+
return e.setAttribute("role", "status"), e.setAttribute("aria-live", "polite"), e.setAttribute("aria-atomic", "true"), e.style.position = "fixed", e.style.width = "1px", e.style.height = "1px", e.style.padding = "0", e.style.margin = "-1px", e.style.overflow = "hidden", e.style.clip = "rect(0, 0, 0, 0)", e.style.whiteSpace = "nowrap", e.style.border = "0", document.body.append(e), I = e, I;
|
|
350
350
|
}
|
|
351
351
|
function fn(e) {
|
|
352
352
|
let t = dn();
|
|
353
353
|
if (!t) return;
|
|
354
354
|
let n = Number(e?.x) || 0, r = Number(e?.y) || 0, i = (e) => Number.isInteger(e) ? String(e) : e.toFixed(2);
|
|
355
355
|
t.textContent = "", requestAnimationFrame(() => {
|
|
356
|
-
|
|
356
|
+
I && (I.textContent = `${mt.value} moved to x ${i(n)}, y ${i(r)}.`);
|
|
357
357
|
});
|
|
358
358
|
}
|
|
359
359
|
function pn(e, t) {
|
|
360
|
-
let n =
|
|
361
|
-
if (
|
|
360
|
+
let n = A.value, r = j.value;
|
|
361
|
+
if (F.value || !W.value || !n || !r?.isConnected) return;
|
|
362
362
|
let i = {
|
|
363
|
-
x: Number(
|
|
364
|
-
y: Number(
|
|
363
|
+
x: Number(P.value?.x) || 0,
|
|
364
|
+
y: Number(P.value?.y) || 0
|
|
365
365
|
}, a = {
|
|
366
366
|
x: i.x + e,
|
|
367
367
|
y: i.y + t
|
|
368
368
|
};
|
|
369
|
-
|
|
369
|
+
L.inputType = "keyboard", L.touchId = null, L.startPointer = null, L.startOffset = i, L.lastRequestedOffset = a, F.value = !0, n[w] = !0, n[S] = { ...i }, n[C] = { ...a }, r[E] = /* @__PURE__ */ new Map(), tn(n), O("dragStart", en(i)), O("drag", en(a)), Cr(r), Sn();
|
|
370
370
|
}
|
|
371
371
|
function mn(e) {
|
|
372
|
-
if (!
|
|
372
|
+
if (!W.value) return;
|
|
373
373
|
let t = {
|
|
374
374
|
ArrowUp: [0, -1],
|
|
375
375
|
ArrowDown: [0, 1],
|
|
@@ -382,78 +382,78 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
382
382
|
pn(t[0] * n, t[1] * n);
|
|
383
383
|
}
|
|
384
384
|
function hn(e, t = null) {
|
|
385
|
-
if (!
|
|
386
|
-
t
|
|
385
|
+
if (!F.value || !L.startPointer || !L.startOffset || !A.value || !e) return;
|
|
386
|
+
t && (t.cancelable && t.preventDefault(), t.stopPropagation());
|
|
387
387
|
let n = {
|
|
388
|
-
x:
|
|
389
|
-
y:
|
|
388
|
+
x: L.startOffset.x + (e.x - L.startPointer.x),
|
|
389
|
+
y: L.startOffset.y + (e.y - L.startPointer.y)
|
|
390
390
|
};
|
|
391
|
-
|
|
391
|
+
L.lastRequestedOffset = n, A.value[C] = { ...n }, $(j.value), O("drag", en(n));
|
|
392
392
|
}
|
|
393
393
|
function gn(e) {
|
|
394
|
-
|
|
394
|
+
F.value && L.inputType === "mouse" && hn($t(e.clientX, e.clientY), e);
|
|
395
395
|
}
|
|
396
396
|
function _n(e) {
|
|
397
|
-
|
|
397
|
+
F.value && L.inputType === "mouse" && Sn(e);
|
|
398
398
|
}
|
|
399
399
|
function vn(e) {
|
|
400
|
-
if (!e ||
|
|
401
|
-
for (let t of e) if (t.identifier ===
|
|
400
|
+
if (!e || L.touchId === null) return null;
|
|
401
|
+
for (let t of e) if (t.identifier === L.touchId) return t;
|
|
402
402
|
return null;
|
|
403
403
|
}
|
|
404
404
|
function yn(e) {
|
|
405
|
-
if (!
|
|
405
|
+
if (!F.value || L.inputType !== "touch") return;
|
|
406
406
|
let t = vn(e.touches);
|
|
407
407
|
t && hn($t(t.clientX, t.clientY), e);
|
|
408
408
|
}
|
|
409
409
|
function bn(e) {
|
|
410
|
-
|
|
410
|
+
F.value && L.inputType === "touch" && vn(e.changedTouches) && Sn(e);
|
|
411
411
|
}
|
|
412
412
|
function xn(e) {
|
|
413
|
-
|
|
413
|
+
F.value && L.inputType === "touch" && vn(e.changedTouches) && Sn(e);
|
|
414
414
|
}
|
|
415
415
|
function Sn(e = null) {
|
|
416
|
-
if (!
|
|
417
|
-
e
|
|
418
|
-
let t =
|
|
419
|
-
n?.[x] && (cancelAnimationFrame(n[x]), n[x] = null), n?.isConnected && t &&
|
|
420
|
-
let i = t ?
|
|
421
|
-
x: Number(
|
|
422
|
-
y: Number(
|
|
416
|
+
if (!F.value) return;
|
|
417
|
+
e && (e.cancelable && e.preventDefault(), e.stopPropagation());
|
|
418
|
+
let t = A.value, n = j.value, r = L.inputType;
|
|
419
|
+
n?.[x] && (cancelAnimationFrame(n[x]), n[x] = null), n?.isConnected && t && Cr(n);
|
|
420
|
+
let i = t ? fr(t) ?? {
|
|
421
|
+
x: Number(P.value?.x) || 0,
|
|
422
|
+
y: Number(P.value?.y) || 0
|
|
423
423
|
} : {
|
|
424
|
-
x: Number(
|
|
425
|
-
y: Number(
|
|
426
|
-
}, a =
|
|
427
|
-
x:
|
|
428
|
-
y:
|
|
429
|
-
} :
|
|
430
|
-
x:
|
|
431
|
-
y:
|
|
424
|
+
x: Number(P.value?.x) || 0,
|
|
425
|
+
y: Number(P.value?.y) || 0
|
|
426
|
+
}, a = M.value ? {
|
|
427
|
+
x: M.value.x,
|
|
428
|
+
y: M.value.y
|
|
429
|
+
} : N.value ? {
|
|
430
|
+
x: N.value.x + i.x,
|
|
431
|
+
y: N.value.y + i.y
|
|
432
432
|
} : {
|
|
433
|
-
x:
|
|
434
|
-
y:
|
|
435
|
-
}, o =
|
|
433
|
+
x: z.value + i.x,
|
|
434
|
+
y: B.value + i.y
|
|
435
|
+
}, o = xr(n, t);
|
|
436
436
|
t && (t[S] = {
|
|
437
437
|
x: i.x,
|
|
438
438
|
y: i.y
|
|
439
|
-
}, t[w] = !1, delete t[C]),
|
|
439
|
+
}, t[w] = !1, delete t[C]), P.value = {
|
|
440
440
|
x: i.x,
|
|
441
441
|
y: i.y
|
|
442
|
-
}, sn(),
|
|
443
|
-
|
|
442
|
+
}, sn(), F.value = !1, L.inputType = null, L.touchId = null, L.startPointer = null, L.startOffset = null, L.lastRequestedOffset = null, requestAnimationFrame(() => {
|
|
443
|
+
O("dragEnd", wn(a)), r === "keyboard" && fn(a);
|
|
444
444
|
for (let e of o) e.emitDragEnd(e.position);
|
|
445
445
|
});
|
|
446
446
|
}
|
|
447
|
-
function Cn(e =
|
|
448
|
-
return
|
|
449
|
-
x:
|
|
450
|
-
y:
|
|
451
|
-
} :
|
|
452
|
-
x:
|
|
453
|
-
y:
|
|
447
|
+
function Cn(e = P.value) {
|
|
448
|
+
return M.value ? {
|
|
449
|
+
x: M.value.x,
|
|
450
|
+
y: M.value.y
|
|
451
|
+
} : N.value ? {
|
|
452
|
+
x: N.value.x + (Number(e?.x) || 0),
|
|
453
|
+
y: N.value.y + (Number(e?.y) || 0)
|
|
454
454
|
} : {
|
|
455
|
-
x:
|
|
456
|
-
y:
|
|
455
|
+
x: z.value + (Number(e?.x) || 0),
|
|
456
|
+
y: B.value + (Number(e?.y) || 0)
|
|
457
457
|
};
|
|
458
458
|
}
|
|
459
459
|
function wn(e = Cn()) {
|
|
@@ -469,47 +469,42 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
469
469
|
O(e, wn());
|
|
470
470
|
}
|
|
471
471
|
function En() {
|
|
472
|
-
|
|
472
|
+
Tn("mouseenter");
|
|
473
473
|
}
|
|
474
474
|
function Dn() {
|
|
475
475
|
Tn("mouseleave");
|
|
476
476
|
}
|
|
477
477
|
function On() {
|
|
478
|
-
if (
|
|
478
|
+
if ($e.value !== "pointer") return;
|
|
479
479
|
let e = document.activeElement;
|
|
480
|
-
(e ===
|
|
480
|
+
(e === A.value || e === qe.value) && e.blur?.();
|
|
481
481
|
}
|
|
482
482
|
function kn() {
|
|
483
|
-
|
|
483
|
+
On(), Tn("click");
|
|
484
484
|
}
|
|
485
485
|
function An() {
|
|
486
|
-
|
|
486
|
+
$e.value = "keyboard";
|
|
487
487
|
}
|
|
488
488
|
function jn() {
|
|
489
|
-
|
|
489
|
+
$e.value = "pointer";
|
|
490
490
|
}
|
|
491
491
|
function Mn() {
|
|
492
|
-
|
|
493
|
-
let e = document.activeElement, t =
|
|
492
|
+
$e.value = "pointer";
|
|
493
|
+
let e = document.activeElement, t = qe.value;
|
|
494
494
|
t && e && t.contains(e) && typeof e.blur == "function" && e.blur();
|
|
495
495
|
}
|
|
496
496
|
function Nn(e) {
|
|
497
|
-
|
|
497
|
+
pt.value && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), Tn("click"));
|
|
498
498
|
}
|
|
499
499
|
function Pn(e) {
|
|
500
|
-
let t =
|
|
500
|
+
let t = qe.value;
|
|
501
501
|
t && !t.contains(e.relatedTarget) && Tn("focus");
|
|
502
502
|
}
|
|
503
503
|
function Fn(e) {
|
|
504
|
-
let t =
|
|
504
|
+
let t = qe.value;
|
|
505
505
|
t && !t.contains(e.relatedTarget) && Tn("blur");
|
|
506
506
|
}
|
|
507
|
-
function In() {
|
|
508
|
-
if (I.value || !A.value) return;
|
|
509
|
-
let e = A.value, t = e.parentElement;
|
|
510
|
-
t && t.lastElementChild !== e && t.appendChild(e);
|
|
511
|
-
}
|
|
512
|
-
function Ln(e) {
|
|
507
|
+
function In(e) {
|
|
513
508
|
let t = e.viewBox?.baseVal;
|
|
514
509
|
if (t?.width > 0 && t?.height > 0) return {
|
|
515
510
|
x: t.x,
|
|
@@ -525,7 +520,7 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
525
520
|
height: e.clientHeight || n.height
|
|
526
521
|
};
|
|
527
522
|
}
|
|
528
|
-
function
|
|
523
|
+
function Ln(e) {
|
|
529
524
|
return {
|
|
530
525
|
x: e.x,
|
|
531
526
|
y: e.y,
|
|
@@ -533,7 +528,7 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
533
528
|
height: e.height
|
|
534
529
|
};
|
|
535
530
|
}
|
|
536
|
-
function
|
|
531
|
+
function Rn(e, { top: t = 0, right: n = 0, bottom: r = 0, left: i = 0 } = {}) {
|
|
537
532
|
return {
|
|
538
533
|
x: e.x - i,
|
|
539
534
|
y: e.y - t,
|
|
@@ -549,32 +544,32 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
549
544
|
height: e.height
|
|
550
545
|
};
|
|
551
546
|
}
|
|
552
|
-
function
|
|
547
|
+
function zn(e, t, n = 0) {
|
|
553
548
|
return e.x < t.x + t.width + n && e.x + e.width + n > t.x && e.y < t.y + t.height + n && e.y + e.height + n > t.y;
|
|
554
549
|
}
|
|
555
|
-
function
|
|
550
|
+
function Bn(e, t) {
|
|
556
551
|
return Math.max(0, Math.min(e.x + e.width, t.x + t.width) - Math.max(e.x, t.x)) * Math.max(0, Math.min(e.y + e.height, t.y + t.height) - Math.max(e.y, t.y));
|
|
557
552
|
}
|
|
558
|
-
function
|
|
553
|
+
function Vn(e, t, n = 0) {
|
|
559
554
|
return e.x >= t.x + n && e.y >= t.y + n && e.x + e.width <= t.x + t.width - n && e.y + e.height <= t.y + t.height - n;
|
|
560
555
|
}
|
|
561
|
-
function
|
|
556
|
+
function Hn(e) {
|
|
562
557
|
return [
|
|
563
558
|
"left",
|
|
564
559
|
"center",
|
|
565
560
|
"right"
|
|
566
561
|
].includes(e) ? e : "center";
|
|
567
562
|
}
|
|
568
|
-
function
|
|
563
|
+
function Un(e) {
|
|
569
564
|
return e === "left" ? "start" : e === "right" ? "end" : "middle";
|
|
570
565
|
}
|
|
571
|
-
function
|
|
572
|
-
return e === "left" ? Gt.value : e === "right" ? Kt.value :
|
|
566
|
+
function Wn(e) {
|
|
567
|
+
return e === "left" ? Gt.value : e === "right" ? Kt.value : z.value;
|
|
573
568
|
}
|
|
574
|
-
function
|
|
569
|
+
function Gn(e) {
|
|
575
570
|
return e ? String(e).split(/\r?\n/) : [];
|
|
576
571
|
}
|
|
577
|
-
function
|
|
572
|
+
function Kn(e, t) {
|
|
578
573
|
let n = String(e ?? "");
|
|
579
574
|
if (!n) return 0;
|
|
580
575
|
let r = Number(t?.getAttribute?.("font-size"));
|
|
@@ -591,8 +586,8 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
591
586
|
return e + r * (n >= 4352 && n <= 4607 || n >= 11904 && n <= 40959 || n >= 44032 && n <= 55215 || n >= 63744 && n <= 64255 || n >= 127744 && n <= 129791 ? 1 : .56);
|
|
592
587
|
}, 0);
|
|
593
588
|
}
|
|
594
|
-
function
|
|
595
|
-
if (!e) return
|
|
589
|
+
function qn(e, t = "", n = null) {
|
|
590
|
+
if (!e) return Kn(t, n);
|
|
596
591
|
try {
|
|
597
592
|
let t = e.getComputedTextLength?.();
|
|
598
593
|
if (Number.isFinite(t) && t > 0) return t;
|
|
@@ -605,9 +600,9 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
605
600
|
let t = e.getBoundingClientRect?.().width, n = e.getScreenCTM?.(), r = n ? Math.hypot(n.a, n.b) : 0;
|
|
606
601
|
if (Number.isFinite(t) && t > 0 && Number.isFinite(r) && r > 0) return t / r;
|
|
607
602
|
} catch {}
|
|
608
|
-
return
|
|
603
|
+
return Kn(t, n);
|
|
609
604
|
}
|
|
610
|
-
function
|
|
605
|
+
function Jn(e) {
|
|
611
606
|
if (!e?.isConnected) return null;
|
|
612
607
|
let t = e.parentNode;
|
|
613
608
|
if (!t) return null;
|
|
@@ -615,14 +610,14 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
615
610
|
return n.removeAttribute("id"), n.setAttribute("opacity", "0"), n.setAttribute("pointer-events", "none"), n.setAttribute("text-anchor", "start"), n.setAttribute("x", "0"), n.setAttribute("y", "0"), n.setAttribute("aria-hidden", "true"), t.append(n), {
|
|
616
611
|
measure(t) {
|
|
617
612
|
let r = String(t ?? "");
|
|
618
|
-
return r ? (n.textContent = r,
|
|
613
|
+
return r ? (n.textContent = r, qn(n, r, e)) : 0;
|
|
619
614
|
},
|
|
620
615
|
destroy() {
|
|
621
616
|
n.remove();
|
|
622
617
|
}
|
|
623
618
|
};
|
|
624
619
|
}
|
|
625
|
-
function
|
|
620
|
+
function Yn(e, t, n) {
|
|
626
621
|
if (!e) return [""];
|
|
627
622
|
if (n(e) <= t) return [e];
|
|
628
623
|
let r = [], i = "";
|
|
@@ -632,14 +627,14 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
632
627
|
}
|
|
633
628
|
return i && r.push(i), r.length ? r : [e];
|
|
634
629
|
}
|
|
635
|
-
function
|
|
630
|
+
function Xn(e, t, n) {
|
|
636
631
|
if (e === "") return [""];
|
|
637
632
|
if (n(e) <= t) return [e];
|
|
638
633
|
let r = e.trim().split(/\s+/).filter(Boolean);
|
|
639
634
|
if (!r.length) return [""];
|
|
640
635
|
let i = [], a = "";
|
|
641
636
|
for (let e of r) {
|
|
642
|
-
let r =
|
|
637
|
+
let r = Yn(e, t, n);
|
|
643
638
|
for (let e of r) {
|
|
644
639
|
let r = a ? `${a} ${e}` : e;
|
|
645
640
|
if (!a || n(r) <= t) {
|
|
@@ -651,20 +646,20 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
651
646
|
}
|
|
652
647
|
return a && i.push(a), i.length ? i : [""];
|
|
653
648
|
}
|
|
654
|
-
function
|
|
655
|
-
let i =
|
|
649
|
+
function Zn(e, n, r) {
|
|
650
|
+
let i = Gn(e);
|
|
656
651
|
if (!i.length || !t(n) || n <= 0) return i;
|
|
657
|
-
let a =
|
|
652
|
+
let a = Jn(r);
|
|
658
653
|
if (!a) return i;
|
|
659
654
|
try {
|
|
660
|
-
return i.flatMap((e) =>
|
|
655
|
+
return i.flatMap((e) => Xn(e, n, a.measure));
|
|
661
656
|
} finally {
|
|
662
657
|
a.destroy();
|
|
663
658
|
}
|
|
664
659
|
}
|
|
665
|
-
function
|
|
660
|
+
function Qn(e, t) {
|
|
666
661
|
if (!e.length) return 0;
|
|
667
|
-
let n =
|
|
662
|
+
let n = Jn(t);
|
|
668
663
|
if (!n) return 0;
|
|
669
664
|
try {
|
|
670
665
|
return e.reduce((e, t) => Math.max(e, n.measure(t)), 0);
|
|
@@ -672,51 +667,51 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
672
667
|
n.destroy();
|
|
673
668
|
}
|
|
674
669
|
}
|
|
675
|
-
function
|
|
670
|
+
function $n(e) {
|
|
676
671
|
if (!e) return 0;
|
|
677
672
|
let t = Array.from(e.querySelectorAll("tspan"));
|
|
678
|
-
return t.length ? t.reduce((t, n) => Math.max(t,
|
|
673
|
+
return t.length ? t.reduce((t, n) => Math.max(t, qn(n, n.textContent ?? "", e)), 0) : qn(e, e.textContent ?? "", e);
|
|
679
674
|
}
|
|
680
|
-
function
|
|
675
|
+
function er(e, n, r) {
|
|
681
676
|
if (!t(e) || !t(n) || !t(r) || e <= 0 || n <= r) return e;
|
|
682
677
|
let i = r / n;
|
|
683
678
|
return Math.max(1, e * i * .985);
|
|
684
679
|
}
|
|
685
|
-
function
|
|
686
|
-
let e =
|
|
687
|
-
|
|
680
|
+
function tr() {
|
|
681
|
+
let e = $n(Xe.value), t = $n(Ze.value);
|
|
682
|
+
Z.value = e || Qn(X.value, Xe.value), Ht.value = t || Qn(Vt.value, Ze.value), Ut.value = Math.max(Z.value + Nt.value, Ht.value, 0);
|
|
688
683
|
}
|
|
689
|
-
async function
|
|
684
|
+
async function nr() {
|
|
690
685
|
await h();
|
|
691
|
-
let e =
|
|
686
|
+
let e = Rt.value;
|
|
692
687
|
if (!e) {
|
|
693
|
-
|
|
688
|
+
X.value = Gn(k.value.title.text), Vt.value = Gn(k.value.content.text), await h(), tr(), await h(), $();
|
|
694
689
|
return;
|
|
695
690
|
}
|
|
696
|
-
let t =
|
|
691
|
+
let t = zt.value ?? e, n = e, r = t, i = n;
|
|
697
692
|
for (let e = 0; e < 8; e += 1) {
|
|
698
|
-
|
|
699
|
-
let e =
|
|
693
|
+
X.value = Zn(k.value.title.text, r, Xe.value), Vt.value = Zn(k.value.content.text, i, Ze.value), await h();
|
|
694
|
+
let e = $n(Xe.value), a = $n(Ze.value), o = !k.value.title.text || e <= t + .25, s = !k.value.content.text || a <= n + .25;
|
|
700
695
|
if (o && s) break;
|
|
701
|
-
o || (r =
|
|
696
|
+
o || (r = er(r, e, t)), s || (i = er(i, a, n));
|
|
702
697
|
}
|
|
703
|
-
|
|
698
|
+
tr(), await h(), $();
|
|
704
699
|
}
|
|
705
|
-
function
|
|
700
|
+
function rr(e, t, n) {
|
|
706
701
|
let i = n.x + y - e.x, a = n.x + n.width - y - (e.x + e.width), o = n.y + y - e.y, s = n.y + n.height - y - (e.y + e.height), c, l;
|
|
707
702
|
return c = i <= a ? r(t.x, i, a) : n.x + n.width / 2 - (e.x + e.width / 2), l = o <= s ? r(t.y, o, s) : n.y + n.height / 2 - (e.y + e.height / 2), {
|
|
708
703
|
x: c,
|
|
709
704
|
y: l
|
|
710
705
|
};
|
|
711
706
|
}
|
|
712
|
-
function
|
|
707
|
+
function ir(e, n) {
|
|
713
708
|
let r = [{
|
|
714
709
|
x: 0,
|
|
715
710
|
y: 0,
|
|
716
711
|
direction: "none"
|
|
717
712
|
}], i = e.x + e.width / 2, a = e.y + e.height / 2;
|
|
718
713
|
for (let o of n) {
|
|
719
|
-
let n = t(o.gap) ? Math.max(0, Number(o.gap)) :
|
|
714
|
+
let n = t(o.gap) ? Math.max(0, Number(o.gap)) : ot.value, s = o.x + o.width / 2, c = o.y + o.height / 2, l = o.y - n - (e.y + e.height), u = o.y + o.height + n - e.y, d = o.x - n - (e.x + e.width), f = o.x + o.width + n - e.x;
|
|
720
715
|
r.push({
|
|
721
716
|
x: 0,
|
|
722
717
|
y: l,
|
|
@@ -751,7 +746,7 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
751
746
|
direction: "right"
|
|
752
747
|
});
|
|
753
748
|
}
|
|
754
|
-
let o = Math.max(e.width * .5 +
|
|
749
|
+
let o = Math.max(e.width * .5 + ot.value, 12), s = Math.max(e.height * .5 + ot.value, 12);
|
|
755
750
|
for (let e = 1; e <= Ae; e += 1) {
|
|
756
751
|
let t = o * e, n = s * e;
|
|
757
752
|
r.push({
|
|
@@ -806,22 +801,22 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
806
801
|
}
|
|
807
802
|
return r;
|
|
808
803
|
}
|
|
809
|
-
function
|
|
804
|
+
function ar(e) {
|
|
810
805
|
let t = /* @__PURE__ */ new Set();
|
|
811
806
|
return e.filter((e) => {
|
|
812
807
|
let n = [e.x.toFixed(3), e.y.toFixed(3)].join(":");
|
|
813
808
|
return !t.has(n) && (t.add(n), !0);
|
|
814
809
|
});
|
|
815
810
|
}
|
|
816
|
-
function
|
|
811
|
+
function or(e, t, n) {
|
|
817
812
|
if (e.preferred) return -(2 ** 53 - 1);
|
|
818
813
|
let r = Math.hypot(e.x, e.y);
|
|
819
814
|
return t === "auto" || e.direction === "none" || e.direction === t ? r : r + Math.max(n.width, n.height) * 2;
|
|
820
815
|
}
|
|
821
|
-
function
|
|
822
|
-
return n.some((n) =>
|
|
816
|
+
function sr(e, n) {
|
|
817
|
+
return n.some((n) => zn(e, n, t(n.gap) ? Math.max(0, Number(n.gap)) : ke));
|
|
823
818
|
}
|
|
824
|
-
function
|
|
819
|
+
function cr(e) {
|
|
825
820
|
let n = t(e?.gap) ? Math.max(0, Number(e.gap)) : ke;
|
|
826
821
|
return {
|
|
827
822
|
x: e.x - n,
|
|
@@ -830,15 +825,15 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
830
825
|
height: e.height + n * 2
|
|
831
826
|
};
|
|
832
827
|
}
|
|
833
|
-
function
|
|
828
|
+
function lr({ baseRect: e, requestedOffset: n, previousOffset: r = null, hardObstacles: i, bounds: a, overflow: o }) {
|
|
834
829
|
let s = {
|
|
835
830
|
x: t(n?.x) ? Number(n.x) : 0,
|
|
836
831
|
y: t(n?.y) ? Number(n.y) : 0
|
|
837
832
|
};
|
|
838
|
-
o || (s =
|
|
833
|
+
o || (s = rr(e, s, a));
|
|
839
834
|
for (let t of i) {
|
|
840
|
-
let n =
|
|
841
|
-
if (!
|
|
835
|
+
let n = cr(t), i = Q(e, s);
|
|
836
|
+
if (!zn(i, n)) continue;
|
|
842
837
|
let c = [
|
|
843
838
|
{
|
|
844
839
|
x: s.x + n.x - (i.x + i.width),
|
|
@@ -856,7 +851,7 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
856
851
|
x: s.x,
|
|
857
852
|
y: s.y + n.y + n.height - i.y
|
|
858
853
|
}
|
|
859
|
-
], l = o ? c : c.filter((t) =>
|
|
854
|
+
], l = o ? c : c.filter((t) => Vn(Q(e, t), a, y)), u = l.length ? l : c;
|
|
860
855
|
u.sort((e, t) => {
|
|
861
856
|
let n = Math.hypot(e.x - s.x, e.y - s.y), i = Math.hypot(t.x - s.x, t.y - s.y);
|
|
862
857
|
return n === i ? r ? Math.hypot(e.x - r.x, e.y - r.y) - Math.hypot(t.x - r.x, t.y - r.y) : 0 : n - i;
|
|
@@ -864,24 +859,24 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
864
859
|
}
|
|
865
860
|
return s;
|
|
866
861
|
}
|
|
867
|
-
function
|
|
868
|
-
let l =
|
|
862
|
+
function ur({ baseRect: e, occupiedRects: n, hardObstacles: r, bounds: i, position: a, overflow: o, preferredOffset: s = null, ignoreOccupied: c = !1 }) {
|
|
863
|
+
let l = ir(e, c ? [...r] : [...n, ...r]);
|
|
869
864
|
s && t(s.x) && t(s.y) && l.unshift({
|
|
870
865
|
x: Number(s.x),
|
|
871
866
|
y: Number(s.y),
|
|
872
867
|
direction: "manual",
|
|
873
868
|
preferred: !0
|
|
874
869
|
}), o || (l = l.map((t) => {
|
|
875
|
-
let n =
|
|
870
|
+
let n = rr(e, t, i);
|
|
876
871
|
return {
|
|
877
872
|
...t,
|
|
878
873
|
x: n.x,
|
|
879
874
|
y: n.y
|
|
880
875
|
};
|
|
881
|
-
})), l =
|
|
876
|
+
})), l = ar(l), l.sort((e, t) => or(e, a, i) - or(t, a, i));
|
|
882
877
|
function u(t) {
|
|
883
878
|
let a = Q(e, t);
|
|
884
|
-
return !(!o && !
|
|
879
|
+
return !(!o && !Vn(a, i, y) || sr(a, r) || !c && n.some((e) => zn(a, e, ot.value)));
|
|
885
880
|
}
|
|
886
881
|
for (let t of l) if (u(t)) {
|
|
887
882
|
if (!t.preferred && [
|
|
@@ -898,49 +893,49 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
898
893
|
let d = null, f = Infinity, p = Infinity;
|
|
899
894
|
for (let t of l) {
|
|
900
895
|
let s = Q(e, t);
|
|
901
|
-
if (!o && !
|
|
902
|
-
let l = c ? 0 : n.reduce((e, t) => e +
|
|
896
|
+
if (!o && !Vn(s, i, y) || sr(s, r)) continue;
|
|
897
|
+
let l = c ? 0 : n.reduce((e, t) => e + Bn(s, t), 0), u = or(t, a, i);
|
|
903
898
|
(l < f || l === f && u < p) && (f = l, p = u, d = t);
|
|
904
899
|
}
|
|
905
900
|
if (d) return d;
|
|
906
|
-
let m =
|
|
907
|
-
for (let t of m) if (!
|
|
901
|
+
let m = ar(ir(e, r)).sort((e, t) => or(e, a, i) - or(t, a, i));
|
|
902
|
+
for (let t of m) if (!sr(Q(e, t), r)) return t;
|
|
908
903
|
return {
|
|
909
904
|
x: 0,
|
|
910
905
|
y: 0,
|
|
911
906
|
direction: "none"
|
|
912
907
|
};
|
|
913
908
|
}
|
|
914
|
-
function
|
|
909
|
+
function dr(e, n) {
|
|
915
910
|
let r = e?.[n];
|
|
916
911
|
return !r || !t(r.x) || !t(r.y) ? null : {
|
|
917
912
|
x: Number(r.x),
|
|
918
913
|
y: Number(r.y)
|
|
919
914
|
};
|
|
920
915
|
}
|
|
916
|
+
function fr(e) {
|
|
917
|
+
return dr(e, S);
|
|
918
|
+
}
|
|
921
919
|
function pr(e) {
|
|
922
|
-
return
|
|
920
|
+
return dr(e, C);
|
|
923
921
|
}
|
|
924
922
|
function mr(e) {
|
|
925
|
-
return fr(e, C);
|
|
926
|
-
}
|
|
927
|
-
function hr(e) {
|
|
928
923
|
let n = e?.dataset?.boxPositionX, r = e?.dataset?.boxPositionY;
|
|
929
924
|
return n === "" || r === "" || !t(n) || !t(r) ? null : {
|
|
930
925
|
x: Number(n),
|
|
931
926
|
y: Number(r)
|
|
932
927
|
};
|
|
933
928
|
}
|
|
934
|
-
function
|
|
929
|
+
function hr(e) {
|
|
935
930
|
return Number.isFinite(e?.[Re]) ? e[Re] : -1;
|
|
936
931
|
}
|
|
937
|
-
function
|
|
932
|
+
function gr(e) {
|
|
938
933
|
let t = [...e.querySelectorAll(".vue-ui-label")].filter((t) => t.ownerSVGElement === e);
|
|
939
934
|
Number.isFinite(e[Pe]) || (e[Pe] = 0);
|
|
940
935
|
for (let n of t) Number.isFinite(n[b]) || (n[b] = e[Pe], e[Pe] += 1);
|
|
941
936
|
return t.sort((e, t) => e[b] - t[b]);
|
|
942
937
|
}
|
|
943
|
-
function
|
|
938
|
+
function _r(e) {
|
|
944
939
|
let n = Number(e.dataset.targetX), r = Number(e.dataset.targetY);
|
|
945
940
|
return !Number.isFinite(n) || !Number.isFinite(r) ? null : {
|
|
946
941
|
x: n,
|
|
@@ -950,7 +945,7 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
950
945
|
gap: t(e.dataset.linkLength) ? Math.max(0, Number(e.dataset.linkLength)) : ke
|
|
951
946
|
};
|
|
952
947
|
}
|
|
953
|
-
function
|
|
948
|
+
function vr(e, t, n = null, r = null) {
|
|
954
949
|
let i = e?.[Fe];
|
|
955
950
|
typeof i == "function" && i({
|
|
956
951
|
layoutRect: t,
|
|
@@ -958,11 +953,11 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
958
953
|
offset: r
|
|
959
954
|
});
|
|
960
955
|
}
|
|
961
|
-
function
|
|
956
|
+
function yr(e, t, n = .001) {
|
|
962
957
|
return !e || !t ? !1 : Math.abs(Number(e.x) - Number(t.x)) > n || Math.abs(Number(e.y) - Number(t.y)) > n;
|
|
963
958
|
}
|
|
964
|
-
function
|
|
965
|
-
if (!e || !t || !n || !r || !
|
|
959
|
+
function br(e, t, n, r, i) {
|
|
960
|
+
if (!e || !t || !n || !r || !yr(n, r)) return;
|
|
966
961
|
let a = e[E];
|
|
967
962
|
a instanceof Map || (a = /* @__PURE__ */ new Map(), e[E] = a), a.has(t) || a.set(t, {
|
|
968
963
|
x: n.x,
|
|
@@ -972,14 +967,14 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
972
967
|
y: Number(i?.y) || 0
|
|
973
968
|
};
|
|
974
969
|
}
|
|
975
|
-
function
|
|
970
|
+
function xr(e, t) {
|
|
976
971
|
let n = e?.[E];
|
|
977
972
|
if (!(n instanceof Map)) return [];
|
|
978
973
|
let r = [];
|
|
979
974
|
for (let [e, i] of n.entries()) {
|
|
980
975
|
if (!e?.isConnected || e === t) continue;
|
|
981
976
|
let n = e[Be], a = e[T], o = e[Le];
|
|
982
|
-
n &&
|
|
977
|
+
n && yr(i, n) && typeof o == "function" && (a && (e[S] = {
|
|
983
978
|
x: Number(a.x) || 0,
|
|
984
979
|
y: Number(a.y) || 0
|
|
985
980
|
}), r.push({
|
|
@@ -992,16 +987,16 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
992
987
|
}
|
|
993
988
|
return n.clear(), delete e[E], r;
|
|
994
989
|
}
|
|
995
|
-
function
|
|
990
|
+
function Sr({ baseRect: e, offset: t, occupiedRects: n, hardObstacles: r, bounds: i, overflow: a, ignoreOccupied: o = !1 }) {
|
|
996
991
|
if (!t) return !1;
|
|
997
992
|
let s = Q(e, t);
|
|
998
|
-
return !(!a && !
|
|
993
|
+
return !(!a && !Vn(s, i, y) || sr(s, r) || !o && n.some((e) => zn(s, e, 0)));
|
|
999
994
|
}
|
|
1000
|
-
function
|
|
995
|
+
function Cr(e) {
|
|
1001
996
|
if (!e?.isConnected) return;
|
|
1002
|
-
let n =
|
|
997
|
+
let n = gr(e);
|
|
1003
998
|
if (!n.length) return;
|
|
1004
|
-
let r =
|
|
999
|
+
let r = In(e);
|
|
1005
1000
|
for (let e of n) e.setAttribute("transform", "translate(0 0)");
|
|
1006
1001
|
let i = [];
|
|
1007
1002
|
for (let e of n) {
|
|
@@ -1009,19 +1004,19 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
1009
1004
|
try {
|
|
1010
1005
|
r = n.getBBox();
|
|
1011
1006
|
} catch {
|
|
1012
|
-
|
|
1007
|
+
vr(e, null, null, null);
|
|
1013
1008
|
continue;
|
|
1014
1009
|
}
|
|
1015
1010
|
if (!Number.isFinite(r.x) || !Number.isFinite(r.y) || !Number.isFinite(r.width) || !Number.isFinite(r.height) || r.width <= 0 || r.height <= 0) {
|
|
1016
|
-
|
|
1011
|
+
vr(e, null, null, null);
|
|
1017
1012
|
continue;
|
|
1018
1013
|
}
|
|
1019
|
-
let a =
|
|
1014
|
+
let a = Ln(r), o = e.dataset.boxShow === "true", s = {
|
|
1020
1015
|
top: t(e.dataset.boxPaddingTop) ? Math.max(0, Number(e.dataset.boxPaddingTop)) : 0,
|
|
1021
1016
|
right: t(e.dataset.boxPaddingRight) ? Math.max(0, Number(e.dataset.boxPaddingRight)) : 0,
|
|
1022
1017
|
bottom: t(e.dataset.boxPaddingBottom) ? Math.max(0, Number(e.dataset.boxPaddingBottom)) : 0,
|
|
1023
1018
|
left: t(e.dataset.boxPaddingLeft) ? Math.max(0, Number(e.dataset.boxPaddingLeft)) : 0
|
|
1024
|
-
}, c = o ?
|
|
1019
|
+
}, c = o ? Rn(a, s) : a, l = o && t(e.dataset.boxMaxWidth) && Number(e.dataset.boxMaxWidth) > 0 ? Number(e.dataset.boxMaxWidth) : null, u = e.dataset.dragEnabled === "true", d = e.dataset.dragHandlePosition, f = [
|
|
1025
1020
|
"left",
|
|
1026
1021
|
"right",
|
|
1027
1022
|
"top",
|
|
@@ -1058,12 +1053,12 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
1058
1053
|
overlap: e.dataset.overlap === "true",
|
|
1059
1054
|
dragHandlePosition: f,
|
|
1060
1055
|
dragHandleSize: p,
|
|
1061
|
-
targetObstacle:
|
|
1062
|
-
persistedOffset:
|
|
1063
|
-
datasetPosition:
|
|
1064
|
-
requestedDragOffset:
|
|
1056
|
+
targetObstacle: _r(e),
|
|
1057
|
+
persistedOffset: fr(e),
|
|
1058
|
+
datasetPosition: mr(e),
|
|
1059
|
+
requestedDragOffset: pr(e),
|
|
1065
1060
|
dragging: e[w] === !0,
|
|
1066
|
-
dragPriority:
|
|
1061
|
+
dragPriority: hr(e)
|
|
1067
1062
|
});
|
|
1068
1063
|
}
|
|
1069
1064
|
i.sort((e, t) => {
|
|
@@ -1074,7 +1069,7 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
1074
1069
|
let a = i.some((e) => e.dragging), o = i.some((e) => e.dragging && e.overlap), s = [];
|
|
1075
1070
|
for (let t of i) {
|
|
1076
1071
|
let n = t.targetObstacle ? [t.targetObstacle] : [], i;
|
|
1077
|
-
if (t.dragging) i =
|
|
1072
|
+
if (t.dragging) i = lr({
|
|
1078
1073
|
baseRect: t.baseRect,
|
|
1079
1074
|
requestedOffset: t.requestedDragOffset ?? t.persistedOffset,
|
|
1080
1075
|
previousOffset: t.persistedOffset,
|
|
@@ -1099,7 +1094,7 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
1099
1094
|
};
|
|
1100
1095
|
else {
|
|
1101
1096
|
let e = t.label[T];
|
|
1102
|
-
i = a && e &&
|
|
1097
|
+
i = a && e && Sr({
|
|
1103
1098
|
baseRect: t.baseRect,
|
|
1104
1099
|
offset: e,
|
|
1105
1100
|
occupiedRects: s,
|
|
@@ -1111,7 +1106,7 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
1111
1106
|
x: Number(e.x) || 0,
|
|
1112
1107
|
y: Number(e.y) || 0,
|
|
1113
1108
|
direction: "stable"
|
|
1114
|
-
} :
|
|
1109
|
+
} : ur({
|
|
1115
1110
|
baseRect: t.baseRect,
|
|
1116
1111
|
occupiedRects: s,
|
|
1117
1112
|
hardObstacles: n,
|
|
@@ -1127,7 +1122,7 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
1127
1122
|
}
|
|
1128
1123
|
t.label.setAttribute("transform", `translate(${i.x} ${i.y})`);
|
|
1129
1124
|
let c = Q(t.baseRect, i), l = t.label[Be];
|
|
1130
|
-
a && !o && !t.dragging && !t.overlap &&
|
|
1125
|
+
a && !o && !t.dragging && !t.overlap && br(e, t.label, l, c, i), (t.datasetPosition || t.persistedOffset || t.dragging) && (t.label[S] = {
|
|
1131
1126
|
x: i.x,
|
|
1132
1127
|
y: i.y
|
|
1133
1128
|
}), t.label[Be] = {
|
|
@@ -1138,47 +1133,47 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
1138
1133
|
}, t.label[T] = {
|
|
1139
1134
|
x: Number(i.x) || 0,
|
|
1140
1135
|
y: Number(i.y) || 0
|
|
1141
|
-
},
|
|
1136
|
+
}, vr(t.label, c, t.boxShow ? t.baseRect : null, i), t.overlap || s.push(c);
|
|
1142
1137
|
}
|
|
1143
1138
|
}
|
|
1144
|
-
function $(e =
|
|
1139
|
+
function $(e = j.value) {
|
|
1145
1140
|
e?.isConnected && (e[x] || (e[x] = requestAnimationFrame(() => {
|
|
1146
|
-
e[x] = null,
|
|
1141
|
+
e[x] = null, Cr(e);
|
|
1147
1142
|
})));
|
|
1148
1143
|
}
|
|
1149
|
-
function
|
|
1150
|
-
let e =
|
|
1151
|
-
|
|
1144
|
+
function wr() {
|
|
1145
|
+
let e = A.value, t = j.value;
|
|
1146
|
+
Qe.value = !0, P.value = {
|
|
1152
1147
|
x: 0,
|
|
1153
1148
|
y: 0
|
|
1154
|
-
}, e && (
|
|
1149
|
+
}, e && (F.value && (t?.[x] && (cancelAnimationFrame(t[x]), t[x] = null), sn(), F.value = !1, L.inputType = null, L.touchId = null, L.startPointer = null, L.startOffset = null, L.lastRequestedOffset = null), e[w] = !1, delete e[S], delete e[C], delete e[Be], delete e[T], delete e[Re], e.dataset.boxPositionX = "", e.dataset.boxPositionY = "", e.setAttribute("transform", "translate(0 0)"), t?.isConnected && (t[E] = /* @__PURE__ */ new Map(), $(t)));
|
|
1155
1150
|
}
|
|
1156
|
-
return c({ reorder:
|
|
1157
|
-
t && (e[0] !== t[0] || e[1] !== t[1]) && (
|
|
1151
|
+
return c({ reorder: wr }), fe(() => [D.dataset?.position?.x, D.dataset?.position?.y], (e, t) => {
|
|
1152
|
+
t && (e[0] !== t[0] || e[1] !== t[1]) && (Qe.value = !1);
|
|
1158
1153
|
}), fe(() => [
|
|
1159
1154
|
D.dataset?.x,
|
|
1160
1155
|
D.dataset?.y,
|
|
1161
1156
|
D.dataset?.position?.x,
|
|
1162
1157
|
D.dataset?.position?.y
|
|
1163
1158
|
], () => {
|
|
1164
|
-
if (!
|
|
1159
|
+
if (!xt.value && A.value && !F.value) {
|
|
1165
1160
|
let e = D.dataset?.position;
|
|
1166
|
-
e && (e.x === null || e.x === void 0 || e.y === null || e.y === void 0) && (delete
|
|
1161
|
+
e && (e.x === null || e.x === void 0 || e.y === null || e.y === void 0) && (delete A.value[S], P.value = {
|
|
1167
1162
|
x: 0,
|
|
1168
1163
|
y: 0
|
|
1169
1164
|
});
|
|
1170
1165
|
}
|
|
1171
|
-
|
|
1166
|
+
nr();
|
|
1172
1167
|
}, { flush: "post" }), fe(() => D.config, () => {
|
|
1173
|
-
!
|
|
1168
|
+
!W.value && F.value && Sn(), nr();
|
|
1174
1169
|
}, {
|
|
1175
1170
|
deep: !0,
|
|
1176
1171
|
flush: "post"
|
|
1177
1172
|
}), se(async () => {
|
|
1178
|
-
await h(), window.addEventListener("keydown", An, !0), window.addEventListener("pointerdown", jn, !0),
|
|
1179
|
-
let e =
|
|
1173
|
+
await h(), window.addEventListener("keydown", An, !0), window.addEventListener("pointerdown", jn, !0), j.value = A.value?.ownerSVGElement ?? null;
|
|
1174
|
+
let e = j.value, t = A.value, n = Je.value;
|
|
1180
1175
|
e && t && n && (t[Ie] = n, t[Fe] = ({ layoutRect: e, boxRect: t, offset: n }) => {
|
|
1181
|
-
|
|
1176
|
+
M.value = e, N.value = t, n && (P.value = {
|
|
1182
1177
|
x: Number(n.x) || 0,
|
|
1183
1178
|
y: Number(n.y) || 0
|
|
1184
1179
|
});
|
|
@@ -1190,34 +1185,34 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
1190
1185
|
y: Number(e?.y) || 0
|
|
1191
1186
|
}
|
|
1192
1187
|
});
|
|
1193
|
-
},
|
|
1194
|
-
n.some((e) => !(e.type === "attributes" && e.target === t && e.attributeName === "transform" || e.type === "attributes" && e.target ===
|
|
1195
|
-
}),
|
|
1188
|
+
}, st = new MutationObserver((n) => {
|
|
1189
|
+
n.some((e) => !(e.type === "attributes" && e.target === t && e.attributeName === "transform" || e.type === "attributes" && e.target === Ye.value)) && $(e);
|
|
1190
|
+
}), st.observe(t, {
|
|
1196
1191
|
subtree: !0,
|
|
1197
1192
|
childList: !0,
|
|
1198
1193
|
characterData: !0,
|
|
1199
1194
|
attributes: !0
|
|
1200
|
-
}), "ResizeObserver" in window && (
|
|
1195
|
+
}), "ResizeObserver" in window && (ct = new ResizeObserver(() => {
|
|
1201
1196
|
$(e);
|
|
1202
|
-
}),
|
|
1203
|
-
|
|
1204
|
-
}),
|
|
1197
|
+
}), ct.observe(e)), document.fonts?.ready?.then(() => {
|
|
1198
|
+
nr();
|
|
1199
|
+
}), nr());
|
|
1205
1200
|
}), oe(() => {
|
|
1206
|
-
sn(), window.removeEventListener("keydown", An, !0), window.removeEventListener("pointerdown", jn, !0),
|
|
1201
|
+
sn(), window.removeEventListener("keydown", An, !0), window.removeEventListener("pointerdown", jn, !0), st?.disconnect(), ct?.disconnect(), I?.remove(), I = null, A.value && (delete A.value[Fe], delete A.value[Ie], delete A.value[Le], delete A.value[Be], delete A.value[T], delete A.value[S], delete A.value[C], delete A.value[w], delete A.value[Re]), F.value = !1, L.inputType = null, L.touchId = null, L.startPointer = null, L.startOffset = null, L.lastRequestedOffset = null, M.value = null, N.value = null, P.value = {
|
|
1207
1202
|
x: 0,
|
|
1208
1203
|
y: 0
|
|
1209
1204
|
};
|
|
1210
|
-
let e =
|
|
1205
|
+
let e = j.value;
|
|
1211
1206
|
if (e) {
|
|
1212
1207
|
let t = e[E];
|
|
1213
|
-
t instanceof Map &&
|
|
1208
|
+
t instanceof Map && A.value && t.delete(A.value), requestAnimationFrame(() => {
|
|
1214
1209
|
$(e);
|
|
1215
1210
|
});
|
|
1216
1211
|
}
|
|
1217
1212
|
}), (e, t) => (g(), m("g", {
|
|
1218
1213
|
ref_key: "wrapperRef",
|
|
1219
|
-
ref:
|
|
1220
|
-
class: re(["vue-ui-label-wrapper", { "vue-ui-label-wrapper--keyboard-focus":
|
|
1214
|
+
ref: qe,
|
|
1215
|
+
class: re(["vue-ui-label-wrapper", { "vue-ui-label-wrapper--keyboard-focus": $e.value === "keyboard" }]),
|
|
1221
1216
|
focusable: "false",
|
|
1222
1217
|
onPointerdownCapture: Mn,
|
|
1223
1218
|
onMouseenter: En,
|
|
@@ -1230,99 +1225,99 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
1230
1225
|
class: "vue-ui-label__link",
|
|
1231
1226
|
d: Qt.value.d,
|
|
1232
1227
|
fill: "none",
|
|
1233
|
-
stroke:
|
|
1234
|
-
"stroke-width":
|
|
1235
|
-
"stroke-dasharray":
|
|
1228
|
+
stroke: V.value.stroke,
|
|
1229
|
+
"stroke-width": V.value.strokeWidth,
|
|
1230
|
+
"stroke-dasharray": V.value.strokeDasharray,
|
|
1236
1231
|
"stroke-linecap": "round",
|
|
1237
1232
|
"pointer-events": "none",
|
|
1238
1233
|
"aria-hidden": "true",
|
|
1239
1234
|
focusable: "false"
|
|
1240
1235
|
}, null, 8, he)) : p("", !0),
|
|
1241
|
-
|
|
1236
|
+
V.value.targetPlot.show ? (g(), m("circle", {
|
|
1242
1237
|
key: 1,
|
|
1243
|
-
cx:
|
|
1244
|
-
cy:
|
|
1245
|
-
r:
|
|
1246
|
-
fill:
|
|
1247
|
-
stroke:
|
|
1248
|
-
"stroke-width":
|
|
1238
|
+
cx: z.value,
|
|
1239
|
+
cy: B.value,
|
|
1240
|
+
r: V.value.targetPlot.radius,
|
|
1241
|
+
fill: V.value.stroke,
|
|
1242
|
+
stroke: V.value.targetPlot.stroke,
|
|
1243
|
+
"stroke-width": V.value.strokeWidth,
|
|
1249
1244
|
"paint-order": "stroke fill"
|
|
1250
1245
|
}, null, 8, ge)) : p("", !0),
|
|
1251
1246
|
ee("g", {
|
|
1252
1247
|
ref_key: "labelRef",
|
|
1253
|
-
ref:
|
|
1248
|
+
ref: A,
|
|
1254
1249
|
class: "vue-ui-label",
|
|
1255
1250
|
focusable: "false",
|
|
1256
1251
|
id: `label_${de(Ke)}`,
|
|
1257
1252
|
"data-position": k.value.position,
|
|
1258
1253
|
"data-overflow": String(k.value.overflow),
|
|
1259
|
-
"data-overlap": String(
|
|
1260
|
-
"data-target-x":
|
|
1261
|
-
"data-target-y":
|
|
1262
|
-
"data-box-position-x":
|
|
1263
|
-
"data-box-position-y":
|
|
1264
|
-
"data-link-length":
|
|
1265
|
-
"data-box-show": String(
|
|
1266
|
-
"data-box-max-width":
|
|
1267
|
-
"data-box-padding-top":
|
|
1268
|
-
"data-box-padding-right":
|
|
1269
|
-
"data-box-padding-bottom":
|
|
1270
|
-
"data-box-padding-left":
|
|
1271
|
-
"data-drag-enabled": String(
|
|
1272
|
-
"data-drag-handle-position":
|
|
1273
|
-
"data-drag-handle-size":
|
|
1254
|
+
"data-overlap": String(dt.value),
|
|
1255
|
+
"data-target-x": R.value ? z.value : "",
|
|
1256
|
+
"data-target-y": R.value ? B.value : "",
|
|
1257
|
+
"data-box-position-x": St.value ? St.value.x : "",
|
|
1258
|
+
"data-box-position-y": St.value ? St.value.y : "",
|
|
1259
|
+
"data-link-length": V.value.show ? Ct.value : ke,
|
|
1260
|
+
"data-box-show": String(H.value.show),
|
|
1261
|
+
"data-box-max-width": K.value !== null && K.value > 0 ? K.value : "",
|
|
1262
|
+
"data-box-padding-top": G.value.top,
|
|
1263
|
+
"data-box-padding-right": G.value.right,
|
|
1264
|
+
"data-box-padding-bottom": G.value.bottom,
|
|
1265
|
+
"data-box-padding-left": G.value.left,
|
|
1266
|
+
"data-drag-enabled": String(W.value),
|
|
1267
|
+
"data-drag-handle-position": bt.value,
|
|
1268
|
+
"data-drag-handle-size": It.value,
|
|
1274
1269
|
onClick: kn
|
|
1275
1270
|
}, [
|
|
1276
|
-
|
|
1271
|
+
q.value ? (g(), m("rect", {
|
|
1277
1272
|
key: 0,
|
|
1278
1273
|
ref_key: "boxRef",
|
|
1279
|
-
ref:
|
|
1274
|
+
ref: Ye,
|
|
1280
1275
|
class: "vue-ui-label__box",
|
|
1281
|
-
x:
|
|
1282
|
-
y:
|
|
1283
|
-
width:
|
|
1284
|
-
height:
|
|
1285
|
-
rx:
|
|
1286
|
-
fill:
|
|
1287
|
-
stroke:
|
|
1288
|
-
"stroke-width":
|
|
1276
|
+
x: q.value.x,
|
|
1277
|
+
y: q.value.y,
|
|
1278
|
+
width: q.value.width,
|
|
1279
|
+
height: q.value.height,
|
|
1280
|
+
rx: q.value.rx,
|
|
1281
|
+
fill: H.value.backgroundColor,
|
|
1282
|
+
stroke: H.value.borderColor,
|
|
1283
|
+
"stroke-width": Pt.value,
|
|
1289
1284
|
"aria-hidden": "true",
|
|
1290
1285
|
focusable: "false"
|
|
1291
1286
|
}, null, 8, ve)) : p("", !0),
|
|
1292
|
-
|
|
1287
|
+
Y.value ? (g(), m("rect", {
|
|
1293
1288
|
key: 1,
|
|
1294
1289
|
class: "vue-ui-label__action-target",
|
|
1295
|
-
x:
|
|
1296
|
-
y:
|
|
1297
|
-
width:
|
|
1298
|
-
height:
|
|
1299
|
-
rx:
|
|
1290
|
+
x: Y.value.x,
|
|
1291
|
+
y: Y.value.y,
|
|
1292
|
+
width: Y.value.width,
|
|
1293
|
+
height: Y.value.height,
|
|
1294
|
+
rx: Y.value.rx,
|
|
1300
1295
|
fill: "transparent",
|
|
1301
1296
|
"pointer-events": "none",
|
|
1302
1297
|
role: "button",
|
|
1303
1298
|
tabindex: "0",
|
|
1304
|
-
"aria-label":
|
|
1299
|
+
"aria-label": mt.value,
|
|
1305
1300
|
onKeydown: Nn
|
|
1306
1301
|
}, null, 40, ye)) : p("", !0),
|
|
1307
1302
|
le(e.$slots, "before", ie(ne({
|
|
1308
1303
|
...D,
|
|
1309
|
-
box:
|
|
1304
|
+
box: q.value
|
|
1310
1305
|
})), void 0, !0),
|
|
1311
1306
|
ee("g", {
|
|
1312
1307
|
ref_key: "contentRef",
|
|
1313
|
-
ref:
|
|
1308
|
+
ref: Je,
|
|
1314
1309
|
class: "vue-ui-label__body"
|
|
1315
1310
|
}, [le(e.$slots, "title", ie(ne({
|
|
1316
1311
|
...D,
|
|
1317
|
-
box:
|
|
1312
|
+
box: q.value
|
|
1318
1313
|
})), () => [
|
|
1319
|
-
|
|
1314
|
+
jt.value && Yt.value && R.value ? (g(), f(s, {
|
|
1320
1315
|
key: 0,
|
|
1321
1316
|
class: "vue-ui-label__marker",
|
|
1322
1317
|
plot: Yt.value,
|
|
1323
|
-
radius:
|
|
1324
|
-
shape:
|
|
1325
|
-
color:
|
|
1318
|
+
radius: At.value,
|
|
1319
|
+
shape: U.value.shape,
|
|
1320
|
+
color: U.value.color,
|
|
1326
1321
|
"pointer-events": "none",
|
|
1327
1322
|
"aria-hidden": "true",
|
|
1328
1323
|
focusable: "false"
|
|
@@ -1332,27 +1327,27 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
1332
1327
|
"shape",
|
|
1333
1328
|
"color"
|
|
1334
1329
|
])) : p("", !0),
|
|
1335
|
-
k.value.title.text &&
|
|
1330
|
+
k.value.title.text && R.value ? (g(), m("text", {
|
|
1336
1331
|
key: 1,
|
|
1337
1332
|
ref_key: "titleTextRef",
|
|
1338
|
-
ref:
|
|
1333
|
+
ref: Xe,
|
|
1339
1334
|
class: "vue-ui-label__title",
|
|
1340
|
-
"font-size":
|
|
1335
|
+
"font-size": et.value,
|
|
1341
1336
|
"font-weight": k.value.title.bold ? "bold" : "normal",
|
|
1342
|
-
"text-anchor":
|
|
1337
|
+
"text-anchor": Et.value,
|
|
1343
1338
|
fill: k.value.title.color
|
|
1344
|
-
}, [(g(!0), m(u, null, ce(
|
|
1339
|
+
}, [(g(!0), m(u, null, ce(X.value, (e, t) => (g(), m("tspan", {
|
|
1345
1340
|
key: `title_${t}`,
|
|
1346
1341
|
x: Jt.value,
|
|
1347
|
-
y:
|
|
1342
|
+
y: B.value + t * tt.value
|
|
1348
1343
|
}, ue(e), 9, xe))), 128))], 8, be)) : p("", !0),
|
|
1349
|
-
!
|
|
1344
|
+
!jt.value && Yt.value && R.value ? (g(), f(s, {
|
|
1350
1345
|
key: 2,
|
|
1351
1346
|
class: "vue-ui-label__marker",
|
|
1352
1347
|
plot: Yt.value,
|
|
1353
|
-
radius:
|
|
1354
|
-
shape:
|
|
1355
|
-
color:
|
|
1348
|
+
radius: At.value,
|
|
1349
|
+
shape: U.value.shape,
|
|
1350
|
+
color: U.value.color,
|
|
1356
1351
|
"pointer-events": "none",
|
|
1357
1352
|
"aria-hidden": "true",
|
|
1358
1353
|
focusable: "false"
|
|
@@ -1364,62 +1359,63 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
1364
1359
|
])) : p("", !0)
|
|
1365
1360
|
], !0), le(e.$slots, "content", ie(ne({
|
|
1366
1361
|
...D,
|
|
1367
|
-
box:
|
|
1368
|
-
})), () => [k.value.content.text &&
|
|
1362
|
+
box: q.value
|
|
1363
|
+
})), () => [k.value.content.text && R.value ? (g(), m("text", {
|
|
1369
1364
|
key: 0,
|
|
1370
1365
|
ref_key: "contentTextRef",
|
|
1371
|
-
ref:
|
|
1366
|
+
ref: Ze,
|
|
1372
1367
|
class: "vue-ui-label__content",
|
|
1373
|
-
"font-size":
|
|
1368
|
+
"font-size": nt.value,
|
|
1374
1369
|
"font-weight": k.value.content.bold ? "bold" : "normal",
|
|
1375
|
-
"text-anchor":
|
|
1370
|
+
"text-anchor": Dt.value,
|
|
1376
1371
|
fill: k.value.content.color
|
|
1377
|
-
}, [(g(!0), m(u, null, ce(
|
|
1372
|
+
}, [(g(!0), m(u, null, ce(Vt.value, (e, t) => (g(), m("tspan", {
|
|
1378
1373
|
key: `content_${t}`,
|
|
1379
1374
|
x: Xt.value,
|
|
1380
|
-
y: Zt.value + t *
|
|
1375
|
+
y: Zt.value + t * rt.value
|
|
1381
1376
|
}, ue(e), 9, Ce))), 128))], 8, Se)) : p("", !0)], !0)], 512),
|
|
1382
1377
|
le(e.$slots, "after", ie(ne({
|
|
1383
1378
|
...D,
|
|
1384
|
-
box:
|
|
1379
|
+
box: q.value
|
|
1385
1380
|
})), void 0, !0),
|
|
1386
|
-
|
|
1381
|
+
Bt.value ? (g(), m("g", {
|
|
1387
1382
|
key: 2,
|
|
1388
1383
|
class: "vue-ui-label__drag-handle",
|
|
1389
1384
|
style: ae({
|
|
1390
|
-
cursor:
|
|
1385
|
+
cursor: F.value ? "grabbing" : "grab",
|
|
1391
1386
|
touchAction: "none"
|
|
1392
1387
|
}),
|
|
1393
1388
|
role: "button",
|
|
1394
1389
|
tabindex: "0",
|
|
1395
|
-
"aria-label":
|
|
1396
|
-
"aria-describedby":
|
|
1390
|
+
"aria-label": ht.value,
|
|
1391
|
+
"aria-describedby": gt,
|
|
1397
1392
|
"aria-keyshortcuts": "ArrowUp ArrowDown ArrowLeft ArrowRight",
|
|
1398
1393
|
onKeydown: mn,
|
|
1399
1394
|
onClick: t[0] ||= pe(() => {}, ["stop"]),
|
|
1395
|
+
onPointerdown: t[1] ||= pe(() => {}, ["stop"]),
|
|
1400
1396
|
onMousedown: pe(ln, ["stop", "prevent"]),
|
|
1401
1397
|
onTouchstart: pe(un, ["stop", "prevent"])
|
|
1402
1398
|
}, [
|
|
1403
|
-
ee("desc", { id:
|
|
1404
|
-
|
|
1399
|
+
ee("desc", { id: gt }, ue(_t.value), 1),
|
|
1400
|
+
J.value ? (g(), m("rect", {
|
|
1405
1401
|
key: 0,
|
|
1406
|
-
x:
|
|
1407
|
-
y:
|
|
1408
|
-
width:
|
|
1409
|
-
height:
|
|
1402
|
+
x: J.value.x,
|
|
1403
|
+
y: J.value.y,
|
|
1404
|
+
width: J.value.width,
|
|
1405
|
+
height: J.value.height,
|
|
1410
1406
|
fill: "transparent",
|
|
1411
1407
|
"pointer-events": "all",
|
|
1412
1408
|
"aria-hidden": "true",
|
|
1413
1409
|
focusable: "false"
|
|
1414
1410
|
}, null, 8, Te)) : p("", !0),
|
|
1415
|
-
|
|
1411
|
+
J.value ? (g(), m("rect", {
|
|
1416
1412
|
key: 1,
|
|
1417
1413
|
class: "vue-ui-label__focus-ring",
|
|
1418
|
-
x:
|
|
1419
|
-
y:
|
|
1420
|
-
width:
|
|
1421
|
-
height:
|
|
1422
|
-
rx: Math.min(4,
|
|
1414
|
+
x: J.value.x,
|
|
1415
|
+
y: J.value.y,
|
|
1416
|
+
width: J.value.width,
|
|
1417
|
+
height: J.value.height,
|
|
1418
|
+
rx: Math.min(4, J.value.width / 2, J.value.height / 2),
|
|
1423
1419
|
fill: "none",
|
|
1424
1420
|
stroke: "currentColor",
|
|
1425
1421
|
"stroke-width": "2",
|
|
@@ -1429,17 +1425,17 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
1429
1425
|
}, null, 8, Ee)) : p("", !0),
|
|
1430
1426
|
k.value.drag.showSeparator ? (g(), m("path", {
|
|
1431
1427
|
key: 2,
|
|
1432
|
-
d:
|
|
1433
|
-
stroke:
|
|
1434
|
-
"stroke-width": Math.max(.5,
|
|
1428
|
+
d: Bt.value.separatorPath,
|
|
1429
|
+
stroke: H.value.borderColor,
|
|
1430
|
+
"stroke-width": Math.max(.5, Pt.value),
|
|
1435
1431
|
"pointer-events": "none",
|
|
1436
1432
|
"aria-hidden": "true",
|
|
1437
1433
|
focusable: "false"
|
|
1438
1434
|
}, null, 8, De)) : p("", !0),
|
|
1439
1435
|
ee("path", {
|
|
1440
|
-
d:
|
|
1436
|
+
d: Bt.value.gripPath,
|
|
1441
1437
|
stroke: k.value.drag.iconColor,
|
|
1442
|
-
"stroke-width":
|
|
1438
|
+
"stroke-width": yt.value,
|
|
1443
1439
|
"stroke-linecap": "round",
|
|
1444
1440
|
opacity: k.value.drag.iconOpacity,
|
|
1445
1441
|
"pointer-events": "none",
|
|
@@ -1450,6 +1446,6 @@ var me = /* @__PURE__ */ e({ default: () => D }), he = [
|
|
|
1450
1446
|
], 8, _e)
|
|
1451
1447
|
], 34));
|
|
1452
1448
|
}
|
|
1453
|
-
}, [["__scopeId", "data-v-
|
|
1449
|
+
}, [["__scopeId", "data-v-4fe38f01"]]);
|
|
1454
1450
|
//#endregion
|
|
1455
1451
|
export { me as n, D as t };
|