@orangelogic/design-system 2.228.0 → 2.229.0
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/library/chunks/{asset-link-format.DLYctI8Q.js → asset-link-format.C524ORni.js} +723 -701
- package/library/chunks/{button.CrhpoXK8.js → button.ByfW1n1P.js} +1 -1
- package/library/chunks/{color-swatch-group.DMpWk1pm.js → color-swatch-group.BsS_WSkX.js} +9 -9
- package/library/chunks/{color-swatch.CSsvAlq8.js → color-swatch.BMsBeGVi.js} +1 -1
- package/library/chunks/{confirm-popover.CrB-N3KV.js → confirm-popover.sVFj9zPi.js} +3 -3
- package/library/chunks/{dialog.DWa11p4j.js → dialog.C1GgF9kf.js} +2 -2
- package/library/chunks/{document-viewer.D5885amO.js → document-viewer.BYoPlykW.js} +6 -6
- package/library/chunks/{dot-pagination.ry5d0ZtQ.js → dot-pagination.yATbscYF.js} +1 -1
- package/library/chunks/{folder-select.BIXyzMCY.js → folder-select.BVvQo_lR.js} +4 -4
- package/library/chunks/{header.CIdqF9dY.js → header.BXuOKS0L.js} +1 -1
- package/library/chunks/{i18n.CXIpdSSZ.js → i18n.Dv4-j3re.js} +4 -3
- package/library/chunks/{icon-button.BBLy-yj3.js → icon-button.N5YNs1qg.js} +1 -1
- package/library/chunks/{iframe.FHGbVxm4.js → iframe.b-u-DyQ0.js} +1 -1
- package/library/chunks/{image.BYDGEbte.js → image.6LrV-0hE.js} +2 -2
- package/library/chunks/{input.B1JamaTE.js → input.ve6RUdJ5.js} +1 -1
- package/library/chunks/{markdown.DP1DqzwO.js → markdown.CpZAccJx.js} +2 -2
- package/library/chunks/{option.C3DgnL2F.js → option.C7dkuxVF.js} +1 -1
- package/library/chunks/{pagination.DSi4odS9.js → pagination.s4rK5EBT.js} +5 -5
- package/library/chunks/{tab-group.PQnc285p.js → tab-group.CvUu5LK3.js} +3 -3
- package/library/chunks/{toast.GT3J-T2_.js → toast.CR5tYYn3.js} +1 -1
- package/library/chunks/transformation.0cnXfwVJ.js +415 -0
- package/library/chunks/{tree.BS7eGCf0.js → tree.yJto6M6E.js} +1 -1
- package/library/chunks/url.qYS-uQJe.js +89 -0
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +4 -4
- package/library/components/atoms.js +14 -14
- package/library/components/audio.js +9 -5
- package/library/components/border-input-group.js +2 -2
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +2 -2
- package/library/components/color-picker.js +3 -3
- package/library/components/color-swatch-group.js +5 -5
- package/library/components/color-swatch.js +2 -2
- package/library/components/confirm-popover.js +4 -4
- package/library/components/copy-button.js +1 -1
- package/library/components/corner-position-input-group.js +3 -3
- package/library/components/date-calendar.js +1 -1
- package/library/components/details.js +1 -1
- package/library/components/dialog.js +3 -3
- package/library/components/document-viewer.js +3 -3
- package/library/components/dot-pagination.js +2 -2
- package/library/components/drawer.js +2 -2
- package/library/components/dropdown.js +32 -23
- package/library/components/dynamic-select.js +4 -4
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +2 -2
- package/library/components/file-on-demand.js +10 -10
- package/library/components/folder-select.js +4 -4
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +1 -1
- package/library/components/header.js +2 -2
- package/library/components/icon-button.js +2 -2
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +3 -3
- package/library/components/input.js +2 -2
- package/library/components/line-clamp.js +1 -1
- package/library/components/markdown.js +3 -3
- package/library/components/masonry.js +2 -2
- package/library/components/menu-item.js +1 -1
- package/library/components/menu.js +1 -1
- package/library/components/molecules.js +3 -3
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +1 -1
- package/library/components/pagination.js +6 -6
- package/library/components/popup.js +1 -1
- package/library/components/position-picker.js +1 -1
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/range.js +1 -1
- package/library/components/rating.js +1 -1
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +2 -2
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/share-option-list.js +1 -1
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +3 -3
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/tab-group.js +4 -4
- package/library/components/tab.js +2 -2
- package/library/components/tag.js +2 -2
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +2 -2
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +2 -2
- package/library/components/types.js +19792 -19635
- package/library/components/video.js +2 -2
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/audio/audio.d.ts +2 -0
- package/library/packages/atoms/src/components/dropdown/dropdown.d.ts +6 -0
- package/library/packages/events/src/events.d.ts +0 -4
- package/library/packages/organisms/src/content-builder/blocks/audio/audio.d.ts +24 -0
- package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +12 -5
- package/library/packages/organisms/src/content-builder/blocks/video/video.d.ts +5 -4
- package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +5 -0
- package/library/packages/organisms/src/content-builder/content-builder.d.ts +17 -1
- package/library/packages/organisms/src/content-builder-viewer/content-builder-viewer.d.ts +9 -0
- package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +2 -1
- package/library/packages/tools/src/fetch-image/fetch-image.d.ts +27 -0
- package/library/packages/utils/src/asset-url-mode/asset-url-mode.d.ts +22 -0
- package/library/packages/utils/src/asset-url-mode/index.d.ts +1 -0
- package/library/packages/utils/src/custom-element/i18n.d.ts +1 -0
- package/library/packages/utils/src/url/url.d.ts +7 -0
- package/library/react-web-component.d.ts +13 -1
- package/library/utils.js +214 -213
- package/package.json +1 -1
- package/library/chunks/transformation.Bjs3TBPd.js +0 -376
- package/library/chunks/url.CGdWC06g.js +0 -76
- package/library/packages/events/src/cx-image-src-resolved.d.ts +0 -9
- package/library/packages/events/src/cx-timeline-data-resolved.d.ts +0 -10
- package/library/packages/events/src/cx-video-src-resolved.d.ts +0 -8
- package/library/packages/events/src/cx-video-thumbnail-resolved.d.ts +0 -8
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
import "../components/cropper.js";
|
|
2
|
-
import { C as
|
|
3
|
-
import
|
|
4
|
-
import { C as
|
|
2
|
+
import { C as tt } from "./button.ByfW1n1P.js";
|
|
3
|
+
import q from "../components/space.js";
|
|
4
|
+
import { C as V } from "./typography.IqHbnd3C.js";
|
|
5
5
|
import { n as h, C as j } from "./lib-cortex-element.CVMmyPMC.js";
|
|
6
|
-
import { h as
|
|
6
|
+
import { h as T, a as Vt, C as jt, S as ae, b as oe, c as re, d as ne } from "./endpoints.mJ5S-tIs.js";
|
|
7
7
|
import "./browser.BHOCIF_A.js";
|
|
8
|
-
import { i as
|
|
8
|
+
import { i as G, x as b, E as Gt } from "./lit-element.jLBm65_O.js";
|
|
9
9
|
import "./form.DSsy3Fcy.js";
|
|
10
|
-
import { L as
|
|
11
|
-
import { a as
|
|
10
|
+
import { L as Q } from "./i18n.Dv4-j3re.js";
|
|
11
|
+
import { a as he } from "./string.CfI2ejyR.js";
|
|
12
12
|
import "./date-picker.BGHn6qg8.js";
|
|
13
|
-
import {
|
|
13
|
+
import { i as Ht, r as Wt, a as Rt, b as le, c as Qt, d as ce, e as pe, f as dt } from "./transformation.0cnXfwVJ.js";
|
|
14
14
|
import "./unsafe-html.Dff7-rCx.js";
|
|
15
|
-
import { b as
|
|
16
|
-
import { c as
|
|
15
|
+
import { b as de } from "./_baseUniq.lwMgmtt2.js";
|
|
16
|
+
import { c as X } from "./component.styles.CRO4Odto.js";
|
|
17
17
|
import { M as ot, U as o, T as g } from "./asset-link-format.ClaYu_v8.js";
|
|
18
|
-
import { v as
|
|
19
|
-
import { P as
|
|
20
|
-
import { c as
|
|
21
|
-
import { w as
|
|
22
|
-
import { s as
|
|
23
|
-
import { r as
|
|
24
|
-
import { n as
|
|
18
|
+
import { v as ue } from "./v4.CKZ6klMF.js";
|
|
19
|
+
import { P as L } from "./position-picker.DjnhxIKF.js";
|
|
20
|
+
import { c as K } from "./custom-element.L4WJXn1j.js";
|
|
21
|
+
import { w as F } from "./watch.DJF5K-8U.js";
|
|
22
|
+
import { s as Dt, a as ut } from "./number.Cx2ncfJJ.js";
|
|
23
|
+
import { r as k } from "./state.CSDxrqLd.js";
|
|
24
|
+
import { n as I } from "./when.Dr1es41R.js";
|
|
25
25
|
import st from "../components/details.js";
|
|
26
|
-
import
|
|
26
|
+
import Xt from "../components/divider.js";
|
|
27
27
|
import { C as at } from "./icon.CpHbi8tH.js";
|
|
28
|
-
import { C as Pt } from "./icon-button.
|
|
29
|
-
import { C as Ft } from "./input.
|
|
30
|
-
import { C as vt } from "./option.
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import { c as
|
|
34
|
-
import { e as
|
|
28
|
+
import { C as Pt } from "./icon-button.N5YNs1qg.js";
|
|
29
|
+
import { C as Ft } from "./input.ve6RUdJ5.js";
|
|
30
|
+
import { C as vt } from "./option.C7dkuxVF.js";
|
|
31
|
+
import wt from "../components/select.js";
|
|
32
|
+
import me from "../components/position-picker.js";
|
|
33
|
+
import { c as fe } from "./image.Y5c_hFx8.js";
|
|
34
|
+
import { e as et } from "./query.BBf1UFkC.js";
|
|
35
35
|
import { c as rt } from "./repeat.CFjcER6_.js";
|
|
36
|
-
import { o as
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
function
|
|
41
|
-
return t && t.length ?
|
|
36
|
+
import { o as U } from "./style-map.llVFPd__.js";
|
|
37
|
+
import Kt from "../components/tooltip.js";
|
|
38
|
+
import ge from "../components/button-group.js";
|
|
39
|
+
import xe from "../components/checkbox.js";
|
|
40
|
+
function ye(t) {
|
|
41
|
+
return t && t.length ? de(t) : [];
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function Zt(t) {
|
|
44
44
|
return typeof t == "object" && t !== null && "URI" in t;
|
|
45
45
|
}
|
|
46
|
-
const
|
|
46
|
+
const Se = {
|
|
47
47
|
artist: "Artist",
|
|
48
48
|
color: "Color",
|
|
49
49
|
createDate: "CreateDate",
|
|
@@ -65,18 +65,18 @@ const me = {
|
|
|
65
65
|
systemIdentifier: "SystemIdentifier",
|
|
66
66
|
text: "Text",
|
|
67
67
|
title: "Title"
|
|
68
|
-
},
|
|
68
|
+
}, Ae = /* @__PURE__ */ new Set(["mediaDate", "createDate", "editDate"]);
|
|
69
69
|
function $t(t) {
|
|
70
70
|
return !/[\s&+/*"\\:(),'<>~|[\]{}]/.test(t) && !/^(?:OR|AND|NOT)$/.test(t) ? t : `"${t.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Nt(t, e) {
|
|
73
73
|
const s = (Array.isArray(e) ? e : [e]).map((a) => `${t}:${$t(a)}`);
|
|
74
74
|
return s.length > 1 ? `(${s.join(" OR ")})` : s[0] ?? "";
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function ve(t, e) {
|
|
77
77
|
return (Array.isArray(e) ? e : [e]).map((s) => `${t}${s.operator}${s.value}`).join(" AND ");
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function we(t) {
|
|
80
80
|
const e = [];
|
|
81
81
|
for (const i of Object.keys(t)) {
|
|
82
82
|
const s = i, a = t[s];
|
|
@@ -86,14 +86,14 @@ function xe(t) {
|
|
|
86
86
|
for (const [n, l] of Object.entries(
|
|
87
87
|
a
|
|
88
88
|
))
|
|
89
|
-
e.push(
|
|
89
|
+
e.push(Nt(n, l));
|
|
90
90
|
continue;
|
|
91
91
|
}
|
|
92
|
-
const r =
|
|
92
|
+
const r = Se[s];
|
|
93
93
|
if (r) {
|
|
94
|
-
if (
|
|
94
|
+
if (Ae.has(s)) {
|
|
95
95
|
e.push(
|
|
96
|
-
|
|
96
|
+
ve(r, a)
|
|
97
97
|
);
|
|
98
98
|
continue;
|
|
99
99
|
}
|
|
@@ -112,7 +112,7 @@ function xe(t) {
|
|
|
112
112
|
e.push(`(${l.join(" OR ")})`);
|
|
113
113
|
continue;
|
|
114
114
|
}
|
|
115
|
-
e.push(
|
|
115
|
+
e.push(Nt(r, a));
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
return e.join(" AND ");
|
|
@@ -128,40 +128,40 @@ function mt(t) {
|
|
|
128
128
|
const e = mt(t.not);
|
|
129
129
|
return e ? `NOT (${e})` : "";
|
|
130
130
|
}
|
|
131
|
-
return
|
|
131
|
+
return we(t);
|
|
132
132
|
}
|
|
133
|
-
const
|
|
133
|
+
const ze = "CoreField.LargeSizePreview", nt = "CoreField.DocType", be = "Document.Title", Ce = "Document.CaptionLong", ht = "Document.FileExtension", ft = "CoreField.FileSize", Ot = "CoreField.Identifier", gt = "CoreField.MaxHeight", xt = "CoreField.MaxWidth", yt = "Document.RecordID", Lt = "CoreField.DocSubType", Yt = "CoreField.TitleWithFallback", St = "CoreField.OriginalFileName", At = "CoreField.UpdatedFileName", _t = "__width", ke = "CoreField.OriginalPreview", Gi = "Document.DocSubType", Qi = "Document.InPoint", Xi = "Document.OutPoint", bt = {
|
|
134
134
|
DEFAULT_VIEW_SIZE: "Document.LargeSizePreview",
|
|
135
135
|
FIELD_TITLE_WITH_FALLBACK: "Document.TitleWithFallback",
|
|
136
136
|
ORIGINAL_VIEW_SIZE: "Document.OriginalPreview"
|
|
137
|
-
},
|
|
138
|
-
[
|
|
139
|
-
[
|
|
140
|
-
[
|
|
141
|
-
},
|
|
142
|
-
Object.entries(
|
|
137
|
+
}, Jt = {
|
|
138
|
+
[ze]: bt.DEFAULT_VIEW_SIZE,
|
|
139
|
+
[Yt]: bt.FIELD_TITLE_WITH_FALLBACK,
|
|
140
|
+
[ke]: bt.ORIGINAL_VIEW_SIZE
|
|
141
|
+
}, Re = Object.fromEntries(
|
|
142
|
+
Object.entries(Jt).map(([t, e]) => [
|
|
143
143
|
e,
|
|
144
144
|
t
|
|
145
145
|
])
|
|
146
146
|
);
|
|
147
|
-
function
|
|
148
|
-
return
|
|
147
|
+
function $e(t) {
|
|
148
|
+
return Jt[t] ?? t;
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function Ut(t) {
|
|
151
151
|
const e = {};
|
|
152
152
|
for (const [i, s] of Object.entries(t)) {
|
|
153
|
-
const a =
|
|
153
|
+
const a = Re[i] ?? i;
|
|
154
154
|
e[a] = s;
|
|
155
155
|
}
|
|
156
156
|
return e;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function Pe(t) {
|
|
159
159
|
const e = new URLSearchParams();
|
|
160
160
|
for (const [i, s] of Object.entries(t))
|
|
161
161
|
s != null && (Array.isArray(s) ? s.forEach((a) => e.append(i, String(a))) : e.append(i, String(s)));
|
|
162
162
|
return e;
|
|
163
163
|
}
|
|
164
|
-
async function
|
|
164
|
+
async function te({
|
|
165
165
|
countPerPage: t,
|
|
166
166
|
fields: e,
|
|
167
167
|
getPermanentAssetsPaths: i,
|
|
@@ -171,49 +171,49 @@ async function Zt({
|
|
|
171
171
|
query: n,
|
|
172
172
|
securityByPassToken: l,
|
|
173
173
|
siteUrl: p,
|
|
174
|
-
sort:
|
|
174
|
+
sort: u,
|
|
175
175
|
token: c,
|
|
176
|
-
useSession:
|
|
176
|
+
useSession: x
|
|
177
177
|
}) {
|
|
178
|
-
const
|
|
178
|
+
const m = e?.map($e), S = {
|
|
179
179
|
CountPerPage: t,
|
|
180
|
-
Fields:
|
|
180
|
+
Fields: ye(m),
|
|
181
181
|
Format: "json",
|
|
182
|
-
GetPermanentAssetsPaths: i
|
|
182
|
+
GetPermanentAssetsPaths: i ?? void 0,
|
|
183
183
|
PageNumber: r,
|
|
184
184
|
Query: mt(n),
|
|
185
185
|
SecurityByPassToken: l || void 0,
|
|
186
|
-
Sort:
|
|
187
|
-
UseSession:
|
|
188
|
-
},
|
|
186
|
+
Sort: u || void 0,
|
|
187
|
+
UseSession: x || void 0
|
|
188
|
+
}, y = s === "POST";
|
|
189
189
|
try {
|
|
190
|
-
return (await
|
|
190
|
+
return (await T.request({
|
|
191
191
|
baseURL: p,
|
|
192
192
|
headers: c ? { Authorization: `Bearer ${c}` } : void 0,
|
|
193
193
|
method: s,
|
|
194
194
|
// POST large RecordID queries as a urlencoded body to dodge the ~2KB URL cap;
|
|
195
195
|
// GET keeps the same fields on the query string.
|
|
196
|
-
...
|
|
196
|
+
...y ? { data: Pe(S) } : { params: S, paramsSerializer: { indexes: null } },
|
|
197
197
|
responseType: "json",
|
|
198
198
|
transformResponse: [
|
|
199
|
-
...Array.isArray(
|
|
200
|
-
a ? (
|
|
201
|
-
items: (
|
|
202
|
-
sort:
|
|
203
|
-
totalCount:
|
|
204
|
-
}) : (
|
|
205
|
-
items: (
|
|
206
|
-
sort:
|
|
207
|
-
totalCount:
|
|
199
|
+
...Array.isArray(T.defaults.transformResponse) ? T.defaults.transformResponse : [],
|
|
200
|
+
a ? (d) => ({
|
|
201
|
+
items: (d.results?.Items ?? []).map(Ut),
|
|
202
|
+
sort: d.results?.GlobalInfo?.Sort ?? "",
|
|
203
|
+
totalCount: d.results?.GlobalInfo?.TotalCount ?? 0
|
|
204
|
+
}) : (d) => ({
|
|
205
|
+
items: (d.APIResponse?.Items ?? []).map(Ut),
|
|
206
|
+
sort: d.APIResponse?.GlobalInfo?.Sort ?? "",
|
|
207
|
+
totalCount: d.APIResponse?.GlobalInfo?.TotalCount ?? 0
|
|
208
208
|
})
|
|
209
209
|
],
|
|
210
|
-
url: a ?
|
|
210
|
+
url: a ? jt.SEARCH_ASSETS : ae["4.0"]
|
|
211
211
|
})).data;
|
|
212
212
|
} catch {
|
|
213
213
|
return { items: [], sort: "", totalCount: 0 };
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
|
-
async function
|
|
216
|
+
async function Fe({
|
|
217
217
|
assetId: t,
|
|
218
218
|
extension: e,
|
|
219
219
|
format: i,
|
|
@@ -223,13 +223,13 @@ async function we({
|
|
|
223
223
|
useSession: n
|
|
224
224
|
}) {
|
|
225
225
|
try {
|
|
226
|
-
return (await
|
|
226
|
+
return (await T.request({
|
|
227
227
|
baseURL: s,
|
|
228
228
|
method: "GET",
|
|
229
229
|
params: {
|
|
230
230
|
SourceAssetFormat: i,
|
|
231
231
|
SourceAssetRecordID: t,
|
|
232
|
-
TargetExtension:
|
|
232
|
+
TargetExtension: he(e),
|
|
233
233
|
Token: a || void 0,
|
|
234
234
|
Transformations: r,
|
|
235
235
|
UseSession: n || void 0
|
|
@@ -239,20 +239,20 @@ async function we({
|
|
|
239
239
|
*/
|
|
240
240
|
timeout: 3e5,
|
|
241
241
|
// 5 minutes
|
|
242
|
-
url:
|
|
242
|
+
url: Vt.GET_TRANSFORM_ASSET_LINK
|
|
243
243
|
})).data;
|
|
244
244
|
} catch {
|
|
245
245
|
return null;
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
|
-
const
|
|
249
|
-
function
|
|
248
|
+
const _e = 50;
|
|
249
|
+
function Me(t, e) {
|
|
250
250
|
const i = [];
|
|
251
251
|
for (let s = 0; s < t.length; s += e)
|
|
252
252
|
i.push(t.slice(s, s + e));
|
|
253
253
|
return i;
|
|
254
254
|
}
|
|
255
|
-
async function
|
|
255
|
+
async function Ie({
|
|
256
256
|
extraFields: t,
|
|
257
257
|
getPermanentAssetsPaths: e,
|
|
258
258
|
isSiteBuilder: i,
|
|
@@ -262,59 +262,59 @@ async function $e({
|
|
|
262
262
|
}) {
|
|
263
263
|
if (!Array.isArray(s) || s.length === 0)
|
|
264
264
|
return { facets: [], items: [], totalCount: 0 };
|
|
265
|
-
const n = t?.filter((
|
|
265
|
+
const n = t?.filter((S) => S && typeof S == "string") ?? [], l = [
|
|
266
266
|
...n,
|
|
267
267
|
At,
|
|
268
268
|
St,
|
|
269
|
-
|
|
270
|
-
|
|
269
|
+
be,
|
|
270
|
+
Ce,
|
|
271
271
|
yt
|
|
272
|
-
], p =
|
|
272
|
+
], p = Me(s, _e), u = await Promise.all(
|
|
273
273
|
p.map(
|
|
274
|
-
(
|
|
275
|
-
countPerPage:
|
|
274
|
+
(S) => te({
|
|
275
|
+
countPerPage: S.length,
|
|
276
276
|
fields: l,
|
|
277
277
|
getPermanentAssetsPaths: e,
|
|
278
278
|
httpMethod: i ? "GET" : "POST",
|
|
279
279
|
isSiteBuilder: i,
|
|
280
280
|
pageNumber: 1,
|
|
281
|
-
query: { recordId:
|
|
281
|
+
query: { recordId: S },
|
|
282
282
|
securityByPassToken: a,
|
|
283
283
|
token: r
|
|
284
284
|
})
|
|
285
285
|
)
|
|
286
|
-
), c = new Map(s.map((
|
|
287
|
-
let
|
|
288
|
-
return
|
|
289
|
-
name:
|
|
290
|
-
recordId:
|
|
286
|
+
), c = new Map(s.map((S, y) => [S, y])), x = u.flatMap((S) => S.items).map((S) => {
|
|
287
|
+
let y = M(S, At);
|
|
288
|
+
return y === "" && (y = M(S, St)), {
|
|
289
|
+
name: y,
|
|
290
|
+
recordId: M(S, yt),
|
|
291
291
|
...n.reduce(
|
|
292
|
-
(
|
|
293
|
-
|
|
294
|
-
const
|
|
295
|
-
return
|
|
292
|
+
(v, d) => {
|
|
293
|
+
v[d] = M(S, d);
|
|
294
|
+
const P = ee(S, d);
|
|
295
|
+
return P !== void 0 && (v[`${d}${_t}`] = String(P)), v;
|
|
296
296
|
},
|
|
297
297
|
{}
|
|
298
298
|
)
|
|
299
299
|
};
|
|
300
300
|
}).sort(
|
|
301
|
-
(
|
|
302
|
-
),
|
|
303
|
-
(
|
|
301
|
+
(S, y) => (c.get(S.recordId) ?? 1 / 0) - (c.get(y.recordId) ?? 1 / 0)
|
|
302
|
+
), m = u.reduce(
|
|
303
|
+
(S, y) => S + y.totalCount,
|
|
304
304
|
0
|
|
305
305
|
);
|
|
306
|
-
return { facets: [], items:
|
|
306
|
+
return { facets: [], items: x, totalCount: m };
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function M(t, e) {
|
|
309
309
|
const i = t[e];
|
|
310
|
-
return i == null ? "" : typeof i == "string" ? i : typeof i == "number" || typeof i == "boolean" ? String(i) :
|
|
310
|
+
return i == null ? "" : typeof i == "string" ? i : typeof i == "number" || typeof i == "boolean" ? String(i) : Zt(i) ? i.URI : "";
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function ee(t, e) {
|
|
313
313
|
const i = t[e];
|
|
314
|
-
if (!(i == null || !
|
|
314
|
+
if (!(i == null || !Zt(i)))
|
|
315
315
|
return typeof i.Width == "number" && i.Width > 0 ? i.Width : void 0;
|
|
316
316
|
}
|
|
317
|
-
async function
|
|
317
|
+
async function Ee({
|
|
318
318
|
countPerPage: t,
|
|
319
319
|
directParentFolderIdentifier: e,
|
|
320
320
|
extraFields: i,
|
|
@@ -324,27 +324,27 @@ async function Pe({
|
|
|
324
324
|
pageNumber: n,
|
|
325
325
|
parentFolderIdentifier: l,
|
|
326
326
|
searchTerm: p,
|
|
327
|
-
securityByPassToken:
|
|
327
|
+
securityByPassToken: u,
|
|
328
328
|
sortOrder: c,
|
|
329
|
-
token:
|
|
329
|
+
token: x
|
|
330
330
|
}) {
|
|
331
331
|
if (!e && !l)
|
|
332
332
|
return { facets: [], items: [], totalCount: 0 };
|
|
333
|
-
const
|
|
333
|
+
const m = (i?.filter((d) => d && typeof d == "string") ?? []).map((d) => d.replace("%20", " ")), S = {
|
|
334
334
|
directParentFolderIdentifier: e,
|
|
335
335
|
parentFolderIdentifier: l,
|
|
336
336
|
...r && r.length > 0 ? { docType: r } : {}
|
|
337
|
-
},
|
|
337
|
+
}, y = await te({
|
|
338
338
|
countPerPage: t,
|
|
339
339
|
fields: [
|
|
340
|
-
...
|
|
341
|
-
|
|
340
|
+
...m,
|
|
341
|
+
Yt,
|
|
342
342
|
xt,
|
|
343
343
|
gt,
|
|
344
344
|
ft,
|
|
345
345
|
nt,
|
|
346
|
-
|
|
347
|
-
|
|
346
|
+
Lt,
|
|
347
|
+
Ot,
|
|
348
348
|
ht,
|
|
349
349
|
yt,
|
|
350
350
|
St,
|
|
@@ -353,30 +353,30 @@ async function Pe({
|
|
|
353
353
|
getPermanentAssetsPaths: s,
|
|
354
354
|
isSiteBuilder: a,
|
|
355
355
|
pageNumber: n,
|
|
356
|
-
query:
|
|
357
|
-
securityByPassToken:
|
|
356
|
+
query: S,
|
|
357
|
+
securityByPassToken: u,
|
|
358
358
|
sort: void 0,
|
|
359
|
-
token:
|
|
360
|
-
}),
|
|
361
|
-
let
|
|
362
|
-
|
|
363
|
-
const
|
|
359
|
+
token: x
|
|
360
|
+
}), v = y.items.map((d) => {
|
|
361
|
+
let P = M(d, ht), R = M(d, At);
|
|
362
|
+
P && !P.startsWith(".") && (P = "." + P), R === "" && (R = M(d, St));
|
|
363
|
+
const W = M(d, yt);
|
|
364
364
|
return {
|
|
365
|
-
docSubType:
|
|
366
|
-
docType:
|
|
367
|
-
extension:
|
|
368
|
-
height:
|
|
369
|
-
id:
|
|
370
|
-
identifier:
|
|
371
|
-
name:
|
|
372
|
-
recordId:
|
|
373
|
-
size:
|
|
374
|
-
width:
|
|
375
|
-
...
|
|
376
|
-
(
|
|
377
|
-
|
|
378
|
-
const ct =
|
|
379
|
-
return ct !== void 0 && (
|
|
365
|
+
docSubType: M(d, Lt),
|
|
366
|
+
docType: M(d, nt) || "",
|
|
367
|
+
extension: P,
|
|
368
|
+
height: M(d, gt) || "0",
|
|
369
|
+
id: W,
|
|
370
|
+
identifier: M(d, Ot),
|
|
371
|
+
name: R,
|
|
372
|
+
recordId: W,
|
|
373
|
+
size: M(d, ft) || "0 MB",
|
|
374
|
+
width: M(d, xt) || "0",
|
|
375
|
+
...m.reduce(
|
|
376
|
+
(_, O) => {
|
|
377
|
+
_[O] = M(d, O);
|
|
378
|
+
const ct = ee(d, O);
|
|
379
|
+
return ct !== void 0 && (_[`${O}${_t}`] = String(ct)), _;
|
|
380
380
|
},
|
|
381
381
|
{}
|
|
382
382
|
)
|
|
@@ -384,11 +384,11 @@ async function Pe({
|
|
|
384
384
|
});
|
|
385
385
|
return {
|
|
386
386
|
facets: [],
|
|
387
|
-
items:
|
|
388
|
-
totalCount:
|
|
387
|
+
items: v,
|
|
388
|
+
totalCount: y.totalCount
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
|
-
async function
|
|
391
|
+
async function Te({
|
|
392
392
|
autoCropMode: t,
|
|
393
393
|
cropHeight: e,
|
|
394
394
|
cropWidth: i,
|
|
@@ -396,7 +396,7 @@ async function Fe({
|
|
|
396
396
|
useSession: a
|
|
397
397
|
}) {
|
|
398
398
|
try {
|
|
399
|
-
return (await
|
|
399
|
+
return (await T.request({
|
|
400
400
|
method: "GET",
|
|
401
401
|
params: {
|
|
402
402
|
AutoCropMode: t,
|
|
@@ -409,7 +409,7 @@ async function Fe({
|
|
|
409
409
|
timeout: 3e5,
|
|
410
410
|
// 5 minutes
|
|
411
411
|
transformResponse: [
|
|
412
|
-
...Array.isArray(
|
|
412
|
+
...Array.isArray(T.defaults.transformResponse) ? T.defaults.transformResponse : [],
|
|
413
413
|
(n) => ({
|
|
414
414
|
height: n.cropHeight,
|
|
415
415
|
width: n.cropWidth,
|
|
@@ -417,13 +417,13 @@ async function Fe({
|
|
|
417
417
|
y: n.cropY
|
|
418
418
|
})
|
|
419
419
|
],
|
|
420
|
-
url:
|
|
420
|
+
url: Vt.GET_CROP_ZONE_SUGGESTION
|
|
421
421
|
})).data;
|
|
422
422
|
} catch {
|
|
423
423
|
return null;
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
|
-
async function
|
|
426
|
+
async function Ki({
|
|
427
427
|
assetRecordId: t,
|
|
428
428
|
isSiteBuilder: e,
|
|
429
429
|
siteUrl: i,
|
|
@@ -431,7 +431,7 @@ async function Vi({
|
|
|
431
431
|
useSession: a
|
|
432
432
|
}) {
|
|
433
433
|
try {
|
|
434
|
-
return (await
|
|
434
|
+
return (await T.request({
|
|
435
435
|
baseURL: i,
|
|
436
436
|
method: "GET",
|
|
437
437
|
params: {
|
|
@@ -441,7 +441,7 @@ async function Vi({
|
|
|
441
441
|
},
|
|
442
442
|
responseType: "json",
|
|
443
443
|
transformResponse: [
|
|
444
|
-
...Array.isArray(
|
|
444
|
+
...Array.isArray(T.defaults.transformResponse) ? T.defaults.transformResponse : [],
|
|
445
445
|
(n) => !n || typeof n != "object" ? [] : n.proxies?.map((l) => ({
|
|
446
446
|
cdnName: l.cdnName,
|
|
447
447
|
extension: l.extension,
|
|
@@ -454,22 +454,22 @@ async function Vi({
|
|
|
454
454
|
width: l.width
|
|
455
455
|
})) ?? []
|
|
456
456
|
],
|
|
457
|
-
url: e ?
|
|
457
|
+
url: e ? jt.GET_AVAILABLE_PROXIES : ne
|
|
458
458
|
})).data;
|
|
459
459
|
} catch {
|
|
460
460
|
return [];
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
|
-
async function
|
|
463
|
+
async function Zi({
|
|
464
464
|
siteUrl: t
|
|
465
465
|
} = {}) {
|
|
466
466
|
try {
|
|
467
|
-
return (await
|
|
467
|
+
return (await T.request({
|
|
468
468
|
baseURL: t,
|
|
469
469
|
method: "GET",
|
|
470
470
|
responseType: "json",
|
|
471
471
|
transformResponse: [
|
|
472
|
-
...Array.isArray(
|
|
472
|
+
...Array.isArray(T.defaults.transformResponse) ? T.defaults.transformResponse : [],
|
|
473
473
|
(i) => !i || typeof i != "object" ? {
|
|
474
474
|
formatsByDocType: {
|
|
475
475
|
Audio: {},
|
|
@@ -481,13 +481,13 @@ async function Gi({
|
|
|
481
481
|
formatsByDocType: i.formatsByDocType ?? {}
|
|
482
482
|
}
|
|
483
483
|
],
|
|
484
|
-
url:
|
|
484
|
+
url: oe
|
|
485
485
|
})).data;
|
|
486
486
|
} catch {
|
|
487
487
|
return { formatsByDocType: {} };
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
|
-
async function
|
|
490
|
+
async function Yi({
|
|
491
491
|
recordIds: t,
|
|
492
492
|
rightsToCheck: e
|
|
493
493
|
}) {
|
|
@@ -498,19 +498,19 @@ async function Qi({
|
|
|
498
498
|
invalidObjects: []
|
|
499
499
|
};
|
|
500
500
|
try {
|
|
501
|
-
const { data: s } = await
|
|
501
|
+
const { data: s } = await T.request({
|
|
502
502
|
method: "GET",
|
|
503
503
|
params: { RecordIDs: t, RightsToCheck: e },
|
|
504
504
|
paramsSerializer: { indexes: null },
|
|
505
505
|
responseType: "json",
|
|
506
|
-
url:
|
|
506
|
+
url: re.GET_AUTHORIZED_OBJECTS
|
|
507
507
|
});
|
|
508
508
|
return s;
|
|
509
509
|
} catch {
|
|
510
510
|
return i;
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
|
-
const
|
|
513
|
+
const Ct = 20, Y = "TR1", lt = "TRX", He = /* @__PURE__ */ new Set([".gif"]), We = /* @__PURE__ */ new Set([
|
|
514
514
|
".avif",
|
|
515
515
|
".bmp",
|
|
516
516
|
".gif",
|
|
@@ -521,14 +521,14 @@ const wt = 20, Z = "TR1", lt = "TRX", _e = /* @__PURE__ */ new Set([".gif"]), Me
|
|
|
521
521
|
".svg",
|
|
522
522
|
".webp"
|
|
523
523
|
]);
|
|
524
|
-
function
|
|
524
|
+
function ie(t) {
|
|
525
525
|
const e = t.toLowerCase(), i = e.startsWith(".") ? e : `.${e}`;
|
|
526
|
-
return
|
|
526
|
+
return We.has(i);
|
|
527
527
|
}
|
|
528
|
-
function
|
|
529
|
-
return t !== void 0 && t !== "" && t !== ot.Image ? !1 : !e ||
|
|
528
|
+
function Bt(t, e) {
|
|
529
|
+
return t !== void 0 && t !== "" && t !== ot.Image ? !1 : !e || ie(e);
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function qt({
|
|
532
532
|
autoFormat: t,
|
|
533
533
|
buildSrcset: e,
|
|
534
534
|
docType: i,
|
|
@@ -536,41 +536,50 @@ function Lt({
|
|
|
536
536
|
format: a,
|
|
537
537
|
item: r,
|
|
538
538
|
manualFormat: n,
|
|
539
|
-
size: l
|
|
539
|
+
size: l,
|
|
540
|
+
useExpiringAssetUrls: p
|
|
540
541
|
}) {
|
|
541
|
-
const
|
|
542
|
-
const
|
|
543
|
-
if (!
|
|
542
|
+
const u = s?.toLowerCase() ?? "", c = u.startsWith(".") ? u : `.${u}`, x = `path_${Y}`, m = (v, d) => {
|
|
543
|
+
const P = r[v];
|
|
544
|
+
if (!P)
|
|
544
545
|
return;
|
|
545
|
-
const
|
|
546
|
+
const R = r[`${v}${_t}`], W = t && !p ? Rt(P, [], {
|
|
546
547
|
autoFormat: !n,
|
|
547
|
-
extension:
|
|
548
|
-
format:
|
|
549
|
-
}) :
|
|
548
|
+
extension: u,
|
|
549
|
+
format: d
|
|
550
|
+
}) : P;
|
|
550
551
|
return {
|
|
551
|
-
maxWidth:
|
|
552
|
-
src:
|
|
553
|
-
srcset: e ?
|
|
554
|
-
extension:
|
|
555
|
-
format:
|
|
556
|
-
maxWidth:
|
|
552
|
+
maxWidth: R,
|
|
553
|
+
src: W,
|
|
554
|
+
srcset: e && !p ? ce(W, {
|
|
555
|
+
extension: u,
|
|
556
|
+
format: d,
|
|
557
|
+
maxWidth: pe(n, R)
|
|
557
558
|
}) : ""
|
|
558
559
|
};
|
|
559
560
|
};
|
|
561
|
+
if (p) {
|
|
562
|
+
const v = le(
|
|
563
|
+
r,
|
|
564
|
+
Bt(i, u),
|
|
565
|
+
u
|
|
566
|
+
);
|
|
567
|
+
return v ? m(v) ?? {} : {};
|
|
568
|
+
}
|
|
560
569
|
if (!n) {
|
|
561
|
-
const
|
|
562
|
-
return m(
|
|
570
|
+
const v = Qt(u, l), d = `path_${v}`;
|
|
571
|
+
return m(d, v) ?? m(x, Y) ?? {};
|
|
563
572
|
}
|
|
564
|
-
const
|
|
565
|
-
return
|
|
573
|
+
const S = a ? `path_${a}` : void 0;
|
|
574
|
+
return S && r[S] ? a !== lt || Bt(i, u) ? m(S, a) ?? {} : m(x, Y) ?? {} : !!u && He.has(c) ? m(`path_${lt}`, lt) ?? m(x, Y) ?? {} : m(x, Y) ?? {};
|
|
566
575
|
}
|
|
567
|
-
class
|
|
576
|
+
class Ji {
|
|
568
577
|
constructor(e, i) {
|
|
569
|
-
this.data = [], this.folderId = "", this.fetchedPages = /* @__PURE__ */ new Set(), this.totalCount = 0, this.maxEnd = 1 / 0, this.pageSize =
|
|
578
|
+
this.data = [], this.folderId = "", this.fetchedPages = /* @__PURE__ */ new Set(), this.totalCount = 0, this.maxEnd = 1 / 0, this.pageSize = Ct, this.requestEpoch = 0, this.host = e, this.host.addController?.(this);
|
|
570
579
|
const s = i?.maxEnd;
|
|
571
580
|
this.maxEnd = typeof s == "number" && Number.isFinite(s) && s >= 0 ? Math.floor(s) : 1 / 0;
|
|
572
581
|
const a = i?.pageSize;
|
|
573
|
-
this.pageSize = typeof a == "number" && Number.isFinite(a) && a >= 1 ? Math.floor(a) :
|
|
582
|
+
this.pageSize = typeof a == "number" && Number.isFinite(a) && a >= 1 ? Math.floor(a) : Ct, this.authToken = i?.token, this.securityByPassToken = i?.securityByPassToken, this.isSiteBuilder = i?.isSiteBuilder ?? !1, this.autoFormat = i?.autoFormat ?? !1, this.buildSrcset = i?.buildSrcset ?? !1;
|
|
574
583
|
}
|
|
575
584
|
get totalDataCount() {
|
|
576
585
|
return this.totalCount;
|
|
@@ -588,7 +597,7 @@ class Xi {
|
|
|
588
597
|
* Shrinking is ignored once pages are cached: collapsing already has what it needs.
|
|
589
598
|
*/
|
|
590
599
|
setPageSize(e) {
|
|
591
|
-
const i = Number.isFinite(e) && e >= 1 ? Math.floor(e) :
|
|
600
|
+
const i = Number.isFinite(e) && e >= 1 ? Math.floor(e) : Ct;
|
|
592
601
|
if (this.pageSize === i)
|
|
593
602
|
return;
|
|
594
603
|
const s = this.fetchedPages.size > 0;
|
|
@@ -606,27 +615,31 @@ class Xi {
|
|
|
606
615
|
return this.data;
|
|
607
616
|
if (this.totalCount > 0 && e >= this.totalCount && (e = this.totalCount - 1, e < r))
|
|
608
617
|
return this.data;
|
|
609
|
-
const l = this.requestEpoch
|
|
618
|
+
const l = this.requestEpoch, p = Ht(
|
|
619
|
+
this.host.ownerDocument.defaultView
|
|
620
|
+
);
|
|
610
621
|
if (!this.folderId || l !== this.requestEpoch)
|
|
611
622
|
return this.data;
|
|
612
|
-
const
|
|
623
|
+
const u = s ? `path_${s}` : void 0, c = `path_${Y}`, x = `path_${lt}`, m = p ? [c, x] : [
|
|
613
624
|
...new Set(
|
|
614
|
-
[
|
|
615
|
-
(
|
|
625
|
+
[u, c, x].filter(
|
|
626
|
+
(v) => !!v
|
|
616
627
|
)
|
|
617
628
|
)
|
|
618
|
-
],
|
|
619
|
-
for (let
|
|
620
|
-
if (this.fetchedPages.has(
|
|
629
|
+
], S = Math.floor(r / this.pageSize) + 1, y = Math.floor(e / this.pageSize) + 1;
|
|
630
|
+
for (let v = S; v <= y; v++) {
|
|
631
|
+
if (this.fetchedPages.has(v))
|
|
621
632
|
continue;
|
|
622
|
-
const
|
|
633
|
+
const d = await Ee({
|
|
623
634
|
countPerPage: this.pageSize,
|
|
624
635
|
directParentFolderIdentifier: this.folderId,
|
|
625
636
|
extraFields: [...i, ...m],
|
|
626
|
-
getPermanentAssetsPaths:
|
|
637
|
+
getPermanentAssetsPaths: Wt(
|
|
638
|
+
this.host.ownerDocument.defaultView
|
|
639
|
+
),
|
|
627
640
|
isSiteBuilder: this.isSiteBuilder,
|
|
628
641
|
limitedDocTypes: [ot.Image, ot.Audio, ot.Video, ot.Multimedia],
|
|
629
|
-
pageNumber:
|
|
642
|
+
pageNumber: v,
|
|
630
643
|
searchTerm: "",
|
|
631
644
|
securityByPassToken: this.securityByPassToken,
|
|
632
645
|
sortOrder: "",
|
|
@@ -634,45 +647,46 @@ class Xi {
|
|
|
634
647
|
});
|
|
635
648
|
if (l !== this.requestEpoch)
|
|
636
649
|
return this.data;
|
|
637
|
-
if (this.fetchedPages.add(
|
|
638
|
-
const
|
|
639
|
-
this.totalCount =
|
|
650
|
+
if (this.fetchedPages.add(v), !this.totalCount && d.totalCount) {
|
|
651
|
+
const R = Math.min(this.maxEnd, d.totalCount);
|
|
652
|
+
this.totalCount = R, this.data = Array.from({ length: R }, () => ({
|
|
640
653
|
alt: "",
|
|
641
|
-
id: `temp-${
|
|
654
|
+
id: `temp-${ue()}`,
|
|
642
655
|
name: "",
|
|
643
656
|
src: ""
|
|
644
657
|
}));
|
|
645
658
|
}
|
|
646
|
-
const
|
|
647
|
-
for (let
|
|
648
|
-
const
|
|
649
|
-
if (
|
|
650
|
-
const
|
|
651
|
-
maxWidth:
|
|
652
|
-
src:
|
|
653
|
-
srcset:
|
|
654
|
-
} =
|
|
659
|
+
const P = (v - 1) * this.pageSize;
|
|
660
|
+
for (let R = 0; R < d.items.length; R++) {
|
|
661
|
+
const W = P + R;
|
|
662
|
+
if (W < this.data.length) {
|
|
663
|
+
const _ = d.items[R], {
|
|
664
|
+
maxWidth: O,
|
|
665
|
+
src: ct,
|
|
666
|
+
srcset: se
|
|
667
|
+
} = qt({
|
|
655
668
|
autoFormat: this.autoFormat,
|
|
656
669
|
buildSrcset: this.buildSrcset,
|
|
657
|
-
docType:
|
|
658
|
-
extension:
|
|
670
|
+
docType: _.docType,
|
|
671
|
+
extension: _.extension,
|
|
659
672
|
format: s,
|
|
660
|
-
item:
|
|
673
|
+
item: _,
|
|
661
674
|
manualFormat: a,
|
|
662
|
-
size:
|
|
675
|
+
size: _.size,
|
|
676
|
+
useExpiringAssetUrls: p
|
|
663
677
|
});
|
|
664
|
-
let pt =
|
|
665
|
-
pt && n && n.length > 0 && (pt = Rt(pt, n), It = ""), this.data[
|
|
666
|
-
alt:
|
|
667
|
-
docType:
|
|
668
|
-
extension:
|
|
669
|
-
id:
|
|
670
|
-
maxWidth:
|
|
671
|
-
name:
|
|
678
|
+
let pt = ct, It = se;
|
|
679
|
+
!p && pt && n && n.length > 0 && (pt = Rt(pt, n), It = ""), this.data[W] = {
|
|
680
|
+
alt: _.name,
|
|
681
|
+
docType: _.docType,
|
|
682
|
+
extension: _.extension,
|
|
683
|
+
id: _.id,
|
|
684
|
+
maxWidth: O,
|
|
685
|
+
name: _.name,
|
|
672
686
|
src: pt,
|
|
673
687
|
srcset: It,
|
|
674
688
|
...i.reduce(
|
|
675
|
-
(Et, Tt) => (Et[Tt] =
|
|
689
|
+
(Et, Tt) => (Et[Tt] = _[Tt] ?? "", Et),
|
|
676
690
|
{}
|
|
677
691
|
)
|
|
678
692
|
};
|
|
@@ -689,33 +703,33 @@ class Xi {
|
|
|
689
703
|
manualFormat: n = !0,
|
|
690
704
|
minLimit: l = 5,
|
|
691
705
|
noPlaceholders: p = !1,
|
|
692
|
-
transformations:
|
|
706
|
+
transformations: u
|
|
693
707
|
}) {
|
|
694
708
|
(!this.folderId || this.folderId !== s) && (this.folderId = s, this.resetFolderState()), a && this.resetPageCache();
|
|
695
|
-
const c = Math.max(5, l),
|
|
709
|
+
const c = Math.max(5, l), x = e, m = e + c, S = [
|
|
696
710
|
...i,
|
|
697
711
|
gt,
|
|
698
712
|
xt
|
|
699
713
|
];
|
|
700
714
|
await this.fetchImages({
|
|
701
|
-
end:
|
|
702
|
-
extraFields:
|
|
715
|
+
end: m,
|
|
716
|
+
extraFields: S.filter((d) => d !== ""),
|
|
703
717
|
format: r,
|
|
704
718
|
manualFormat: n,
|
|
705
|
-
start:
|
|
706
|
-
transformations:
|
|
719
|
+
start: x,
|
|
720
|
+
transformations: u
|
|
707
721
|
});
|
|
708
|
-
let
|
|
709
|
-
|
|
710
|
-
const
|
|
722
|
+
let y = e - c;
|
|
723
|
+
y < 0 && (this.totalCount === 0 ? y = 0 : y = Math.max(0, this.totalCount + y));
|
|
724
|
+
const v = y + c;
|
|
711
725
|
return await this.fetchImages({
|
|
712
|
-
end:
|
|
713
|
-
extraFields:
|
|
726
|
+
end: v,
|
|
727
|
+
extraFields: S.filter((d) => d !== ""),
|
|
714
728
|
format: r,
|
|
715
729
|
manualFormat: n,
|
|
716
|
-
start:
|
|
717
|
-
transformations:
|
|
718
|
-
}), p ? this.data.filter((
|
|
730
|
+
start: y,
|
|
731
|
+
transformations: u
|
|
732
|
+
}), p ? this.data.filter((d) => d.id && !d.id.startsWith("temp-")) : this.data;
|
|
719
733
|
}
|
|
720
734
|
async fetchImagesByIDs({
|
|
721
735
|
extraFields: e = [],
|
|
@@ -726,52 +740,60 @@ class Xi {
|
|
|
726
740
|
}) {
|
|
727
741
|
if (a.length === 0)
|
|
728
742
|
return [];
|
|
729
|
-
const n =
|
|
743
|
+
const n = Ht(
|
|
744
|
+
this.host.ownerDocument.defaultView
|
|
745
|
+
), l = i ? `path_${i}` : void 0, p = `path_${Y}`, u = `path_${lt}`, c = n ? [p, u] : [
|
|
730
746
|
...new Set(
|
|
731
|
-
[
|
|
732
|
-
(
|
|
747
|
+
[l, p, u].filter(
|
|
748
|
+
(y) => !!y
|
|
733
749
|
)
|
|
734
750
|
)
|
|
735
|
-
],
|
|
751
|
+
], x = [
|
|
752
|
+
ht,
|
|
753
|
+
...n ? [] : [ft]
|
|
754
|
+
], m = [
|
|
736
755
|
...e,
|
|
737
756
|
nt,
|
|
738
757
|
gt,
|
|
739
758
|
xt
|
|
740
759
|
];
|
|
741
|
-
return (await
|
|
742
|
-
extraFields: [...m, ...
|
|
743
|
-
getPermanentAssetsPaths:
|
|
760
|
+
return (await Ie({
|
|
761
|
+
extraFields: [...m, ...c, ...x].filter((y) => y !== ""),
|
|
762
|
+
getPermanentAssetsPaths: Wt(
|
|
763
|
+
this.host.ownerDocument.defaultView
|
|
764
|
+
),
|
|
744
765
|
isSiteBuilder: this.isSiteBuilder,
|
|
745
766
|
recordIds: a,
|
|
746
767
|
securityByPassToken: this.securityByPassToken,
|
|
747
768
|
token: this.authToken
|
|
748
|
-
})).items.map((
|
|
769
|
+
})).items.map((y) => {
|
|
749
770
|
const {
|
|
750
|
-
maxWidth:
|
|
751
|
-
src:
|
|
752
|
-
srcset:
|
|
753
|
-
} =
|
|
771
|
+
maxWidth: v,
|
|
772
|
+
src: d,
|
|
773
|
+
srcset: P
|
|
774
|
+
} = qt({
|
|
754
775
|
autoFormat: this.autoFormat,
|
|
755
776
|
buildSrcset: this.buildSrcset,
|
|
756
|
-
docType:
|
|
757
|
-
extension:
|
|
777
|
+
docType: y[nt],
|
|
778
|
+
extension: y[ht],
|
|
758
779
|
format: i,
|
|
759
|
-
item:
|
|
780
|
+
item: y,
|
|
760
781
|
manualFormat: s,
|
|
761
|
-
size:
|
|
782
|
+
size: y[ft],
|
|
783
|
+
useExpiringAssetUrls: n
|
|
762
784
|
});
|
|
763
|
-
let
|
|
764
|
-
return
|
|
765
|
-
alt:
|
|
766
|
-
docType:
|
|
767
|
-
extension:
|
|
768
|
-
id:
|
|
769
|
-
maxWidth:
|
|
770
|
-
name:
|
|
771
|
-
src:
|
|
772
|
-
srcset:
|
|
785
|
+
let R = d, W = P;
|
|
786
|
+
return !n && R && r && r.length > 0 && (R = Rt(R, r), W = ""), {
|
|
787
|
+
alt: y.name,
|
|
788
|
+
docType: y[nt],
|
|
789
|
+
extension: y[ht] || "",
|
|
790
|
+
id: y.recordId,
|
|
791
|
+
maxWidth: v,
|
|
792
|
+
name: y.name,
|
|
793
|
+
src: R,
|
|
794
|
+
srcset: W,
|
|
773
795
|
...m.reduce(
|
|
774
|
-
(
|
|
796
|
+
(_, O) => (_[O] = y[O] ?? "", _),
|
|
775
797
|
{}
|
|
776
798
|
)
|
|
777
799
|
};
|
|
@@ -786,18 +808,18 @@ class Xi {
|
|
|
786
808
|
noPlaceholders: n = !1,
|
|
787
809
|
page: l,
|
|
788
810
|
pageSize: p = 10,
|
|
789
|
-
transformations:
|
|
811
|
+
transformations: u
|
|
790
812
|
}) {
|
|
791
813
|
(!this.folderId || this.folderId !== i) && (this.folderId = i, this.resetFolderState()), s && this.resetPageCache();
|
|
792
|
-
const c = l * p,
|
|
814
|
+
const c = l * p, x = c + p - 1;
|
|
793
815
|
return await this.fetchImages({
|
|
794
|
-
end:
|
|
816
|
+
end: x,
|
|
795
817
|
extraFields: e,
|
|
796
818
|
format: a,
|
|
797
819
|
manualFormat: r,
|
|
798
820
|
start: c,
|
|
799
|
-
transformations:
|
|
800
|
-
}), n ? this.data.filter((
|
|
821
|
+
transformations: u
|
|
822
|
+
}), n ? this.data.filter((m) => m.id && !m.id.startsWith("temp-")) : this.data;
|
|
801
823
|
}
|
|
802
824
|
async *fetchImagesInFolderByChunk({
|
|
803
825
|
chunkSize: e = 10,
|
|
@@ -808,7 +830,7 @@ class Xi {
|
|
|
808
830
|
format: n,
|
|
809
831
|
manualFormat: l = !0,
|
|
810
832
|
start: p = 0,
|
|
811
|
-
transformations:
|
|
833
|
+
transformations: u
|
|
812
834
|
}) {
|
|
813
835
|
const c = Math.max(1, e);
|
|
814
836
|
if ((!this.folderId || this.folderId !== a) && (this.folderId = a, this.resetFolderState()), r && this.resetPageCache(), i !== -1) {
|
|
@@ -818,27 +840,27 @@ class Xi {
|
|
|
818
840
|
format: n,
|
|
819
841
|
manualFormat: l,
|
|
820
842
|
start: p,
|
|
821
|
-
transformations:
|
|
843
|
+
transformations: u
|
|
822
844
|
}), yield this.data;
|
|
823
845
|
return;
|
|
824
846
|
}
|
|
825
|
-
let
|
|
847
|
+
let x = p, m = p + c;
|
|
826
848
|
if (await this.fetchImages({
|
|
827
|
-
end:
|
|
849
|
+
end: m,
|
|
828
850
|
extraFields: s,
|
|
829
851
|
format: n,
|
|
830
852
|
manualFormat: l,
|
|
831
|
-
start:
|
|
832
|
-
transformations:
|
|
833
|
-
}), yield this.data, !(!this.totalCount || this.totalCount <=
|
|
834
|
-
for (;
|
|
835
|
-
|
|
836
|
-
end:
|
|
853
|
+
start: x,
|
|
854
|
+
transformations: u
|
|
855
|
+
}), yield this.data, !(!this.totalCount || this.totalCount <= m))
|
|
856
|
+
for (; m < this.totalCount; )
|
|
857
|
+
x = m, m = Math.min(m + c, this.totalCount), await this.fetchImages({
|
|
858
|
+
end: m,
|
|
837
859
|
extraFields: s,
|
|
838
860
|
format: n,
|
|
839
861
|
manualFormat: l,
|
|
840
|
-
start:
|
|
841
|
-
transformations:
|
|
862
|
+
start: x,
|
|
863
|
+
transformations: u
|
|
842
864
|
}), yield this.data;
|
|
843
865
|
}
|
|
844
866
|
hostConnected() {
|
|
@@ -853,15 +875,15 @@ class Xi {
|
|
|
853
875
|
this.resetPageCache();
|
|
854
876
|
}
|
|
855
877
|
}
|
|
856
|
-
const
|
|
857
|
-
var
|
|
858
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
878
|
+
const De = G`.asset-link-format__details{--header-padding:var(--cx-spacing-small) var(--cx-spacing-medium)}.asset-link-format__details::part(icon){width:var(--cx-font-size-3x-large);height:var(--cx-font-size-3x-large);background-color:var(--cx-color-neutral-100);border-radius:var(--cx-border-radius-large);color:var(--cx-color-neutral-600);font-size:var(--cx-font-size-large);justify-content:center;align-items:center;display:flex}.asset-link-format__details::part(input-label){color:var(--cx-color-neutral-400);margin-inline-start:var(--cx-spacing-small)}.asset-link-format__header{padding:var(--cx-spacing-medium)}.asset-link-format__section-header{padding:0 var(--cx-spacing-medium);border-top:var(--section-header-border-width,1px) solid var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-50)}.asset-link-format__undo,.asset-link-format__reset{--color:var(--cx-color-primary);--background-color:transparent}`, Ne = G`cx-details::part(base){border-bottom-width:0}cx-space{width:100%}cx-space cx-input{flex:1}.crop__unit-select{width:120px}.crop__input-group{flex:1;display:flex}`;
|
|
879
|
+
var Oe = Object.defineProperty, Le = Object.getOwnPropertyDescriptor, z = (t, e, i, s) => {
|
|
880
|
+
for (var a = s > 1 ? void 0 : s ? Le(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
859
881
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
860
|
-
return s && a &&
|
|
882
|
+
return s && a && Oe(e, i, a), a;
|
|
861
883
|
};
|
|
862
|
-
let
|
|
884
|
+
let w = class extends j {
|
|
863
885
|
constructor() {
|
|
864
|
-
super(...arguments), this.localize = new
|
|
886
|
+
super(...arguments), this.localize = new Q(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.percentageWidth = 0, this.percentageHeight = 0, this.unit = o.Pixel, this.disabledApply = !1, this.noRatioModes = !1, this.showPositionPicker = !1, this.lastAppliedSetting = {
|
|
865
887
|
[o.Pixel]: {
|
|
866
888
|
height: 0,
|
|
867
889
|
percentageHeight: 100,
|
|
@@ -880,7 +902,7 @@ let v = class extends j {
|
|
|
880
902
|
x: 0,
|
|
881
903
|
y: 0
|
|
882
904
|
}
|
|
883
|
-
}, this.loading = !1, this.cropModes = [], this.focusModes = [], this.focusMode = "manual", this.cropMode = "free", this.position =
|
|
905
|
+
}, this.loading = !1, this.cropModes = [], this.focusModes = [], this.focusMode = "manual", this.cropMode = "free", this.position = L.CenterCenter, this.keepAspectRatio = !1, this.invalidWidth = !1, this.invalidHeight = !1, this.aspectRatio = 0;
|
|
884
906
|
}
|
|
885
907
|
get selectedMode() {
|
|
886
908
|
return this.cropModes.find((t) => t.value === this.cropMode);
|
|
@@ -973,7 +995,7 @@ let v = class extends j {
|
|
|
973
995
|
const [s, a] = e.split(":").map(Number);
|
|
974
996
|
if (this.unit === o.Pixel) {
|
|
975
997
|
let r = s, n = a;
|
|
976
|
-
Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: n, width: r } =
|
|
998
|
+
Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: n, width: r } = fe(
|
|
977
999
|
this.maxWidth,
|
|
978
1000
|
this.maxHeight,
|
|
979
1001
|
s,
|
|
@@ -1091,16 +1113,16 @@ let v = class extends j {
|
|
|
1091
1113
|
}
|
|
1092
1114
|
render() {
|
|
1093
1115
|
const t = this.cropModes.filter((i) => !i.auto), e = this.cropModes.filter((i) => i.auto);
|
|
1094
|
-
return b`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="crop"></cx-icon></div><cx-typography variant="body2">${this.localize.term("crop")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small">${
|
|
1116
|
+
return b`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="crop"></cx-icon></div><cx-typography variant="body2">${this.localize.term("crop")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small">${I(
|
|
1095
1117
|
!this.noRatioModes,
|
|
1096
|
-
() => b`<cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${
|
|
1118
|
+
() => b`<cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${U({
|
|
1097
1119
|
width: "100%"
|
|
1098
1120
|
})} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${rt(
|
|
1099
1121
|
t,
|
|
1100
1122
|
(i) => i.value,
|
|
1101
1123
|
({ label: i, value: s }) => b`<cx-option value=${s}>${i}</cx-option>`
|
|
1102
1124
|
)}
|
|
1103
|
-
${
|
|
1125
|
+
${I(
|
|
1104
1126
|
e.length > 0,
|
|
1105
1127
|
() => b`<cx-divider></cx-divider><small>${this.localize.term("autoCropping")}</small>`
|
|
1106
1128
|
)}
|
|
@@ -1111,16 +1133,16 @@ let v = class extends j {
|
|
|
1111
1133
|
)}</cx-select>`
|
|
1112
1134
|
)}<cx-space spacing="small"><div class="crop__input-group"><cx-input data-testid="cx-asset-link-format-crop-width" placeholder=${this.localize.term("width")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === o.Pixel ? this.width.toString() : this.ratioWidth.toString()} @cx-change=${this.handleInputChange} @cx-input=${this.handleWidthChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
|
|
1113
1135
|
W
|
|
1114
|
-
</cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-crop-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} @click=${this.handleAspectRatioClick} style=${
|
|
1136
|
+
</cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-crop-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} @click=${this.handleAspectRatioClick} style=${U({
|
|
1115
1137
|
color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
|
|
1116
1138
|
})} ?disabled=${this.loading}></cx-icon-button><cx-input data-testid="cx-asset-link-format-crop-height" placeholder=${this.localize.term("height")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === o.Pixel ? this.height.toString() : this.ratioHeight.toString()} ?disabled=${this.loading} @cx-change=${this.handleInputChange} @cx-input=${this.handleHeightChange} required><cx-typography slot="prefix" variant="body3" part="input-label">
|
|
1117
1139
|
H
|
|
1118
|
-
</cx-typography></cx-input></div>${
|
|
1140
|
+
</cx-typography></cx-input></div>${I(
|
|
1119
1141
|
!this.noRatioModes,
|
|
1120
1142
|
() => b`<cx-select data-testid="cx-asset-link-format-crop-unit" value=${this.unit} hoist class="crop__unit-select" ?disabled=${this.loading} @cx-change=${this.onUnitChange}><cx-option value=${o.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${o.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select>`
|
|
1121
|
-
)}</cx-space>${
|
|
1143
|
+
)}</cx-space>${I(
|
|
1122
1144
|
this.focusModes.length > 0,
|
|
1123
|
-
() => b`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${
|
|
1145
|
+
() => b`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${U({
|
|
1124
1146
|
width: "100%"
|
|
1125
1147
|
})} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${rt(
|
|
1126
1148
|
this.focusModes,
|
|
@@ -1128,127 +1150,127 @@ let v = class extends j {
|
|
|
1128
1150
|
({ label: i, value: s }) => b`<cx-option value=${s}>${i}</cx-option>`
|
|
1129
1151
|
)}</cx-select>`
|
|
1130
1152
|
)}
|
|
1131
|
-
${
|
|
1153
|
+
${I(
|
|
1132
1154
|
this.showPositionPicker && this.focusMode === "manual",
|
|
1133
1155
|
() => b`<cx-position-picker data-testid="cx-asset-link-format-crop-position" value=${this.position} @cx-change=${this.onPositionChange}></cx-position-picker>`
|
|
1134
|
-
)}<cx-button data-testid="cx-asset-link-format-crop-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${
|
|
1156
|
+
)}<cx-button data-testid="cx-asset-link-format-crop-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${U({
|
|
1135
1157
|
marginLeft: "auto"
|
|
1136
1158
|
})} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
1137
1159
|
}
|
|
1138
1160
|
};
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
"cx-button":
|
|
1161
|
+
w.styles = [X, Ne];
|
|
1162
|
+
w.dependencies = {
|
|
1163
|
+
"cx-button": tt,
|
|
1142
1164
|
"cx-details": st,
|
|
1143
|
-
"cx-divider":
|
|
1165
|
+
"cx-divider": Xt,
|
|
1144
1166
|
"cx-icon": at,
|
|
1145
1167
|
"cx-icon-button": Pt,
|
|
1146
1168
|
"cx-input": Ft,
|
|
1147
1169
|
"cx-option": vt,
|
|
1148
|
-
"cx-position-picker":
|
|
1149
|
-
"cx-select":
|
|
1150
|
-
"cx-space":
|
|
1151
|
-
"cx-typography":
|
|
1170
|
+
"cx-position-picker": me,
|
|
1171
|
+
"cx-select": wt,
|
|
1172
|
+
"cx-space": q,
|
|
1173
|
+
"cx-typography": V
|
|
1152
1174
|
};
|
|
1153
1175
|
z([
|
|
1154
|
-
|
|
1155
|
-
],
|
|
1176
|
+
et(".details")
|
|
1177
|
+
], w.prototype, "base", 2);
|
|
1156
1178
|
z([
|
|
1157
|
-
|
|
1158
|
-
],
|
|
1179
|
+
et("cx-position-picker")
|
|
1180
|
+
], w.prototype, "positionPicker", 2);
|
|
1159
1181
|
z([
|
|
1160
1182
|
h({ reflect: !0, type: Boolean })
|
|
1161
|
-
],
|
|
1183
|
+
], w.prototype, "open", 2);
|
|
1162
1184
|
z([
|
|
1163
1185
|
h({ reflect: !0, type: Number })
|
|
1164
|
-
],
|
|
1186
|
+
], w.prototype, "width", 2);
|
|
1165
1187
|
z([
|
|
1166
1188
|
h({ reflect: !0, type: Number })
|
|
1167
|
-
],
|
|
1189
|
+
], w.prototype, "height", 2);
|
|
1168
1190
|
z([
|
|
1169
1191
|
h({ attribute: "max-width", reflect: !0, type: Number })
|
|
1170
|
-
],
|
|
1192
|
+
], w.prototype, "maxWidth", 2);
|
|
1171
1193
|
z([
|
|
1172
1194
|
h({ attribute: "max-height", reflect: !0, type: Number })
|
|
1173
|
-
],
|
|
1195
|
+
], w.prototype, "maxHeight", 2);
|
|
1174
1196
|
z([
|
|
1175
1197
|
h({ attribute: "ratio-width", reflect: !0, type: Number })
|
|
1176
|
-
],
|
|
1198
|
+
], w.prototype, "ratioWidth", 2);
|
|
1177
1199
|
z([
|
|
1178
1200
|
h({ attribute: "ratio-height", reflect: !0, type: Number })
|
|
1179
|
-
],
|
|
1201
|
+
], w.prototype, "ratioHeight", 2);
|
|
1180
1202
|
z([
|
|
1181
1203
|
h({ attribute: "percentage-width", reflect: !0, type: Number })
|
|
1182
|
-
],
|
|
1204
|
+
], w.prototype, "percentageWidth", 2);
|
|
1183
1205
|
z([
|
|
1184
1206
|
h({ attribute: "percentage-height", reflect: !0, type: Number })
|
|
1185
|
-
],
|
|
1207
|
+
], w.prototype, "percentageHeight", 2);
|
|
1186
1208
|
z([
|
|
1187
1209
|
h({ reflect: !0, type: String })
|
|
1188
|
-
],
|
|
1210
|
+
], w.prototype, "unit", 2);
|
|
1189
1211
|
z([
|
|
1190
1212
|
h({ attribute: "disabled-apply", reflect: !0, type: Boolean })
|
|
1191
|
-
],
|
|
1213
|
+
], w.prototype, "disabledApply", 2);
|
|
1192
1214
|
z([
|
|
1193
1215
|
h({ attribute: "no-ratio-modes", reflect: !0, type: Boolean })
|
|
1194
|
-
],
|
|
1216
|
+
], w.prototype, "noRatioModes", 2);
|
|
1195
1217
|
z([
|
|
1196
1218
|
h({ attribute: "show-position-picker", reflect: !0, type: Boolean })
|
|
1197
|
-
],
|
|
1219
|
+
], w.prototype, "showPositionPicker", 2);
|
|
1198
1220
|
z([
|
|
1199
1221
|
h({ attribute: "last-applied-setting", reflect: !1, type: Object })
|
|
1200
|
-
],
|
|
1222
|
+
], w.prototype, "lastAppliedSetting", 2);
|
|
1201
1223
|
z([
|
|
1202
1224
|
h({ reflect: !0, type: Boolean })
|
|
1203
|
-
],
|
|
1225
|
+
], w.prototype, "loading", 2);
|
|
1204
1226
|
z([
|
|
1205
1227
|
h({ attribute: "crop-modes", reflect: !1, type: Array })
|
|
1206
|
-
],
|
|
1228
|
+
], w.prototype, "cropModes", 2);
|
|
1207
1229
|
z([
|
|
1208
1230
|
h({ attribute: "focus-modes", reflect: !1, type: Object })
|
|
1209
|
-
],
|
|
1231
|
+
], w.prototype, "focusModes", 2);
|
|
1210
1232
|
z([
|
|
1211
1233
|
h({ attribute: "focus-mode", reflect: !0, type: String })
|
|
1212
|
-
],
|
|
1234
|
+
], w.prototype, "focusMode", 2);
|
|
1213
1235
|
z([
|
|
1214
1236
|
h({ attribute: "crop-mode", reflect: !0, type: String })
|
|
1215
|
-
],
|
|
1237
|
+
], w.prototype, "cropMode", 2);
|
|
1216
1238
|
z([
|
|
1217
1239
|
h({ reflect: !0, type: String })
|
|
1218
|
-
],
|
|
1240
|
+
], w.prototype, "position", 2);
|
|
1219
1241
|
z([
|
|
1220
1242
|
h({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
|
|
1221
|
-
],
|
|
1243
|
+
], w.prototype, "keepAspectRatio", 2);
|
|
1222
1244
|
z([
|
|
1223
|
-
|
|
1224
|
-
],
|
|
1245
|
+
k()
|
|
1246
|
+
], w.prototype, "invalidWidth", 2);
|
|
1225
1247
|
z([
|
|
1226
|
-
|
|
1227
|
-
],
|
|
1248
|
+
k()
|
|
1249
|
+
], w.prototype, "invalidHeight", 2);
|
|
1228
1250
|
z([
|
|
1229
|
-
|
|
1230
|
-
],
|
|
1251
|
+
k()
|
|
1252
|
+
], w.prototype, "aspectRatio", 2);
|
|
1231
1253
|
z([
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
],
|
|
1254
|
+
F("cropMode", { waitUntilFirstUpdate: !0 }),
|
|
1255
|
+
F("maxWidth", { waitUntilFirstUpdate: !0 }),
|
|
1256
|
+
F("maxHeight", { waitUntilFirstUpdate: !0 }),
|
|
1257
|
+
F("keepAspectRatio")
|
|
1258
|
+
], w.prototype, "handleCropModeChange", 1);
|
|
1237
1259
|
z([
|
|
1238
|
-
|
|
1239
|
-
],
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
],
|
|
1243
|
-
const
|
|
1244
|
-
var
|
|
1245
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1260
|
+
F("open", { waitUntilFirstUpdate: !0 })
|
|
1261
|
+
], w.prototype, "handleOpenChange", 1);
|
|
1262
|
+
w = z([
|
|
1263
|
+
K("cx-asset-link-format-crop")
|
|
1264
|
+
], w);
|
|
1265
|
+
const Ue = G`.extension{padding:var(--cx-spacing-small) var(--cx-spacing-medium);border:solid 1px var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-0);& cx-select{flex:1;width:100%}}`;
|
|
1266
|
+
var Be = Object.defineProperty, qe = Object.getOwnPropertyDescriptor, Mt = (t, e, i, s) => {
|
|
1267
|
+
for (var a = s > 1 ? void 0 : s ? qe(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1246
1268
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1247
|
-
return s && a &&
|
|
1269
|
+
return s && a && Be(e, i, a), a;
|
|
1248
1270
|
};
|
|
1249
|
-
let
|
|
1271
|
+
let J = class extends j {
|
|
1250
1272
|
constructor() {
|
|
1251
|
-
super(...arguments), this.localize = new
|
|
1273
|
+
super(...arguments), this.localize = new Q(this), this.value = "", this.items = [];
|
|
1252
1274
|
}
|
|
1253
1275
|
handleExtensionChange(t) {
|
|
1254
1276
|
const e = t.target.value;
|
|
@@ -1264,32 +1286,32 @@ let Y = class extends j {
|
|
|
1264
1286
|
)}</cx-select></cx-space>`;
|
|
1265
1287
|
}
|
|
1266
1288
|
};
|
|
1267
|
-
|
|
1268
|
-
|
|
1289
|
+
J.styles = [X, Ue];
|
|
1290
|
+
J.dependencies = {
|
|
1269
1291
|
"cx-option": vt,
|
|
1270
|
-
"cx-select":
|
|
1271
|
-
"cx-space":
|
|
1272
|
-
"cx-typography":
|
|
1292
|
+
"cx-select": wt,
|
|
1293
|
+
"cx-space": q,
|
|
1294
|
+
"cx-typography": V
|
|
1273
1295
|
};
|
|
1274
1296
|
Mt([
|
|
1275
1297
|
h({ reflect: !0, type: String })
|
|
1276
|
-
],
|
|
1298
|
+
], J.prototype, "value", 2);
|
|
1277
1299
|
Mt([
|
|
1278
1300
|
h({ reflect: !1, type: Array })
|
|
1279
|
-
],
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
],
|
|
1283
|
-
const
|
|
1284
|
-
var
|
|
1285
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1301
|
+
], J.prototype, "items", 2);
|
|
1302
|
+
J = Mt([
|
|
1303
|
+
K("cx-asset-link-format-extension")
|
|
1304
|
+
], J);
|
|
1305
|
+
const Ve = G`cx-details::part(base){border-bottom-width:0}`;
|
|
1306
|
+
var je = Object.defineProperty, Ge = Object.getOwnPropertyDescriptor, N = (t, e, i, s) => {
|
|
1307
|
+
for (var a = s > 1 ? void 0 : s ? Ge(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1286
1308
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1287
|
-
return s && a &&
|
|
1309
|
+
return s && a && je(e, i, a), a;
|
|
1288
1310
|
};
|
|
1289
1311
|
const kt = "auto";
|
|
1290
|
-
let
|
|
1312
|
+
let E = class extends j {
|
|
1291
1313
|
constructor() {
|
|
1292
|
-
super(...arguments), this.localize = new
|
|
1314
|
+
super(...arguments), this.localize = new Q(this), this.open = !1, this.value = "", this.items = [], this.canAutoFormat = !1, this.autoFormat = !1, this.loading = !1, this.scopedValue = "";
|
|
1293
1315
|
}
|
|
1294
1316
|
/**
|
|
1295
1317
|
* The listbox value that represents the committed choice: the `Auto` entry when that is
|
|
@@ -1351,69 +1373,69 @@ let I = class extends j {
|
|
|
1351
1373
|
(t) => t.id,
|
|
1352
1374
|
(t) => b`<cx-option value=${t.id}>${t.proxyLabel}</cx-option>`
|
|
1353
1375
|
)}
|
|
1354
|
-
${
|
|
1376
|
+
${I(
|
|
1355
1377
|
this.canAutoFormat,
|
|
1356
1378
|
() => b`<cx-divider></cx-divider><cx-option data-testid="cx-asset-link-format-proxy-auto-option" value=${kt}>${this.localize.term("auto")}</cx-option>`,
|
|
1357
|
-
() =>
|
|
1358
|
-
)}</cx-select><cx-button data-testid="cx-asset-link-format-proxy-apply" variant="primary" style=${
|
|
1379
|
+
() => Gt
|
|
1380
|
+
)}</cx-select><cx-button data-testid="cx-asset-link-format-proxy-apply" variant="primary" style=${U({
|
|
1359
1381
|
"margin-left": "auto"
|
|
1360
1382
|
})} ?disabled=${this.scopedValue === this.committedValue} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
1361
1383
|
}
|
|
1362
1384
|
};
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
"cx-button":
|
|
1385
|
+
E.styles = [X, Ve];
|
|
1386
|
+
E.dependencies = {
|
|
1387
|
+
"cx-button": tt,
|
|
1366
1388
|
"cx-details": st,
|
|
1367
|
-
"cx-divider":
|
|
1389
|
+
"cx-divider": Xt,
|
|
1368
1390
|
"cx-icon": at,
|
|
1369
1391
|
"cx-option": vt,
|
|
1370
|
-
"cx-select":
|
|
1371
|
-
"cx-space":
|
|
1372
|
-
"cx-typography":
|
|
1392
|
+
"cx-select": wt,
|
|
1393
|
+
"cx-space": q,
|
|
1394
|
+
"cx-typography": V
|
|
1373
1395
|
};
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
],
|
|
1377
|
-
|
|
1396
|
+
N([
|
|
1397
|
+
et(".details")
|
|
1398
|
+
], E.prototype, "base", 2);
|
|
1399
|
+
N([
|
|
1378
1400
|
h({ reflect: !0, type: Boolean })
|
|
1379
|
-
],
|
|
1380
|
-
|
|
1401
|
+
], E.prototype, "open", 2);
|
|
1402
|
+
N([
|
|
1381
1403
|
h({ reflect: !0, type: String })
|
|
1382
|
-
],
|
|
1383
|
-
|
|
1404
|
+
], E.prototype, "value", 2);
|
|
1405
|
+
N([
|
|
1384
1406
|
h({ reflect: !1, type: Array })
|
|
1385
|
-
],
|
|
1386
|
-
|
|
1407
|
+
], E.prototype, "items", 2);
|
|
1408
|
+
N([
|
|
1387
1409
|
h({ attribute: "can-auto-format", reflect: !0, type: Boolean })
|
|
1388
|
-
],
|
|
1389
|
-
|
|
1410
|
+
], E.prototype, "canAutoFormat", 2);
|
|
1411
|
+
N([
|
|
1390
1412
|
h({ attribute: "auto-format", reflect: !0, type: Boolean })
|
|
1391
|
-
],
|
|
1392
|
-
|
|
1413
|
+
], E.prototype, "autoFormat", 2);
|
|
1414
|
+
N([
|
|
1393
1415
|
h({ reflect: !0, type: Boolean })
|
|
1394
|
-
],
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
],
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
],
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
],
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
],
|
|
1408
|
-
const
|
|
1409
|
-
var
|
|
1410
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1416
|
+
], E.prototype, "loading", 2);
|
|
1417
|
+
N([
|
|
1418
|
+
k()
|
|
1419
|
+
], E.prototype, "scopedValue", 2);
|
|
1420
|
+
N([
|
|
1421
|
+
F("autoFormat"),
|
|
1422
|
+
F("value")
|
|
1423
|
+
], E.prototype, "handleValueChange", 1);
|
|
1424
|
+
N([
|
|
1425
|
+
F("open", { waitUntilFirstUpdate: !0 })
|
|
1426
|
+
], E.prototype, "handleOpenChange", 1);
|
|
1427
|
+
E = N([
|
|
1428
|
+
K("cx-asset-link-format-proxy")
|
|
1429
|
+
], E);
|
|
1430
|
+
const Qe = G`cx-details::part(base){border-bottom-width:0}`;
|
|
1431
|
+
var Xe = Object.defineProperty, Ke = Object.getOwnPropertyDescriptor, it = (t, e, i, s) => {
|
|
1432
|
+
for (var a = s > 1 ? void 0 : s ? Ke(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1411
1433
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1412
|
-
return s && a &&
|
|
1434
|
+
return s && a && Xe(e, i, a), a;
|
|
1413
1435
|
};
|
|
1414
|
-
let
|
|
1436
|
+
let D = class extends j {
|
|
1415
1437
|
constructor() {
|
|
1416
|
-
super(...arguments), this.localize = new
|
|
1438
|
+
super(...arguments), this.localize = new Q(this), this.open = !1, this.value = 100, this.loading = !1, this.scopedValue = 100;
|
|
1417
1439
|
}
|
|
1418
1440
|
/**
|
|
1419
1441
|
* A computed property that checks if the current quality value is invalid.
|
|
@@ -1457,51 +1479,51 @@ let W = class extends j {
|
|
|
1457
1479
|
t.target !== this.base && t.stopPropagation();
|
|
1458
1480
|
}
|
|
1459
1481
|
render() {
|
|
1460
|
-
return b`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div class="details__summary__icon"><div part="icon"><cx-icon name="blur_on"></cx-icon></div></div><cx-typography variant="body2">${this.localize.term("quality")}</cx-typography></cx-space><cx-space spacing="small"><cx-tooltip data-testid="cx-asset-link-format-quality-tooltip" content=${this.localize.term("qualityHelpText")} hoist><cx-input data-testid="cx-asset-link-format-quality" class="details__checkbox" mask="num" .maskBlocks=${{ num: { mask: Number, max: 100, min: 1 } }} value=${this.scopedValue.toString()} style=${
|
|
1482
|
+
return b`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div class="details__summary__icon"><div part="icon"><cx-icon name="blur_on"></cx-icon></div></div><cx-typography variant="body2">${this.localize.term("quality")}</cx-typography></cx-space><cx-space spacing="small"><cx-tooltip data-testid="cx-asset-link-format-quality-tooltip" content=${this.localize.term("qualityHelpText")} hoist><cx-input data-testid="cx-asset-link-format-quality" class="details__checkbox" mask="num" .maskBlocks=${{ num: { mask: Number, max: 100, min: 1 } }} value=${this.scopedValue.toString()} style=${U({
|
|
1461
1483
|
flex: "1"
|
|
1462
1484
|
})} @cx-input=${this.handleQualityChange}></cx-input></cx-tooltip><cx-button data-testid="cx-asset-link-format-quality-apply" variant="primary" ?disabled=${this.invalidValue} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
1463
1485
|
}
|
|
1464
1486
|
};
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
"cx-button":
|
|
1487
|
+
D.styles = [X, Qe];
|
|
1488
|
+
D.dependencies = {
|
|
1489
|
+
"cx-button": tt,
|
|
1468
1490
|
"cx-details": st,
|
|
1469
1491
|
"cx-icon": at,
|
|
1470
1492
|
"cx-input": Ft,
|
|
1471
|
-
"cx-space":
|
|
1472
|
-
"cx-tooltip":
|
|
1473
|
-
"cx-typography":
|
|
1493
|
+
"cx-space": q,
|
|
1494
|
+
"cx-tooltip": Kt,
|
|
1495
|
+
"cx-typography": V
|
|
1474
1496
|
};
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
],
|
|
1478
|
-
|
|
1497
|
+
it([
|
|
1498
|
+
et(".details")
|
|
1499
|
+
], D.prototype, "base", 2);
|
|
1500
|
+
it([
|
|
1479
1501
|
h({ reflect: !0, type: Boolean })
|
|
1480
|
-
],
|
|
1481
|
-
|
|
1502
|
+
], D.prototype, "open", 2);
|
|
1503
|
+
it([
|
|
1482
1504
|
h({ reflect: !0, type: Number })
|
|
1483
|
-
],
|
|
1484
|
-
|
|
1505
|
+
], D.prototype, "value", 2);
|
|
1506
|
+
it([
|
|
1485
1507
|
h({ reflect: !0, type: Boolean })
|
|
1486
|
-
],
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
],
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
],
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
],
|
|
1496
|
-
const
|
|
1497
|
-
var
|
|
1498
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1508
|
+
], D.prototype, "loading", 2);
|
|
1509
|
+
it([
|
|
1510
|
+
k()
|
|
1511
|
+
], D.prototype, "scopedValue", 2);
|
|
1512
|
+
it([
|
|
1513
|
+
F("value")
|
|
1514
|
+
], D.prototype, "handleValueChange", 1);
|
|
1515
|
+
D = it([
|
|
1516
|
+
K("cx-asset-link-format-quality")
|
|
1517
|
+
], D);
|
|
1518
|
+
const Ze = G`cx-details::part(base){border-bottom-width:0}cx-space{width:100%}cx-space cx-input{flex:1}.resize__unit-select{width:120px}.resize__input-group{flex:1;display:flex}`;
|
|
1519
|
+
var Ye = Object.defineProperty, Je = Object.getOwnPropertyDescriptor, $ = (t, e, i, s) => {
|
|
1520
|
+
for (var a = s > 1 ? void 0 : s ? Je(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1499
1521
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1500
|
-
return s && a &&
|
|
1522
|
+
return s && a && Ye(e, i, a), a;
|
|
1501
1523
|
};
|
|
1502
|
-
let
|
|
1524
|
+
let C = class extends j {
|
|
1503
1525
|
constructor() {
|
|
1504
|
-
super(...arguments), this.localize = new
|
|
1526
|
+
super(...arguments), this.localize = new Q(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.unit = o.Pixel, this.lastAppliedSetting = {
|
|
1505
1527
|
[o.Pixel]: { height: 0, width: 0 },
|
|
1506
1528
|
[o.AspectRatio]: { height: 1, width: 1 }
|
|
1507
1529
|
}, this.loading = !1, this.noRatioModes = !1, this.keepAspectRatio = !1, this.invalidWidth = !1, this.invalidHeight = !1, this.aspectRatio = 0;
|
|
@@ -1642,99 +1664,99 @@ let k = class extends j {
|
|
|
1642
1664
|
render() {
|
|
1643
1665
|
return b`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="aspect_ratio"></cx-icon></div><cx-typography variant="body2">${this.localize.term("resize")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small"><cx-space spacing="small"><div class="resize__input-group"><cx-input data-testid="cx-asset-link-format-resize-width" placeholder=${this.localize.term("width")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === o.Pixel ? this.width.toString() : this.ratioWidth.toString()} @cx-input=${this.handleWidthChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
|
|
1644
1666
|
W
|
|
1645
|
-
</cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-resize-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} @click=${this.handleAspectRatioClick} style=${
|
|
1667
|
+
</cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-resize-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} @click=${this.handleAspectRatioClick} style=${U({
|
|
1646
1668
|
color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
|
|
1647
1669
|
})} ?disabled=${this.loading}></cx-icon-button><cx-input data-testid="cx-asset-link-format-resize-height" placeholder=${this.localize.term("height")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === o.Pixel ? this.height.toString() : this.ratioHeight.toString()} @cx-input=${this.handleHeightChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
|
|
1648
1670
|
H
|
|
1649
|
-
</cx-typography></cx-input></div>${
|
|
1671
|
+
</cx-typography></cx-input></div>${I(
|
|
1650
1672
|
!this.noRatioModes,
|
|
1651
1673
|
() => b`<cx-select data-testid="cx-asset-link-format-resize-unit" value=${this.unit} hoist class="resize__unit-select" @cx-change=${this.onUnitChange}><cx-option value=${o.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${o.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select>`
|
|
1652
|
-
)}</cx-space><cx-button data-testid="cx-asset-link-format-resize-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${
|
|
1674
|
+
)}</cx-space><cx-button data-testid="cx-asset-link-format-resize-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${U({
|
|
1653
1675
|
marginLeft: "auto"
|
|
1654
1676
|
})} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
1655
1677
|
}
|
|
1656
1678
|
};
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
"cx-button":
|
|
1679
|
+
C.styles = [X, Ze];
|
|
1680
|
+
C.dependencies = {
|
|
1681
|
+
"cx-button": tt,
|
|
1660
1682
|
"cx-details": st,
|
|
1661
1683
|
"cx-icon": at,
|
|
1662
1684
|
"cx-icon-button": Pt,
|
|
1663
1685
|
"cx-input": Ft,
|
|
1664
1686
|
"cx-option": vt,
|
|
1665
|
-
"cx-select":
|
|
1666
|
-
"cx-space":
|
|
1667
|
-
"cx-typography":
|
|
1687
|
+
"cx-select": wt,
|
|
1688
|
+
"cx-space": q,
|
|
1689
|
+
"cx-typography": V
|
|
1668
1690
|
};
|
|
1669
1691
|
$([
|
|
1670
|
-
|
|
1671
|
-
],
|
|
1692
|
+
et(".details")
|
|
1693
|
+
], C.prototype, "base", 2);
|
|
1672
1694
|
$([
|
|
1673
1695
|
h({ reflect: !0, type: Boolean })
|
|
1674
|
-
],
|
|
1696
|
+
], C.prototype, "open", 2);
|
|
1675
1697
|
$([
|
|
1676
1698
|
h({ reflect: !0, type: Number })
|
|
1677
|
-
],
|
|
1699
|
+
], C.prototype, "width", 2);
|
|
1678
1700
|
$([
|
|
1679
1701
|
h({ reflect: !0, type: Number })
|
|
1680
|
-
],
|
|
1702
|
+
], C.prototype, "height", 2);
|
|
1681
1703
|
$([
|
|
1682
1704
|
h({ attribute: "max-width", reflect: !0, type: Number })
|
|
1683
|
-
],
|
|
1705
|
+
], C.prototype, "maxWidth", 2);
|
|
1684
1706
|
$([
|
|
1685
1707
|
h({ attribute: "max-height", reflect: !0, type: Number })
|
|
1686
|
-
],
|
|
1708
|
+
], C.prototype, "maxHeight", 2);
|
|
1687
1709
|
$([
|
|
1688
1710
|
h({ attribute: "ratio-width", reflect: !0, type: Number })
|
|
1689
|
-
],
|
|
1711
|
+
], C.prototype, "ratioWidth", 2);
|
|
1690
1712
|
$([
|
|
1691
1713
|
h({ attribute: "ratio-height", reflect: !0, type: Number })
|
|
1692
|
-
],
|
|
1714
|
+
], C.prototype, "ratioHeight", 2);
|
|
1693
1715
|
$([
|
|
1694
1716
|
h({ reflect: !0, type: String })
|
|
1695
|
-
],
|
|
1717
|
+
], C.prototype, "unit", 2);
|
|
1696
1718
|
$([
|
|
1697
1719
|
h({ attribute: "last-applied-setting", reflect: !1, type: Object })
|
|
1698
|
-
],
|
|
1720
|
+
], C.prototype, "lastAppliedSetting", 2);
|
|
1699
1721
|
$([
|
|
1700
1722
|
h({ reflect: !0, type: Boolean })
|
|
1701
|
-
],
|
|
1723
|
+
], C.prototype, "loading", 2);
|
|
1702
1724
|
$([
|
|
1703
1725
|
h({ attribute: "no-ratio-modes", reflect: !0, type: Boolean })
|
|
1704
|
-
],
|
|
1726
|
+
], C.prototype, "noRatioModes", 2);
|
|
1705
1727
|
$([
|
|
1706
1728
|
h({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
|
|
1707
|
-
],
|
|
1729
|
+
], C.prototype, "keepAspectRatio", 2);
|
|
1708
1730
|
$([
|
|
1709
|
-
|
|
1710
|
-
],
|
|
1731
|
+
k()
|
|
1732
|
+
], C.prototype, "invalidWidth", 2);
|
|
1711
1733
|
$([
|
|
1712
|
-
|
|
1713
|
-
],
|
|
1734
|
+
k()
|
|
1735
|
+
], C.prototype, "invalidHeight", 2);
|
|
1714
1736
|
$([
|
|
1715
|
-
|
|
1716
|
-
],
|
|
1737
|
+
k()
|
|
1738
|
+
], C.prototype, "aspectRatio", 2);
|
|
1717
1739
|
$([
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
],
|
|
1740
|
+
F("cropMode", { waitUntilFirstUpdate: !0 }),
|
|
1741
|
+
F("maxWidth", { waitUntilFirstUpdate: !0 }),
|
|
1742
|
+
F("maxHeight", { waitUntilFirstUpdate: !0 }),
|
|
1743
|
+
F("keepAspectRatio")
|
|
1744
|
+
], C.prototype, "handleCropModeChange", 1);
|
|
1723
1745
|
$([
|
|
1724
|
-
|
|
1725
|
-
],
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
],
|
|
1729
|
-
const
|
|
1730
|
-
var
|
|
1731
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1746
|
+
F("open", { waitUntilFirstUpdate: !0 })
|
|
1747
|
+
], C.prototype, "handleOpenChange", 1);
|
|
1748
|
+
C = $([
|
|
1749
|
+
K("cx-asset-link-format-resize")
|
|
1750
|
+
], C);
|
|
1751
|
+
const ti = G`cx-details::part(base){border-bottom-width:0}`;
|
|
1752
|
+
var ei = Object.defineProperty, ii = Object.getOwnPropertyDescriptor, Z = (t, e, i, s) => {
|
|
1753
|
+
for (var a = s > 1 ? void 0 : s ? ii(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1732
1754
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1733
|
-
return s && a &&
|
|
1755
|
+
return s && a && ei(e, i, a), a;
|
|
1734
1756
|
};
|
|
1735
1757
|
let H = class extends j {
|
|
1736
1758
|
constructor() {
|
|
1737
|
-
super(...arguments), this.localize = new
|
|
1759
|
+
super(...arguments), this.localize = new Q(this), this.open = !1, this.value = 0, this.defaultValue = 0, this.loading = !1, this.lastAppliedValue = 0;
|
|
1738
1760
|
}
|
|
1739
1761
|
handleOpenChange() {
|
|
1740
1762
|
this.open || this.emit("cx-asset-link-format-rotation-change", {
|
|
@@ -1745,14 +1767,14 @@ let H = class extends j {
|
|
|
1745
1767
|
const e = t.target.value, i = Number(e);
|
|
1746
1768
|
if (Number.isNaN(i))
|
|
1747
1769
|
return;
|
|
1748
|
-
const s =
|
|
1770
|
+
const s = Dt(i);
|
|
1749
1771
|
(i > 360 || i < -360) && (t.target.value = s.toString()), this.emit("cx-asset-link-format-rotation-change", {
|
|
1750
1772
|
detail: s
|
|
1751
1773
|
});
|
|
1752
1774
|
}
|
|
1753
1775
|
handleButtonClick(t) {
|
|
1754
1776
|
this.emit("cx-asset-link-format-rotation-change", {
|
|
1755
|
-
detail:
|
|
1777
|
+
detail: Dt(t)
|
|
1756
1778
|
});
|
|
1757
1779
|
}
|
|
1758
1780
|
handleClockwiseClick() {
|
|
@@ -1772,55 +1794,55 @@ let H = class extends j {
|
|
|
1772
1794
|
});
|
|
1773
1795
|
}
|
|
1774
1796
|
render() {
|
|
1775
|
-
return b`<cx-details class="details" ?open=${this.open}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="rotate_90_degrees_cw"></cx-icon></div><cx-typography variant="body2">Rotate</cx-typography></cx-space><cx-space spacing="small"><cx-button-group label=${this.localize.term("history")}><cx-icon-button data-testid="cx-asset-link-format-rotation-ccw" name="rotate_90_degrees_ccw" label=${this.localize.term("undo")} outline size="small" ?disabled=${this.loading || this.value === -360} @click=${this.handleCounterClockwiseClick}></cx-icon-button><cx-icon-button data-testid="cx-asset-link-format-rotation-cw" name="rotate_90_degrees_cw" label=${this.localize.term("redo")} outline size="small" ?disabled=${this.loading || this.value === 360} @click=${this.handleClockwiseClick}></cx-icon-button></cx-button-group><cx-input data-testid="cx-asset-link-format-rotation" value=${(this.value + this.defaultValue).toString()} placeholder="0" mask="num" .maskBlocks=${{ num: { mask: Number, max: 360, min: -360, signed: !0 } }} ?disabled=${this.loading} style=${
|
|
1797
|
+
return b`<cx-details class="details" ?open=${this.open}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="rotate_90_degrees_cw"></cx-icon></div><cx-typography variant="body2">Rotate</cx-typography></cx-space><cx-space spacing="small"><cx-button-group label=${this.localize.term("history")}><cx-icon-button data-testid="cx-asset-link-format-rotation-ccw" name="rotate_90_degrees_ccw" label=${this.localize.term("undo")} outline size="small" ?disabled=${this.loading || this.value === -360} @click=${this.handleCounterClockwiseClick}></cx-icon-button><cx-icon-button data-testid="cx-asset-link-format-rotation-cw" name="rotate_90_degrees_cw" label=${this.localize.term("redo")} outline size="small" ?disabled=${this.loading || this.value === 360} @click=${this.handleClockwiseClick}></cx-icon-button></cx-button-group><cx-input data-testid="cx-asset-link-format-rotation" value=${(this.value + this.defaultValue).toString()} placeholder="0" mask="num" .maskBlocks=${{ num: { mask: Number, max: 360, min: -360, signed: !0 } }} ?disabled=${this.loading} style=${U({
|
|
1776
1798
|
flex: "none",
|
|
1777
1799
|
width: "80px"
|
|
1778
1800
|
})} @cx-input=${this.handleRotationChange}></cx-input><cx-button data-testid="cx-asset-link-format-rotation-apply" variant="primary" ?disabled=${this.value === this.lastAppliedValue} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
|
|
1779
1801
|
}
|
|
1780
1802
|
};
|
|
1781
|
-
H.styles = [
|
|
1803
|
+
H.styles = [X, ti];
|
|
1782
1804
|
H.dependencies = {
|
|
1783
|
-
"cx-button":
|
|
1784
|
-
"cx-button-group":
|
|
1805
|
+
"cx-button": tt,
|
|
1806
|
+
"cx-button-group": ge,
|
|
1785
1807
|
"cx-details": st,
|
|
1786
1808
|
"cx-icon": at,
|
|
1787
1809
|
"cx-icon-button": Pt,
|
|
1788
|
-
"cx-space":
|
|
1789
|
-
"cx-typography":
|
|
1810
|
+
"cx-space": q,
|
|
1811
|
+
"cx-typography": V
|
|
1790
1812
|
};
|
|
1791
|
-
|
|
1792
|
-
|
|
1813
|
+
Z([
|
|
1814
|
+
et(".details")
|
|
1793
1815
|
], H.prototype, "base", 2);
|
|
1794
|
-
|
|
1816
|
+
Z([
|
|
1795
1817
|
h({ reflect: !0, type: Boolean })
|
|
1796
1818
|
], H.prototype, "open", 2);
|
|
1797
|
-
|
|
1819
|
+
Z([
|
|
1798
1820
|
h({ reflect: !0, type: Number })
|
|
1799
1821
|
], H.prototype, "value", 2);
|
|
1800
|
-
|
|
1822
|
+
Z([
|
|
1801
1823
|
h({ attribute: "default-value", reflect: !0, type: Number })
|
|
1802
1824
|
], H.prototype, "defaultValue", 2);
|
|
1803
|
-
|
|
1825
|
+
Z([
|
|
1804
1826
|
h({ reflect: !0, type: Boolean })
|
|
1805
1827
|
], H.prototype, "loading", 2);
|
|
1806
|
-
|
|
1828
|
+
Z([
|
|
1807
1829
|
h({ attribute: "last-applied-value", reflect: !0, type: Number })
|
|
1808
1830
|
], H.prototype, "lastAppliedValue", 2);
|
|
1809
|
-
|
|
1810
|
-
|
|
1831
|
+
Z([
|
|
1832
|
+
F("open", { waitUntilFirstUpdate: !0 })
|
|
1811
1833
|
], H.prototype, "handleOpenChange", 1);
|
|
1812
|
-
H =
|
|
1813
|
-
|
|
1834
|
+
H = Z([
|
|
1835
|
+
K("cx-asset-link-format-rotation")
|
|
1814
1836
|
], H);
|
|
1815
|
-
const
|
|
1816
|
-
var
|
|
1817
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1837
|
+
const si = G`cx-details::part(base){border-bottom-width:0}`;
|
|
1838
|
+
var ai = Object.defineProperty, oi = Object.getOwnPropertyDescriptor, zt = (t, e, i, s) => {
|
|
1839
|
+
for (var a = s > 1 ? void 0 : s ? oi(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1818
1840
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1819
|
-
return s && a &&
|
|
1841
|
+
return s && a && ai(e, i, a), a;
|
|
1820
1842
|
};
|
|
1821
|
-
let
|
|
1843
|
+
let B = class extends j {
|
|
1822
1844
|
constructor() {
|
|
1823
|
-
super(...arguments), this.localize = new
|
|
1845
|
+
super(...arguments), this.localize = new Q(this), this.open = !1, this.value = !1;
|
|
1824
1846
|
}
|
|
1825
1847
|
handleApply(t) {
|
|
1826
1848
|
this.emit("cx-asset-link-format-metadata-change", {
|
|
@@ -1847,36 +1869,36 @@ let U = class extends j {
|
|
|
1847
1869
|
return b`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div class="details__summary__icon"><div part="icon"><cx-icon name="short_text"></cx-icon></div></div><cx-typography variant="body2">${this.localize.term("metadata")}</cx-typography></cx-space><cx-space spacing="small"><cx-tooltip data-testid="cx-asset-link-format-metadata-tooltip" content=${this.localize.term("metadataHelpText")} hoist><cx-checkbox data-testid="cx-asset-link-format-metadata" class="details__checkbox" ?checked=${this.value} @cx-change=${this.handleApply}>${this.localize.term("preserveMetadata")}</cx-checkbox></cx-tooltip></cx-space></cx-details>`;
|
|
1848
1870
|
}
|
|
1849
1871
|
};
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
"cx-button":
|
|
1853
|
-
"cx-checkbox":
|
|
1872
|
+
B.styles = [X, si];
|
|
1873
|
+
B.dependencies = {
|
|
1874
|
+
"cx-button": tt,
|
|
1875
|
+
"cx-checkbox": xe,
|
|
1854
1876
|
"cx-details": st,
|
|
1855
1877
|
"cx-icon": at,
|
|
1856
|
-
"cx-space":
|
|
1857
|
-
"cx-tooltip":
|
|
1858
|
-
"cx-typography":
|
|
1878
|
+
"cx-space": q,
|
|
1879
|
+
"cx-tooltip": Kt,
|
|
1880
|
+
"cx-typography": V
|
|
1859
1881
|
};
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
],
|
|
1863
|
-
|
|
1882
|
+
zt([
|
|
1883
|
+
et(".details")
|
|
1884
|
+
], B.prototype, "base", 2);
|
|
1885
|
+
zt([
|
|
1864
1886
|
h({ reflect: !0, type: Boolean })
|
|
1865
|
-
],
|
|
1866
|
-
|
|
1887
|
+
], B.prototype, "open", 2);
|
|
1888
|
+
zt([
|
|
1867
1889
|
h({ reflect: !0, type: Boolean })
|
|
1868
|
-
],
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
],
|
|
1872
|
-
var
|
|
1873
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
1890
|
+
], B.prototype, "value", 2);
|
|
1891
|
+
B = zt([
|
|
1892
|
+
K("cx-asset-link-format-metadata")
|
|
1893
|
+
], B);
|
|
1894
|
+
var ri = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, A = (t, e, i, s) => {
|
|
1895
|
+
for (var a = s > 1 ? void 0 : s ? ni(e, i) : e, r = t.length - 1, n; r >= 0; r--)
|
|
1874
1896
|
(n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
|
|
1875
|
-
return s && a &&
|
|
1897
|
+
return s && a && ri(e, i, a), a;
|
|
1876
1898
|
};
|
|
1877
1899
|
let f = class extends j {
|
|
1878
1900
|
constructor() {
|
|
1879
|
-
super(), this.localize = new
|
|
1901
|
+
super(), this.localize = new Q(this), this.baseUrl = void 0, this.token = void 0, this.asset = void 0, this.cropModes = [
|
|
1880
1902
|
{
|
|
1881
1903
|
label: "Free",
|
|
1882
1904
|
value: "free"
|
|
@@ -1962,7 +1984,7 @@ let f = class extends j {
|
|
|
1962
1984
|
keepAspectRatio: !0,
|
|
1963
1985
|
percentageHeight: 0,
|
|
1964
1986
|
percentageWidth: 0,
|
|
1965
|
-
position:
|
|
1987
|
+
position: L.CenterCenter,
|
|
1966
1988
|
ratioHeight: 1,
|
|
1967
1989
|
ratioWidth: 1,
|
|
1968
1990
|
unit: o.Pixel,
|
|
@@ -1972,7 +1994,7 @@ let f = class extends j {
|
|
|
1972
1994
|
}, this.rotation = 0, this.defaultSize = {
|
|
1973
1995
|
height: 0,
|
|
1974
1996
|
width: 0
|
|
1975
|
-
}, this.cropperElement = null, this.parameters = [], this.loading = !1, this.lastAction = void 0, this.frozenIndex = void 0, this.preResetTransformations = void 0, this.preResetAutoFormat = void 0, this.preResetSelectedProxy = void 0, this.apiGetTransformAssetLink =
|
|
1997
|
+
}, this.cropperElement = null, this.parameters = [], this.loading = !1, this.lastAction = void 0, this.frozenIndex = void 0, this.preResetTransformations = void 0, this.preResetAutoFormat = void 0, this.preResetSelectedProxy = void 0, this.apiGetTransformAssetLink = Fe, this.apiGetCropFocusMode = Te, this.onCropComplete = this.onCropComplete.bind(this), this.onCropDragStart = this.onCropDragStart.bind(this);
|
|
1976
1998
|
}
|
|
1977
1999
|
/**
|
|
1978
2000
|
* Transform requests must resolve to a web-displayable image (the browser renders the
|
|
@@ -1981,7 +2003,7 @@ let f = class extends j {
|
|
|
1981
2003
|
* extension fallback in asset-transformation-dialog.
|
|
1982
2004
|
*/
|
|
1983
2005
|
static getTransformExtension(t) {
|
|
1984
|
-
return !t ||
|
|
2006
|
+
return !t || ie(t) ? t : "jpg";
|
|
1985
2007
|
}
|
|
1986
2008
|
/** True when there are transformations beyond the frozen index (i.e. user has added new ones). */
|
|
1987
2009
|
get hasUnfrozenTransformations() {
|
|
@@ -2015,7 +2037,7 @@ let f = class extends j {
|
|
|
2015
2037
|
get lastAppliedCropPosition() {
|
|
2016
2038
|
return this.transformations.findLast(
|
|
2017
2039
|
(e) => e.key === g.Crop
|
|
2018
|
-
)?.value.position ??
|
|
2040
|
+
)?.value.position ?? L.CenterCenter;
|
|
2019
2041
|
}
|
|
2020
2042
|
/**
|
|
2021
2043
|
* Checks if the crop apply button should be disabled.
|
|
@@ -2319,32 +2341,32 @@ let f = class extends j {
|
|
|
2319
2341
|
(c) => c.key === g.Crop && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width && c.value.height)
|
|
2320
2342
|
);
|
|
2321
2343
|
if (r?.value.unit === o.AspectRatio && r.value.ratioWidth && r.value.ratioHeight) {
|
|
2322
|
-
const { focusMode: c, position:
|
|
2344
|
+
const { focusMode: c, position: x, ratioHeight: m, ratioWidth: S } = r.value;
|
|
2323
2345
|
this.cropSize = {
|
|
2324
2346
|
...this.cropSize,
|
|
2325
2347
|
cropMode: "free",
|
|
2326
2348
|
focusMode: c ?? "manual",
|
|
2327
2349
|
percentageHeight: 100,
|
|
2328
2350
|
percentageWidth: 100,
|
|
2329
|
-
position:
|
|
2330
|
-
ratioHeight:
|
|
2331
|
-
ratioWidth:
|
|
2351
|
+
position: x ?? L.CenterCenter,
|
|
2352
|
+
ratioHeight: m,
|
|
2353
|
+
ratioWidth: S,
|
|
2332
2354
|
unit: o.AspectRatio
|
|
2333
2355
|
};
|
|
2334
2356
|
} else if (r) {
|
|
2335
|
-
const { focusMode: c, height:
|
|
2357
|
+
const { focusMode: c, height: x, position: m, unit: S, width: y, x: v = 0, y: d = 0 } = r.value;
|
|
2336
2358
|
this.cropSize = {
|
|
2337
2359
|
...this.cropSize,
|
|
2338
2360
|
cropMode: "free",
|
|
2339
2361
|
focusMode: c ?? "manual",
|
|
2340
|
-
height:
|
|
2362
|
+
height: x,
|
|
2341
2363
|
percentageHeight: 100,
|
|
2342
2364
|
percentageWidth: 100,
|
|
2343
|
-
position:
|
|
2344
|
-
unit:
|
|
2345
|
-
width:
|
|
2346
|
-
x:
|
|
2347
|
-
y:
|
|
2365
|
+
position: m ?? L.CenterCenter,
|
|
2366
|
+
unit: S ?? o.Pixel,
|
|
2367
|
+
width: y,
|
|
2368
|
+
x: v,
|
|
2369
|
+
y: d
|
|
2348
2370
|
};
|
|
2349
2371
|
} else
|
|
2350
2372
|
this.cropSize = {
|
|
@@ -2360,7 +2382,7 @@ let f = class extends j {
|
|
|
2360
2382
|
height: 1,
|
|
2361
2383
|
percentageHeight: 0,
|
|
2362
2384
|
percentageWidth: 0,
|
|
2363
|
-
position:
|
|
2385
|
+
position: L.CenterCenter,
|
|
2364
2386
|
unit: o.Pixel,
|
|
2365
2387
|
width: 1,
|
|
2366
2388
|
x: 0,
|
|
@@ -2370,20 +2392,20 @@ let f = class extends j {
|
|
|
2370
2392
|
(c) => c.key === g.Resize && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width || c.value.height)
|
|
2371
2393
|
);
|
|
2372
2394
|
if (n?.value.unit === o.AspectRatio && n.value.ratioWidth && n.value.ratioHeight) {
|
|
2373
|
-
const { ratioHeight: c, ratioWidth:
|
|
2395
|
+
const { ratioHeight: c, ratioWidth: x } = n.value;
|
|
2374
2396
|
this.resizeSize = {
|
|
2375
2397
|
...this.resizeSize,
|
|
2376
2398
|
ratioHeight: c,
|
|
2377
|
-
ratioWidth:
|
|
2399
|
+
ratioWidth: x,
|
|
2378
2400
|
unit: o.AspectRatio
|
|
2379
2401
|
};
|
|
2380
2402
|
} else if (n) {
|
|
2381
|
-
const { height: c = 0, unit:
|
|
2403
|
+
const { height: c = 0, unit: x, width: m = 0 } = n.value;
|
|
2382
2404
|
this.resizeSize = {
|
|
2383
2405
|
...this.resizeSize,
|
|
2384
2406
|
height: c,
|
|
2385
|
-
unit:
|
|
2386
|
-
width:
|
|
2407
|
+
unit: x ?? o.Pixel,
|
|
2408
|
+
width: m
|
|
2387
2409
|
};
|
|
2388
2410
|
} else
|
|
2389
2411
|
this.resizeSize = {
|
|
@@ -2401,13 +2423,13 @@ let f = class extends j {
|
|
|
2401
2423
|
(c) => c.key === g.Rotate
|
|
2402
2424
|
);
|
|
2403
2425
|
this.rotation = l?.value.rotation ?? 0;
|
|
2404
|
-
const p = this.transformations.findLast((c) => c.key === g.Quality)?.value.quality ?? 100,
|
|
2426
|
+
const p = this.transformations.findLast((c) => c.key === g.Quality)?.value.quality ?? 100, u = this.transformations.some(
|
|
2405
2427
|
(c) => c.key === g.Metadata
|
|
2406
2428
|
);
|
|
2407
|
-
this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata:
|
|
2429
|
+
this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata: u, quality: p } : this.selectedFormat = {
|
|
2408
2430
|
extension: "",
|
|
2409
2431
|
height: 0,
|
|
2410
|
-
keepMetadata:
|
|
2432
|
+
keepMetadata: u,
|
|
2411
2433
|
quality: p,
|
|
2412
2434
|
rotation: 0,
|
|
2413
2435
|
url: "",
|
|
@@ -2450,7 +2472,7 @@ let f = class extends j {
|
|
|
2450
2472
|
keepAspectRatio: this.cropSize.keepAspectRatio,
|
|
2451
2473
|
percentageHeight: 100,
|
|
2452
2474
|
percentageWidth: 100,
|
|
2453
|
-
position:
|
|
2475
|
+
position: L.CenterCenter,
|
|
2454
2476
|
ratioHeight: 1,
|
|
2455
2477
|
ratioWidth: 1,
|
|
2456
2478
|
unit: o.Pixel,
|
|
@@ -2530,7 +2552,7 @@ let f = class extends j {
|
|
|
2530
2552
|
keepAspectRatio: !0,
|
|
2531
2553
|
percentageHeight: 100,
|
|
2532
2554
|
percentageWidth: 100,
|
|
2533
|
-
position:
|
|
2555
|
+
position: L.CenterCenter,
|
|
2534
2556
|
ratioHeight: 1,
|
|
2535
2557
|
ratioWidth: 1,
|
|
2536
2558
|
unit: o.Pixel,
|
|
@@ -2600,7 +2622,7 @@ let f = class extends j {
|
|
|
2600
2622
|
keepAspectRatio: !0,
|
|
2601
2623
|
percentageHeight: 100,
|
|
2602
2624
|
percentageWidth: 100,
|
|
2603
|
-
position:
|
|
2625
|
+
position: L.CenterCenter,
|
|
2604
2626
|
ratioHeight: 1,
|
|
2605
2627
|
ratioWidth: 1,
|
|
2606
2628
|
unit: o.Pixel,
|
|
@@ -2651,29 +2673,29 @@ let f = class extends j {
|
|
|
2651
2673
|
ratioHeight: n,
|
|
2652
2674
|
ratioWidth: l,
|
|
2653
2675
|
unit: p,
|
|
2654
|
-
useCropMode:
|
|
2676
|
+
useCropMode: u,
|
|
2655
2677
|
width: c
|
|
2656
2678
|
}) {
|
|
2657
2679
|
if (!this.selectedFormat?.url || e === "manual")
|
|
2658
2680
|
return;
|
|
2659
2681
|
this.loading = !0, this.lastAction = g.Crop;
|
|
2660
|
-
const
|
|
2682
|
+
const x = await this.apiGetCropFocusMode({
|
|
2661
2683
|
autoCropMode: e,
|
|
2662
2684
|
cropHeight: i,
|
|
2663
2685
|
cropWidth: c,
|
|
2664
2686
|
imageUrl: this.selectedFormat.url
|
|
2665
2687
|
});
|
|
2666
|
-
if (
|
|
2667
|
-
let
|
|
2668
|
-
i || (
|
|
2688
|
+
if (x) {
|
|
2689
|
+
let m = a, S = r;
|
|
2690
|
+
i || (m = x.height * 100 / this.selectedFormat.height), c || (S = x.width * 100 / this.selectedFormat.width), this.cropSize = {
|
|
2669
2691
|
...this.cropSize,
|
|
2670
|
-
height:
|
|
2671
|
-
percentageHeight:
|
|
2672
|
-
percentageWidth:
|
|
2673
|
-
width:
|
|
2674
|
-
x:
|
|
2675
|
-
y:
|
|
2676
|
-
...
|
|
2692
|
+
height: x.height,
|
|
2693
|
+
percentageHeight: m ?? this.cropSize.percentageHeight,
|
|
2694
|
+
percentageWidth: S ?? this.cropSize.percentageWidth,
|
|
2695
|
+
width: x.width,
|
|
2696
|
+
x: x.x * 100 / this.selectedFormat.width,
|
|
2697
|
+
y: x.y * 100 / this.selectedFormat.height,
|
|
2698
|
+
...u ? {
|
|
2677
2699
|
cropMode: e,
|
|
2678
2700
|
focusMode: "manual",
|
|
2679
2701
|
keepAspectRatio: !1
|
|
@@ -2699,25 +2721,25 @@ let f = class extends j {
|
|
|
2699
2721
|
if (s === 0 || i === 0)
|
|
2700
2722
|
return;
|
|
2701
2723
|
const n = this.cropSize.percentageWidth !== s, l = this.cropSize.percentageHeight !== i;
|
|
2702
|
-
let p = this.cropSize.height,
|
|
2703
|
-
n && (
|
|
2724
|
+
let p = this.cropSize.height, u = this.cropSize.width;
|
|
2725
|
+
n && (u = Math.round(s * this.selectedFormat.width / 100)), l && (p = Math.round(
|
|
2704
2726
|
i * this.selectedFormat.height / 100
|
|
2705
2727
|
));
|
|
2706
2728
|
const c = this.cropSize.focusMode;
|
|
2707
2729
|
this.focusModes.find(
|
|
2708
|
-
(
|
|
2730
|
+
(m) => m.value === c
|
|
2709
2731
|
)?.auto && this.selectedFormat?.url && this.cropperElement ? await this.handleRequestAutoCropSuggestion({
|
|
2710
2732
|
focusMode: c,
|
|
2711
2733
|
height: p,
|
|
2712
2734
|
percentageHeight: i,
|
|
2713
2735
|
percentageWidth: s,
|
|
2714
|
-
width:
|
|
2736
|
+
width: u
|
|
2715
2737
|
}) : this.cropSize = {
|
|
2716
2738
|
...this.cropSize,
|
|
2717
2739
|
height: p,
|
|
2718
2740
|
percentageHeight: i,
|
|
2719
2741
|
percentageWidth: s,
|
|
2720
|
-
width:
|
|
2742
|
+
width: u,
|
|
2721
2743
|
x: a,
|
|
2722
2744
|
y: r
|
|
2723
2745
|
};
|
|
@@ -2748,7 +2770,7 @@ let f = class extends j {
|
|
|
2748
2770
|
* a proxy *id*, so the name has to be looked up in `proxies` rather than used directly.
|
|
2749
2771
|
*/
|
|
2750
2772
|
get autoResolvedProxyId() {
|
|
2751
|
-
const t =
|
|
2773
|
+
const t = Qt(this.asset?.extension, this.asset?.size);
|
|
2752
2774
|
return this.proxies?.find((e) => e.proxyName === t)?.id ?? "";
|
|
2753
2775
|
}
|
|
2754
2776
|
onProxyChange(t) {
|
|
@@ -2818,12 +2840,12 @@ let f = class extends j {
|
|
|
2818
2840
|
) : 0, r = this.asset ? a * 100 / this.selectedFormat.height : 100, n = this.asset ? s * 100 / this.selectedFormat.width : 100;
|
|
2819
2841
|
let l = this.cropSize.x, p = this.cropSize.y;
|
|
2820
2842
|
l + n > 100 && (l = 100 - n), p + r > 100 && (p = 100 - r);
|
|
2821
|
-
let
|
|
2843
|
+
let u = this.cropSize.cropMode;
|
|
2822
2844
|
this.cropModes.find(
|
|
2823
|
-
(
|
|
2824
|
-
)?.auto && (
|
|
2845
|
+
(x) => x.value === u
|
|
2846
|
+
)?.auto && (u = "free"), t.detail.silent ? (this.cropSize.height = a, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = r, this.cropSize.percentageWidth = n, this.cropSize.ratioHeight = t.detail.height, this.cropSize.ratioWidth = t.detail.width, this.cropSize.unit = o.AspectRatio, this.cropSize.width = s) : this.cropSize = {
|
|
2825
2847
|
...this.cropSize,
|
|
2826
|
-
cropMode:
|
|
2848
|
+
cropMode: u,
|
|
2827
2849
|
height: a,
|
|
2828
2850
|
keepAspectRatio: t.detail.keepAspectRatio,
|
|
2829
2851
|
percentageHeight: r,
|
|
@@ -2875,39 +2897,39 @@ let f = class extends j {
|
|
|
2875
2897
|
const {
|
|
2876
2898
|
focusMode: l,
|
|
2877
2899
|
height: p,
|
|
2878
|
-
position:
|
|
2900
|
+
position: u,
|
|
2879
2901
|
ratioHeight: c,
|
|
2880
|
-
ratioWidth:
|
|
2881
|
-
unit:
|
|
2882
|
-
width:
|
|
2883
|
-
x,
|
|
2884
|
-
y:
|
|
2885
|
-
} = this.cropSize,
|
|
2886
|
-
(
|
|
2902
|
+
ratioWidth: x,
|
|
2903
|
+
unit: m,
|
|
2904
|
+
width: S,
|
|
2905
|
+
x: y,
|
|
2906
|
+
y: v
|
|
2907
|
+
} = this.cropSize, d = this.focusModes.find(
|
|
2908
|
+
(P) => P.value === l
|
|
2887
2909
|
)?.auto ?? !1;
|
|
2888
|
-
if (
|
|
2889
|
-
|
|
2910
|
+
if (m === o.AspectRatio) {
|
|
2911
|
+
x && c && this.upsertTransformation({
|
|
2890
2912
|
key: g.Crop,
|
|
2891
2913
|
value: {
|
|
2892
2914
|
focusMode: l,
|
|
2893
|
-
isFocusModeAuto:
|
|
2894
|
-
position:
|
|
2915
|
+
isFocusModeAuto: d,
|
|
2916
|
+
position: u,
|
|
2895
2917
|
ratioHeight: c,
|
|
2896
|
-
ratioWidth:
|
|
2897
|
-
unit:
|
|
2918
|
+
ratioWidth: x,
|
|
2919
|
+
unit: m
|
|
2898
2920
|
}
|
|
2899
2921
|
});
|
|
2900
2922
|
return;
|
|
2901
2923
|
}
|
|
2902
|
-
(p ||
|
|
2924
|
+
(p || S) && this.upsertTransformation({
|
|
2903
2925
|
key: g.Crop,
|
|
2904
2926
|
value: {
|
|
2905
2927
|
focusMode: l,
|
|
2906
2928
|
height: p,
|
|
2907
|
-
isFocusModeAuto:
|
|
2908
|
-
position:
|
|
2909
|
-
unit:
|
|
2910
|
-
width:
|
|
2929
|
+
isFocusModeAuto: d,
|
|
2930
|
+
position: u,
|
|
2931
|
+
unit: m,
|
|
2932
|
+
width: S,
|
|
2911
2933
|
/**
|
|
2912
2934
|
* Without an asset there is no cropper to drag, so x/y are always the 0
|
|
2913
2935
|
* placeholder from cropSize's default — never a real manual offset. Omit
|
|
@@ -2915,8 +2937,8 @@ let f = class extends j {
|
|
|
2915
2937
|
* string) so `hasManualXY` in buildTransformationString doesn't spuriously
|
|
2916
2938
|
* suppress the focus mode / position `c_g_` gravity value.
|
|
2917
2939
|
*/
|
|
2918
|
-
x: Number.isFinite(
|
|
2919
|
-
y: Number.isFinite(
|
|
2940
|
+
x: Number.isFinite(y) && y !== 0 ? y : void 0,
|
|
2941
|
+
y: Number.isFinite(v) && v !== 0 ? v : void 0
|
|
2920
2942
|
}
|
|
2921
2943
|
});
|
|
2922
2944
|
return;
|
|
@@ -2944,7 +2966,7 @@ let f = class extends j {
|
|
|
2944
2966
|
}
|
|
2945
2967
|
];
|
|
2946
2968
|
else {
|
|
2947
|
-
const
|
|
2969
|
+
const u = this.cropSize.x / 100 * this.selectedFormat.width, c = this.cropSize.y / 100 * this.selectedFormat.height;
|
|
2948
2970
|
this.transformations = [
|
|
2949
2971
|
...this.transformations,
|
|
2950
2972
|
{
|
|
@@ -2955,7 +2977,7 @@ let f = class extends j {
|
|
|
2955
2977
|
isFocusModeAuto: n,
|
|
2956
2978
|
unit: s,
|
|
2957
2979
|
width: l,
|
|
2958
|
-
x:
|
|
2980
|
+
x: u,
|
|
2959
2981
|
y: c
|
|
2960
2982
|
}
|
|
2961
2983
|
}
|
|
@@ -3001,12 +3023,12 @@ let f = class extends j {
|
|
|
3001
3023
|
const { height: e, unit: i, width: s } = t.detail;
|
|
3002
3024
|
if (this.clearResetSnapshot(), this.lastAction = g.Resize, !this.asset) {
|
|
3003
3025
|
if (i === o.AspectRatio) {
|
|
3004
|
-
const { ratioHeight: p, ratioWidth:
|
|
3005
|
-
|
|
3026
|
+
const { ratioHeight: p, ratioWidth: u } = this.resizeSize;
|
|
3027
|
+
u && p && this.upsertTransformation({
|
|
3006
3028
|
key: g.Resize,
|
|
3007
3029
|
value: {
|
|
3008
3030
|
ratioHeight: p,
|
|
3009
|
-
ratioWidth:
|
|
3031
|
+
ratioWidth: u,
|
|
3010
3032
|
unit: i
|
|
3011
3033
|
}
|
|
3012
3034
|
});
|
|
@@ -3147,199 +3169,199 @@ let f = class extends j {
|
|
|
3147
3169
|
this.transformations = [], this.frozenIndex = -1, this.syncQuality();
|
|
3148
3170
|
}
|
|
3149
3171
|
render() {
|
|
3150
|
-
return b`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${
|
|
3172
|
+
return b`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${I(
|
|
3151
3173
|
!this.hideHeader,
|
|
3152
|
-
() => b`<cx-space class="asset-link-format__section-header" direction="horizontal" spacing="small" align-items="center" justify-content="space-between"><cx-typography variant="body3">${this.localize.term("transformations")}</cx-typography><cx-space direction="horizontal" spacing="3x-small" align-items="center"><cx-button class="asset-link-format__undo" variant="custom" ?disabled=${!this.hasUnfrozenTransformations && this.preResetTransformations === void 0} @click=${this.handleUndo}>${this.localize.term("undo")}</cx-button>${
|
|
3153
|
-
() =>
|
|
3174
|
+
() => b`<cx-space class="asset-link-format__section-header" direction="horizontal" spacing="small" align-items="center" justify-content="space-between"><cx-typography variant="body3">${this.localize.term("transformations")}</cx-typography><cx-space direction="horizontal" spacing="3x-small" align-items="center"><cx-button class="asset-link-format__undo" variant="custom" ?disabled=${!this.hasUnfrozenTransformations && this.preResetTransformations === void 0} @click=${this.handleUndo}>${this.localize.term("undo")}</cx-button>${I(this.canReset, () => b`<cx-button class="asset-link-format__reset" variant="custom" ?disabled=${!this.hasResettableState} @click=${this.handleReset}>${this.localize.term("reset")}</cx-button>`)}</cx-space></cx-space>`,
|
|
3175
|
+
() => Gt
|
|
3154
3176
|
)}
|
|
3155
|
-
${
|
|
3177
|
+
${I(
|
|
3156
3178
|
!this.noFormat,
|
|
3157
3179
|
() => b`<cx-asset-link-format-proxy class="asset-link-format__details" value=${this.selectedProxy || this.proxies?.[0]?.id || ""} ?open=${this.activeSetting === "cx-asset-link-format-proxy"} ?auto-format=${this.autoFormat} ?can-auto-format=${this.canAutoFormat} .items=${this.formats} ?loading=${this.loading && this.lastAction === g.Proxy} @cx-asset-link-format-proxy-change=${this.onProxyChange}></cx-asset-link-format-proxy>`
|
|
3158
3180
|
)}
|
|
3159
|
-
${
|
|
3181
|
+
${I(
|
|
3160
3182
|
!this.noCrop,
|
|
3161
3183
|
() => b`<cx-asset-link-format-crop class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-crop"} ?disabled-apply=${this.disabledCropApply} ?loading=${this.loading && this.lastAction === g.Crop} ?keep-aspect-ratio=${this.cropSize.keepAspectRatio} ?show-position-picker=${!this.asset} focus-mode=${this.cropSize.focusMode} crop-mode=${this.cropSize.cropMode} width=${this.cropSize.width} height=${this.cropSize.height} max-width=${this.asset ? this.lastResizeSize[o.Pixel].width : 1 / 0} max-height=${this.asset ? this.lastResizeSize[o.Pixel].height : 1 / 0} percentage-width=${this.cropSize.percentageWidth} percentage-height=${this.cropSize.percentageHeight} position=${this.cropSize.position} ratio-width=${this.cropSize.ratioWidth} ratio-height=${this.cropSize.ratioHeight} unit=${this.cropSize.unit} .lastAppliedSetting=${this.lastCropSize} .cropModes=${this.cropModes} .focusModes=${this.focusModes} @cx-asset-link-format-crop-mode-change=${this.onCropModeChange} @cx-asset-link-format-crop-focus-mode-change=${this.onCropFocusModeChange} @cx-asset-link-format-crop-position-change=${this.onCropPositionChange} @cx-asset-link-format-crop-change=${this.onCropChange} @cx-asset-link-format-crop-changed=${this.onCropChanged} @cx-asset-link-format-crop-apply=${this.onCropApply}></cx-asset-link-format-crop>`
|
|
3162
3184
|
)}
|
|
3163
|
-
${
|
|
3185
|
+
${I(
|
|
3164
3186
|
!this.noResize,
|
|
3165
3187
|
() => b`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?loading=${this.loading && this.lastAction === g.Resize} ?no-ratio-modes=${!this.asset} ?keep-aspect-ratio=${this.resizeSize.keepAspectRatio} width=${this.resizeSize.width} height=${this.resizeSize.height} max-width=${this.asset ? this.imageSize.width : 1 / 0} max-height=${this.asset ? this.imageSize.height : 1 / 0} ratio-width=${this.resizeSize.ratioWidth} ratio-height=${this.resizeSize.ratioHeight} unit=${this.resizeSize.unit} .lastAppliedSetting=${this.lastResizeSize} @cx-asset-link-format-resize-change=${this.onResizeChange} @cx-asset-link-format-resize-apply=${this.onResizeApply}></cx-asset-link-format-resize>`
|
|
3166
3188
|
)}
|
|
3167
|
-
${
|
|
3189
|
+
${I(
|
|
3168
3190
|
!this.noRotate,
|
|
3169
3191
|
() => b`<cx-asset-link-format-rotation class="asset-link-format__details" ?loading=${this.loading && this.lastAction === g.Rotate} ?open=${this.activeSetting === "cx-asset-link-format-rotation"} default-value=${this.selectedFormat?.rotation ?? 0} last-applied-value=${this.lastRotation} value=${this.rotation} @cx-asset-link-format-rotation-change=${this.onRotationChange} @cx-asset-link-format-rotation-apply=${this.onRotationApply}></cx-asset-link-format-rotation>`
|
|
3170
|
-
)}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction === g.Quality} ?open=${this.activeSetting === "cx-asset-link-format-quality"} value=${this.selectedFormat?.quality ?? 100} @cx-asset-link-format-quality-change=${this.onQualityChange}></cx-asset-link-format-quality>${
|
|
3192
|
+
)}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction === g.Quality} ?open=${this.activeSetting === "cx-asset-link-format-quality"} value=${this.selectedFormat?.quality ?? 100} @cx-asset-link-format-quality-change=${this.onQualityChange}></cx-asset-link-format-quality>${I(
|
|
3171
3193
|
!this.noMetadata,
|
|
3172
3194
|
() => b`<cx-asset-link-format-metadata class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-metadata"} .value=${this.selectedFormat?.keepMetadata ?? !1} @cx-asset-link-format-metadata-change=${this.onMetadataChange}></cx-asset-link-format-metadata>`
|
|
3173
3195
|
)}
|
|
3174
|
-
${
|
|
3196
|
+
${I(
|
|
3175
3197
|
this.useCustomExtension,
|
|
3176
3198
|
() => b`<cx-asset-link-format-extension .items=${this.extensions} value=${this.selectedFormat?.extension ?? ""} @cx-asset-link-format-extension-change=${this.onExtensionChange}></cx-asset-link-format-extension>`
|
|
3177
3199
|
)}</div>`;
|
|
3178
3200
|
}
|
|
3179
3201
|
};
|
|
3180
|
-
f.styles = [
|
|
3202
|
+
f.styles = [X, De];
|
|
3181
3203
|
f.dependencies = {
|
|
3182
|
-
"cx-asset-link-format-crop":
|
|
3183
|
-
"cx-asset-link-format-extension":
|
|
3184
|
-
"cx-asset-link-format-metadata":
|
|
3185
|
-
"cx-asset-link-format-proxy":
|
|
3186
|
-
"cx-asset-link-format-quality":
|
|
3187
|
-
"cx-asset-link-format-resize":
|
|
3204
|
+
"cx-asset-link-format-crop": w,
|
|
3205
|
+
"cx-asset-link-format-extension": J,
|
|
3206
|
+
"cx-asset-link-format-metadata": B,
|
|
3207
|
+
"cx-asset-link-format-proxy": E,
|
|
3208
|
+
"cx-asset-link-format-quality": D,
|
|
3209
|
+
"cx-asset-link-format-resize": C,
|
|
3188
3210
|
"cx-asset-link-format-rotation": H,
|
|
3189
|
-
"cx-button":
|
|
3190
|
-
"cx-space":
|
|
3191
|
-
"cx-typography":
|
|
3211
|
+
"cx-button": tt,
|
|
3212
|
+
"cx-space": q,
|
|
3213
|
+
"cx-typography": V
|
|
3192
3214
|
};
|
|
3193
|
-
|
|
3215
|
+
A([
|
|
3194
3216
|
h({ attribute: "base-url", type: String })
|
|
3195
3217
|
], f.prototype, "baseUrl", 2);
|
|
3196
|
-
|
|
3218
|
+
A([
|
|
3197
3219
|
h({ attribute: "token", type: String })
|
|
3198
3220
|
], f.prototype, "token", 2);
|
|
3199
|
-
|
|
3221
|
+
A([
|
|
3200
3222
|
h({ reflect: !1, type: Object })
|
|
3201
3223
|
], f.prototype, "asset", 2);
|
|
3202
|
-
|
|
3224
|
+
A([
|
|
3203
3225
|
h({ attribute: "crop-modes", reflect: !1, type: Array })
|
|
3204
3226
|
], f.prototype, "cropModes", 2);
|
|
3205
|
-
|
|
3227
|
+
A([
|
|
3206
3228
|
h({ attribute: "focus-modes", reflect: !1, type: Object })
|
|
3207
3229
|
], f.prototype, "focusModes", 2);
|
|
3208
|
-
|
|
3230
|
+
A([
|
|
3209
3231
|
h({ reflect: !1, type: Array })
|
|
3210
3232
|
], f.prototype, "extensions", 2);
|
|
3211
|
-
|
|
3233
|
+
A([
|
|
3212
3234
|
h({ reflect: !1, type: Array })
|
|
3213
3235
|
], f.prototype, "proxies", 2);
|
|
3214
|
-
|
|
3236
|
+
A([
|
|
3215
3237
|
h({ attribute: "for-cropper", reflect: !0, type: String })
|
|
3216
3238
|
], f.prototype, "forCropper", 2);
|
|
3217
|
-
|
|
3239
|
+
A([
|
|
3218
3240
|
h({ attribute: "use-session", reflect: !0, type: String })
|
|
3219
3241
|
], f.prototype, "useSession", 2);
|
|
3220
|
-
|
|
3242
|
+
A([
|
|
3221
3243
|
h({ reflect: !1, type: Array })
|
|
3222
3244
|
], f.prototype, "transformations", 2);
|
|
3223
|
-
|
|
3245
|
+
A([
|
|
3224
3246
|
h({ attribute: "selected-proxy", reflect: !0, type: String })
|
|
3225
3247
|
], f.prototype, "selectedProxy", 2);
|
|
3226
|
-
|
|
3248
|
+
A([
|
|
3227
3249
|
h({ attribute: "default-proxy", reflect: !0, type: String })
|
|
3228
3250
|
], f.prototype, "defaultProxy", 2);
|
|
3229
|
-
|
|
3251
|
+
A([
|
|
3230
3252
|
h({ attribute: "can-auto-format", reflect: !0, type: Boolean })
|
|
3231
3253
|
], f.prototype, "canAutoFormat", 2);
|
|
3232
|
-
|
|
3254
|
+
A([
|
|
3233
3255
|
h({ attribute: "auto-format", reflect: !0, type: Boolean })
|
|
3234
3256
|
], f.prototype, "autoFormat", 2);
|
|
3235
|
-
|
|
3257
|
+
A([
|
|
3236
3258
|
h({ attribute: "use-custom-extension", reflect: !0, type: Boolean })
|
|
3237
3259
|
], f.prototype, "useCustomExtension", 2);
|
|
3238
|
-
|
|
3260
|
+
A([
|
|
3239
3261
|
h({ attribute: "no-metadata", reflect: !0, type: Boolean })
|
|
3240
3262
|
], f.prototype, "noMetadata", 2);
|
|
3241
|
-
|
|
3263
|
+
A([
|
|
3242
3264
|
h({ attribute: "no-format", reflect: !0, type: Boolean })
|
|
3243
3265
|
], f.prototype, "noFormat", 2);
|
|
3244
|
-
|
|
3266
|
+
A([
|
|
3245
3267
|
h({ attribute: "no-crop", reflect: !0, type: Boolean })
|
|
3246
3268
|
], f.prototype, "noCrop", 2);
|
|
3247
|
-
|
|
3269
|
+
A([
|
|
3248
3270
|
h({ attribute: "no-resize", reflect: !0, type: Boolean })
|
|
3249
3271
|
], f.prototype, "noResize", 2);
|
|
3250
|
-
|
|
3272
|
+
A([
|
|
3251
3273
|
h({ attribute: "no-rotate", reflect: !0, type: Boolean })
|
|
3252
3274
|
], f.prototype, "noRotate", 2);
|
|
3253
|
-
|
|
3275
|
+
A([
|
|
3254
3276
|
h({ attribute: "last-image-size", reflect: !1, type: Object })
|
|
3255
3277
|
], f.prototype, "lastImageSize", 2);
|
|
3256
|
-
|
|
3278
|
+
A([
|
|
3257
3279
|
h({ attribute: "hide-header", reflect: !1, type: Boolean })
|
|
3258
3280
|
], f.prototype, "hideHeader", 2);
|
|
3259
|
-
|
|
3281
|
+
A([
|
|
3260
3282
|
h({ attribute: "can-reset", type: Boolean })
|
|
3261
3283
|
], f.prototype, "canReset", 2);
|
|
3262
|
-
|
|
3284
|
+
A([
|
|
3263
3285
|
h({ attribute: !1, reflect: !1, type: Object })
|
|
3264
3286
|
], f.prototype, "queryElement", 2);
|
|
3265
|
-
|
|
3266
|
-
|
|
3287
|
+
A([
|
|
3288
|
+
k()
|
|
3267
3289
|
], f.prototype, "activeSetting", 2);
|
|
3268
|
-
|
|
3269
|
-
|
|
3290
|
+
A([
|
|
3291
|
+
k()
|
|
3270
3292
|
], f.prototype, "selectedFormat", 2);
|
|
3271
|
-
|
|
3272
|
-
|
|
3293
|
+
A([
|
|
3294
|
+
k()
|
|
3273
3295
|
], f.prototype, "resizeSize", 2);
|
|
3274
|
-
|
|
3275
|
-
|
|
3296
|
+
A([
|
|
3297
|
+
k()
|
|
3276
3298
|
], f.prototype, "cropSize", 2);
|
|
3277
|
-
|
|
3278
|
-
|
|
3299
|
+
A([
|
|
3300
|
+
k()
|
|
3279
3301
|
], f.prototype, "rotation", 2);
|
|
3280
|
-
|
|
3281
|
-
|
|
3302
|
+
A([
|
|
3303
|
+
k()
|
|
3282
3304
|
], f.prototype, "defaultSize", 2);
|
|
3283
|
-
|
|
3284
|
-
|
|
3305
|
+
A([
|
|
3306
|
+
k()
|
|
3285
3307
|
], f.prototype, "cropperElement", 2);
|
|
3286
|
-
|
|
3287
|
-
|
|
3308
|
+
A([
|
|
3309
|
+
k()
|
|
3288
3310
|
], f.prototype, "parameters", 2);
|
|
3289
|
-
|
|
3290
|
-
|
|
3311
|
+
A([
|
|
3312
|
+
k()
|
|
3291
3313
|
], f.prototype, "loading", 2);
|
|
3292
|
-
|
|
3293
|
-
|
|
3314
|
+
A([
|
|
3315
|
+
k()
|
|
3294
3316
|
], f.prototype, "lastAction", 2);
|
|
3295
|
-
|
|
3296
|
-
|
|
3317
|
+
A([
|
|
3318
|
+
k()
|
|
3297
3319
|
], f.prototype, "frozenIndex", 2);
|
|
3298
|
-
|
|
3299
|
-
|
|
3320
|
+
A([
|
|
3321
|
+
k()
|
|
3300
3322
|
], f.prototype, "preResetTransformations", 2);
|
|
3301
|
-
|
|
3302
|
-
|
|
3323
|
+
A([
|
|
3324
|
+
k()
|
|
3303
3325
|
], f.prototype, "preResetAutoFormat", 2);
|
|
3304
|
-
|
|
3305
|
-
|
|
3326
|
+
A([
|
|
3327
|
+
k()
|
|
3306
3328
|
], f.prototype, "preResetSelectedProxy", 2);
|
|
3307
|
-
|
|
3308
|
-
|
|
3329
|
+
A([
|
|
3330
|
+
F("transformations")
|
|
3309
3331
|
], f.prototype, "handleTransformationsChange", 1);
|
|
3310
|
-
|
|
3311
|
-
|
|
3332
|
+
A([
|
|
3333
|
+
F("selectedProxy")
|
|
3312
3334
|
], f.prototype, "handleSelectedProxyChange", 1);
|
|
3313
|
-
|
|
3314
|
-
|
|
3335
|
+
A([
|
|
3336
|
+
F("loading")
|
|
3315
3337
|
], f.prototype, "handleLoadingChange", 1);
|
|
3316
|
-
f =
|
|
3317
|
-
|
|
3338
|
+
f = A([
|
|
3339
|
+
K("cx-asset-link-format")
|
|
3318
3340
|
], f);
|
|
3319
3341
|
export {
|
|
3320
3342
|
f as C,
|
|
3321
3343
|
ht as F,
|
|
3322
3344
|
_t as M,
|
|
3323
|
-
|
|
3345
|
+
Ie as a,
|
|
3324
3346
|
nt as b,
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3347
|
+
Bt as c,
|
|
3348
|
+
be as d,
|
|
3349
|
+
Yt as e,
|
|
3350
|
+
Zi as f,
|
|
3351
|
+
Yi as g,
|
|
3352
|
+
Ki as h,
|
|
3353
|
+
te as i,
|
|
3332
3354
|
yt as j,
|
|
3333
3355
|
ft as k,
|
|
3334
|
-
|
|
3356
|
+
Ot as l,
|
|
3335
3357
|
gt as m,
|
|
3336
3358
|
xt as n,
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3359
|
+
Lt as o,
|
|
3360
|
+
ie as p,
|
|
3361
|
+
Ji as q,
|
|
3362
|
+
Zt as r,
|
|
3363
|
+
Gi as s,
|
|
3364
|
+
Qi as t,
|
|
3365
|
+
ye as u,
|
|
3366
|
+
Xi as v
|
|
3345
3367
|
};
|