@arcgis/map-components 5.1.0-next.75 → 5.1.0-next.77

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 (35) hide show
  1. package/dist/cdn/{KET53JUE.js → 6MK35EAT.js} +1 -1
  2. package/dist/cdn/{FM3AT2SL.js → AG7LUCV3.js} +1 -1
  3. package/dist/cdn/G7KHJU6J.js +2 -0
  4. package/dist/cdn/{ACAAYGKC.js → HL4M23YL.js} +1 -1
  5. package/dist/cdn/MNXYDKVS.js +2 -0
  6. package/dist/cdn/PP7ZT3L2.js +2 -0
  7. package/dist/cdn/QW4QGAIG.js +2 -0
  8. package/dist/cdn/SD7DMWPD.js +2 -0
  9. package/dist/cdn/{KGLUFWJ7.js → T66WG4I4.js} +1 -1
  10. package/dist/cdn/V2HLEYHF.js +3 -0
  11. package/dist/cdn/{3TVO5LIN.js → WO2BX7U2.js} +1 -1
  12. package/dist/cdn/XOTOQOK6.js +2 -0
  13. package/dist/cdn/index.js +1 -1
  14. package/dist/chunks/useArcgisViewReadyError.js +20 -19
  15. package/dist/chunks/video-utils.js +12 -0
  16. package/dist/components/arcgis-feature/customElement.js +75 -53
  17. package/dist/components/arcgis-feature-media/customElement.js +222 -211
  18. package/dist/components/arcgis-feature-relationship/customElement.js +69 -68
  19. package/dist/components/arcgis-features/customElement.d.ts +2 -2
  20. package/dist/components/arcgis-features/customElement.js +44 -44
  21. package/dist/components/arcgis-popup/customElement.d.ts +2 -2
  22. package/dist/components/arcgis-popup/customElement.js +105 -105
  23. package/dist/components/arcgis-video-player/customElement.js +22 -21
  24. package/dist/components/arcgis-video-player-action-bar/customElement.js +14 -17
  25. package/dist/docs/api.json +1 -1
  26. package/dist/docs/docs.json +1 -1
  27. package/dist/docs/web-types.json +1 -1
  28. package/dist/loader.js +1 -1
  29. package/package.json +4 -4
  30. package/dist/cdn/2IXIUNGH.js +0 -2
  31. package/dist/cdn/CQCKW6L4.js +0 -2
  32. package/dist/cdn/EXZFAJW4.js +0 -3
  33. package/dist/cdn/GHSQJ4UC.js +0 -2
  34. package/dist/cdn/QPMWCCXQ.js +0 -2
  35. package/dist/cdn/YCM6SOEX.js +0 -2
@@ -1,32 +1,32 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import { c as O } from "../../chunks/runtime.js";
3
- import { css as B, html as x } from "lit";
4
- import { ref as W } from "lit/directives/ref.js";
5
- import { keyed as j } from "lit/directives/keyed.js";
6
- import { useDirection as G, useMedia as q } from "@arcgis/lumina/controllers";
7
- import { getColorsFromRenderer as K } from "@arcgis/core/renderers/support/utils.js";
8
- import { LitElement as J, nothing as y } from "@arcgis/lumina";
9
- import { substitute as Q } from "@arcgis/core/intl.js";
10
- import { watch as Z } from "@arcgis/core/core/reactiveUtils.js";
11
- import ee from "@arcgis/core/popup/FieldInfo.js";
12
- import N from "@arcgis/core/popup/content/support/ChartMediaInfoValueSeries.js";
13
- import { unsafeGetCalciteModeName as te } from "@arcgis/toolkit/dom";
14
- import { renderingSanitizer as V } from "@arcgis/core/applications/Components/sanitizerUtils.js";
15
- import { d as A, s as R, l as z, m as X, n as ie, o as E, i as ae, p as re, h as Y, f as ne } from "../../chunks/feature-utils.js";
16
- const oe = B`.container{display:flex;flex-flow:row wrap;align-items:center;margin-top:var(--calcite-spacing-xs);width:100%;min-height:150px}.container .pagination-button{display:flex;align-items:center;justify-content:center;border:none;background:transparent;cursor:pointer;padding-block:var(--calcite-spacing-xs);padding-inline:var(--calcite-spacing-xs);color:var(--calcite-color-text-3)}.container .pagination-button:hover,.container .pagination-button:focus{background-color:var(--calcite-color-foreground-3);color:var(--calcite-color-text-1);fill:var(--calcite-color-text-1)}.item-title{margin:0;font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-relative-snug)}.item-caption{padding-block-start:var(--calcite-spacing-xxs);font-size:var(--calcite-font-size-sm);line-height:var(--calcite-font-line-height-relative-snug)}.item{display:flex;align-items:flex-start;justify-content:center;margin-block:var(--calcite-spacing-xs);width:100%;height:auto}.item-navigation{display:flex;flex:0 1 100%;align-items:flex-start;justify-content:space-between;margin-block-end:var(--calcite-spacing-xs)}.item-text{margin-inline-end:var(--calcite-spacing-xs)}.pagination{display:flex;flex:0 0 auto;align-items:center;overflow:hidden}.pagination:only-child{margin-inline-start:auto}.pagination-text{padding-inline:var(--calcite-spacing-xxs);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm);line-height:var(--calcite-font-line-height-relative-normal)}.item-container{flex:0 1 auto;width:100%}.item-container img{max-width:100%}.item-container img[src$=".SVG"],.item-container img[src$=".svg"]{width:100%}.chart{width:100%;height:155px}`;
2
+ import { c as B } from "../../chunks/runtime.js";
3
+ import { css as W, html as _ } from "lit";
4
+ import { ref as j } from "lit/directives/ref.js";
5
+ import { keyed as G } from "lit/directives/keyed.js";
6
+ import { useDirection as q, useMedia as K } from "@arcgis/lumina/controllers";
7
+ import { getColorsFromRenderer as J } from "@arcgis/core/renderers/support/utils.js";
8
+ import { LitElement as Q, nothing as y } from "@arcgis/lumina";
9
+ import { substitute as Z } from "@arcgis/core/intl.js";
10
+ import { watch as ee } from "@arcgis/core/core/reactiveUtils.js";
11
+ import te from "@arcgis/core/popup/FieldInfo.js";
12
+ import V from "@arcgis/core/popup/content/support/ChartMediaInfoValueSeries.js";
13
+ import { unsafeGetCalciteModeName as ie } from "@arcgis/toolkit/dom";
14
+ import { renderingSanitizer as N } from "@arcgis/core/applications/Components/sanitizerUtils.js";
15
+ import { d as A, s as R, l as z, m as X, n as ae, o as E, i as re, p as ne, h as Y, f as se } from "../../chunks/feature-utils.js";
16
+ const oe = W`.container{display:flex;flex-flow:row wrap;align-items:center;margin-top:var(--calcite-spacing-xs);width:100%;min-height:150px}.container .pagination-button{display:flex;align-items:center;justify-content:center;border:none;background:transparent;cursor:pointer;padding-block:var(--calcite-spacing-xs);padding-inline:var(--calcite-spacing-xs);color:var(--calcite-color-text-3)}.container .pagination-button:hover,.container .pagination-button:focus{background-color:var(--calcite-color-foreground-3);color:var(--calcite-color-text-1);fill:var(--calcite-color-text-1)}.item-title{margin:0;font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-relative-snug)}.item-caption{padding-block-start:var(--calcite-spacing-xxs);font-size:var(--calcite-font-size-sm);line-height:var(--calcite-font-line-height-relative-snug)}.item{display:flex;align-items:flex-start;justify-content:center;margin-block:var(--calcite-spacing-xs);width:100%;height:auto}.item-navigation{display:flex;flex:0 1 100%;align-items:flex-start;justify-content:space-between;margin-block-end:var(--calcite-spacing-xs)}.item-text{margin-inline-end:var(--calcite-spacing-xs)}.pagination{display:flex;flex:0 0 auto;align-items:center;overflow:hidden}.pagination:only-child{margin-inline-start:auto}.pagination-text{padding-inline:var(--calcite-spacing-xxs);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm);line-height:var(--calcite-font-line-height-relative-normal)}.item-container{flex:0 1 auto;width:100%}.item-container img{max-width:100%}.item-container img[src$=".SVG"],.item-container img[src$=".svg"]{width:100%}.chart{width:100%;height:155px}`;
17
17
  function $(S) {
18
18
  if (!A(S))
19
19
  return null;
20
20
  const [e, t] = S.split("/").slice(1);
21
21
  return { layerId: e, fieldName: t };
22
22
  }
23
- const k = 15, M = "category", w = "value", se = "rgba(50, 50, 50, 1)", le = 250, ce = 500, de = 200;
24
- class ue extends J {
23
+ const k = 15, C = "category", w = "value", le = "rgba(50, 50, 50, 1)", ce = 250, de = 500, ue = 200;
24
+ class he extends Q {
25
25
  constructor() {
26
- super(...arguments), this._direction = G(), this._prefersReducedMotion = q("(prefers-reduced-motion)"), this.activeMediaInfoIndex = 0, this.chartAnimationDisabled = !1, this.headingLevel = 2;
26
+ super(...arguments), this._direction = q(), this._prefersReducedMotion = K("(prefers-reduced-motion)"), this.activeMediaInfoIndex = 0, this.chartAnimationDisabled = !1, this.headingLevel = 2;
27
27
  }
28
28
  static {
29
- this.properties = { _refreshIntervalInfo: 16, messages: 0, values: 0, activeMediaInfoIndex: 9, chartAnimationDisabled: 5, activeMediaInfo: 32, formattedMediaInfos: 32, description: 1, fieldInfoMap: 0, layer: 0, mediaInfos: 0, popupTemplate: 0, relatedInfos: 0, formattedValues: 0, heading: 1, graphic: 0, formattedMediaInfoCount: 32, headingLevel: 9 };
29
+ this.properties = { _refreshIntervalInfo: 16, messages: 0, values: 0, expressionValues: 0, activeMediaInfoIndex: 9, chartAnimationDisabled: 5, activeMediaInfo: 32, formattedMediaInfos: 32, description: 1, fieldInfoMap: 0, layer: 0, mediaInfos: 0, popupTemplate: 0, relatedInfos: 0, formattedValues: 0, heading: 1, graphic: 0, formattedMediaInfoCount: 32, headingLevel: 9 };
30
30
  }
31
31
  static {
32
32
  this.styles = oe;
@@ -51,7 +51,7 @@ class ue extends J {
51
51
  }
52
52
  loaded() {
53
53
  this.manager.onLifecycle(() => [
54
- Z(() => [this.activeMediaInfo, this.activeMediaInfoIndex], () => this._setupMediaRefreshTimer(), { initial: !0 }),
54
+ ee(() => [this.activeMediaInfo, this.activeMediaInfoIndex], () => this._setupMediaRefreshTimer(), { initial: !0 }),
55
55
  { remove: () => this._clearMediaRefreshTimer() }
56
56
  ]);
57
57
  }
@@ -64,155 +64,166 @@ class ue extends J {
64
64
  this._setContentElementMedia(i);
65
65
  }
66
66
  _formatMediaInfos() {
67
- const { mediaInfos: e, layer: t } = this, i = this.values ?? {}, a = this.formattedValues ?? {}, r = this.fieldInfoMap ?? /* @__PURE__ */ new Map();
67
+ const { mediaInfos: e, layer: t } = this, i = this.values ?? {}, a = this.formattedValues ?? {}, n = this.fieldInfoMap ?? /* @__PURE__ */ new Map(), s = this.expressionValues ?? {};
68
68
  return e?.map((o) => {
69
- const n = o?.clone();
70
- if (!n)
69
+ const r = o?.clone();
70
+ if (!r)
71
71
  return null;
72
- if (n.title = R({
72
+ if (r.title = R({
73
73
  values: i,
74
- fieldInfoMap: r,
74
+ fieldInfoMap: n,
75
75
  globalValues: a,
76
76
  layer: t,
77
- text: n.title
78
- }), n.caption = R({
77
+ text: r.title
78
+ }), r.caption = R({
79
79
  values: i,
80
- fieldInfoMap: r,
80
+ fieldInfoMap: n,
81
81
  globalValues: a,
82
82
  layer: t,
83
- text: n.caption
84
- }), n.altText = R({
83
+ text: r.caption
84
+ }), r.altText = R({
85
85
  values: i,
86
- fieldInfoMap: r,
86
+ fieldInfoMap: n,
87
87
  globalValues: a,
88
88
  layer: t,
89
- text: n.altText
90
- }), n.type === "image") {
91
- if (!n.value)
89
+ text: r.altText
90
+ }), r.type === "image") {
91
+ if (!r.value)
92
92
  return null;
93
- const s = n.value;
93
+ const c = r.value;
94
94
  return this._setImageValue({
95
- value: s,
95
+ value: c,
96
96
  formattedValues: a,
97
97
  layer: t
98
- }), s.sourceURL ? n : void 0;
98
+ }), c.sourceURL ? r : void 0;
99
99
  }
100
- if (n.type === "pie-chart" || n.type === "line-chart" || n.type === "column-chart" || n.type === "bar-chart") {
101
- if (!n.value)
100
+ if (r.type === "pie-chart" || r.type === "line-chart" || r.type === "column-chart" || r.type === "bar-chart") {
101
+ if (!r.value)
102
102
  return null;
103
- const s = n.value;
103
+ const c = r.value;
104
104
  return this._setChartValue({
105
- value: s,
106
- chartType: n.type,
105
+ value: c,
106
+ chartType: r.type,
107
107
  values: i,
108
+ expressionValues: s,
108
109
  formattedValues: a,
109
110
  layer: t
110
- }), n;
111
+ }), r;
111
112
  }
112
113
  return null;
113
114
  }).filter((o) => o != null) ?? [];
114
115
  }
115
116
  _setImageValue(e) {
116
- const t = this.fieldInfoMap ?? /* @__PURE__ */ new Map(), { value: i, formattedValues: a, layer: r } = e, { linkURL: o, sourceURL: n } = i;
117
- if (n) {
118
- const s = z(n, r);
117
+ const t = this.fieldInfoMap ?? /* @__PURE__ */ new Map(), { value: i, formattedValues: a, layer: n } = e, { linkURL: s, sourceURL: o } = i;
118
+ if (o) {
119
+ const r = z(o, n);
119
120
  i.sourceURL = X({
120
121
  formattedValues: a,
121
- template: s,
122
+ template: r,
122
123
  fieldInfoMap: t
123
124
  });
124
125
  }
125
- if (o) {
126
- const s = z(o, r);
126
+ if (s) {
127
+ const r = z(s, n);
127
128
  i.linkURL = X({
128
129
  formattedValues: a,
129
- template: s,
130
+ template: r,
130
131
  fieldInfoMap: t
131
132
  });
132
133
  }
133
134
  }
134
135
  _setChartValue(e) {
135
- const { value: t, values: i, formattedValues: a, chartType: r, layer: o } = e, { popupTemplate: n, relatedInfos: s } = this, { fields: c, normalizeField: v } = t, d = o;
136
- if (t.fields = ie(c, d), v && (t.normalizeField = E(v, d)), !c.some((u) => !!(a[u] != null || A(u) && s?.size)))
136
+ const { value: t, values: i, expressionValues: a, formattedValues: n, chartType: s, layer: o } = e, { popupTemplate: r, relatedInfos: c } = this, { fields: m, normalizeField: d } = t, l = o;
137
+ if (t.fields = ae(m, l), d && (t.normalizeField = E(d, l)), !m.some((f) => !!(n[f] != null || A(f) && c?.size)))
137
138
  return;
138
- const h = n?.fieldInfos ?? [];
139
- t.series = [], c.forEach((u, f) => {
140
- const m = t.colors?.[f];
141
- if (A(u)) {
139
+ const u = r?.fieldInfos ?? [];
140
+ t.series = [], m.forEach((f, h) => {
141
+ const g = t.colors?.[h];
142
+ if (A(f)) {
142
143
  t.series = [
143
144
  ...t.series,
144
- ...this._getRelatedChartInfos({ fieldInfos: h, fieldName: u, formattedValues: a, chartType: r, value: t, color: m })
145
+ ...this._getRelatedChartInfos({
146
+ fieldInfos: u,
147
+ fieldName: f,
148
+ formattedValues: n,
149
+ expressionValues: a,
150
+ chartType: s,
151
+ value: t,
152
+ color: g
153
+ })
145
154
  ];
146
155
  return;
147
156
  }
148
- const p = this._getChartOption({
157
+ const x = this._getChartOption({
149
158
  value: t,
150
159
  values: i,
151
- chartType: r,
152
- formattedValues: a,
153
- fieldName: u,
154
- fieldInfos: h,
155
- color: m
160
+ chartType: s,
161
+ formattedValues: n,
162
+ expressionValues: a,
163
+ fieldName: f,
164
+ fieldInfos: u,
165
+ color: g
156
166
  });
157
- t.series.push(p);
167
+ t.series.push(x);
158
168
  });
159
169
  }
160
170
  _getRelatedChartInfos(e) {
161
- const { fieldInfos: t, fieldName: i, formattedValues: a, chartType: r, value: o, color: n } = e, s = [], c = $(i), v = c && this.relatedInfos?.get(c.layerId);
162
- if (!v)
163
- return s;
164
- const { relatedFeatures: d, relation: l } = v;
165
- if (!l || !d)
166
- return s;
167
- const { cardinality: h } = l;
168
- return d.forEach((f) => {
169
- const m = f.attributes;
170
- m && Object.keys(m).forEach((p) => {
171
- p === c.fieldName && s.push(this._getChartOption({
172
- value: o,
173
- values: m,
171
+ const { fieldInfos: t, fieldName: i, formattedValues: a, chartType: n, value: s, color: o, expressionValues: r } = e, c = [], m = $(i), d = m && this.relatedInfos?.get(m.layerId);
172
+ if (!d)
173
+ return c;
174
+ const { relatedFeatures: l, relation: p } = d;
175
+ if (!p || !l)
176
+ return c;
177
+ const { cardinality: u } = p;
178
+ return l.forEach((h) => {
179
+ const g = h.attributes;
180
+ g && Object.keys(g).forEach((x) => {
181
+ x === m.fieldName && c.push(this._getChartOption({
182
+ value: s,
183
+ values: g,
174
184
  formattedValues: a,
185
+ expressionValues: r,
175
186
  fieldName: i,
176
- chartType: r,
177
- relatedFieldName: p,
178
- hasMultipleRelatedFeatures: d?.length > 1,
187
+ chartType: n,
188
+ relatedFieldName: x,
189
+ hasMultipleRelatedFeatures: l?.length > 1,
179
190
  fieldInfos: t,
180
- color: n
191
+ color: o
181
192
  }));
182
193
  });
183
- }), h && (h === "one-to-many" || h === "many-to-many") ? s : [s[0]];
194
+ }), u && (u === "one-to-many" || u === "many-to-many") ? c : [c[0]];
184
195
  }
185
196
  _getTooltip({ label: e, value: t, chartType: i }) {
186
197
  return i === "pie-chart" ? `${e}` : `${e}: ${t}`;
187
198
  }
188
199
  _getChartOption(e) {
189
- const { value: t, values: i, formattedValues: a, fieldName: r, relatedFieldName: o, fieldInfos: n, chartType: s, hasMultipleRelatedFeatures: c, color: v } = e, { layer: d, graphic: l } = this, h = this.fieldInfoMap ?? /* @__PURE__ */ new Map(), { normalizeField: u, tooltipField: f } = t, m = u ? A(u) ? i[$(u).fieldName] : i[u] : null, p = ae(r) && a?.[r] !== void 0 ? a[r] : o && i[o] !== void 0 ? i[o] : i[r] !== void 0 ? i[r] : a[r], I = p === void 0 ? null : p && m && typeof p == "number" && typeof m == "number" ? p / m : p, _ = re(n, r), g = E(r, d), C = (f && a[f] !== void 0 ? a[f] : Y({
190
- fieldInfo: _ || new ee({ fieldName: g }),
200
+ const { value: t, values: i, formattedValues: a, expressionValues: n, fieldName: s, relatedFieldName: o, fieldInfos: r, chartType: c, hasMultipleRelatedFeatures: m, color: d } = e, { layer: l, graphic: p } = this, u = this.fieldInfoMap ?? /* @__PURE__ */ new Map(), { normalizeField: f, tooltipField: h } = t, g = f ? A(f) ? i[$(f).fieldName] : i[f] : null, x = re(s) && n?.[s] !== void 0 ? n[s] : o && i[o] !== void 0 ? i[o] : i[s] !== void 0 ? i[s] : a[s], I = x === void 0 ? null : x && g && typeof x == "number" && typeof g == "number" ? x / g : x, v = ne(r, s), M = E(s, l), b = (h && a[h] !== void 0 ? a[h] : Y({
201
+ fieldInfo: v || new te({ fieldName: M }),
191
202
  expressionInfos: this.popupTemplate?.expressionInfos,
192
- graphic: l,
193
- layer: d
194
- })) ?? "", b = a[g] ?? "", L = I != null ? typeof I == "number" ? I : Number(I) : null;
195
- if (A(r)) {
196
- const T = h.get(r.toLowerCase()), P = f ? h.get(f.toLowerCase()) : null, U = T?.fieldName ?? r, F = c && f ? $(f).fieldName : P?.fieldName ?? f, H = (c && F ? i[F] : a[F] ?? (T && Y({ fieldInfo: T, layer: d, graphic: l })) ?? T?.fieldName ?? o) ?? "", D = (c && o ? i[o] : a[U]) ?? "";
197
- return new N({
198
- fieldName: r,
203
+ graphic: p,
204
+ layer: l
205
+ })) ?? "", P = a[M] ?? "", L = I != null ? typeof I == "number" ? I : Number(I) : null;
206
+ if (A(s)) {
207
+ const T = u.get(s.toLowerCase()), U = h ? u.get(h.toLowerCase()) : null, H = T?.fieldName ?? s, F = m && h ? $(h).fieldName : U?.fieldName ?? h, D = (m && F ? i[F] : a[F] ?? (T && Y({ fieldInfo: T, layer: l, graphic: p })) ?? T?.fieldName ?? o) ?? "", O = (m && o ? i[o] : a[H]) ?? "";
208
+ return new V({
209
+ fieldName: s,
199
210
  tooltip: this._getTooltip({
200
- label: H,
201
- value: D,
202
- chartType: s
211
+ label: D,
212
+ value: O,
213
+ chartType: c
203
214
  }),
204
- color: v,
215
+ color: d,
205
216
  value: L
206
217
  });
207
218
  }
208
- return new N({
209
- fieldName: r,
219
+ return new V({
220
+ fieldName: s,
210
221
  tooltip: this._getTooltip({
211
- label: C,
212
- value: b,
213
- chartType: s
222
+ label: b,
223
+ value: P,
224
+ chartType: c
214
225
  }),
215
- color: v,
226
+ color: d,
216
227
  value: L
217
228
  });
218
229
  }
@@ -230,10 +241,10 @@ class ue extends J {
230
241
  const { color: e } = await import("@amcharts/amcharts5/index.js"), t = /* @__PURE__ */ new Map(), i = this._getRenderer(), a = "default";
231
242
  if (!i)
232
243
  return t;
233
- const r = await K(i);
234
- return r.delete(a), Array.from(r.values()).every((n) => n?.length === 1) && Array.from(r.keys()).forEach((n) => {
235
- const s = r.get(n)?.[0]?.toCss(!0);
236
- s && t.set(n, e(s));
244
+ const n = await J(i);
245
+ return n.delete(a), Array.from(n.values()).every((o) => o?.length === 1) && Array.from(n.keys()).forEach((o) => {
246
+ const r = n.get(o)?.[0]?.toCss(!0);
247
+ r && t.set(o, e(r));
237
248
  }), t;
238
249
  }
239
250
  async _createChart(e) {
@@ -254,47 +265,47 @@ class ue extends J {
254
265
  return !this.chartAnimationDisabled && !this._prefersReducedMotion;
255
266
  }
256
267
  _getChartAnimationMS() {
257
- return this._canAnimateChart() ? le : 0;
268
+ return this._canAnimateChart() ? ce : 0;
258
269
  }
259
270
  _getChartSeriesAnimationMS() {
260
- return this._canAnimateChart() ? ce : 0;
271
+ return this._canAnimateChart() ? de : 0;
261
272
  }
262
273
  async _customizeChartTooltip(e, t = "horizontal") {
263
274
  const { color: i } = await import("@amcharts/amcharts5/index.js");
264
275
  e.setAll({
265
276
  pointerOrientation: t
266
277
  }), e.get("background")?.setAll({
267
- stroke: i(se)
278
+ stroke: i(le)
268
279
  }), e.label.setAll({
269
280
  direction: this._direction,
270
281
  oversizedBehavior: "wrap",
271
- maxWidth: de
282
+ maxWidth: ue
272
283
  });
273
284
  }
274
285
  async _createPieChart(e, t) {
275
- const [{ Tooltip: i }, { PieChart: a, PieSeries: r }] = await Promise.all([
286
+ const [{ Tooltip: i }, { PieChart: a, PieSeries: n }] = await Promise.all([
276
287
  import("@amcharts/amcharts5/index.js"),
277
288
  import("@amcharts/amcharts5/percent.js")
278
- ]), { mediaInfo: o, root: n } = e, { title: s } = o, c = 5, v = o?.altText || o?.title || "", d = n.container.children.push(a.new(n, {
289
+ ]), { mediaInfo: s, root: o } = e, { title: r } = s, c = 5, m = s?.altText || s?.title || "", d = o.container.children.push(a.new(o, {
279
290
  role: "figure",
280
- ariaLabel: v,
291
+ ariaLabel: m,
281
292
  focusable: !0,
282
293
  paddingBottom: c,
283
294
  paddingTop: c,
284
295
  paddingLeft: c,
285
296
  paddingRight: c
286
297
  })), l = `{category}: {valuePercentTotal.formatNumber('0.00')}%
287
- ({value})`, h = i.new(n, {
298
+ ({value})`, p = i.new(o, {
288
299
  labelText: l
289
- }), u = d.series.push(r.new(n, {
290
- name: s,
300
+ }), u = d.series.push(n.new(o, {
301
+ name: r,
291
302
  valueField: w,
292
- categoryField: M,
293
- tooltip: h
303
+ categoryField: C,
304
+ tooltip: p
294
305
  }));
295
306
  u.ticks.template.set("forceHidden", !0), u.labels.template.set("forceHidden", !0), u.slices.template.states.create("active", {
296
307
  shiftRadius: c
297
- }), this._customizeChartTooltip(h), u.slices.template.setAll({
308
+ }), this._customizeChartTooltip(p), u.slices.template.setAll({
298
309
  ariaLabel: l,
299
310
  focusable: !0,
300
311
  templateField: "columnSettings"
@@ -305,140 +316,140 @@ class ue extends J {
305
316
  return e.forEach((i) => t = Math.min(i.value, t)), t;
306
317
  }
307
318
  async _createColumnChart(e, t, i) {
308
- const [{ Tooltip: a, Scrollbar: r }, { CategoryAxis: o, AxisRendererX: n, AxisRendererY: s, ValueAxis: c, ColumnSeries: v }] = await Promise.all([import("@amcharts/amcharts5/index.js"), import("@amcharts/amcharts5/xy.js")]), { mediaInfo: d, root: l } = t, { value: h, title: u } = d, { _direction: f } = this;
319
+ const [{ Tooltip: a, Scrollbar: n }, { CategoryAxis: s, AxisRendererX: o, AxisRendererY: r, ValueAxis: c, ColumnSeries: m }] = await Promise.all([import("@amcharts/amcharts5/index.js"), import("@amcharts/amcharts5/xy.js")]), { mediaInfo: d, root: l } = t, { value: p, title: u } = d, { _direction: f } = this;
309
320
  e.setAll({
310
321
  wheelX: "panX",
311
322
  wheelY: "zoomX"
312
323
  });
313
- const m = e.xAxes.push(o.new(l, {
314
- renderer: n.new(l, {
324
+ const h = e.xAxes.push(s.new(l, {
325
+ renderer: o.new(l, {
315
326
  inversed: f === "rtl"
316
327
  }),
317
- categoryField: M
328
+ categoryField: C
318
329
  }));
319
- m.get("renderer").labels.template.setAll({
330
+ h.get("renderer").labels.template.setAll({
320
331
  forceHidden: !0
321
332
  });
322
- const p = e.yAxes.push(c.new(l, {
323
- renderer: s.new(l, { inside: !1 }),
324
- min: this._getMinSeriesValue(h.series)
333
+ const g = e.yAxes.push(c.new(l, {
334
+ renderer: r.new(l, { inside: !1 }),
335
+ min: this._getMinSeriesValue(p.series)
325
336
  }));
326
- p.get("renderer").labels.template.setAll({
337
+ g.get("renderer").labels.template.setAll({
327
338
  direction: f
328
339
  });
329
- const I = "{categoryX}", _ = a.new(l, {
330
- labelText: I
331
- }), g = e.series.push(v.new(l, {
340
+ const x = "{categoryX}", I = a.new(l, {
341
+ labelText: x
342
+ }), v = e.series.push(m.new(l, {
332
343
  name: u,
333
- xAxis: m,
334
- yAxis: p,
344
+ xAxis: h,
345
+ yAxis: g,
335
346
  valueYField: w,
336
- categoryXField: M,
337
- tooltip: _
347
+ categoryXField: C,
348
+ tooltip: I
338
349
  }));
339
- this._customizeChartTooltip(_), g.columns.template.setAll({
340
- ariaLabel: I,
350
+ this._customizeChartTooltip(I), v.columns.template.setAll({
351
+ ariaLabel: x,
341
352
  focusable: !0,
342
353
  templateField: "columnSettings"
343
- }), h.series.length > k && e.set("scrollbarX", r.new(l, {
354
+ }), p.series.length > k && e.set("scrollbarX", n.new(l, {
344
355
  orientation: "horizontal"
345
- })), m.data.setAll(i), g.data.setAll(i), g.appear(this._getChartSeriesAnimationMS()), e.appear(this._getChartAnimationMS());
356
+ })), h.data.setAll(i), v.data.setAll(i), v.appear(this._getChartSeriesAnimationMS()), e.appear(this._getChartAnimationMS());
346
357
  }
347
358
  async _createBarChart(e, t, i) {
348
- const [{ Tooltip: a, Scrollbar: r }, { CategoryAxis: o, AxisRendererX: n, AxisRendererY: s, ValueAxis: c, ColumnSeries: v }] = await Promise.all([import("@amcharts/amcharts5/index.js"), import("@amcharts/amcharts5/xy.js")]), { mediaInfo: d, root: l } = t, { value: h, title: u } = d, { _direction: f } = this;
359
+ const [{ Tooltip: a, Scrollbar: n }, { CategoryAxis: s, AxisRendererX: o, AxisRendererY: r, ValueAxis: c, ColumnSeries: m }] = await Promise.all([import("@amcharts/amcharts5/index.js"), import("@amcharts/amcharts5/xy.js")]), { mediaInfo: d, root: l } = t, { value: p, title: u } = d, { _direction: f } = this;
349
360
  e.setAll({
350
361
  wheelX: "panY",
351
362
  wheelY: "zoomY"
352
363
  });
353
- const m = e.yAxes.push(o.new(l, {
354
- renderer: s.new(l, {
364
+ const h = e.yAxes.push(s.new(l, {
365
+ renderer: r.new(l, {
355
366
  inversed: !0
356
367
  }),
357
- categoryField: M
368
+ categoryField: C
358
369
  }));
359
- m.get("renderer").labels.template.setAll({
370
+ h.get("renderer").labels.template.setAll({
360
371
  forceHidden: !0
361
372
  });
362
- const p = e.xAxes.push(c.new(l, {
363
- renderer: n.new(l, {
373
+ const g = e.xAxes.push(c.new(l, {
374
+ renderer: o.new(l, {
364
375
  inside: !1,
365
376
  inversed: f === "rtl"
366
377
  }),
367
- min: this._getMinSeriesValue(h.series)
378
+ min: this._getMinSeriesValue(p.series)
368
379
  }));
369
- p.get("renderer").labels.template.setAll({
380
+ g.get("renderer").labels.template.setAll({
370
381
  direction: f
371
382
  });
372
- const I = "{categoryY}", _ = a.new(l, {
373
- labelText: I
374
- }), g = e.series.push(v.new(l, {
383
+ const x = "{categoryY}", I = a.new(l, {
384
+ labelText: x
385
+ }), v = e.series.push(m.new(l, {
375
386
  name: u,
376
- xAxis: p,
377
- yAxis: m,
387
+ xAxis: g,
388
+ yAxis: h,
378
389
  valueXField: w,
379
- categoryYField: M,
380
- tooltip: _
390
+ categoryYField: C,
391
+ tooltip: I
381
392
  }));
382
- this._customizeChartTooltip(_, "vertical"), g.columns.template.setAll({
383
- ariaLabel: I,
393
+ this._customizeChartTooltip(I, "vertical"), v.columns.template.setAll({
394
+ ariaLabel: x,
384
395
  focusable: !0,
385
396
  templateField: "columnSettings"
386
- }), h.series.length > k && e.set("scrollbarY", r.new(l, {
397
+ }), p.series.length > k && e.set("scrollbarY", n.new(l, {
387
398
  orientation: "vertical"
388
- })), m.data.setAll(i), g.data.setAll(i), g.appear(this._getChartSeriesAnimationMS()), e.appear(this._getChartAnimationMS());
399
+ })), h.data.setAll(i), v.data.setAll(i), v.appear(this._getChartSeriesAnimationMS()), e.appear(this._getChartAnimationMS());
389
400
  }
390
401
  async _createLineChart(e, t, i) {
391
- const [{ Tooltip: a, Scrollbar: r }, { CategoryAxis: o, AxisRendererX: n, AxisRendererY: s, ValueAxis: c, LineSeries: v }] = await Promise.all([import("@amcharts/amcharts5/index.js"), import("@amcharts/amcharts5/xy.js")]), { root: d, mediaInfo: l } = t, { value: h, title: u } = l, { _direction: f } = this;
402
+ const [{ Tooltip: a, Scrollbar: n }, { CategoryAxis: s, AxisRendererX: o, AxisRendererY: r, ValueAxis: c, LineSeries: m }] = await Promise.all([import("@amcharts/amcharts5/index.js"), import("@amcharts/amcharts5/xy.js")]), { root: d, mediaInfo: l } = t, { value: p, title: u } = l, { _direction: f } = this;
392
403
  e.setAll({
393
404
  wheelX: "panX",
394
405
  wheelY: "zoomX"
395
406
  });
396
- const m = e.xAxes.push(o.new(d, {
397
- renderer: n.new(d, {
407
+ const h = e.xAxes.push(s.new(d, {
408
+ renderer: o.new(d, {
398
409
  inversed: f === "rtl"
399
410
  }),
400
- categoryField: M
411
+ categoryField: C
401
412
  }));
402
- m.get("renderer").labels.template.setAll({
413
+ h.get("renderer").labels.template.setAll({
403
414
  forceHidden: !0
404
415
  });
405
- const p = e.yAxes.push(c.new(d, {
406
- renderer: s.new(d, { inside: !1 }),
407
- min: this._getMinSeriesValue(h.series)
416
+ const g = e.yAxes.push(c.new(d, {
417
+ renderer: r.new(d, { inside: !1 }),
418
+ min: this._getMinSeriesValue(p.series)
408
419
  }));
409
- p.get("renderer").labels.template.setAll({
420
+ g.get("renderer").labels.template.setAll({
410
421
  direction: f
411
422
  });
412
- const I = "{categoryX}", _ = i[0]?.lineSettings?.stroke, g = a.new(d, {
413
- getFillFromSprite: !_,
414
- labelText: I
423
+ const x = "{categoryX}", I = i[0]?.lineSettings?.stroke, v = a.new(d, {
424
+ getFillFromSprite: !I,
425
+ labelText: x
415
426
  });
416
- _ && g.get("background")?.setAll({
417
- fill: _
427
+ I && v.get("background")?.setAll({
428
+ fill: I
418
429
  });
419
- const C = e.series.push(v.new(d, {
430
+ const M = e.series.push(m.new(d, {
420
431
  name: u,
421
- xAxis: m,
422
- yAxis: p,
432
+ xAxis: h,
433
+ yAxis: g,
423
434
  valueYField: w,
424
- categoryXField: M,
425
- tooltip: g
435
+ categoryXField: C,
436
+ tooltip: v
426
437
  }));
427
- C.strokes.template.setAll({
438
+ M.strokes.template.setAll({
428
439
  templateField: "lineSettings"
429
- }), this._customizeChartTooltip(g, "vertical"), h.series.length > k && e.set("scrollbarX", r.new(d, {
440
+ }), this._customizeChartTooltip(v, "vertical"), p.series.length > k && e.set("scrollbarX", n.new(d, {
430
441
  orientation: "horizontal"
431
- })), m.data.setAll(i), C.data.setAll(i), C.appear(this._getChartSeriesAnimationMS()), e.appear(this._getChartAnimationMS());
442
+ })), h.data.setAll(i), M.data.setAll(i), M.appear(this._getChartSeriesAnimationMS()), e.appear(this._getChartAnimationMS());
432
443
  }
433
444
  async _createXYChart(e, t) {
434
- const { XYChart: i, XYCursor: a } = await import("@amcharts/amcharts5/xy.js"), { root: r, mediaInfo: o } = e, { type: n } = o, s = o?.altText || o?.title || "", c = r.container.children.push(i.new(r, {
445
+ const { XYChart: i, XYCursor: a } = await import("@amcharts/amcharts5/xy.js"), { root: n, mediaInfo: s } = e, { type: o } = s, r = s?.altText || s?.title || "", c = n.container.children.push(i.new(n, {
435
446
  role: "figure",
436
- ariaLabel: s,
447
+ ariaLabel: r,
437
448
  focusable: !0,
438
449
  panX: !0,
439
450
  panY: !0
440
451
  }));
441
- c.set("cursor", a.new(r, {})), n === "column-chart" && await this._createColumnChart(c, e, t), n === "bar-chart" && await this._createBarChart(c, e, t), n === "line-chart" && await this._createLineChart(c, e, t), c.root.dom.classList.toggle("chart-rendered", !0);
452
+ c.set("cursor", a.new(n, {})), o === "column-chart" && await this._createColumnChart(c, e, t), o === "bar-chart" && await this._createBarChart(c, e, t), o === "line-chart" && await this._createLineChart(c, e, t), c.root.dom.classList.toggle("chart-rendered", !0);
442
453
  }
443
454
  _clearMediaRefreshTimer() {
444
455
  const { _refreshTimer: e } = this;
@@ -459,24 +470,24 @@ class ue extends J {
459
470
  _setRefreshTimeout(e) {
460
471
  const { refreshInterval: t, value: i } = e, a = t * 6e4;
461
472
  this._updateMediaInfoTimestamp(i.sourceURL);
462
- const r = window.setInterval(() => {
473
+ const n = window.setInterval(() => {
463
474
  this._updateMediaInfoTimestamp(i.sourceURL);
464
475
  }, a);
465
- this._refreshTimer = r;
476
+ this._refreshTimer = n;
466
477
  }
467
478
  _getImageSource(e, t) {
468
- const i = e.includes("?") ? "&" : "?", [a, r = ""] = e.split("#");
469
- return `${a}${i}timestamp=${t}${r ? "#" : ""}${r}`;
479
+ const i = e.includes("?") ? "&" : "?", [a, n = ""] = e.split("#");
480
+ return `${a}${i}timestamp=${t}${n ? "#" : ""}${n}`;
470
481
  }
471
482
  _updateChartElement(e) {
472
483
  this._chartRoot?.dispose(), this._chartRoot = void 0, e && this._createChart(e);
473
484
  }
474
485
  render() {
475
- return x`<div class="root" @keyup=${this._handleMediaKeyup}><arcgis-feature-element-info .heading=${this.heading} .description=${this.description} .headingLevel=${this.headingLevel}></arcgis-feature-element-info>${this._renderMedia()}</div>`;
486
+ return _`<div class="root" @keyup=${this._handleMediaKeyup}><arcgis-feature-element-info .heading=${this.heading} .description=${this.description} .headingLevel=${this.headingLevel}></arcgis-feature-element-info>${this._renderMedia()}</div>`;
476
487
  }
477
488
  _renderMedia() {
478
489
  const { formattedMediaInfoCount: e, activeMediaInfoIndex: t } = this, i = this._renderMediaText();
479
- return e ? x`<div class="container">${this._renderMediaInfo()}<div class="item-navigation">${i}${e > 1 ? x`<div class="pagination">${this._renderMediaPageButton("previous")}<span class="pagination-text">${Q(this.messages?.pageText ?? "", {
490
+ return e ? _`<div class="container">${this._renderMediaInfo()}<div class="item-navigation">${i}${e > 1 ? _`<div class="pagination">${this._renderMediaPageButton("previous")}<span class="pagination-text">${Z(this.messages?.pageText ?? "", {
480
491
  index: t + 1,
481
492
  total: e
482
493
  })}</span>${this._renderMediaPageButton("next")}</div>` : null}</div></div>` : null;
@@ -485,18 +496,18 @@ class ue extends J {
485
496
  const { activeMediaInfo: e } = this;
486
497
  if (!e)
487
498
  return null;
488
- const t = e?.title ? x`<div class="item-title" .innerHTML=${V.sanitize(e.title) ?? ""}></div>` : null, i = e?.caption ? x`<div class="item-caption" .innerHTML=${V.sanitize(e.caption) ?? ""}></div>` : null;
489
- return t || i ? x`<div class="item-text">${t}${i}</div>` : null;
499
+ const t = e?.title ? _`<div class="item-title" .innerHTML=${N.sanitize(e.title) ?? ""}></div>` : null, i = e?.caption ? _`<div class="item-caption" .innerHTML=${N.sanitize(e.caption) ?? ""}></div>` : null;
500
+ return t || i ? _`<div class="item-text">${t}${i}</div>` : null;
490
501
  }
491
502
  _renderImageMediaInfo(e) {
492
503
  if (!e.value)
493
504
  return null;
494
- const { _refreshIntervalInfo: t } = this, { value: i, refreshInterval: a, altText: r, title: o } = e, { sourceURL: n, linkURL: s } = i, v = ne(s ?? void 0) ? "_blank" : "_self", d = v === "_blank" ? "noreferrer" : "", l = a ? t : null, h = l ? l.sourceURL : n, u = x`<img alt=${(r || o) ?? y} src=${h ?? void 0 ?? y}>`;
495
- return (s ? x`<a href=${s ?? y} rel=${d ?? y} target=${v ?? y} title=${o ?? y}>${u}</a>` : null) ?? u;
505
+ const { _refreshIntervalInfo: t } = this, { value: i, refreshInterval: a, altText: n, title: s } = e, { sourceURL: o, linkURL: r } = i, m = se(r ?? void 0) ? "_blank" : "_self", d = m === "_blank" ? "noreferrer" : "", l = a ? t : null, p = l ? l.sourceURL : o, u = _`<img alt=${(n || s) ?? y} src=${p ?? void 0 ?? y}>`;
506
+ return (r ? _`<a href=${r ?? y} rel=${d ?? y} target=${m ?? y} title=${s ?? y}>${u}</a>` : null) ?? u;
496
507
  }
497
508
  _renderChartMediaInfo(e) {
498
509
  const { activeMediaInfoIndex: t, formattedMediaInfoCount: i } = this;
499
- return j(`media-${e.type}-${t}-${i}`, x`<div class="chart" ${W(this._updateChartElement)}></div>`);
510
+ return G(`media-${e.type}-${t}-${i}`, _`<div class="chart" ${j(this._updateChartElement)}></div>`);
500
511
  }
501
512
  _renderMediaInfoType() {
502
513
  const { activeMediaInfo: e } = this;
@@ -504,16 +515,16 @@ class ue extends J {
504
515
  }
505
516
  _renderMediaInfo() {
506
517
  const { activeMediaInfo: e } = this;
507
- return e ? x`<div class="item-container"><div class="item">${this._renderMediaInfoType()}</div></div>` : null;
518
+ return e ? _`<div class="item-container"><div class="item">${this._renderMediaInfoType()}</div></div>` : null;
508
519
  }
509
520
  _renderMediaPageButton(e) {
510
521
  if (this.formattedMediaInfoCount < 2)
511
522
  return null;
512
- const t = e === "previous", i = t ? this.messages?.previous ?? "" : this.messages?.next ?? "", a = t ? "chevron-left" : "chevron-right", r = t ? this.previous : this.next;
513
- return x`<button .ariaLabel=${i} class="pagination-button" @click=${r} tabindex=0 title=${i ?? y} type=button><calcite-icon flip-rtl class="pagination-icon" .icon=${a} scale=s></calcite-icon></button>`;
523
+ const t = e === "previous", i = t ? this.messages?.previous ?? "" : this.messages?.next ?? "", a = t ? "chevron-left" : "chevron-right", n = t ? this.previous : this.next;
524
+ return _`<button .ariaLabel=${i} class="pagination-button" @click=${n} tabindex=0 title=${i ?? y} type=button><calcite-icon flip-rtl class="pagination-icon" .icon=${a} scale=s></calcite-icon></button>`;
514
525
  }
515
526
  async _renderChart(e) {
516
- const { root: t, mediaInfo: i } = e, { value: a, type: r } = i, [{ default: o }, { default: n }, { default: s }, { esriChartColorSet: c }, { ColorSet: v, Theme: d }] = await Promise.all([
527
+ const { root: t, mediaInfo: i } = e, { value: a, type: n } = i, [{ default: s }, { default: o }, { default: r }, { esriChartColorSet: c }, { ColorSet: m, Theme: d }] = await Promise.all([
517
528
  import("@amcharts/amcharts5/themes/Animated.js"),
518
529
  import("@amcharts/amcharts5/themes/Dark.js"),
519
530
  import("@amcharts/amcharts5/themes/Responsive.js"),
@@ -521,28 +532,28 @@ class ue extends J {
521
532
  import("@amcharts/amcharts5/index.js")
522
533
  ]), l = d.new(t);
523
534
  l.rule("ColorSet").set("colors", c), l.rule("ColorSet").set("reuse", !0);
524
- const h = [s.new(t), l];
525
- te(this.el) === "dark" && h.push(n.new(t)), this._canAnimateChart() && h.push(o.new(t)), t.setThemes(h);
526
- const u = await this._getRendererColors(), f = await this._getSeriesColors(a.series), m = v.new(t, {}), p = f.get(a.series[0]), I = p ? {
535
+ const p = [r.new(t), l];
536
+ ie(this.el) === "dark" && p.push(o.new(t)), this._canAnimateChart() && p.push(s.new(t)), t.setThemes(p);
537
+ const u = await this._getRendererColors(), f = await this._getSeriesColors(a.series), h = m.new(t, {}), g = f.get(a.series[0]), x = g ? {
527
538
  lineSettings: {
528
- stroke: p
539
+ stroke: g
529
540
  }
530
- } : void 0, _ = a.series.map((g, C) => {
531
- const b = f.get(g) || u.get(g.fieldName) || m.getIndex(C);
541
+ } : void 0, I = a.series.map((v, M) => {
542
+ const b = f.get(v) || u.get(v.fieldName) || h.getIndex(M);
532
543
  return {
533
- [M]: g.tooltip,
534
- [w]: g.value,
544
+ [C]: v.tooltip,
545
+ [w]: v.value,
535
546
  columnSettings: {
536
547
  fill: b,
537
548
  stroke: b
538
549
  },
539
- ...I
550
+ ...x
540
551
  };
541
- }).filter((g) => r === "pie-chart" ? g.value != null && g.value > 0 : !0);
542
- r === "pie-chart" ? this._createPieChart(e, _) : this._createXYChart(e, _);
552
+ }).filter((v) => n === "pie-chart" ? v.value != null && v.value > 0 : !0);
553
+ n === "pie-chart" ? this._createPieChart(e, I) : this._createXYChart(e, I);
543
554
  }
544
555
  }
545
- O("arcgis-feature-media", ue);
556
+ B("arcgis-feature-media", he);
546
557
  export {
547
- ue as ArcgisFeatureMedia
558
+ he as ArcgisFeatureMedia
548
559
  };