@orangelogic/design-system 2.105.0 → 2.107.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.
Files changed (167) hide show
  1. package/library/chunks/{AxisLabelRadial.Bs1P_q_F.js → AxisLabelRadial.C4AH2ZWx.js} +1 -1
  2. package/library/chunks/{BaseColumnSeries.C7jwOxIJ.js → BaseColumnSeries.BV8sY1Da.js} +1 -1
  3. package/library/chunks/{CandlestickSeries.CkXGtRWE.js → CandlestickSeries.C8BE8OT-.js} +2 -2
  4. package/library/chunks/{Circle.DBa5Ok8V.js → Circle.BaJWdg6Z.js} +1 -1
  5. package/library/chunks/{ColumnSeries.DGazbfza.js → ColumnSeries.BGUw3nLY.js} +2 -2
  6. package/library/chunks/{EditableAxisLabel.wN0t_G2B.js → EditableAxisLabel.CsgqEVmA.js} +2 -2
  7. package/library/chunks/{EditableLabel.BWeq6fgX.js → EditableLabel.gd9mjKfA.js} +1 -1
  8. package/library/chunks/{Gradient.CdcsPIru.js → Gradient.Sa3COx_2.js} +1 -1
  9. package/library/chunks/{LinearGradient.B1z9AGUt.js → LinearGradient.BM0pPmvI.js} +2 -2
  10. package/library/chunks/{Picture.YSPC0l0Q.js → Picture.DVyGQOmS.js} +1 -1
  11. package/library/chunks/{Polygon.BwMvXN2H.js → Polygon.Du2DRvxU.js} +1 -1
  12. package/library/chunks/{ProgressPie.DlCwXN17.js → ProgressPie.D3FRfVo5.js} +5 -5
  13. package/library/chunks/{RadialLabel.DyVOf2K8.js → RadialLabel.Dgipjivh.js} +1 -1
  14. package/library/chunks/{Scrollbar.BdZVb_Z-.js → Scrollbar.BDbLJ_xZ.js} +1 -1
  15. package/library/chunks/{Slice.DiEswWa6.js → Slice.BIXpM75a.js} +1 -1
  16. package/library/chunks/{Slider.C20No2z5.js → Slider.BZNFS2HS.js} +1 -1
  17. package/library/chunks/{SpriteResizer.DFnmcy0h.js → SpriteResizer.awVrrc-n.js} +1 -1
  18. package/library/chunks/{Triangle.BaOef7HV.js → Triangle.DW7bUiPK.js} +1 -1
  19. package/library/chunks/{ZoomTools.D5JPehoL.js → ZoomTools.CSBkRpSo.js} +1 -1
  20. package/library/chunks/_baseIteratee.DpzDid58.js +152 -0
  21. package/library/chunks/_baseUniq.HFKneygy.js +53 -0
  22. package/library/chunks/{am-chart.H2jnOzFc.js → am-chart.sBfZlJdc.js} +252 -252
  23. package/library/chunks/{animation.7ifl4x2S.js → animation.8MjXJybe.js} +1 -1
  24. package/library/chunks/asset-link-format.B0c92pSs.js +6 -0
  25. package/library/chunks/asset.BKBJqVqY.js +443 -0
  26. package/library/chunks/{button.B8q9TnbJ.js → button.CZ-e_TGN.js} +1 -1
  27. package/library/chunks/{capitalize.CNStXZBq.js → capitalize.i-sHIcnm.js} +1 -1
  28. package/library/chunks/{color-swatch-group.mptrPb-B.js → color-swatch-group.BTwy546N.js} +5 -5
  29. package/library/chunks/{color-swatch.Dhk54Nx0.js → color-swatch.DHxppzoQ.js} +1 -1
  30. package/library/chunks/{colorPicker.06n6P3aK.js → colorPicker.r8zsh6Oj.js} +5 -5
  31. package/library/chunks/{confirm-popover.DNmZ61WM.js → confirm-popover.DknitT29.js} +2 -2
  32. package/library/chunks/{content-builder.BAhOkdZ-.js → content-builder.B-bd8FaV.js} +1 -1
  33. package/library/chunks/{cropper.Bib8Abm3.js → cropper.CMfBGsNv.js} +1 -1
  34. package/library/chunks/{dialog.BlHQ-Sh1.js → dialog.BOWFhWcd.js} +1 -1
  35. package/library/chunks/{dot-pagination.BMlLpcfR.js → dot-pagination.CBRkADz0.js} +1 -1
  36. package/library/chunks/{asset.types.KXRZEtBr.js → endpoints.DBlquU2-.js} +417 -418
  37. package/library/chunks/{exporting.Chnl3UWi.js → exporting.B3VErmmW.js} +2 -2
  38. package/library/chunks/{file-on-demand.Bi_7NCZZ.js → file-on-demand.BVA_s4TR.js} +38 -37
  39. package/library/chunks/{flow.D2CqFQa7.js → flow.gWPD-GN_.js} +5 -5
  40. package/library/chunks/{folder-select.CDqz69bO.js → folder-select.EVuyDx55.js} +98 -98
  41. package/library/chunks/{gantt.DSHD2gjO.js → gantt.D_6T9w75.js} +8 -8
  42. package/library/chunks/{header.yC7IkgNn.js → header.inh-TC_q.js} +1 -1
  43. package/library/chunks/{hierarchy.DwVsMmsP.js → hierarchy.BeJLXp9N.js} +5 -5
  44. package/library/chunks/{hub-connection.Ot2odiCz.js → hub-connection.Dri0ZNfh.js} +1 -1
  45. package/library/chunks/{iframe.Dd2ON7ug.js → iframe.duVt7WWc.js} +1 -1
  46. package/library/chunks/{image.CR_LHEaY.js → image.DdtDzup6.js} +1 -1
  47. package/library/chunks/{index.C9khsiad.js → index.CnBD7_1u.js} +17 -17
  48. package/library/chunks/{json.zyETMOw-.js → json.BTCD_bjV.js} +3 -3
  49. package/library/chunks/{list-editor.C-1YI7Bb.js → list-editor.31MoHk3A.js} +9 -9
  50. package/library/chunks/{map.CqM2O6LB.js → map.HWubaOh9.js} +2 -2
  51. package/library/chunks/{option.CdZHtENS.js → option.B6cSZiX6.js} +1 -1
  52. package/library/chunks/{pagination.CDCYbCV4.js → pagination.RXrwBaR8.js} +3 -3
  53. package/library/chunks/{percent.DuQwbCCg.js → percent.0CeOGNP1.js} +3 -3
  54. package/library/chunks/{radar.FpYl3UH5.js → radar.CDUzjkcg.js} +4 -4
  55. package/library/chunks/{responsive._tydujAy.js → responsive.Aigicabj.js} +1 -1
  56. package/library/chunks/{sliceGrouper.BsE7fGMt.js → sliceGrouper.nPe6eWIh.js} +1 -1
  57. package/library/chunks/{stock.BR-ag4Pt.js → stock.CmWtnkxv.js} +9 -9
  58. package/library/chunks/{tab-group.DtGFedcf.js → tab-group.BA4PlJhR.js} +2 -2
  59. package/library/chunks/{table.kjsxIRt-.js → table.Dh2C2f1c.js} +4 -4
  60. package/library/chunks/{timeline.DkzkmgEM.js → timeline.DDCHQ84a.js} +5 -5
  61. package/library/chunks/{toString.CL_lYXbK.js → toString.CAY8lys2.js} +1 -1
  62. package/library/chunks/{transformation.Dir8s_wm.js → transformation.BlQCWMfI.js} +1 -1
  63. package/library/chunks/{tree.D__u64uY.js → tree.BO4oLcdB.js} +1 -1
  64. package/library/chunks/{venn.D739bOV3.js → venn.BZgn9wxo.js} +1 -1
  65. package/library/chunks/{watch.BCJD77bD.js → watch.CThbualB.js} +8 -8
  66. package/library/chunks/{wc.DzW311D-.js → wc.BUEDSaz-.js} +1 -1
  67. package/library/chunks/{xy.DCRDfTsa.js → xy.Wbux-yPv.js} +10 -10
  68. package/library/components/alert.js +1 -1
  69. package/library/components/am-chart.js +2 -2
  70. package/library/components/animated-image.js +1 -1
  71. package/library/components/animation.js +2 -2
  72. package/library/components/array-line-clamp.js +1 -1
  73. package/library/components/asset-link-format.js +14 -9
  74. package/library/components/atoms.js +15 -15
  75. package/library/components/audio.js +1 -1
  76. package/library/components/avatar.js +1 -1
  77. package/library/components/breadcrumb-item.js +1 -1
  78. package/library/components/button.js +2 -2
  79. package/library/components/checkbox.js +1 -1
  80. package/library/components/color-picker.js +2 -2
  81. package/library/components/color-swatch-group.js +6 -6
  82. package/library/components/color-swatch.js +2 -2
  83. package/library/components/confirm-popover.js +3 -3
  84. package/library/components/copy-button.js +1 -1
  85. package/library/components/corner-position-input-group.js +1 -1
  86. package/library/components/cropper.js +2 -2
  87. package/library/components/details.js +1 -1
  88. package/library/components/dialog.js +2 -2
  89. package/library/components/divider.js +1 -1
  90. package/library/components/dot-pagination.js +2 -2
  91. package/library/components/drawer.js +2 -2
  92. package/library/components/dropdown.js +1 -1
  93. package/library/components/dynamic-select.js +6 -5
  94. package/library/components/e-chart.js +1 -1
  95. package/library/components/element-clamp.js +2 -2
  96. package/library/components/file-on-demand.js +8 -8
  97. package/library/components/folder-select.js +4 -4
  98. package/library/components/format-time.js +1 -1
  99. package/library/components/grid-item.js +1 -1
  100. package/library/components/header.js +2 -2
  101. package/library/components/hub-connection.js +2 -2
  102. package/library/components/icon.js +1 -1
  103. package/library/components/iframe.js +2 -2
  104. package/library/components/image-comparer.js +1 -1
  105. package/library/components/image.js +2 -2
  106. package/library/components/include.js +1 -1
  107. package/library/components/input.js +1 -1
  108. package/library/components/line-clamp.js +1 -1
  109. package/library/components/list-editor.js +6 -6
  110. package/library/components/markdown.js +1 -1
  111. package/library/components/masonry.js +2 -2
  112. package/library/components/menu-item.js +1 -1
  113. package/library/components/molecules.js +5 -5
  114. package/library/components/mutation-observer.js +1 -1
  115. package/library/components/option.js +2 -2
  116. package/library/components/organisms.js +2 -2
  117. package/library/components/pagination.js +4 -4
  118. package/library/components/qr-code.js +1 -1
  119. package/library/components/radio-button.js +1 -1
  120. package/library/components/radio-card.js +1 -1
  121. package/library/components/radio-group.js +1 -1
  122. package/library/components/radio.js +1 -1
  123. package/library/components/range.js +1 -1
  124. package/library/components/rating.js +1 -1
  125. package/library/components/resize-observer.js +1 -1
  126. package/library/components/select.js +2 -2
  127. package/library/components/share-option-list.js +1 -1
  128. package/library/components/sidebar.js +1 -1
  129. package/library/components/size-input-group.js +1 -1
  130. package/library/components/split-panel.js +1 -1
  131. package/library/components/stepper.js +1 -1
  132. package/library/components/switch.js +1 -1
  133. package/library/components/tab-group.js +3 -3
  134. package/library/components/tab-panel.js +1 -1
  135. package/library/components/tab.js +1 -1
  136. package/library/components/table.js +4 -4
  137. package/library/components/textarea.js +1 -1
  138. package/library/components/timecode.js +1 -1
  139. package/library/components/tooltip.js +1 -1
  140. package/library/components/tree-item.js +2 -2
  141. package/library/components/tree.js +2 -2
  142. package/library/components/typeface.js +1 -1
  143. package/library/components/types.js +4612 -4541
  144. package/library/components/video.js +2 -2
  145. package/library/package.json +1 -1
  146. package/library/packages/events/src/cx-gallery-lightbox-hide.d.ts +6 -0
  147. package/library/packages/events/src/cx-gallery-lightbox-show.d.ts +6 -0
  148. package/library/packages/events/src/events.d.ts +2 -0
  149. package/library/packages/molecules/src/asset-data-display/asset-data-display.d.ts +1 -0
  150. package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +5 -0
  151. package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +1 -0
  152. package/library/packages/organisms/src/content-builder/plugins/plugin-factory.d.ts +1 -0
  153. package/library/packages/organisms/src/content-builder/styleController.d.ts +1 -0
  154. package/library/packages/organisms/src/file-on-demand/components/file-on-demand-asset/file-on-demand-asset.d.ts +2 -0
  155. package/library/packages/services/src/api/asset/asset.d.ts +3 -3
  156. package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +2 -1
  157. package/library/packages/tools/src/fetch-image/fetch-image.d.ts +2 -0
  158. package/library/packages/types/src/asset-link-format.d.ts +1 -0
  159. package/library/packages/types/src/content-builder.d.ts +3 -0
  160. package/library/packages/types/src/gallery-item.d.ts +2 -0
  161. package/library/react-web-component.d.ts +7 -3
  162. package/library/utils.js +4 -4
  163. package/package.json +1 -1
  164. package/library/chunks/_baseUniq.BUihBa8c.js +0 -202
  165. package/library/chunks/asset-link-format.BSRDqHg7.js +0 -6
  166. package/library/chunks/asset.CCjWpDnd.js +0 -431
  167. package/library/packages/services/src/api/asset/asset.types.d.ts +0 -233
@@ -1,7 +1,7 @@
1
1
  import { n as a, C as p } from "./lib-cortex-element.CVMmyPMC.js";
2
2
  import { c as m } from "./component.styles.CRO4Odto.js";
3
3
  import { c as y } from "./custom-element.L4WJXn1j.js";
4
- import { w as d } from "./watch.BCJD77bD.js";
4
+ import { w as d } from "./watch.CThbualB.js";
5
5
  import { i as b, x as u } from "./lit-element.jLBm65_O.js";
6
6
  import { r as g } from "./query-async.CTgXGyQ5.js";
7
7
  const h = b`:host{display:contents}`, x = [
@@ -0,0 +1,6 @@
1
+ var u = /* @__PURE__ */ ((t) => (t.AspectRatio = "%", t.Pixel = "px", t))(u || {}), e = /* @__PURE__ */ ((t) => (t.Album = "Album", t.Audio = "Audio", t.Image = "Image", t.Multimedia = "Multimedia", t.ProjectDocument = "ProjectDocument", t.Story = "Story", t.Video = "Video", t.Widget = "Widget", t))(e || {}), r = /* @__PURE__ */ ((t) => (t.Crop = "Crop", t.Metadata = "Metadata", t.Proxy = "Proxy", t.Quality = "Quality", t.Resize = "Resize", t.Rotate = "Rotate", t))(r || {});
2
+ export {
3
+ e as M,
4
+ r as T,
5
+ u as U
6
+ };
@@ -0,0 +1,443 @@
1
+ import { h as l, S as $, A as H, a as K, b as q } from "./endpoints.DBlquU2-.js";
2
+ import { M as O } from "./asset-link-format.B0c92pSs.js";
3
+ import "./debounce.CIEhztrj.js";
4
+ import "./lit-element.jLBm65_O.js";
5
+ import "./form.Ch1cwYzO.js";
6
+ import "./i18n.DmmFsjwP.js";
7
+ import { a as V } from "./string.DUgD4c9f.js";
8
+ import "./content-builder.B-bd8FaV.js";
9
+ import "./unsafe-html.Dff7-rCx.js";
10
+ import { b as Z } from "./_baseUniq.HFKneygy.js";
11
+ function z(e) {
12
+ return e && e.length ? Z(e) : [];
13
+ }
14
+ function X(e) {
15
+ return typeof e == "object" && e !== null && "URI" in e;
16
+ }
17
+ const Y = {
18
+ artist: "Artist",
19
+ color: "Color",
20
+ createDate: "CreateDate",
21
+ docSubType: "DocSubType",
22
+ docType: "DocType",
23
+ editDate: "EditDate",
24
+ fileExtension: "Fileextension",
25
+ keyword: "Keyword",
26
+ mediaDate: "MediaDate",
27
+ mediaNumber: "MediaNumber",
28
+ nativeKeyword: "NativeKeyword",
29
+ orientation: "Orientation",
30
+ parentFolderIdentifier: "ParentFolderIdentifier",
31
+ path: "Path",
32
+ photographer: "Photographer",
33
+ purpose: "Purpose",
34
+ recordId: "RecordID",
35
+ systemIdentifier: "SystemIdentifier",
36
+ text: "Text",
37
+ title: "Title"
38
+ }, Q = /* @__PURE__ */ new Set(["mediaDate", "createDate", "editDate"]);
39
+ function J(e) {
40
+ return !/[\s&+/*"\\:(),'<>~|[\]{}]/.test(e) && !/^(?:OR|AND|NOT)$/.test(e) ? e : `"${e.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
41
+ }
42
+ function P(e, t) {
43
+ const r = (Array.isArray(t) ? t : [t]).map((i) => `${e}:${J(i)}`);
44
+ return r.length > 1 ? `(${r.join(" OR ")})` : r[0] ?? "";
45
+ }
46
+ function ee(e, t) {
47
+ return (Array.isArray(t) ? t : [t]).map((r) => `${e}${r.operator}${r.value}`).join(" AND ");
48
+ }
49
+ function te(e) {
50
+ const t = [];
51
+ for (const o of Object.keys(e)) {
52
+ const r = o, i = e[r];
53
+ if (i == null)
54
+ continue;
55
+ if (r === "custom") {
56
+ for (const [s, f] of Object.entries(
57
+ i
58
+ ))
59
+ t.push(P(s, f));
60
+ continue;
61
+ }
62
+ const u = Y[r];
63
+ if (u) {
64
+ if (Q.has(r)) {
65
+ t.push(
66
+ ee(u, i)
67
+ );
68
+ continue;
69
+ }
70
+ if (r === "color") {
71
+ t.push(`${u}:${i}`);
72
+ continue;
73
+ }
74
+ t.push(P(u, i));
75
+ }
76
+ }
77
+ return t.join(" AND ");
78
+ }
79
+ function D(e) {
80
+ if ("and" in e)
81
+ return e.and.map(D).filter(Boolean).join(" AND ");
82
+ if ("or" in e) {
83
+ const t = e.or.map(D).filter(Boolean);
84
+ return t.length > 1 ? `(${t.join(" OR ")})` : t[0] ?? "";
85
+ }
86
+ if ("not" in e) {
87
+ const t = D(e.not);
88
+ return t ? `NOT (${t})` : "";
89
+ }
90
+ return te(e);
91
+ }
92
+ const S = "CoreField.LargeSizePreview", b = "CoreField.DocType", re = "Document.Title", oe = "Document.CaptionLong", M = "Document.FileExtension", G = "CoreField.FileSize", U = "CoreField.Identifier", v = "CoreField.Keywords", j = "CoreField.MaxHeight", W = "CoreField.MaxWidth", T = "Document.RecordID", w = "CoreField.DocSubType", x = "CoreField.TitleWithFallback", h = "CoreField.OriginalFileName", y = "CoreField.UpdatedFileName", A = "CoreField.OriginalPreview", L = {
93
+ DEFAULT_VIEW_SIZE: "Document.LargeSizePreview",
94
+ FIELD_TITLE_WITH_FALLBACK: "Document.TitleWithFallback",
95
+ ORIGINAL_VIEW_SIZE: "Document.OriginalPreview"
96
+ }, k = {
97
+ [S]: L.DEFAULT_VIEW_SIZE,
98
+ [x]: L.FIELD_TITLE_WITH_FALLBACK,
99
+ [A]: L.ORIGINAL_VIEW_SIZE
100
+ }, ne = Object.fromEntries(
101
+ Object.entries(k).map(([e, t]) => [
102
+ t,
103
+ e
104
+ ])
105
+ );
106
+ function se(e) {
107
+ return k[e] ?? e;
108
+ }
109
+ function ae(e) {
110
+ const t = {};
111
+ for (const [o, r] of Object.entries(e)) {
112
+ const i = ne[o] ?? o;
113
+ t[i] = r;
114
+ }
115
+ return t;
116
+ }
117
+ async function B({
118
+ cms5Token: e,
119
+ countPerPage: t,
120
+ fields: o,
121
+ getPermanentAssetsPaths: r,
122
+ pageNumber: i,
123
+ query: u,
124
+ siteUrl: s,
125
+ sort: f,
126
+ token: m,
127
+ useSession: I
128
+ }) {
129
+ const E = o?.map(se);
130
+ try {
131
+ return (await l.request({
132
+ baseURL: s,
133
+ headers: m ? { Authorization: `Bearer ${m}` } : void 0,
134
+ method: "GET",
135
+ params: {
136
+ CMS5Token: e || void 0,
137
+ CountPerPage: t,
138
+ Fields: z(E),
139
+ Format: "json",
140
+ GetPermanentAssetsPaths: r || void 0,
141
+ PageNumber: i,
142
+ Query: D(u),
143
+ Sort: f || void 0,
144
+ UseSession: I || void 0
145
+ },
146
+ paramsSerializer: { indexes: null },
147
+ responseType: "json",
148
+ transformResponse: [
149
+ ...Array.isArray(l.defaults.transformResponse) ? l.defaults.transformResponse : [],
150
+ (n) => ({
151
+ items: (n.APIResponse?.Items ?? []).map(ae),
152
+ sort: n.APIResponse?.GlobalInfo?.Sort ?? "",
153
+ totalCount: n.APIResponse?.GlobalInfo?.TotalCount ?? 0
154
+ })
155
+ ],
156
+ url: $["4.0"]
157
+ })).data;
158
+ } catch {
159
+ return { items: [], sort: "", totalCount: 0 };
160
+ }
161
+ }
162
+ async function De({
163
+ assetId: e,
164
+ extension: t,
165
+ format: o,
166
+ siteUrl: r,
167
+ token: i,
168
+ transformations: u,
169
+ useSession: s
170
+ }) {
171
+ try {
172
+ return (await l.request({
173
+ baseURL: r,
174
+ method: "GET",
175
+ params: {
176
+ SourceAssetFormat: o,
177
+ SourceAssetRecordID: e,
178
+ TargetExtension: V(t),
179
+ Token: i || void 0,
180
+ Transformations: u,
181
+ UseSession: s || void 0
182
+ },
183
+ /**
184
+ * https://link.orangelogic.com/Tasks/41S1XH
185
+ */
186
+ timeout: 3e5,
187
+ // 5 minutes
188
+ url: H.GET_TRANSFORM_ASSET_LINK
189
+ })).data;
190
+ } catch {
191
+ return null;
192
+ }
193
+ }
194
+ const ie = 50;
195
+ function ce(e, t) {
196
+ const o = [];
197
+ for (let r = 0; r < e.length; r += t)
198
+ o.push(e.slice(r, r + t));
199
+ return o;
200
+ }
201
+ async function Te({
202
+ cms5Token: e,
203
+ extraFields: t,
204
+ getPermanentAssetsPaths: o,
205
+ recordIds: r,
206
+ token: i
207
+ }) {
208
+ if (!Array.isArray(r) || r.length === 0)
209
+ return { facets: [], items: [], totalCount: 0 };
210
+ const u = t?.filter((n) => n && typeof n == "string") ?? [], s = [
211
+ ...u,
212
+ A,
213
+ y,
214
+ h,
215
+ re,
216
+ oe,
217
+ T
218
+ ], f = ce(r, ie), m = await Promise.all(
219
+ f.map(
220
+ (n) => B({
221
+ cms5Token: e,
222
+ countPerPage: n.length,
223
+ fields: s,
224
+ getPermanentAssetsPaths: o,
225
+ pageNumber: 1,
226
+ query: { recordId: n },
227
+ token: i
228
+ })
229
+ )
230
+ ), I = new Map(r.map((n, d) => [n, d])), E = m.flatMap((n) => n.items).map((n) => {
231
+ let d = c(n, y);
232
+ return d === "" && (d = c(n, h)), {
233
+ name: d,
234
+ originalUrl: c(n, A),
235
+ recordId: c(n, T),
236
+ ...u.reduce(
237
+ (a, p) => (a[p] = c(n, p), a),
238
+ {}
239
+ )
240
+ };
241
+ }).sort(
242
+ (n, d) => (I.get(n.recordId) ?? 1 / 0) - (I.get(d.recordId) ?? 1 / 0)
243
+ ), _ = m.reduce(
244
+ (n, d) => n + d.totalCount,
245
+ 0
246
+ );
247
+ return { facets: [], items: E, totalCount: _ };
248
+ }
249
+ function c(e, t) {
250
+ const o = e[t];
251
+ return o == null ? "" : typeof o == "string" ? o : typeof o == "number" || typeof o == "boolean" ? String(o) : X(o) ? o.URI : "";
252
+ }
253
+ async function he({
254
+ cms5Token: e,
255
+ countPerPage: t,
256
+ extraFields: o,
257
+ getPermanentAssetsPaths: r,
258
+ limitedDocTypes: i,
259
+ pageNumber: u,
260
+ parentFolderIdentifier: s,
261
+ searchTerm: f,
262
+ sortOrder: m,
263
+ token: I
264
+ }) {
265
+ if (!s)
266
+ return { facets: [], items: [], totalCount: 0 };
267
+ const E = (o?.filter((a) => a && typeof a == "string") ?? []).map((a) => a.replace("%20", " ")), _ = {
268
+ parentFolderIdentifier: s,
269
+ ...i.length > 0 ? { docType: [O.Image, O.Audio] } : {}
270
+ }, n = await B({
271
+ cms5Token: e,
272
+ countPerPage: t,
273
+ fields: [
274
+ ...E,
275
+ x,
276
+ S,
277
+ A,
278
+ v,
279
+ W,
280
+ j,
281
+ G,
282
+ b,
283
+ w,
284
+ U,
285
+ M,
286
+ T,
287
+ h,
288
+ y
289
+ ],
290
+ getPermanentAssetsPaths: r,
291
+ pageNumber: u,
292
+ query: _,
293
+ sort: void 0,
294
+ token: I
295
+ }), d = n.items.map((a) => {
296
+ let p = c(a, M), F = c(a, y), C = c(a, S);
297
+ p && !p.startsWith(".") && (p = "." + p), F === "" && (F = c(a, h)), p.toLowerCase() === ".gif" && (C = c(a, A));
298
+ const g = c(a, T);
299
+ return {
300
+ docSubType: c(a, w),
301
+ docType: c(a, b) || "",
302
+ extension: p,
303
+ height: c(a, j) || "0",
304
+ id: g,
305
+ identifier: c(a, U),
306
+ imageUrl: C,
307
+ name: F,
308
+ originalUrl: c(a, A),
309
+ recordId: g,
310
+ size: c(a, G) || "0 MB",
311
+ tags: c(a, v),
312
+ width: c(a, W) || "0",
313
+ ...E.reduce(
314
+ (N, R) => (N[R] = c(a, R), N),
315
+ {}
316
+ )
317
+ };
318
+ });
319
+ return {
320
+ facets: [],
321
+ items: d,
322
+ totalCount: n.totalCount
323
+ };
324
+ }
325
+ async function ye({
326
+ autoCropMode: e,
327
+ cropHeight: t,
328
+ cropWidth: o,
329
+ imageUrl: r,
330
+ useSession: i
331
+ }) {
332
+ try {
333
+ return (await l.request({
334
+ method: "GET",
335
+ params: {
336
+ AutoCropMode: e,
337
+ CropHeight: t,
338
+ CropWidth: o,
339
+ ImageUrl: r && new URL(r, window.location.origin).href,
340
+ UseSession: i || void 0
341
+ },
342
+ responseType: "json",
343
+ timeout: 3e5,
344
+ // 5 minutes
345
+ transformResponse: [
346
+ ...Array.isArray(l.defaults.transformResponse) ? l.defaults.transformResponse : [],
347
+ (s) => ({
348
+ height: s.cropHeight,
349
+ width: s.cropWidth,
350
+ x: s.cropX,
351
+ y: s.cropY
352
+ })
353
+ ],
354
+ url: H.GET_CROP_ZONE_SUGGESTION
355
+ })).data;
356
+ } catch {
357
+ return null;
358
+ }
359
+ }
360
+ async function Fe({
361
+ assetRecordId: e,
362
+ siteUrl: t,
363
+ token: o,
364
+ useSession: r
365
+ }) {
366
+ try {
367
+ return (await l.request({
368
+ baseURL: t,
369
+ method: "GET",
370
+ params: {
371
+ RecordId: e,
372
+ Token: o,
373
+ UseSession: r || void 0
374
+ },
375
+ responseType: "json",
376
+ transformResponse: [
377
+ ...Array.isArray(l.defaults.transformResponse) ? l.defaults.transformResponse : [],
378
+ (u) => !u || typeof u != "object" ? [] : u.proxies?.map((s) => ({
379
+ cdnName: s.cdnName,
380
+ extension: s.extension,
381
+ formatHeight: s.formatHeight,
382
+ formatWidth: s.formatWidth,
383
+ height: s.height,
384
+ permanentLink: s.permanentLink,
385
+ proxyLabel: s.proxyLabel,
386
+ proxyName: s.proxyName,
387
+ width: s.width
388
+ })) ?? []
389
+ ],
390
+ url: q
391
+ })).data;
392
+ } catch {
393
+ return [];
394
+ }
395
+ }
396
+ async function Le({
397
+ siteUrl: e
398
+ } = {}) {
399
+ try {
400
+ return (await l.request({
401
+ baseURL: e,
402
+ method: "GET",
403
+ responseType: "json",
404
+ transformResponse: [
405
+ ...Array.isArray(l.defaults.transformResponse) ? l.defaults.transformResponse : [],
406
+ (o) => !o || typeof o != "object" ? {
407
+ formatsByDocType: {
408
+ Audio: {},
409
+ Image: {},
410
+ Multimedia: {},
411
+ Video: {}
412
+ }
413
+ } : {
414
+ formatsByDocType: o.formatsByDocType ?? {}
415
+ }
416
+ ],
417
+ url: K
418
+ })).data;
419
+ } catch {
420
+ return { formatsByDocType: {} };
421
+ }
422
+ }
423
+ export {
424
+ S as D,
425
+ T as F,
426
+ A as O,
427
+ Te as a,
428
+ De as b,
429
+ ye as c,
430
+ Le as d,
431
+ B as e,
432
+ he as f,
433
+ j as g,
434
+ W as h,
435
+ X as i,
436
+ b as j,
437
+ M as k,
438
+ U as l,
439
+ Fe as m,
440
+ G as n,
441
+ w as o,
442
+ z as u
443
+ };
@@ -4,7 +4,7 @@ import { c as C } from "./custom-element.L4WJXn1j.js";
4
4
  import { F as x, v as w } from "./form.Ch1cwYzO.js";
5
5
  import { L as $ } from "./i18n.DmmFsjwP.js";
6
6
  import { H as S, g as O } from "./slot.j5oheLJC.js";
7
- import { w as m } from "./watch.BCJD77bD.js";
7
+ import { w as m } from "./watch.CThbualB.js";
8
8
  import { r as u } from "./state.CSDxrqLd.js";
9
9
  import { e as L } from "./query.BBf1UFkC.js";
10
10
  import { e as D } from "./class-map.BiVq-cVR.js";
@@ -1,4 +1,4 @@
1
- import { t as i } from "./toString.CL_lYXbK.js";
1
+ import { t as i } from "./toString.CAY8lys2.js";
2
2
  function R(r, e, u) {
3
3
  var o = -1, f = r.length;
4
4
  e < 0 && (e = -e > f ? 0 : f + e), u = u > f ? f : u, u < 0 && (u += f), f = e > u ? 0 : u - e >>> 0, e >>>= 0;
@@ -1,15 +1,15 @@
1
1
  import z from "../components/space.js";
2
- import { C as $ } from "./table.kjsxIRt-.js";
2
+ import { C as $ } from "./table.Dh2C2f1c.js";
3
3
  import { C as k } from "./typography.DJC_UXgs.js";
4
4
  import { n as h, C as F } from "./lib-cortex-element.CVMmyPMC.js";
5
- import { C, a as g } from "./color-swatch.Dhk54Nx0.js";
5
+ import { C, a as g } from "./color-swatch.DHxppzoQ.js";
6
6
  import { c as A } from "./component.styles.CRO4Odto.js";
7
- import { D as p } from "./content-builder.BAhOkdZ-.js";
7
+ import { D as p } from "./content-builder.B-bd8FaV.js";
8
8
  import { c as S } from "./custom-element.L4WJXn1j.js";
9
9
  import { d as T } from "./debounce.CIEhztrj.js";
10
10
  import { L as E } from "./i18n.DmmFsjwP.js";
11
- import { w as x } from "./watch.BCJD77bD.js";
12
- import { g as D, a as R } from "./responsive._tydujAy.js";
11
+ import { w as x } from "./watch.CThbualB.js";
12
+ import { g as D, a as R } from "./responsive.Aigicabj.js";
13
13
  import { x as l, B as H, i as O } from "./lit-element.jLBm65_O.js";
14
14
  import { r as d } from "./state.CSDxrqLd.js";
15
15
  import { e as P } from "./query.BBf1UFkC.js";
@@ -9,7 +9,7 @@ import { c as n, C as h, H as $, l as z } from "./color.vLD2sNTs.js";
9
9
  import { c as O } from "./custom-element.L4WJXn1j.js";
10
10
  import { d as W } from "./debounce.CIEhztrj.js";
11
11
  import { L as A } from "./i18n.DmmFsjwP.js";
12
- import { w as i } from "./watch.BCJD77bD.js";
12
+ import { w as i } from "./watch.CThbualB.js";
13
13
  import { i as G, x as u } from "./lit-element.jLBm65_O.js";
14
14
  import { r as c } from "./state.CSDxrqLd.js";
15
15
  import { e as R } from "./query.BBf1UFkC.js";
@@ -1,8 +1,8 @@
1
- import { D as L, q as i, R as m, d as s, x as c, H as A, C as h, w as g, L as R, T, B as y, G as _, b, s as G, c as S, a as x, f as p, bx as D, by as P } from "./am-chart.H2jnOzFc.js";
2
- import { L as k } from "./LinearGradient.B1z9AGUt.js";
3
- import { C as M } from "./Circle.DBa5Ok8V.js";
4
- import { E as H } from "./EditableLabel.BWeq6fgX.js";
5
- import { S as B } from "./Slider.C20No2z5.js";
1
+ import { D as L, q as i, R as m, d as s, x as c, H as A, C as h, w as g, L as R, T, B as y, G as _, b, s as G, c as S, a as x, f as p, bx as D, by as P } from "./am-chart.sBfZlJdc.js";
2
+ import { L as k } from "./LinearGradient.BM0pPmvI.js";
3
+ import { C as M } from "./Circle.BaJWdg6Z.js";
4
+ import { E as H } from "./EditableLabel.gd9mjKfA.js";
5
+ import { S as B } from "./Slider.BZNFS2HS.js";
6
6
  class O extends L {
7
7
  setupDefaultRules() {
8
8
  super.setupDefaultRules();
@@ -1,5 +1,5 @@
1
- import { C as _ } from "./button.B8q9TnbJ.js";
2
- import { C as u, D as h } from "./dialog.BlHQ-Sh1.js";
1
+ import { C as _ } from "./button.CZ-e_TGN.js";
2
+ import { C as u, D as h } from "./dialog.BOWFhWcd.js";
3
3
  import g from "../components/dropdown.js";
4
4
  import { C as x } from "./typography.DJC_UXgs.js";
5
5
  import { n as e, C as b } from "./lib-cortex-element.CVMmyPMC.js";
@@ -1,4 +1,4 @@
1
- import { c as l } from "./capitalize.CNStXZBq.js";
1
+ import { c as l } from "./capitalize.i-sHIcnm.js";
2
2
  const i = window.location.origin.includes("localhost:") ? "https://local.orangelogic.com" : window.location.origin;
3
3
  function B(a, o, n, d = i) {
4
4
  const e = new URL(d + "/" + a);
@@ -1,6 +1,6 @@
1
1
  import { n as Ji, C as ET } from "./lib-cortex-element.CVMmyPMC.js";
2
2
  import { c as RT } from "./component.styles.CRO4Odto.js";
3
- import { U as Cp } from "./asset-link-format.BSRDqHg7.js";
3
+ import { U as Cp } from "./asset-link-format.B0c92pSs.js";
4
4
  import { c as AT } from "./custom-element.L4WJXn1j.js";
5
5
  import { i as OT, x as Zv } from "./lit-element.jLBm65_O.js";
6
6
  import { r as DT } from "./state.CSDxrqLd.js";
@@ -7,7 +7,7 @@ import { L } from "./i18n.DmmFsjwP.js";
7
7
  import { M as P } from "./modal.U1QltQKe.js";
8
8
  import { l as w, u as _ } from "./scroll.xtO5yojm.js";
9
9
  import { H as E } from "./slot.j5oheLJC.js";
10
- import { w as z } from "./watch.BCJD77bD.js";
10
+ import { w as z } from "./watch.CThbualB.js";
11
11
  import { i as R, x as y, E as W } from "./lit-element.jLBm65_O.js";
12
12
  import { r as g } from "./state.CSDxrqLd.js";
13
13
  import { e as m } from "./query.BBf1UFkC.js";
@@ -3,7 +3,7 @@ import { c as z } from "./component.styles.CRO4Odto.js";
3
3
  import { O as C } from "./index.Cpamj0jB.js";
4
4
  import { c as F } from "./custom-element.L4WJXn1j.js";
5
5
  import { L as S } from "./i18n.DmmFsjwP.js";
6
- import { w as f } from "./watch.BCJD77bD.js";
6
+ import { w as f } from "./watch.CThbualB.js";
7
7
  import { i as O, x as y } from "./lit-element.jLBm65_O.js";
8
8
  import { r as j } from "./state.CSDxrqLd.js";
9
9
  import { e as K } from "./query.BBf1UFkC.js";