@arcgis/lumina-compiler 4.34.0-next.44 → 4.34.0-next.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { externalizeDependencies as ds, path as u, toSystemPathSeparators as ee, retrievePackageJson as N, fetchPackageLocation as _e, asyncRetrievePackageJson as He, existsAsync as U, findPath as ps, toPosixPathSeparators as Le, isPosix as Ri, getCwd as Mi } from "@arcgis/components-build-utils";
1
+ import { externalizeDependencies as ds, path as u, toSystemPathSeparators as ee, retrievePackageJson as j, fetchPackageLocation as _e, asyncRetrievePackageJson as He, existsAsync as U, findPath as ps, toPosixPathSeparators as Le, isPosix as Ri, getCwd as Mi } from "@arcgis/components-build-utils";
2
2
  import us from "vite-plugin-dts";
3
3
  import o from "typescript";
4
- import { f as w, l as C } from "./logger-KpGU2b3R.js";
5
- import { getMemberName as Q, apiMemberToSynthesizedComments as X, globalPackageIdentifier as Oi, setApiDocFromJsDoc as ue, ApiExtractor as ms, hasIgnoredModifier as fs, symbolToDocs as Kt, setDefaultFromInitializer as Wt, multipleJsDocTags as ys, findDecorator as Bt, isApiMethod as gs, isApiProperty as hs } from "@arcgis/api-extractor";
6
- import { isNotUndefined as R, mappedFind as ye, camelToKebab as wt, kebabToPascal as vs, uncapitalize as ut, identity as Ji, Deferred as Ss, getPreamble as bs, capitalize as ws } from "@arcgis/components-utils";
7
- import { readdir as Ue, readFile as J, rm as Ts, mkdir as z, cp as Es, writeFile as F, copyFile as Cs } from "node:fs/promises";
4
+ import { f as b, l as C } from "./logger-KpGU2b3R.js";
5
+ import { getMemberName as X, apiMemberToSynthesizedComments as V, globalPackageIdentifier as Oi, setApiDocFromJsDoc as ue, ApiExtractor as ms, hasIgnoredModifier as fs, symbolToDocs as Kt, setDefaultFromInitializer as Wt, multipleJsDocTags as gs, findDecorator as Bt, isApiMethod as ys, isApiProperty as hs } from "@arcgis/api-extractor";
6
+ import { isNotUndefined as R, mappedFind as ge, camelToKebab as bt, kebabToPascal as vs, uncapitalize as ut, identity as Ji, Deferred as Ss, getPreamble as ws, capitalize as bs } from "@arcgis/components-utils";
7
+ import { readdir as Ue, readFile as J, rm as Ts, mkdir as Q, cp as Es, writeFile as D, copyFile as Cs } from "node:fs/promises";
8
8
  import { lazyMetaSubItemJoiner as $s, lazyMetaItemJoiner as Ye, lazyMetaGroupJoiner as Ps, propertyFlagAttribute as _t, propertyFlagReflect as xs, propertyFlagBoolean as ks, propertyFlagNumber as As, propertyFlagState as Is, propertyFlagReadOnly as Ls, propertyFlagNoAccessor as Fs } from "@arcgis/lumina/config";
9
9
  import { build as Ns } from "esbuild";
10
10
  import { glob as Ds } from "glob";
@@ -36,7 +36,7 @@ function Js(e, t, i) {
36
36
  c === s.length - 1 ? r[""] ??= e : (r[a] ??= {}, r = r[a]);
37
37
  }), r[""];
38
38
  }
39
- function ge(e, t, i) {
39
+ function ye(e, t, i) {
40
40
  if (!e.startsWith(t))
41
41
  return e;
42
42
  const n = e.slice(t.length), s = Ks(n, i);
@@ -55,7 +55,7 @@ function Ks(e, t) {
55
55
  return e;
56
56
  }
57
57
  const Ws = ({ filePath: e, content: t }, i) => {
58
- const n = e.startsWith(i.dir.distComponents) ? ge(
58
+ const n = e.startsWith(i.dir.distComponents) ? ye(
59
59
  Bi(i.dir.distComponents, e),
60
60
  i.dir.distComponents,
61
61
  i
@@ -83,12 +83,12 @@ const Bs = -1, _s = -2, Hs = /["']\.\.?\/[^'"]+/gu, _i = (e, t, i, n) => e.repla
83
83
  const r = s.slice(1);
84
84
  if (!r.startsWith("./") && !r.startsWith("../"))
85
85
  return s;
86
- const a = u.join(n, r), c = !r.endsWith(".js") && !r.split("/").at(-1).includes(".") ? Bi(t.dir.distComponents, a, "") : a, l = ge(c, t.dir.distComponents, t);
86
+ const a = u.join(n, r), c = !r.endsWith(".js") && !r.split("/").at(-1).includes(".") ? Bi(t.dir.distComponents, a, "") : a, l = ye(c, t.dir.distComponents, t);
87
87
  if (i === n && a === l)
88
88
  return s;
89
- const d = te(i, l);
89
+ const d = oe(i, l);
90
90
  return `${s[0]}${d}`;
91
- }), te = (e, t) => {
91
+ }), oe = (e, t) => {
92
92
  const i = u.relative(e, t);
93
93
  return i.startsWith(".") ? i : `.${u.sep}${i}`;
94
94
  };
@@ -203,7 +203,7 @@ ${e.content}`
203
203
  const t = e.content.match(ir)?.[1] ?? e.content.match(nr)?.[1];
204
204
  if (t !== void 0)
205
205
  throw Error(
206
- w(
206
+ b(
207
207
  "@arcgis/lumina:failOnJsonImport",
208
208
  `Found a .json import (${t}). This can cause TypeScript errors for consumers of your package. See alternative options: https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2047
209
209
  File content:
@@ -217,7 +217,7 @@ ${e.content}
217
217
  return e;
218
218
  }, ir = /^import (?:type \* as )?[^"'\n]+["'](\.[^\n]*?\.json)["'];$/mu, nr = /(?<![.\w\d-])import\(['"]([\w@\-/\\.]+)\.json['"]\)/u;
219
219
  function sr(e, t) {
220
- const i = Q(t.name);
220
+ const i = X(t.name);
221
221
  return e.members.find((n) => n.name === i);
222
222
  }
223
223
  function rr(e, t, i) {
@@ -322,23 +322,23 @@ function fr(e, t, i, n) {
322
322
  ).statements[0].members[0];
323
323
  return [d.name, d.type];
324
324
  }
325
- const yr = (e, t) => t.apiModule === void 0 ? e.statements : e.statements.map((i) => gr(i, e, t));
326
- function gr(e, t, i) {
325
+ const gr = (e, t) => t.apiModule === void 0 ? e.statements : e.statements.map((i) => yr(i, e, t));
326
+ function yr(e, t, i) {
327
327
  if (o.isClassDeclaration(e)) {
328
328
  const n = e, s = n.name?.text, r = i.apiModule.declarations.find(
329
- (y) => y.name === s && "customElement" in y
329
+ (g) => g.name === s && "customElement" in g
330
330
  );
331
331
  if (r === void 0)
332
332
  return e;
333
333
  const a = [], c = /* @__PURE__ */ new Set(), l = [], d = [];
334
334
  mt = void 0;
335
- for (let y = 0; y < n.members.length; y++) {
336
- const g = n.members[y], h = hr(g, r, l, c, t);
337
- h === void 0 ? a.push(g) : Array.isArray(h) ? d.push(...h) : (o.setEmitFlags(h, o.EmitFlags.NoComments), d.push(h));
335
+ for (let g = 0; g < n.members.length; g++) {
336
+ const y = n.members[g], h = hr(y, r, l, c, t);
337
+ h === void 0 ? a.push(y) : Array.isArray(h) ? d.push(...h) : (o.setEmitFlags(h, o.EmitFlags.NoComments), d.push(h));
338
338
  }
339
- c.size > 0 && a.forEach((y) => {
340
- const g = Q(y.name);
341
- g !== void 0 && c.has(g) && d.push(Sr(y));
339
+ c.size > 0 && a.forEach((g) => {
340
+ const y = X(g.name);
341
+ y !== void 0 && c.has(y) && d.push(Sr(g));
342
342
  }), l.length > 0 && d.push(mr(l, t, i.compiler));
343
343
  const p = o.factory.updateClassDeclaration(
344
344
  n,
@@ -349,13 +349,13 @@ function gr(e, t, i) {
349
349
  * Drop interfaces from public typings
350
350
  * See https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2016#issuecomment-5144903
351
351
  */
352
- n.heritageClauses?.filter((y) => y.token !== o.SyntaxKind.ImplementsKeyword),
352
+ n.heritageClauses?.filter((g) => g.token !== o.SyntaxKind.ImplementsKeyword),
353
353
  d
354
354
  ), m = [];
355
355
  if (r.description && m.push(r.description), r.privacy === void 0) {
356
- for (const y of r.demos ?? [])
357
- if (y.description === "Docs") {
358
- m.push(`[Read more...](${y.url})`);
356
+ for (const g of r.demos ?? [])
357
+ if (g.description === "Docs") {
358
+ m.push(`[Read more...](${g.url})`);
359
359
  break;
360
360
  }
361
361
  }
@@ -364,14 +364,14 @@ function gr(e, t, i) {
364
364
  `);
365
365
  return o.setEmitFlags(p, o.EmitFlags.NoComments), o.setSyntheticLeadingComments(
366
366
  p,
367
- X({ ...r, description: f })
367
+ V({ ...r, description: f })
368
368
  ), p;
369
369
  } else
370
370
  return e;
371
371
  }
372
372
  let mt;
373
373
  function hr(e, t, i, n, s) {
374
- const r = Q(e.name);
374
+ const r = X(e.name);
375
375
  if (r === void 0)
376
376
  return;
377
377
  const a = t.members.find((l) => l.name === r);
@@ -388,10 +388,10 @@ function hr(e, t, i, n, s) {
388
388
  Xt(e.modifiers),
389
389
  e.name,
390
390
  void 0,
391
- br(e.type, s),
391
+ wr(e.type, s),
392
392
  e.initializer
393
393
  );
394
- return o.setSyntheticLeadingComments(d, X(l)), d;
394
+ return o.setSyntheticLeadingComments(d, V(l)), d;
395
395
  }
396
396
  return;
397
397
  }
@@ -405,7 +405,7 @@ function hr(e, t, i, n, s) {
405
405
  Vt(n, e.type, s),
406
406
  e.initializer
407
407
  );
408
- return o.setSyntheticLeadingComments(l, X(a)), l;
408
+ return o.setSyntheticLeadingComments(l, V(a)), l;
409
409
  } else if (a.getterType !== void 0) {
410
410
  const l = Gt.exec(a.getterType.text)?.groups;
411
411
  if (l === void 0)
@@ -439,7 +439,7 @@ function hr(e, t, i, n, s) {
439
439
  ),
440
440
  void 0
441
441
  );
442
- return o.setSyntheticLeadingComments(m, X(a)), [
442
+ return o.setSyntheticLeadingComments(m, V(a)), [
443
443
  m,
444
444
  o.factory.createSetAccessorDeclaration(
445
445
  d,
@@ -449,7 +449,7 @@ function hr(e, t, i, n, s) {
449
449
  )
450
450
  ];
451
451
  } else
452
- return Vt(n, e.type, s), o.setSyntheticLeadingComments(e, X(a)), e;
452
+ return Vt(n, e.type, s), o.setSyntheticLeadingComments(e, V(a)), e;
453
453
  else if (o.isGetAccessor(e) || o.isSetAccessor(e)) {
454
454
  if (o.isSetAccessor(e)) {
455
455
  if (a.readonly === !0)
@@ -461,9 +461,9 @@ function hr(e, t, i, n, s) {
461
461
  isRequired: a.docsTags?.some((f) => f.name === "required") ?? !1
462
462
  });
463
463
  }
464
- return c !== r && o.setSyntheticLeadingComments(e, X(a)), e;
464
+ return c !== r && o.setSyntheticLeadingComments(e, V(a)), e;
465
465
  } else if (o.isMethodDeclaration(e))
466
- return o.setSyntheticLeadingComments(e, X(a)), e;
466
+ return o.setSyntheticLeadingComments(e, V(a)), e;
467
467
  }
468
468
  const Gt = /^typeof this\.(?<accessor>[^.]+)\.(?<boundProperty>[^.]+)$/u;
469
469
  function Vt(e, t, i) {
@@ -528,7 +528,7 @@ function ke(e) {
528
528
  )
529
529
  ];
530
530
  }
531
- function br(e, t) {
531
+ function wr(e, t) {
532
532
  if (e === void 0)
533
533
  return;
534
534
  const i = o.isImportTypeNode(e) && e.qualifier && o.isIdentifier(e.qualifier) && e.qualifier.escapedText === "EventEmitter" ? e.typeArguments ?? [] : o.isTypeReferenceNode(e) && o.isIdentifier(e.typeName) && e.typeName.escapedText === "EventEmitter" ? e.typeArguments ?? [] : void 0;
@@ -541,7 +541,7 @@ function br(e, t) {
541
541
  t.fileName
542
542
  ), e);
543
543
  }
544
- const wr = [cr, yr], Qt = "@arcgis/lumina:componentDtsTransformer";
544
+ const br = [cr, gr], Qt = "@arcgis/lumina:componentDtsTransformer";
545
545
  function Tr(e) {
546
546
  let t;
547
547
  const i = Er(e);
@@ -555,7 +555,7 @@ function Tr(e) {
555
555
  return [];
556
556
  const s = e.typeScriptProgram.getSourceFile(n);
557
557
  if (s === void 0)
558
- throw Error(w(Qt, `Could not find source file: ${ee(n)}`));
558
+ throw Error(b(Qt, `Could not find source file: ${ee(n)}`));
559
559
  const r = [];
560
560
  return e.typeScriptProgram.emit(
561
561
  s,
@@ -573,7 +573,7 @@ function Tr(e) {
573
573
  };
574
574
  }
575
575
  const Er = (e) => (t) => (i) => zi(e, t, i, [
576
- ...wr,
576
+ ...br,
577
577
  ...e.options.types?.declarationAstTransformers ?? []
578
578
  ]), Cr = (e) => new Proxy(e, {
579
579
  get: $r,
@@ -705,7 +705,7 @@ const kr = "Fragment", et = "DynamicHtmlTag", tt = "DynamicSvgTag", Re = Symbol(
705
705
  "exportParts",
706
706
  "hreflang",
707
707
  "media"
708
- ]), yt = {
708
+ ]), gt = {
709
709
  button: /* @__PURE__ */ new Set(["popoverTarget"]),
710
710
  input: /* @__PURE__ */ new Set(["list", "capture"]),
711
711
  iframe: /* @__PURE__ */ new Set(["sandbox"]),
@@ -1912,7 +1912,7 @@ const Yr = tn({ removeComments: !0 }), it = me.createTextWriter(`
1912
1912
  `), rn = o.TypeFormatFlags.NoTruncation | o.TypeFormatFlags.WriteArrayAsGenericType | o.TypeFormatFlags.SuppressAnyReturnType | o.TypeFormatFlags.MultilineObjectLiterals, eo = rn & o.TypeFormatFlags.NodeBuilderFlagsMask, to = eo | o.NodeBuilderFlags.IgnoreErrors | o.NodeBuilderFlags.NoTruncation;
1913
1913
  function io(e, t, i, n = !0) {
1914
1914
  const s = /* @__PURE__ */ new Map();
1915
- se(t, s, i, n);
1915
+ ne(t, s, i, n);
1916
1916
  const r = t.flags & o.TypeFlags.Union ? t.types.every(oi) : oi(t), a = e.typeToTypeNode(
1917
1917
  t,
1918
1918
  void 0,
@@ -1929,33 +1929,33 @@ function ai(e, t, i, n, s = !0) {
1929
1929
  return;
1930
1930
  const f = p ? d.aliasTypeArguments?.[0]?.symbol?.escapedName ?? "" : m.name;
1931
1931
  if (f.startsWith("_")) {
1932
- const g = m.declarations?.[0];
1933
- if (g?.kind === o.SyntaxKind.FunctionType) {
1934
- const h = g;
1932
+ const y = m.declarations?.[0];
1933
+ if (y?.kind === o.SyntaxKind.FunctionType) {
1934
+ const h = y;
1935
1935
  if (h.parameters.forEach((v) => {
1936
1936
  if (v.type === void 0)
1937
1937
  return;
1938
1938
  const S = e.getTypeFromTypeNode(v.type);
1939
- se(S, /* @__PURE__ */ new Map(), c, !1);
1939
+ ne(S, /* @__PURE__ */ new Map(), c, !1);
1940
1940
  }), h.type !== void 0) {
1941
1941
  const v = e.getTypeFromTypeNode(h.type);
1942
- se(v, /* @__PURE__ */ new Map(), c, !1);
1942
+ ne(v, /* @__PURE__ */ new Map(), c, !1);
1943
1943
  }
1944
1944
  }
1945
1945
  return;
1946
1946
  }
1947
1947
  if (a.has(f))
1948
1948
  return;
1949
- const y = p ? {
1949
+ const g = p ? {
1950
1950
  name: f,
1951
1951
  package: void 0,
1952
1952
  module: "index.js"
1953
1953
  } : so(m, f, i, n);
1954
- r.push(y), a.add(f);
1954
+ r.push(g), a.add(f);
1955
1955
  }
1956
1956
  return { typeNode: io(e, t, c, s), references: r };
1957
1957
  }
1958
- function se(e, t, i, n = !0) {
1958
+ function ne(e, t, i, n = !0) {
1959
1959
  if (typeof e != "object" || e === null || !("checker" in e))
1960
1960
  return;
1961
1961
  const s = e;
@@ -1966,7 +1966,7 @@ function se(e, t, i, n = !0) {
1966
1966
  i?.(s, r);
1967
1967
  const a = s.origin;
1968
1968
  if (r || !n)
1969
- t.set(s, { origin: void 0, aliasSymbol: void 0, aliasTypeArguments: void 0 }), se(a, t, i, n);
1969
+ t.set(s, { origin: void 0, aliasSymbol: void 0, aliasTypeArguments: void 0 }), ne(a, t, i, n);
1970
1970
  else {
1971
1971
  const c = s.aliasSymbol, l = s.aliasTypeArguments;
1972
1972
  a !== void 0 && (s.origin = void 0), c !== void 0 && (s.aliasSymbol = void 0), l !== void 0 && (s.aliasTypeArguments = void 0), t.set(s, {
@@ -1980,7 +1980,7 @@ function se(e, t, i, n = !0) {
1980
1980
  * These properties are pointing at types that don't appear in the
1981
1981
  * formatted string, so we are not interested
1982
1982
  */
1983
- c !== "resolvedBaseConstructorType" && c !== "resolvedBaseTypes" && c !== "typeParameters" && c !== "typeParameter" && (Array.isArray(l) ? l.forEach((d) => se(d, t, i, n)) : se(l, t, i, n));
1983
+ c !== "resolvedBaseConstructorType" && c !== "resolvedBaseTypes" && c !== "typeParameters" && c !== "typeParameter" && (Array.isArray(l) ? l.forEach((d) => ne(d, t, i, n)) : ne(l, t, i, n));
1984
1984
  });
1985
1985
  }
1986
1986
  function no(e, t) {
@@ -2027,7 +2027,7 @@ function ro(e, t) {
2027
2027
  }
2028
2028
  const s = e.split("/dist/");
2029
2029
  if (s.length > 1) {
2030
- const a = s.slice(0, -1).join("/"), l = N(a).name, d = s.at(-1);
2030
+ const a = s.slice(0, -1).join("/"), l = j(a).name, d = s.at(-1);
2031
2031
  return { packageName: l, moduleName: d };
2032
2032
  }
2033
2033
  return {
@@ -2064,7 +2064,7 @@ function ci(e, t, i) {
2064
2064
  function li(e, t, i) {
2065
2065
  const n = e.jsDoc?.[0];
2066
2066
  if (n !== void 0)
2067
- return ye([n, ...n.tags ?? []], ({ comment: s }) => {
2067
+ return ge([n, ...n.tags ?? []], ({ comment: s }) => {
2068
2068
  if (i === "typescript" && typeof s == "string") {
2069
2069
  const r = s.indexOf("[MDN Reference](");
2070
2070
  if (r === -1)
@@ -2072,7 +2072,7 @@ function li(e, t, i) {
2072
2072
  const a = r + 16, c = s.indexOf(")", a);
2073
2073
  return c === -1 ? void 0 : s.slice(a, c);
2074
2074
  } else if (i === "core" && Array.isArray(s))
2075
- return ye(s, (r) => {
2075
+ return ge(s, (r) => {
2076
2076
  if (!o.isJSDocLinkLike(r))
2077
2077
  return;
2078
2078
  const a = r.getText(t);
@@ -2090,18 +2090,18 @@ function po(e) {
2090
2090
  }
2091
2091
  return t.length === 0 ? void 0 : t;
2092
2092
  }
2093
- const uo = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, mo = /\n\s+\*? ?/gu, fo = ["css", "less", "sass", "scss", "styl", "stylus", "pcss", "postcss", "sss"], Oe = new RegExp(`\\.(${fo.join("|")})(\\?|$)`, "u"), yo = /^import ["'](?<specifier>[^"']+)["'];$/gmu, go = () => "throwError", V = "@arcgis/lumina:loadLitCss", Z = "?layered", Fe = "?global";
2093
+ const uo = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, mo = /\n\s+\*? ?/gu, fo = ["css", "less", "sass", "scss", "styl", "stylus", "pcss", "postcss", "sss"], Oe = new RegExp(`\\.(${fo.join("|")})(\\?|$)`, "u"), go = /^import ["'](?<specifier>[^"']+)["'];$/gmu, yo = () => "throwError", G = "@arcgis/lumina:loadLitCss", Z = "?layered", Fe = "?global";
2094
2094
  let di = !1;
2095
2095
  const ho = (e) => ({
2096
- name: V,
2096
+ name: G,
2097
2097
  enforce: "pre",
2098
2098
  configResolved(t) {
2099
2099
  const i = t.plugins.find(({ name: s }) => s === "vite:css-post");
2100
2100
  if (i === void 0)
2101
- throw Error(w(V, "Unable to find the vite's built-in vite:css-post plugin"));
2101
+ throw Error(b(G, "Unable to find the vite's built-in vite:css-post plugin"));
2102
2102
  const n = i.transform;
2103
2103
  if (typeof n != "function")
2104
- throw Error(w(V, "Expected vite:css-post to declare a transform() function"));
2104
+ throw Error(b(G, "Expected vite:css-post to declare a transform() function"));
2105
2105
  i.transform = async function(r, a) {
2106
2106
  const c = a.endsWith(Z);
2107
2107
  c && (a = a.slice(0, -Z.length));
@@ -2109,12 +2109,12 @@ const ho = (e) => ({
2109
2109
  if (l && (a = a.slice(0, -Fe.length)), !Oe.test(a) || a.includes("?"))
2110
2110
  return await n.call(this, r, a);
2111
2111
  const d = `${a}?inline`, p = await n.call(this, r, d), { code: m, ...f } = typeof p == "string" ? { code: p } : p ?? {};
2112
- if (!di && (a.endsWith(".sass") || a.endsWith(".scss")) && !("sass-embedded" in (N().devDependencies ?? {})) && !("sass" in (N().devDependencies ?? {})) && (di = !0, C.warn(
2113
- V,
2112
+ if (!di && (a.endsWith(".sass") || a.endsWith(".scss")) && !("sass-embedded" in (j().devDependencies ?? {})) && !("sass" in (j().devDependencies ?? {})) && (di = !0, C.warn(
2113
+ G,
2114
2114
  "Going forward, using .sass and .scss syntax requires having `sass-embedded` dependency installed. Alternatively, consider migrating from .scss to modern .css syntax. See https://qawebgis.esri.com/components/lumina/styling#introduction"
2115
2115
  )), typeof m != "string" || !m.startsWith(an) || !m.endsWith(cn))
2116
2116
  return C.warn(
2117
- V,
2117
+ G,
2118
2118
  `Expected vite:css-post to return a JS module with a string literal. Received: ${JSON.stringify(
2119
2119
  m
2120
2120
  )}`
@@ -2122,27 +2122,27 @@ const ho = (e) => ({
2122
2122
  if (l)
2123
2123
  return e._globalCssString = ln(m), { code: "", map: { mappings: "" } };
2124
2124
  {
2125
- const y = e.isFullApiExtraction ? po(r) : void 0;
2126
- if (y !== void 0) {
2127
- e._cssDocs ??= /* @__PURE__ */ new Map(), e._cssDocs.set(a, y);
2128
- const g = e._cssImports.get(a);
2129
- if (g !== void 0) {
2125
+ const g = e.isFullApiExtraction ? po(r) : void 0;
2126
+ if (g !== void 0) {
2127
+ e._cssDocs ??= /* @__PURE__ */ new Map(), e._cssDocs.set(a, g);
2128
+ const y = e._cssImports.get(a);
2129
+ if (y !== void 0) {
2130
2130
  for (const h of e.apiJsonComponents)
2131
- if (g.has(h.tagName))
2131
+ if (y.has(h.tagName))
2132
2132
  if (h.cssProperties === void 0)
2133
- h.cssProperties = Array.from(y);
2133
+ h.cssProperties = Array.from(g);
2134
2134
  else {
2135
2135
  const v = new Set(h.cssProperties.map((S) => S.name));
2136
2136
  h.cssProperties = [
2137
2137
  ...h.cssProperties,
2138
- ...y.filter((S) => !v.has(S.name))
2138
+ ...g.filter((S) => !v.has(S.name))
2139
2139
  ];
2140
2140
  }
2141
2141
  }
2142
2142
  }
2143
2143
  return {
2144
2144
  ...f,
2145
- code: wo(m, e.hmrEnabled, e.shouldMinify, c),
2145
+ code: bo(m, e.hmrEnabled, e.shouldMinify, c),
2146
2146
  /**
2147
2147
  * Vite's original transform does not generate source maps for inlined
2148
2148
  * css, thus we can't either
@@ -2158,15 +2158,15 @@ const ho = (e) => ({
2158
2158
  let s = 0;
2159
2159
  const r = co(i);
2160
2160
  let a = !1;
2161
- const c = t.replaceAll(yo, (l, d) => {
2161
+ const c = t.replaceAll(go, (l, d) => {
2162
2162
  if (!Oe.test(d) || d.includes("?"))
2163
2163
  return l;
2164
2164
  if (r) {
2165
- if ((e.options.css?.sideEffectImportHandling ?? go)(d, i) === "drop")
2165
+ if ((e.options.css?.sideEffectImportHandling ?? yo)(d, i) === "drop")
2166
2166
  return a = !0, ar(l);
2167
2167
  throw Error(
2168
- w(
2169
- V,
2168
+ b(
2169
+ G,
2170
2170
  `Found a side-effect CSS import \`${l}\`. Such import is not allowed as it won't work with shadow DOM. This file appears to be external so such import may not be under your control. To ignore this import, please set the css.sideEffectImportHandling property in useLumina() plugin to a function that will return "drop" for this import to indicate that you wish to have this style import dropped. Then, you would have to import the dropped manually in your component like so: \`import { styles } from "example.css";\` and then add \`static override styles = styles;\` to your component`,
2171
2171
  i
2172
2172
  )
@@ -2189,8 +2189,8 @@ const ho = (e) => ({
2189
2189
  if (d.endsWith(Fe))
2190
2190
  return l;
2191
2191
  throw Error(
2192
- w(
2193
- V,
2192
+ b(
2193
+ G,
2194
2194
  `Found a side-effect CSS import \`${l}\`. Such import is not allowed as it won't work with shadow DOM. Please use \`import { styles } from "example.css";\` instead and then add \`static override styles = styles;\` to your component`,
2195
2195
  i
2196
2196
  )
@@ -2202,7 +2202,7 @@ const ho = (e) => ({
2202
2202
  map: null
2203
2203
  } : void 0;
2204
2204
  }
2205
- }), an = 'export default "', cn = '"', vo = "import { css } from '@lit/reactive-element/css-tag.js';\nexport const styles = css`", So = "`;\nexport default styles;", bo = `
2205
+ }), an = 'export default "', cn = '"', vo = "import { css } from '@lit/reactive-element/css-tag.js';\nexport const styles = css`", So = "`;\nexport default styles;", wo = `
2206
2206
 
2207
2207
  if(import.meta.hot) {
2208
2208
  import.meta.hot.data.styles ??= styles;
@@ -2214,11 +2214,11 @@ if(import.meta.hot) {
2214
2214
  import.meta.hot.data.styles.styleSheet.replaceSync(nextExports.styles.cssText);
2215
2215
  });
2216
2216
  }`, ln = (e) => e.slice(an.length, -cn.length);
2217
- function wo(e, t, i, n) {
2217
+ function bo(e, t, i, n) {
2218
2218
  const r = ln(e).replaceAll('\\"', '"'), a = Nr(To(r)), c = n ? `@layer{${i ? "" : `
2219
2219
  `}${a}${i ? "" : `
2220
2220
  `}}` : a;
2221
- return `${vo}${c}${So}${t ? bo : ""}`;
2221
+ return `${vo}${c}${So}${t ? wo : ""}`;
2222
2222
  }
2223
2223
  const To = (e) => e.replaceAll("\\r", "").replaceAll("\\n", `
2224
2224
  `), Eo = (e, t) => e.endsWith(".mdx") || e.includes(".stories.") || e.includes(".story.") || e.startsWith(`${t.dir.root}stories/`);
@@ -2236,7 +2236,7 @@ function ko(e) {
2236
2236
  const t = e.options.css?.globalStylesPath;
2237
2237
  if (t === void 0)
2238
2238
  return "";
2239
- const i = te(e.dir.src, t);
2239
+ const i = oe(e.dir.src, t);
2240
2240
  return e.viteCommand === "serve" || e.isInStorybook ? [
2241
2241
  `import globalStyles from "${i}${Z}";`,
2242
2242
  "document.adoptedStyleSheets = [...document.adoptedStyleSheets, globalStyles.styleSheet!];",
@@ -2267,15 +2267,12 @@ const Io = (e) => `${e._globalHydratedCssString}${e.shouldMinify ? "" : `
2267
2267
  `}${e._globalCssString ? JSON.parse(`"${e._globalCssString}"`) : ""}`;
2268
2268
  function Lo(e) {
2269
2269
  const t = [], i = [];
2270
- for (const s of e.privateApiJson.modules) {
2271
- t.push(s.path);
2272
- for (const r of s.declarations)
2273
- "customElement" in r && i.push(No(r, e, s.path));
2270
+ for (const n of e.privateApiJson.modules) {
2271
+ t.push(n.path);
2272
+ for (const s of n.declarations)
2273
+ "customElement" in s && i.push(No(s, e, n.path));
2274
2274
  }
2275
2275
  return [
2276
- // Deprecated feature will be dropped in https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2765
2277
- // eslint-disable-next-line @typescript-eslint/no-deprecated
2278
- e.viteCommand === "build" && e.options.build?.ssr?.stencilCompatibility?.enabled === !0 ? 'import "@lit-labs/ssr-client/lit-element-hydrate-support.js";' : "",
2279
2276
  'import { runtime } from "./runtime";',
2280
2277
  'import { makeDefineCustomElements } from "@arcgis/lumina";',
2281
2278
  ko(e),
@@ -2304,7 +2301,7 @@ function Do(e) {
2304
2301
  }
2305
2302
  function un(e) {
2306
2303
  const t = e.members.filter((r) => r.kind === "field").map((r) => {
2307
- const a = typeof r.attribute == "string", c = a && r.attribute !== wt(r.name);
2304
+ const a = typeof r.attribute == "string", c = a && r.attribute !== bt(r.name);
2308
2305
  return a && !c ? [r.name] : [r.name, c ? String(r.attribute) : ""];
2309
2306
  }), i = e.members.filter(
2310
2307
  (r) => r.kind === "method" && /**
@@ -2365,7 +2362,7 @@ function Ko(e, t, i, n) {
2365
2362
  const m = s.getTypeArguments(p)?.at(0);
2366
2363
  if (m === void 0)
2367
2364
  continue;
2368
- const f = Me(s, m, n, i.dir), y = {
2365
+ const f = Me(s, m, n, i.dir), g = {
2369
2366
  name: t,
2370
2367
  summary: void 0,
2371
2368
  description: void 0,
@@ -2378,7 +2375,7 @@ function Ko(e, t, i, n) {
2378
2375
  composed: void 0,
2379
2376
  privacy: void 0
2380
2377
  };
2381
- return ue(e.name, s, y), Wo(e, y, n), y.privacy === void 0 ? y : void 0;
2378
+ return ue(e.name, s, g), Wo(e, g, n), g.privacy === void 0 ? g : void 0;
2382
2379
  }
2383
2380
  }
2384
2381
  const Ae = "createEvent";
@@ -2392,29 +2389,29 @@ function Wo(e, t, i) {
2392
2389
  if (s !== void 0) {
2393
2390
  if (!o.isObjectLiteralExpression(s))
2394
2391
  throw Error(
2395
- w(
2392
+ b(
2396
2393
  "@arcgis/lumina:extractEventMeta",
2397
2394
  `Expected object literal expression as first argument of ${Ae}(). Found ${t.name} = createEvent(${s.getText(i)})`
2398
2395
  )
2399
2396
  );
2400
2397
  if (s.properties.some((r) => o.isSpreadAssignment(r)))
2401
2398
  throw Error(
2402
- w(
2399
+ b(
2403
2400
  "@arcgis/lumina:extractEventMeta",
2404
2401
  `Unexpected spread syntax in ${Ae}() argument. ${Ae}() arguments must be statically parsable at compile time`
2405
2402
  )
2406
2403
  );
2407
2404
  for (const r of s.properties)
2408
- !o.isPropertyAssignment(r) || !o.isIdentifier(r.name) || (r.name.text === "cancelable" && !re(r.initializer, i) && (t.cancelable = !1), r.name.text === "bubbles" && !re(r.initializer, i) && (t.bubbles = !1), r.name.text === "composed" && !re(r.initializer, i) && (t.composed = !1));
2405
+ !o.isPropertyAssignment(r) || !o.isIdentifier(r.name) || (r.name.text === "cancelable" && !se(r.initializer, i) && (t.cancelable = !1), r.name.text === "bubbles" && !se(r.initializer, i) && (t.bubbles = !1), r.name.text === "composed" && !se(r.initializer, i) && (t.composed = !1));
2409
2406
  }
2410
2407
  }
2411
- function re(e, t) {
2408
+ function se(e, t) {
2412
2409
  if (e.kind === o.SyntaxKind.TrueKeyword)
2413
2410
  return !0;
2414
2411
  if (e.kind === o.SyntaxKind.FalseKeyword)
2415
2412
  return !1;
2416
2413
  throw Error(
2417
- w(
2414
+ b(
2418
2415
  "@arcgis/lumina:extractBooleanInitializer",
2419
2416
  `Expected boolean literal. Instead found ${e?.getText(t)}`
2420
2417
  )
@@ -2493,7 +2490,7 @@ class Je extends ms {
2493
2490
  }, r = t.heritageClauses?.find((a) => a.token === o.SyntaxKind.ExtendsKeyword)?.types[0]?.expression;
2494
2491
  if (r === void 0)
2495
2492
  throw Error(
2496
- w(
2493
+ b(
2497
2494
  "@arcgis/lumina:extractComponentDeclaration",
2498
2495
  `Lumina component must extend LitElement class. Found ${i} in ${this.apiModule.path} that does not extend any class.`
2499
2496
  )
@@ -2509,10 +2506,10 @@ class Je extends ms {
2509
2506
  const a = Js(n, this.context, this.apiModule.path);
2510
2507
  if (s.importPath = `components/${a}`, this.localCssImports !== void 0) {
2511
2508
  for (const f of this.localCssImports) {
2512
- const y = this.context._cssImports.get(f);
2513
- y === void 0 ? this.context._cssImports.set(f, /* @__PURE__ */ new Set([s.tagName])) : y.add(s.tagName);
2514
- const g = this.context._cssDocs?.get(f);
2515
- g !== void 0 && (s.cssProperties = g);
2509
+ const g = this.context._cssImports.get(f);
2510
+ g === void 0 ? this.context._cssImports.set(f, /* @__PURE__ */ new Set([s.tagName])) : g.add(s.tagName);
2511
+ const y = this.context._cssDocs?.get(f);
2512
+ y !== void 0 && (s.cssProperties = y);
2516
2513
  }
2517
2514
  this.localCssImports = void 0;
2518
2515
  }
@@ -2566,9 +2563,9 @@ console.log("${s.tagName} is ready to go!");
2566
2563
  }
2567
2564
  extractComponentMembers(t) {
2568
2565
  const i = [], n = t.members.length;
2569
- let s, r = t.members[0], a, c = Q(r?.name);
2566
+ let s, r = t.members[0], a, c = X(r?.name);
2570
2567
  for (let l = 0; l < n; l++) {
2571
- if (s = r, r = t.members[l + 1], a = c, c = Q(r?.name), this.pairedSetter !== void 0) {
2568
+ if (s = r, r = t.members[l + 1], a = c, c = X(r?.name), this.pairedSetter !== void 0) {
2572
2569
  this.pairedSetter = void 0;
2573
2570
  continue;
2574
2571
  }
@@ -2598,7 +2595,7 @@ console.log("${s.tagName} is ready to go!");
2598
2595
  }
2599
2596
  let r, a = !1, c = !1;
2600
2597
  for (const d of n)
2601
- !o.isPropertyAssignment(d) || !o.isIdentifier(d.name) || (d.name.text === "attribute" && (o.isStringLiteral(d.initializer) ? r = d.initializer.text : r = re(d.initializer, this.file)), d.name.text === "reflect" && re(d.initializer, this.file) && (a = !0), d.name.text === "readOnly" && re(d.initializer, this.file) && (c = !0), (d.name.text === "type" || d.name.text === "converter") && (r ??= !0));
2598
+ !o.isPropertyAssignment(d) || !o.isIdentifier(d.name) || (d.name.text === "attribute" && (o.isStringLiteral(d.initializer) ? r = d.initializer.text : r = se(d.initializer, this.file)), d.name.text === "reflect" && se(d.initializer, this.file) && (a = !0), d.name.text === "readOnly" && se(d.initializer, this.file) && (c = !0), (d.name.text === "type" || d.name.text === "converter") && (r ??= !0));
2602
2599
  const l = {
2603
2600
  kind: "field",
2604
2601
  name: i,
@@ -2608,7 +2605,7 @@ console.log("${s.tagName} is ready to go!");
2608
2605
  default: void 0,
2609
2606
  deprecated: void 0,
2610
2607
  readonly: c || (s ? t.modifiers?.some((d) => d.kind === o.SyntaxKind.ReadonlyKeyword) : o.isGetAccessor(t) && this.pairedSetter === void 0) ? !0 : void 0,
2611
- attribute: r === !1 ? void 0 : typeof r == "string" ? r : wt(i),
2608
+ attribute: r === !1 ? void 0 : typeof r == "string" ? r : bt(i),
2612
2609
  reflects: a || void 0,
2613
2610
  docsTags: void 0,
2614
2611
  getterType: void 0,
@@ -2640,19 +2637,19 @@ console.log("${s.tagName} is ready to go!");
2640
2637
  i.name === "messageOverrides" ? {
2641
2638
  text: "Record<string, unknown>"
2642
2639
  } : Xr(this.context, d, f, this.file);
2643
- const y = o.isPropertyDeclaration(t) && t.type !== void 0 && t.initializer !== void 0 && o.isPropertyAccessExpression(t.initializer) && o.isPropertyAccessExpression(t.initializer.expression) && t.initializer.expression.expression.kind === o.SyntaxKind.ThisKeyword && o.isIdentifier(t.initializer.expression.name) && o.isIdentifier(t.initializer.name);
2644
- if ("initializer" in t && t.initializer !== void 0 && (!i.default || !i.description) || y) {
2640
+ const g = o.isPropertyDeclaration(t) && t.type !== void 0 && t.initializer !== void 0 && o.isPropertyAccessExpression(t.initializer) && o.isPropertyAccessExpression(t.initializer.expression) && t.initializer.expression.expression.kind === o.SyntaxKind.ThisKeyword && o.isIdentifier(t.initializer.expression.name) && o.isIdentifier(t.initializer.name);
2641
+ if ("initializer" in t && t.initializer !== void 0 && (!i.default || !i.description) || g) {
2645
2642
  const h = t.initializer, v = s.getSymbolAtLocation(h), S = v !== void 0 && ((v.flags ?? 0) & o.SymbolFlags.Alias) !== 0 ? s.getAliasedSymbol(v) : v, T = S?.getDeclarations() ?? [];
2646
2643
  if (S !== void 0) {
2647
2644
  const $ = Kt(s, S);
2648
2645
  if ($.docsTags.length > 0) {
2649
2646
  $.docsTags = $.docsTags.filter(
2650
- (E) => !c.has(E.name) || ys.has(E.name)
2647
+ (E) => !c.has(E.name) || gs.has(E.name)
2651
2648
  );
2652
- const b = i.description;
2649
+ const w = i.description;
2653
2650
  ue(t.name, s, i, $), $.docsTags.forEach((E) => {
2654
2651
  c.add(E.name);
2655
- }), i.description = b ?? i.description;
2652
+ }), i.description = w ?? i.description;
2656
2653
  } else
2657
2654
  i.description ||= $.description;
2658
2655
  }
@@ -2660,9 +2657,9 @@ console.log("${s.tagName} is ready to go!");
2660
2657
  T.forEach(($) => {
2661
2658
  if (x ??= o.isGetAccessor($) ? $ : void 0, L ??= o.isSetAccessor($) ? $ : void 0, !("initializer" in $))
2662
2659
  return;
2663
- const b = $;
2664
- l ||= b.modifiers?.some((E) => E.kind === o.SyntaxKind.ReadonlyKeyword) ?? !1, Wt(b, i, b.getSourceFile());
2665
- }), y && x !== void 0 && L !== void 0 && x.type?.getText() !== L.parameters[0]?.type?.getText() && (i.getterType = { text: `typeof ${h.getText(this.file)}` });
2660
+ const w = $;
2661
+ l ||= w.modifiers?.some((E) => E.kind === o.SyntaxKind.ReadonlyKeyword) ?? !1, Wt(w, i, w.getSourceFile());
2662
+ }), g && x !== void 0 && L !== void 0 && x.type?.getText() !== L.parameters[0]?.type?.getText() && (i.getterType = { text: `typeof ${h.getText(this.file)}` });
2666
2663
  }
2667
2664
  if (l && (i.readonly = !0, n || (i.docsOnlyReadonly = !0)), i.type.values && i.type.values.length > 0 && i.type.values?.every((h) => h.type === "boolean") && (i.default ? m && this.context.viteCommand === "build" && i.deprecated === void 0 && (Je.loggedBooleanWarning || this.context.logLintWarning(
2668
2665
  `Boolean properties should default to "false". Found default value "true" in ${this.apiComponent.name}.${i.name}. See https://qawebgis.esri.com/components/lumina/properties#boolean-properties`
@@ -2808,9 +2805,9 @@ async function Bo(e, t) {
2808
2805
  function _o(e, t, i) {
2809
2806
  const n = e.getSourceFile(t, i), s = mn([n], e, !0), r = s.modules[0];
2810
2807
  {
2811
- const f = fn(s)[0].modules[0], y = e.apiJson.modules.findIndex((v) => v.path === f.path), g = e.apiJson.modules[y], h = Array.from(e.apiJson.modules);
2812
- h.splice(y, 1, f), e.apiJson = { ...e.apiJson, modules: h }, e.apiJsonComponents = e.apiJsonComponents.filter(
2813
- (v) => !g.declarations.includes(v)
2808
+ const f = fn(s)[0].modules[0], g = e.apiJson.modules.findIndex((v) => v.path === f.path), y = e.apiJson.modules[g], h = Array.from(e.apiJson.modules);
2809
+ h.splice(g, 1, f), e.apiJson = { ...e.apiJson, modules: h }, e.apiJsonComponents = e.apiJsonComponents.filter(
2810
+ (v) => !y.declarations.includes(v)
2814
2811
  );
2815
2812
  for (const v of f.declarations)
2816
2813
  "customElement" in v && e.apiJsonComponents.push(v);
@@ -2825,8 +2822,8 @@ function _o(e, t, i) {
2825
2822
  ), m = [];
2826
2823
  for (const f of r.declarations)
2827
2824
  if ("customElement" in f) {
2828
- const g = p.find((h) => h.tagName === f.tagName) === void 0;
2829
- d ||= g, m.push(f);
2825
+ const y = p.find((h) => h.tagName === f.tagName) === void 0;
2826
+ d ||= y, m.push(f);
2830
2827
  }
2831
2828
  return d ||= m.length !== p.length, d ? void 0 : m;
2832
2829
  }
@@ -2912,14 +2909,14 @@ const st = /\{@link ([^}]+)\}/gu, Uo = (e, t) => (i, n) => {
2912
2909
  throw Error(
2913
2910
  `Failed to find which component is referenced by the following link in ${t.name}: ${i}. Make sure the link follows the pattern {@link ComponentClassName} or {@link ComponentClassName#propertyOrMethodOrEventName}.`
2914
2911
  );
2915
- const p = d.demos?.find((g) => g.description === "Docs")?.url;
2912
+ const p = d.demos?.find((y) => y.description === "Docs")?.url;
2916
2913
  if (p === void 0)
2917
2914
  throw Error(
2918
2915
  `Failed to find documentation URL for ${c} in ${t.name}. Make sure the following Lumina configuration option is set: documentation.getComponentDocsUrl`
2919
2916
  );
2920
2917
  if (l === void 0)
2921
2918
  return `[${a || d.name}](${p})`;
2922
- if ((d.members.find((g) => g.name === l) ?? d.events?.find((g) => g.name === l)) === void 0)
2919
+ if ((d.members.find((y) => y.name === l) ?? d.events?.find((y) => y.name === l)) === void 0)
2923
2920
  throw Error(
2924
2921
  `Failed to find ${l} member in ${c}. Found it referenced by the following link in ${t.name}: ${i}. Make sure the link follows the pattern {@link ComponentClassName#propertyOrMethodOrEventName}.`
2925
2922
  );
@@ -2932,7 +2929,7 @@ function zo(e, t, i, n) {
2932
2929
  )), n > 0 && (e.start !== void 0 && (e.start += n), e.end !== void 0 && (e.end += n)), e.package !== void 0)
2933
2930
  return n;
2934
2931
  if (e.module?.startsWith("dist/components/") === !0)
2935
- e.module = ge(e.module, "dist/components/", i);
2932
+ e.module = ye(e.module, "dist/components/", i);
2936
2933
  else if (e.module === "index.js" && e.name) {
2937
2934
  const s = t.get(e.name);
2938
2935
  if (s !== void 0) {
@@ -2960,23 +2957,23 @@ async function Zo(e, t) {
2960
2957
  })
2961
2958
  );
2962
2959
  }
2963
- async function yn(e) {
2960
+ async function gn(e) {
2964
2961
  return ve ??= ea(e), await ve;
2965
2962
  }
2966
2963
  function Yo() {
2967
- if (gt === void 0)
2964
+ if (yt === void 0)
2968
2965
  throw Error(
2969
- w(
2966
+ b(
2970
2967
  "@arcgis/lumina:retrieveComponentDependencies",
2971
2968
  "Component dependencies have not yet been initialized. Await componentDependenciesPromise promise first."
2972
2969
  )
2973
2970
  );
2974
- return gt;
2971
+ return yt;
2975
2972
  }
2976
- function gn() {
2973
+ function yn() {
2977
2974
  if (ht === void 0)
2978
2975
  throw Error(
2979
- w(
2976
+ b(
2980
2977
  "@arcgis/lumina:retrieveFlatComponentDependencies",
2981
2978
  "Component dependencies have not yet been initialized. Await componentDependenciesPromise promise first."
2982
2979
  )
@@ -2984,10 +2981,10 @@ function gn() {
2984
2981
  return ht;
2985
2982
  }
2986
2983
  async function ea(e) {
2987
- const t = N(e), i = t.dependencies ?? {}, n = t.peerDependencies ?? {}, r = (await Promise.all(
2984
+ const t = j(e), i = t.dependencies ?? {}, n = t.peerDependencies ?? {}, r = (await Promise.all(
2988
2985
  [...Object.keys(i), ...Object.keys(n)].filter((a) => !ta.has(a)).flatMap(async (a) => await hn(a, e))
2989
2986
  )).filter(R);
2990
- return gt ??= r, ht = Object.fromEntries(r.flatMap((a) => Object.entries(a.components))), r;
2987
+ return yt ??= r, ht = Object.fromEntries(r.flatMap((a) => Object.entries(a.components))), r;
2991
2988
  }
2992
2989
  const ta = /* @__PURE__ */ new Set([
2993
2990
  "@arcgis/arcade-languageservice",
@@ -3025,11 +3022,11 @@ const ta = /* @__PURE__ */ new Set([
3025
3022
  "vscode-languageserver-textdocument",
3026
3023
  "vscode-languageserver-types"
3027
3024
  ]);
3028
- let gt, ht, ve;
3025
+ let yt, ht, ve;
3029
3026
  async function hn(e, t) {
3030
3027
  const i = await _e(e, t), n = await He(i), s = "exports" in n, r = aa.bind(void 0, s), a = "@stencil/core" in (n.dependencies ?? {}) || "@stencil/core" in (n.devDependencies ?? {}), c = u.join(i, "dist/esm/loader.js");
3031
3028
  if (a ? await U(c) : !1) {
3032
- const y = await J(c, "utf8"), g = ia(y, "bootstrapLazy("), h = y.indexOf(", options", g), v = y.slice(g, h), S = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
3029
+ const g = await J(c, "utf8"), y = ia(g, "bootstrapLazy("), h = g.indexOf(", options", y), v = g.slice(y, h), S = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
3033
3030
  try {
3034
3031
  const T = JSON.parse(S), x = ra(T, { packageName: e, getImportPath: r });
3035
3032
  return { packageName: e, type: "stencil", components: x };
@@ -3040,7 +3037,7 @@ Error: ${String(T)}`);
3040
3037
  }
3041
3038
  const d = ui(n.customElements);
3042
3039
  if (d != null) {
3043
- const y = u.join(i, d), g = JSON.parse(await J(y, "utf-8")), h = na(g), v = vn(g, {
3040
+ const g = u.join(i, d), y = JSON.parse(await J(g, "utf-8")), h = na(y), v = vn(y, {
3044
3041
  packageName: e,
3045
3042
  getImportPath: r
3046
3043
  });
@@ -3048,7 +3045,7 @@ Error: ${String(T)}`);
3048
3045
  }
3049
3046
  const p = ui(n["web-types"]);
3050
3047
  if (p != null) {
3051
- const y = u.join(i, p), g = JSON.parse(await J(y, "utf-8")), h = sa(g, {
3048
+ const g = u.join(i, p), y = JSON.parse(await J(g, "utf-8")), h = sa(y, {
3052
3049
  packageName: e,
3053
3050
  getImportPath: r,
3054
3051
  packageRoot: i
@@ -3057,11 +3054,11 @@ Error: ${String(T)}`);
3057
3054
  }
3058
3055
  const m = u.join(i, "dist/components");
3059
3056
  if (await U(m)) {
3060
- const y = await oa(m, {
3057
+ const g = await oa(m, {
3061
3058
  packageName: e,
3062
3059
  getImportPath: r
3063
3060
  });
3064
- return { type: "unknown", packageName: e, components: y };
3061
+ return { type: "unknown", packageName: e, components: g };
3065
3062
  }
3066
3063
  }
3067
3064
  const ui = (e) => Array.isArray(e) ? e[0] : e;
@@ -3129,7 +3126,7 @@ const na = (e) => e.compiler?.name === kt, sa = (e, t) => Object.fromEntries(
3129
3126
  ];
3130
3127
  })
3131
3128
  ), aa = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, ca = (e) => e.startsWith("/") ? e : `/${e}`, It = (e, t) => `${e}@fs${ca(t)}`;
3132
- function qe(e = N(), t = !1, i = e.name === "@esri/calcite-components") {
3129
+ function qe(e = j(), t = !1, i = e.name === "@esri/calcite-components") {
3133
3130
  const n = e.version.includes("next"), s = e.name === "@esri/calcite-components";
3134
3131
  if (s && n)
3135
3132
  return `https://cdn.jsdelivr.net/npm/@esri/calcite-components@${e.version}/dist/calcite/`;
@@ -3147,9 +3144,9 @@ function da(e, t) {
3147
3144
  }
3148
3145
  return "next";
3149
3146
  }
3150
- const pa = ["keyed", "ref", "repeat", "live"], ae = "staticHtml", Y = "staticSvg", ce = "html", oe = "svg", Sn = Symbol("maybe HTML namespace or maybe SVG"), bn = "css", wn = "mathml", Tn = [bn, ce, wn, ae, Y, oe], ua = new Set(Tn), ma = ["safeClassMap", "safeStyleMap", "deferLoad"], fa = "nothing", ya = [...pa, ...Tn, ...ma, fa], Ke = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e);
3147
+ const pa = ["keyed", "ref", "repeat", "live"], ae = "staticHtml", Y = "staticSvg", ce = "html", re = "svg", Sn = Symbol("maybe HTML namespace or maybe SVG"), wn = "css", bn = "mathml", Tn = [wn, ce, bn, ae, Y, re], ua = new Set(Tn), ma = ["safeClassMap", "safeStyleMap", "deferLoad"], fa = "nothing", ga = [...pa, ...Tn, ...ma, fa], Ke = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e);
3151
3148
  function mi(e, t, i) {
3152
- if (ne(e))
3149
+ if (ie(e))
3153
3150
  return e;
3154
3151
  {
3155
3152
  i === void 0 && t.neededImports.add("nothing");
@@ -3163,18 +3160,18 @@ function mi(e, t, i) {
3163
3160
  );
3164
3161
  }
3165
3162
  }
3166
- function ne(e) {
3163
+ function ie(e) {
3167
3164
  return (
3168
3165
  // Inlined string literal
3169
3166
  typeof e == "string" || // Syntax kinds that are never undefined
3170
- ga.has(e.kind) || // Ternary with both branches never undefined
3171
- o.isConditionalExpression(e) && ne(e.whenTrue) && ne(e.whenFalse) || // Binary expression with operator that never results in undefined Or both sides are definitely not undefined
3172
- o.isBinaryExpression(e) && (ha.has(e.operatorToken.kind) || ne(e.left) && ne(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3173
- (o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && ne(e.expression) || // JSX that got converted to html`<p>Something</p>`
3167
+ ya.has(e.kind) || // Ternary with both branches never undefined
3168
+ o.isConditionalExpression(e) && ie(e.whenTrue) && ie(e.whenFalse) || // Binary expression with operator that never results in undefined Or both sides are definitely not undefined
3169
+ o.isBinaryExpression(e) && (ha.has(e.operatorToken.kind) || ie(e.left) && ie(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3170
+ (o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && ie(e.expression) || // JSX that got converted to html`<p>Something</p>`
3174
3171
  o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && ua.has(e.tag.text)
3175
3172
  );
3176
3173
  }
3177
- const ga = /* @__PURE__ */ new Set([
3174
+ const ya = /* @__PURE__ */ new Set([
3178
3175
  o.SyntaxKind.NumericLiteral,
3179
3176
  o.SyntaxKind.BigIntLiteral,
3180
3177
  o.SyntaxKind.StringLiteral,
@@ -3247,9 +3244,9 @@ const ga = /* @__PURE__ */ new Set([
3247
3244
  p,
3248
3245
  e,
3249
3246
  m ? "" : void 0
3250
- ), g = i === "value" && (n === "input" || n === "textarea" || n === Re) ? wa(f, e) : f;
3251
- if (g !== p)
3252
- return [m ? `.${i}` : s.name, d, g];
3247
+ ), y = i === "value" && (n === "input" || n === "textarea" || n === Re) ? ba(f, e) : f;
3248
+ if (y !== p)
3249
+ return [m ? `.${i}` : s.name, d, y];
3253
3250
  }
3254
3251
  return [`.${i}`, ...c];
3255
3252
  },
@@ -3288,7 +3285,7 @@ const ga = /* @__PURE__ */ new Set([
3288
3285
  throw new Error(
3289
3286
  `Directives prop cannot contain a spread argument - it needs to be statically analyzable. Still, the following are allowed: directives={[directiveA, condition ? a : b, c()]}. Found ${String(t.expression?.getText(e.sourceFile))}`
3290
3287
  );
3291
- return q(e, void 0, s);
3288
+ return z(e, void 0, s);
3292
3289
  });
3293
3290
  },
3294
3291
  ref(e, t) {
@@ -3300,12 +3297,12 @@ const ga = /* @__PURE__ */ new Set([
3300
3297
  );
3301
3298
  return [
3302
3299
  o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [
3303
- q(e, void 0, t.expression)
3300
+ z(e, void 0, t.expression)
3304
3301
  ])
3305
3302
  ];
3306
3303
  },
3307
- class: yi,
3308
- style: yi,
3304
+ class: gi,
3305
+ style: gi,
3309
3306
  key: (e, t) => [Lt(t, e.sourceFile)],
3310
3307
  deferLoad(e, t, i, n) {
3311
3308
  if (typeof n != "string")
@@ -3333,7 +3330,7 @@ function Sa(e, t, i) {
3333
3330
  } else {
3334
3331
  const s = Object.values(B.perElement).map(
3335
3332
  (a) => rt(a, t)
3336
- ), r = ye(s, (a) => a?.type === "stringifiedNonReflected" ? a : void 0) ?? ye(s, (a) => a?.type === "stringifiedReflected" ? a : void 0);
3333
+ ), r = ge(s, (a) => a?.type === "stringifiedNonReflected" ? a : void 0) ?? ge(s, (a) => a?.type === "stringifiedReflected" ? a : void 0);
3337
3334
  if (r !== void 0)
3338
3335
  return r;
3339
3336
  }
@@ -3403,7 +3400,7 @@ function fi(e, t) {
3403
3400
  } else
3404
3401
  return [`=${n}`];
3405
3402
  }
3406
- function yi(e, t, i) {
3403
+ function gi(e, t, i) {
3407
3404
  if (t !== void 0 && o.isStringLiteral(t))
3408
3405
  return [`${i}="${t.text}"`];
3409
3406
  if (t === void 0 || !o.isJsxExpression(t) || t.expression === void 0)
@@ -3411,18 +3408,18 @@ function yi(e, t, i) {
3411
3408
  `${i} prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3412
3409
  );
3413
3410
  const n = t.expression;
3414
- if (ba(n)) {
3411
+ if (wa(n)) {
3415
3412
  const r = i === "class" ? "safeClassMap" : "safeStyleMap";
3416
3413
  e.neededImports.add(r);
3417
3414
  const a = e.importRenames[r], c = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
3418
- q(e, void 0, n)
3415
+ z(e, void 0, n)
3419
3416
  ]);
3420
3417
  return [`${i}=`, c];
3421
3418
  } else
3422
3419
  return [i, ...Ne(e, t, !0)];
3423
3420
  }
3424
- const ba = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3425
- function wa(e, t) {
3421
+ const wa = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3422
+ function ba(e, t) {
3426
3423
  t.neededImports.add("live");
3427
3424
  const i = t.importRenames.live;
3428
3425
  return o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [
@@ -3430,9 +3427,9 @@ function wa(e, t) {
3430
3427
  ]);
3431
3428
  }
3432
3429
  function Ta(e) {
3433
- if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in gi && e.expression.arguments.length <= 1)
3430
+ if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in yi && e.expression.arguments.length <= 1)
3434
3431
  return {
3435
- propType: gi[e.expression.expression.text],
3432
+ propType: yi[e.expression.expression.text],
3436
3433
  // To simplify checking logic in convertProps, wrap expression in JSX expression
3437
3434
  initializer: o.factory.createJsxExpression(
3438
3435
  void 0,
@@ -3441,7 +3438,7 @@ function Ta(e) {
3441
3438
  )
3442
3439
  };
3443
3440
  }
3444
- const gi = {
3441
+ const yi = {
3445
3442
  bindProperty: "property",
3446
3443
  bindAttribute: "attribute",
3447
3444
  bindBooleanAttribute: "booleanAttribute",
@@ -3450,8 +3447,8 @@ const gi = {
3450
3447
  function Ea(e, t, i) {
3451
3448
  return $a.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : (Vi.has(e) || e.includes("-")) && (e !== "itemId" || i !== "arcgis-map" && i !== "arcgis-scene") ? "attribute" : !Pt(i) && (Xi.has(e) || (i === ft ? !1 : i === Re ? (
3452
3449
  // When tag name is dynamic, we can't help but check if the prop name matches an "always attribute" in any html element
3453
- Object.values(yt).some((r) => r.has(e))
3454
- ) : yt[i]?.has(e) === !0)) ? Zt.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === ft || i !== Re && (Ct.has(i) || $t.has(i)) ? e in B.common.reflected || e in B.common.stringifiedReflected || e in B.common.stringifiedNonReflected ? "property" : Zt.has(e) ? "booleanAttribute" : "attribute" : "property";
3450
+ Object.values(gt).some((r) => r.has(e))
3451
+ ) : gt[i]?.has(e) === !0)) ? Zt.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === ft || i !== Re && (Ct.has(i) || $t.has(i)) ? e in B.common.reflected || e in B.common.stringifiedReflected || e in B.common.stringifiedNonReflected ? "property" : Zt.has(e) ? "booleanAttribute" : "attribute" : "property";
3455
3452
  }
3456
3453
  const Ca = ["class", "style", "ref", "directives", "key", "deferLoad"], $a = new Set(Ca), Pa = (e) => typeof e != "string" || e.trim().length > 0;
3457
3454
  function Ge({ key: e, parts: t, litTag: i }, n) {
@@ -3593,8 +3590,8 @@ function La(e, t) {
3593
3590
  const f = p.attributes.properties[m];
3594
3591
  if (f === void 0 || !o.isJsxAttribute(f))
3595
3592
  return t;
3596
- const y = Lt(f.initializer, e.sourceFile), g = Fa(r, n, y, l, e);
3597
- if (g === void 0)
3593
+ const g = Lt(f.initializer, e.sourceFile), y = Fa(r, n, g, l, e);
3594
+ if (y === void 0)
3598
3595
  return t;
3599
3596
  e.liftedKeys.add(f.name), e.neededImports.add("repeat");
3600
3597
  const h = e.importRenames.repeat;
@@ -3602,7 +3599,7 @@ function La(e, t) {
3602
3599
  // From `items.map()` get `items`
3603
3600
  t.expression.expression,
3604
3601
  // (item)=>item.key
3605
- o.factory.createArrowFunction(void 0, void 0, [g], void 0, void 0, y),
3602
+ o.factory.createArrowFunction(void 0, void 0, [y], void 0, void 0, g),
3606
3603
  // Keep arrow as is, but remove the key prop from the JSX element
3607
3604
  o.factory.updateArrowFunction(
3608
3605
  n,
@@ -3694,7 +3691,7 @@ function Da(e, t, i) {
3694
3691
  if (e.every(We, t))
3695
3692
  return t;
3696
3693
  if (o.isIdentifier(t)) {
3697
- const n = o.isBlock(i.body) ? ye(i.body.statements, (r) => ja(r, t)) : void 0;
3694
+ const n = o.isBlock(i.body) ? ge(i.body.statements, (r) => ja(r, t)) : void 0;
3698
3695
  if (n === void 0)
3699
3696
  return;
3700
3697
  const s = xn(n, e);
@@ -3734,7 +3731,7 @@ function Xe(e, t) {
3734
3731
  s = !0;
3735
3732
  return;
3736
3733
  }
3737
- m.docsTags?.some((y) => y.name === "required") ? i.push(p.name) : n.push(p.name);
3734
+ m.docsTags?.some((g) => g.name === "required") ? i.push(p.name) : n.push(p.name);
3738
3735
  });
3739
3736
  const r = vi(i), a = vi(n), c = [
3740
3737
  r ? `Required<Pick<${e}, ${r}>>` : "",
@@ -3745,13 +3742,13 @@ type ${e}SetterTypes = ${e}["${Gi}"]` : "", d = c.filter(Boolean).join(", ");
3745
3742
  return [d.length === 0 ? "" : `${d}, `, l];
3746
3743
  }
3747
3744
  const vi = (e) => e.map((t) => `'${t}'`).join(" | ");
3748
- function q(e, t, i) {
3745
+ function z(e, t, i) {
3749
3746
  if (Ke(i))
3750
3747
  return An(e, i);
3751
3748
  const n = o.isCallExpression(i) ? La(e, i) : i, s = o.visitEachChild(
3752
3749
  n,
3753
3750
  // Do not add "" if parent is binary expression to not turn {(a && <b />) || c} into {(a && <b />) || "" || c}
3754
- q.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
3751
+ z.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
3755
3752
  e.transformationContext
3756
3753
  );
3757
3754
  return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || Ke(Se(i.right))) ? Ba(s) : s;
@@ -3778,53 +3775,53 @@ function In(e, t) {
3778
3775
  ...$
3779
3776
  };
3780
3777
  }
3781
- const c = r.text === et ? Re : r.text === tt ? ft : r.text, l = r.text === et ? ae : r.text === tt ? Y : Ir.has(c) ? Sn : Ct.has(c) ? oe : ce, d = Pt(c);
3778
+ const c = r.text === et ? Re : r.text === tt ? ft : r.text, l = r.text === et ? ae : r.text === tt ? Y : Ir.has(c) ? Sn : Ct.has(c) ? re : ce, d = Pt(c);
3782
3779
  let p;
3783
3780
  d && e.compiler.viteCommand === "build" && (p = _a(e, c));
3784
3781
  let m;
3785
3782
  const f = [];
3786
- let y = !1;
3787
- const g = s.attributes.properties.flatMap((L) => {
3783
+ let g = !1;
3784
+ const y = s.attributes.properties.flatMap((L) => {
3788
3785
  if (o.isJsxSpreadAttribute(L))
3789
3786
  throw Error(
3790
3787
  `JSX spread attribute syntax is not supported. See alternatives: https://qawebgis.esri.com/components/lumina/jsx#spread-attributes
3791
3788
  Found ${L.getText(e.sourceFile)}`
3792
3789
  );
3793
- const { name: $, initializer: b } = L;
3790
+ const { name: $, initializer: w } = L;
3794
3791
  if (o.isJsxNamespacedName($))
3795
3792
  throw Error(`JSX namespaced attributes are not supported. Found ${$.getText(e.sourceFile)}`);
3796
- const E = $.text, I = Ta(b), D = I?.propType ?? Ea(E, b, c);
3793
+ const E = $.text, I = Ta(w), F = I?.propType ?? Ea(E, w, c);
3797
3794
  p?.delete(E);
3798
- const j = va[D](e, I?.initializer ?? b, E, c);
3799
- if (j.length === 0)
3795
+ const N = va[F](e, I?.initializer ?? w, E, c);
3796
+ if (N.length === 0)
3800
3797
  return [];
3801
3798
  const M = e.compiler.shouldMinifyJsx ? [" "] : Aa(En($, e));
3802
- return D === "key" ? (m = typeof j[0] == "object" && !kn($, e) ? j[0] : void 0, M.some(Pa) ? M : []) : D === "directives" || D === "ref" || E === "deferLoad" ? (y ||= D === "deferLoad", f.push(
3799
+ return F === "key" ? (m = typeof N[0] == "object" && !kn($, e) ? N[0] : void 0, M.some(Pa) ? M : []) : F === "directives" || F === "ref" || E === "deferLoad" ? (g ||= F === "deferLoad", f.push(
3803
3800
  ...M,
3804
- ...j.flatMap(
3805
- (H, K) => typeof H == "string" || K === 0 || typeof j[K - 1] == "string" ? H : [" ", H]
3801
+ ...N.flatMap(
3802
+ (H, K) => typeof H == "string" || K === 0 || typeof N[K - 1] == "string" ? H : [" ", H]
3806
3803
  )
3807
- ), []) : [...M, ...j];
3804
+ ), []) : [...M, ...N];
3808
3805
  });
3809
3806
  if (p !== void 0 && p.size > 0 && e.compiler.logLintError(
3810
3807
  "mustIncludeAllRequiredProperties",
3811
3808
  e.sourceFile.fileName,
3812
3809
  `Missing required properties for <${c}> }: ${Array.from(p).join(", ")}`
3813
- ), f.length > 0 && g.push(...f), typeof c == "string" && $t.has(c))
3810
+ ), f.length > 0 && y.push(...f), typeof c == "string" && $t.has(c))
3814
3811
  throw Error(
3815
3812
  `JSX syntax for MathML elements is not yet supported. If you need it, please request it. Otherwise, use the \`math\` function from Lit directly. Tried to use the "${c}" element`
3816
3813
  );
3817
- d && (y ? e.customElementsToImportDeferred.add(c) : e.customElementsToImport.add(c));
3814
+ d && (g ? e.customElementsToImportDeferred.add(c) : e.customElementsToImport.add(c));
3818
3815
  const h = typeof c == "string" && Ar.has(c), v = De(i, e);
3819
3816
  if (h && v.parts.length > 0)
3820
3817
  throw Error(
3821
3818
  `Void HTML elements like <${c}> cannot have children. Found ${t.getText(e.sourceFile)}`
3822
3819
  );
3823
- const S = (l === oe || l === Y) && v.parts.length === 0, T = [
3820
+ const S = (l === re || l === Y) && v.parts.length === 0, T = [
3824
3821
  "<",
3825
3822
  typeof c == "string" ? c : r,
3826
- ...g,
3827
- S ? `${g.length === 0 ? "" : " "}/>` : ">"
3823
+ ...y,
3824
+ S ? `${y.length === 0 ? "" : " "}/>` : ">"
3828
3825
  ], x = h || S ? T : [
3829
3826
  ...T,
3830
3827
  /**
@@ -3853,7 +3850,7 @@ function Wa(e, t, i, n) {
3853
3850
  throw Error(`JSX namespaced attributes are not supported. Found ${d.getText(e.sourceFile)}`);
3854
3851
  if (d.text === "key")
3855
3852
  return;
3856
- const m = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : Ke(p) ? An(e, p) : q(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), f = Ve(d.text) ? o.factory.createStringLiteral(d.text) : d;
3853
+ const m = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : Ke(p) ? An(e, p) : z(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), f = Ve(d.text) ? o.factory.createStringLiteral(d.text) : d;
3857
3854
  return o.factory.createPropertyAssignment(f, m);
3858
3855
  }), { parts: a, litTag: c } = De(n, e);
3859
3856
  return a.length > 0 && r.push(
@@ -3923,7 +3920,7 @@ function Nt(e, t, i) {
3923
3920
  * making this change useless.
3924
3921
  */
3925
3922
  e.compiler.viteCommand === "serve" && e.compiler.typeScriptConfig.sourceMap && !e.compiler.shouldMinifyJsx && o.isArrowFunction(t.expression) && !o.isBlock(t.expression.body) ? [
3926
- q(
3923
+ z(
3927
3924
  e,
3928
3925
  i,
3929
3926
  o.factory.updateArrowFunction(
@@ -3936,7 +3933,7 @@ function Nt(e, t, i) {
3936
3933
  o.factory.createBlock([o.factory.createReturnStatement(t.expression.body)], !0)
3937
3934
  )
3938
3935
  )
3939
- ] : [q(e, i, t.expression)]
3936
+ ] : [z(e, i, t.expression)]
3940
3937
  );
3941
3938
  }
3942
3939
  function _a(e, t) {
@@ -3951,7 +3948,7 @@ function _a(e, t) {
3951
3948
  return r;
3952
3949
  }
3953
3950
  }
3954
- const Fn = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), be = {
3951
+ const Fn = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), we = {
3955
3952
  [ce]: ["lit-html", "lit/html.js", "lit"],
3956
3953
  /**
3957
3954
  * Sadly, Lit called these "html" and "svg", rather than "staticHtml" and
@@ -3960,10 +3957,10 @@ const Fn = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), b
3960
3957
  * collisions.
3961
3958
  */
3962
3959
  [ae]: ["lit-html/static.js", "lit/static-html.js"],
3963
- [oe]: ["lit-html", "lit/html.js", "lit"],
3960
+ [re]: ["lit-html", "lit/html.js", "lit"],
3964
3961
  [Y]: ["lit-html/static.js", "lit/static-html.js"],
3965
- [wn]: ["lit-html", "lit/html.js", "lit"],
3966
- [bn]: ["@lit/reactive-element/css-tag.js", "@lit/reactive-element", "lit"],
3962
+ [bn]: ["lit-html", "lit/html.js", "lit"],
3963
+ [wn]: ["@lit/reactive-element/css-tag.js", "@lit/reactive-element", "lit"],
3967
3964
  safeClassMap: ["@arcgis/lumina"],
3968
3965
  safeStyleMap: ["@arcgis/lumina"],
3969
3966
  deferLoad: ["@arcgis/lumina"],
@@ -3973,7 +3970,7 @@ const Fn = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), b
3973
3970
  ref: ["lit-html/directives/ref.js", "lit/directives/ref.js"],
3974
3971
  nothing: ["lit-html", "lit/html.js", "lit-element/lit-element.js", "lit", "@arcgis/lumina"]
3975
3972
  }, Nn = Fn(
3976
- Object.entries(be).flatMap(([e, t]) => t.map((i) => [i, e]))
3973
+ Object.entries(we).flatMap(([e, t]) => t.map((i) => [i, e]))
3977
3974
  ), Dn = new Set(Object.keys(Nn));
3978
3975
  function Ha(e, t) {
3979
3976
  const i = t.importClause, n = t.moduleSpecifier;
@@ -4000,18 +3997,18 @@ function Ha(e, t) {
4000
3997
  return t;
4001
3998
  const c = Dn.has(n.text);
4002
3999
  return a.elements.forEach((l) => {
4003
- const d = (l.propertyName ?? l.name).text, p = be[d];
4000
+ const d = (l.propertyName ?? l.name).text, p = we[d];
4004
4001
  if (c) {
4005
- if (p?.some((y) => y === n.text)) {
4006
- const y = jn(d, s);
4007
- e.existingLitImports.add(y), e.importRenames[y] = l.name?.text ?? y;
4002
+ if (p?.some((g) => g === n.text)) {
4003
+ const g = jn(d, s);
4004
+ e.existingLitImports.add(g), e.importRenames[g] = l.name?.text ?? g;
4008
4005
  }
4009
4006
  } else (l.name.text === "h" || l.name.text === "createElement") && (e.hasNonLuminaJsxImport = !0);
4010
4007
  const m = d.startsWith(d[0].toUpperCase()), f = u.isAbsolute(s);
4011
4008
  r && !l.isTypeOnly && m && f && e.importedFunctionComponentsFromModules.add(s);
4012
4009
  }), t;
4013
4010
  }
4014
- const jn = (e, t) => e === ce && be.staticHtml.includes(t) ? ae : e === oe && be.staticSvg.includes(t) ? Y : e, Ua = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
4011
+ const jn = (e, t) => e === ce && we.staticHtml.includes(t) ? ae : e === re && we.staticSvg.includes(t) ? Y : e, Ua = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
4015
4012
  function za(e) {
4016
4013
  return o.isImportDeclaration(e) ? qa(this, e) : e;
4017
4014
  }
@@ -4041,7 +4038,7 @@ function qa(e, t) {
4041
4038
  ) : t;
4042
4039
  }
4043
4040
  function Ga(e) {
4044
- const t = Fn(Array.from(e.neededImports, (i) => [be[i][0], i]));
4041
+ const t = Fn(Array.from(e.neededImports, (i) => [we[i][0], i]));
4045
4042
  return Object.entries(t).map(
4046
4043
  ([i, n]) => o.factory.createImportDeclaration(
4047
4044
  void 0,
@@ -4057,7 +4054,7 @@ function Ga(e) {
4057
4054
  );
4058
4055
  }
4059
4056
  function Rn(e, t) {
4060
- const i = e === ae ? ce : e === Y ? oe : e, n = t.importRenames[e];
4057
+ const i = e === ae ? ce : e === Y ? re : e, n = t.importRenames[e];
4061
4058
  return n === i ? o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(i)) : o.factory.createImportSpecifier(
4062
4059
  !1,
4063
4060
  o.factory.createIdentifier(i),
@@ -4094,13 +4091,13 @@ function Xa(e) {
4094
4091
  }), [];
4095
4092
  }
4096
4093
  function Qa(e, t, i) {
4097
- const n = gn()[t] ?? Mn(e)[t];
4094
+ const n = yn()[t] ?? Mn(e)[t];
4098
4095
  if (n === void 0) {
4099
4096
  if (e.options?.build?.dependencies?.silenceUnknownJsxElementUsage?.(t, i, e) === !0)
4100
4097
  return;
4101
4098
  const s = ee(i);
4102
4099
  throw Error(
4103
- w(
4100
+ b(
4104
4101
  "@arcgis/lumina:resolveTagName",
4105
4102
  `Unable to resolve the definition of the "${t}" custom element. Used in ${s}. If this is coming from an external package, make sure that package is installed as a peerDependency or a dependency. If in development-only you wish to use a component package that is defined as a devDependency, then provide serve.extraDependencies option to useLumina()`
4106
4103
  )
@@ -4109,7 +4106,7 @@ function Qa(e, t, i) {
4109
4106
  return n;
4110
4107
  }
4111
4108
  function Za(e, t) {
4112
- return e.packageName === void 0 ? te(t, e.moduleName) : u.join(e.packageName, e.moduleName);
4109
+ return e.packageName === void 0 ? oe(t, e.moduleName) : u.join(e.packageName, e.moduleName);
4113
4110
  }
4114
4111
  function Mn(e) {
4115
4112
  return e._localDefinedComponents ??= vn(e.privateApiJson, {
@@ -4125,7 +4122,7 @@ const Ya = (e, t) => {
4125
4122
  return e.statements;
4126
4123
  const n = {
4127
4124
  compiler: t.compiler,
4128
- externalComponents: gn(),
4125
+ externalComponents: yn(),
4129
4126
  localComponents: t.compiler.isInPuppeteerTestBackEnd ? {} : Mn(t.compiler),
4130
4127
  sourceFile: e,
4131
4128
  transformationContext: t.transformation,
@@ -4148,7 +4145,7 @@ const Ya = (e, t) => {
4148
4145
  if (s.push(Ha(n, a)), n.hasNonLuminaJsxImport)
4149
4146
  return !1;
4150
4147
  } else
4151
- s.push(q(n, void 0, a));
4148
+ s.push(z(n, void 0, a));
4152
4149
  return !0;
4153
4150
  }), n.hasNonLuminaJsxImport)
4154
4151
  return e.statements;
@@ -4167,7 +4164,7 @@ const Ya = (e, t) => {
4167
4164
  };
4168
4165
  function ec(e) {
4169
4166
  return tc(e), Object.fromEntries(
4170
- ya.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4167
+ ga.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4171
4168
  );
4172
4169
  }
4173
4170
  function tc(e) {
@@ -4242,14 +4239,14 @@ function nc(e, t) {
4242
4239
  }
4243
4240
  function sc(e, t, i, n, s) {
4244
4241
  let r = -1, a = -1, c = -1;
4245
- t.options?.properties.forEach((f, y) => {
4242
+ t.options?.properties.forEach((f, g) => {
4246
4243
  if (o.isSpreadAssignment(f))
4247
4244
  throw new Error(
4248
4245
  `Spread property assignment is not allowed in @property() as that is not statically analyzable. Found ${f.getText(n)}`
4249
4246
  );
4250
4247
  if (o.isIdentifier(f.name)) {
4251
- const g = f.name.text;
4252
- g === "type" ? r = y : g === "attribute" ? a = y : g === "readOnly" && (c = y);
4248
+ const y = f.name.text;
4249
+ y === "type" ? r = g : y === "attribute" ? a = g : y === "readOnly" && (c = g);
4253
4250
  }
4254
4251
  });
4255
4252
  const l = s.attribute === void 0 && a === -1, d = s.readonly === !0 && s.docsOnlyReadonly !== !0 && c === -1, p = rc(e, t, i, s, r), m = [
@@ -4309,12 +4306,12 @@ function cc(e, t, i, n, s) {
4309
4306
  }), r !== -1) {
4310
4307
  const c = lc(e, t, i, n), l = Si(t, r, n), d = sc(t, l, e, n, c);
4311
4308
  let p = !1;
4312
- return s.set(c.name, d ?? o.factory.createObjectLiteralExpression()), p = !0, l.options = d, bi(t, l, r, p);
4309
+ return s.set(c.name, d ?? o.factory.createObjectLiteralExpression()), p = !0, l.options = d, wi(t, l, r, p);
4313
4310
  } else if (a !== -1) {
4314
- const c = Si(t, a, n), l = o.factory.createPropertyAssignment("state", o.factory.createTrue()), d = c.options === void 0 ? o.factory.createObjectLiteralExpression([l]) : o.factory.updateObjectLiteralExpression(c.options, [...c.options.properties, l]), p = Q(t.name);
4311
+ const c = Si(t, a, n), l = o.factory.createPropertyAssignment("state", o.factory.createTrue()), d = c.options === void 0 ? o.factory.createObjectLiteralExpression([l]) : o.factory.updateObjectLiteralExpression(c.options, [...c.options.properties, l]), p = X(t.name);
4315
4312
  if (p === void 0)
4316
4313
  throw new Error("Failed to statically determine the state property name");
4317
- return s.set(p, d), bi(t, c, a, !0);
4314
+ return s.set(p, d), wi(t, c, a, !0);
4318
4315
  } else
4319
4316
  return t;
4320
4317
  }
@@ -4332,12 +4329,12 @@ function lc(e, t, i, n) {
4332
4329
  `Failed to find API property for ${t.getText(n)} in ${i} in ${n.fileName}`
4333
4330
  );
4334
4331
  if (r.name === "") {
4335
- const a = Q(t.name);
4332
+ const a = X(t.name);
4336
4333
  if (a === void 0)
4337
4334
  throw Error(
4338
4335
  `Failed to statically determine the property name: ${t.getText(n)} in ${i} in ${n.fileName}`
4339
4336
  );
4340
- r.name = a, r.attribute ??= wt(a);
4337
+ r.name = a, r.attribute ??= bt(a);
4341
4338
  }
4342
4339
  return r;
4343
4340
  }
@@ -4349,7 +4346,7 @@ function Si(e, t, i) {
4349
4346
  );
4350
4347
  return { decorator: n, callExpression: s, options: r };
4351
4348
  }
4352
- function bi(e, t, i, n) {
4349
+ function wi(e, t, i, n) {
4353
4350
  const s = n ? void 0 : o.factory.updateDecorator(
4354
4351
  t.decorator,
4355
4352
  o.factory.updateCallExpression(
@@ -4474,7 +4471,7 @@ function uc(e, t, i, n, s) {
4474
4471
  }
4475
4472
  return o.isPropertyDeclaration(t) || o.isAccessor(t) ? cc(e, t, i, n, s) : t;
4476
4473
  }
4477
- const mc = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", vt = "@arcgis/core", ct = N(), Ce = vt in (ct.dependencies ?? {}) || vt in (ct.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
4474
+ const mc = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", vt = "@arcgis/core", ct = j(), Ce = vt in (ct.dependencies ?? {}) || vt in (ct.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
4478
4475
  ct.name === "@arcgis/lumina";
4479
4476
  async function fc(e, t) {
4480
4477
  if (!Ce)
@@ -4497,25 +4494,25 @@ async function fc(e, t) {
4497
4494
  })
4498
4495
  },
4499
4496
  // <link rel="stylesheet" id="arcgisCoreStylesheet" href="https://jsdev.arcgis.com/VERSION/esri/themes/light/main.css" />
4500
- wi(s)
4497
+ bi(s)
4501
4498
  ];
4502
4499
  } else
4503
- return [wi(It(e, `${i}/assets/`))];
4500
+ return [bi(It(e, `${i}/assets/`))];
4504
4501
  }
4505
- const wi = (e) => ({
4502
+ const bi = (e) => ({
4506
4503
  // Not using join() because it would turn https:// into https:/
4507
4504
  cssHref: `${e}esri/themes/light/main.css`,
4508
4505
  // This is used be the theme switcher in `@arcgis/storybook-utils`
4509
4506
  id: "arcgisCoreStylesheet"
4510
- }), Ti = "makeRuntime(", yc = "@arcgis/core";
4511
- function gc(e, t) {
4507
+ }), Ti = "makeRuntime(", gc = "@arcgis/core";
4508
+ function yc(e, t) {
4512
4509
  const i = e.indexOf(Ti);
4513
4510
  if (i === -1)
4514
4511
  throw new Error("Failed to find makeRuntime() function call in src/runtime.ts");
4515
4512
  const n = i + Ti.length, s = t.options.css?.commonStylesPath;
4516
4513
  return {
4517
4514
  code: [
4518
- s === void 0 ? "" : `import commonStyles from "${te(t.dir.src, s)}";`,
4515
+ s === void 0 ? "" : `import commonStyles from "${oe(t.dir.src, s)}";`,
4519
4516
  e.slice(0, n),
4520
4517
  "{",
4521
4518
  "defaultAssetPath:import.meta.env.BASE_URL,",
@@ -4526,7 +4523,7 @@ function gc(e, t) {
4526
4523
  "}",
4527
4524
  e.slice(n),
4528
4525
  Ce ? `
4529
- import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${yc}/applications/Components/reactiveUtils.js";
4526
+ import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${gc}/applications/Components/reactiveUtils.js";
4530
4527
  createObservable,
4531
4528
  runtime.t = trackAccess;
4532
4529
  runtime.o = createObservable;
@@ -4554,7 +4551,7 @@ const hc = [
4554
4551
  i
4555
4552
  );
4556
4553
  else if (i === `${e.dir.src}runtime.ts`)
4557
- return gc(t, e);
4554
+ return yc(t, e);
4558
4555
  return;
4559
4556
  }
4560
4557
  const n = e.getSourceFile(i, t);
@@ -4612,11 +4609,11 @@ function Sc(e) {
4612
4609
  skipLibCheck: !0
4613
4610
  };
4614
4611
  }
4615
- function bc(e) {
4612
+ function wc(e) {
4616
4613
  const t = e.options.types?.tsconfigPath, i = t && u.isAbsolute(t) ? t : ps(t ?? "tsconfig.json");
4617
4614
  if (i === void 0)
4618
4615
  throw Error(
4619
- w(
4616
+ b(
4620
4617
  "@arcgis/lumina:loadTypeScriptConfig",
4621
4618
  `Unable to find ${ee(String(t))}. Please make sure the file exists, or provide types.tsconfigPath option to useLumina()`,
4622
4619
  process.cwd()
@@ -4643,7 +4640,7 @@ function Jn(e) {
4643
4640
  const t = e.target;
4644
4641
  if (t === void 0)
4645
4642
  throw Error(
4646
- w(
4643
+ b(
4647
4644
  "@arcgis/lumina:resolveTargetVersion",
4648
4645
  'TypeScript config must have a "target" property specified (or any parent tsconfig.json file if this config is extending another tsconfig.json)'
4649
4646
  )
@@ -4651,7 +4648,7 @@ function Jn(e) {
4651
4648
  const i = o.ScriptTarget[t].toLowerCase();
4652
4649
  return i === "latest" ? "esnext" : i;
4653
4650
  }
4654
- function wc(e, t) {
4651
+ function bc(e, t) {
4655
4652
  if (e.isInStorybook && e.viteCommand === "serve") {
4656
4653
  const i = (a, c, l, ...d) => {
4657
4654
  const p = a.filter(
@@ -4677,7 +4674,7 @@ function wc(e, t) {
4677
4674
  }
4678
4675
  async function Tc(e, t, i) {
4679
4676
  const n = u.resolve(e.dir.root, t);
4680
- await U(n) && await Ts(n, { recursive: !0, force: !0 }), await z(n, { recursive: !0 }), await Es(e.dir.distCdn, u.join(n, "build"), { recursive: !0 });
4677
+ await U(n) && await Ts(n, { recursive: !0, force: !0 }), await Q(n, { recursive: !0 }), await Es(e.dir.distCdn, u.join(n, "build"), { recursive: !0 });
4681
4678
  const s = [
4682
4679
  "index.html",
4683
4680
  ...await Ds("**/*.html", {
@@ -4695,20 +4692,20 @@ async function Tc(e, t, i) {
4695
4692
  if (typeof p == "string")
4696
4693
  return `<${d.tag} ${Object.entries(d.attrs ?? {}).map(([m, f]) => `${m}="${f}"`).join(" ")}>${p}</${d.tag}>`;
4697
4694
  }
4698
- throw Error(w("@arcgis/lumina:buildWebApp", `Unsupported loader type: ${JSON.stringify(d)}`));
4695
+ throw Error(b("@arcgis/lumina:buildWebApp", `Unsupported loader type: ${JSON.stringify(d)}`));
4699
4696
  }).join(`
4700
4697
  `);
4701
4698
  await Promise.all(
4702
4699
  s.map(async (d, p) => {
4703
- const f = p === 0 ? d : u.join(r, d), y = u.join(e.dir.root, f), g = u.join(n, f);
4704
- await z(u.dirname(g), { recursive: !0 });
4705
- const h = await J(y, "utf-8"), v = te(u.dirname(f), `build/${i}`), S = `${l}<script type="module" src="${v}"><\/script>
4700
+ const f = p === 0 ? d : u.join(r, d), g = u.join(e.dir.root, f), y = u.join(n, f);
4701
+ await Q(u.dirname(y), { recursive: !0 });
4702
+ const h = await J(g, "utf-8"), v = oe(u.dirname(f), `build/${i}`), S = `${l}<script type="module" src="${v}"><\/script>
4706
4703
  `;
4707
4704
  let T = h.indexOf("<style>");
4708
4705
  if (T === -1 && (T = h.indexOf("</head>")), T === -1)
4709
- throw Error(w("@arcgis/lumina:buildWebApp", `Failed to find <head> or <style> tag in ${y}`));
4706
+ throw Error(b("@arcgis/lumina:buildWebApp", `Failed to find <head> or <style> tag in ${g}`));
4710
4707
  const x = h.slice(0, T) + S + h.slice(T);
4711
- await F(g, x, "utf-8");
4708
+ await D(y, x, "utf-8");
4712
4709
  })
4713
4710
  );
4714
4711
  }
@@ -4725,7 +4722,7 @@ const Kn = /* @__PURE__ */ new Set([
4725
4722
  "collection",
4726
4723
  "extras",
4727
4724
  "support"
4728
- ]), _ = "@arcgis/lumina:buildCdn", Dt = "cdn", Wn = "index", we = "main";
4725
+ ]), _ = "@arcgis/lumina:buildCdn", Dt = "cdn", Wn = "index", be = "main";
4729
4726
  function Ec(e) {
4730
4727
  const { skip: t = !1, namespace: i, esbuildOptions: n = {} } = e.options.build?.cdn ?? {}, s = e.options.build?.webApp?.destination, r = i !== void 0;
4731
4728
  if (r) {
@@ -4744,7 +4741,7 @@ function Ec(e) {
4744
4741
  {
4745
4742
  type: "dynamic",
4746
4743
  source: () => Io(e),
4747
- destination: `../${r ? a : we}.css`
4744
+ destination: `../${r ? a : be}.css`
4748
4745
  }
4749
4746
  ]), !t)
4750
4747
  return {
@@ -4752,7 +4749,7 @@ function Ec(e) {
4752
4749
  async writeBundle() {
4753
4750
  if (e.isInStorybook)
4754
4751
  return;
4755
- const c = Ce && N().name !== "@arcgis/embeddable-components", l = Date.now(), d = Array.isArray(n.entryPoints) ? n.entryPoints.map((f) => typeof f == "string" ? { in: f, out: "" } : f) : typeof n.entryPoints == "object" ? Object.entries(n.entryPoints).map(([f, y]) => ({ in: y, out: f })) : [], p = await Cc(e, a, n, d, c);
4752
+ const c = Ce && j().name !== "@arcgis/embeddable-components", l = Date.now(), d = Array.isArray(n.entryPoints) ? n.entryPoints.map((f) => typeof f == "string" ? { in: f, out: "" } : f) : typeof n.entryPoints == "object" ? Object.entries(n.entryPoints).map(([f, g]) => ({ in: g, out: f })) : [], p = await Cc(e, a, n, d, c);
4756
4753
  await $c(
4757
4754
  p,
4758
4755
  e,
@@ -4769,14 +4766,14 @@ async function Cc(e, t, i, n, s) {
4769
4766
  const r = e.environment;
4770
4767
  if (i.minify && s)
4771
4768
  throw Error(
4772
- w(
4769
+ b(
4773
4770
  _,
4774
4771
  "Unminified CDN build is not yet supported - open a feature request with Lumina maintainers if it is needed"
4775
4772
  )
4776
4773
  );
4777
4774
  if (i.sourcemap && s)
4778
4775
  throw Error(
4779
- w(
4776
+ b(
4780
4777
  _,
4781
4778
  "Source maps in the CDN build are not yet supported - open a feature request with Lumina maintainers if it is needed"
4782
4779
  )
@@ -4788,7 +4785,6 @@ async function Cc(e, t, i, n, s) {
4788
4785
  sourcemap: s ? !1 : r === "development" ? "inline" : e.options.build?.enableSourceMapsInProduction ? "linked" : !1,
4789
4786
  format: "esm",
4790
4787
  splitting: !0,
4791
- write: !1,
4792
4788
  absWorkingDir: e.dir.dist,
4793
4789
  outdir: e.dir.distCdn,
4794
4790
  legalComments: "none",
@@ -4809,23 +4805,8 @@ async function Cc(e, t, i, n, s) {
4809
4805
  banner: { js: e.banner },
4810
4806
  target: Jn(e.typeScriptConfig),
4811
4807
  ...i,
4808
+ write: !1,
4812
4809
  plugins: [
4813
- // Deprecated feature will be dropped in https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2765
4814
- // eslint-disable-next-line @typescript-eslint/no-deprecated
4815
- ...e.options.build?.ssr?.stencilCompatibility?.enabled === !0 ? [
4816
- {
4817
- name: "@arcgis/lumina:drop-lit-ssr-import",
4818
- setup(a) {
4819
- a.onResolve({ filter: /^@lit-labs\/ssr-client\// }, (c) => ({
4820
- path: c.path,
4821
- namespace: "@arcgis/lumina:drop-lit-ssr-import"
4822
- })), a.onLoad({ filter: /^/, namespace: "@arcgis/lumina:drop-lit-ssr-import" }, () => ({
4823
- contents: '""',
4824
- loader: "json"
4825
- }));
4826
- }
4827
- }
4828
- ] : [],
4829
4810
  {
4830
4811
  name: "@arcgis/lumina:accessorSupport",
4831
4812
  setup(a) {
@@ -4884,7 +4865,7 @@ async function $c(e, t, i, n, s) {
4884
4865
  );
4885
4866
  s && c.forEach((l, d) => {
4886
4867
  l.isAsync === void 0 && (d.endsWith(".js") ? Bn(l, c) : l.isAsync = !1);
4887
- }), t.options.build?.cdn?.transformer?.(c, t), await Promise.all(Array.from(c.entries(), async ([l, { code: d }]) => await F(r + l, d)));
4868
+ }), t.options.build?.cdn?.transformer?.(c, t), await Promise.all(Array.from(c.entries(), async ([l, { code: d }]) => await D(r + l, d)));
4888
4869
  }
4889
4870
  const Pc = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
4890
4871
  function xc(e, t) {
@@ -4903,7 +4884,7 @@ function xc(e, t) {
4903
4884
  continue;
4904
4885
  }
4905
4886
  if (r.out.startsWith(".") || r.out.startsWith("/"))
4906
- throw Error(w(_, `CDN entrypoint path must not start with '.' or '/'. Found: ${r.out}`));
4887
+ throw Error(b(_, `CDN entrypoint path must not start with '.' or '/'. Found: ${r.out}`));
4907
4888
  s.push(r.out);
4908
4889
  }
4909
4890
  i += `"${s.join(",")}".split(",").map(e=>i[p+e+j]=i[p+e]=import.meta.resolve("./"+e+j));`;
@@ -4923,7 +4904,7 @@ function xc(e, t) {
4923
4904
  // minified to a variable name that is already used inside the closure).
4924
4905
  `)($arcgis,${e}`
4925
4906
  ].join(""), n) {
4926
- const r = N().name;
4907
+ const r = j().name;
4927
4908
  i += `,"${r}/",".js"`;
4928
4909
  }
4929
4910
  return i += ")", i;
@@ -4932,37 +4913,37 @@ function Bn(e, t) {
4932
4913
  const i = [], n = [], s = [], r = /* @__PURE__ */ new Set(), a = [];
4933
4914
  let c = 0;
4934
4915
  const l = e.code.matchAll(kc);
4935
- for (const b of l) {
4936
- const [E, I, D, j, M] = b, H = M.startsWith(Be);
4937
- if (c !== 0 && c !== b.index) {
4938
- const K = e.code.slice(c, b.index);
4916
+ for (const w of l) {
4917
+ const [E, I, F, N, M] = w, H = M.startsWith(Be);
4918
+ if (c !== 0 && c !== w.index) {
4919
+ const K = e.code.slice(c, w.index);
4939
4920
  s.push(K), a.push([c, K.length, 0, ""]);
4940
4921
  }
4941
- if (c = b.index + E.length, H)
4942
- a.push([b.index, E.length, 0, ""]), n.push(`"${Hn(M.slice(Be.length))}"`), i.push(I?.replaceAll(" as ", ":") ?? D ?? j ?? "");
4922
+ if (c = w.index + E.length, H)
4923
+ a.push([w.index, E.length, 0, ""]), n.push(`"${Hn(M.slice(Be.length))}"`), i.push(I?.replaceAll(" as ", ":") ?? F ?? N ?? "");
4943
4924
  else {
4944
- const K = _n(M, t), G = K?.isAsync === !0;
4925
+ const K = _n(M, t), q = K?.isAsync === !0;
4945
4926
  if (I !== void 0) {
4946
4927
  const xe = [];
4947
4928
  for (const Ze of I.slice(1, -1).split(",")) {
4948
4929
  const [Ot, Jt = Ot] = Ze.split(" as ");
4949
- G || r.add(Jt), xe.push(`${Ot}:${Jt}`);
4930
+ q || r.add(Jt), xe.push(`${Ot}:${Jt}`);
4950
4931
  }
4951
- if (G) {
4932
+ if (q) {
4952
4933
  const Ze = K.oldSingleExportName === void 0 ? `{${xe.join(",")}}` : xe[0].split(":")[1];
4953
- a.push([b.index + 6, 0, I.length, Ze]);
4934
+ a.push([w.index + 6, 0, I.length, Ze]);
4954
4935
  }
4955
- } else if (D === void 0 && j === void 0)
4956
- G && a.push([b.index + 6, 0, 0, ""]);
4936
+ } else if (F === void 0 && N === void 0)
4937
+ q && a.push([w.index + 6, 0, 0, ""]);
4957
4938
  else {
4958
- if (G)
4939
+ if (q)
4959
4940
  throw Error(
4960
- w(
4941
+ b(
4961
4942
  _,
4962
4943
  `Expected local import specifiers to use only named or side-effect import syntax. Found ${E}`
4963
4944
  )
4964
4945
  );
4965
- r.add(j ?? D);
4946
+ r.add(N ?? F);
4966
4947
  }
4967
4948
  }
4968
4949
  }
@@ -4972,30 +4953,30 @@ function Bn(e, t) {
4972
4953
  }
4973
4954
  const d = Lc(r);
4974
4955
  let p = e.code.slice(0, c);
4975
- for (let b = a.length - 1; b >= 0; b--) {
4976
- const [E, I, D, j] = a[b];
4956
+ for (let w = a.length - 1; w >= 0; w--) {
4957
+ const [E, I, F, N] = a[w];
4977
4958
  let M = I, H = "";
4978
4959
  if (I === 0) {
4979
- const G = d();
4980
- n.push(G), H = ` ${G} from`, j !== "" ? (M = D + 4, i.push(j)) : i.push("");
4960
+ const q = d();
4961
+ n.push(q), H = ` ${q} from`, N !== "" ? (M = F + 4, i.push(N)) : i.push("");
4981
4962
  }
4982
4963
  p = p.slice(0, E) + H + p.slice(E + M);
4983
4964
  }
4984
4965
  const m = Ac.exec(e.code), f = m?.index ?? e.code.length;
4985
- let y = "";
4966
+ let g = "";
4986
4967
  if (m !== null) {
4987
- const b = m[1].split(",");
4988
- if (b.length > 1)
4989
- y = `return{${b.map((E) => {
4990
- const [I, D = I] = E.split(" as ");
4991
- return `${D}:${I}`;
4968
+ const w = m[1].split(",");
4969
+ if (w.length > 1)
4970
+ g = `return{${w.map((E) => {
4971
+ const [I, F = I] = E.split(" as ");
4972
+ return `${F}:${I}`;
4992
4973
  }).join(",")}}`;
4993
4974
  else {
4994
- const [E, I = E] = b[0].split(" as ");
4995
- e.oldSingleExportName = I, y = `return ${E}`;
4975
+ const [E, I = E] = w[0].split(" as ");
4976
+ e.oldSingleExportName = I, g = `return ${E}`;
4996
4977
  }
4997
4978
  }
4998
- const g = i.findLastIndex((b) => b.length > 0), h = i.slice(0, g + 1).join(","), S = `export default $arcgis.t(${i.length === 0 ? "_" : `([${h}])`}=>{`, T = n.join(","), x = `${y}},${T})`;
4979
+ const y = i.findLastIndex((w) => w.length > 0), h = i.slice(0, y + 1).join(","), S = `export default $arcgis.t(${i.length === 0 ? "_" : `([${h}])`}=>{`, T = n.join(","), x = `${g}},${T})`;
4999
4980
  let L = e.code.slice(c, f);
5000
4981
  L = `${s.join("")}${L}`, L = Ci(L, t);
5001
4982
  const $ = `${p}${S}${L}${x}`;
@@ -5007,9 +4988,9 @@ function _n(e, t) {
5007
4988
  return;
5008
4989
  const i = e.slice(2), n = t.get(i);
5009
4990
  if (n === void 0)
5010
- throw Error(w(_, `Failed to find the ${e} module`));
4991
+ throw Error(b(_, `Failed to find the ${e} module`));
5011
4992
  if (n.isAsync === void 0 && Bn(n, t), n.isAsync === void 0)
5012
- throw Error(w(_, `Failed to infer whether the ${e} module has top-level await`));
4993
+ throw Error(b(_, `Failed to infer whether the ${e} module has top-level await`));
5013
4994
  return n;
5014
4995
  }
5015
4996
  function Ci(e, t) {
@@ -5115,12 +5096,12 @@ async function $i(e, t) {
5115
5096
  async function Mc(e, t, i, n) {
5116
5097
  const s = t.packageName, r = await _e(s), a = await He(r), c = await qn(u.join(r, "dist"));
5117
5098
  if (i === "cdn") {
5118
- const y = a.exports?.[`./${we}.css`] === void 0, g = y ? c.cdnName : Wn;
5099
+ const g = a.exports?.[`./${be}.css`] === void 0, y = g ? c.cdnName : Wn;
5119
5100
  return {
5120
5101
  tag: "script",
5121
5102
  attrs: {
5122
5103
  type: "module",
5123
- src: `${t.cdnUrl ?? qe(a, !0)}${g}${y ? ".esm" : ""}.js`
5104
+ src: `${t.cdnUrl ?? qe(a, !0)}${y}${g ? ".esm" : ""}.js`
5124
5105
  }
5125
5106
  };
5126
5107
  }
@@ -5149,8 +5130,8 @@ function Oc(e) {
5149
5130
  throw new Error(
5150
5131
  `Package "${e.name}" does not have an "exports" field. All Lumina packages must include an "exports" field.`
5151
5132
  );
5152
- const i = Object.entries(t).filter(([s]) => u.extname(s) === ".css"), n = i.find(([, s]) => s === `./${we}.css`);
5153
- return n ? n[0] : i.length > 0 ? i[0][0] : `./${we}.css`;
5133
+ const i = Object.entries(t).filter(([s]) => u.extname(s) === ".css"), n = i.find(([, s]) => s === `./${be}.css`);
5134
+ return n ? n[0] : i.length > 0 ? i[0][0] : `./${be}.css`;
5154
5135
  }
5155
5136
  async function Te(e) {
5156
5137
  return e._loadersCache ??= Jc(e), await e._loadersCache;
@@ -5193,7 +5174,7 @@ async function Gn(e) {
5193
5174
  const n = typeof i == "string" ? i : i.name, s = await hn(n);
5194
5175
  if (s === void 0)
5195
5176
  throw Error(
5196
- w(
5177
+ b(
5197
5178
  "@arcgis/lumina:computeServeOnlyDependencies",
5198
5179
  `Unable to resolve extra dependency "${n}". Make sure it is a valid Stencil or Lumina package.`
5199
5180
  )
@@ -5224,7 +5205,7 @@ async function Kc(e) {
5224
5205
  ].join(`
5225
5206
  `);
5226
5207
  throw Error(
5227
- w(
5208
+ b(
5228
5209
  "@arcgis/lumina:buildTestSetupFile",
5229
5210
  `Unexpected loader type for the browser test environment: ${JSON.stringify(n)}`
5230
5211
  )
@@ -5247,10 +5228,10 @@ function _c(e) {
5247
5228
  configResolved() {
5248
5229
  a = u.join(e.dir.root, "src", "loader.ts"), c = ee(a);
5249
5230
  },
5250
- resolveId: (g) => g === a || g === c ? a : void 0,
5251
- async load(g) {
5252
- const h = g.startsWith(Vn);
5253
- if (!(!g.endsWith(".tsx") && g !== a && !h)) {
5231
+ resolveId: (y) => y === a || y === c ? a : void 0,
5232
+ async load(y) {
5233
+ const h = y.startsWith(Vn);
5234
+ if (!(!y.endsWith(".tsx") && y !== a && !h)) {
5254
5235
  if (s === void 0 && !e.isInPuppeteerTestBackEnd) {
5255
5236
  r === void 0 && clearTimeout(n), r ??= Bo(e, t).catch((S) => {
5256
5237
  throw i = !0, S;
@@ -5258,39 +5239,39 @@ function _c(e) {
5258
5239
  const v = await r;
5259
5240
  s ??= v;
5260
5241
  }
5261
- return g === a ? Lo(e) : h ? await Kc(e) : void 0;
5242
+ return y === a ? Lo(e) : h ? await Kc(e) : void 0;
5262
5243
  }
5263
5244
  },
5264
5245
  async writeBundle() {
5265
- e.isInStorybook || await F(u.join(e.dir.dist, "loader.d.ts"), Fo);
5246
+ e.isInStorybook || await D(u.join(e.dir.dist, "loader.d.ts"), Fo);
5266
5247
  },
5267
- async handleHotUpdate({ file: g, modules: h, read: v }) {
5268
- const S = await p(g, v);
5248
+ async handleHotUpdate({ file: y, modules: h, read: v }) {
5249
+ const S = await p(y, v);
5269
5250
  return S === void 0 ? void 0 : S ? h : (m(), []);
5270
5251
  },
5271
5252
  /**
5272
5253
  * If a component was added, removed or renamed, regenerate the api.json and
5273
5254
  * invalidate loader.js, forcing a page reload
5274
5255
  */
5275
- configureServer(g) {
5256
+ configureServer(y) {
5276
5257
  if (e.isInPuppeteerTestBackEnd)
5277
5258
  return;
5278
- e.isInTest && g.watcher.on("change", (v) => {
5259
+ e.isInTest && y.watcher.on("change", (v) => {
5279
5260
  p(v, async () => await J(v, "utf8")).catch(
5280
5261
  (S) => C.warn(l, v, String(S))
5281
5262
  );
5282
- }), g.watcher.on("add", h), g.watcher.on("unlink", h), g.watcher.on(
5263
+ }), y.watcher.on("add", h), y.watcher.on("unlink", h), y.watcher.on(
5283
5264
  "addDir",
5284
5265
  (v) => v.startsWith(e.dir.srcComponents) ? void xt(e, e.dir.srcComponents, v).then(
5285
5266
  (S) => S.length > 0 ? m() : void 0
5286
5267
  ) : void 0
5287
- ), g.watcher.on("unlinkDir", (v) => {
5268
+ ), y.watcher.on("unlinkDir", (v) => {
5288
5269
  e.componentFiles.some((T) => T.startsWith(v)) && m();
5289
5270
  });
5290
5271
  function h(v) {
5291
5272
  he(v, e.dir.srcComponents) && m();
5292
5273
  }
5293
- g.watcher.on("change", () => {
5274
+ y.watcher.on("change", () => {
5294
5275
  if (!i)
5295
5276
  return;
5296
5277
  i = !1, n = setTimeout(() => m(!0), 1e3);
@@ -5300,13 +5281,13 @@ function _c(e) {
5300
5281
  e.typeScriptWatchProgram?.close();
5301
5282
  }
5302
5283
  };
5303
- async function p(g, h) {
5284
+ async function p(y, h) {
5304
5285
  if (s === void 0)
5305
5286
  return !1;
5306
5287
  let v;
5307
5288
  if (e.isInStorybook) {
5308
5289
  v = await h();
5309
- const x = e.typeScriptProgram.getSourceFile(g);
5290
+ const x = e.typeScriptProgram.getSourceFile(y);
5310
5291
  if (x === void 0)
5311
5292
  return;
5312
5293
  if (!(x.text === v)) {
@@ -5324,10 +5305,10 @@ function _c(e) {
5324
5305
  ]), clearTimeout(E);
5325
5306
  }
5326
5307
  }
5327
- if (!he(g, e.dir.srcComponents))
5308
+ if (!he(y, e.dir.srcComponents))
5328
5309
  return;
5329
5310
  v ??= await h();
5330
- const T = _o(e, g, v);
5311
+ const T = _o(e, y, v);
5331
5312
  if (T === void 0)
5332
5313
  return !1;
5333
5314
  for (const x of T) {
@@ -5336,14 +5317,14 @@ function _c(e) {
5336
5317
  }
5337
5318
  return f(), !0;
5338
5319
  }
5339
- function m(g = !1) {
5340
- !g && s === void 0 || (s = void 0, r = void 0, f(), y());
5320
+ function m(y = !1) {
5321
+ !y && s === void 0 || (s = void 0, r = void 0, f(), g());
5341
5322
  }
5342
5323
  function f() {
5343
- const g = e.server.moduleGraph.getModuleById(a);
5344
- g === void 0 ? (C.warn(l, "Failed to find HMR module for src/loader.ts"), e.server.moduleGraph.invalidateAll()) : e.server.moduleGraph.invalidateModule(g);
5324
+ const y = e.server.moduleGraph.getModuleById(a);
5325
+ y === void 0 ? (C.warn(l, "Failed to find HMR module for src/loader.ts"), e.server.moduleGraph.invalidateAll()) : e.server.moduleGraph.invalidateModule(y);
5345
5326
  }
5346
- const y = () => e.server.ws.send({
5327
+ const g = () => e.server.ws.send({
5347
5328
  type: "full-reload",
5348
5329
  path: u.join("/", u.relative(e.dir.root, a))
5349
5330
  });
@@ -5352,14 +5333,14 @@ function _c(e) {
5352
5333
  const St = "@arcgis/lumina:provideAssets";
5353
5334
  function fe(e, t, i = Rt) {
5354
5335
  if (e.viteCommand !== "serve")
5355
- throw Error(w(St, "serveAssets() is only available when Vite is running in serve mode"));
5336
+ throw Error(b(St, "serveAssets() is only available when Vite is running in serve mode"));
5356
5337
  const n = e._serverConfigured, s = e.server.middlewares.stack.length;
5357
5338
  if (t.forEach((r) => {
5358
5339
  const a = Qn(r), c = Yn(e.dir, Zn(a)), l = Uc(e.viteConfig.base, c, e.dir.distCdn);
5359
5340
  e.server.middlewares.use(l, (d, p, m) => {
5360
- const f = zc(d.url), y = a.type === "directory" ? u.resolve(a.source, f.slice(1)) : a.source, g = u.join(c, f), h = i.find((v) => v.match(g, e));
5361
- return (typeof y == "function" ? Promise.resolve(y()) : J(y)).then((v) => {
5362
- const S = (typeof y == "function" ? void 0 : h?.transform(v.toString("utf8"), g, e)) ?? v;
5341
+ const f = zc(d.url), g = a.type === "directory" ? u.resolve(a.source, f.slice(1)) : a.source, y = u.join(c, f), h = i.find((v) => v.match(y, e));
5342
+ return (typeof g == "function" ? Promise.resolve(g()) : J(g)).then((v) => {
5343
+ const S = (typeof g == "function" ? void 0 : h?.transform(v.toString("utf8"), y, e)) ?? v;
5363
5344
  p.setHeader("Cache-Control", "max-age=31536000, immutable"), p.setHeader("Content-Type", js.lookup(f) || "application/octet-stream"), p.write(S), p.end();
5364
5345
  }).catch((v) => {
5365
5346
  (a.type !== "directory" || process.env.DEBUG) && C.warn(
@@ -5388,11 +5369,11 @@ async function Xn(e, t, i = Rt) {
5388
5369
  )
5389
5370
  );
5390
5371
  } else if (s.type === "file")
5391
- await z(u.dirname(r), { recursive: !0 }), await xi(s.source, r, i, e);
5372
+ await Q(u.dirname(r), { recursive: !0 }), await xi(s.source, r, i, e);
5392
5373
  else if (s.type === "dynamic") {
5393
- await z(u.dirname(r), { recursive: !0 });
5374
+ await Q(u.dirname(r), { recursive: !0 });
5394
5375
  const a = await Promise.resolve(s.source());
5395
- await F(r, a);
5376
+ await D(r, a);
5396
5377
  }
5397
5378
  })
5398
5379
  );
@@ -5411,7 +5392,7 @@ async function xi(e, t, i, n) {
5411
5392
  await Cs(e, t);
5412
5393
  else {
5413
5394
  const r = await J(e, "utf8"), a = s.transform(r, t, n);
5414
- await F(t, a);
5395
+ await D(t, a);
5415
5396
  }
5416
5397
  }
5417
5398
  function Zn(e) {
@@ -5420,7 +5401,7 @@ function Zn(e) {
5420
5401
  if (e.source.endsWith(u.sep)) {
5421
5402
  if (e.type === "file")
5422
5403
  throw Error(
5423
- w(
5404
+ b(
5424
5405
  St,
5425
5406
  `Unexpectedly tried to provide an asset with type "file", whose source looks like a directory: ${ee(e.source)}. If source is meant to be a directory, change to "type":"directory". If source is a file, make sure source path does not end with / or \\`
5426
5407
  )
@@ -5450,7 +5431,7 @@ function Uc(e, t, i) {
5450
5431
  const es = (e) => e.replaceAll("../", ""), zc = (e = "") => e.split("?")[0].split("#")[0];
5451
5432
  async function ts(e) {
5452
5433
  const t = new Set(e.map(u.dirname));
5453
- await Promise.all(Array.from(t, async (i) => await z(i, { recursive: !0 })));
5434
+ await Promise.all(Array.from(t, async (i) => await Q(i, { recursive: !0 })));
5454
5435
  }
5455
5436
  const qc = {
5456
5437
  match: (e, t) => t.environment === "production" && e.endsWith(".json"),
@@ -5493,60 +5474,7 @@ const is = (e, t) => ({
5493
5474
  type: "directory",
5494
5475
  source: e,
5495
5476
  destination: u.basename(t)
5496
- }), ns = { type: "directory", source: "assets/", destination: "" };
5497
- function Xc(e) {
5498
- const { stencilCompatibility: t } = e.options.build?.ssr ?? {};
5499
- if (t?.enabled === !0)
5500
- return {
5501
- name: "@arcgis/lumina:buildStencilHydrate",
5502
- async writeBundle() {
5503
- if (e.isInStorybook)
5504
- return;
5505
- const i = N()?.name ?? e.options.build?.cdn?.namespace ?? u.basename(e.dir.root), n = `${i}/hydrate`, s = u.resolve(e.dir.root, t.path ?? "hydrate"), r = "index.d.ts", a = "index.js", c = "index.mjs", l = u.join(s, "index.d.ts"), d = u.join(s, "index.js"), p = u.join(s, "index.mjs"), m = te(s, e.dir.dist), y = `${Array.from(
5506
- new Set(e.apiJsonComponents.map((g) => `import "${m}/${g.importPath}";`))
5507
- ).join(`
5508
- `)}
5509
- export * from "@arcgis/lumina/stencilSsrCompatibility";`;
5510
- await z(s, { recursive: !0 }), await Promise.all([
5511
- F(
5512
- u.join(s, "package.json"),
5513
- `${JSON.stringify(
5514
- {
5515
- name: n,
5516
- description: `${i} component hydration app.`,
5517
- type: "module",
5518
- main: a,
5519
- module: c,
5520
- types: r,
5521
- exports: {
5522
- ".": {
5523
- types: `./${r}`,
5524
- import: `./${c}`,
5525
- require: `./${a}`
5526
- }
5527
- },
5528
- dependencies: {
5529
- "@arcgis/lumina": "*"
5530
- }
5531
- },
5532
- null,
5533
- 2
5534
- )}
5535
- `
5536
- ),
5537
- F(l, y),
5538
- /**
5539
- * We are outputting ESM into a CJS file. Making an assumption here that
5540
- * the CJS output is no longer used by anyone. Otherwise, we would have
5541
- * to build `@arcgis/lumina` as CJS too.
5542
- */
5543
- F(d, y),
5544
- F(p, y)
5545
- ]);
5546
- }
5547
- };
5548
- }
5549
- const dt = "@arcgis/lumina:printTotalBuildSize", Qc = (e) => ({
5477
+ }), ns = { type: "directory", source: "assets/", destination: "" }, dt = "@arcgis/lumina:printTotalBuildSize", Xc = (e) => ({
5550
5478
  name: dt,
5551
5479
  apply: () => e.viteCommand === "build",
5552
5480
  configResolved(t) {
@@ -5557,17 +5485,17 @@ const dt = "@arcgis/lumina:printTotalBuildSize", Qc = (e) => ({
5557
5485
  }
5558
5486
  const n = i.writeBundle;
5559
5487
  if (typeof n != "function")
5560
- throw Error(w(dt, "Expected vite:reporter to declare a writeBundle() function"));
5488
+ throw Error(b(dt, "Expected vite:reporter to declare a writeBundle() function"));
5561
5489
  i.writeBundle = async function(r, a) {
5562
5490
  let c = 0, l = 0, d = 0, p = 0;
5563
5491
  const m = console.log;
5564
- console.log = function(...y) {
5565
- if (m.apply(console, y), y.length === 1 && typeof y[0] == "string") {
5566
- const [g, h] = y[0].match(Yc) ?? [];
5567
- if (!g)
5492
+ console.log = function(...g) {
5493
+ if (m.apply(console, g), g.length === 1 && typeof g[0] == "string") {
5494
+ const [y, h] = g[0].match(Zc) ?? [];
5495
+ if (!y)
5568
5496
  return;
5569
- p || (p = y[0].slice(0, y[0].indexOf(g) + g.length).replaceAll(el, "").length);
5570
- const v = Number.parseFloat(g.replace(" kB", "").replaceAll(",", ""));
5497
+ p || (p = g[0].slice(0, g[0].indexOf(y) + y.length).replaceAll(Yc, "").length);
5498
+ const v = Number.parseFloat(y.replace(" kB", "").replaceAll(",", ""));
5571
5499
  h ? (d += Number.parseFloat(h.replace(" kB", "").replaceAll(",", "")), l += v) : c += v;
5572
5500
  }
5573
5501
  };
@@ -5577,15 +5505,15 @@ const dt = "@arcgis/lumina:printTotalBuildSize", Qc = (e) => ({
5577
5505
  console.log = m;
5578
5506
  }
5579
5507
  if (l > 0) {
5580
- const y = d > 0 ? l : c, g = Ii(y), h = e.dir.relativeDist;
5508
+ const g = d > 0 ? l : c, y = Ii(g), h = e.dir.relativeDist;
5581
5509
  console.log(
5582
5510
  [
5583
5511
  Ai,
5584
5512
  h,
5585
- Zc,
5513
+ Qc,
5586
5514
  "*",
5587
- " ".repeat(p - `${h}*`.length - g.length),
5588
- g,
5515
+ " ".repeat(p - `${h}*`.length - y.length),
5516
+ y,
5589
5517
  ki,
5590
5518
  d > 0 ? ` ${Ai}│ gzip: ${Ii(d)}${ki}` : ""
5591
5519
  ].join("")
@@ -5593,10 +5521,10 @@ const dt = "@arcgis/lumina:printTotalBuildSize", Qc = (e) => ({
5593
5521
  }
5594
5522
  };
5595
5523
  }
5596
- }), ki = "\x1B[22m\x1B[1m\x1B[22m", Ai = "\x1B[2m", Zc = "\x1B[22m\x1B[36m", Yc = /\d+(?:,\d+)?\.\d{2} kB/gu, el = /\x1B\[\d+m/gu, tl = new Intl.NumberFormat("en", {
5524
+ }), ki = "\x1B[22m\x1B[1m\x1B[22m", Ai = "\x1B[2m", Qc = "\x1B[22m\x1B[36m", Zc = /\d+(?:,\d+)?\.\d{2} kB/gu, Yc = /\x1B\[\d+m/gu, el = new Intl.NumberFormat("en", {
5597
5525
  maximumFractionDigits: 2,
5598
5526
  minimumFractionDigits: 2
5599
- }), Ii = (e) => `${tl.format(e)} kB`, Li = "@arcgis/lumina:configureVite", il = (e) => ({
5527
+ }), Ii = (e) => `${el.format(e)} kB`, Li = "@arcgis/lumina:configureVite", tl = (e) => ({
5600
5528
  name: Li,
5601
5529
  async config({
5602
5530
  server: t,
@@ -5604,7 +5532,7 @@ const dt = "@arcgis/lumina:printTotalBuildSize", Qc = (e) => ({
5604
5532
  build: { cssMinify: n, target: s, sourcemap: r, lib: a, rollupOptions: { output: c = [] } = {} } = {},
5605
5533
  test: l = {}
5606
5534
  }) {
5607
- const { include: d, browser: p, environment: m, forceRerunTriggers: f } = l, y = {
5535
+ const { include: d, browser: p, environment: m, forceRerunTriggers: f } = l, g = {
5608
5536
  // Public utilities exposed by the package
5609
5537
  index: "src/index.ts",
5610
5538
  /**
@@ -5614,7 +5542,7 @@ const dt = "@arcgis/lumina:printTotalBuildSize", Qc = (e) => ({
5614
5542
  loader: "src/loader.ts",
5615
5543
  // Entrypoint for bundling used components only:
5616
5544
  ...await Jr(e)
5617
- }, { loader: g, ...h } = y, v = e.environment === "development" || e.isInTest ? {
5545
+ }, { loader: y, ...h } = g, v = e.environment === "development" || e.isInTest ? {
5618
5546
  "process.env.ESRI_INTERNAL": "true"
5619
5547
  } : void 0, S = !import.meta.url.includes("node_modules"), T = {
5620
5548
  /**
@@ -5703,7 +5631,7 @@ const dt = "@arcgis/lumina:printTotalBuildSize", Qc = (e) => ({
5703
5631
  if (typeof l.setupFiles == "string" ? l.setupFiles = [...lt, l.setupFiles] : Array.isArray(l.setupFiles) ? l.setupFiles = [...lt, ...l.setupFiles] : l.setupFiles = [...lt], e.isInPuppeteerTestBackEnd) {
5704
5632
  if (p?.enabled === !0)
5705
5633
  throw Error(
5706
- w(Li, "Can't enable both Vitest browser mode and Puppeteer testing at the same time")
5634
+ b(Li, "Can't enable both Vitest browser mode and Puppeteer testing at the same time")
5707
5635
  );
5708
5636
  return {
5709
5637
  test: {
@@ -5740,7 +5668,7 @@ const dt = "@arcgis/lumina:printTotalBuildSize", Qc = (e) => ({
5740
5668
  target: s ?? Jn(e.typeScriptConfig),
5741
5669
  sourcemap: r ?? (e.environment === "development" ? "inline" : e.options.build?.enableSourceMapsInProduction ?? !1),
5742
5670
  lib: {
5743
- entry: y,
5671
+ entry: g,
5744
5672
  formats: (a ? a.formats : void 0) ?? ["es"]
5745
5673
  },
5746
5674
  rollupOptions: {
@@ -5771,22 +5699,22 @@ const dt = "@arcgis/lumina:printTotalBuildSize", Qc = (e) => ({
5771
5699
  }
5772
5700
  };
5773
5701
  }
5774
- }), nl = (e) => ({
5702
+ }), il = (e) => ({
5775
5703
  name: "@arcgis/lumina:setAssetPath",
5776
5704
  apply: () => e.viteCommand === "build",
5777
5705
  config: (t) => ({
5778
5706
  base: t.base ?? e.options.assets?.defaultPath ?? qe()
5779
5707
  })
5780
5708
  });
5781
- function sl(e = N()) {
5709
+ function nl(e = j()) {
5782
5710
  const t = e.version ?? "0.0.1";
5783
- return bs(t);
5711
+ return ws(t);
5784
5712
  }
5785
- const rl = (e) => `/*! ${e} */`, k = (e) => (t, i) => {
5713
+ const sl = (e) => `/*! ${e} */`, k = (e) => (t, i) => {
5786
5714
  Object.defineProperty(t, i, {
5787
5715
  get() {
5788
5716
  throw Error(
5789
- w(
5717
+ b(
5790
5718
  "@arcgis/lumina:context",
5791
5719
  `Tried to access '${String(i)}' before it was set. You can't access this property in global scope. However, it will be accessible by the time the following Vite plugin hook is called: ${e}`
5792
5720
  )
@@ -5807,7 +5735,7 @@ const rl = (e) => `/*! ${e} */`, k = (e) => (t, i) => {
5807
5735
  function de(e) {
5808
5736
  if (u.isAbsolute(e))
5809
5737
  throw Error(
5810
- w(
5738
+ b(
5811
5739
  "@arcgis/lumina:context",
5812
5740
  `Documentation file name was expected to be a relative path (relative to dist). Instead, received an absolute path: ${e}`
5813
5741
  )
@@ -5821,15 +5749,15 @@ const pe = {
5821
5749
  apiJson: "docs/api.json",
5822
5750
  stencilLikeDocsJson: "docs/docs.json"
5823
5751
  };
5824
- async function ss(e, t, i, n, s = N()) {
5825
- const r = ol(e, i, n, s), a = u.join(t, "lumina.ts"), l = await U(a) ? await J(a, "utf8") : "";
5752
+ async function ss(e, t, i, n, s = j()) {
5753
+ const r = rl(e, i, n, s), a = u.join(t, "lumina.ts"), l = await U(a) ? await J(a, "utf8") : "";
5826
5754
  if (l.trim().replaceAll(`\r
5827
5755
  `, `
5828
5756
  `) === r.trim())
5829
5757
  return !1;
5830
5758
  if (process.env.CI)
5831
5759
  throw Error(
5832
- w(
5760
+ b(
5833
5761
  "@arcgis/lumina:updateLuminaTs",
5834
5762
  `lumina.ts is out of date. Start the vite dev server or build locally at least once to update lumina.ts and commit the updated file. Tried to write the following content:
5835
5763
 
@@ -5842,7 +5770,7 @@ ${l}`
5842
5770
  );
5843
5771
  return Ki(a, r), !0;
5844
5772
  }
5845
- function ol(e, t, i, n = N()) {
5773
+ function rl(e, t, i, n = j()) {
5846
5774
  "@arcgis/components-controllers" in (n.dependencies ?? {}) && C.warn(
5847
5775
  "@arcgis/components-controllers",
5848
5776
  "Deprecation warning: the @arcgis/components-controllers package was merged into @arcgis/lumina. Please remove it from your package.json and rewrite code to import from @arcgis/lumina/controllers and @arcgis/lumina/controllers/accessor instead."
@@ -5857,11 +5785,11 @@ declare module "@arcgis/lumina" {
5857
5785
  interface ImportStencilElements extends ${r.map((m, f) => `JSX$${f}.IntrinsicElements`).join(", ")} {}
5858
5786
  }`, l = n.devDependencies ?? {}, d = i === "preview" ? "matchers" : i === "webdriverio" ? "webdriverio" : "playwright";
5859
5787
  return [
5860
- al,
5788
+ ol,
5861
5789
  // Avoid cyclic references for tests in @arcgis/lumina
5862
5790
  n.name === "@arcgis/lumina" ? "" : `
5863
5791
  /// <reference types="@arcgis/lumina/typings" />`,
5864
- t ? cl : "",
5792
+ t ? al : "",
5865
5793
  l.vitest ? `
5866
5794
  /// <reference types="vitest/config" />` : "",
5867
5795
  l["@vitest/browser"] ? `
@@ -5875,7 +5803,7 @@ declare module "@arcgis/lumina" {
5875
5803
  `
5876
5804
  ].join("");
5877
5805
  }
5878
- const al = `/**
5806
+ const ol = `/**
5879
5807
  * This file is autogenerated by \`@arcgis/lumina-compiler\` - do not edit it manually.
5880
5808
  * Manual edits will be overwritten.
5881
5809
  *
@@ -5883,7 +5811,7 @@ const al = `/**
5883
5811
  * as well as @arcgis/core typings if you use @arcgis/core.
5884
5812
  *
5885
5813
  * If you need to provide additional typings, create a separate file.
5886
- */`, cl = `
5814
+ */`, al = `
5887
5815
  /// <reference types="@arcgis/core/interfaces" />`, je = "@arcgis/lumina:dependencySupport", rs = (e, t) => e.viteCommand === "serve" && /**
5888
5816
  * Vitest started calling transformIndexHtml in browser mode versions ^2.1.4
5889
5817
  * However, it is a bit buggy (see
@@ -5895,10 +5823,10 @@ const al = `/**
5895
5823
  * is doing:
5896
5824
  * https://github.com/storybookjs/storybook/blob/a5c2cf1712f70b4e3ecf38d3c98e7db8e8d67849/code/builders/builder-vite/src/plugins/code-generator-plugin.ts#L110
5897
5825
  */
5898
- e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, ll = (e) => ({
5826
+ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, cl = (e) => ({
5899
5827
  name: je,
5900
5828
  configResolved() {
5901
- !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = dl(e).catch(
5829
+ !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = ll(e).catch(
5902
5830
  (t) => C.error(je, `Failed to update package's src/lumina.ts: ${String(t)}`)
5903
5831
  ));
5904
5832
  },
@@ -5938,7 +5866,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
5938
5866
  return n.optimizableImports;
5939
5867
  if ("cssHref" in n)
5940
5868
  return [];
5941
- throw Error(w(je, `Unexpected loader type: ${JSON.stringify(n)}`));
5869
+ throw Error(b(je, `Unexpected loader type: ${JSON.stringify(n)}`));
5942
5870
  });
5943
5871
  e.viteConfig.optimizeDeps.include ??= [], e.viteConfig.optimizeDeps.include.push(...i);
5944
5872
  },
@@ -5946,7 +5874,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
5946
5874
  await e._updateLuminaTsPromise;
5947
5875
  }
5948
5876
  });
5949
- async function dl(e) {
5877
+ async function ll(e) {
5950
5878
  const i = (await Promise.all([ve, Gn(e)])).flat();
5951
5879
  if (!await ss(
5952
5880
  i,
@@ -5957,22 +5885,22 @@ async function dl(e) {
5957
5885
  return;
5958
5886
  let s = !1;
5959
5887
  function r() {
5960
- s || C.warn(je, pl), s = !0;
5888
+ s || C.warn(je, dl), s = !0;
5961
5889
  }
5962
5890
  process.on("exit", () => {
5963
5891
  r(), clearTimeout(c);
5964
5892
  });
5965
5893
  const c = setTimeout(r, 2e3);
5966
5894
  }
5967
- const pl = Rs.greenBright(
5895
+ const dl = Rs.greenBright(
5968
5896
  `lumina.ts has been updated (potentially because your dependencies changed). Please commit the updated file.
5969
5897
  If build failed with TypeScript errors, try running the build again to check whether new lumina.ts resolves the errors.`
5970
5898
  );
5971
- async function ul(e, t) {
5899
+ async function pl(e, t) {
5972
5900
  const i = /* @__PURE__ */ new Map();
5973
5901
  await Promise.all(
5974
5902
  e.map(async (s) => {
5975
- const r = await J(s, "utf-8"), a = r.match(ml)?.[1];
5903
+ const r = await J(s, "utf-8"), a = r.match(ul)?.[1];
5976
5904
  if (a === void 0) {
5977
5905
  C.warn(
5978
5906
  "@arcgis/lumina:parseStoryFiles",
@@ -5984,14 +5912,14 @@ async function ul(e, t) {
5984
5912
  let c = i.get(a);
5985
5913
  c === void 0 && (c = [], i.set(a, c));
5986
5914
  const l = [];
5987
- for (const d of r.matchAll(fl)) {
5988
- const p = d[1], m = vl(p), f = r.indexOf("{", d.index), y = r.indexOf("}", f), g = r.slice(0, d.index).trimEnd();
5915
+ for (const d of r.matchAll(ml)) {
5916
+ const p = d[1], m = hl(p), f = r.indexOf("{", d.index), g = r.indexOf("}", f), y = r.slice(0, d.index).trimEnd();
5989
5917
  let h = "";
5990
- if (g.endsWith("*/")) {
5991
- const T = g.lastIndexOf("/**");
5992
- h = g.slice(T + 3, -2).trim().replaceAll(gl, "");
5918
+ if (y.endsWith("*/")) {
5919
+ const T = y.lastIndexOf("/**");
5920
+ h = y.slice(T + 3, -2).trim().replaceAll(gl, "");
5993
5921
  }
5994
- const v = r.slice(f, y).match(yl)?.[1] || m, S = hl(m);
5922
+ const v = r.slice(f, g).match(fl)?.[1] || m, S = yl(m);
5995
5923
  l.push({
5996
5924
  description: `${v}${h ? `
5997
5925
  ${h}` : ""}`,
@@ -6016,17 +5944,17 @@ ${h}` : ""}`,
6016
5944
  }
6017
5945
  return n;
6018
5946
  }
6019
- const ml = /component: ["']([^"']+)["']/u, fl = /export const (\w+)/gu, yl = /name: ["']([^"']+)["']/u, gl = /^\s*\*\s?/gmu, hl = (e) => e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/giu, "-").replace(/-+/gu, "-").replace(/^-+/u, "").replace(/-+$/u, ""), vl = (e) => e.replace(/_/gu, " ").replace(/-/gu, " ").replace(/\./gu, " ").replace(/([^\n])([A-Z])([a-z])/gu, (t, i, n, s) => `${i} ${n}${s}`).replace(/([a-z])([A-Z])/gu, (t, i, n) => `${i} ${n}`).replace(/([a-z])([0-9])/giu, (t, i, n) => `${i} ${n}`).replace(/([0-9])([a-z])/giu, (t, i, n) => `${i} ${n}`).replace(/(\s|^)(\w)/gu, (t, i, n) => `${i}${n.toUpperCase()}`).replace(/ +/gu, " ").trim();
6020
- var Sl = Object.defineProperty, A = (e, t, i, n) => {
5947
+ const ul = /component: ["']([^"']+)["']/u, ml = /export const (\w+)/gu, fl = /name: ["']([^"']+)["']/u, gl = /^\s*\*\s?/gmu, yl = (e) => e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/giu, "-").replace(/-+/gu, "-").replace(/^-+/u, "").replace(/-+$/u, ""), hl = (e) => e.replace(/_/gu, " ").replace(/-/gu, " ").replace(/\./gu, " ").replace(/([^\n])([A-Z])([a-z])/gu, (t, i, n, s) => `${i} ${n}${s}`).replace(/([a-z])([A-Z])/gu, (t, i, n) => `${i} ${n}`).replace(/([a-z])([0-9])/giu, (t, i, n) => `${i} ${n}`).replace(/([0-9])([a-z])/giu, (t, i, n) => `${i} ${n}`).replace(/(\s|^)(\w)/gu, (t, i, n) => `${i}${n.toUpperCase()}`).replace(/ +/gu, " ").trim();
5948
+ var vl = Object.defineProperty, A = (e, t, i, n) => {
6021
5949
  for (var s = void 0, r = e.length - 1, a; r >= 0; r--)
6022
5950
  (a = e[r]) && (s = a(t, i, s) || s);
6023
- return s && Sl(t, i, s), s;
5951
+ return s && vl(t, i, s), s;
6024
5952
  };
6025
- const ie = "@arcgis/lumina:context";
5953
+ const te = "@arcgis/lumina:context";
6026
5954
  class P {
6027
5955
  constructor(t) {
6028
5956
  this.typeScriptProgram = void 0, this.typeScriptTypeChecker = void 0, this.typeScriptWatchProgram = void 0, this._typeScriptSourceFiles = /* @__PURE__ */ new Map(), this._typeScriptReload = void 0, this._plugin = {
6029
- name: ie,
5957
+ name: te,
6030
5958
  // Make sure these globals are available to all plugins as soon as possible
6031
5959
  enforce: "pre",
6032
5960
  apply: (s, r) => (this._inferBuildSetup(r, s.define), !0),
@@ -6036,7 +5964,7 @@ class P {
6036
5964
  this.viteConfig = s;
6037
5965
  const r = s.build.minify !== !1;
6038
5966
  this.shouldMinify = r && this.viteCommand !== "serve", Object.hasOwn(this, "shouldMinifyJsx") || (this.shouldMinifyJsx = this.viteCommand !== "serve" || this.isInTest);
6039
- const a = u.join(s.root, u.sep), c = u.join(a, "src", u.sep), l = u.join(c, "components", u.sep), d = u.join(u.resolve(a, s.build.outDir), u.sep), p = u.join(u.relative(a, d), u.sep), m = u.join(d, "components", u.sep), f = u.join(d, this.options.build?.cdn?.namespace ?? Dt, u.sep), y = u.join(f, "assets", u.sep);
5967
+ const a = u.join(s.root, u.sep), c = u.join(a, "src", u.sep), l = u.join(c, "components", u.sep), d = u.join(u.resolve(a, s.build.outDir), u.sep), p = u.join(u.relative(a, d), u.sep), m = u.join(d, "components", u.sep), f = u.join(d, this.options.build?.cdn?.namespace ?? Dt, u.sep), g = u.join(f, "assets", u.sep);
6040
5968
  if (this.dir = {
6041
5969
  root: a,
6042
5970
  src: c,
@@ -6045,25 +5973,25 @@ class P {
6045
5973
  dist: d,
6046
5974
  distComponents: m,
6047
5975
  distCdn: f,
6048
- distCdnAssets: y
5976
+ distCdnAssets: g
6049
5977
  }, C.initialize(s.logger, a), s.root !== Mi())
6050
5978
  throw Error(
6051
- w(
6052
- ie,
5979
+ b(
5980
+ te,
6053
5981
  "Vite's config.root is not equal process.cwd(). This is not officially supported by Lumina and may lead to unexpected behavior. If you need this to be supported, comment on https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2126 or contact Lumina maintainers."
6054
5982
  )
6055
5983
  );
6056
5984
  d === a ? C.warn(
6057
- ie,
5985
+ te,
6058
5986
  "Vite output directory is set to the root directory. This can produce unexpected behavior. Please set the output directory to a subdirectory of the root directory (i.e dist/)"
6059
5987
  ) : p.startsWith("..") && C.warn(
6060
- ie,
5988
+ te,
6061
5989
  "Vite output directory is outside the root directory. This is not officially supported by Lumina and may lead to unexpected behavior. Contact Lumina maintainers if you need this to be supported."
6062
5990
  ), this.isInStorybook = s.resolve.conditions.includes("storybook"), this.isFullApiExtraction = this.viteCommand === "build" || this.isInStorybook, this.hmrEnabled = this.viteCommand === "serve" && !this.isInTest && !!(s.server?.hmr ?? !0);
6063
- const g = this.options.documentation?.publicStoryUrlPrefix;
6064
- this.isFullApiExtraction && typeof g == "string" ? this.componentStoriesPromise = this.componentFilesPromise.then(async () => await ul(this.componentStoryFiles, g)).then((h) => {
5991
+ const y = this.options.documentation?.publicStoryUrlPrefix;
5992
+ this.isFullApiExtraction && typeof y == "string" ? this.componentStoriesPromise = this.componentFilesPromise.then(async () => await pl(this.componentStoryFiles, y)).then((h) => {
6065
5993
  this.componentStories = h;
6066
- }) : (this.componentStoriesPromise = void 0, this.componentStories = void 0), wc(this, s.build.sourcemap !== !1), rs(this) && Te(this);
5994
+ }) : (this.componentStoriesPromise = void 0, this.componentStories = void 0), bc(this, s.build.sourcemap !== !1), rs(this) && Te(this);
6067
5995
  }
6068
5996
  },
6069
5997
  configureServer: {
@@ -6091,9 +6019,9 @@ class P {
6091
6019
  webTypes: i.jetBrains === !1 ? void 0 : i.jetBrains?.webTypesFileName ? de(i.jetBrains.webTypesFileName) : pe.webTypes,
6092
6020
  vsCodeHtml: i.vsCode === !1 ? void 0 : i.vsCode?.htmlFileName ? de(i.vsCode.htmlFileName) : pe.vsCodeHtml,
6093
6021
  vsCodeCss: i.vsCode === !1 ? void 0 : i.vsCode?.cssFileName ? de(i.vsCode.cssFileName) : pe.vsCodeCss
6094
- }, yn(), this.componentFilesPromise = xt(this, u.resolve("src/components")), bc(this);
6095
- const n = t.build?.preamble ?? sl();
6096
- this.banner = rl(n);
6022
+ }, gn(), this.componentFilesPromise = xt(this, u.resolve("src/components")), wc(this);
6023
+ const n = t.build?.preamble ?? nl();
6024
+ this.banner = sl(n);
6097
6025
  }
6098
6026
  _inferBuildSetup({ command: t, mode: i }, n) {
6099
6027
  this.isInTest = process.env.NODE_ENV === "test", i === "production" || i === "development" ? this.environment = i : i === "test" || i === "benchmark" ? (this.environment = "development", this.isInTest = !0) : (C.warn(kt, `Vite is running in unknown mode "${i}". Assuming development`), this.environment = "development"), this.viteCommand = t;
@@ -6115,7 +6043,7 @@ class P {
6115
6043
  return n;
6116
6044
  } else {
6117
6045
  if (this.viteCommand === "build" || this.isInStorybook)
6118
- throw Error(w(ie, t, "Unable to find the TypeScript source file"));
6046
+ throw Error(b(te, t, "Unable to find the TypeScript source file"));
6119
6047
  {
6120
6048
  const r = this._typeScriptSourceFiles.get(t);
6121
6049
  r !== void 0 && r.text === i && (n = r);
@@ -6163,8 +6091,8 @@ class P {
6163
6091
  n === "serve" && fe(this, t, i);
6164
6092
  else
6165
6093
  throw Error(
6166
- w(
6167
- ie,
6094
+ b(
6095
+ te,
6168
6096
  "It is too late to call provideAssets() as Vite already wrote the bundle to disk. Please call provideAssets() before Vite's writeBundle()"
6169
6097
  )
6170
6098
  );
@@ -6251,12 +6179,12 @@ A([
6251
6179
  A([
6252
6180
  k("configResolved()")
6253
6181
  ], P.prototype, "_typeScriptPrinter");
6254
- const pt = "@arcgis/lumina:addNonLazyImports", bl = (e) => ({
6182
+ const pt = "@arcgis/lumina:addNonLazyImports", Sl = (e) => ({
6255
6183
  name: pt,
6256
6184
  apply: () => e.viteCommand === "build",
6257
6185
  generateBundle(t, i) {
6258
6186
  Object.entries(i).forEach(([n, s]) => {
6259
- const r = ge(n, "components/", e);
6187
+ const r = ye(n, "components/", e);
6260
6188
  if (r !== n && (s.fileName = r), s.type === "chunk") {
6261
6189
  const a = u.dirname(u.join(e.dir.dist, n)), c = r === n ? a : u.dirname(u.join(e.dir.dist, r));
6262
6190
  s.code = _i(s.code, e, c, a);
@@ -6278,7 +6206,7 @@ const pt = "@arcgis/lumina:addNonLazyImports", bl = (e) => ({
6278
6206
  }), (a.length > 0 || c.length > 0) && d.length === 0) {
6279
6207
  const p = ee(r);
6280
6208
  throw Error(
6281
- w(
6209
+ b(
6282
6210
  pt,
6283
6211
  `Unable to determine what files imported ${p}. This is necessary because this file referenced other web components (${[...a, ...c].join(", ")}), and so the compiler needs to know what component entrypoints these imports should be added to. Please double check if you are referencing ${p} in the code dynamically in the way that Lumina cannot detect, and report this issue to the Lumina maintainers.`
6284
6212
  )
@@ -6288,40 +6216,40 @@ const pt = "@arcgis/lumina:addNonLazyImports", bl = (e) => ({
6288
6216
  const s = i.flatMap(([r, { referencedTagNames: a, referencedDeferredTagNames: c }]) => {
6289
6217
  if (!n.has(r))
6290
6218
  return [];
6291
- const l = u.dirname(r), d = ge(l, e.dir.srcComponents, e), p = u.relative(e.dir.src, d);
6292
- function m(b) {
6293
- const E = Qa(e, b, r);
6219
+ const l = u.dirname(r), d = ye(l, e.dir.srcComponents, e), p = u.relative(e.dir.src, d);
6220
+ function m(w) {
6221
+ const E = Qa(e, w, r);
6294
6222
  if (E === void 0)
6295
6223
  return;
6296
6224
  const I = Za(E, p);
6297
6225
  if (I !== `./${p}`)
6298
6226
  return I.startsWith(".") ? `${I}/${Fi}` : I;
6299
6227
  }
6300
- const f = new Set(a), y = new Set(c), g = Array.from(f, m).filter(R), h = (b) => `import "${b}";
6301
- `, v = g.map(h).join(""), S = /* @__PURE__ */ new Set(), T = Array.from(y, (b) => {
6302
- const E = m(b);
6228
+ const f = new Set(a), g = new Set(c), y = Array.from(f, m).filter(R), h = (w) => `import "${w}";
6229
+ `, v = y.map(h).join(""), S = /* @__PURE__ */ new Set(), T = Array.from(g, (w) => {
6230
+ const E = m(w);
6303
6231
  if (E !== void 0) {
6304
- if (f.has(b)) {
6232
+ if (f.has(w)) {
6305
6233
  C.warn(
6306
6234
  pt,
6307
- `"${b}" is used both with and without deferLoad in ${r} (either directly in ${r} or via a functional component). deferLoad will be ignored in this case.`
6235
+ `"${w}" is used both with and without deferLoad in ${r} (either directly in ${r} or via a functional component). deferLoad will be ignored in this case.`
6308
6236
  );
6309
6237
  return;
6310
6238
  }
6311
- return S.add(h(E)), `.set("${b}", () => import("${E}"))
6239
+ return S.add(h(E)), `.set("${w}", () => import("${E}"))
6312
6240
  `;
6313
6241
  }
6314
6242
  }).filter(R), x = `${v}export * from "./${Tt}";`, L = Array.from(S).join("") + x, $ = T.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
6315
6243
  ${x}
6316
6244
  deferredLoaders${T.join("")};` : x;
6317
6245
  return [
6318
- F(u.join(e.dir.dist, p, Fi), $),
6319
- F(u.join(e.dir.dist, p, wl), L)
6246
+ D(u.join(e.dir.dist, p, Fi), $),
6247
+ D(u.join(e.dir.dist, p, wl), L)
6320
6248
  ];
6321
6249
  });
6322
6250
  await Promise.all(s);
6323
6251
  }
6324
- }), Fi = "index.js", wl = "index.d.ts", os = (e, t, i, n = /* @__PURE__ */ new Set()) => t.flatMap((s) => i.has(s) ? [s] : n.has(s) ? [] : (n.add(s), os(e, e[s].referencedBy, i, n))), Tl = (e) => ({
6252
+ }), Fi = "index.js", wl = "index.d.ts", os = (e, t, i, n = /* @__PURE__ */ new Set()) => t.flatMap((s) => i.has(s) ? [s] : n.has(s) ? [] : (n.add(s), os(e, e[s].referencedBy, i, n))), bl = (e) => ({
6325
6253
  name: "@arcgis/lumina:handleDynamicAssets",
6326
6254
  configureServer(t) {
6327
6255
  e.server = t, !e.isInPuppeteerTestBackEnd && Ni(e).forEach(({ assets: i, transformers: n }) => fe(e, i, n));
@@ -6340,24 +6268,24 @@ function Ni(e) {
6340
6268
  "type" in n ? t.push(n) : "assets" in n && t.push(...n.assets);
6341
6269
  }), t.length > 0 && i.push({ assets: t }), e.assetsToProvide = void 0, i;
6342
6270
  }
6343
- const bt = "@arcgis/lumina:updatePackageJson", El = (e) => ({
6344
- name: bt,
6271
+ const wt = "@arcgis/lumina:updatePackageJson", Tl = (e) => ({
6272
+ name: wt,
6345
6273
  apply: () => e.viteCommand === "serve" && e.environment === "development" && !e.isInTest && !e.isInCi,
6346
6274
  configResolved() {
6347
- Cl(e).catch(
6348
- (t) => C.error(bt, `Failed to update package's package.json:${String(t)}`)
6275
+ El(e).catch(
6276
+ (t) => C.error(wt, `Failed to update package's package.json:${String(t)}`)
6349
6277
  );
6350
6278
  }
6351
6279
  });
6352
- async function Cl(e) {
6353
- const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await J(t, "utf-8")), n = $l(i, e);
6280
+ async function El(e) {
6281
+ const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await J(t, "utf-8")), n = Cl(i, e);
6354
6282
  n && Ki(t, JSON.stringify(n, null, 2));
6355
6283
  }
6356
- function $l(e, t) {
6284
+ function Cl(e, t) {
6357
6285
  const i = e?.devDependencies ?? {};
6358
6286
  Object.keys(e?.peerDependencies ?? {}).forEach((d) => {
6359
6287
  d in i || C.warn(
6360
- bt,
6288
+ wt,
6361
6289
  `Every peerDependency should also be a devDependency, or else some tools will get confused (like Turbo Build). Found "${d}" that is not a devDependency. Please edit your package.json`
6362
6290
  );
6363
6291
  });
@@ -6379,7 +6307,7 @@ function $l(e, t) {
6379
6307
  const d = s(r.webTypes);
6380
6308
  e["web-types"] !== d && (n = !0, e["web-types"] = d);
6381
6309
  }
6382
- const a = `./${we}.css`, c = t.options.build?.cdn?.namespace !== void 0, l = te(
6310
+ const a = `./${be}.css`, c = t.options.build?.cdn?.namespace !== void 0, l = oe(
6383
6311
  t.dir.root,
6384
6312
  u.join(t.dir.distCdn, a)
6385
6313
  );
@@ -6392,20 +6320,20 @@ function $l(e, t) {
6392
6320
  if (n)
6393
6321
  return e;
6394
6322
  }
6395
- const Pl = (e) => ({
6323
+ const $l = (e) => ({
6396
6324
  timestamp: e.apiJson.timestamp,
6397
6325
  compiler: e.apiJson.compiler,
6398
- components: xl(e),
6326
+ components: Pl(e),
6399
6327
  typeLibrary: {}
6400
6328
  });
6401
- function xl(e) {
6329
+ function Pl(e) {
6402
6330
  const t = [];
6403
6331
  for (const i of e.apiJson.modules)
6404
6332
  for (const n of i.declarations)
6405
- "customElement" in n && t.push(kl(n, i.path));
6333
+ "customElement" in n && t.push(xl(n, i.path));
6406
6334
  return t;
6407
6335
  }
6408
- function kl(e, t) {
6336
+ function xl(e, t) {
6409
6337
  const i = e.superclass ? [{ name: "superclass", text: JSON.stringify(e.superclass) }] : [];
6410
6338
  return {
6411
6339
  filePath: t,
@@ -6420,9 +6348,9 @@ function kl(e, t) {
6420
6348
  dependencies: [],
6421
6349
  dependencyGraph: {},
6422
6350
  deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated,
6423
- props: e.members.map(Al).filter(R),
6424
- methods: e.members.map(Il).filter(R),
6425
- events: e.events?.map(Ll) ?? [],
6351
+ props: e.members.map(kl).filter(R),
6352
+ methods: e.members.map(Al).filter(R),
6353
+ events: e.events?.map(Il) ?? [],
6426
6354
  styles: e.cssProperties?.map((n) => ({
6427
6355
  name: n.name,
6428
6356
  annotation: "prop",
@@ -6434,7 +6362,7 @@ function kl(e, t) {
6434
6362
  listeners: []
6435
6363
  };
6436
6364
  }
6437
- function Al(e) {
6365
+ function kl(e) {
6438
6366
  if (e.kind !== "field")
6439
6367
  return;
6440
6368
  const t = e, i = t.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(t.inheritedFrom) }] : [], n = t.readonly ? [{ name: "readonly", text: "" }] : [], s = t.docsTags?.some((r) => r.name === "required") ?? !1;
@@ -6475,7 +6403,7 @@ const Mt = (e) => Object.fromEntries(
6475
6403
  ]
6476
6404
  ) ?? []
6477
6405
  );
6478
- function Il(e) {
6406
+ function Al(e) {
6479
6407
  if (e.kind !== "method")
6480
6408
  return;
6481
6409
  const t = e, i = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [], n = t.parameters?.map(({ name: s, type: r, description: a }) => ({
@@ -6506,7 +6434,7 @@ function Il(e) {
6506
6434
  deprecation: typeof t.deprecated == "boolean" ? t.deprecated ? "" : void 0 : t.deprecated
6507
6435
  };
6508
6436
  }
6509
- function Ll(e) {
6437
+ function Il(e) {
6510
6438
  const t = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [];
6511
6439
  return {
6512
6440
  event: e.name,
@@ -6534,14 +6462,14 @@ const as = (e) => e.flatMap(
6534
6462
  name: `::part(${i.name})`,
6535
6463
  description: i.description || void 0
6536
6464
  })) ?? []
6537
- ), Fl = (e) => e.attributes?.map((t) => ({
6465
+ ), Ll = (e) => e.attributes?.map((t) => ({
6538
6466
  name: t.name ?? "",
6539
6467
  description: Qe(t.description, t.deprecated) || void 0,
6540
6468
  default: t.default,
6541
6469
  value: {
6542
- type: Nl(t.type.values?.map(sn))
6470
+ type: Fl(t.type.values?.map(sn))
6543
6471
  }
6544
- })) ?? [], Nl = (e) => e?.length === 1 ? e[0] : e, Qe = (e = "", t = !1) => t === !1 ? e : `**Deprecated**${typeof t == "string" ? `: ${t}` : ""}. ${e}`, $e = {
6472
+ })) ?? [], Fl = (e) => e?.length === 1 ? e[0] : e, Qe = (e = "", t = !1) => t === !1 ? e : `**Deprecated**${typeof t == "string" ? `: ${t}` : ""}. ${e}`, $e = {
6545
6473
  slots: "Slots",
6546
6474
  events: "Events",
6547
6475
  cssProperties: "CSS Properties",
@@ -6549,7 +6477,7 @@ const as = (e) => e.flatMap(
6549
6477
  methods: "Methods"
6550
6478
  };
6551
6479
  function ls(e) {
6552
- const t = Dl(e.slots), i = jl(e.events), n = Rl(e.cssProperties), s = Ml(e.cssParts), r = Ol(e.members), a = Qe(e.description, e.deprecated).trim();
6480
+ const t = Nl(e.slots), i = Dl(e.events), n = jl(e.cssProperties), s = Rl(e.cssParts), r = Ml(e.members), a = Qe(e.description, e.deprecated).trim();
6553
6481
  return [...a ? [`${a}
6554
6482
  --`] : [], i, r, t, n, s].filter(Boolean).join(`
6555
6483
 
@@ -6557,28 +6485,28 @@ function ls(e) {
6557
6485
  }
6558
6486
  const Pe = (e, t) => t === void 0 || t.length === 0 ? "" : `### ${e}
6559
6487
  ${t.join(`
6560
- `)}`, Dl = (e) => Pe(
6488
+ `)}`, Nl = (e) => Pe(
6561
6489
  $e.slots,
6562
6490
  e?.map((t) => `- ${t.name ? `**${t.name}**` : "_default_"} - ${t.description}`)
6563
- ), jl = (e) => Pe(
6491
+ ), Dl = (e) => Pe(
6564
6492
  $e.events,
6565
6493
  e?.filter((t) => t.name !== null && t.name !== void 0).map((t) => `- **${t.name}**${t.description ? ` - ${t.description}` : ""}`)
6566
- ), Rl = (e = []) => Pe(
6494
+ ), jl = (e = []) => Pe(
6567
6495
  $e.cssProperties,
6568
6496
  e?.map(
6569
6497
  (t) => `- **${t.name}** - ${t.description} ${t.default ? `_(default: ${t.default})_}` : ""}`
6570
6498
  )
6571
- ), Ml = (e) => Pe(
6499
+ ), Rl = (e) => Pe(
6572
6500
  $e.cssParts,
6573
6501
  e?.map((t) => `- **${t.name}** - ${t.description}`)
6574
- ), Ol = (e) => Pe(
6502
+ ), Ml = (e) => Pe(
6575
6503
  $e.methods,
6576
- e.filter(gs).map(
6504
+ e.filter(ys).map(
6577
6505
  (t) => [`- \`${t.name}${t.signature}\``, Qe(t.description, t.deprecated)].filter(Boolean).join(" - ")
6578
6506
  )
6579
6507
  );
6580
- function Jl(e, t) {
6581
- const i = Kl(e), n = as(e), s = cs(e), r = N();
6508
+ function Ol(e, t) {
6509
+ const i = Jl(e), n = as(e), s = cs(e), r = j();
6582
6510
  return {
6583
6511
  $schema: "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
6584
6512
  name: r.name,
@@ -6596,21 +6524,21 @@ function Jl(e, t) {
6596
6524
  }
6597
6525
  };
6598
6526
  }
6599
- const Kl = (e) => e.map((t) => ({
6527
+ const Jl = (e) => e.map((t) => ({
6600
6528
  name: t.tagName,
6601
6529
  description: ls(t),
6602
6530
  "doc-url": t.demos?.[0]?.url,
6603
- attributes: Fl(t),
6531
+ attributes: Ll(t),
6604
6532
  slots: t.slots?.map((i) => ({
6605
6533
  name: i.name,
6606
6534
  description: i.description
6607
6535
  })),
6608
6536
  events: Di(t),
6609
6537
  js: {
6610
- properties: Wl(t),
6538
+ properties: Kl(t),
6611
6539
  events: Di(t)
6612
6540
  }
6613
- })), Wl = (e) => e.members.filter(hs).map((t) => ({
6541
+ })), Kl = (e) => e.members.filter(hs).map((t) => ({
6614
6542
  name: t.name,
6615
6543
  description: t.description,
6616
6544
  type: t.type?.text
@@ -6618,30 +6546,30 @@ const Kl = (e) => e.map((t) => ({
6618
6546
  name: t.name,
6619
6547
  type: t.type?.text,
6620
6548
  description: t.description
6621
- })) ?? [], Bl = (e) => e.map((t) => ({
6549
+ })) ?? [], Wl = (e) => e.map((t) => ({
6622
6550
  name: t.tagName,
6623
6551
  description: ls(t),
6624
- attributes: _l(t),
6552
+ attributes: Bl(t),
6625
6553
  references: t.demos?.map((i) => ({ name: i.description, url: i.url })) ?? []
6626
- })), _l = (e) => e.attributes?.map((t) => ({
6554
+ })), Bl = (e) => e.attributes?.map((t) => ({
6627
6555
  name: t.name,
6628
6556
  description: Qe(t.description, t.deprecated) || void 0,
6629
- values: Hl(t)
6630
- })) ?? [], Hl = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], Ul = (e) => ({
6557
+ values: _l(t)
6558
+ })) ?? [], _l = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], Hl = (e) => ({
6631
6559
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
6632
6560
  version: 1.1,
6633
- tags: Bl(e)
6634
- }), zl = (e) => ({
6561
+ tags: Wl(e)
6562
+ }), Ul = (e) => ({
6635
6563
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
6636
6564
  version: 1.1,
6637
6565
  properties: as(e),
6638
6566
  pseudoElements: cs(e)
6639
- }), ql = "@arcgis/lumina:generateDocs";
6640
- function Gl(e) {
6567
+ }), zl = "@arcgis/lumina:generateDocs";
6568
+ function ql(e) {
6641
6569
  return e._documentationFileNames.stencilLikeDocsJson !== void 0 && e.provideAssets([
6642
6570
  {
6643
6571
  type: "dynamic",
6644
- source: () => JSON.stringify(Pl(e), null, 2),
6572
+ source: () => JSON.stringify($l(e), null, 2),
6645
6573
  destination: u.join("../..", e._documentationFileNames.stencilLikeDocsJson)
6646
6574
  }
6647
6575
  ]), e._documentationFileNames.apiJson !== void 0 && e.provideAssets([
@@ -6651,7 +6579,7 @@ function Gl(e) {
6651
6579
  destination: u.join("../..", e._documentationFileNames.apiJson)
6652
6580
  }
6653
6581
  ]), {
6654
- name: ql,
6582
+ name: zl,
6655
6583
  async writeBundle() {
6656
6584
  if (e.isInStorybook)
6657
6585
  return;
@@ -6661,24 +6589,24 @@ function Gl(e) {
6661
6589
  await ts(a);
6662
6590
  const c = [];
6663
6591
  if (n !== void 0) {
6664
- const l = JSON.stringify(Ul(e.apiJsonComponents), null, 2);
6665
- c.push(F(n, l));
6592
+ const l = JSON.stringify(Hl(e.apiJsonComponents), null, 2);
6593
+ c.push(D(n, l));
6666
6594
  }
6667
6595
  if (s !== void 0) {
6668
- const l = JSON.stringify(zl(e.apiJsonComponents), null, 2);
6669
- c.push(F(s, l));
6596
+ const l = JSON.stringify(Ul(e.apiJsonComponents), null, 2);
6597
+ c.push(D(s, l));
6670
6598
  }
6671
6599
  if (r !== void 0) {
6672
- const l = Jl(e.apiJsonComponents, typeof t == "object" ? t : {});
6673
- c.push(F(r, JSON.stringify(l, null, 2)));
6600
+ const l = Ol(e.apiJsonComponents, typeof t == "object" ? t : {});
6601
+ c.push(D(r, JSON.stringify(l, null, 2)));
6674
6602
  }
6675
6603
  await Promise.all(c);
6676
6604
  }
6677
6605
  };
6678
6606
  }
6679
- const Vl = (e) => `import type { h, EventHandler } from "@arcgis/lumina";
6607
+ const Gl = (e) => `import type { h, EventHandler } from "@arcgis/lumina";
6680
6608
 
6681
- ${e.map(Xl).join(`
6609
+ ${e.map(Vl).join(`
6682
6610
 
6683
6611
  `)}
6684
6612
 
@@ -6690,7 +6618,7 @@ ${e.map(({ tagName: t, pascalCaseName: i }) => ` "${t}": Lumina${i};`).join
6690
6618
  }
6691
6619
  }
6692
6620
  }`;
6693
- function Xl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6621
+ function Vl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6694
6622
  const [s, r] = Xe(e, i);
6695
6623
  return [
6696
6624
  `interface Lumina${t} extends ${s}h.JSX.HTMLAttributes<HTML${t}Element> {
@@ -6703,7 +6631,7 @@ function Xl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6703
6631
  r
6704
6632
  ].join("");
6705
6633
  }
6706
- function Ql(e) {
6634
+ function Xl(e) {
6707
6635
  const t = ` interface IntrinsicElements extends PreactJsx.IntrinsicElements {
6708
6636
  ${e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": Preact${i};`).join(`
6709
6637
  `)}
@@ -6711,7 +6639,7 @@ ${e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": Preact${i};`).join
6711
6639
  return `import { JSX as PreactJsx } from "preact";
6712
6640
  import type { EventHandler } from "@arcgis/lumina";
6713
6641
 
6714
- ${e.map(Zl).join(`
6642
+ ${e.map(Ql).join(`
6715
6643
 
6716
6644
  `)}
6717
6645
 
@@ -6724,7 +6652,7 @@ ${t}
6724
6652
  }
6725
6653
  }`;
6726
6654
  }
6727
- function Zl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6655
+ function Ql({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6728
6656
  const [s, r] = Xe(e, i);
6729
6657
  return [
6730
6658
  `interface Preact${t} extends ${s}PreactJsx.HTMLAttributes<HTML${t}Element> {
@@ -6737,13 +6665,13 @@ function Zl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6737
6665
  r
6738
6666
  ].join("");
6739
6667
  }
6740
- function Yl(e) {
6668
+ function Zl(e) {
6741
6669
  const t = e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": React${i};`).join(`
6742
6670
  `);
6743
6671
  return `import type { HTMLProps } from 'react';
6744
6672
  import type { EventHandler } from "@arcgis/lumina";
6745
6673
 
6746
- ${e.map(ed).join(`
6674
+ ${e.map(Yl).join(`
6747
6675
 
6748
6676
  `)}
6749
6677
 
@@ -6769,7 +6697,7 @@ ${t}
6769
6697
  }
6770
6698
  }`;
6771
6699
  }
6772
- function ed({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6700
+ function Yl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6773
6701
  const [s, r] = Xe(e, i);
6774
6702
  return [
6775
6703
  `interface React${t} extends ${s}HTMLProps<HTML${t}Element> {
@@ -6782,10 +6710,10 @@ function ed({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6782
6710
  r
6783
6711
  ].join("");
6784
6712
  }
6785
- const td = (e) => `import { JSXBase as StencilJsx } from "@stencil/core/internal";
6713
+ const ed = (e) => `import { JSXBase as StencilJsx } from "@stencil/core/internal";
6786
6714
  import type { EventHandler } from "@arcgis/lumina";
6787
6715
 
6788
- ${e.map(id).join(`
6716
+ ${e.map(td).join(`
6789
6717
 
6790
6718
  `)}
6791
6719
 
@@ -6803,7 +6731,7 @@ declare module "@stencil/core/internal/stencil-public-runtime" {
6803
6731
  interface IntrinsicElements extends ExposedElements {}
6804
6732
  }
6805
6733
  }`;
6806
- function id({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6734
+ function td({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6807
6735
  const [s, r] = Xe(e, i);
6808
6736
  return [
6809
6737
  `interface Stencil${t} extends ${s}StencilJsx.HTMLAttributes<HTML${t}Element> {
@@ -6816,16 +6744,16 @@ function id({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6816
6744
  r
6817
6745
  ].join("");
6818
6746
  }
6819
- const nd = (e, t, i) => [i, t, sd(e), rd(e)].join(`
6747
+ const id = (e, t, i) => [i, t, nd(e), sd(e)].join(`
6820
6748
 
6821
- `), sd = (e) => e.filter((t) => (t.events?.length ?? 0) > 0).map(
6749
+ `), nd = (e) => e.filter((t) => (t.events?.length ?? 0) > 0).map(
6822
6750
  ({ pascalCaseName: t }) => `export interface ${t}CustomEvent<T> extends CustomEvent<T> {
6823
6751
  detail: T;
6824
6752
  target: HTML${t}Element;
6825
6753
  currentTarget: HTML${t}Element;
6826
6754
  }`
6827
6755
  ).join(`
6828
- `), rd = (e) => `export { ToEvents, TargetedEvent } from "@arcgis/lumina";
6756
+ `), sd = (e) => `export { ToEvents, TargetedEvent } from "@arcgis/lumina";
6829
6757
 
6830
6758
  declare global {
6831
6759
  interface HTMLElementTagNameMap {
@@ -6833,12 +6761,12 @@ ${e.map(({ pascalCaseName: t, tagName: i }) => ` "${i}": HTML${t}Element;`).j
6833
6761
  `)}
6834
6762
  }
6835
6763
 
6836
- ${e.map(od).join(`
6764
+ ${e.map(rd).join(`
6837
6765
  `).split(`
6838
6766
  `).map((t) => t.length > 0 ? ` ${t}` : t).join(`
6839
6767
  `)}
6840
6768
  }`;
6841
- function od({ name: e, pascalCaseName: t, events: i = [] }) {
6769
+ function rd({ name: e, pascalCaseName: t, events: i = [] }) {
6842
6770
  const n = i.length > 0, s = `${t}CustomEvent`, r = `HTML${t}Element`;
6843
6771
  return [
6844
6772
  n ? `interface ${r}EventMap {
@@ -6857,7 +6785,7 @@ ${n ? ` addEventListener<K extends keyof ${r}EventMap>(type: K, listener: (this
6857
6785
  }`
6858
6786
  ].join("");
6859
6787
  }
6860
- function ad(e) {
6788
+ function od(e) {
6861
6789
  let t;
6862
6790
  return {
6863
6791
  name: "@arcgis/lumina:generateFrameworkTypes",
@@ -6869,60 +6797,60 @@ function ad(e) {
6869
6797
  const i = u.join(e.dir.dist, "index.d.ts");
6870
6798
  e._declarationTextTransformers.push((n) => {
6871
6799
  const { filePath: s, content: r } = n;
6872
- return s === i ? { filePath: s, content: nd(e.apiJsonComponents, r, t) } : n;
6800
+ return s === i ? { filePath: s, content: id(e.apiJsonComponents, r, t) } : n;
6873
6801
  });
6874
6802
  },
6875
6803
  async writeBundle() {
6876
6804
  if (e.isInStorybook)
6877
6805
  return;
6878
6806
  const i = u.join(e.dir.dist, "types");
6879
- await z(i);
6807
+ await Q(i);
6880
6808
  const n = `/// <reference types="../index.d.ts" />
6881
6809
  ${t.replaceAll("./", "../")}`, s = Object.entries({
6882
- react: Yl(e.apiJsonComponents),
6883
- preact: Ql(e.apiJsonComponents),
6884
- stencil: td(e.apiJsonComponents),
6885
- lumina: Vl(e.apiJsonComponents)
6810
+ react: Zl(e.apiJsonComponents),
6811
+ preact: Xl(e.apiJsonComponents),
6812
+ stencil: ed(e.apiJsonComponents),
6813
+ lumina: Gl(e.apiJsonComponents)
6886
6814
  }).map(
6887
- async ([r, a]) => await F(u.join(i, `${r}.d.ts`), `${n}
6815
+ async ([r, a]) => await D(u.join(i, `${r}.d.ts`), `${n}
6888
6816
  ${a}`)
6889
6817
  );
6890
- s.push(F(u.join(i, "components.d.ts"), 'export * from "./stencil";')), await Promise.all(s);
6818
+ s.push(D(u.join(i, "components.d.ts"), 'export * from "./stencil";')), await Promise.all(s);
6891
6819
  }
6892
6820
  };
6893
6821
  }
6894
- function cd(e) {
6822
+ function ad(e) {
6895
6823
  return {
6896
6824
  name: "@arcgis/lumina:buildWrappers",
6897
6825
  apply: () => e.viteCommand === "build" && !!e.options.build?.wrappers?.length,
6898
6826
  async writeBundle() {
6899
6827
  e.isInStorybook || await Promise.all(
6900
6828
  e.options.build?.wrappers?.map(async (t) => {
6901
- t.type === "react18" && await pd(e, t);
6829
+ t.type === "react18" && await dd(e, t);
6902
6830
  }) ?? []
6903
6831
  );
6904
6832
  }
6905
6833
  };
6906
6834
  }
6907
- const ld = "react", ji = "@lit/react", dd = `
6908
- import React from "${ld}";
6835
+ const cd = "react", ji = "@lit/react", ld = `
6836
+ import React from "${cd}";
6909
6837
  import { createComponent } from "${ji}";
6910
6838
  import type { EventName } from "${ji}";
6911
6839
  import { makeReactWrapperFactory, getReactWrapperOptions } from "@arcgis/lumina";
6912
6840
 
6913
6841
  const createWrapper = /*@__PURE__*/ makeReactWrapperFactory(React, createComponent) as typeof createComponent;
6914
6842
  `;
6915
- async function pd(e, t) {
6916
- const { name: i } = N(), n = [];
6843
+ async function dd(e, t) {
6844
+ const { name: i } = j(), n = [];
6917
6845
  for (const a of e.apiJson.modules)
6918
6846
  for (const c of a.declarations)
6919
- "customElement" in c && n.push(ud(c));
6920
- const s = [`/// <reference types="${i}" preserve="true" />`, dd, ...n].join(""), r = u.resolve(t.proxiesFile);
6921
- await z(u.dirname(r), { recursive: !0 }), await F(r, s);
6847
+ "customElement" in c && n.push(pd(c));
6848
+ const s = [`/// <reference types="${i}" preserve="true" />`, ld, ...n].join(""), r = u.resolve(t.proxiesFile);
6849
+ await Q(u.dirname(r), { recursive: !0 }), await D(r, s);
6922
6850
  }
6923
- function ud(e) {
6851
+ function pd(e) {
6924
6852
  const t = e.events?.map(
6925
- (i) => ` ${Ee(`on${ws(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
6853
+ (i) => ` ${Ee(`on${bs(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
6926
6854
  ).join(`
6927
6855
  `);
6928
6856
  return `
@@ -6936,34 +6864,31 @@ ${t}
6936
6864
  );
6937
6865
  `;
6938
6866
  }
6939
- function Pd(e = {}) {
6867
+ function $d(e = {}) {
6940
6868
  const t = new P(e), i = [
6941
6869
  t._plugin,
6870
+ tl(t),
6942
6871
  il(t),
6943
- nl(t),
6944
- El(t),
6872
+ Tl(t),
6945
6873
  xr(t),
6946
6874
  _c(t),
6947
- ad(t),
6948
- Gl(t),
6875
+ od(t),
6876
+ ql(t),
6949
6877
  vc(t),
6950
6878
  ho(t),
6951
6879
  Gc(t),
6952
- Tl(t),
6953
6880
  bl(t),
6954
- ll(t),
6881
+ Sl(t),
6882
+ cl(t),
6955
6883
  Ms(t),
6956
6884
  Ec(t),
6957
- // Deprecated feature will be dropped in https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2765
6958
- // eslint-disable-next-line @typescript-eslint/no-deprecated
6959
- Xc(t),
6960
- cd(t),
6961
- Qc(t)
6885
+ ad(t),
6886
+ Xc(t)
6962
6887
  ].filter(R);
6963
6888
  return i.context = t, i;
6964
6889
  }
6965
- const xd = {
6966
- initializeComponentDependencies: yn,
6890
+ const Pd = {
6891
+ initializeComponentDependencies: gn,
6967
6892
  updateLuminaTs: ss,
6968
6893
  propertyToAttributeMappings: B,
6969
6894
  findDeclaredComponents: Hi,
@@ -6972,12 +6897,12 @@ const xd = {
6972
6897
  mathMlElements: $t,
6973
6898
  alwaysAttributes: Vi,
6974
6899
  nativeAlwaysAttributes: Xi,
6975
- htmlAlwaysAttributes: yt,
6900
+ htmlAlwaysAttributes: gt,
6976
6901
  isPropertyEscapeNeeded: Ve
6977
6902
  };
6978
6903
  export {
6979
6904
  Je as LuminaApiExtractor,
6980
- xd as exportsForCodemod,
6905
+ Pd as exportsForCodemod,
6981
6906
  qe as inferCdnUrl,
6982
- Pd as useLumina
6907
+ $d as useLumina
6983
6908
  };