@farris/ui-vue 1.2.7 → 1.2.8
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/components/accordion/index.esm.js +79 -79
- package/components/avatar/index.esm.js +393 -440
- package/components/border-editor/index.esm.js +4 -4
- package/components/button/index.esm.js +1 -1
- package/components/button-edit/index.esm.js +353 -444
- package/components/button-group/index.esm.js +5 -5
- package/components/calendar/index.esm.js +176 -176
- package/components/capsule/index.esm.js +93 -93
- package/components/checkbox/index.esm.js +496 -542
- package/components/color-picker/index.esm.js +1 -1
- package/components/combo-list/index.esm.js +437 -483
- package/components/combo-tree/index.esm.js +8 -8
- package/components/component/index.esm.js +89 -89
- package/components/condition/index.esm.js +839 -726
- package/components/content-container/index.esm.js +61 -61
- package/components/data-grid/index.esm.js +4702 -4972
- package/components/data-view/index.esm.js +2999 -2875
- package/components/date-picker/index.esm.js +2626 -2672
- package/components/dependent-base/style.js +1 -0
- package/components/dependent-fluid/style.js +1 -0
- package/components/dependent-icon/style.js +1 -0
- package/components/dependent-input/style.js +1 -0
- package/components/dependent-table/style.js +1 -0
- package/components/designer-canvas/index.esm.js +478 -475
- package/components/designer-outline/index.esm.js +173 -131
- package/components/discussion-editor/index.esm.js +1 -1
- package/components/dropdown/index.esm.js +73 -73
- package/components/dynamic-form/index.esm.js +934 -976
- package/components/dynamic-resolver/index.esm.js +67 -35
- package/components/dynamic-view/index.esm.js +258 -249
- package/components/enum-editor/index.esm.js +3 -3
- package/components/events-editor/index.esm.js +178 -178
- package/components/expression-editor/index.esm.js +105 -105
- package/components/external-container/index.esm.js +1892 -1775
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5245 -5514
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1483 -1556
- package/components/flow-canvas/index.esm.js +678 -675
- package/components/image-cropper/index.esm.js +266 -266
- package/components/input-group/index.esm.js +668 -714
- package/components/layout/index.esm.js +148 -148
- package/components/list-nav/index.esm.js +109 -109
- package/components/list-view/index.esm.js +1679 -1563
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +6596 -6865
- package/components/mapping-editor/index.esm.js +5592 -5862
- package/components/message-box/index.esm.js +1 -1
- package/components/modal/index.esm.js +1 -1
- package/components/nav/index.esm.js +86 -86
- package/components/number-range/index.esm.js +1120 -0
- package/components/number-range/package.json +8 -0
- package/components/number-range/style.js +6 -0
- package/components/number-spinner/index.esm.js +1146 -0
- package/components/number-spinner/package.json +8 -0
- package/components/number-spinner/style.js +4 -0
- package/components/order/index.esm.js +988 -1034
- package/components/page-footer/index.esm.js +106 -106
- package/components/page-header/index.esm.js +1088 -1296
- package/components/pagination/index.esm.js +252 -252
- package/components/progress/index.esm.js +37 -37
- package/components/property-editor/index.esm.js +1416 -1462
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +757 -830
- package/components/query-solution/index.css +1 -0
- package/components/query-solution/index.esm.js +6935 -0
- package/components/query-solution/package.json +8 -0
- package/components/query-solution/style.js +2 -0
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-group/index.esm.js +452 -498
- package/components/rate/index.esm.js +92 -92
- package/components/response-layout/index.esm.js +33 -33
- package/components/response-layout-editor/index.esm.js +117 -117
- package/components/response-toolbar/index.esm.js +1021 -1238
- package/components/schema-selector/index.esm.js +3215 -3308
- package/components/search-box/index.esm.js +143 -143
- package/components/section/index.esm.js +209 -209
- package/components/smoke-detector/index.esm.js +22 -22
- package/components/spacing-editor/index.esm.js +2 -2
- package/components/splitter/index.esm.js +1097 -394
- package/components/step/index.esm.js +153 -153
- package/components/switch/index.esm.js +442 -488
- package/components/tabs/index.esm.js +1835 -2004
- package/components/tags/index.esm.js +215 -215
- package/components/text/index.esm.js +53 -53
- package/components/textarea/index.esm.js +451 -482
- package/components/time-picker/index.esm.js +1345 -1392
- package/components/transfer/index.esm.js +135 -135
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5761 -6020
- package/components/tree-view/index.esm.js +2380 -2253
- package/components/uploader/index.esm.js +1 -1
- package/components/verify-detail/index.esm.js +232 -232
- package/components/video/index.esm.js +136 -136
- package/components/weather/index.esm.js +2 -2
- package/farris.all.esm.js +31630 -31224
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/checkbox/index.d.ts +1 -0
- package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
- package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
- package/types/designer-canvas/src/types.d.ts +1 -1
- package/types/dynamic-form/index.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
- package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -1
- package/types/modal/src/modal.props.d.ts +1 -4
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -12
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -26
- package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
- package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
- package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
- package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
- package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
- package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
- package/components/accordion/index.umd.cjs +0 -1
- package/components/avatar/index.umd.cjs +0 -1
- package/components/border-editor/index.umd.cjs +0 -1
- package/components/button/index.umd.cjs +0 -1
- package/components/button-edit/index.umd.cjs +0 -1
- package/components/button-group/index.umd.cjs +0 -1
- package/components/calculator/index.umd.cjs +0 -1
- package/components/calendar/index.umd.cjs +0 -1
- package/components/capsule/index.umd.cjs +0 -1
- package/components/checkbox/index.umd.cjs +0 -1
- package/components/color-picker/index.umd.cjs +0 -3
- package/components/combo-list/index.umd.cjs +0 -1
- package/components/combo-tree/index.umd.cjs +0 -1
- package/components/common/index.umd.cjs +0 -1
- package/components/component/index.umd.cjs +0 -1
- package/components/condition/index.umd.cjs +0 -1
- package/components/content-container/index.umd.cjs +0 -1
- package/components/data-grid/index.umd.cjs +0 -1
- package/components/data-view/index.umd.cjs +0 -1
- package/components/date-picker/index.umd.cjs +0 -1
- package/components/designer-canvas/index.umd.cjs +0 -1
- package/components/designer-outline/index.umd.cjs +0 -1
- package/components/designer-toolbox/index.umd.cjs +0 -1
- package/components/discussion-editor/index.umd.cjs +0 -3
- package/components/discussion-list/index.umd.cjs +0 -1
- package/components/drawer/index.umd.cjs +0 -1
- package/components/dropdown/index.umd.cjs +0 -2
- package/components/dynamic-form/index.umd.cjs +0 -1
- package/components/dynamic-resolver/index.umd.cjs +0 -1
- package/components/dynamic-view/index.umd.cjs +0 -1
- package/components/enum-editor/index.umd.cjs +0 -1
- package/components/events-editor/index.umd.cjs +0 -1
- package/components/expression-editor/index.umd.cjs +0 -1
- package/components/external-container/index.umd.cjs +0 -1
- package/components/field-selector/index.umd.cjs +0 -1
- package/components/filter-bar/index.umd.cjs +0 -1
- package/components/flow-canvas/index.umd.cjs +0 -1
- package/components/image-cropper/index.umd.cjs +0 -1
- package/components/input-group/index.umd.cjs +0 -1
- package/components/layout/index.umd.cjs +0 -1
- package/components/list-nav/index.umd.cjs +0 -1
- package/components/list-view/index.umd.cjs +0 -1
- package/components/loading/index.umd.cjs +0 -8
- package/components/locale/index.umd.cjs +0 -1
- package/components/lookup/index.umd.cjs +0 -1
- package/components/mapping-editor/index.umd.cjs +0 -1
- package/components/message-box/index.umd.cjs +0 -1
- package/components/modal/index.umd.cjs +0 -1
- package/components/nav/index.umd.cjs +0 -3
- package/components/notify/index.umd.cjs +0 -1
- package/components/order/index.umd.cjs +0 -1
- package/components/page-footer/index.umd.cjs +0 -1
- package/components/page-header/index.umd.cjs +0 -1
- package/components/pagination/index.umd.cjs +0 -1
- package/components/popover/index.umd.cjs +0 -1
- package/components/progress/index.umd.cjs +0 -3
- package/components/property-editor/index.umd.cjs +0 -3
- package/components/property-panel/index.umd.cjs +0 -1
- package/components/radio-button/index.umd.cjs +0 -1
- package/components/radio-group/index.umd.cjs +0 -1
- package/components/rate/index.umd.cjs +0 -1
- package/components/response-layout/index.umd.cjs +0 -1
- package/components/response-layout-editor/index.umd.cjs +0 -1
- package/components/response-toolbar/index.umd.cjs +0 -1
- package/components/schema-selector/index.umd.cjs +0 -8
- package/components/search-box/index.umd.cjs +0 -1
- package/components/section/index.umd.cjs +0 -1
- package/components/smoke-detector/index.umd.cjs +0 -1
- package/components/spacing-editor/index.umd.cjs +0 -1
- package/components/splitter/index.umd.cjs +0 -1
- package/components/step/index.umd.cjs +0 -1
- package/components/switch/index.umd.cjs +0 -1
- package/components/tabs/index.umd.cjs +0 -1
- package/components/tags/index.umd.cjs +0 -1
- package/components/text/index.umd.cjs +0 -1
- package/components/textarea/index.umd.cjs +0 -1
- package/components/time-picker/index.umd.cjs +0 -1
- package/components/tooltip/index.umd.cjs +0 -1
- package/components/transfer/index.umd.cjs +0 -1
- package/components/tree-grid/index.umd.cjs +0 -1
- package/components/tree-view/index.umd.cjs +0 -1
- package/components/uploader/index.umd.cjs +0 -2
- package/components/verify-detail/index.umd.cjs +0 -1
- package/components/video/index.umd.cjs +0 -1
- package/components/weather/index.umd.cjs +0 -16
|
@@ -1,111 +1,111 @@
|
|
|
1
|
-
import { inject as Te, ref as v, onMounted as Ae, onUnmounted as lt, watch as K, defineComponent as Ce, createVNode as T, withModifiers as
|
|
1
|
+
import { inject as Te, ref as v, onMounted as Ae, onUnmounted as lt, watch as K, defineComponent as Ce, createVNode as T, withModifiers as O } from "vue";
|
|
2
2
|
import { cloneDeep as nt } from "lodash-es";
|
|
3
3
|
const Se = {}, Ee = {};
|
|
4
4
|
function he(e) {
|
|
5
|
-
const { properties: i, title: r } = e,
|
|
6
|
-
return
|
|
5
|
+
const { properties: i, title: r } = e, m = Object.keys(i).reduce((o, t) => (o[t] = i[t].type === "object" && i[t].properties ? he(i[t]) : nt(i[t].default), o), {});
|
|
6
|
+
return m.id = `${r}-${Date.now()}`, m;
|
|
7
7
|
}
|
|
8
8
|
function ve(e, i = {}) {
|
|
9
9
|
const r = Se[e];
|
|
10
10
|
if (r) {
|
|
11
|
-
let
|
|
12
|
-
const
|
|
13
|
-
return
|
|
11
|
+
let m = he(r);
|
|
12
|
+
const o = Ee[e];
|
|
13
|
+
return m = o ? o({ getSchemaByType: ve }, m, i) : m, m;
|
|
14
14
|
}
|
|
15
15
|
return null;
|
|
16
16
|
}
|
|
17
17
|
function ut(e, i) {
|
|
18
18
|
const r = he(i);
|
|
19
|
-
return Object.keys(e).reduce((
|
|
19
|
+
return Object.keys(e).reduce((m, o) => (m[o] && typeof m[o] == "object" ? Object.assign(m[o], e[o]) : m[o] = e[o], m), r), r;
|
|
20
20
|
}
|
|
21
21
|
function rt(e, i) {
|
|
22
|
-
return Object.keys(e).filter((
|
|
23
|
-
if (i.has(
|
|
24
|
-
const t = i.get(
|
|
22
|
+
return Object.keys(e).filter((m) => e[m] != null).reduce((m, o) => {
|
|
23
|
+
if (i.has(o)) {
|
|
24
|
+
const t = i.get(o);
|
|
25
25
|
if (typeof t == "string")
|
|
26
|
-
|
|
26
|
+
m[t] = e[o];
|
|
27
27
|
else {
|
|
28
|
-
const
|
|
29
|
-
Object.assign(
|
|
28
|
+
const p = t(o, e[o], e);
|
|
29
|
+
Object.assign(m, p);
|
|
30
30
|
}
|
|
31
31
|
} else
|
|
32
|
-
|
|
33
|
-
return
|
|
32
|
+
m[o] = e[o];
|
|
33
|
+
return m;
|
|
34
34
|
}, {});
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
const
|
|
38
|
-
return rt(
|
|
36
|
+
function st(e, i, r = /* @__PURE__ */ new Map()) {
|
|
37
|
+
const m = ut(e, i);
|
|
38
|
+
return rt(m, r);
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
function i(
|
|
42
|
-
if (typeof
|
|
43
|
-
return l[
|
|
44
|
-
if (typeof
|
|
45
|
-
const u = Object.keys(
|
|
40
|
+
function ot(e = {}) {
|
|
41
|
+
function i(s, y, g, l) {
|
|
42
|
+
if (typeof g == "number")
|
|
43
|
+
return l[s].length === g;
|
|
44
|
+
if (typeof g == "object") {
|
|
45
|
+
const u = Object.keys(g)[0], w = g[u];
|
|
46
46
|
if (u === "not")
|
|
47
|
-
return Number(l[
|
|
47
|
+
return Number(l[s].length) !== Number(w);
|
|
48
48
|
if (u === "moreThan")
|
|
49
|
-
return Number(l[
|
|
49
|
+
return Number(l[s].length) >= Number(w);
|
|
50
50
|
if (u === "lessThan")
|
|
51
|
-
return Number(l[
|
|
51
|
+
return Number(l[s].length) <= Number(w);
|
|
52
52
|
}
|
|
53
53
|
return !1;
|
|
54
54
|
}
|
|
55
|
-
function r(
|
|
56
|
-
return l[
|
|
55
|
+
function r(s, y, g, l) {
|
|
56
|
+
return l[s] && l[s].propertyValue && String(l[s].propertyValue.value) === String(g);
|
|
57
57
|
}
|
|
58
|
-
const
|
|
58
|
+
const m = /* @__PURE__ */ new Map([
|
|
59
59
|
["length", i],
|
|
60
60
|
["getProperty", r]
|
|
61
61
|
]);
|
|
62
|
-
Object.keys(e).reduce((
|
|
63
|
-
function s
|
|
64
|
-
const
|
|
65
|
-
return typeof
|
|
62
|
+
Object.keys(e).reduce((s, y) => (s.set(y, e[y]), s), m);
|
|
63
|
+
function o(s, y) {
|
|
64
|
+
const g = s;
|
|
65
|
+
return typeof y == "number" ? [{ target: g, operator: "length", param: null, value: Number(y) }] : typeof y == "boolean" ? [{ target: g, operator: "getProperty", param: s, value: !!y }] : typeof y == "object" ? Object.keys(y).map((l) => {
|
|
66
66
|
if (l === "length")
|
|
67
|
-
return { target:
|
|
68
|
-
const u = l, w =
|
|
69
|
-
return { target:
|
|
67
|
+
return { target: g, operator: "length", param: null, value: y[l] };
|
|
68
|
+
const u = l, w = y[l];
|
|
69
|
+
return { target: g, operator: "getProperty", param: u, value: w };
|
|
70
70
|
}) : [];
|
|
71
71
|
}
|
|
72
|
-
function t(
|
|
73
|
-
return Object.keys(
|
|
74
|
-
const u =
|
|
75
|
-
return
|
|
72
|
+
function t(s) {
|
|
73
|
+
return Object.keys(s).reduce((g, l) => {
|
|
74
|
+
const u = o(l, s[l]);
|
|
75
|
+
return g.push(...u), g;
|
|
76
76
|
}, []);
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
if (
|
|
80
|
-
const
|
|
81
|
-
return
|
|
78
|
+
function p(s, y) {
|
|
79
|
+
if (m.has(s.operator)) {
|
|
80
|
+
const g = m.get(s.operator);
|
|
81
|
+
return g && g(s.target, s.param, s.value, y) || !1;
|
|
82
82
|
}
|
|
83
83
|
return !1;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
return t(
|
|
85
|
+
function b(s, y) {
|
|
86
|
+
return t(s).reduce((u, w) => u && p(w, y), !0);
|
|
87
87
|
}
|
|
88
|
-
function A(
|
|
89
|
-
const
|
|
88
|
+
function A(s, y) {
|
|
89
|
+
const g = Object.keys(s), l = g.includes("allOf"), u = g.includes("anyOf"), w = l || u, W = (w ? s[w ? l ? "allOf" : "anyOf" : "allOf"] : [s]).map((D) => b(D, y));
|
|
90
90
|
return l ? !W.includes(!1) : W.includes(!0);
|
|
91
91
|
}
|
|
92
92
|
return { parseValueSchema: A };
|
|
93
93
|
}
|
|
94
94
|
const ct = {}, ft = {};
|
|
95
|
-
|
|
96
|
-
function vt(e, i, r = /* @__PURE__ */ new Map(),
|
|
97
|
-
return Se[i.title] = i, Ee[i.title] =
|
|
98
|
-
const
|
|
99
|
-
return Object.assign(A,
|
|
95
|
+
ot();
|
|
96
|
+
function vt(e, i, r = /* @__PURE__ */ new Map(), m = (p, b, A) => b, o = {}, t = (p) => p) {
|
|
97
|
+
return Se[i.title] = i, Ee[i.title] = m, ct[i.title] = o, ft[i.title] = t, (p = {}) => {
|
|
98
|
+
const b = st(p, i, r), A = Object.keys(e).reduce((s, y) => (s[y] = e[y].default, s), {});
|
|
99
|
+
return Object.assign(A, b);
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
function ht(e, i) {
|
|
103
103
|
return { customClass: i.class, customStyle: i.style };
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function gt(e, i, r) {
|
|
106
106
|
return i;
|
|
107
107
|
}
|
|
108
|
-
const
|
|
108
|
+
const dt = /* @__PURE__ */ new Map([
|
|
109
109
|
["appearance", ht]
|
|
110
110
|
]), mt = "https://json-schema.org/draft/2020-12/schema", pt = "https://farris-design.gitee.io/image-cropper.schema.json", yt = "image-cropper", xt = "A Farris Component", bt = "object", Mt = {
|
|
111
111
|
id: {
|
|
@@ -238,7 +238,7 @@ const gt = /* @__PURE__ */ new Map([
|
|
|
238
238
|
description: Ct,
|
|
239
239
|
type: St,
|
|
240
240
|
categories: Et
|
|
241
|
-
},
|
|
241
|
+
}, ge = {
|
|
242
242
|
/** 输出图片格式 */
|
|
243
243
|
format: { type: String, default: "png" },
|
|
244
244
|
/** 保持长宽比例 */
|
|
@@ -295,11 +295,11 @@ const gt = /* @__PURE__ */ new Map([
|
|
|
295
295
|
y2: 1e4
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
|
-
}, we = vt(
|
|
298
|
+
}, we = vt(ge, Tt, dt, gt, zt);
|
|
299
299
|
var ae = /* @__PURE__ */ ((e) => (e.Move = "move", e.Resize = "resize", e))(ae || {});
|
|
300
300
|
function kt() {
|
|
301
|
-
function e(
|
|
302
|
-
switch (typeof
|
|
301
|
+
function e(o) {
|
|
302
|
+
switch (typeof o == "string" && (o = i(o)), o) {
|
|
303
303
|
case 2:
|
|
304
304
|
return { rotate: 0, flip: !0 };
|
|
305
305
|
case 3:
|
|
@@ -318,112 +318,112 @@ function kt() {
|
|
|
318
318
|
return { rotate: 0, flip: !1 };
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
|
-
function i(
|
|
322
|
-
const t = new DataView(r(
|
|
321
|
+
function i(o) {
|
|
322
|
+
const t = new DataView(r(o));
|
|
323
323
|
if (t.getUint16(0, !1) !== 65496)
|
|
324
324
|
return -2;
|
|
325
|
-
const
|
|
326
|
-
let
|
|
327
|
-
for (;
|
|
328
|
-
if (t.getUint16(
|
|
329
|
-
const A = t.getUint16(
|
|
330
|
-
if (
|
|
331
|
-
if (t.getUint32(
|
|
325
|
+
const p = t.byteLength;
|
|
326
|
+
let b = 2;
|
|
327
|
+
for (; b < p; ) {
|
|
328
|
+
if (t.getUint16(b + 2, !1) <= 8) return -1;
|
|
329
|
+
const A = t.getUint16(b, !1);
|
|
330
|
+
if (b += 2, A === 65505) {
|
|
331
|
+
if (t.getUint32(b += 2, !1) !== 1165519206)
|
|
332
332
|
return -1;
|
|
333
|
-
const
|
|
334
|
-
|
|
335
|
-
const
|
|
336
|
-
|
|
337
|
-
for (let
|
|
338
|
-
if (t.getUint16(
|
|
339
|
-
return t.getUint16(
|
|
333
|
+
const s = t.getUint16(b += 6, !1) === 18761;
|
|
334
|
+
b += t.getUint32(b + 4, s);
|
|
335
|
+
const y = t.getUint16(b, s);
|
|
336
|
+
b += 2;
|
|
337
|
+
for (let g = 0; g < y; g++)
|
|
338
|
+
if (t.getUint16(b + g * 12, s) === 274)
|
|
339
|
+
return t.getUint16(b + g * 12 + 8, s);
|
|
340
340
|
} else {
|
|
341
341
|
if ((A & 65280) !== 65280)
|
|
342
342
|
break;
|
|
343
|
-
|
|
343
|
+
b += t.getUint16(b, !1);
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
return -1;
|
|
347
347
|
}
|
|
348
|
-
function r(
|
|
349
|
-
|
|
350
|
-
const t = atob(
|
|
351
|
-
for (let A = 0; A <
|
|
352
|
-
|
|
353
|
-
return
|
|
354
|
-
}
|
|
355
|
-
function
|
|
356
|
-
const
|
|
357
|
-
t = Math.round(t),
|
|
358
|
-
const
|
|
348
|
+
function r(o) {
|
|
349
|
+
o = o.replace(/^data:([^;]+);base64,/gmi, "");
|
|
350
|
+
const t = atob(o), p = t.length, b = new Uint8Array(p);
|
|
351
|
+
for (let A = 0; A < p; A++)
|
|
352
|
+
b[A] = t.charCodeAt(A);
|
|
353
|
+
return b.buffer;
|
|
354
|
+
}
|
|
355
|
+
function m(o, t, p) {
|
|
356
|
+
const b = o.width, A = o.height;
|
|
357
|
+
t = Math.round(t), p = Math.round(p);
|
|
358
|
+
const s = b / t, y = A / p, g = Math.ceil(s / 2), l = Math.ceil(y / 2), u = o.getContext("2d");
|
|
359
359
|
if (u) {
|
|
360
|
-
const w = u.getImageData(0, 0,
|
|
361
|
-
for (let P = 0; P <
|
|
360
|
+
const w = u.getImageData(0, 0, b, A), M = u.createImageData(t, p), { data: $ } = w, W = M.data;
|
|
361
|
+
for (let P = 0; P < p; P++)
|
|
362
362
|
for (let D = 0; D < t; D++) {
|
|
363
|
-
const
|
|
364
|
-
let
|
|
365
|
-
const U = Math.floor(D *
|
|
366
|
-
let Q = Math.ceil((D + 1) *
|
|
367
|
-
Q = Math.min(Q,
|
|
363
|
+
const j = (D + P * t) * 4, k = P * y;
|
|
364
|
+
let d = 0, f = 0, h = 0, H = 0, q = 0, C = 0, S = 0;
|
|
365
|
+
const U = Math.floor(D * s), B = Math.floor(P * y);
|
|
366
|
+
let Q = Math.ceil((D + 1) * s), G = Math.ceil((P + 1) * y);
|
|
367
|
+
Q = Math.min(Q, b), G = Math.min(G, A);
|
|
368
368
|
for (let L = B; L < G; L++) {
|
|
369
|
-
const E = Math.abs(k - L) / l, ie = D *
|
|
369
|
+
const E = Math.abs(k - L) / l, ie = D * s, ee = E * E;
|
|
370
370
|
for (let I = U; I < Q; I++) {
|
|
371
|
-
const N = Math.abs(ie - I) /
|
|
371
|
+
const N = Math.abs(ie - I) / g, R = Math.sqrt(ee + N * N);
|
|
372
372
|
if (R >= 1)
|
|
373
373
|
continue;
|
|
374
|
-
|
|
375
|
-
const
|
|
376
|
-
S +=
|
|
374
|
+
d = 2 * R * R * R - 3 * R * R + 1;
|
|
375
|
+
const V = 4 * (I + L * b);
|
|
376
|
+
S += d * $[V + 3], h += d, $[V + 3] < 255 && (d = d * $[V + 3] / 250), H += d * $[V], q += d * $[V + 1], C += d * $[V + 2], f += d;
|
|
377
377
|
}
|
|
378
378
|
}
|
|
379
|
-
W[
|
|
379
|
+
W[j] = H / f, W[j + 1] = q / f, W[j + 2] = C / f, W[j + 3] = S / h;
|
|
380
380
|
}
|
|
381
|
-
|
|
381
|
+
o.width = t, o.height = p, u.putImageData(M, 0, 0);
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
384
|
return {
|
|
385
|
-
resizeCanvas:
|
|
385
|
+
resizeCanvas: m,
|
|
386
386
|
getTransformationsFromExifData: e
|
|
387
387
|
};
|
|
388
388
|
}
|
|
389
|
-
function Dt(e, i, r,
|
|
390
|
-
function
|
|
389
|
+
function Dt(e, i, r, m) {
|
|
390
|
+
function o(l, u) {
|
|
391
391
|
e.value.x2 = e.value.x1 + (e.value.y2 - e.value.y1) * r.value, l = Math.max(e.value.x2 - i.value.width, 0), u = Math.max(0 - e.value.y1, 0), (l > 0 || u > 0) && (e.value.x2 -= u * r.value > l ? u * r.value : l, e.value.y1 += u * r.value > l ? u : l / r.value);
|
|
392
392
|
}
|
|
393
393
|
function t(l, u) {
|
|
394
394
|
e.value.x2 = e.value.x1 + (e.value.y2 - e.value.y1) * r.value, l = Math.max(e.value.x2 - i.value.width, 0), u = Math.max(e.value.y2 - i.value.height, 0), (l > 0 || u > 0) && (e.value.x2 -= u * r.value > l ? u * r.value : l, e.value.y2 -= u * r.value > l ? u : l / r.value);
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function p(l, u) {
|
|
397
397
|
e.value.y1 = e.value.y2 - (e.value.x2 - e.value.x1) / r.value, l = Math.max(0 - e.value.x1, 0), u = Math.max(0 - e.value.y1, 0), (l > 0 || u > 0) && (e.value.x1 += u * r.value > l ? u * r.value : l, e.value.y1 += u * r.value > l ? u : l / r.value);
|
|
398
398
|
}
|
|
399
|
-
function
|
|
399
|
+
function b(l, u) {
|
|
400
400
|
e.value.y1 = e.value.y2 - (e.value.x2 - e.value.x1) / r.value, l = Math.max(e.value.x2 - i.value.width, 0), u = Math.max(0 - e.value.y1, 0), (l > 0 || u > 0) && (e.value.x2 -= u * r.value > l ? u * r.value : l, e.value.y1 += u * r.value > l ? u : l / r.value);
|
|
401
401
|
}
|
|
402
402
|
function A(l, u) {
|
|
403
403
|
e.value.y2 = e.value.y1 + (e.value.x2 - e.value.x1) / r.value, l = Math.max(e.value.x2 - i.value.width, 0), u = Math.max(e.value.y2 - i.value.height, 0), (l > 0 || u > 0) && (e.value.x2 -= u * r.value > l ? u * r.value : l, e.value.y2 -= u * r.value > l ? u : l / r.value);
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function s(l, u) {
|
|
406
406
|
e.value.y2 = e.value.y1 + (e.value.x2 - e.value.x1) / r.value, l = Math.max(0 - e.value.x1, 0), u = Math.max(e.value.y2 - i.value.height, 0), (l > 0 || u > 0) && (e.value.x1 += u * r.value > l ? u * r.value : l, e.value.y2 -= u * r.value > l ? u : l / r.value);
|
|
407
407
|
}
|
|
408
|
-
function
|
|
408
|
+
function y() {
|
|
409
409
|
e.value.x2 = e.value.x1 + (e.value.y2 - e.value.y1) * r.value, e.value.y2 = e.value.y1 + (e.value.x2 - e.value.x1) / r.value;
|
|
410
410
|
const l = Math.max(0 - e.value.x1, 0), u = Math.max(e.value.x2 - i.value.width, 0), w = Math.max(e.value.y2 - i.value.height, 0), M = Math.max(0 - e.value.y1, 0);
|
|
411
411
|
(l > 0 || u > 0 || w > 0 || M > 0) && (e.value.x1 += w * r.value > l ? w * r.value : l, e.value.x2 -= M * r.value > u ? M * r.value : u, e.value.y1 += M * r.value > u ? M : u / r.value, e.value.y2 -= w * r.value > l ? w : l / r.value);
|
|
412
412
|
}
|
|
413
|
-
function
|
|
413
|
+
function g() {
|
|
414
414
|
if (i.value.width && i.value.height)
|
|
415
|
-
switch (
|
|
415
|
+
switch (m.position) {
|
|
416
416
|
case "top":
|
|
417
|
-
|
|
417
|
+
o(0, 0);
|
|
418
418
|
break;
|
|
419
419
|
case "bottom":
|
|
420
420
|
t(0, 0);
|
|
421
421
|
break;
|
|
422
422
|
case "topleft":
|
|
423
|
-
|
|
423
|
+
p(0, 0);
|
|
424
424
|
break;
|
|
425
425
|
case "topright":
|
|
426
|
-
|
|
426
|
+
b(0, 0);
|
|
427
427
|
break;
|
|
428
428
|
case "right":
|
|
429
429
|
case "bottomright":
|
|
@@ -431,26 +431,26 @@ function Dt(e, i, r, b) {
|
|
|
431
431
|
break;
|
|
432
432
|
case "left":
|
|
433
433
|
case "bottomleft":
|
|
434
|
-
|
|
434
|
+
s(0, 0);
|
|
435
435
|
break;
|
|
436
436
|
case "center":
|
|
437
|
-
|
|
437
|
+
y();
|
|
438
438
|
break;
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
|
-
return { checkAspectRatio:
|
|
441
|
+
return { checkAspectRatio: g };
|
|
442
442
|
}
|
|
443
443
|
function ze(e, i) {
|
|
444
|
-
const { resizeCanvas: r, getTransformationsFromExifData:
|
|
444
|
+
const { resizeCanvas: r, getTransformationsFromExifData: m } = kt(), o = Te("NotifyService"), t = v(e.cropper), p = v(e.transform), b = v(e.cropperMinWidth), A = v(e.maintainAspectRatio), s = v(e.aspectRatio), y = v(e.autoCrop), g = v(e.backgroundColor), l = v(e.resizeToWidth), u = v(e.onlyScaleDown), w = v(e.containWithinAspectRatio), M = v(e.canvasRotation), $ = v(e.format), W = v(e.imageQuality), P = v(e.resizeToHeight), D = v(e.cropperMinHeight), j = v(""), k = v(!0), d = v(!0);
|
|
445
445
|
let f, h, H = 0, q, C, S;
|
|
446
446
|
const U = v(null), B = v(""), Q = v(""), G = v("0px"), L = v(), E = v({ width: 100, height: 100 }), ie = ae;
|
|
447
|
-
let ee, I = 20, N = 20, R = !1,
|
|
448
|
-
const
|
|
447
|
+
let ee, I = 20, N = 20, R = !1, V = { rotate: 0, flip: !1 }, x = { active: !1, type: null, position: null, x1: 0, y1: 0, x2: 0, y2: 0, clientX: 0, clientY: 0 };
|
|
448
|
+
const de = v(e.imageChangedEvent), le = v(e.imageURL), ke = v(e.imageBase64), De = v(e.imageFile);
|
|
449
449
|
function Be() {
|
|
450
|
-
Q.value = "scaleX(" + (
|
|
450
|
+
Q.value = "scaleX(" + (p.value.scale || 1) * (p.value.flipH ? -1 : 1) + ")scaleY(" + (p.value.scale || 1) * (p.value.flipV ? -1 : 1) + ")rotate(" + (p.value.rotate || 0) + "deg)";
|
|
451
451
|
}
|
|
452
452
|
function Y() {
|
|
453
|
-
|
|
453
|
+
d.value = !1, L.value = null, j.value = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=", x = {
|
|
454
454
|
active: !1,
|
|
455
455
|
type: null,
|
|
456
456
|
position: null,
|
|
@@ -475,15 +475,15 @@ function ze(e, i) {
|
|
|
475
475
|
return /image\/(png|jpg|jpeg|bmp|gif|tiff|webp)/.test(a);
|
|
476
476
|
}
|
|
477
477
|
function Le() {
|
|
478
|
-
if (M.value +=
|
|
478
|
+
if (M.value += V.rotate, w.value && f.width && f.height) {
|
|
479
479
|
if (M.value % 2) {
|
|
480
|
-
const c = f.width *
|
|
480
|
+
const c = f.width * s.value, z = f.height / s.value;
|
|
481
481
|
return {
|
|
482
482
|
width: Math.max(f.height, c),
|
|
483
483
|
height: Math.max(f.width, z)
|
|
484
484
|
};
|
|
485
485
|
}
|
|
486
|
-
const a = f.height *
|
|
486
|
+
const a = f.height * s.value, n = f.width / s.value;
|
|
487
487
|
return {
|
|
488
488
|
width: Math.max(f.width, a),
|
|
489
489
|
height: Math.max(f.height, n)
|
|
@@ -498,29 +498,29 @@ function ze(e, i) {
|
|
|
498
498
|
};
|
|
499
499
|
}
|
|
500
500
|
function $e() {
|
|
501
|
-
M.value +=
|
|
501
|
+
M.value += V.rotate;
|
|
502
502
|
const a = Le(), n = document.createElement("canvas");
|
|
503
503
|
a.width && a.height && (n.width = a.width, n.height = a.height);
|
|
504
504
|
const c = n.getContext("2d");
|
|
505
|
-
return f.width && f.height && S && (c == null || c.setTransform(
|
|
505
|
+
return f.width && f.height && S && (c == null || c.setTransform(V.flip ? -1 : 1, 0, 0, 1, n.width / 2, n.height / 2), c == null || c.rotate(Math.PI * (M.value / 2)), c == null || c.drawImage(S, -f.width / 2, -f.height / 2)), n.toDataURL();
|
|
506
506
|
}
|
|
507
507
|
function Pe(a) {
|
|
508
508
|
return new Promise((n) => {
|
|
509
|
-
ee = a,
|
|
509
|
+
ee = a, j.value = a, L.value = new Image(), L.value.onload = () => {
|
|
510
510
|
var c, z;
|
|
511
511
|
h.width = (c = L.value) == null ? void 0 : c.naturalWidth, h.height = (z = L.value) == null ? void 0 : z.naturalHeight, n();
|
|
512
512
|
}, L.value.src = ee;
|
|
513
513
|
});
|
|
514
514
|
}
|
|
515
515
|
function me() {
|
|
516
|
-
if (!S || !S.complete || !
|
|
516
|
+
if (!S || !S.complete || !V)
|
|
517
517
|
return Promise.reject(new Error("No image loaded"));
|
|
518
518
|
const a = $e();
|
|
519
519
|
return Pe(a);
|
|
520
520
|
}
|
|
521
521
|
function ne(a) {
|
|
522
522
|
const n = (c) => {
|
|
523
|
-
|
|
523
|
+
o.show({
|
|
524
524
|
showCloseButton: !1,
|
|
525
525
|
timeout: 3e3,
|
|
526
526
|
animate: "fadeIn",
|
|
@@ -528,13 +528,13 @@ function ze(e, i) {
|
|
|
528
528
|
}), k.value = !1, R = !0, i.emit("loadImageFailed"), S = null, B.value = "";
|
|
529
529
|
};
|
|
530
530
|
S = new Image(), S.onload = () => {
|
|
531
|
-
B.value = a,
|
|
531
|
+
B.value = a, V = m(a), f.width = S == null ? void 0 : S.naturalWidth, f.height = S == null ? void 0 : S.naturalHeight, me().then(() => {
|
|
532
532
|
R = !1;
|
|
533
533
|
}).catch(n);
|
|
534
534
|
}, S.onerror = n, S.src = a;
|
|
535
535
|
}
|
|
536
536
|
function Re(a, n) {
|
|
537
|
-
We(n) ? (R = !1, ne(a)) : (
|
|
537
|
+
We(n) ? (R = !1, ne(a)) : (o.show({
|
|
538
538
|
showCloseButton: !1,
|
|
539
539
|
timeout: 3e3,
|
|
540
540
|
animate: "fadeIn",
|
|
@@ -548,7 +548,7 @@ function ze(e, i) {
|
|
|
548
548
|
function ye(a) {
|
|
549
549
|
const n = new Image();
|
|
550
550
|
n.onerror = () => {
|
|
551
|
-
|
|
551
|
+
o.show({
|
|
552
552
|
showCloseButton: !1,
|
|
553
553
|
timeout: 3e3,
|
|
554
554
|
animate: "fadeIn",
|
|
@@ -570,10 +570,10 @@ function ze(e, i) {
|
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
572
|
function He() {
|
|
573
|
-
L.value && E.value.width && (I =
|
|
573
|
+
L.value && E.value.width && (I = b.value > 0 ? Math.max(20, b.value / L.value.width * E.value.width) : 20);
|
|
574
574
|
}
|
|
575
575
|
function Ue() {
|
|
576
|
-
A.value ? N = Math.max(20, I /
|
|
576
|
+
A.value ? N = Math.max(20, I / s.value) : D.value > 0 && L.value && E.value.height ? N = Math.max(20, D.value / L.value.height * E.value.height) : N = 20;
|
|
577
577
|
}
|
|
578
578
|
function re() {
|
|
579
579
|
L.value ? (He(), Ue()) : (I = 20, N = 20);
|
|
@@ -592,7 +592,7 @@ function ze(e, i) {
|
|
|
592
592
|
return n.value;
|
|
593
593
|
}
|
|
594
594
|
function Ne() {
|
|
595
|
-
M.value +=
|
|
595
|
+
M.value += V.rotate;
|
|
596
596
|
const a = U.value, n = v({ x1: 0, x2: 0, y1: 0, y2: 0 });
|
|
597
597
|
if (a && h.height && h.width && f.height && f.width) {
|
|
598
598
|
const c = h.width / a.offsetWidth;
|
|
@@ -606,7 +606,7 @@ function ze(e, i) {
|
|
|
606
606
|
}
|
|
607
607
|
return n.value;
|
|
608
608
|
}
|
|
609
|
-
function
|
|
609
|
+
function je(a, n) {
|
|
610
610
|
if (l.value > 0) {
|
|
611
611
|
if (!u.value || a > l.value)
|
|
612
612
|
return l.value / a;
|
|
@@ -614,56 +614,56 @@ function ze(e, i) {
|
|
|
614
614
|
return P.value / n;
|
|
615
615
|
return 1;
|
|
616
616
|
}
|
|
617
|
-
function
|
|
617
|
+
function Ve() {
|
|
618
618
|
return Math.min(1, Math.max(0, W.value / 100));
|
|
619
619
|
}
|
|
620
|
-
function
|
|
621
|
-
return a.toDataURL("image/" + $.value,
|
|
620
|
+
function Oe(a) {
|
|
621
|
+
return a.toDataURL("image/" + $.value, Ve());
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function Fe() {
|
|
624
624
|
if (U.value && U.value && L.value != null) {
|
|
625
625
|
const a = Ie(), n = a.x2 - a.x1, c = a.y2 - a.y1, z = document.createElement("canvas");
|
|
626
626
|
z.width = n, z.height = c;
|
|
627
627
|
const _ = z.getContext("2d");
|
|
628
628
|
if (_) {
|
|
629
|
-
|
|
630
|
-
const J = (
|
|
631
|
-
h.width && h.height && (_.setTransform(J, 0, 0, Z, h.width / 2, h.height / 2), _.translate(-a.x1 / J, -a.y1 / Z), _.rotate((
|
|
632
|
-
const
|
|
629
|
+
g.value != null && (_.fillStyle = g.value, _.fillRect(0, 0, n, c));
|
|
630
|
+
const J = (p.value.scale || 1) * (p.value.flipH ? -1 : 1), Z = (p.value.scale || 1) * (p.value.flipV ? -1 : 1);
|
|
631
|
+
h.width && h.height && (_.setTransform(J, 0, 0, Z, h.width / 2, h.height / 2), _.translate(-a.x1 / J, -a.y1 / Z), _.rotate((p.value.rotate || 0) * Math.PI / 180), _.drawImage(L.value, -h.width / 2, -h.height / 2));
|
|
632
|
+
const F = {
|
|
633
633
|
width: n,
|
|
634
634
|
height: c,
|
|
635
635
|
imagePosition: a,
|
|
636
636
|
cropperPosition: { ...t.value }
|
|
637
637
|
};
|
|
638
|
-
w.value && (
|
|
639
|
-
const X =
|
|
640
|
-
return X !== 1 && (
|
|
638
|
+
w.value && (F.offsetImagePosition = Ne());
|
|
639
|
+
const X = je(n, c);
|
|
640
|
+
return X !== 1 && (F.width = Math.round(n * X), F.height = A.value ? Math.round(F.width / s.value) : Math.round(c * X), r(z, F.width, F.height)), F.base64 = Oe(z), i.emit("imageCropped", F), F;
|
|
641
641
|
}
|
|
642
642
|
}
|
|
643
643
|
return null;
|
|
644
644
|
}
|
|
645
645
|
function te() {
|
|
646
|
-
|
|
646
|
+
y.value && Fe();
|
|
647
647
|
}
|
|
648
648
|
function xe() {
|
|
649
649
|
const a = U.value;
|
|
650
650
|
if (a) {
|
|
651
651
|
if (!A.value)
|
|
652
652
|
t.value.x1 = 0, t.value.x2 = a.offsetWidth, t.value.y1 = 0, t.value.y2 = a.offsetHeight;
|
|
653
|
-
else if (a.offsetWidth /
|
|
653
|
+
else if (a.offsetWidth / s.value < a.offsetHeight) {
|
|
654
654
|
t.value.x1 = 0, t.value.x2 = a.offsetWidth;
|
|
655
|
-
const n = a.offsetWidth /
|
|
655
|
+
const n = a.offsetWidth / s.value;
|
|
656
656
|
t.value.y1 = (a.offsetHeight - n) / 2, t.value.y2 = t.value.y1 + n;
|
|
657
657
|
} else {
|
|
658
658
|
t.value.y1 = 0, t.value.y2 = a.offsetHeight;
|
|
659
|
-
const n = a.offsetHeight *
|
|
659
|
+
const n = a.offsetHeight * s.value;
|
|
660
660
|
t.value.x1 = (a.offsetWidth - n) / 2, t.value.x2 = t.value.x1 + n;
|
|
661
661
|
}
|
|
662
|
-
te(),
|
|
662
|
+
te(), d.value = !0;
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
665
|
function be() {
|
|
666
|
-
H > 40 ? (
|
|
666
|
+
H > 40 ? (o.show({
|
|
667
667
|
showCloseButton: !1,
|
|
668
668
|
timeout: 3e3,
|
|
669
669
|
animate: "fadeIn",
|
|
@@ -688,21 +688,21 @@ function ze(e, i) {
|
|
|
688
688
|
window.removeEventListener("resize", Me);
|
|
689
689
|
});
|
|
690
690
|
function Ge() {
|
|
691
|
-
|
|
691
|
+
x.active && (x.active = !1, te());
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function se(a) {
|
|
694
694
|
return (a.touches && a.touches[0] ? a.touches[0].clientX : a.clientX) || 0;
|
|
695
695
|
}
|
|
696
|
-
function
|
|
696
|
+
function oe(a) {
|
|
697
697
|
return (a.touches && a.touches[0] ? a.touches[0].clientY : a.clientY) || 0;
|
|
698
698
|
}
|
|
699
699
|
function Ze(a, n, c = null) {
|
|
700
|
-
|
|
700
|
+
x && x.active || (a.preventDefault && a.preventDefault(), x = {
|
|
701
701
|
active: !0,
|
|
702
702
|
type: n,
|
|
703
703
|
position: c,
|
|
704
|
-
clientX:
|
|
705
|
-
clientY:
|
|
704
|
+
clientX: se(a),
|
|
705
|
+
clientY: oe(a),
|
|
706
706
|
...t.value
|
|
707
707
|
});
|
|
708
708
|
}
|
|
@@ -710,53 +710,53 @@ function ze(e, i) {
|
|
|
710
710
|
t.value.x1 < 0 && (t.value.x2 -= a ? t.value.x1 : 0, t.value.x1 = 0), t.value.y1 < 0 && (t.value.y2 -= a ? t.value.y1 : 0, t.value.y1 = 0), t.value.x2 > E.value.width && (t.value.x1 -= a ? t.value.x2 - E.value.width : 0, t.value.x2 = E.value.width), t.value.y2 > E.value.height && (t.value.y1 -= a ? t.value.y2 - E.value.height : 0, t.value.y2 = E.value.height);
|
|
711
711
|
}
|
|
712
712
|
function Ye(a) {
|
|
713
|
-
const n =
|
|
714
|
-
t.value.x1 =
|
|
713
|
+
const n = se(a) - x.clientX, c = oe(a) - x.clientY;
|
|
714
|
+
t.value.x1 = x.x1 + n, t.value.y1 = x.y1 + c, t.value.x2 = x.x2 + n, t.value.y2 = x.y2 + c;
|
|
715
715
|
}
|
|
716
|
-
const { checkAspectRatio: Xe } = Dt(t, E,
|
|
716
|
+
const { checkAspectRatio: Xe } = Dt(t, E, s, x);
|
|
717
717
|
function Ke(a) {
|
|
718
|
-
const n =
|
|
719
|
-
switch (
|
|
718
|
+
const n = se(a) - x.clientX, c = oe(a) - x.clientY;
|
|
719
|
+
switch (x.position) {
|
|
720
720
|
case "left":
|
|
721
|
-
t.value.x1 = Math.min(
|
|
721
|
+
t.value.x1 = Math.min(x.x1 + n, t.value.x2 - I);
|
|
722
722
|
break;
|
|
723
723
|
case "topleft":
|
|
724
|
-
t.value.x1 = Math.min(
|
|
724
|
+
t.value.x1 = Math.min(x.x1 + n, t.value.x2 - I), t.value.y1 = Math.min(x.y1 + c, t.value.y2 - N);
|
|
725
725
|
break;
|
|
726
726
|
case "top":
|
|
727
|
-
t.value.y1 = Math.min(
|
|
727
|
+
t.value.y1 = Math.min(x.y1 + c, t.value.y2 - N);
|
|
728
728
|
break;
|
|
729
729
|
case "topright":
|
|
730
|
-
t.value.x2 = Math.max(
|
|
730
|
+
t.value.x2 = Math.max(x.x2 + n, t.value.x1 + I), t.value.y1 = Math.min(x.y1 + c, t.value.y2 - N);
|
|
731
731
|
break;
|
|
732
732
|
case "right":
|
|
733
|
-
t.value.x2 = Math.max(
|
|
733
|
+
t.value.x2 = Math.max(x.x2 + n, t.value.x1 + I);
|
|
734
734
|
break;
|
|
735
735
|
case "bottomright":
|
|
736
|
-
t.value.x2 = Math.max(
|
|
736
|
+
t.value.x2 = Math.max(x.x2 + n, t.value.x1 + I), t.value.y2 = Math.max(x.y2 + c, t.value.y1 + N);
|
|
737
737
|
break;
|
|
738
738
|
case "bottom":
|
|
739
|
-
t.value.y2 = Math.max(
|
|
739
|
+
t.value.y2 = Math.max(x.y2 + c, t.value.y1 + N);
|
|
740
740
|
break;
|
|
741
741
|
case "bottomleft":
|
|
742
|
-
t.value.x1 = Math.min(
|
|
742
|
+
t.value.x1 = Math.min(x.x1 + n, t.value.x2 - I), t.value.y2 = Math.max(x.y2 + c, t.value.y1 + N);
|
|
743
743
|
break;
|
|
744
744
|
case "center":
|
|
745
|
-
const { scale: z } = a, _ = Math.abs(
|
|
746
|
-
t.value.x1 = Math.min(
|
|
745
|
+
const { scale: z } = a, _ = Math.abs(x.x2 - x.x1) * z, J = Math.abs(x.y2 - x.y1) * z, { x1: Z } = t.value, { y1: F } = t.value;
|
|
746
|
+
t.value.x1 = Math.min(x.clientX - _ / 2, t.value.x2 - I), t.value.y1 = Math.min(x.clientY - J / 2, t.value.y2 - N), t.value.x2 = Math.max(x.clientX + _ / 2, Z + I), t.value.y2 = Math.max(x.clientY + J / 2, F + N);
|
|
747
747
|
break;
|
|
748
748
|
}
|
|
749
749
|
A.value && Xe();
|
|
750
750
|
}
|
|
751
751
|
function et(a) {
|
|
752
|
-
|
|
753
|
-
|
|
752
|
+
x && x.active && (a.stopPropagation && a.stopPropagation(), a.preventDefault && a.preventDefault(), clearTimeout(q), q = setTimeout(() => {
|
|
753
|
+
x.type === ae.Move ? (Ye(a), ce(!0)) : x.type === ae.Resize && (Ke(a), ce(!1));
|
|
754
754
|
}, 300));
|
|
755
755
|
}
|
|
756
|
-
return K(
|
|
756
|
+
return K(de, (a) => {
|
|
757
757
|
Y(), a && a.target && a.target.files && a.target.files.length > 0 && (k.value = !0, pe(a.target.files[0]));
|
|
758
758
|
}), K(le, (a) => {
|
|
759
|
-
a ? (Y(), k.value = !0, ye(a)) : (
|
|
759
|
+
a ? (Y(), k.value = !0, ye(a)) : (o.show({
|
|
760
760
|
showCloseButton: !1,
|
|
761
761
|
timeout: 3e3,
|
|
762
762
|
animate: "fadeIn",
|
|
@@ -775,15 +775,15 @@ function ze(e, i) {
|
|
|
775
775
|
e.transform,
|
|
776
776
|
e.imageChangedEvent
|
|
777
777
|
],
|
|
778
|
-
([a, n, c, z, _, J], [Z,
|
|
779
|
-
S && S.complete &&
|
|
778
|
+
([a, n, c, z, _, J], [Z, F, X, tt, at, it]) => {
|
|
779
|
+
S && S.complete && V && (a !== Z || n !== F) && me(), c !== X && (ue(), re(), ce(!1), te()), z !== tt && d.value && xe(), _ !== at && (Be(), te()), J !== it && (de.value = J);
|
|
780
780
|
}
|
|
781
781
|
), {
|
|
782
782
|
uploadError: R,
|
|
783
|
-
imageVisible:
|
|
784
|
-
backgroundColor:
|
|
783
|
+
imageVisible: d,
|
|
784
|
+
backgroundColor: g,
|
|
785
785
|
sourceImage: U,
|
|
786
|
-
safeImgDataUrl:
|
|
786
|
+
safeImgDataUrl: j,
|
|
787
787
|
safeTransformStyle: Q,
|
|
788
788
|
maxSize: E,
|
|
789
789
|
cropper: t,
|
|
@@ -798,14 +798,14 @@ function ze(e, i) {
|
|
|
798
798
|
}
|
|
799
799
|
const fe = /* @__PURE__ */ Ce({
|
|
800
800
|
name: "FImageCropper",
|
|
801
|
-
props:
|
|
801
|
+
props: ge,
|
|
802
802
|
emits: ["imageCropped", "imageLoaded", "cropperReady", "loadImageFailed"],
|
|
803
803
|
setup(e, i) {
|
|
804
|
-
const r = v(e.alignImage),
|
|
804
|
+
const r = v(e.alignImage), m = v(e.roundCropper), o = v(e.hideResizeSquares), t = v(e.loadImageErrorText), p = v(e.disabled), b = v(null), {
|
|
805
805
|
uploadError: A,
|
|
806
|
-
imageVisible:
|
|
807
|
-
backgroundColor:
|
|
808
|
-
sourceImage:
|
|
806
|
+
imageVisible: s,
|
|
807
|
+
backgroundColor: y,
|
|
808
|
+
sourceImage: g,
|
|
809
809
|
safeImgDataUrl: l,
|
|
810
810
|
safeTransformStyle: u,
|
|
811
811
|
maxSize: w,
|
|
@@ -814,20 +814,20 @@ const fe = /* @__PURE__ */ Ce({
|
|
|
814
814
|
moveTypes: W,
|
|
815
815
|
isLoading: P,
|
|
816
816
|
startMove: D,
|
|
817
|
-
imageLoadedInView:
|
|
817
|
+
imageLoadedInView: j,
|
|
818
818
|
moveStop: k,
|
|
819
|
-
moveImg:
|
|
819
|
+
moveImg: d
|
|
820
820
|
} = ze(e, i);
|
|
821
821
|
function f(C) {
|
|
822
822
|
return T("span", {
|
|
823
823
|
class: `farris-image-cropper-resize-bar ${C}`,
|
|
824
|
-
onMousedown:
|
|
824
|
+
onMousedown: O((S) => D(S, W.Resize, C), ["prevent"])
|
|
825
825
|
}, null);
|
|
826
826
|
}
|
|
827
827
|
function h(C) {
|
|
828
828
|
return T("div", null, [T("span", {
|
|
829
829
|
class: `farris-image-cropper-resize-bar ${C}`,
|
|
830
|
-
onMousedown:
|
|
830
|
+
onMousedown: O((S) => D(S, W.Resize, C), ["prevent"])
|
|
831
831
|
}, [T("span", {
|
|
832
832
|
class: "farris-image-cropper-square"
|
|
833
833
|
}, null)]), T("span", {
|
|
@@ -839,32 +839,32 @@ const fe = /* @__PURE__ */ Ce({
|
|
|
839
839
|
const H = ["top", "right", "bottom", "left"].map((C) => f(C)), q = ["topleft", "topright", "bottomright", "bottomleft"].map((C) => h(C));
|
|
840
840
|
return () => T("div", {
|
|
841
841
|
class: ["farris-image-cropper-frame", {
|
|
842
|
-
"farris-image-cropper-disabled":
|
|
842
|
+
"farris-image-cropper-disabled": p.value
|
|
843
843
|
}],
|
|
844
844
|
style: {
|
|
845
845
|
"text-align": r.value
|
|
846
846
|
},
|
|
847
|
-
onMousemove:
|
|
848
|
-
onTouchmove:
|
|
849
|
-
onMouseup:
|
|
850
|
-
onTouchend:
|
|
847
|
+
onMousemove: O((C) => d(C), ["prevent"]),
|
|
848
|
+
onTouchmove: O((C) => d(C), ["prevent"]),
|
|
849
|
+
onMouseup: O(() => k(), ["prevent"]),
|
|
850
|
+
onTouchend: O(() => k(), ["prevent"])
|
|
851
851
|
}, [!A && T("div", {
|
|
852
|
-
ref:
|
|
852
|
+
ref: b,
|
|
853
853
|
class: "farris-image-cropper",
|
|
854
854
|
style: [{
|
|
855
|
-
background:
|
|
855
|
+
background: s.value ? y.value : ""
|
|
856
856
|
}]
|
|
857
857
|
}, [l.value && T("img", {
|
|
858
858
|
title: "farris-source-image",
|
|
859
|
-
ref:
|
|
859
|
+
ref: g,
|
|
860
860
|
class: "farris-source-image",
|
|
861
861
|
style: [{
|
|
862
|
-
visibility:
|
|
862
|
+
visibility: s.value ? "visible" : "hidden"
|
|
863
863
|
}, {
|
|
864
864
|
transform: u.value
|
|
865
865
|
}],
|
|
866
866
|
src: l.value,
|
|
867
|
-
onLoad: () =>
|
|
867
|
+
onLoad: () => j()
|
|
868
868
|
}, null), w.value && T("div", {
|
|
869
869
|
class: "farris-image-overlay",
|
|
870
870
|
style: [{
|
|
@@ -874,9 +874,9 @@ const fe = /* @__PURE__ */ Ce({
|
|
|
874
874
|
}, {
|
|
875
875
|
"margin-left": r.value === "center" ? $.value : ""
|
|
876
876
|
}]
|
|
877
|
-
}, null),
|
|
877
|
+
}, null), s.value && T("div", {
|
|
878
878
|
class: ["farris-image-cropper-wrapper", {
|
|
879
|
-
"farris-image-cropper-rounded":
|
|
879
|
+
"farris-image-cropper-rounded": m.value
|
|
880
880
|
}],
|
|
881
881
|
style: [{
|
|
882
882
|
top: `${M.value.y1}px`
|
|
@@ -887,15 +887,15 @@ const fe = /* @__PURE__ */ Ce({
|
|
|
887
887
|
}, {
|
|
888
888
|
height: `${M.value.y2 - M.value.y1}px`
|
|
889
889
|
}, {
|
|
890
|
-
visibility:
|
|
890
|
+
visibility: s.value ? "visible" : "hidden"
|
|
891
891
|
}, {
|
|
892
892
|
"margin-left": r.value === "center" ? $.value : ""
|
|
893
893
|
}],
|
|
894
894
|
tabindex: "0"
|
|
895
895
|
}, [T("div", {
|
|
896
896
|
class: "farris-image-cropper-move",
|
|
897
|
-
onMousedown:
|
|
898
|
-
}, null), !
|
|
897
|
+
onMousedown: O((C) => D(C, W.Move, "topleft"), ["prevent"])
|
|
898
|
+
}, null), !o.value && T("div", null, [q, H])])]), P.value && T("div", {
|
|
899
899
|
class: "farris-image-cropper-loading"
|
|
900
900
|
}, [T("div", {
|
|
901
901
|
class: "farris-image-cropper-loading-spinner"
|
|
@@ -906,34 +906,34 @@ const fe = /* @__PURE__ */ Ce({
|
|
|
906
906
|
});
|
|
907
907
|
function Bt(e, i, r) {
|
|
908
908
|
var k;
|
|
909
|
-
function
|
|
909
|
+
function m() {
|
|
910
910
|
}
|
|
911
|
-
const
|
|
912
|
-
function
|
|
911
|
+
const o = "", t = "", p = v();
|
|
912
|
+
function b() {
|
|
913
913
|
return (i == null ? void 0 : i.schema.componentType) !== "frame";
|
|
914
914
|
}
|
|
915
915
|
function A() {
|
|
916
916
|
return !1;
|
|
917
917
|
}
|
|
918
|
-
function
|
|
918
|
+
function s() {
|
|
919
919
|
return (i == null ? void 0 : i.schema.componentType) !== "frame";
|
|
920
920
|
}
|
|
921
|
-
function
|
|
921
|
+
function y() {
|
|
922
922
|
return (i == null ? void 0 : i.schema.componentType) === "frame";
|
|
923
923
|
}
|
|
924
|
-
function d
|
|
925
|
-
if (!
|
|
924
|
+
function g(d) {
|
|
925
|
+
if (!d || !d.value)
|
|
926
926
|
return null;
|
|
927
|
-
if (
|
|
928
|
-
return
|
|
929
|
-
const f = v(
|
|
927
|
+
if (d.value.schema && d.value.schema.type === "component")
|
|
928
|
+
return d.value;
|
|
929
|
+
const f = v(d == null ? void 0 : d.value.parent), h = g(f);
|
|
930
930
|
return h || null;
|
|
931
931
|
}
|
|
932
|
-
function l(
|
|
933
|
-
const { componentInstance: f, designerItemElementRef: h } =
|
|
934
|
-
return !f || !f.value ? null : f.value.canMove ? h : l(
|
|
932
|
+
function l(d = i) {
|
|
933
|
+
const { componentInstance: f, designerItemElementRef: h } = d;
|
|
934
|
+
return !f || !f.value ? null : f.value.canMove ? h : l(d.parent);
|
|
935
935
|
}
|
|
936
|
-
function u(
|
|
936
|
+
function u(d) {
|
|
937
937
|
return !!r;
|
|
938
938
|
}
|
|
939
939
|
function w() {
|
|
@@ -941,61 +941,61 @@ function Bt(e, i, r) {
|
|
|
941
941
|
}
|
|
942
942
|
function M() {
|
|
943
943
|
}
|
|
944
|
-
function $(
|
|
944
|
+
function $(d, f) {
|
|
945
945
|
}
|
|
946
|
-
function W(
|
|
947
|
-
const { componentType: f } =
|
|
948
|
-
let h = ve(f,
|
|
946
|
+
function W(d) {
|
|
947
|
+
const { componentType: f } = d;
|
|
948
|
+
let h = ve(f, d);
|
|
949
949
|
const H = f.toLowerCase().replace("-", "_");
|
|
950
950
|
return h && !h.id && h.type === f && (h.id = `${H}_${Math.random().toString().slice(2, 6)}`), h;
|
|
951
951
|
}
|
|
952
|
-
function P(
|
|
953
|
-
const h = String(
|
|
954
|
-
q.parentComponentInstance =
|
|
952
|
+
function P(d, f) {
|
|
953
|
+
const h = String(d.getAttribute("data-controltype")), H = d.getAttribute("data-feature"), q = H ? JSON.parse(H) : {};
|
|
954
|
+
q.parentComponentInstance = p.value;
|
|
955
955
|
let C = ve(h, q);
|
|
956
956
|
const S = h.toLowerCase().replace("-", "_");
|
|
957
957
|
return C && !C.id && C.type === h && (C.id = `${S}_${Math.random().toString().slice(2, 6)}`), C;
|
|
958
958
|
}
|
|
959
|
-
function D(
|
|
959
|
+
function D(d) {
|
|
960
960
|
}
|
|
961
|
-
function
|
|
961
|
+
function j(...d) {
|
|
962
962
|
}
|
|
963
|
-
return
|
|
964
|
-
canMove:
|
|
963
|
+
return p.value = {
|
|
964
|
+
canMove: b(),
|
|
965
965
|
canSelectParent: A(),
|
|
966
|
-
canDelete:
|
|
967
|
-
canNested: !
|
|
966
|
+
canDelete: s(),
|
|
967
|
+
canNested: !y(),
|
|
968
968
|
contents: i == null ? void 0 : i.schema.contents,
|
|
969
969
|
elementRef: e,
|
|
970
970
|
parent: (k = i == null ? void 0 : i.parent) == null ? void 0 : k.componentInstance,
|
|
971
971
|
schema: i == null ? void 0 : i.schema,
|
|
972
|
-
styles:
|
|
972
|
+
styles: o,
|
|
973
973
|
designerClass: t,
|
|
974
974
|
canAccepts: u,
|
|
975
|
-
getBelongedComponentInstance:
|
|
975
|
+
getBelongedComponentInstance: g,
|
|
976
976
|
getDraggableDesignItemElement: l,
|
|
977
977
|
getDraggingDisplayText: w,
|
|
978
|
-
getPropConfig:
|
|
978
|
+
getPropConfig: j,
|
|
979
979
|
getDragScopeElement: M,
|
|
980
980
|
onAcceptMovedChildElement: $,
|
|
981
981
|
onAcceptNewChildElement: P,
|
|
982
982
|
onChildElementMovedOut: D,
|
|
983
983
|
addNewChildComponentSchema: W,
|
|
984
|
-
updateDragAndDropRules:
|
|
984
|
+
updateDragAndDropRules: m,
|
|
985
985
|
triggerBelongedComponentToMoveWhenMoved: v(!1),
|
|
986
986
|
triggerBelongedComponentToDeleteWhenDeleted: v(!1)
|
|
987
|
-
},
|
|
987
|
+
}, p;
|
|
988
988
|
}
|
|
989
989
|
const Wt = /* @__PURE__ */ Ce({
|
|
990
990
|
name: "FImageCropperDesign",
|
|
991
|
-
props:
|
|
991
|
+
props: ge,
|
|
992
992
|
emits: ["imageCropped", "imageLoaded", "cropperReady", "loadImageFailed"],
|
|
993
993
|
setup(e, i) {
|
|
994
|
-
const r = v(e.alignImage),
|
|
994
|
+
const r = v(e.alignImage), m = v(e.roundCropper), o = v(e.hideResizeSquares), t = v(e.loadImageErrorText), p = v(e.disabled), b = v(null), {
|
|
995
995
|
uploadError: A,
|
|
996
|
-
imageVisible:
|
|
997
|
-
backgroundColor:
|
|
998
|
-
sourceImage:
|
|
996
|
+
imageVisible: s,
|
|
997
|
+
backgroundColor: y,
|
|
998
|
+
sourceImage: g,
|
|
999
999
|
safeImgDataUrl: l,
|
|
1000
1000
|
safeTransformStyle: u,
|
|
1001
1001
|
maxSize: w,
|
|
@@ -1004,9 +1004,9 @@ const Wt = /* @__PURE__ */ Ce({
|
|
|
1004
1004
|
moveTypes: W,
|
|
1005
1005
|
isLoading: P,
|
|
1006
1006
|
startMove: D,
|
|
1007
|
-
imageLoadedInView:
|
|
1007
|
+
imageLoadedInView: j,
|
|
1008
1008
|
moveStop: k,
|
|
1009
|
-
moveImg:
|
|
1009
|
+
moveImg: d
|
|
1010
1010
|
} = ze(e, i), f = v(), h = Te("design-item-context"), H = Bt(f, h);
|
|
1011
1011
|
Ae(() => {
|
|
1012
1012
|
f.value.componentInstance = H;
|
|
@@ -1014,13 +1014,13 @@ const Wt = /* @__PURE__ */ Ce({
|
|
|
1014
1014
|
function q(B) {
|
|
1015
1015
|
return T("span", {
|
|
1016
1016
|
class: `farris-image-cropper-resize-bar ${B}`,
|
|
1017
|
-
onMousedown:
|
|
1017
|
+
onMousedown: O((Q) => D(Q, W.Resize, B), ["prevent"])
|
|
1018
1018
|
}, null);
|
|
1019
1019
|
}
|
|
1020
1020
|
function C(B) {
|
|
1021
1021
|
return T("div", null, [T("span", {
|
|
1022
1022
|
class: `farris-image-cropper-resize-bar ${B}`,
|
|
1023
|
-
onMousedown:
|
|
1023
|
+
onMousedown: O((Q) => D(Q, W.Resize, B), ["prevent"])
|
|
1024
1024
|
}, [T("span", {
|
|
1025
1025
|
class: "farris-image-cropper-square"
|
|
1026
1026
|
}, null)]), T("span", {
|
|
@@ -1033,32 +1033,32 @@ const Wt = /* @__PURE__ */ Ce({
|
|
|
1033
1033
|
return () => T("div", {
|
|
1034
1034
|
ref: f,
|
|
1035
1035
|
class: ["farris-image-cropper-frame", {
|
|
1036
|
-
"farris-image-cropper-disabled":
|
|
1036
|
+
"farris-image-cropper-disabled": p.value
|
|
1037
1037
|
}],
|
|
1038
1038
|
style: {
|
|
1039
1039
|
"text-align": r.value
|
|
1040
1040
|
},
|
|
1041
|
-
onMousemove:
|
|
1042
|
-
onTouchmove:
|
|
1043
|
-
onMouseup:
|
|
1044
|
-
onTouchend:
|
|
1041
|
+
onMousemove: O((B) => d(B), ["prevent"]),
|
|
1042
|
+
onTouchmove: O((B) => d(B), ["prevent"]),
|
|
1043
|
+
onMouseup: O(() => k(), ["prevent"]),
|
|
1044
|
+
onTouchend: O(() => k(), ["prevent"])
|
|
1045
1045
|
}, [!A && T("div", {
|
|
1046
|
-
ref:
|
|
1046
|
+
ref: b,
|
|
1047
1047
|
class: "farris-image-cropper",
|
|
1048
1048
|
style: [{
|
|
1049
|
-
background:
|
|
1049
|
+
background: s.value ? y.value : ""
|
|
1050
1050
|
}]
|
|
1051
1051
|
}, [l.value && T("img", {
|
|
1052
1052
|
title: "farris-source-image",
|
|
1053
|
-
ref:
|
|
1053
|
+
ref: g,
|
|
1054
1054
|
class: "farris-source-image",
|
|
1055
1055
|
style: [{
|
|
1056
|
-
visibility:
|
|
1056
|
+
visibility: s.value ? "visible" : "hidden"
|
|
1057
1057
|
}, {
|
|
1058
1058
|
transform: u.value
|
|
1059
1059
|
}],
|
|
1060
1060
|
src: l.value,
|
|
1061
|
-
onLoad: () =>
|
|
1061
|
+
onLoad: () => j()
|
|
1062
1062
|
}, null), w.value && T("div", {
|
|
1063
1063
|
class: "farris-image-overlay",
|
|
1064
1064
|
style: [{
|
|
@@ -1068,9 +1068,9 @@ const Wt = /* @__PURE__ */ Ce({
|
|
|
1068
1068
|
}, {
|
|
1069
1069
|
"margin-left": r.value === "center" ? $.value : ""
|
|
1070
1070
|
}]
|
|
1071
|
-
}, null),
|
|
1071
|
+
}, null), s.value && T("div", {
|
|
1072
1072
|
class: ["farris-image-cropper-wrapper", {
|
|
1073
|
-
"farris-image-cropper-rounded":
|
|
1073
|
+
"farris-image-cropper-rounded": m.value
|
|
1074
1074
|
}],
|
|
1075
1075
|
style: [{
|
|
1076
1076
|
top: `${M.value.y1}px`
|
|
@@ -1081,15 +1081,15 @@ const Wt = /* @__PURE__ */ Ce({
|
|
|
1081
1081
|
}, {
|
|
1082
1082
|
height: `${M.value.y2 - M.value.y1}px`
|
|
1083
1083
|
}, {
|
|
1084
|
-
visibility:
|
|
1084
|
+
visibility: s.value ? "visible" : "hidden"
|
|
1085
1085
|
}, {
|
|
1086
1086
|
"margin-left": r.value === "center" ? $.value : ""
|
|
1087
1087
|
}],
|
|
1088
1088
|
tabindex: "0"
|
|
1089
1089
|
}, [T("div", {
|
|
1090
1090
|
class: "farris-image-cropper-move",
|
|
1091
|
-
onMousedown:
|
|
1092
|
-
}, null), !
|
|
1091
|
+
onMousedown: O((B) => D(B, W.Move, "topleft"), ["prevent"])
|
|
1092
|
+
}, null), !o.value && T("div", null, [U, S])])]), P.value && T("div", {
|
|
1093
1093
|
class: "farris-image-cropper-loading"
|
|
1094
1094
|
}, [T("div", {
|
|
1095
1095
|
class: "farris-image-cropper-loading-spinner"
|
|
@@ -1101,7 +1101,7 @@ const Wt = /* @__PURE__ */ Ce({
|
|
|
1101
1101
|
install(e) {
|
|
1102
1102
|
e.component(fe.name, fe);
|
|
1103
1103
|
},
|
|
1104
|
-
register(e, i, r,
|
|
1104
|
+
register(e, i, r, m) {
|
|
1105
1105
|
e["image-cropper"] = fe, i["image-cropper"] = we;
|
|
1106
1106
|
},
|
|
1107
1107
|
registerDesigner(e, i, r) {
|
|
@@ -1111,6 +1111,6 @@ const Wt = /* @__PURE__ */ Ce({
|
|
|
1111
1111
|
export {
|
|
1112
1112
|
fe as ImageCropper,
|
|
1113
1113
|
Pt as default,
|
|
1114
|
-
|
|
1114
|
+
ge as imageCropperProps,
|
|
1115
1115
|
we as propsResolver
|
|
1116
1116
|
};
|