@arcgis/lumina-compiler 4.34.0-next.39 → 4.34.0-next.40

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,40 +1,32 @@
1
- import { nodeExternals as ds } from "rollup-plugin-node-externals";
2
- import { stringToStartsWithGlob as Kt, path as u, toSystemPathSeparators as Y, retrievePackageJson as R, 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 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";
3
2
  import us from "vite-plugin-dts";
4
3
  import o from "typescript";
5
4
  import { f as w, l as C } from "./logger-KpGU2b3R.js";
6
- import { getMemberName as X, apiMemberToSynthesizedComments as V, globalPackageIdentifier as Oi, setApiDocFromJsDoc as ue, ApiExtractor as ms, hasIgnoredModifier as fs, symbolToDocs as Wt, setDefaultFromInitializer as Bt, multipleJsDocTags as ys, findDecorator as _t, isApiMethod as gs, isApiProperty as hs } from "@arcgis/api-extractor";
7
- import { isNotUndefined as j, 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";
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";
8
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";
9
- import { lazyMetaSubItemJoiner as $s, lazyMetaItemJoiner as Ye, lazyMetaGroupJoiner as Ps, propertyFlagAttribute as Ht, propertyFlagReflect as xs, propertyFlagBoolean as ks, propertyFlagNumber as As, propertyFlagState as Is, propertyFlagReadOnly as Ls, propertyFlagNoAccessor as Fs } from "@arcgis/lumina/config";
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";
10
9
  import { build as Ns } from "esbuild";
11
10
  import { glob as Ds } from "glob";
12
11
  import js from "mime-types";
13
12
  import { writeFileSync as Ki } from "node:fs";
14
13
  import Rs from "chalk";
15
14
  function Ms(e) {
16
- const { externalize: t = [], bundleIn: i = [], ...n } = e.options?.build?.dependencies ?? {}, r = {
17
- ...ds({
18
- ...n,
19
- /*
20
- * This property name is a bit confusing. "include" means "externalize these"
21
- * (the opposite is "exclude")
22
- */
23
- include: [
24
- // "lit-html" and "lit-element" are indirect dependencies - need to exclude
25
- /^lit[-/]/u,
26
- // Externalize all @lit/ and @lit-labs/ packages
27
- /^@lit[-/]/u,
28
- /^lit$/u,
29
- ...Array.isArray(t) ? t.map(Kt) : []
30
- ],
31
- exclude: Array.isArray(i) ? i.map(Kt) : []
32
- }),
33
- configResolved() {
34
- e.isInStorybook && (r.resolveId = void 0);
35
- }
36
- };
37
- return r;
15
+ const t = e.options?.build?.dependencies ?? {}, i = ds({
16
+ bundleIn: t.bundleIn,
17
+ externalize: [
18
+ // TODO: remove these once Lit is declared as a peer dependency
19
+ // "lit-html" and "lit-element" are indirect dependencies - need to exclude
20
+ /^lit[-/]/u,
21
+ // Externalize all @lit/ and @lit-labs/ packages
22
+ /^@lit[-/]/u,
23
+ /^lit$/u,
24
+ ...t.externalize ?? []
25
+ ]
26
+ });
27
+ return i.configResolved = () => {
28
+ e.isInStorybook && (i.resolveId = void 0);
29
+ }, i;
38
30
  }
39
31
  const Tt = "customElement.js", Wi = "customElement.d.ts", Os = "playwright";
40
32
  function Js(e, t, i) {
@@ -94,9 +86,9 @@ const Bs = -1, _s = -2, Hs = /["']\.\.?\/[^'"]+/gu, _i = (e, t, i, n) => e.repla
94
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);
95
87
  if (i === n && a === l)
96
88
  return s;
97
- const d = ee(i, l);
89
+ const d = te(i, l);
98
90
  return `${s[0]}${d}`;
99
- }), ee = (e, t) => {
91
+ }), te = (e, t) => {
100
92
  const i = u.relative(e, t);
101
93
  return i.startsWith(".") ? i : `.${u.sep}${i}`;
102
94
  };
@@ -104,7 +96,7 @@ function Us(e) {
104
96
  return `/// <reference types="../../index.d.ts" />
105
97
  ${e}`;
106
98
  }
107
- const Ut = "customElement", zs = (e, t) => {
99
+ const Ht = "customElement", zs = (e, t) => {
108
100
  const { filePath: i, content: n } = e;
109
101
  if (!i.startsWith(t.dir.distComponents))
110
102
  return e;
@@ -123,7 +115,7 @@ const Ut = "customElement", zs = (e, t) => {
123
115
  if (t.apiModule?.declarations.forEach((r) => {
124
116
  "customElement" in r && i.push(
125
117
  o.factory.createExpressionStatement(
126
- o.factory.createCallExpression(o.factory.createIdentifier(Ut), void 0, [
118
+ o.factory.createCallExpression(o.factory.createIdentifier(Ht), void 0, [
127
119
  o.factory.createStringLiteral(r.tagName),
128
120
  o.factory.createIdentifier(r.name)
129
121
  ])
@@ -141,7 +133,7 @@ const Ut = "customElement", zs = (e, t) => {
141
133
  !1,
142
134
  void 0,
143
135
  o.factory.createNamedImports([
144
- o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(Ut))
136
+ o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(Ht))
145
137
  ])
146
138
  ),
147
139
  o.factory.createStringLiteral(n)
@@ -184,8 +176,8 @@ const Gs = (e) => (t, i) => (
184
176
  )
185
177
  ), Vs = (e, t) => t.isInStorybook ? !1 : e, Xs = (e, t) => (
186
178
  // Short-circuit quickly if file doesn't look like the one we want to exclude
187
- e.filePath.endsWith(zt) && e.filePath === u.join(t.dir.dist, zt) ? !1 : e
188
- ), zt = "lumina.d.ts", Qs = (e, t) => {
179
+ e.filePath.endsWith(Ut) && e.filePath === u.join(t.dir.dist, Ut) ? !1 : e
180
+ ), Ut = "lumina.d.ts", Qs = (e, t) => {
189
181
  const i = t.dir.dist, n = `${i}src/`;
190
182
  return e.filePath.startsWith(n) ? { ...e, filePath: `${i}${e.filePath.slice(n.length)}` } : !1;
191
183
  }, Et = (e) => e.includes("__test") || e.includes(".e2e.") || e.includes(".spec.") || e.includes(".test."), Zs = (e) => Et(e.filePath) || e.filePath.includes(".stories.") || e.filePath.includes(".story.") ? !1 : e, Ys = (e) => e.content.includes("__esri.") ? {
@@ -225,7 +217,7 @@ ${e.content}
225
217
  return e;
226
218
  }, ir = /^import (?:type \* as )?[^"'\n]+["'](\.[^\n]*?\.json)["'];$/mu, nr = /(?<![.\w\d-])import\(['"]([\w@\-/\\.]+)\.json['"]\)/u;
227
219
  function sr(e, t) {
228
- const i = X(t.name);
220
+ const i = Q(t.name);
229
221
  return e.members.find((n) => n.name === i);
230
222
  }
231
223
  function rr(e, t, i) {
@@ -262,7 +254,7 @@ const or = (e, t) => o.factory.updateSourceFile(
262
254
  e.typeReferenceDirectives,
263
255
  e.hasNoDefaultLib,
264
256
  e.libReferenceDirectives
265
- ), ar = (e) => `${qt}${" ".repeat(e.length - qt.length - Gt.length)}${Gt}`, qt = "/*", Gt = "*/", cr = (e) => e.statements.map(ur), lr = "@arcgis/lumina", dr = "LitElement", pr = "PublicLitElement", qi = "TargetedEvent";
257
+ ), ar = (e) => `${zt}${" ".repeat(e.length - zt.length - qt.length)}${qt}`, zt = "/*", qt = "*/", cr = (e) => e.statements.map(ur), lr = "@arcgis/lumina", dr = "LitElement", pr = "PublicLitElement", qi = "TargetedEvent";
266
258
  function ur(e) {
267
259
  if (o.isImportDeclaration(e) && o.isStringLiteral(e.moduleSpecifier) && e.moduleSpecifier.text === lr && e.importClause?.namedBindings && o.isNamedImports(e.importClause.namedBindings)) {
268
260
  const t = e.importClause.namedBindings.elements.findIndex(
@@ -345,7 +337,7 @@ function gr(e, t, i) {
345
337
  h === void 0 ? a.push(g) : Array.isArray(h) ? d.push(...h) : (o.setEmitFlags(h, o.EmitFlags.NoComments), d.push(h));
346
338
  }
347
339
  c.size > 0 && a.forEach((y) => {
348
- const g = X(y.name);
340
+ const g = Q(y.name);
349
341
  g !== void 0 && c.has(g) && d.push(Sr(y));
350
342
  }), l.length > 0 && d.push(mr(l, t, i.compiler));
351
343
  const p = o.factory.updateClassDeclaration(
@@ -372,14 +364,14 @@ function gr(e, t, i) {
372
364
  `);
373
365
  return o.setEmitFlags(p, o.EmitFlags.NoComments), o.setSyntheticLeadingComments(
374
366
  p,
375
- V({ ...r, description: f })
367
+ X({ ...r, description: f })
376
368
  ), p;
377
369
  } else
378
370
  return e;
379
371
  }
380
372
  let mt;
381
373
  function hr(e, t, i, n, s) {
382
- const r = X(e.name);
374
+ const r = Q(e.name);
383
375
  if (r === void 0)
384
376
  return;
385
377
  const a = t.members.find((l) => l.name === r);
@@ -393,13 +385,13 @@ function hr(e, t, i, n, s) {
393
385
  return;
394
386
  const d = o.factory.updatePropertyDeclaration(
395
387
  e,
396
- Qt(e.modifiers),
388
+ Xt(e.modifiers),
397
389
  e.name,
398
390
  void 0,
399
391
  br(e.type, s),
400
392
  e.initializer
401
393
  );
402
- return o.setSyntheticLeadingComments(d, V(l)), d;
394
+ return o.setSyntheticLeadingComments(d, X(l)), d;
403
395
  }
404
396
  return;
405
397
  }
@@ -407,19 +399,19 @@ function hr(e, t, i, n, s) {
407
399
  if (a.readonly === !0) {
408
400
  const l = o.factory.updatePropertyDeclaration(
409
401
  e,
410
- Qt(e.modifiers),
402
+ Xt(e.modifiers),
411
403
  e.name,
412
404
  void 0,
413
- Xt(n, e.type, s),
405
+ Vt(n, e.type, s),
414
406
  e.initializer
415
407
  );
416
- return o.setSyntheticLeadingComments(l, V(a)), l;
408
+ return o.setSyntheticLeadingComments(l, X(a)), l;
417
409
  } else if (a.getterType !== void 0) {
418
- const l = Vt.exec(a.getterType.text)?.groups;
410
+ const l = Gt.exec(a.getterType.text)?.groups;
419
411
  if (l === void 0)
420
412
  return C.error(
421
413
  "@arcgis/lumina:transformComponentMembers",
422
- `Expected bound accessor getter type to match ${Vt}, but got ${a.getterType.text}`,
414
+ `Expected bound accessor getter type to match ${Gt}, but got ${a.getterType.text}`,
423
415
  s.fileName
424
416
  ), e;
425
417
  n.add(l.accessor);
@@ -447,7 +439,7 @@ function hr(e, t, i, n, s) {
447
439
  ),
448
440
  void 0
449
441
  );
450
- return o.setSyntheticLeadingComments(m, V(a)), [
442
+ return o.setSyntheticLeadingComments(m, X(a)), [
451
443
  m,
452
444
  o.factory.createSetAccessorDeclaration(
453
445
  d,
@@ -457,7 +449,7 @@ function hr(e, t, i, n, s) {
457
449
  )
458
450
  ];
459
451
  } else
460
- return Xt(n, e.type, s), o.setSyntheticLeadingComments(e, V(a)), e;
452
+ return Vt(n, e.type, s), o.setSyntheticLeadingComments(e, X(a)), e;
461
453
  else if (o.isGetAccessor(e) || o.isSetAccessor(e)) {
462
454
  if (o.isSetAccessor(e)) {
463
455
  if (a.readonly === !0)
@@ -469,12 +461,12 @@ function hr(e, t, i, n, s) {
469
461
  isRequired: a.docsTags?.some((f) => f.name === "required") ?? !1
470
462
  });
471
463
  }
472
- return c !== r && o.setSyntheticLeadingComments(e, V(a)), e;
464
+ return c !== r && o.setSyntheticLeadingComments(e, X(a)), e;
473
465
  } else if (o.isMethodDeclaration(e))
474
- return o.setSyntheticLeadingComments(e, V(a)), e;
466
+ return o.setSyntheticLeadingComments(e, X(a)), e;
475
467
  }
476
- const Vt = /^typeof this\.(?<accessor>[^.]+)\.(?<boundProperty>[^.]+)$/u;
477
- function Xt(e, t, i) {
468
+ const Gt = /^typeof this\.(?<accessor>[^.]+)\.(?<boundProperty>[^.]+)$/u;
469
+ function Vt(e, t, i) {
478
470
  const s = (t?.pos !== -1 ? t?.getText(i) : void 0)?.match(vr) ?? [];
479
471
  for (const r of s)
480
472
  e.add(r);
@@ -525,7 +517,7 @@ function Sr(e) {
525
517
  }
526
518
  return e;
527
519
  }
528
- function Qt(e) {
520
+ function Xt(e) {
529
521
  return e?.some((i) => i.kind === o.SyntaxKind.ReadonlyKeyword) ? e : [o.factory.createModifier(o.SyntaxKind.ReadonlyKeyword), ...e ?? []];
530
522
  }
531
523
  function ke(e) {
@@ -549,12 +541,12 @@ function br(e, t) {
549
541
  t.fileName
550
542
  ), e);
551
543
  }
552
- const wr = [cr, yr], Zt = "@arcgis/lumina:componentDtsTransformer";
544
+ const wr = [cr, yr], Qt = "@arcgis/lumina:componentDtsTransformer";
553
545
  function Tr(e) {
554
546
  let t;
555
547
  const i = Er(e);
556
548
  return {
557
- name: Zt,
549
+ name: Qt,
558
550
  supports(n) {
559
551
  return t ??= new Set(e.componentFiles), n.endsWith(".tsx") && t.has(n);
560
552
  },
@@ -563,7 +555,7 @@ function Tr(e) {
563
555
  return [];
564
556
  const s = e.typeScriptProgram.getSourceFile(n);
565
557
  if (s === void 0)
566
- throw Error(w(Zt, `Could not find source file: ${Y(n)}`));
558
+ throw Error(w(Qt, `Could not find source file: ${ee(n)}`));
567
559
  const r = [];
568
560
  return e.typeScriptProgram.emit(
569
561
  s,
@@ -1545,7 +1537,7 @@ function Qi(e) {
1545
1537
  e.stringifiedNonReflected
1546
1538
  ));
1547
1539
  }
1548
- const Yt = /* @__PURE__ */ new Set(["itemScope"]), Zi = /* @__PURE__ */ new Set([
1540
+ const Zt = /* @__PURE__ */ new Set(["itemScope"]), Zi = /* @__PURE__ */ new Set([
1549
1541
  "abort",
1550
1542
  "animationCancel",
1551
1543
  "animationEnd",
@@ -1775,11 +1767,11 @@ function Fr(e) {
1775
1767
  }
1776
1768
  return e.trim().length === 0 ? t : e;
1777
1769
  }
1778
- const Nr = (e) => jr(e).replaceAll("`", "\\`"), Dr = /\$\{/gu, jr = (e) => e.replace(Dr, "\\${"), Rr = (e) => !Mr.test(e), Mr = /^[^\s"'=<>`]+$/u, Or = /[&<>]/gu, Jr = {
1770
+ const Nr = (e) => e.replaceAll("\\", "\\\\").replace(Dr, "\\${").replaceAll("`", "\\`"), Dr = /\$\{/gu, jr = (e) => !Rr.test(e), Rr = /^[^\s"'=<>`]+$/u, Mr = /[&<>]/gu, Or = {
1779
1771
  "&": "&amp;",
1780
1772
  "<": "&lt;",
1781
1773
  ">": "&gt;"
1782
- }, Yi = (e) => e.replace(Or, (t) => Jr[t]), Pt = (e) => typeof e == "string" && e.includes("-") && !Lr.has(e), Kr = async (e) => Object.fromEntries(
1774
+ }, Yi = (e) => e.replace(Mr, (t) => Or[t]), Pt = (e) => typeof e == "string" && e.includes("-") && !Lr.has(e), Jr = async (e) => Object.fromEntries(
1783
1775
  (await e.componentFilesPromise).map((t) => [en(t), t])
1784
1776
  ), en = (e, t = u.resolve("src")) => u.relative(t, u.join(e, "..", Tt.slice(0, -3))), xt = async (e, t, i = t) => await Ue(i, { recursive: !0 }).catch((n) => {
1785
1777
  if (String(n).includes("ENOENT"))
@@ -1793,89 +1785,89 @@ const Nr = (e) => jr(e).replaceAll("`", "\\`"), Dr = /\$\{/gu, jr = (e) => e.rep
1793
1785
  if (he(c, t))
1794
1786
  return c;
1795
1787
  a.endsWith(".stories.tsx") && c.startsWith(t) && s.push(c);
1796
- }).filter(j);
1788
+ }).filter(R);
1797
1789
  return e.componentFiles = r, e.componentStoryFiles = s, r;
1798
1790
  });
1799
1791
  function he(e, t) {
1800
1792
  if (!e.startsWith(t) || !e.endsWith(".tsx"))
1801
1793
  return !1;
1802
- const [i, n] = e.slice(0, -4).split(u.sep).slice(Wr);
1794
+ const [i, n] = e.slice(0, -4).split(u.sep).slice(Kr);
1803
1795
  return i === n;
1804
1796
  }
1805
- const Wr = -2, ei = 5, ti = 1, ii = 1, ni = 3, si = 4, ze = o;
1806
- Br(ze.createSourceMapGenerator);
1807
- _r(ze.createTextWriter);
1808
- Hr(ze.getNewLineCharacter);
1797
+ const Kr = -2, Yt = 5, ei = 1, ti = 1, ii = 3, ni = 4, ze = o;
1798
+ Wr(ze.createSourceMapGenerator);
1799
+ Br(ze.createTextWriter);
1800
+ _r(ze.getNewLineCharacter);
1809
1801
  const me = ze;
1810
- function Br(e) {
1802
+ function Wr(e) {
1811
1803
  if (typeof e != "function")
1812
1804
  throw new Error(
1813
1805
  "Failed to find ts.createSourceMapGenerator() function. Lumina needs to be updated to support the new TypeScript version"
1814
1806
  );
1815
- if (e.length !== ei)
1807
+ if (e.length !== Yt)
1816
1808
  throw new Error(
1817
- `ts.createSourceMapGenerator() signature changed. Expected ${ei} arguments. Lumina needs to be updated to support the new TypeScript version`
1809
+ `ts.createSourceMapGenerator() signature changed. Expected ${Yt} arguments. Lumina needs to be updated to support the new TypeScript version`
1818
1810
  );
1819
1811
  }
1820
- function _r(e) {
1812
+ function Br(e) {
1821
1813
  if (typeof e != "function")
1822
1814
  throw new Error(
1823
1815
  "Failed to find ts.createTextWriter() function. Lumina needs to be updated to support the new TypeScript version"
1824
1816
  );
1825
- if (e.length !== ti)
1817
+ if (e.length !== ei)
1826
1818
  throw new Error(
1827
- `ts.createTextWriter() signature changed. Expected ${ti} arguments. Lumina needs to be updated to support the new TypeScript version`
1819
+ `ts.createTextWriter() signature changed. Expected ${ei} arguments. Lumina needs to be updated to support the new TypeScript version`
1828
1820
  );
1829
1821
  }
1830
- function Hr(e) {
1822
+ function _r(e) {
1831
1823
  if (typeof e != "function")
1832
1824
  throw new Error(
1833
1825
  "Failed to find ts.getNewLineCharacter() function. Lumina needs to be updated to support the new TypeScript version"
1834
1826
  );
1835
- if (e.length !== ii)
1827
+ if (e.length !== ti)
1836
1828
  throw new Error(
1837
- `ts.getNewLineCharacter() signature changed. Expected ${ii} argument. Lumina needs to be updated to support the new TypeScript version`
1829
+ `ts.getNewLineCharacter() signature changed. Expected ${ti} argument. Lumina needs to be updated to support the new TypeScript version`
1838
1830
  );
1839
1831
  }
1840
- function Ur(e) {
1832
+ function Hr(e) {
1841
1833
  if (typeof e != "function")
1842
1834
  throw new Error(
1843
1835
  "Failed to find ts.Printer.writeFile() function. Lumina needs to be updated to support the new TypeScript version"
1844
1836
  );
1845
- if (e.length !== ni)
1837
+ if (e.length !== ii)
1846
1838
  throw new Error(
1847
- `ts.Printer.writeFile() signature changed. Expected ${ni} arguments. Lumina needs to be updated to support the new TypeScript version`
1839
+ `ts.Printer.writeFile() signature changed. Expected ${ii} arguments. Lumina needs to be updated to support the new TypeScript version`
1848
1840
  );
1849
1841
  }
1850
- function zr(e) {
1842
+ function Ur(e) {
1851
1843
  if (typeof e != "function")
1852
1844
  throw new Error(
1853
1845
  "Failed to find ts.Printer.writeNode() function. Lumina needs to be updated to support the new TypeScript version"
1854
1846
  );
1855
- if (e.length !== si)
1847
+ if (e.length !== ni)
1856
1848
  throw new Error(
1857
- `ts.Printer.writeNode() signature changed. Expected ${si} arguments. Lumina needs to be updated to support the new TypeScript version`
1849
+ `ts.Printer.writeNode() signature changed. Expected ${ni} arguments. Lumina needs to be updated to support the new TypeScript version`
1858
1850
  );
1859
1851
  }
1860
1852
  function tn(e) {
1861
1853
  const t = me.createPrinter(e);
1862
- return Ur(t.writeFile), zr(t.writeNode), t;
1854
+ return Hr(t.writeFile), Ur(t.writeNode), t;
1863
1855
  }
1864
- function ri(e) {
1865
- const t = o.isUnionTypeNode(e) ? e.types.map(oi) : [oi(e)], i = new Set(t), n = i.delete("true"), s = i.delete("false");
1856
+ function si(e) {
1857
+ const t = o.isUnionTypeNode(e) ? e.types.map(ri) : [ri(e)], i = new Set(t), n = i.delete("true"), s = i.delete("false");
1866
1858
  (n || s) && i.add("boolean");
1867
1859
  let r = Array.from(i).sort();
1868
- if (r.length > 1 && (r = r.map((a) => a.includes("=>") ? `(${a})` : a)), !(r.length > qr))
1869
- return r.map(Xr);
1860
+ if (r.length > 1 && (r = r.map((a) => a.includes("=>") ? `(${a})` : a)), !(r.length > zr))
1861
+ return r.map(Vr);
1870
1862
  }
1871
- const qr = 40, Gr = (e) => e?.some(
1863
+ const zr = 40, qr = (e) => e?.some(
1872
1864
  (t) => t.type === "number" || t.type === "boolean" || t.type === "string" || /**
1873
1865
  * Treat "any" as possibly literal, but not "unknown". Matches Stencil
1874
1866
  * behavior.
1875
1867
  */
1876
1868
  t.type === "any"
1877
- ) ?? !1, Vr = (e) => e.length === 1 && e[0].type !== "string" && e[0].type !== "number" && e[0].type !== "boolean" && e[0].type !== "any" ? void 0 : e, nn = (e) => e.map(sn).join(" | "), sn = (e) => e.type === "string" && e.value !== void 0 ? `"${e.value}"` : e.value ?? e.type;
1878
- function Xr(e) {
1869
+ ) ?? !1, Gr = (e) => e.length === 1 && e[0].type !== "string" && e[0].type !== "number" && e[0].type !== "boolean" && e[0].type !== "any" ? void 0 : e, nn = (e) => e.map(sn).join(" | "), sn = (e) => e.type === "string" && e.value !== void 0 ? `"${e.value}"` : e.value ?? e.type;
1870
+ function Vr(e) {
1879
1871
  return e === "boolean" ? { type: "boolean" } : Number.isNaN(Number.parseFloat(e)) ? e.startsWith('"') || e.startsWith("'") ? {
1880
1872
  value: e.slice(1, -1),
1881
1873
  type: "string"
@@ -1886,50 +1878,50 @@ function Xr(e) {
1886
1878
  type: "number"
1887
1879
  };
1888
1880
  }
1889
- const Qr = (e, t, i, n) => {
1881
+ const Xr = (e, t, i, n) => {
1890
1882
  const s = e.typeScriptTypeChecker, r = o.isSetAccessor(t) ? t.parameters[0] : t, a = s.getTypeAtLocation(r), c = !i;
1891
1883
  return Me(s, a, n, e.dir, c);
1892
1884
  };
1893
- function Zr(e, t) {
1885
+ function Qr(e, t) {
1894
1886
  if (e.length === 0)
1895
1887
  return;
1896
- const i = t.matchAll(Yr), n = [];
1888
+ const i = t.matchAll(Zr), n = [];
1897
1889
  for (const s of i) {
1898
1890
  const r = e.find((a) => a.name === s[0]);
1899
1891
  r !== void 0 && n.push({ ...r, start: s.index, end: s.index + r.name.length });
1900
1892
  }
1901
1893
  return n.length === 0 ? void 0 : n;
1902
1894
  }
1903
- const Yr = /"[^"]+"|'[^"]+'|\w+/gu;
1895
+ const Zr = /"[^"]+"|'[^"]+'|\w+/gu;
1904
1896
  function Me(e, t, i, n, s = !1) {
1905
- let { typeNode: r, references: a } = ci(e, t, i, n), c = ri(r);
1906
- c === void 0 && ({ typeNode: r, references: a } = ci(e, t, i, n, !1), c = ri(r) ?? []);
1907
- const l = s ? c.filter((f) => f.type !== "null" && f.type !== "undefined") : c, d = nn(l), p = Vr(l), m = Zr(a, d);
1897
+ let { typeNode: r, references: a } = ai(e, t, i, n), c = si(r);
1898
+ c === void 0 && ({ typeNode: r, references: a } = ai(e, t, i, n, !1), c = si(r) ?? []);
1899
+ const l = s ? c.filter((f) => f.type !== "null" && f.type !== "undefined") : c, d = nn(l), p = Gr(l), m = Qr(a, d);
1908
1900
  return {
1909
1901
  text: d,
1910
1902
  references: m,
1911
1903
  values: p
1912
1904
  };
1913
1905
  }
1914
- function oi(e) {
1915
- eo.writeNode(o.EmitHint.Unspecified, e, void 0, it);
1906
+ function ri(e) {
1907
+ Yr.writeNode(o.EmitHint.Unspecified, e, void 0, it);
1916
1908
  const t = it.getText();
1917
1909
  return it.clear(), t;
1918
1910
  }
1919
- const eo = tn({ removeComments: !0 }), it = me.createTextWriter(`
1920
- `), rn = o.TypeFormatFlags.NoTruncation | o.TypeFormatFlags.WriteArrayAsGenericType | o.TypeFormatFlags.SuppressAnyReturnType | o.TypeFormatFlags.MultilineObjectLiterals, to = rn & o.TypeFormatFlags.NodeBuilderFlagsMask, io = to | o.NodeBuilderFlags.IgnoreErrors | o.NodeBuilderFlags.NoTruncation;
1921
- function no(e, t, i, n = !0) {
1911
+ const Yr = tn({ removeComments: !0 }), it = me.createTextWriter(`
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
+ function io(e, t, i, n = !0) {
1922
1914
  const s = /* @__PURE__ */ new Map();
1923
1915
  se(t, s, i, n);
1924
- const r = t.flags & o.TypeFlags.Union ? t.types.every(ai) : ai(t), a = e.typeToTypeNode(
1916
+ const r = t.flags & o.TypeFlags.Union ? t.types.every(oi) : oi(t), a = e.typeToTypeNode(
1925
1917
  t,
1926
1918
  void 0,
1927
- io & (r ? ~o.TypeFormatFlags.MultilineObjectLiterals : -1)
1919
+ to & (r ? ~o.TypeFormatFlags.MultilineObjectLiterals : -1)
1928
1920
  );
1929
- return s.forEach(so), a === void 0 ? (C.warn("@arcgis/lumina", "Unexpected case: Failed to convert type to type node."), o.factory.createTypeReferenceNode(o.factory.createIdentifier("unknown"), void 0)) : a;
1921
+ return s.forEach(no), a === void 0 ? (C.warn("@arcgis/lumina", "Unexpected case: Failed to convert type to type node."), o.factory.createTypeReferenceNode(o.factory.createIdentifier("unknown"), void 0)) : a;
1930
1922
  }
1931
- const ai = (e) => e.flags & o.TypeFlags.Object ? e.getProperties().length === 1 : !!(e.flags & o.TypeFlags.PossiblyFalsy);
1932
- function ci(e, t, i, n, s = !0) {
1923
+ const oi = (e) => e.flags & o.TypeFlags.Object ? e.getProperties().length === 1 : !!(e.flags & o.TypeFlags.PossiblyFalsy);
1924
+ function ai(e, t, i, n, s = !0) {
1933
1925
  const r = [], a = /* @__PURE__ */ new Set();
1934
1926
  function c(d, p) {
1935
1927
  const m = d.aliasSymbol ?? d.symbol;
@@ -1958,10 +1950,10 @@ function ci(e, t, i, n, s = !0) {
1958
1950
  name: f,
1959
1951
  package: void 0,
1960
1952
  module: "index.js"
1961
- } : ro(m, f, i, n);
1953
+ } : so(m, f, i, n);
1962
1954
  r.push(y), a.add(f);
1963
1955
  }
1964
- return { typeNode: no(e, t, c, s), references: r };
1956
+ return { typeNode: io(e, t, c, s), references: r };
1965
1957
  }
1966
1958
  function se(e, t, i, n = !0) {
1967
1959
  if (typeof e != "object" || e === null || !("checker" in e))
@@ -1991,10 +1983,10 @@ function se(e, t, i, n = !0) {
1991
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));
1992
1984
  });
1993
1985
  }
1994
- function so(e, t) {
1986
+ function no(e, t) {
1995
1987
  e.origin !== void 0 && (t.origin = e.origin), e.aliasSymbol !== void 0 && (t.aliasSymbol = e.aliasSymbol), e.aliasTypeArguments !== void 0 && (t.aliasTypeArguments = e.aliasTypeArguments);
1996
1988
  }
1997
- function ro(e, t, i, n) {
1989
+ function so(e, t, i, n) {
1998
1990
  const s = e?.declarations?.map((c) => c.getSourceFile()) ?? [];
1999
1991
  if (s.length === 0) {
2000
1992
  if (t === "Array")
@@ -2015,19 +2007,19 @@ function ro(e, t, i, n) {
2015
2007
  package: Oi,
2016
2008
  module: void 0
2017
2009
  };
2018
- const { packageName: r, moduleName: a } = oo(s[0].fileName, n);
2010
+ const { packageName: r, moduleName: a } = ro(s[0].fileName, n);
2019
2011
  return r ? {
2020
2012
  name: t,
2021
2013
  package: r,
2022
2014
  module: a.length > 0 ? a : void 0,
2023
- viewUrl: r === "@arcgis/core" && a === "interfaces.d.ts" ? li(e, s[0], "core") : r === "typescript" ? li(e, s[0], "typescript") : void 0
2015
+ viewUrl: r === "@arcgis/core" && a === "interfaces.d.ts" ? ci(e, s[0], "core") : r === "typescript" ? ci(e, s[0], "typescript") : void 0
2024
2016
  } : {
2025
2017
  name: t,
2026
2018
  package: void 0,
2027
2019
  module: a
2028
2020
  };
2029
2021
  }
2030
- function oo(e, t) {
2022
+ function ro(e, t) {
2031
2023
  const i = e.split("/node_modules/");
2032
2024
  if (i.length > 1) {
2033
2025
  const a = i.at(-1);
@@ -2035,41 +2027,41 @@ function oo(e, t) {
2035
2027
  }
2036
2028
  const s = e.split("/dist/");
2037
2029
  if (s.length > 1) {
2038
- const a = s.slice(0, -1).join("/"), l = R(a).name, d = s.at(-1);
2030
+ const a = s.slice(0, -1).join("/"), l = N(a).name, d = s.at(-1);
2039
2031
  return { packageName: l, moduleName: d };
2040
2032
  }
2041
2033
  return {
2042
2034
  packageName: void 0,
2043
- moduleName: u.relative(t.root, co(ao(e, t)))
2035
+ moduleName: u.relative(t.root, ao(oo(e, t)))
2044
2036
  };
2045
2037
  }
2046
- function ao(e, t) {
2038
+ function oo(e, t) {
2047
2039
  return he(e, t.srcComponents) ? u.join(t.dist, en(e, t.src)) : e.startsWith(t.src) ? u.join(t.dist, e.slice(t.src.length)) : e;
2048
2040
  }
2049
- const co = (e) => e.endsWith(".js") || e.endsWith(".d.ts") ? e : `${e.endsWith(".ts") ? e.slice(0, -3) : e.endsWith(".tsx") ? e.slice(0, -4) : e}.d.ts`;
2041
+ const ao = (e) => e.endsWith(".js") || e.endsWith(".d.ts") ? e : `${e.endsWith(".ts") ? e.slice(0, -3) : e.endsWith(".tsx") ? e.slice(0, -4) : e}.d.ts`;
2050
2042
  function on(e) {
2051
2043
  const t = e.split("/"), n = e[0].startsWith("@") ? 2 : 1, s = t.slice(0, n).join("/"), r = t.slice(n).join("/");
2052
2044
  return { packageName: s, moduleName: r };
2053
2045
  }
2054
- const lo = (e) => e.includes("/node_modules/") || e.includes("/dist/");
2055
- function li(e, t, i) {
2046
+ const co = (e) => e.includes("/node_modules/") || e.includes("/dist/");
2047
+ function ci(e, t, i) {
2056
2048
  const n = e.declarations;
2057
2049
  if (n !== void 0)
2058
2050
  for (const s of n) {
2059
- const r = di(s, t, i);
2051
+ const r = li(s, t, i);
2060
2052
  if (r !== void 0)
2061
2053
  return r;
2062
2054
  if (!("members" in s))
2063
2055
  continue;
2064
2056
  const a = s.members;
2065
2057
  for (const c of a) {
2066
- const l = di(c, t, i);
2058
+ const l = li(c, t, i);
2067
2059
  if (l !== void 0)
2068
- return po(l);
2060
+ return lo(l);
2069
2061
  }
2070
2062
  }
2071
2063
  }
2072
- function di(e, t, i) {
2064
+ function li(e, t, i) {
2073
2065
  const n = e.jsDoc?.[0];
2074
2066
  if (n !== void 0)
2075
2067
  return ye([n, ...n.tags ?? []], ({ comment: s }) => {
@@ -2089,35 +2081,40 @@ function di(e, t, i) {
2089
2081
  });
2090
2082
  });
2091
2083
  }
2092
- const po = (e) => e.split("#")[0];
2093
- function uo(e) {
2084
+ const lo = (e) => e.split("#")[0];
2085
+ function po(e) {
2094
2086
  const t = [];
2095
- for (const i of e.matchAll(mo)) {
2096
- const n = i.groups.name, s = i.groups.description.replaceAll(fo, " ").trim();
2087
+ for (const i of e.matchAll(uo)) {
2088
+ const n = i.groups.name, s = i.groups.description.replaceAll(mo, " ").trim();
2097
2089
  t.push({ name: n, description: s.endsWith("*") ? s.slice(0, -1).trim() : s });
2098
2090
  }
2099
2091
  return t.length === 0 ? void 0 : t;
2100
2092
  }
2101
- const mo = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, fo = /\n\s+\*? ?/gu, yo = ["css", "less", "sass", "scss", "styl", "stylus", "pcss", "postcss", "sss"], Oe = new RegExp(`\\.(${yo.join("|")})(\\?|$)`, "u"), go = /^import ["'](?<specifier>[^"']+)["'];$/gmu, ho = () => "throwError", te = "@arcgis/lumina:loadLitCss", Q = "?layered", Fe = "?global", vo = (e) => ({
2102
- name: te,
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";
2094
+ let di = !1;
2095
+ const ho = (e) => ({
2096
+ name: V,
2103
2097
  enforce: "pre",
2104
2098
  configResolved(t) {
2105
2099
  const i = t.plugins.find(({ name: s }) => s === "vite:css-post");
2106
2100
  if (i === void 0)
2107
- throw Error(w(te, "Unable to find the vite's built-in vite:css-post plugin"));
2101
+ throw Error(w(V, "Unable to find the vite's built-in vite:css-post plugin"));
2108
2102
  const n = i.transform;
2109
2103
  if (typeof n != "function")
2110
- throw Error(w(te, "Expected vite:css-post to declare a transform() function"));
2104
+ throw Error(w(V, "Expected vite:css-post to declare a transform() function"));
2111
2105
  i.transform = async function(r, a) {
2112
- const c = a.endsWith(Q);
2113
- c && (a = a.slice(0, -Q.length));
2106
+ const c = a.endsWith(Z);
2107
+ c && (a = a.slice(0, -Z.length));
2114
2108
  const l = a.endsWith(Fe);
2115
2109
  if (l && (a = a.slice(0, -Fe.length)), !Oe.test(a) || a.includes("?"))
2116
2110
  return await n.call(this, r, a);
2117
2111
  const d = `${a}?inline`, p = await n.call(this, r, d), { code: m, ...f } = typeof p == "string" ? { code: p } : p ?? {};
2118
- if (typeof m != "string" || !m.startsWith(an) || !m.endsWith(cn))
2112
+ if (!di && (a.endsWith(".sass") || a.endsWith(".scss")) && !("sass-embedded" in (N().devDependencies ?? {})) && !("sass" in (N().devDependencies ?? {})) && (di = !0, C.warn(
2113
+ V,
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
+ )), typeof m != "string" || !m.startsWith(an) || !m.endsWith(cn))
2119
2116
  return C.warn(
2120
- te,
2117
+ V,
2121
2118
  `Expected vite:css-post to return a JS module with a string literal. Received: ${JSON.stringify(
2122
2119
  m
2123
2120
  )}`
@@ -2125,7 +2122,7 @@ const mo = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, fo = /\n\s+\
2125
2122
  if (l)
2126
2123
  return e._globalCssString = ln(m), { code: "", map: { mappings: "" } };
2127
2124
  {
2128
- const y = e.isFullApiExtraction ? uo(r) : void 0;
2125
+ const y = e.isFullApiExtraction ? po(r) : void 0;
2129
2126
  if (y !== void 0) {
2130
2127
  e._cssDocs ??= /* @__PURE__ */ new Map(), e._cssDocs.set(a, y);
2131
2128
  const g = e._cssImports.get(a);
@@ -2145,7 +2142,7 @@ const mo = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, fo = /\n\s+\
2145
2142
  }
2146
2143
  return {
2147
2144
  ...f,
2148
- code: To(m, e.hmrEnabled, e.shouldMinify, c),
2145
+ code: wo(m, e.hmrEnabled, e.shouldMinify, c),
2149
2146
  /**
2150
2147
  * Vite's original transform does not generate source maps for inlined
2151
2148
  * css, thus we can't either
@@ -2159,22 +2156,22 @@ const mo = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, fo = /\n\s+\
2159
2156
  if (!(i.endsWith(".js") || i.endsWith(".ts") || i.endsWith(".tsx") || e.isInStorybook && i.endsWith(".mdx")))
2160
2157
  return;
2161
2158
  let s = 0;
2162
- const r = lo(i);
2159
+ const r = co(i);
2163
2160
  let a = !1;
2164
- const c = t.replaceAll(go, (l, d) => {
2161
+ const c = t.replaceAll(yo, (l, d) => {
2165
2162
  if (!Oe.test(d) || d.includes("?"))
2166
2163
  return l;
2167
2164
  if (r) {
2168
- if ((e.options.css?.sideEffectImportHandling ?? ho)(d, i) === "drop")
2165
+ if ((e.options.css?.sideEffectImportHandling ?? go)(d, i) === "drop")
2169
2166
  return a = !0, ar(l);
2170
2167
  throw Error(
2171
2168
  w(
2172
- te,
2169
+ V,
2173
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`,
2174
2171
  i
2175
2172
  )
2176
2173
  );
2177
- } else if (e.isInStorybook && Co(i, e)) {
2174
+ } else if (e.isInStorybook && Eo(i, e)) {
2178
2175
  a = !0;
2179
2176
  const p = `storybookCss$${s}`;
2180
2177
  return s += 1, [
@@ -2193,7 +2190,7 @@ const mo = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, fo = /\n\s+\
2193
2190
  return l;
2194
2191
  throw Error(
2195
2192
  w(
2196
- te,
2193
+ V,
2197
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`,
2198
2195
  i
2199
2196
  )
@@ -2205,7 +2202,7 @@ const mo = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, fo = /\n\s+\
2205
2202
  map: null
2206
2203
  } : void 0;
2207
2204
  }
2208
- }), an = 'export default "', cn = '"', So = "import { css } from '@lit/reactive-element/css-tag.js';\nexport const styles = css`", bo = "`;\nexport default styles;", wo = `
2205
+ }), an = 'export default "', cn = '"', vo = "import { css } from '@lit/reactive-element/css-tag.js';\nexport const styles = css`", So = "`;\nexport default styles;", bo = `
2209
2206
 
2210
2207
  if(import.meta.hot) {
2211
2208
  import.meta.hot.data.styles ??= styles;
@@ -2217,38 +2214,38 @@ if(import.meta.hot) {
2217
2214
  import.meta.hot.data.styles.styleSheet.replaceSync(nextExports.styles.cssText);
2218
2215
  });
2219
2216
  }`, ln = (e) => e.slice(an.length, -cn.length);
2220
- function To(e, t, i, n) {
2221
- const r = ln(e).replaceAll('\\"', '"'), a = Nr(Eo(r)), c = n ? `@layer{${i ? "" : `
2217
+ function wo(e, t, i, n) {
2218
+ const r = ln(e).replaceAll('\\"', '"'), a = Nr(To(r)), c = n ? `@layer{${i ? "" : `
2222
2219
  `}${a}${i ? "" : `
2223
2220
  `}}` : a;
2224
- return `${So}${c}${bo}${t ? wo : ""}`;
2221
+ return `${vo}${c}${So}${t ? bo : ""}`;
2225
2222
  }
2226
- const Eo = (e) => e.replaceAll("\\r", "").replaceAll("\\n", `
2227
- `), Co = (e, t) => e.endsWith(".mdx") || e.includes(".stories.") || e.includes(".story.") || e.startsWith(`${t.dir.root}stories/`);
2228
- function $o(e) {
2229
- return `import("${Po}").then(({ setCustomElementsManifest }) => {
2230
- setCustomElementsManifest(${xo(e)});
2223
+ const To = (e) => e.replaceAll("\\r", "").replaceAll("\\n", `
2224
+ `), Eo = (e, t) => e.endsWith(".mdx") || e.includes(".stories.") || e.includes(".story.") || e.startsWith(`${t.dir.root}stories/`);
2225
+ function Co(e) {
2226
+ return `import("${$o}").then(({ setCustomElementsManifest }) => {
2227
+ setCustomElementsManifest(${Po(e)});
2231
2228
  });`;
2232
2229
  }
2233
- const Po = "@storybook/web-components", xo = (e) => `JSON.parse(\`${ko(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
2234
- function ko(e) {
2230
+ const $o = "@storybook/web-components", Po = (e) => `JSON.parse(\`${xo(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
2231
+ function xo(e) {
2235
2232
  return e.replaceAll('\\"', '"').replaceAll("`", "\\`").replaceAll("${", "\\${");
2236
2233
  }
2237
- function Ao(e) {
2238
- Io(e);
2234
+ function ko(e) {
2235
+ Ao(e);
2239
2236
  const t = e.options.css?.globalStylesPath;
2240
2237
  if (t === void 0)
2241
2238
  return "";
2242
- const i = ee(e.dir.src, t);
2239
+ const i = te(e.dir.src, t);
2243
2240
  return e.viteCommand === "serve" || e.isInStorybook ? [
2244
- `import globalStyles from "${i}${Q}";`,
2241
+ `import globalStyles from "${i}${Z}";`,
2245
2242
  "document.adoptedStyleSheets = [...document.adoptedStyleSheets, globalStyles.styleSheet!];",
2246
2243
  pn("", e)
2247
2244
  ].join(`
2248
2245
  `) : `import "${i}${Fe}";`;
2249
2246
  }
2250
2247
  const dn = "hydrated";
2251
- function Io(e) {
2248
+ function Ao(e) {
2252
2249
  e._globalHydratedCssString = [
2253
2250
  ":not([",
2254
2251
  e.options.css?.hydratedAttribute ?? dn,
@@ -2265,15 +2262,15 @@ function pn(e, t) {
2265
2262
  ].join(`
2266
2263
  `);
2267
2264
  }
2268
- const Lo = (e) => `${e._globalHydratedCssString}${e.shouldMinify ? "" : `
2265
+ const Io = (e) => `${e._globalHydratedCssString}${e.shouldMinify ? "" : `
2269
2266
 
2270
2267
  `}${e._globalCssString ? JSON.parse(`"${e._globalCssString}"`) : ""}`;
2271
- function Fo(e) {
2268
+ function Lo(e) {
2272
2269
  const t = [], i = [];
2273
2270
  for (const s of e.privateApiJson.modules) {
2274
2271
  t.push(s.path);
2275
2272
  for (const r of s.declarations)
2276
- "customElement" in r && i.push(Do(r, e, s.path));
2273
+ "customElement" in r && i.push(No(r, e, s.path));
2277
2274
  }
2278
2275
  return [
2279
2276
  // Deprecated feature will be dropped in https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2765
@@ -2281,27 +2278,27 @@ function Fo(e) {
2281
2278
  e.viteCommand === "build" && e.options.build?.ssr?.stencilCompatibility?.enabled === !0 ? 'import "@lit-labs/ssr-client/lit-element-hydrate-support.js";' : "",
2282
2279
  'import { runtime } from "./runtime";',
2283
2280
  'import { makeDefineCustomElements } from "@arcgis/lumina";',
2284
- Ao(e),
2285
- e.hmrEnabled ? Ro : "",
2281
+ ko(e),
2282
+ e.hmrEnabled ? jo : "",
2286
2283
  "",
2287
- e.isInStorybook ? $o(e.apiJson) : "",
2284
+ e.isInStorybook ? Co(e.apiJson) : "",
2288
2285
  "",
2289
2286
  "export const defineCustomElements = makeDefineCustomElements(runtime, {",
2290
2287
  i.join(`,
2291
2288
  `),
2292
2289
  "});",
2293
- e.hmrEnabled ? Mo(t) : ""
2290
+ e.hmrEnabled ? Ro(t) : ""
2294
2291
  ].join(`
2295
2292
  `);
2296
2293
  }
2297
- const No = `import "./index";
2298
- export declare const defineCustomElements: import("@arcgis/lumina").DefineCustomElements;`, Do = (e, t, i) => [
2294
+ const Fo = `import "./index";
2295
+ export declare const defineCustomElements: import("@arcgis/lumina").DefineCustomElements;`, No = (e, t, i) => [
2299
2296
  ` "${e.tagName}": [`,
2300
2297
  `()=>import("${u.join(t.dir.root, i)}"),`,
2301
- jo(e),
2298
+ Do(e),
2302
2299
  "]"
2303
2300
  ].join("");
2304
- function jo(e) {
2301
+ function Do(e) {
2305
2302
  const { properties: t, asyncMethods: i, syncMethods: n } = un(e), s = t.map((p) => p.join($s)).join(Ye), r = i.join(Ye), a = n.join(Ye), c = [s, r, a], l = c.findLastIndex((p) => p.length > 0), d = c.slice(0, l + 1);
2306
2303
  return d.length > 0 ? `"${d.join(Ps)}"` : "";
2307
2304
  }
@@ -2318,23 +2315,23 @@ function un(e) {
2318
2315
  ), n = i.filter((r) => r.async === !0).map((r) => r.name), s = i.filter((r) => r.async !== !0).map((r) => r.name);
2319
2316
  return { tagName: e.tagName, properties: t, asyncMethods: n, syncMethods: s };
2320
2317
  }
2321
- const Ro = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
2322
- `, Mo = (e) => `
2318
+ const jo = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
2319
+ `, Ro = (e) => `
2323
2320
  if(import.meta.hot) {
2324
2321
  import.meta.hot.on("component-meta-update", handleComponentMetaUpdate);
2325
2322
  import.meta.hot.accept([
2326
2323
  ${e.map((t) => ` "/${t}",`).join(`
2327
2324
  `)}
2328
2325
  ], handleHmrUpdate);
2329
- }`, Oo = "@arcgis/lumina:addMethodMetadata";
2330
- function Jo(e, t, i, n, s) {
2326
+ }`, Mo = "@arcgis/lumina:addMethodMetadata";
2327
+ function Oo(e, t, i, n, s) {
2331
2328
  const r = i.getSignatureFromDeclaration(e);
2332
2329
  if (r === void 0)
2333
2330
  return;
2334
2331
  for (const d of e.parameters) {
2335
2332
  if (!o.isIdentifier(d.name)) {
2336
2333
  C.warn(
2337
- Oo,
2334
+ Mo,
2338
2335
  `Object binding patterns are not yet supported in the docs. Found ${d.name?.getText(n)} in ${e.name.getText(n)}`,
2339
2336
  n.fileName
2340
2337
  );
@@ -2355,8 +2352,8 @@ function Jo(e, t, i, n, s) {
2355
2352
  type: c
2356
2353
  }, t.signature = l.replace(" =>", ":");
2357
2354
  }
2358
- const Ko = (e) => e.modifiers?.some?.((t) => t.kind === o.SyntaxKind.AsyncKeyword) ?? !1;
2359
- function Wo(e, t, i, n) {
2355
+ const Jo = (e) => e.modifiers?.some?.((t) => t.kind === o.SyntaxKind.AsyncKeyword) ?? !1;
2356
+ function Ko(e, t, i, n) {
2360
2357
  const s = i.typeScriptTypeChecker, a = s.getTypeAtLocation(e).getProperty("emit");
2361
2358
  if (a?.valueDeclaration === void 0)
2362
2359
  return;
@@ -2381,11 +2378,11 @@ function Wo(e, t, i, n) {
2381
2378
  composed: void 0,
2382
2379
  privacy: void 0
2383
2380
  };
2384
- return ue(e.name, s, y), Bo(e, y, n), y.privacy === void 0 ? y : void 0;
2381
+ return ue(e.name, s, y), Wo(e, y, n), y.privacy === void 0 ? y : void 0;
2385
2382
  }
2386
2383
  }
2387
2384
  const Ae = "createEvent";
2388
- function Bo(e, t, i) {
2385
+ function Wo(e, t, i) {
2389
2386
  if (!e.initializer || !o.isCallExpression(e.initializer))
2390
2387
  return;
2391
2388
  const n = e.initializer;
@@ -2436,7 +2433,7 @@ class Je extends ms {
2436
2433
  const i = super.extractModules(t);
2437
2434
  for (const n of i)
2438
2435
  for (const s of n.declarations)
2439
- "customElement" in s && (this.context.isFullApiExtraction && Uo(s, this.context, this.indexedComponents), this.inheritMembers(s, i), this.context.isFullApiExtraction && (s.members.sort(nt), s.attributes?.sort(nt), s.events?.sort(nt)));
2436
+ "customElement" in s && (this.context.isFullApiExtraction && Ho(s, this.context, this.indexedComponents), this.inheritMembers(s, i), this.context.isFullApiExtraction && (s.members.sort(nt), s.attributes?.sort(nt), s.events?.sort(nt)));
2440
2437
  return i;
2441
2438
  }
2442
2439
  extractDeclarations(t) {
@@ -2569,9 +2566,9 @@ console.log("${s.tagName} is ready to go!");
2569
2566
  }
2570
2567
  extractComponentMembers(t) {
2571
2568
  const i = [], n = t.members.length;
2572
- let s, r = t.members[0], a, c = X(r?.name);
2569
+ let s, r = t.members[0], a, c = Q(r?.name);
2573
2570
  for (let l = 0; l < n; l++) {
2574
- if (s = r, r = t.members[l + 1], a = c, c = X(r?.name), this.pairedSetter !== void 0) {
2571
+ if (s = r, r = t.members[l + 1], a = c, c = Q(r?.name), this.pairedSetter !== void 0) {
2575
2572
  this.pairedSetter = void 0;
2576
2573
  continue;
2577
2574
  }
@@ -2619,35 +2616,35 @@ console.log("${s.tagName} is ready to go!");
2619
2616
  inheritedFrom: void 0,
2620
2617
  privacy: void 0
2621
2618
  };
2622
- return this.context.isFullApiExtraction && (this.extractComponentFieldDetails(t, l), (r === void 0 && (l.type.values === void 0 || !Gr(l.type.values)) || l.readonly && !l.reflects) && (l.attribute = void 0)), l;
2619
+ return this.context.isFullApiExtraction && (this.extractComponentFieldDetails(t, l), (r === void 0 && (l.type.values === void 0 || !qr(l.type.values)) || l.readonly && !l.reflects) && (l.attribute = void 0)), l;
2623
2620
  }
2624
2621
  /**
2625
2622
  * Based on a `non-@property()` property, extract a public event if it is one.
2626
2623
  */
2627
2624
  extractComponentEvent(t, i) {
2628
- const n = Wo(t, i, this.context, this.file);
2625
+ const n = Ko(t, i, this.context, this.file);
2629
2626
  return n !== void 0 && this.copyDoc(this.copyDocDefinitions?.events?.[i], n, this.apiComponent), n;
2630
2627
  }
2631
2628
  /**
2632
2629
  * When doing full API extraction, extract additional details for a field.
2633
2630
  */
2634
2631
  extractComponentFieldDetails(t, i) {
2635
- const n = i.readonly === !0, s = this.context.typeScriptTypeChecker, r = s.getSymbolAtLocation(t.name), a = r === void 0 ? void 0 : Wt(s, r), c = new Set(a?.docsTags.map((h) => h.name) ?? []);
2632
+ const n = i.readonly === !0, s = this.context.typeScriptTypeChecker, r = s.getSymbolAtLocation(t.name), a = r === void 0 ? void 0 : Kt(s, r), c = new Set(a?.docsTags.map((h) => h.name) ?? []);
2636
2633
  ue(t.name, this.context.typeScriptTypeChecker, i, a);
2637
2634
  let l = !n && i.readonly === !0;
2638
2635
  const d = this.pairedSetter ?? t, p = i.default;
2639
- Bt(t, i, this.file);
2636
+ Wt(t, i, this.file);
2640
2637
  const m = p === void 0 && i.default === "true", f = i.docsTags?.some((h) => h.name === "required") ?? !1;
2641
2638
  i.type = // Messages overrides type can be verbose, so we display a simplified type
2642
2639
  // in the documentation. The full type is still present in the .d.ts files.
2643
2640
  i.name === "messageOverrides" ? {
2644
2641
  text: "Record<string, unknown>"
2645
- } : Qr(this.context, d, f, this.file);
2642
+ } : Xr(this.context, d, f, this.file);
2646
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);
2647
2644
  if ("initializer" in t && t.initializer !== void 0 && (!i.default || !i.description) || y) {
2648
2645
  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() ?? [];
2649
2646
  if (S !== void 0) {
2650
- const $ = Wt(s, S);
2647
+ const $ = Kt(s, S);
2651
2648
  if ($.docsTags.length > 0) {
2652
2649
  $.docsTags = $.docsTags.filter(
2653
2650
  (E) => !c.has(E.name) || ys.has(E.name)
@@ -2664,7 +2661,7 @@ console.log("${s.tagName} is ready to go!");
2664
2661
  if (x ??= o.isGetAccessor($) ? $ : void 0, L ??= o.isSetAccessor($) ? $ : void 0, !("initializer" in $))
2665
2662
  return;
2666
2663
  const b = $;
2667
- l ||= b.modifiers?.some((E) => E.kind === o.SyntaxKind.ReadonlyKeyword) ?? !1, Bt(b, i, b.getSourceFile());
2664
+ l ||= b.modifiers?.some((E) => E.kind === o.SyntaxKind.ReadonlyKeyword) ?? !1, Wt(b, i, b.getSourceFile());
2668
2665
  }), y && x !== void 0 && L !== void 0 && x.type?.getText() !== L.parameters[0]?.type?.getText() && (i.getterType = { text: `typeof ${h.getText(this.file)}` });
2669
2666
  }
2670
2667
  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(
@@ -2682,11 +2679,11 @@ console.log("${s.tagName} is ready to go!");
2682
2679
  * Find the properties given to the `@property()` decorator.
2683
2680
  */
2684
2681
  findPropertyOptions(t) {
2685
- const i = _t(t, "property");
2682
+ const i = Bt(t, "property");
2686
2683
  return i === void 0 ? void 0 : i.arguments?.find(o.isObjectLiteralExpression)?.properties ?? [];
2687
2684
  }
2688
2685
  extractComponentMethod(t, i) {
2689
- if (_t(t, "method") === void 0)
2686
+ if (Bt(t, "method") === void 0)
2690
2687
  return;
2691
2688
  const n = {
2692
2689
  kind: "method",
@@ -2699,12 +2696,12 @@ console.log("${s.tagName} is ready to go!");
2699
2696
  inheritedFrom: void 0,
2700
2697
  docsTags: void 0,
2701
2698
  signature: "",
2702
- async: Ko(t) ? !0 : void 0,
2699
+ async: Jo(t) ? !0 : void 0,
2703
2700
  privacy: void 0
2704
2701
  };
2705
2702
  if (this.context.isFullApiExtraction) {
2706
2703
  const s = this.context.typeScriptTypeChecker;
2707
- Jo(t, n, s, this.file, this.context.dir), this.copyDoc(this.copyDocDefinitions?.methods?.[i], n, this.apiComponent);
2704
+ Oo(t, n, s, this.file, this.context.dir), this.copyDoc(this.copyDocDefinitions?.methods?.[i], n, this.apiComponent);
2708
2705
  }
2709
2706
  return n;
2710
2707
  }
@@ -2799,16 +2796,16 @@ const le = {
2799
2796
  name: "LitElement",
2800
2797
  package: "@arcgis/lumina"
2801
2798
  }, nt = (e, t) => e.name.localeCompare(t.name);
2802
- async function _o(e, t) {
2799
+ async function Bo(e, t) {
2803
2800
  t || (e.componentFilesPromise = xt(e, e.dir.srcComponents));
2804
- const i = await e.componentFilesPromise, n = await Yo(e, i);
2801
+ const i = await e.componentFilesPromise, n = await Zo(e, i);
2805
2802
  await e.componentStoriesPromise, e._componentPathMapping = {}, e._localDefinedComponents = void 0;
2806
2803
  const s = mn(n, e, !1);
2807
2804
  e.privateApiJson = s;
2808
2805
  const [r, a] = fn(s);
2809
2806
  return e.apiJsonComponents = a, e.apiJson = r, s;
2810
2807
  }
2811
- function Ho(e, t, i) {
2808
+ function _o(e, t, i) {
2812
2809
  const n = e.getSourceFile(t, i), s = mn([n], e, !0), r = s.modules[0];
2813
2810
  {
2814
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);
@@ -2853,8 +2850,8 @@ function fn(e) {
2853
2850
  }
2854
2851
  return [t, i];
2855
2852
  }
2856
- function Uo(e, t, i) {
2857
- const n = zo(i, e);
2853
+ function Ho(e, t, i) {
2854
+ const n = Uo(i, e);
2858
2855
  O(e, n, t);
2859
2856
  for (const s of e.members) {
2860
2857
  if (s.kind === "field")
@@ -2891,12 +2888,12 @@ function Uo(e, t, i) {
2891
2888
  }
2892
2889
  function Ie(e, t, i) {
2893
2890
  e !== void 0 && (e.references?.reduce(
2894
- (n, s) => qo(s, t, i, n),
2891
+ (n, s) => zo(s, t, i, n),
2895
2892
  0
2896
2893
  ), e.text = e.text.replaceAll(
2897
- Zo,
2894
+ Qo,
2898
2895
  (n, s) => At(t.get(s)) ?? n
2899
- ), e.values?.forEach(Go, t));
2896
+ ), e.values?.forEach(qo, t));
2900
2897
  }
2901
2898
  function O(e, t, i) {
2902
2899
  if (e.description && (e.description = e.description.replaceAll(st, t).replaceAll(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl)), e.docsTags)
@@ -2904,7 +2901,7 @@ function O(e, t, i) {
2904
2901
  n.text && (n.text = n.text.replaceAll(st, t).replaceAll(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl));
2905
2902
  typeof e.deprecated == "string" && (e.deprecated = e.deprecated.replaceAll(st, t).replaceAll(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl));
2906
2903
  }
2907
- const st = /\{@link ([^}]+)\}/gu, zo = (e, t) => (i, n) => {
2904
+ const st = /\{@link ([^}]+)\}/gu, Uo = (e, t) => (i, n) => {
2908
2905
  let s = n.indexOf(" ");
2909
2906
  s === -1 && (s = n.length);
2910
2907
  const r = n.slice(0, s), a = n.slice(s + 1);
@@ -2928,7 +2925,7 @@ const st = /\{@link ([^}]+)\}/gu, zo = (e, t) => (i, n) => {
2928
2925
  );
2929
2926
  return `[${a || (d === t ? l : `${d.tagName}.${l}`)}](${p}#${l})`;
2930
2927
  };
2931
- function qo(e, t, i, n) {
2928
+ function zo(e, t, i, n) {
2932
2929
  if (e.viewUrl !== void 0 && (e.viewUrl = e.viewUrl.replace(
2933
2930
  i.alternativeDocumentationUrl,
2934
2931
  i.normalizedDocumentationUrl
@@ -2942,16 +2939,16 @@ function qo(e, t, i, n) {
2942
2939
  const r = e.name.length;
2943
2940
  e.name = At(s);
2944
2941
  const a = e.name.length - r - pi;
2945
- e.viewUrl = s.demos?.at(0)?.url.replace(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl), e.start = e.start - pi, e.end = e.end + a, n += a - Qo;
2942
+ e.viewUrl = s.demos?.at(0)?.url.replace(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl), e.start = e.start - pi, e.end = e.end + a, n += a - Xo;
2946
2943
  }
2947
2944
  }
2948
2945
  return n;
2949
2946
  }
2950
- function Go(e) {
2947
+ function qo(e) {
2951
2948
  e.type.startsWith("ToElement<") && (e.type = At(this.get(e.type.slice(10, -1))) ?? e.type);
2952
2949
  }
2953
- const At = (e) => e ? `HTML${e.pascalCaseName}Element` : void 0, Vo = "ToElement<", pi = Vo.length, Xo = ">", Qo = Xo.length, Zo = /ToElement<(\w+)>/gu;
2954
- async function Yo(e, t) {
2950
+ const At = (e) => e ? `HTML${e.pascalCaseName}Element` : void 0, Go = "ToElement<", pi = Go.length, Vo = ">", Xo = Vo.length, Qo = /ToElement<(\w+)>/gu;
2951
+ async function Zo(e, t) {
2955
2952
  if (e.viteCommand === "serve" && (Object.hasOwn(e, "typeScriptHost") || (e.typeScriptHost = o.createCompilerHost(e.typeScriptConfig, !1))), e.typeScriptProgram !== void 0) {
2956
2953
  const i = e.typeScriptProgram.getSourceFiles(), n = new Set(t);
2957
2954
  return i.filter((s) => n.has(s.fileName));
@@ -2964,9 +2961,9 @@ async function Yo(e, t) {
2964
2961
  );
2965
2962
  }
2966
2963
  async function yn(e) {
2967
- return ve ??= ta(e), await ve;
2964
+ return ve ??= ea(e), await ve;
2968
2965
  }
2969
- function ea() {
2966
+ function Yo() {
2970
2967
  if (gt === void 0)
2971
2968
  throw Error(
2972
2969
  w(
@@ -2986,13 +2983,13 @@ function gn() {
2986
2983
  );
2987
2984
  return ht;
2988
2985
  }
2989
- async function ta(e) {
2990
- const t = R(e), i = t.dependencies ?? {}, n = t.peerDependencies ?? {}, r = (await Promise.all(
2991
- [...Object.keys(i), ...Object.keys(n)].filter((a) => !ia.has(a)).flatMap(async (a) => await hn(a, e))
2992
- )).filter(j);
2986
+ async function ea(e) {
2987
+ const t = N(e), i = t.dependencies ?? {}, n = t.peerDependencies ?? {}, r = (await Promise.all(
2988
+ [...Object.keys(i), ...Object.keys(n)].filter((a) => !ta.has(a)).flatMap(async (a) => await hn(a, e))
2989
+ )).filter(R);
2993
2990
  return gt ??= r, ht = Object.fromEntries(r.flatMap((a) => Object.entries(a.components))), r;
2994
2991
  }
2995
- const ia = /* @__PURE__ */ new Set([
2992
+ const ta = /* @__PURE__ */ new Set([
2996
2993
  "@arcgis/arcade-languageservice",
2997
2994
  "@arcgis/components-build-utils",
2998
2995
  "@arcgis/components-utils",
@@ -3030,11 +3027,11 @@ const ia = /* @__PURE__ */ new Set([
3030
3027
  ]);
3031
3028
  let gt, ht, ve;
3032
3029
  async function hn(e, t) {
3033
- const i = await _e(e, t), n = await He(i), s = "exports" in n, r = ca.bind(void 0, s), a = "@stencil/core" in (n.dependencies ?? {}) || "@stencil/core" in (n.devDependencies ?? {}), c = u.join(i, "dist/esm/loader.js");
3030
+ 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");
3034
3031
  if (a ? await U(c) : !1) {
3035
- const y = await J(c, "utf8"), g = na(y, "bootstrapLazy("), h = y.indexOf(", options", g), v = y.slice(g, h), S = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
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;
3036
3033
  try {
3037
- const T = JSON.parse(S), x = oa(T, { packageName: e, getImportPath: r });
3034
+ const T = JSON.parse(S), x = ra(T, { packageName: e, getImportPath: r });
3038
3035
  return { packageName: e, type: "stencil", components: x };
3039
3036
  } catch (T) {
3040
3037
  C.warn("@arcgis/lumina", `Failed to parse dist/esm/loader.js for ${e}.
@@ -3043,7 +3040,7 @@ Error: ${String(T)}`);
3043
3040
  }
3044
3041
  const d = ui(n.customElements);
3045
3042
  if (d != null) {
3046
- const y = u.join(i, d), g = JSON.parse(await J(y, "utf-8")), h = sa(g), v = vn(g, {
3043
+ const y = u.join(i, d), g = JSON.parse(await J(y, "utf-8")), h = na(g), v = vn(g, {
3047
3044
  packageName: e,
3048
3045
  getImportPath: r
3049
3046
  });
@@ -3051,7 +3048,7 @@ Error: ${String(T)}`);
3051
3048
  }
3052
3049
  const p = ui(n["web-types"]);
3053
3050
  if (p != null) {
3054
- const y = u.join(i, p), g = JSON.parse(await J(y, "utf-8")), h = ra(g, {
3051
+ const y = u.join(i, p), g = JSON.parse(await J(y, "utf-8")), h = sa(g, {
3055
3052
  packageName: e,
3056
3053
  getImportPath: r,
3057
3054
  packageRoot: i
@@ -3060,7 +3057,7 @@ Error: ${String(T)}`);
3060
3057
  }
3061
3058
  const m = u.join(i, "dist/components");
3062
3059
  if (await U(m)) {
3063
- const y = await aa(m, {
3060
+ const y = await oa(m, {
3064
3061
  packageName: e,
3065
3062
  getImportPath: r
3066
3063
  });
@@ -3068,7 +3065,7 @@ Error: ${String(T)}`);
3068
3065
  }
3069
3066
  }
3070
3067
  const ui = (e) => Array.isArray(e) ? e[0] : e;
3071
- function na(e, t) {
3068
+ function ia(e, t) {
3072
3069
  const i = e.indexOf(t);
3073
3070
  return i === -1 ? -1 : i + t.length;
3074
3071
  }
@@ -3090,7 +3087,7 @@ function vn(e, t) {
3090
3087
  }
3091
3088
  return i;
3092
3089
  }
3093
- const sa = (e) => e.compiler?.name === kt, ra = (e, t) => Object.fromEntries(
3090
+ const na = (e) => e.compiler?.name === kt, sa = (e, t) => Object.fromEntries(
3094
3091
  (e.contributions?.html?.elements ?? e.contributions?.html?.tags)?.map(
3095
3092
  (i) => [
3096
3093
  i.name,
@@ -3101,7 +3098,7 @@ const sa = (e) => e.compiler?.name === kt, ra = (e, t) => Object.fromEntries(
3101
3098
  }
3102
3099
  ]
3103
3100
  ) ?? []
3104
- ), oa = (e, t) => Object.fromEntries(
3101
+ ), ra = (e, t) => Object.fromEntries(
3105
3102
  e.flatMap(
3106
3103
  ([i, n]) => n.map(
3107
3104
  ([s, r, a]) => [
@@ -3119,7 +3116,7 @@ const sa = (e) => e.compiler?.name === kt, ra = (e, t) => Object.fromEntries(
3119
3116
  ]
3120
3117
  )
3121
3118
  )
3122
- ), aa = async (e, t) => Object.fromEntries(
3119
+ ), oa = async (e, t) => Object.fromEntries(
3123
3120
  (await Ue(e)).filter((i) => i.endsWith(".d.ts")).map((i) => {
3124
3121
  const n = i.slice(0, -5);
3125
3122
  return [
@@ -3131,16 +3128,16 @@ const sa = (e) => e.compiler?.name === kt, ra = (e, t) => Object.fromEntries(
3131
3128
  }
3132
3129
  ];
3133
3130
  })
3134
- ), ca = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, la = (e) => e.startsWith("/") ? e : `/${e}`, It = (e, t) => `${e}@fs${la(t)}`;
3135
- function qe(e = R(), t = !1, i = e.name === "@esri/calcite-components") {
3131
+ ), 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") {
3136
3133
  const n = e.version.includes("next"), s = e.name === "@esri/calcite-components";
3137
3134
  if (s && n)
3138
3135
  return `https://cdn.jsdelivr.net/npm/@esri/calcite-components@${e.version}/dist/calcite/`;
3139
- const r = t || n ? "jsdev.arcgis.com" : "js.arcgis.com", a = da(e.name), c = pa(e.version, i);
3136
+ const r = t || n ? "jsdev.arcgis.com" : "js.arcgis.com", a = la(e.name), c = da(e.version, i);
3140
3137
  return a.length === 0 ? `https://${r}/${c}/` : s ? `https://${r}/${a}/${c}/` : `https://${r}/${c}/${a}/`;
3141
3138
  }
3142
- const da = (e) => e.split("/").pop() ?? e;
3143
- function pa(e, t) {
3139
+ const la = (e) => e.split("/").pop() ?? e;
3140
+ function da(e, t) {
3144
3141
  if (/\d+\.\d+\.\d+-(?:.*)$/u.test(e))
3145
3142
  return "next";
3146
3143
  const n = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)/u, s = e.match(n);
@@ -3150,7 +3147,7 @@ function pa(e, t) {
3150
3147
  }
3151
3148
  return "next";
3152
3149
  }
3153
- const ua = ["keyed", "ref", "repeat", "live"], ae = "staticHtml", Z = "staticSvg", ce = "html", oe = "svg", Sn = Symbol("maybe HTML namespace or maybe SVG"), bn = "css", wn = "mathml", Tn = [bn, ce, wn, ae, Z, oe], ma = new Set(Tn), fa = ["safeClassMap", "safeStyleMap", "deferLoad"], ya = "nothing", ga = [...ua, ...Tn, ...fa, ya], Ke = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e);
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);
3154
3151
  function mi(e, t, i) {
3155
3152
  if (ne(e))
3156
3153
  return e;
@@ -3170,14 +3167,14 @@ function ne(e) {
3170
3167
  return (
3171
3168
  // Inlined string literal
3172
3169
  typeof e == "string" || // Syntax kinds that are never undefined
3173
- ha.has(e.kind) || // Ternary with both branches never undefined
3170
+ ga.has(e.kind) || // Ternary with both branches never undefined
3174
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
3175
- o.isBinaryExpression(e) && (va.has(e.operatorToken.kind) || ne(e.left) && ne(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3172
+ o.isBinaryExpression(e) && (ha.has(e.operatorToken.kind) || ne(e.left) && ne(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3176
3173
  (o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && ne(e.expression) || // JSX that got converted to html`<p>Something</p>`
3177
- o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && ma.has(e.tag.text)
3174
+ o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && ua.has(e.tag.text)
3178
3175
  );
3179
3176
  }
3180
- const ha = /* @__PURE__ */ new Set([
3177
+ const ga = /* @__PURE__ */ new Set([
3181
3178
  o.SyntaxKind.NumericLiteral,
3182
3179
  o.SyntaxKind.BigIntLiteral,
3183
3180
  o.SyntaxKind.StringLiteral,
@@ -3196,7 +3193,7 @@ const ha = /* @__PURE__ */ new Set([
3196
3193
  o.SyntaxKind.ClassExpression,
3197
3194
  // Trust? Trust.
3198
3195
  o.SyntaxKind.NonNullExpression
3199
- ]), va = /* @__PURE__ */ new Set([
3196
+ ]), ha = /* @__PURE__ */ new Set([
3200
3197
  o.SyntaxKind.PlusEqualsToken,
3201
3198
  o.SyntaxKind.MinusEqualsToken,
3202
3199
  o.SyntaxKind.AsteriskAsteriskEqualsToken,
@@ -3231,9 +3228,9 @@ const ha = /* @__PURE__ */ new Set([
3231
3228
  o.SyntaxKind.SlashToken,
3232
3229
  o.SyntaxKind.PercentToken,
3233
3230
  o.SyntaxKind.AsteriskAsteriskToken
3234
- ]), Sa = {
3231
+ ]), va = {
3235
3232
  property(e, t, i, n) {
3236
- const s = ba(n, i, e), r = s?.type === "stringifiedReflected", a = s?.type === "reflected" || r;
3233
+ const s = Sa(n, i, e), r = s?.type === "stringifiedReflected", a = s?.type === "reflected" || r;
3237
3234
  if (a) {
3238
3235
  const f = ot(t);
3239
3236
  if (f === !0)
@@ -3250,7 +3247,7 @@ const ha = /* @__PURE__ */ new Set([
3250
3247
  p,
3251
3248
  e,
3252
3249
  m ? "" : void 0
3253
- ), g = i === "value" && (n === "input" || n === "textarea" || n === Re) ? Ta(f, e) : f;
3250
+ ), g = i === "value" && (n === "input" || n === "textarea" || n === Re) ? wa(f, e) : f;
3254
3251
  if (g !== p)
3255
3252
  return [m ? `.${i}` : s.name, d, g];
3256
3253
  }
@@ -3320,7 +3317,7 @@ const ha = /* @__PURE__ */ new Set([
3320
3317
  return [o.factory.createIdentifier(s)];
3321
3318
  }
3322
3319
  };
3323
- function ba(e, t, i) {
3320
+ function Sa(e, t, i) {
3324
3321
  if (typeof e == "string") {
3325
3322
  const r = (i.externalComponents[e] ?? i.localComponents[e])?.propToAttribute?.[t];
3326
3323
  if (r !== void 0)
@@ -3395,7 +3392,7 @@ function fi(e, t) {
3395
3392
  if (i.length === 0)
3396
3393
  return [];
3397
3394
  const n = Yi(i);
3398
- if (Rr(n)) {
3395
+ if (jr(n)) {
3399
3396
  const s = n.replaceAll('"', "&#34;");
3400
3397
  if (s.length > n.length) {
3401
3398
  const r = n.replaceAll("'", "&#39;");
@@ -3414,7 +3411,7 @@ function yi(e, t, i) {
3414
3411
  `${i} prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3415
3412
  );
3416
3413
  const n = t.expression;
3417
- if (wa(n)) {
3414
+ if (ba(n)) {
3418
3415
  const r = i === "class" ? "safeClassMap" : "safeStyleMap";
3419
3416
  e.neededImports.add(r);
3420
3417
  const a = e.importRenames[r], c = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
@@ -3424,15 +3421,15 @@ function yi(e, t, i) {
3424
3421
  } else
3425
3422
  return [i, ...Ne(e, t, !0)];
3426
3423
  }
3427
- const wa = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3428
- function Ta(e, t) {
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) {
3429
3426
  t.neededImports.add("live");
3430
3427
  const i = t.importRenames.live;
3431
3428
  return o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [
3432
3429
  typeof e == "string" ? o.factory.createStringLiteral(e) : e
3433
3430
  ]);
3434
3431
  }
3435
- function Ea(e) {
3432
+ function Ta(e) {
3436
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)
3437
3434
  return {
3438
3435
  propType: gi[e.expression.expression.text],
@@ -3450,15 +3447,15 @@ const gi = {
3450
3447
  bindBooleanAttribute: "booleanAttribute",
3451
3448
  bindEvent: "event"
3452
3449
  };
3453
- function Ca(e, t, i) {
3454
- return Pa.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 ? (
3450
+ function Ea(e, t, i) {
3451
+ 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 ? (
3455
3452
  // When tag name is dynamic, we can't help but check if the prop name matches an "always attribute" in any html element
3456
3453
  Object.values(yt).some((r) => r.has(e))
3457
- ) : yt[i]?.has(e) === !0)) ? Yt.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" : Yt.has(e) ? "booleanAttribute" : "attribute" : "property";
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";
3458
3455
  }
3459
- const $a = ["class", "style", "ref", "directives", "key", "deferLoad"], Pa = new Set($a), xa = (e) => typeof e != "string" || e.trim().length > 0;
3456
+ const Ca = ["class", "style", "ref", "directives", "key", "deferLoad"], $a = new Set(Ca), Pa = (e) => typeof e != "string" || e.trim().length > 0;
3460
3457
  function Ge({ key: e, parts: t, litTag: i }, n) {
3461
- const s = ka(t);
3458
+ const s = xa(t);
3462
3459
  if (s.length % 2 === 0)
3463
3460
  throw new Error("Normalized template parts array length must be odd");
3464
3461
  const [r, ...a] = s;
@@ -3479,11 +3476,11 @@ function Ge({ key: e, parts: t, litTag: i }, n) {
3479
3476
  const l = n.importRenames[c], d = o.factory.createTaggedTemplateExpression(
3480
3477
  o.factory.createIdentifier(l),
3481
3478
  void 0,
3482
- a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), Aa(a))
3479
+ a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), ka(a))
3483
3480
  );
3484
3481
  return at(n, e, d);
3485
3482
  }
3486
- const ka = (e) => e.reduce(
3483
+ const xa = (e) => e.reduce(
3487
3484
  (t, i, n) => {
3488
3485
  const s = t.at(-1), r = typeof s == "string", a = typeof i == "string";
3489
3486
  if (r && a)
@@ -3493,7 +3490,7 @@ const ka = (e) => e.reduce(
3493
3490
  },
3494
3491
  [""]
3495
3492
  );
3496
- function Aa(e) {
3493
+ function ka(e) {
3497
3494
  if (!(e.length % 2 === 0))
3498
3495
  throw new Error("templatePartsToSpans should be called with normalized parts array without the first item");
3499
3496
  const i = e.length / 2;
@@ -3532,13 +3529,13 @@ function Cn(e, t) {
3532
3529
  );
3533
3530
  }
3534
3531
  const Ft = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
3535
- function Ia(e) {
3532
+ function Aa(e) {
3536
3533
  const t = Ft(e);
3537
3534
  if (t.length === 0)
3538
3535
  return [e || " "];
3539
3536
  const i = t.reduceRight(
3540
3537
  ([s, ...r], a) => {
3541
- const c = La(s), l = $n(c.slice(a.pos, a.end));
3538
+ const c = Ia(s), l = $n(c.slice(a.pos, a.end));
3542
3539
  return [
3543
3540
  c.slice(0, a.pos),
3544
3541
  /**
@@ -3557,12 +3554,12 @@ function Ia(e) {
3557
3554
  return (typeof n != "string" || n.trim() !== "") && i.push(" "), i;
3558
3555
  }
3559
3556
  const $n = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
3560
- function La(e) {
3557
+ function Ia(e) {
3561
3558
  if (typeof e == "string")
3562
3559
  return e;
3563
3560
  throw new Error(`Expected string, got ${typeof e}: ${String(e)}`);
3564
3561
  }
3565
- function Fa(e, t) {
3562
+ function La(e, t) {
3566
3563
  if (!(o.isPropertyAccessExpression(t.expression) && t.expression.name.text === "map"))
3567
3564
  return t;
3568
3565
  const n = t.arguments[0];
@@ -3596,7 +3593,7 @@ function Fa(e, t) {
3596
3593
  const f = p.attributes.properties[m];
3597
3594
  if (f === void 0 || !o.isJsxAttribute(f))
3598
3595
  return t;
3599
- const y = Lt(f.initializer, e.sourceFile), g = Na(r, n, y, l, e);
3596
+ const y = Lt(f.initializer, e.sourceFile), g = Fa(r, n, y, l, e);
3600
3597
  if (g === void 0)
3601
3598
  return t;
3602
3599
  e.liftedKeys.add(f.name), e.neededImports.add("repeat");
@@ -3629,7 +3626,7 @@ function Pn(e) {
3629
3626
  void 0
3630
3627
  ), t;
3631
3628
  }
3632
- function Na(e, t, i, n, s) {
3629
+ function Fa(e, t, i, n, s) {
3633
3630
  const r = W(i);
3634
3631
  if (r === void 0)
3635
3632
  return;
@@ -3645,7 +3642,7 @@ function Na(e, t, i, n, s) {
3645
3642
  return;
3646
3643
  }
3647
3644
  if (!n) {
3648
- const l = ja(r, a, t);
3645
+ const l = Da(r, a, t);
3649
3646
  if (l === void 0)
3650
3647
  return;
3651
3648
  a = l;
@@ -3675,7 +3672,7 @@ function W(e) {
3675
3672
  const t = W(e.left), i = W(e.right);
3676
3673
  return t === void 0 || i === void 0 ? void 0 : [...t, ...i];
3677
3674
  } else {
3678
- if (Da.has(e.kind))
3675
+ if (Na.has(e.kind))
3679
3676
  return [];
3680
3677
  {
3681
3678
  const t = Se(e);
@@ -3683,7 +3680,7 @@ function W(e) {
3683
3680
  }
3684
3681
  }
3685
3682
  }
3686
- const Da = /* @__PURE__ */ new Set([
3683
+ const Na = /* @__PURE__ */ new Set([
3687
3684
  o.SyntaxKind.NumericLiteral,
3688
3685
  o.SyntaxKind.BigIntLiteral,
3689
3686
  o.SyntaxKind.StringLiteral,
@@ -3692,12 +3689,12 @@ const Da = /* @__PURE__ */ new Set([
3692
3689
  o.SyntaxKind.FalseKeyword,
3693
3690
  o.SyntaxKind.NullKeyword,
3694
3691
  o.SyntaxKind.TrueKeyword
3695
- ]), Se = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? Se(e.expression) : e, xn = (e, t) => o.isObjectBindingPattern(e) ? Oa(e, t) : e;
3696
- function ja(e, t, i) {
3692
+ ]), Se = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? Se(e.expression) : e, xn = (e, t) => o.isObjectBindingPattern(e) ? Ma(e, t) : e;
3693
+ function Da(e, t, i) {
3697
3694
  if (e.every(We, t))
3698
3695
  return t;
3699
3696
  if (o.isIdentifier(t)) {
3700
- const n = o.isBlock(i.body) ? ye(i.body.statements, (r) => Ra(r, t)) : void 0;
3697
+ const n = o.isBlock(i.body) ? ye(i.body.statements, (r) => ja(r, t)) : void 0;
3701
3698
  if (n === void 0)
3702
3699
  return;
3703
3700
  const s = xn(n, e);
@@ -3705,7 +3702,7 @@ function ja(e, t, i) {
3705
3702
  return s;
3706
3703
  }
3707
3704
  }
3708
- function Ra(e, t) {
3705
+ function ja(e, t) {
3709
3706
  if (!o.isVariableStatement(e) || !(e.declarationList.flags & o.NodeFlags.Const))
3710
3707
  return;
3711
3708
  const i = e.declarationList.declarations[0];
@@ -3713,19 +3710,19 @@ function Ra(e, t) {
3713
3710
  }
3714
3711
  function We(e) {
3715
3712
  const t = this;
3716
- return o.isIdentifier(t) ? t.text === e : t.elements.some(Ma, e);
3713
+ return o.isIdentifier(t) ? t.text === e : t.elements.some(Ra, e);
3717
3714
  }
3718
- function Ma(e) {
3715
+ function Ra(e) {
3719
3716
  const t = this;
3720
3717
  return o.isOmittedExpression(e) ? !1 : We.call(e.name, t);
3721
3718
  }
3722
- function Oa(e, t) {
3719
+ function Ma(e, t) {
3723
3720
  let i = !1;
3724
3721
  const n = e.elements.filter((s) => o.isIdentifier(s.name) ? t.includes(s.name.text) : (i = !0, !0));
3725
3722
  return i || n.length === 0 ? e : o.factory.updateObjectBindingPattern(e, n);
3726
3723
  }
3727
- const kn = (e, t) => t.liftedKeys.has(e), Ja = (e) => e.apiJsonComponents.map(({ name: t, importPath: i }) => `import type { ${t} } from "./${i}";`).join(`
3728
- `), Ka = /^[a-zA-Z_$][a-zA-Z\d_$]*$/u, Ve = (e) => !Ka.test(e), Ee = (e) => Ve(e) ? `"${e}"` : e;
3724
+ const kn = (e, t) => t.liftedKeys.has(e), Oa = (e) => e.apiJsonComponents.map(({ name: t, importPath: i }) => `import type { ${t} } from "./${i}";`).join(`
3725
+ `), Ja = /^[a-zA-Z_$][a-zA-Z\d_$]*$/u, Ve = (e) => !Ja.test(e), Ee = (e) => Ve(e) ? `"${e}"` : e;
3729
3726
  function Xe(e, t) {
3730
3727
  const i = [], n = [];
3731
3728
  let s = !1;
@@ -3751,13 +3748,13 @@ const vi = (e) => e.map((t) => `'${t}'`).join(" | ");
3751
3748
  function q(e, t, i) {
3752
3749
  if (Ke(i))
3753
3750
  return An(e, i);
3754
- const n = o.isCallExpression(i) ? Fa(e, i) : i, s = o.visitEachChild(
3751
+ const n = o.isCallExpression(i) ? La(e, i) : i, s = o.visitEachChild(
3755
3752
  n,
3756
3753
  // Do not add "" if parent is binary expression to not turn {(a && <b />) || c} into {(a && <b />) || "" || c}
3757
3754
  q.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
3758
3755
  e.transformationContext
3759
3756
  );
3760
- return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || Ke(Se(i.right))) ? _a(s) : s;
3757
+ return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || Ke(Se(i.right))) ? Ba(s) : s;
3761
3758
  }
3762
3759
  function An(e, t) {
3763
3760
  const i = In(e, t);
@@ -3774,16 +3771,16 @@ function In(e, t) {
3774
3771
  const $ = o.isIdentifier(r) && r.text === kr ? De(i, e) : {
3775
3772
  // No need to wrap the function call in a lit-html tag
3776
3773
  litTag: void 0,
3777
- parts: [Ba(e, t, r, i)]
3774
+ parts: [Wa(e, t, r, i)]
3778
3775
  };
3779
3776
  return {
3780
- key: Wa(s, e),
3777
+ key: Ka(s, e),
3781
3778
  ...$
3782
3779
  };
3783
3780
  }
3784
- const c = r.text === et ? Re : r.text === tt ? ft : r.text, l = r.text === et ? ae : r.text === tt ? Z : Ir.has(c) ? Sn : Ct.has(c) ? oe : ce, d = Pt(c);
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);
3785
3782
  let p;
3786
- d && e.compiler.viteCommand === "build" && (p = Ha(e, c));
3783
+ d && e.compiler.viteCommand === "build" && (p = _a(e, c));
3787
3784
  let m;
3788
3785
  const f = [];
3789
3786
  let y = !1;
@@ -3796,18 +3793,18 @@ Found ${L.getText(e.sourceFile)}`
3796
3793
  const { name: $, initializer: b } = L;
3797
3794
  if (o.isJsxNamespacedName($))
3798
3795
  throw Error(`JSX namespaced attributes are not supported. Found ${$.getText(e.sourceFile)}`);
3799
- const E = $.text, I = Ea(b), N = I?.propType ?? Ca(E, b, c);
3796
+ const E = $.text, I = Ta(b), D = I?.propType ?? Ea(E, b, c);
3800
3797
  p?.delete(E);
3801
- const D = Sa[N](e, I?.initializer ?? b, E, c);
3802
- if (D.length === 0)
3798
+ const j = va[D](e, I?.initializer ?? b, E, c);
3799
+ if (j.length === 0)
3803
3800
  return [];
3804
- const M = e.compiler.shouldMinifyJsx ? [" "] : Ia(En($, e));
3805
- return N === "key" ? (m = typeof D[0] == "object" && !kn($, e) ? D[0] : void 0, M.some(xa) ? M : []) : N === "directives" || N === "ref" || E === "deferLoad" ? (y ||= N === "deferLoad", f.push(
3801
+ 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(
3806
3803
  ...M,
3807
- ...D.flatMap(
3808
- (H, K) => typeof H == "string" || K === 0 || typeof D[K - 1] == "string" ? H : [" ", H]
3804
+ ...j.flatMap(
3805
+ (H, K) => typeof H == "string" || K === 0 || typeof j[K - 1] == "string" ? H : [" ", H]
3809
3806
  )
3810
- ), []) : [...M, ...D];
3807
+ ), []) : [...M, ...j];
3811
3808
  });
3812
3809
  if (p !== void 0 && p.size > 0 && e.compiler.logLintError(
3813
3810
  "mustIncludeAllRequiredProperties",
@@ -3823,7 +3820,7 @@ Found ${L.getText(e.sourceFile)}`
3823
3820
  throw Error(
3824
3821
  `Void HTML elements like <${c}> cannot have children. Found ${t.getText(e.sourceFile)}`
3825
3822
  );
3826
- const S = (l === oe || l === Z) && v.parts.length === 0, T = [
3823
+ const S = (l === oe || l === Y) && v.parts.length === 0, T = [
3827
3824
  "<",
3828
3825
  typeof c == "string" ? c : r,
3829
3826
  ...g,
@@ -3842,12 +3839,12 @@ Found ${L.getText(e.sourceFile)}`
3842
3839
  ];
3843
3840
  return { key: m, parts: x, litTag: l };
3844
3841
  }
3845
- function Wa(e, t) {
3842
+ function Ka(e, t) {
3846
3843
  const i = e.attributes.properties[Ln(e)];
3847
3844
  return i && o.isJsxAttribute(i) && !kn(i.name, t) ? Lt(i.initializer, t.sourceFile) : void 0;
3848
3845
  }
3849
3846
  const Ln = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
3850
- function Ba(e, t, i, n) {
3847
+ function Wa(e, t, i, n) {
3851
3848
  const r = (o.isJsxElement(t) ? t.openingElement : t).attributes.properties.map((l) => {
3852
3849
  if (o.isJsxSpreadAttribute(l))
3853
3850
  return Cn(En(l, e), o.factory.createSpreadAssignment(l.expression));
@@ -3865,7 +3862,7 @@ function Ba(e, t, i, n) {
3865
3862
  Ge({ key: void 0, parts: a, litTag: c }, e)
3866
3863
  )
3867
3864
  ), o.factory.createCallExpression(i, void 0, [
3868
- o.factory.createObjectLiteralExpression(r.filter(j))
3865
+ o.factory.createObjectLiteralExpression(r.filter(R))
3869
3866
  ]);
3870
3867
  }
3871
3868
  function De(e, t) {
@@ -3877,7 +3874,7 @@ function De(e, t) {
3877
3874
  return Nt(t, s, s);
3878
3875
  {
3879
3876
  const r = In(t, s);
3880
- if (r.key === void 0 && r.litTag !== ae && r.litTag !== Z) {
3877
+ if (r.key === void 0 && r.litTag !== ae && r.litTag !== Y) {
3881
3878
  if (r.litTag === Sn)
3882
3879
  return r.parts;
3883
3880
  if (i !== void 0 && r.litTag !== void 0 && i !== r.litTag)
@@ -3891,7 +3888,7 @@ function De(e, t) {
3891
3888
  });
3892
3889
  return { litTag: i, parts: n };
3893
3890
  }
3894
- function _a(e) {
3891
+ function Ba(e) {
3895
3892
  return e.operatorToken.kind === o.SyntaxKind.AmpersandAmpersandToken ? o.factory.createBinaryExpression(
3896
3893
  e,
3897
3894
  o.factory.createToken(o.SyntaxKind.BarBarToken),
@@ -3942,7 +3939,7 @@ function Nt(e, t, i) {
3942
3939
  ] : [q(e, i, t.expression)]
3943
3940
  );
3944
3941
  }
3945
- function Ha(e, t) {
3942
+ function _a(e, t) {
3946
3943
  if (t in e.localComponents)
3947
3944
  for (const n of e.compiler.privateApiJson.modules)
3948
3945
  for (const s of n.declarations) {
@@ -3964,7 +3961,7 @@ const Fn = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), b
3964
3961
  */
3965
3962
  [ae]: ["lit-html/static.js", "lit/static-html.js"],
3966
3963
  [oe]: ["lit-html", "lit/html.js", "lit"],
3967
- [Z]: ["lit-html/static.js", "lit/static-html.js"],
3964
+ [Y]: ["lit-html/static.js", "lit/static-html.js"],
3968
3965
  [wn]: ["lit-html", "lit/html.js", "lit"],
3969
3966
  [bn]: ["@lit/reactive-element/css-tag.js", "@lit/reactive-element", "lit"],
3970
3967
  safeClassMap: ["@arcgis/lumina"],
@@ -3978,11 +3975,11 @@ const Fn = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), b
3978
3975
  }, Nn = Fn(
3979
3976
  Object.entries(be).flatMap(([e, t]) => t.map((i) => [i, e]))
3980
3977
  ), Dn = new Set(Object.keys(Nn));
3981
- function Ua(e, t) {
3978
+ function Ha(e, t) {
3982
3979
  const i = t.importClause, n = t.moduleSpecifier;
3983
3980
  if (!o.isStringLiteral(n))
3984
3981
  return t;
3985
- const s = za(e.sourceFile.fileName, n.text, ""), r = !i?.isTypeOnly;
3982
+ const s = Ua(e.sourceFile.fileName, n.text, ""), r = !i?.isTypeOnly;
3986
3983
  if (r && e.existingImportedModules.add(s), i === void 0)
3987
3984
  return t;
3988
3985
  if (e.isInLightDomComponent && n.text.startsWith(".") && Oe.test(n.text) && // If id already includes ?, bypass our custom behavior
@@ -3991,7 +3988,7 @@ function Ua(e, t) {
3991
3988
  t,
3992
3989
  t.modifiers,
3993
3990
  i,
3994
- o.factory.createStringLiteral(n.text + Q),
3991
+ o.factory.createStringLiteral(n.text + Z),
3995
3992
  t.attributes
3996
3993
  );
3997
3994
  if (i.name !== void 0) {
@@ -4014,11 +4011,11 @@ function Ua(e, t) {
4014
4011
  r && !l.isTypeOnly && m && f && e.importedFunctionComponentsFromModules.add(s);
4015
4012
  }), t;
4016
4013
  }
4017
- const jn = (e, t) => e === ce && be.staticHtml.includes(t) ? ae : e === oe && be.staticSvg.includes(t) ? Z : e, za = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
4018
- function qa(e) {
4019
- return o.isImportDeclaration(e) ? Ga(this, e) : e;
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;
4015
+ function za(e) {
4016
+ return o.isImportDeclaration(e) ? qa(this, e) : e;
4020
4017
  }
4021
- function Ga(e, t) {
4018
+ function qa(e, t) {
4022
4019
  const i = t.importClause, n = i?.namedBindings, s = t.moduleSpecifier;
4023
4020
  if (!o.isStringLiteral(s) || !n || !o.isNamedImports(n) || !Dn.has(s.text))
4024
4021
  return t;
@@ -4043,7 +4040,7 @@ function Ga(e, t) {
4043
4040
  t.attributes
4044
4041
  ) : t;
4045
4042
  }
4046
- function Va(e) {
4043
+ function Ga(e) {
4047
4044
  const t = Fn(Array.from(e.neededImports, (i) => [be[i][0], i]));
4048
4045
  return Object.entries(t).map(
4049
4046
  ([i, n]) => o.factory.createImportDeclaration(
@@ -4060,28 +4057,28 @@ function Va(e) {
4060
4057
  );
4061
4058
  }
4062
4059
  function Rn(e, t) {
4063
- const i = e === ae ? ce : e === Z ? oe : e, n = t.importRenames[e];
4060
+ const i = e === ae ? ce : e === Y ? oe : e, n = t.importRenames[e];
4064
4061
  return n === i ? o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(i)) : o.factory.createImportSpecifier(
4065
4062
  !1,
4066
4063
  o.factory.createIdentifier(i),
4067
4064
  o.factory.createIdentifier(n)
4068
4065
  );
4069
4066
  }
4070
- function Xa(e) {
4071
- const t = ea().map(({ packageName: i }) => i);
4067
+ function Va(e) {
4068
+ const t = Yo().map(({ packageName: i }) => i);
4072
4069
  return e.existingImportedModules.forEach((i) => {
4073
4070
  if (u.isAbsolute(i))
4074
4071
  return;
4075
4072
  const { packageName: n, moduleName: s } = on(i);
4076
4073
  if (t.includes(n ?? "") && (s.startsWith("dist/components") || s.startsWith("components"))) {
4077
- const r = Y(e.sourceFile.fileName);
4074
+ const r = ee(e.sourceFile.fileName);
4078
4075
  throw new Error(
4079
4076
  `Did not expect to find any explicit imports for "${i}". Found import in ${r}. Imports for web components that your component consumes will be added automatically at build-time as appropriate for a given output target. Type-only imports are still allowed. If you believe this is an error, please notify Lumina maintainers.`
4080
4077
  );
4081
4078
  }
4082
4079
  }), [];
4083
4080
  }
4084
- function Qa(e) {
4081
+ function Xa(e) {
4085
4082
  if (e.compiler.viteCommand === "serve")
4086
4083
  return e.customElementsToImport.clear(), e.customElementsToImportDeferred.clear(), [];
4087
4084
  const t = e.compiler._customElementDependencies;
@@ -4096,12 +4093,12 @@ function Qa(e) {
4096
4093
  t[n] ??= { referencedBy: [], referencedTagNames: [], referencedDeferredTagNames: [] }, t[n].referencedBy.push(e.sourceFile.fileName);
4097
4094
  }), [];
4098
4095
  }
4099
- function Za(e, t, i) {
4096
+ function Qa(e, t, i) {
4100
4097
  const n = gn()[t] ?? Mn(e)[t];
4101
4098
  if (n === void 0) {
4102
4099
  if (e.options?.build?.dependencies?.silenceUnknownJsxElementUsage?.(t, i, e) === !0)
4103
4100
  return;
4104
- const s = Y(i);
4101
+ const s = ee(i);
4105
4102
  throw Error(
4106
4103
  w(
4107
4104
  "@arcgis/lumina:resolveTagName",
@@ -4111,8 +4108,8 @@ function Za(e, t, i) {
4111
4108
  }
4112
4109
  return n;
4113
4110
  }
4114
- function Ya(e, t) {
4115
- return e.packageName === void 0 ? ee(t, e.moduleName) : u.join(e.packageName, e.moduleName);
4111
+ function Za(e, t) {
4112
+ return e.packageName === void 0 ? te(t, e.moduleName) : u.join(e.packageName, e.moduleName);
4116
4113
  }
4117
4114
  function Mn(e) {
4118
4115
  return e._localDefinedComponents ??= vn(e.privateApiJson, {
@@ -4122,7 +4119,7 @@ function Mn(e) {
4122
4119
  }
4123
4120
  }), e._localDefinedComponents;
4124
4121
  }
4125
- const ec = (e, t) => {
4122
+ const Ya = (e, t) => {
4126
4123
  const i = e.pragmas;
4127
4124
  if (i?.has("jsx") === !0 || i?.has("jsxImportSource") === !0)
4128
4125
  return e.statements;
@@ -4132,7 +4129,7 @@ const ec = (e, t) => {
4132
4129
  localComponents: t.compiler.isInPuppeteerTestBackEnd ? {} : Mn(t.compiler),
4133
4130
  sourceFile: e,
4134
4131
  transformationContext: t.transformation,
4135
- importRenames: tc(e),
4132
+ importRenames: ec(e),
4136
4133
  existingImportedModules: /* @__PURE__ */ new Set(),
4137
4134
  importedFunctionComponentsFromModules: /* @__PURE__ */ new Set(),
4138
4135
  existingLitImports: /* @__PURE__ */ new Set(),
@@ -4148,18 +4145,18 @@ const ec = (e, t) => {
4148
4145
  let s = [];
4149
4146
  if (e.statements.every((a) => {
4150
4147
  if (o.isImportDeclaration(a)) {
4151
- if (s.push(Ua(n, a)), n.hasNonLuminaJsxImport)
4148
+ if (s.push(Ha(n, a)), n.hasNonLuminaJsxImport)
4152
4149
  return !1;
4153
4150
  } else
4154
4151
  s.push(q(n, void 0, a));
4155
4152
  return !0;
4156
4153
  }), n.hasNonLuminaJsxImport)
4157
4154
  return e.statements;
4158
- if (n.neededImports.size > 0 && (s = s.map(qa, n), n.existingLitImports.size > 0))
4155
+ if (n.neededImports.size > 0 && (s = s.map(za, n), n.existingLitImports.size > 0))
4159
4156
  throw new Error(
4160
4157
  `Expected context.existingLitImports to be empty by now. Found: ${Array.from(n.existingLitImports).join(", ")}`
4161
4158
  );
4162
- const r = [Va, Xa, Qa].flatMap(
4159
+ const r = [Ga, Va, Xa].flatMap(
4163
4160
  (a) => a(n)
4164
4161
  );
4165
4162
  if (n.neededImports.size > 0)
@@ -4168,18 +4165,18 @@ const ec = (e, t) => {
4168
4165
  );
4169
4166
  return [...r, ...s];
4170
4167
  };
4171
- function tc(e) {
4172
- return ic(e), Object.fromEntries(
4173
- ga.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4168
+ function ec(e) {
4169
+ return tc(e), Object.fromEntries(
4170
+ ya.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4174
4171
  );
4175
4172
  }
4176
- function ic(e) {
4173
+ function tc(e) {
4177
4174
  if (!("identifiers" in e))
4178
4175
  throw new Error(
4179
4176
  "Expected sourceFile to have an undocumented identifiers property that is a Map<string,string>. If this error is thrown, it may mean Lumina Compiler needs to be updated to support the version of TypeScript being used."
4180
4177
  );
4181
4178
  }
4182
- function nc(e, t, i) {
4179
+ function ic(e, t, i) {
4183
4180
  return t.size === 0 ? e : [
4184
4181
  o.factory.createPropertyDeclaration(
4185
4182
  [
@@ -4193,7 +4190,7 @@ function nc(e, t, i) {
4193
4190
  Array.from(t.entries()).map(
4194
4191
  ([n, s]) => o.factory.createPropertyAssignment(
4195
4192
  Ve(n) ? o.factory.createStringLiteral(n) : n,
4196
- sc(s, i)
4193
+ nc(s, i)
4197
4194
  )
4198
4195
  )
4199
4196
  )
@@ -4201,7 +4198,7 @@ function nc(e, t, i) {
4201
4198
  ...e
4202
4199
  ];
4203
4200
  }
4204
- function sc(e, t) {
4201
+ function nc(e, t) {
4205
4202
  let i = 0, n = !0;
4206
4203
  const s = [], r = [];
4207
4204
  for (const l of e.properties)
@@ -4211,7 +4208,7 @@ function sc(e, t) {
4211
4208
  return !0;
4212
4209
  const d = l.name.text, p = l.initializer, m = p.kind === o.SyntaxKind.TrueKeyword, f = p.kind === o.SyntaxKind.FalseKeyword;
4213
4210
  if (d === "attribute")
4214
- return n = !1, i |= m ? Ht : 0, !m && !f;
4211
+ return n = !1, i |= m ? _t : 0, !m && !f;
4215
4212
  if (d === "reflect")
4216
4213
  return i |= m ? xs : 0, !1;
4217
4214
  if (d === "type" && o.isIdentifier(p)) {
@@ -4228,7 +4225,7 @@ function sc(e, t) {
4228
4225
  }
4229
4226
  return !0;
4230
4227
  }
4231
- n && (i |= Ht);
4228
+ n && (i |= _t);
4232
4229
  const c = o.factory.createNumericLiteral(i);
4233
4230
  return s.length === 0 && (t || r.length === 0) ? c : o.factory.createArrayLiteralExpression([
4234
4231
  c,
@@ -4243,7 +4240,7 @@ function sc(e, t) {
4243
4240
  ...t ? [] : [o.factory.createObjectLiteralExpression(r)]
4244
4241
  ]);
4245
4242
  }
4246
- function rc(e, t, i, n, s) {
4243
+ function sc(e, t, i, n, s) {
4247
4244
  let r = -1, a = -1, c = -1;
4248
4245
  t.options?.properties.forEach((f, y) => {
4249
4246
  if (o.isSpreadAssignment(f))
@@ -4255,23 +4252,23 @@ function rc(e, t, i, n, s) {
4255
4252
  g === "type" ? r = y : g === "attribute" ? a = y : g === "readOnly" && (c = y);
4256
4253
  }
4257
4254
  });
4258
- const l = s.attribute === void 0 && a === -1, d = s.readonly === !0 && s.docsOnlyReadonly !== !0 && c === -1, p = oc(e, t, i, s, r), m = [
4255
+ 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 = [
4259
4256
  ...l ? [o.factory.createPropertyAssignment("attribute", o.factory.createFalse())] : [],
4260
4257
  ...d ? [o.factory.createPropertyAssignment("readOnly", o.factory.createTrue())] : [],
4261
4258
  ...p !== void 0 ? [p] : []
4262
4259
  ];
4263
4260
  return m.length > 0 ? t.options === void 0 ? o.factory.createObjectLiteralExpression(m, !1) : o.factory.updateObjectLiteralExpression(t.options, [...t.options.properties, ...m]) : t.options;
4264
4261
  }
4265
- function oc(e, t, i, n, s) {
4262
+ function rc(e, t, i, n, s) {
4266
4263
  if (n.attribute === void 0)
4267
4264
  return;
4268
- const r = cc(e), a = i.compiler.viteCommand === "serve" || r !== "Other" ? r : ac(n.type.values);
4265
+ const r = ac(e), a = i.compiler.viteCommand === "serve" || r !== "Other" ? r : oc(n.type.values);
4269
4266
  return a === "Other" || n.readonly && (a !== "Boolean" || !n.reflects) || t.options?.properties[s] !== void 0 ? void 0 : o.factory.createPropertyAssignment(
4270
4267
  o.factory.createIdentifier("type"),
4271
4268
  o.factory.createIdentifier(a)
4272
4269
  );
4273
4270
  }
4274
- function ac(e) {
4271
+ function oc(e) {
4275
4272
  let t = !1, i = !1, n = !1;
4276
4273
  if (e?.forEach((s) => {
4277
4274
  t ||= s.type === "number", i ||= s.type === "boolean", n ||= s.type === "string" || s.type === "any" || s.type === "unknown";
@@ -4283,7 +4280,7 @@ function ac(e) {
4283
4280
  }
4284
4281
  return "Other";
4285
4282
  }
4286
- function cc(e) {
4283
+ function ac(e) {
4287
4284
  const t = e.type ?? (o.isSetAccessor(e) ? e.parameters[0].type : void 0);
4288
4285
  if (t === void 0) {
4289
4286
  if ("initializer" in e && e.initializer !== void 0) {
@@ -4300,7 +4297,7 @@ function cc(e) {
4300
4297
  }
4301
4298
  return "Other";
4302
4299
  }
4303
- function lc(e, t, i, n, s) {
4300
+ function cc(e, t, i, n, s) {
4304
4301
  if (t.modifiers === void 0)
4305
4302
  return t;
4306
4303
  let r = -1, a = -1;
@@ -4310,18 +4307,18 @@ function lc(e, t, i, n, s) {
4310
4307
  d === "property" && (r = l), d === "state" && (a = l);
4311
4308
  }
4312
4309
  }), r !== -1) {
4313
- const c = dc(e, t, i, n), l = Si(t, r, n), d = rc(t, l, e, n, c);
4310
+ const c = lc(e, t, i, n), l = Si(t, r, n), d = sc(t, l, e, n, c);
4314
4311
  let p = !1;
4315
4312
  return s.set(c.name, d ?? o.factory.createObjectLiteralExpression()), p = !0, l.options = d, bi(t, l, r, p);
4316
4313
  } else if (a !== -1) {
4317
- 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);
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);
4318
4315
  if (p === void 0)
4319
4316
  throw new Error("Failed to statically determine the state property name");
4320
4317
  return s.set(p, d), bi(t, c, a, !0);
4321
4318
  } else
4322
4319
  return t;
4323
4320
  }
4324
- function dc(e, t, i, n) {
4321
+ function lc(e, t, i, n) {
4325
4322
  const s = e.apiModule?.declarations.find(
4326
4323
  (a) => a.name === i
4327
4324
  ) ?? (e.compiler.isInTest ? {
@@ -4335,7 +4332,7 @@ function dc(e, t, i, n) {
4335
4332
  `Failed to find API property for ${t.getText(n)} in ${i} in ${n.fileName}`
4336
4333
  );
4337
4334
  if (r.name === "") {
4338
- const a = X(t.name);
4335
+ const a = Q(t.name);
4339
4336
  if (a === void 0)
4340
4337
  throw Error(
4341
4338
  `Failed to statically determine the property name: ${t.getText(n)} in ${i} in ${n.fileName}`
@@ -4388,16 +4385,16 @@ function bi(e, t, i, n) {
4388
4385
  e.initializer
4389
4386
  );
4390
4387
  }
4391
- const pc = (e, t) => {
4388
+ const dc = (e, t) => {
4392
4389
  if (t.apiModule === void 0 && !t.compiler.isInTest)
4393
4390
  return e.statements;
4394
4391
  let i;
4395
4392
  function n() {
4396
4393
  i = /* @__PURE__ */ new Map();
4397
4394
  }
4398
- const s = (c) => nc(c, i, t.compiler.shouldMinify);
4395
+ const s = (c) => ic(c, i, t.compiler.shouldMinify);
4399
4396
  function r(c, l) {
4400
- const d = mc(t, c, l, e, i);
4397
+ const d = uc(t, c, l, e, i);
4401
4398
  return t.compiler.viteCommand === "build" && o.setEmitFlags(d, o.EmitFlags.NoComments), d;
4402
4399
  }
4403
4400
  return e.statements.map(
@@ -4431,11 +4428,11 @@ function On(e, t, i, n, s = Ji) {
4431
4428
  i.transformation
4432
4429
  ) : t;
4433
4430
  }
4434
- const uc = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4435
- function mc(e, t, i, n, s) {
4431
+ const pc = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4432
+ function uc(e, t, i, n, s) {
4436
4433
  if (o.isMethodDeclaration(t)) {
4437
4434
  const r = t.modifiers?.filter(
4438
- (a) => !o.isDecorator(a) || !fc(a)
4435
+ (a) => !o.isDecorator(a) || !mc(a)
4439
4436
  );
4440
4437
  if (r?.length !== t.modifiers?.length)
4441
4438
  return o.factory.updateMethodDeclaration(
@@ -4449,7 +4446,7 @@ function mc(e, t, i, n, s) {
4449
4446
  t.type,
4450
4447
  t.body
4451
4448
  );
4452
- if ("text" in t.name && uc.has(t.name.text) && t.body) {
4449
+ if ("text" in t.name && pc.has(t.name.text) && t.body) {
4453
4450
  const a = t.name.text;
4454
4451
  return t.body.statements.some(
4455
4452
  (l) => o.isExpressionStatement(l) && o.isCallExpression(l.expression) && o.isPropertyAccessExpression(l.expression.expression) && l.expression.expression.expression.kind === o.SyntaxKind.SuperKeyword && l.expression.expression.name.text === a
@@ -4475,11 +4472,11 @@ function mc(e, t, i, n, s) {
4475
4472
  );
4476
4473
  }
4477
4474
  }
4478
- return o.isPropertyDeclaration(t) || o.isAccessor(t) ? lc(e, t, i, n, s) : t;
4475
+ return o.isPropertyDeclaration(t) || o.isAccessor(t) ? cc(e, t, i, n, s) : t;
4479
4476
  }
4480
- const fc = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", vt = "@arcgis/core", ct = R(), Ce = vt in (ct.dependencies ?? {}) || vt in (ct.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
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
4481
4478
  ct.name === "@arcgis/lumina";
4482
- async function yc(e, t) {
4479
+ async function fc(e, t) {
4483
4480
  if (!Ce)
4484
4481
  return [];
4485
4482
  const i = await _e(vt);
@@ -4510,15 +4507,15 @@ const wi = (e) => ({
4510
4507
  cssHref: `${e}esri/themes/light/main.css`,
4511
4508
  // This is used be the theme switcher in `@arcgis/storybook-utils`
4512
4509
  id: "arcgisCoreStylesheet"
4513
- }), Ti = "makeRuntime(", gc = "@arcgis/core";
4514
- function hc(e, t) {
4510
+ }), Ti = "makeRuntime(", yc = "@arcgis/core";
4511
+ function gc(e, t) {
4515
4512
  const i = e.indexOf(Ti);
4516
4513
  if (i === -1)
4517
4514
  throw new Error("Failed to find makeRuntime() function call in src/runtime.ts");
4518
4515
  const n = i + Ti.length, s = t.options.css?.commonStylesPath;
4519
4516
  return {
4520
4517
  code: [
4521
- s === void 0 ? "" : `import commonStyles from "${ee(t.dir.src, s)}";`,
4518
+ s === void 0 ? "" : `import commonStyles from "${te(t.dir.src, s)}";`,
4522
4519
  e.slice(0, n),
4523
4520
  "{",
4524
4521
  "defaultAssetPath:import.meta.env.BASE_URL,",
@@ -4529,7 +4526,7 @@ function hc(e, t) {
4529
4526
  "}",
4530
4527
  e.slice(n),
4531
4528
  Ce ? `
4532
- import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${gc}/applications/Components/reactiveUtils.js";
4529
+ import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${yc}/applications/Components/reactiveUtils.js";
4533
4530
  createObservable,
4534
4531
  runtime.t = trackAccess;
4535
4532
  runtime.o = createObservable;
@@ -4539,11 +4536,11 @@ runtime.r = runTracked;` : ""
4539
4536
  map: null
4540
4537
  };
4541
4538
  }
4542
- const vc = [
4543
- ec,
4539
+ const hc = [
4540
+ Ya,
4544
4541
  qs,
4545
- pc
4546
- ], Ei = "@arcgis/lumina:transformComponents", Sc = (e) => ({
4542
+ dc
4543
+ ], Ei = "@arcgis/lumina:transformComponents", vc = (e) => ({
4547
4544
  name: Ei,
4548
4545
  transform: {
4549
4546
  // Transform JSX to lit-html first so that vite:esbuild doesn't transform JSX to h().
@@ -4557,7 +4554,7 @@ const vc = [
4557
4554
  i
4558
4555
  );
4559
4556
  else if (i === `${e.dir.src}runtime.ts`)
4560
- return hc(t, e);
4557
+ return gc(t, e);
4561
4558
  return;
4562
4559
  }
4563
4560
  const n = e.getSourceFile(i, t);
@@ -4565,7 +4562,7 @@ const vc = [
4565
4562
  const r = o.transform(n, [
4566
4563
  (f) => () => zi(e, f, n, [
4567
4564
  ...e.options.types?.sourceFileTransformers ?? [],
4568
- ...vc
4565
+ ...hc
4569
4566
  ])
4570
4567
  ]).transformed[0], a = e._compilerOptionsForPrinter, c = e._typeScriptPrinter, l = a.sourceMap ? me.createSourceMapGenerator(
4571
4568
  e.typeScriptHost,
@@ -4583,7 +4580,7 @@ const vc = [
4583
4580
  }
4584
4581
  }
4585
4582
  });
4586
- function bc(e) {
4583
+ function Sc(e) {
4587
4584
  const t = e.typeScriptConfig;
4588
4585
  return {
4589
4586
  ...t,
@@ -4615,13 +4612,13 @@ function bc(e) {
4615
4612
  skipLibCheck: !0
4616
4613
  };
4617
4614
  }
4618
- function wc(e) {
4615
+ function bc(e) {
4619
4616
  const t = e.options.types?.tsconfigPath, i = t && u.isAbsolute(t) ? t : ps(t ?? "tsconfig.json");
4620
4617
  if (i === void 0)
4621
4618
  throw Error(
4622
4619
  w(
4623
4620
  "@arcgis/lumina:loadTypeScriptConfig",
4624
- `Unable to find ${Y(String(t))}. Please make sure the file exists, or provide types.tsconfigPath option to useLumina()`,
4621
+ `Unable to find ${ee(String(t))}. Please make sure the file exists, or provide types.tsconfigPath option to useLumina()`,
4625
4622
  process.cwd()
4626
4623
  )
4627
4624
  );
@@ -4654,7 +4651,7 @@ function Jn(e) {
4654
4651
  const i = o.ScriptTarget[t].toLowerCase();
4655
4652
  return i === "latest" ? "esnext" : i;
4656
4653
  }
4657
- function Tc(e, t) {
4654
+ function wc(e, t) {
4658
4655
  if (e.isInStorybook && e.viteCommand === "serve") {
4659
4656
  const i = (a, c, l, ...d) => {
4660
4657
  const p = a.filter(
@@ -4676,9 +4673,9 @@ function Tc(e, t) {
4676
4673
  e.typeScriptProgram = a.getProgram(), e.typeScriptTypeChecker = e.typeScriptProgram.getTypeChecker(), e._typeScriptReload?.resolve(), e._typeScriptReload = new Ss();
4677
4674
  }, e.typeScriptWatchProgram = o.createWatchProgram(n), e.typeScriptConfig = e.typeScriptProgram.getCompilerOptions();
4678
4675
  }
4679
- e.typeScriptConfig.sourceMap = t, e._compilerOptionsForPrinter = bc(e), e._typeScriptPrinter = tn(e._compilerOptionsForPrinter);
4676
+ e.typeScriptConfig.sourceMap = t, e._compilerOptionsForPrinter = Sc(e), e._typeScriptPrinter = tn(e._compilerOptionsForPrinter);
4680
4677
  }
4681
- async function Ec(e, t, i) {
4678
+ async function Tc(e, t, i) {
4682
4679
  const n = u.resolve(e.dir.root, t);
4683
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 });
4684
4681
  const s = [
@@ -4705,7 +4702,7 @@ async function Ec(e, t, i) {
4705
4702
  s.map(async (d, p) => {
4706
4703
  const f = p === 0 ? d : u.join(r, d), y = u.join(e.dir.root, f), g = u.join(n, f);
4707
4704
  await z(u.dirname(g), { recursive: !0 });
4708
- const h = await J(y, "utf-8"), v = ee(u.dirname(f), `build/${i}`), S = `${l}<script type="module" src="${v}"><\/script>
4705
+ const h = await J(y, "utf-8"), v = te(u.dirname(f), `build/${i}`), S = `${l}<script type="module" src="${v}"><\/script>
4709
4706
  `;
4710
4707
  let T = h.indexOf("<style>");
4711
4708
  if (T === -1 && (T = h.indexOf("</head>")), T === -1)
@@ -4729,7 +4726,7 @@ const Kn = /* @__PURE__ */ new Set([
4729
4726
  "extras",
4730
4727
  "support"
4731
4728
  ]), _ = "@arcgis/lumina:buildCdn", Dt = "cdn", Wn = "index", we = "main";
4732
- function Cc(e) {
4729
+ function Ec(e) {
4733
4730
  const { skip: t = !1, namespace: i, esbuildOptions: n = {} } = e.options.build?.cdn ?? {}, s = e.options.build?.webApp?.destination, r = i !== void 0;
4734
4731
  if (r) {
4735
4732
  if (i.toLowerCase() !== i)
@@ -4746,7 +4743,7 @@ function Cc(e) {
4746
4743
  if (e.provideAssets([
4747
4744
  {
4748
4745
  type: "dynamic",
4749
- source: () => Lo(e),
4746
+ source: () => Io(e),
4750
4747
  destination: `../${r ? a : we}.css`
4751
4748
  }
4752
4749
  ]), !t)
@@ -4755,8 +4752,8 @@ function Cc(e) {
4755
4752
  async writeBundle() {
4756
4753
  if (e.isInStorybook)
4757
4754
  return;
4758
- const c = Ce && R().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 $c(e, a, n, d, c);
4759
- await Pc(
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);
4756
+ await $c(
4760
4757
  p,
4761
4758
  e,
4762
4759
  r ? `${a}.esm` : a,
@@ -4764,11 +4761,11 @@ function Cc(e) {
4764
4761
  c
4765
4762
  );
4766
4763
  const m = Date.now();
4767
- C.info(_, `CDN was built in ${m - l}ms`), s && await Ec(e, s, `${r ? `${a}.esm` : a}.js`);
4764
+ C.info(_, `CDN was built in ${m - l}ms`), s && await Tc(e, s, `${r ? `${a}.esm` : a}.js`);
4768
4765
  }
4769
4766
  };
4770
4767
  }
4771
- async function $c(e, t, i, n, s) {
4768
+ async function Cc(e, t, i, n, s) {
4772
4769
  const r = e.environment;
4773
4770
  if (i.minify && s)
4774
4771
  throw Error(
@@ -4863,7 +4860,7 @@ ${pn(e._globalCssString, e)}`,
4863
4860
  }
4864
4861
  });
4865
4862
  }
4866
- async function Pc(e, t, i, n, s) {
4863
+ async function $c(e, t, i, n, s) {
4867
4864
  const r = t.dir.distCdn, a = `${i}.js`, c = new Map(
4868
4865
  e.outputFiles.map((l) => {
4869
4866
  const d = {
@@ -4873,12 +4870,12 @@ async function Pc(e, t, i, n, s) {
4873
4870
  }, p = l.path.slice(r.length);
4874
4871
  if (p === "stdin.js") {
4875
4872
  if (s) {
4876
- const f = l.text.match(xc)?.[0];
4873
+ const f = l.text.match(Pc)?.[0];
4877
4874
  if (f === void 0)
4878
4875
  throw Error(
4879
4876
  "Failed to find the runtime variable name in the CDN entrypoint file. This likely indicates a bug in Lumina"
4880
4877
  );
4881
- d.code = `${d.code.trimEnd()}${kc(f, n)}`, d.isAsync = !1;
4878
+ d.code = `${d.code.trimEnd()}${xc(f, n)}`, d.isAsync = !1;
4882
4879
  }
4883
4880
  return [a, d];
4884
4881
  }
@@ -4889,8 +4886,8 @@ async function Pc(e, t, i, n, s) {
4889
4886
  l.isAsync === void 0 && (d.endsWith(".js") ? Bn(l, c) : l.isAsync = !1);
4890
4887
  }), t.options.build?.cdn?.transformer?.(c, t), await Promise.all(Array.from(c.entries(), async ([l, { code: d }]) => await F(r + l, d)));
4891
4888
  }
4892
- const xc = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
4893
- function kc(e, t) {
4889
+ const Pc = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
4890
+ function xc(e, t) {
4894
4891
  let i = [
4895
4892
  "window.$arcgis",
4896
4893
  "||",
@@ -4926,7 +4923,7 @@ function kc(e, t) {
4926
4923
  // minified to a variable name that is already used inside the closure).
4927
4924
  `)($arcgis,${e}`
4928
4925
  ].join(""), n) {
4929
- const r = R().name;
4926
+ const r = N().name;
4930
4927
  i += `,"${r}/",".js"`;
4931
4928
  }
4932
4929
  return i += ")", i;
@@ -4934,15 +4931,15 @@ function kc(e, t) {
4934
4931
  function Bn(e, t) {
4935
4932
  const i = [], n = [], s = [], r = /* @__PURE__ */ new Set(), a = [];
4936
4933
  let c = 0;
4937
- const l = e.code.matchAll(Ac);
4934
+ const l = e.code.matchAll(kc);
4938
4935
  for (const b of l) {
4939
- const [E, I, N, D, M] = b, H = M.startsWith(Be);
4936
+ const [E, I, D, j, M] = b, H = M.startsWith(Be);
4940
4937
  if (c !== 0 && c !== b.index) {
4941
4938
  const K = e.code.slice(c, b.index);
4942
4939
  s.push(K), a.push([c, K.length, 0, ""]);
4943
4940
  }
4944
4941
  if (c = b.index + E.length, H)
4945
- a.push([b.index, E.length, 0, ""]), n.push(`"${Hn(M.slice(Be.length))}"`), i.push(I?.replaceAll(" as ", ":") ?? N ?? D ?? "");
4942
+ a.push([b.index, E.length, 0, ""]), n.push(`"${Hn(M.slice(Be.length))}"`), i.push(I?.replaceAll(" as ", ":") ?? D ?? j ?? "");
4946
4943
  else {
4947
4944
  const K = _n(M, t), G = K?.isAsync === !0;
4948
4945
  if (I !== void 0) {
@@ -4955,7 +4952,7 @@ function Bn(e, t) {
4955
4952
  const Ze = K.oldSingleExportName === void 0 ? `{${xe.join(",")}}` : xe[0].split(":")[1];
4956
4953
  a.push([b.index + 6, 0, I.length, Ze]);
4957
4954
  }
4958
- } else if (N === void 0 && D === void 0)
4955
+ } else if (D === void 0 && j === void 0)
4959
4956
  G && a.push([b.index + 6, 0, 0, ""]);
4960
4957
  else {
4961
4958
  if (G)
@@ -4965,7 +4962,7 @@ function Bn(e, t) {
4965
4962
  `Expected local import specifiers to use only named or side-effect import syntax. Found ${E}`
4966
4963
  )
4967
4964
  );
4968
- r.add(D ?? N);
4965
+ r.add(j ?? D);
4969
4966
  }
4970
4967
  }
4971
4968
  }
@@ -4973,25 +4970,25 @@ function Bn(e, t) {
4973
4970
  e.code = Ci(e.code, t);
4974
4971
  return;
4975
4972
  }
4976
- const d = Fc(r);
4973
+ const d = Lc(r);
4977
4974
  let p = e.code.slice(0, c);
4978
4975
  for (let b = a.length - 1; b >= 0; b--) {
4979
- const [E, I, N, D] = a[b];
4976
+ const [E, I, D, j] = a[b];
4980
4977
  let M = I, H = "";
4981
4978
  if (I === 0) {
4982
4979
  const G = d();
4983
- n.push(G), H = ` ${G} from`, D !== "" ? (M = N + 4, i.push(D)) : i.push("");
4980
+ n.push(G), H = ` ${G} from`, j !== "" ? (M = D + 4, i.push(j)) : i.push("");
4984
4981
  }
4985
4982
  p = p.slice(0, E) + H + p.slice(E + M);
4986
4983
  }
4987
- const m = Ic.exec(e.code), f = m?.index ?? e.code.length;
4984
+ const m = Ac.exec(e.code), f = m?.index ?? e.code.length;
4988
4985
  let y = "";
4989
4986
  if (m !== null) {
4990
4987
  const b = m[1].split(",");
4991
4988
  if (b.length > 1)
4992
4989
  y = `return{${b.map((E) => {
4993
- const [I, N = I] = E.split(" as ");
4994
- return `${N}:${I}`;
4990
+ const [I, D = I] = E.split(" as ");
4991
+ return `${D}:${I}`;
4995
4992
  }).join(",")}}`;
4996
4993
  else {
4997
4994
  const [E, I = E] = b[0].split(" as ");
@@ -5004,7 +5001,7 @@ function Bn(e, t) {
5004
5001
  const $ = `${p}${S}${L}${x}`;
5005
5002
  e.code = $;
5006
5003
  }
5007
- const Ac = /import(?:(\{[^}]+\})from|\*as (\w+) from| ([\w$]+) from)?"([^"]+)";/gu, Ic = /export\{([^}]+)\};\n$/u, Be = "@arcgis/core/";
5004
+ const kc = /import(?:(\{[^}]+\})from|\*as (\w+) from| ([\w$]+) from)?"([^"]+)";/gu, Ac = /export\{([^}]+)\};\n$/u, Be = "@arcgis/core/";
5008
5005
  function _n(e, t) {
5009
5006
  if (!e.startsWith("./"))
5010
5007
  return;
@@ -5016,7 +5013,7 @@ function _n(e, t) {
5016
5013
  return n;
5017
5014
  }
5018
5015
  function Ci(e, t) {
5019
- return e.replaceAll(Lc, (i, n) => {
5016
+ return e.replaceAll(Ic, (i, n) => {
5020
5017
  if (n.startsWith(Be))
5021
5018
  return `$arcgis.t(m=>m[0],"${Hn(n.slice(Be.length))}")`;
5022
5019
  if (n.startsWith("./")) {
@@ -5027,28 +5024,28 @@ function Ci(e, t) {
5027
5024
  return i;
5028
5025
  });
5029
5026
  }
5030
- const Lc = /(?<![.\w\d])import\("([^"]+)"\)/gu, Hn = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
5031
- function Fc(e) {
5027
+ const Ic = /(?<![.\w\d])import\("([^"]+)"\)/gu, Hn = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
5028
+ function Lc(e) {
5032
5029
  const t = [Un];
5033
5030
  return () => {
5034
5031
  for (; ; ) {
5035
- const i = jc(t);
5036
- if (Rc(t), !e.has(i))
5032
+ const i = Dc(t);
5033
+ if (jc(t), !e.has(i))
5037
5034
  return e.add(i), i;
5038
5035
  }
5039
5036
  };
5040
5037
  }
5041
- const Un = 0, jt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", zn = `${jt}0123456789`, Nc = jt.length, Dc = zn.length;
5042
- function jc(e) {
5038
+ const Un = 0, jt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", zn = `${jt}0123456789`, Fc = jt.length, Nc = zn.length;
5039
+ function Dc(e) {
5043
5040
  let t = jt[e[0]];
5044
5041
  for (let i = 1; i < e.length; i++)
5045
5042
  t += zn[e[i]];
5046
5043
  return t;
5047
5044
  }
5048
- function Rc(e) {
5045
+ function jc(e) {
5049
5046
  let t = e.length - 1;
5050
5047
  for (; t >= 0; ) {
5051
- const i = t === 0 ? Nc : Dc;
5048
+ const i = t === 0 ? Fc : Nc;
5052
5049
  if (e[t] += 1, e[t] >= i)
5053
5050
  e[t] = 0, t--;
5054
5051
  else
@@ -5056,7 +5053,7 @@ function Rc(e) {
5056
5053
  }
5057
5054
  e = new Array(e.length + 1).fill(Un);
5058
5055
  }
5059
- async function Mc(e, t, i, n) {
5056
+ async function Rc(e, t, i, n) {
5060
5057
  const s = t.packageName, r = await _e(s), { hasCss: a, cdnName: c } = await qn(u.join(r, "dist")) ?? {};
5061
5058
  if (i === "cdn") {
5062
5059
  const m = await He(r), f = t.cdnUrl ?? qe(m, !0);
@@ -5079,7 +5076,7 @@ async function Mc(e, t, i, n) {
5079
5076
  }
5080
5077
  ];
5081
5078
  }
5082
- const l = `${s}/dist/${c}/${c}.css${Q}`, d = a ? [
5079
+ const l = `${s}/dist/${c}/${c}.css${Z}`, d = a ? [
5083
5080
  `import styles$${n} from "${l}";`,
5084
5081
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${n}.styleSheet];`
5085
5082
  ] : [], p = `${s}/dist/esm/loader.js`;
@@ -5106,7 +5103,7 @@ async function qn(e) {
5106
5103
  ), n = i.find((s) => s.startsWith("arcgis-"));
5107
5104
  return n === void 0 ? await Promise.all(
5108
5105
  i.map(async (s) => await $i(e, s))
5109
- ).then((s) => s.find(j)) : await $i(e, n);
5106
+ ).then((s) => s.find(R)) : await $i(e, n);
5110
5107
  }
5111
5108
  async function $i(e, t) {
5112
5109
  const i = u.join(e, t, `${t}.css`), n = u.join(e, t, "assets"), [s, r] = await Promise.all([U(i), U(n)]);
@@ -5115,7 +5112,7 @@ async function $i(e, t) {
5115
5112
  cdnName: t
5116
5113
  } : void 0;
5117
5114
  }
5118
- async function Oc(e, t, i, n) {
5115
+ async function Mc(e, t, i, n) {
5119
5116
  const s = t.packageName, r = await _e(s), a = await He(r), c = await qn(u.join(r, "dist"));
5120
5117
  if (i === "cdn") {
5121
5118
  const y = a.exports?.[`./${we}.css`] === void 0, g = y ? c.cdnName : Wn;
@@ -5127,7 +5124,7 @@ async function Oc(e, t, i, n) {
5127
5124
  }
5128
5125
  };
5129
5126
  }
5130
- const l = c?.cdnName ?? Dt, d = Jc(a), p = `${s}/${u.normalize(d)}${Q}`, m = [
5127
+ const l = c?.cdnName ?? Dt, d = Oc(a), p = `${s}/${u.normalize(d)}${Z}`, m = [
5131
5128
  `import styles$${n} from "${p}";`,
5132
5129
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${n}.styleSheet];`
5133
5130
  ], f = `${s}/loader`;
@@ -5146,7 +5143,7 @@ async function Oc(e, t, i, n) {
5146
5143
  ]
5147
5144
  };
5148
5145
  }
5149
- function Jc(e) {
5146
+ function Oc(e) {
5150
5147
  const { exports: t } = e;
5151
5148
  if (t === void 0)
5152
5149
  throw new Error(
@@ -5156,19 +5153,19 @@ function Jc(e) {
5156
5153
  return n ? n[0] : i.length > 0 ? i[0][0] : `./${we}.css`;
5157
5154
  }
5158
5155
  async function Te(e) {
5159
- return e._loadersCache ??= Kc(e), await e._loadersCache;
5156
+ return e._loadersCache ??= Jc(e), await e._loadersCache;
5160
5157
  }
5161
- async function Kc(e) {
5158
+ async function Jc(e) {
5162
5159
  const t = e.viteCommand === "build" ? "cdn" : "lazyNpm", i = e.viteConfig.base;
5163
5160
  let n = 0;
5164
5161
  const s = async (l) => (await Promise.all(
5165
5162
  l.map(async (d) => {
5166
5163
  const p = n++;
5167
- return d.type === "stencil" ? await Mc(i, d, t, p) : d.type === "@arcgis/lumina" ? await Oc(i, d, t, p) : void 0;
5164
+ return d.type === "stencil" ? await Rc(i, d, t, p) : d.type === "@arcgis/lumina" ? await Mc(i, d, t, p) : void 0;
5168
5165
  })
5169
- )).filter(j).flat(), r = await Promise.all([
5166
+ )).filter(R).flat(), r = await Promise.all([
5170
5167
  // This may contain an import map so must be first
5171
- yc(i, t),
5168
+ fc(i, t),
5172
5169
  ve.then(s),
5173
5170
  Gn(e).then(s)
5174
5171
  ]), a = u.join(e.dir.src, "loader.ts");
@@ -5206,10 +5203,10 @@ async function Gn(e) {
5206
5203
  cdnUrl: typeof i == "string" ? void 0 : i.getCdnUrl(e)
5207
5204
  };
5208
5205
  })
5209
- ).then((i) => i.filter(j)), await e._serveOnlyDependencies);
5206
+ ).then((i) => i.filter(R)), await e._serveOnlyDependencies);
5210
5207
  }
5211
5208
  const Vn = "/@arcgis/lumina-compiler/testSetupFile", lt = [Vn];
5212
- async function Wc(e) {
5209
+ async function Kc(e) {
5213
5210
  if (!e.viteConfig.test?.browser?.enabled)
5214
5211
  return Pi(e);
5215
5212
  const i = (await Te(e)).map((n, s) => {
@@ -5222,7 +5219,7 @@ async function Wc(e) {
5222
5219
  * The $index naming is already used by makeLoaders(), so we use the
5223
5220
  * $t prefix to avoid collisions.
5224
5221
  */
5225
- `import styles$t${s} from "${n.cssHref}${Q}";`,
5222
+ `import styles$t${s} from "${n.cssHref}${Z}";`,
5226
5223
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$t${s}.styleSheet];`
5227
5224
  ].join(`
5228
5225
  `);
@@ -5237,35 +5234,35 @@ async function Wc(e) {
5237
5234
  `);
5238
5235
  return [Pi(e), i].join("");
5239
5236
  }
5240
- const Pi = (e) => [e.isInPuppeteerTestBackEnd ? Bc : "", _c].join(""), Bc = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
5237
+ const Pi = (e) => [e.isInPuppeteerTestBackEnd ? Wc : "", Bc].join(""), Wc = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
5241
5238
  setupPuppeteerTest();
5242
- `, _c = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
5239
+ `, Bc = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
5243
5240
  setupLuminaTest();
5244
5241
  `;
5245
- function Hc(e) {
5242
+ function _c(e) {
5246
5243
  let t = !0, i = !1, n, s, r, a, c;
5247
5244
  const l = "@arcgis/lumina:generateVirtualFiles", d = {
5248
5245
  name: l,
5249
5246
  // Take note of build output location
5250
5247
  configResolved() {
5251
- a = u.join(e.dir.root, "src", "loader.ts"), c = Y(a);
5248
+ a = u.join(e.dir.root, "src", "loader.ts"), c = ee(a);
5252
5249
  },
5253
5250
  resolveId: (g) => g === a || g === c ? a : void 0,
5254
5251
  async load(g) {
5255
5252
  const h = g.startsWith(Vn);
5256
5253
  if (!(!g.endsWith(".tsx") && g !== a && !h)) {
5257
5254
  if (s === void 0 && !e.isInPuppeteerTestBackEnd) {
5258
- r === void 0 && clearTimeout(n), r ??= _o(e, t).catch((S) => {
5255
+ r === void 0 && clearTimeout(n), r ??= Bo(e, t).catch((S) => {
5259
5256
  throw i = !0, S;
5260
5257
  }), t = !1;
5261
5258
  const v = await r;
5262
5259
  s ??= v;
5263
5260
  }
5264
- return g === a ? Fo(e) : h ? await Wc(e) : void 0;
5261
+ return g === a ? Lo(e) : h ? await Kc(e) : void 0;
5265
5262
  }
5266
5263
  },
5267
5264
  async writeBundle() {
5268
- e.isInStorybook || await F(u.join(e.dir.dist, "loader.d.ts"), No);
5265
+ e.isInStorybook || await F(u.join(e.dir.dist, "loader.d.ts"), Fo);
5269
5266
  },
5270
5267
  async handleHotUpdate({ file: g, modules: h, read: v }) {
5271
5268
  const S = await p(g, v);
@@ -5330,7 +5327,7 @@ function Hc(e) {
5330
5327
  if (!he(g, e.dir.srcComponents))
5331
5328
  return;
5332
5329
  v ??= await h();
5333
- const T = Ho(e, g, v);
5330
+ const T = _o(e, g, v);
5334
5331
  if (T === void 0)
5335
5332
  return !1;
5336
5333
  for (const x of T) {
@@ -5358,9 +5355,9 @@ function fe(e, t, i = Rt) {
5358
5355
  throw Error(w(St, "serveAssets() is only available when Vite is running in serve mode"));
5359
5356
  const n = e._serverConfigured, s = e.server.middlewares.stack.length;
5360
5357
  if (t.forEach((r) => {
5361
- const a = Qn(r), c = Yn(e.dir, Zn(a)), l = zc(e.viteConfig.base, c, e.dir.distCdn);
5358
+ const a = Qn(r), c = Yn(e.dir, Zn(a)), l = Uc(e.viteConfig.base, c, e.dir.distCdn);
5362
5359
  e.server.middlewares.use(l, (d, p, m) => {
5363
- const f = qc(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));
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));
5364
5361
  return (typeof y == "function" ? Promise.resolve(y()) : J(y)).then((v) => {
5365
5362
  const S = (typeof y == "function" ? void 0 : h?.transform(v.toString("utf8"), g, e)) ?? v;
5366
5363
  p.setHeader("Cache-Control", "max-age=31536000, immutable"), p.setHeader("Content-Type", js.lookup(f) || "application/octet-stream"), p.write(S), p.end();
@@ -5425,7 +5422,7 @@ function Zn(e) {
5425
5422
  throw Error(
5426
5423
  w(
5427
5424
  St,
5428
- `Unexpectedly tried to provide an asset with type "file", whose source looks like a directory: ${Y(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 \\`
5425
+ `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 \\`
5429
5426
  )
5430
5427
  );
5431
5428
  return e.destination;
@@ -5433,33 +5430,33 @@ function Zn(e) {
5433
5430
  return e.destination === "" ? u.basename(e.source) : e.destination.endsWith(u.sep) ? e.type === "directory" && e.destination === u.sep ? e.destination : u.join(e.destination, u.basename(e.source)) : e.destination;
5434
5431
  }
5435
5432
  function Yn({ dist: e, distCdnAssets: t }, i) {
5436
- const n = Uc(i), s = u.join(
5433
+ const n = Hc(i), s = u.join(
5437
5434
  t,
5438
5435
  n ? u.relative(t, i) : i
5439
5436
  ), r = u.relative(e, s), a = es(r);
5440
5437
  return u.join(e, a);
5441
5438
  }
5442
- function Uc(e) {
5439
+ function Hc(e) {
5443
5440
  if (e.startsWith(u.sep)) {
5444
5441
  const t = Mi(), i = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
5445
5442
  return e.startsWith(`/${i}/`) || e.startsWith("/Users/");
5446
5443
  } else
5447
5444
  return !!(!Ri && u.isAbsolute(e));
5448
5445
  }
5449
- function zc(e, t, i) {
5446
+ function Uc(e, t, i) {
5450
5447
  const n = es(u.relative(i, t)), s = n.startsWith("/") ? n.slice(1) : n;
5451
5448
  return `${e}${s}`;
5452
5449
  }
5453
- const es = (e) => e.replaceAll("../", ""), qc = (e = "") => e.split("?")[0].split("#")[0];
5450
+ const es = (e) => e.replaceAll("../", ""), zc = (e = "") => e.split("?")[0].split("#")[0];
5454
5451
  async function ts(e) {
5455
5452
  const t = new Set(e.map(u.dirname));
5456
5453
  await Promise.all(Array.from(t, async (i) => await z(i, { recursive: !0 })));
5457
5454
  }
5458
- const Gc = {
5455
+ const qc = {
5459
5456
  match: (e, t) => t.environment === "production" && e.endsWith(".json"),
5460
5457
  transform: (e) => JSON.stringify(JSON.parse(e))
5461
- }, Rt = [Gc];
5462
- function Vc(e) {
5458
+ }, Rt = [qc];
5459
+ function Gc(e) {
5463
5460
  let t;
5464
5461
  const i = () => [
5465
5462
  ...e.options.assets?.transformers ?? [],
@@ -5468,7 +5465,7 @@ function Vc(e) {
5468
5465
  return {
5469
5466
  name: "@arcgis/lumina:handleStaticAssets",
5470
5467
  configResolved() {
5471
- t = Xc(e);
5468
+ t = Vc(e);
5472
5469
  },
5473
5470
  async configureServer(n) {
5474
5471
  e.server = n, !e.isInPuppeteerTestBackEnd && (fe(e, await t, i()), n.watcher.on("addDir", (s) => {
@@ -5483,21 +5480,21 @@ function Vc(e) {
5483
5480
  }
5484
5481
  };
5485
5482
  }
5486
- async function Xc(e) {
5483
+ async function Vc(e) {
5487
5484
  const t = U("assets"), i = await e.componentFilesPromise, n = await Promise.all(
5488
5485
  i.map(async (s) => {
5489
5486
  const r = u.dirname(s), a = u.join(r, "assets");
5490
5487
  return await U(a) ? is(a, r) : void 0;
5491
5488
  })
5492
5489
  );
5493
- return await t && n.push(ns), n.filter(j);
5490
+ return await t && n.push(ns), n.filter(R);
5494
5491
  }
5495
5492
  const is = (e, t) => ({
5496
5493
  type: "directory",
5497
5494
  source: e,
5498
5495
  destination: u.basename(t)
5499
5496
  }), ns = { type: "directory", source: "assets/", destination: "" };
5500
- function Qc(e) {
5497
+ function Xc(e) {
5501
5498
  const { stencilCompatibility: t } = e.options.build?.ssr ?? {};
5502
5499
  if (t?.enabled === !0)
5503
5500
  return {
@@ -5505,7 +5502,7 @@ function Qc(e) {
5505
5502
  async writeBundle() {
5506
5503
  if (e.isInStorybook)
5507
5504
  return;
5508
- const i = R()?.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 = ee(s, e.dir.dist), y = `${Array.from(
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(
5509
5506
  new Set(e.apiJsonComponents.map((g) => `import "${m}/${g.importPath}";`))
5510
5507
  ).join(`
5511
5508
  `)}
@@ -5549,7 +5546,7 @@ export * from "@arcgis/lumina/stencilSsrCompatibility";`;
5549
5546
  }
5550
5547
  };
5551
5548
  }
5552
- const dt = "@arcgis/lumina:printTotalBuildSize", Zc = (e) => ({
5549
+ const dt = "@arcgis/lumina:printTotalBuildSize", Qc = (e) => ({
5553
5550
  name: dt,
5554
5551
  apply: () => e.viteCommand === "build",
5555
5552
  configResolved(t) {
@@ -5566,10 +5563,10 @@ const dt = "@arcgis/lumina:printTotalBuildSize", Zc = (e) => ({
5566
5563
  const m = console.log;
5567
5564
  console.log = function(...y) {
5568
5565
  if (m.apply(console, y), y.length === 1 && typeof y[0] == "string") {
5569
- const [g, h] = y[0].match(el) ?? [];
5566
+ const [g, h] = y[0].match(Yc) ?? [];
5570
5567
  if (!g)
5571
5568
  return;
5572
- p || (p = y[0].slice(0, y[0].indexOf(g) + g.length).replaceAll(tl, "").length);
5569
+ p || (p = y[0].slice(0, y[0].indexOf(g) + g.length).replaceAll(el, "").length);
5573
5570
  const v = Number.parseFloat(g.replace(" kB", "").replaceAll(",", ""));
5574
5571
  h ? (d += Number.parseFloat(h.replace(" kB", "").replaceAll(",", "")), l += v) : c += v;
5575
5572
  }
@@ -5585,7 +5582,7 @@ const dt = "@arcgis/lumina:printTotalBuildSize", Zc = (e) => ({
5585
5582
  [
5586
5583
  Ai,
5587
5584
  h,
5588
- Yc,
5585
+ Zc,
5589
5586
  "*",
5590
5587
  " ".repeat(p - `${h}*`.length - g.length),
5591
5588
  g,
@@ -5596,10 +5593,10 @@ const dt = "@arcgis/lumina:printTotalBuildSize", Zc = (e) => ({
5596
5593
  }
5597
5594
  };
5598
5595
  }
5599
- }), ki = "\x1B[22m\x1B[1m\x1B[22m", Ai = "\x1B[2m", Yc = "\x1B[22m\x1B[36m", el = /\d+(?:,\d+)?\.\d{2} kB/gu, tl = /\x1B\[\d+m/gu, il = new Intl.NumberFormat("en", {
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", {
5600
5597
  maximumFractionDigits: 2,
5601
5598
  minimumFractionDigits: 2
5602
- }), Ii = (e) => `${il.format(e)} kB`, Li = "@arcgis/lumina:configureVite", nl = (e) => ({
5599
+ }), Ii = (e) => `${tl.format(e)} kB`, Li = "@arcgis/lumina:configureVite", il = (e) => ({
5603
5600
  name: Li,
5604
5601
  async config({
5605
5602
  server: t,
@@ -5616,7 +5613,7 @@ const dt = "@arcgis/lumina:printTotalBuildSize", Zc = (e) => ({
5616
5613
  */
5617
5614
  loader: "src/loader.ts",
5618
5615
  // Entrypoint for bundling used components only:
5619
- ...await Kr(e)
5616
+ ...await Jr(e)
5620
5617
  }, { loader: g, ...h } = y, v = e.environment === "development" || e.isInTest ? {
5621
5618
  "process.env.ESRI_INTERNAL": "true"
5622
5619
  } : void 0, S = !import.meta.url.includes("node_modules"), T = {
@@ -5774,18 +5771,18 @@ const dt = "@arcgis/lumina:printTotalBuildSize", Zc = (e) => ({
5774
5771
  }
5775
5772
  };
5776
5773
  }
5777
- }), sl = (e) => ({
5774
+ }), nl = (e) => ({
5778
5775
  name: "@arcgis/lumina:setAssetPath",
5779
5776
  apply: () => e.viteCommand === "build",
5780
5777
  config: (t) => ({
5781
5778
  base: t.base ?? e.options.assets?.defaultPath ?? qe()
5782
5779
  })
5783
5780
  });
5784
- function rl(e = R()) {
5781
+ function sl(e = N()) {
5785
5782
  const t = e.version ?? "0.0.1";
5786
5783
  return bs(t);
5787
5784
  }
5788
- const ol = (e) => `/*! ${e} */`, k = (e) => (t, i) => {
5785
+ const rl = (e) => `/*! ${e} */`, k = (e) => (t, i) => {
5789
5786
  Object.defineProperty(t, i, {
5790
5787
  get() {
5791
5788
  throw Error(
@@ -5824,8 +5821,8 @@ const pe = {
5824
5821
  apiJson: "docs/api.json",
5825
5822
  stencilLikeDocsJson: "docs/docs.json"
5826
5823
  };
5827
- async function ss(e, t, i, n, s = R()) {
5828
- const r = al(e, i, n, s), a = u.join(t, "lumina.ts"), l = await U(a) ? await J(a, "utf8") : "";
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") : "";
5829
5826
  if (l.trim().replaceAll(`\r
5830
5827
  `, `
5831
5828
  `) === r.trim())
@@ -5845,7 +5842,7 @@ ${l}`
5845
5842
  );
5846
5843
  return Ki(a, r), !0;
5847
5844
  }
5848
- function al(e, t, i, n = R()) {
5845
+ function ol(e, t, i, n = N()) {
5849
5846
  "@arcgis/components-controllers" in (n.dependencies ?? {}) && C.warn(
5850
5847
  "@arcgis/components-controllers",
5851
5848
  "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."
@@ -5860,11 +5857,11 @@ declare module "@arcgis/lumina" {
5860
5857
  interface ImportStencilElements extends ${r.map((m, f) => `JSX$${f}.IntrinsicElements`).join(", ")} {}
5861
5858
  }`, l = n.devDependencies ?? {}, d = i === "preview" ? "matchers" : i === "webdriverio" ? "webdriverio" : "playwright";
5862
5859
  return [
5863
- cl,
5860
+ al,
5864
5861
  // Avoid cyclic references for tests in @arcgis/lumina
5865
5862
  n.name === "@arcgis/lumina" ? "" : `
5866
5863
  /// <reference types="@arcgis/lumina/typings" />`,
5867
- t ? ll : "",
5864
+ t ? cl : "",
5868
5865
  l.vitest ? `
5869
5866
  /// <reference types="vitest/config" />` : "",
5870
5867
  l["@vitest/browser"] ? `
@@ -5878,7 +5875,7 @@ declare module "@arcgis/lumina" {
5878
5875
  `
5879
5876
  ].join("");
5880
5877
  }
5881
- const cl = `/**
5878
+ const al = `/**
5882
5879
  * This file is autogenerated by \`@arcgis/lumina-compiler\` - do not edit it manually.
5883
5880
  * Manual edits will be overwritten.
5884
5881
  *
@@ -5886,7 +5883,7 @@ const cl = `/**
5886
5883
  * as well as @arcgis/core typings if you use @arcgis/core.
5887
5884
  *
5888
5885
  * If you need to provide additional typings, create a separate file.
5889
- */`, ll = `
5886
+ */`, cl = `
5890
5887
  /// <reference types="@arcgis/core/interfaces" />`, je = "@arcgis/lumina:dependencySupport", rs = (e, t) => e.viteCommand === "serve" && /**
5891
5888
  * Vitest started calling transformIndexHtml in browser mode versions ^2.1.4
5892
5889
  * However, it is a bit buggy (see
@@ -5898,10 +5895,10 @@ const cl = `/**
5898
5895
  * is doing:
5899
5896
  * https://github.com/storybookjs/storybook/blob/a5c2cf1712f70b4e3ecf38d3c98e7db8e8d67849/code/builders/builder-vite/src/plugins/code-generator-plugin.ts#L110
5900
5897
  */
5901
- e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, dl = (e) => ({
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) => ({
5902
5899
  name: je,
5903
5900
  configResolved() {
5904
- !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = pl(e).catch(
5901
+ !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = dl(e).catch(
5905
5902
  (t) => C.error(je, `Failed to update package's src/lumina.ts: ${String(t)}`)
5906
5903
  ));
5907
5904
  },
@@ -5949,7 +5946,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
5949
5946
  await e._updateLuminaTsPromise;
5950
5947
  }
5951
5948
  });
5952
- async function pl(e) {
5949
+ async function dl(e) {
5953
5950
  const i = (await Promise.all([ve, Gn(e)])).flat();
5954
5951
  if (!await ss(
5955
5952
  i,
@@ -5960,22 +5957,22 @@ async function pl(e) {
5960
5957
  return;
5961
5958
  let s = !1;
5962
5959
  function r() {
5963
- s || C.warn(je, ul), s = !0;
5960
+ s || C.warn(je, pl), s = !0;
5964
5961
  }
5965
5962
  process.on("exit", () => {
5966
5963
  r(), clearTimeout(c);
5967
5964
  });
5968
5965
  const c = setTimeout(r, 2e3);
5969
5966
  }
5970
- const ul = Rs.greenBright(
5967
+ const pl = Rs.greenBright(
5971
5968
  `lumina.ts has been updated (potentially because your dependencies changed). Please commit the updated file.
5972
5969
  If build failed with TypeScript errors, try running the build again to check whether new lumina.ts resolves the errors.`
5973
5970
  );
5974
- async function ml(e, t) {
5971
+ async function ul(e, t) {
5975
5972
  const i = /* @__PURE__ */ new Map();
5976
5973
  await Promise.all(
5977
5974
  e.map(async (s) => {
5978
- const r = await J(s, "utf-8"), a = r.match(fl)?.[1];
5975
+ const r = await J(s, "utf-8"), a = r.match(ml)?.[1];
5979
5976
  if (a === void 0) {
5980
5977
  C.warn(
5981
5978
  "@arcgis/lumina:parseStoryFiles",
@@ -5987,14 +5984,14 @@ async function ml(e, t) {
5987
5984
  let c = i.get(a);
5988
5985
  c === void 0 && (c = [], i.set(a, c));
5989
5986
  const l = [];
5990
- for (const d of r.matchAll(yl)) {
5991
- const p = d[1], m = Sl(p), f = r.indexOf("{", d.index), y = r.indexOf("}", f), g = r.slice(0, d.index).trimEnd();
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();
5992
5989
  let h = "";
5993
5990
  if (g.endsWith("*/")) {
5994
5991
  const T = g.lastIndexOf("/**");
5995
- h = g.slice(T + 3, -2).trim().replaceAll(hl, "");
5992
+ h = g.slice(T + 3, -2).trim().replaceAll(gl, "");
5996
5993
  }
5997
- const v = r.slice(f, y).match(gl)?.[1] || m, S = vl(m);
5994
+ const v = r.slice(f, y).match(yl)?.[1] || m, S = hl(m);
5998
5995
  l.push({
5999
5996
  description: `${v}${h ? `
6000
5997
  ${h}` : ""}`,
@@ -6019,11 +6016,11 @@ ${h}` : ""}`,
6019
6016
  }
6020
6017
  return n;
6021
6018
  }
6022
- const fl = /component: ["']([^"']+)["']/u, yl = /export const (\w+)/gu, gl = /name: ["']([^"']+)["']/u, hl = /^\s*\*\s?/gmu, vl = (e) => e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/giu, "-").replace(/-+/gu, "-").replace(/^-+/u, "").replace(/-+$/u, ""), Sl = (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();
6023
- var bl = Object.defineProperty, A = (e, t, i, n) => {
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) => {
6024
6021
  for (var s = void 0, r = e.length - 1, a; r >= 0; r--)
6025
6022
  (a = e[r]) && (s = a(t, i, s) || s);
6026
- return s && bl(t, i, s), s;
6023
+ return s && Sl(t, i, s), s;
6027
6024
  };
6028
6025
  const ie = "@arcgis/lumina:context";
6029
6026
  class P {
@@ -6064,9 +6061,9 @@ class P {
6064
6061
  "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."
6065
6062
  ), 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);
6066
6063
  const g = this.options.documentation?.publicStoryUrlPrefix;
6067
- this.isFullApiExtraction && typeof g == "string" ? this.componentStoriesPromise = this.componentFilesPromise.then(async () => await ml(this.componentStoryFiles, g)).then((h) => {
6064
+ this.isFullApiExtraction && typeof g == "string" ? this.componentStoriesPromise = this.componentFilesPromise.then(async () => await ul(this.componentStoryFiles, g)).then((h) => {
6068
6065
  this.componentStories = h;
6069
- }) : (this.componentStoriesPromise = void 0, this.componentStories = void 0), Tc(this, s.build.sourcemap !== !1), rs(this) && Te(this);
6066
+ }) : (this.componentStoriesPromise = void 0, this.componentStories = void 0), wc(this, s.build.sourcemap !== !1), rs(this) && Te(this);
6070
6067
  }
6071
6068
  },
6072
6069
  configureServer: {
@@ -6094,9 +6091,9 @@ class P {
6094
6091
  webTypes: i.jetBrains === !1 ? void 0 : i.jetBrains?.webTypesFileName ? de(i.jetBrains.webTypesFileName) : pe.webTypes,
6095
6092
  vsCodeHtml: i.vsCode === !1 ? void 0 : i.vsCode?.htmlFileName ? de(i.vsCode.htmlFileName) : pe.vsCodeHtml,
6096
6093
  vsCodeCss: i.vsCode === !1 ? void 0 : i.vsCode?.cssFileName ? de(i.vsCode.cssFileName) : pe.vsCodeCss
6097
- }, yn(), this.componentFilesPromise = xt(this, u.resolve("src/components")), wc(this);
6098
- const n = t.build?.preamble ?? rl();
6099
- this.banner = ol(n);
6094
+ }, yn(), this.componentFilesPromise = xt(this, u.resolve("src/components")), bc(this);
6095
+ const n = t.build?.preamble ?? sl();
6096
+ this.banner = rl(n);
6100
6097
  }
6101
6098
  _inferBuildSetup({ command: t, mode: i }, n) {
6102
6099
  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;
@@ -6254,7 +6251,7 @@ A([
6254
6251
  A([
6255
6252
  k("configResolved()")
6256
6253
  ], P.prototype, "_typeScriptPrinter");
6257
- const pt = "@arcgis/lumina:addNonLazyImports", wl = (e) => ({
6254
+ const pt = "@arcgis/lumina:addNonLazyImports", bl = (e) => ({
6258
6255
  name: pt,
6259
6256
  apply: () => e.viteCommand === "build",
6260
6257
  generateBundle(t, i) {
@@ -6279,7 +6276,7 @@ const pt = "@arcgis/lumina:addNonLazyImports", wl = (e) => ({
6279
6276
  if (d.forEach((p) => {
6280
6277
  t[p].referencedTagNames.splice(0, 0, ...a), t[p].referencedDeferredTagNames.splice(0, 0, ...c);
6281
6278
  }), (a.length > 0 || c.length > 0) && d.length === 0) {
6282
- const p = Y(r);
6279
+ const p = ee(r);
6283
6280
  throw Error(
6284
6281
  w(
6285
6282
  pt,
@@ -6293,14 +6290,14 @@ const pt = "@arcgis/lumina:addNonLazyImports", wl = (e) => ({
6293
6290
  return [];
6294
6291
  const l = u.dirname(r), d = ge(l, e.dir.srcComponents, e), p = u.relative(e.dir.src, d);
6295
6292
  function m(b) {
6296
- const E = Za(e, b, r);
6293
+ const E = Qa(e, b, r);
6297
6294
  if (E === void 0)
6298
6295
  return;
6299
- const I = Ya(E, p);
6296
+ const I = Za(E, p);
6300
6297
  if (I !== `./${p}`)
6301
6298
  return I.startsWith(".") ? `${I}/${Fi}` : I;
6302
6299
  }
6303
- const f = new Set(a), y = new Set(c), g = Array.from(f, m).filter(j), h = (b) => `import "${b}";
6300
+ const f = new Set(a), y = new Set(c), g = Array.from(f, m).filter(R), h = (b) => `import "${b}";
6304
6301
  `, v = g.map(h).join(""), S = /* @__PURE__ */ new Set(), T = Array.from(y, (b) => {
6305
6302
  const E = m(b);
6306
6303
  if (E !== void 0) {
@@ -6314,17 +6311,17 @@ const pt = "@arcgis/lumina:addNonLazyImports", wl = (e) => ({
6314
6311
  return S.add(h(E)), `.set("${b}", () => import("${E}"))
6315
6312
  `;
6316
6313
  }
6317
- }).filter(j), x = `${v}export * from "./${Tt}";`, L = Array.from(S).join("") + x, $ = T.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
6314
+ }).filter(R), x = `${v}export * from "./${Tt}";`, L = Array.from(S).join("") + x, $ = T.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
6318
6315
  ${x}
6319
6316
  deferredLoaders${T.join("")};` : x;
6320
6317
  return [
6321
6318
  F(u.join(e.dir.dist, p, Fi), $),
6322
- F(u.join(e.dir.dist, p, Tl), L)
6319
+ F(u.join(e.dir.dist, p, wl), L)
6323
6320
  ];
6324
6321
  });
6325
6322
  await Promise.all(s);
6326
6323
  }
6327
- }), Fi = "index.js", Tl = "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))), El = (e) => ({
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) => ({
6328
6325
  name: "@arcgis/lumina:handleDynamicAssets",
6329
6326
  configureServer(t) {
6330
6327
  e.server = t, !e.isInPuppeteerTestBackEnd && Ni(e).forEach(({ assets: i, transformers: n }) => fe(e, i, n));
@@ -6343,20 +6340,20 @@ function Ni(e) {
6343
6340
  "type" in n ? t.push(n) : "assets" in n && t.push(...n.assets);
6344
6341
  }), t.length > 0 && i.push({ assets: t }), e.assetsToProvide = void 0, i;
6345
6342
  }
6346
- const bt = "@arcgis/lumina:updatePackageJson", Cl = (e) => ({
6343
+ const bt = "@arcgis/lumina:updatePackageJson", El = (e) => ({
6347
6344
  name: bt,
6348
6345
  apply: () => e.viteCommand === "serve" && e.environment === "development" && !e.isInTest && !e.isInCi,
6349
6346
  configResolved() {
6350
- $l(e).catch(
6347
+ Cl(e).catch(
6351
6348
  (t) => C.error(bt, `Failed to update package's package.json:${String(t)}`)
6352
6349
  );
6353
6350
  }
6354
6351
  });
6355
- async function $l(e) {
6356
- const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await J(t, "utf-8")), n = Pl(i, e);
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);
6357
6354
  n && Ki(t, JSON.stringify(n, null, 2));
6358
6355
  }
6359
- function Pl(e, t) {
6356
+ function $l(e, t) {
6360
6357
  const i = e?.devDependencies ?? {};
6361
6358
  Object.keys(e?.peerDependencies ?? {}).forEach((d) => {
6362
6359
  d in i || C.warn(
@@ -6382,7 +6379,7 @@ function Pl(e, t) {
6382
6379
  const d = s(r.webTypes);
6383
6380
  e["web-types"] !== d && (n = !0, e["web-types"] = d);
6384
6381
  }
6385
- const a = `./${we}.css`, c = t.options.build?.cdn?.namespace !== void 0, l = ee(
6382
+ const a = `./${we}.css`, c = t.options.build?.cdn?.namespace !== void 0, l = te(
6386
6383
  t.dir.root,
6387
6384
  u.join(t.dir.distCdn, a)
6388
6385
  );
@@ -6395,20 +6392,20 @@ function Pl(e, t) {
6395
6392
  if (n)
6396
6393
  return e;
6397
6394
  }
6398
- const xl = (e) => ({
6395
+ const Pl = (e) => ({
6399
6396
  timestamp: e.apiJson.timestamp,
6400
6397
  compiler: e.apiJson.compiler,
6401
- components: kl(e),
6398
+ components: xl(e),
6402
6399
  typeLibrary: {}
6403
6400
  });
6404
- function kl(e) {
6401
+ function xl(e) {
6405
6402
  const t = [];
6406
6403
  for (const i of e.apiJson.modules)
6407
6404
  for (const n of i.declarations)
6408
- "customElement" in n && t.push(Al(n, i.path));
6405
+ "customElement" in n && t.push(kl(n, i.path));
6409
6406
  return t;
6410
6407
  }
6411
- function Al(e, t) {
6408
+ function kl(e, t) {
6412
6409
  const i = e.superclass ? [{ name: "superclass", text: JSON.stringify(e.superclass) }] : [];
6413
6410
  return {
6414
6411
  filePath: t,
@@ -6423,9 +6420,9 @@ function Al(e, t) {
6423
6420
  dependencies: [],
6424
6421
  dependencyGraph: {},
6425
6422
  deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated,
6426
- props: e.members.map(Il).filter(j),
6427
- methods: e.members.map(Ll).filter(j),
6428
- events: e.events?.map(Fl) ?? [],
6423
+ props: e.members.map(Al).filter(R),
6424
+ methods: e.members.map(Il).filter(R),
6425
+ events: e.events?.map(Ll) ?? [],
6429
6426
  styles: e.cssProperties?.map((n) => ({
6430
6427
  name: n.name,
6431
6428
  annotation: "prop",
@@ -6437,7 +6434,7 @@ function Al(e, t) {
6437
6434
  listeners: []
6438
6435
  };
6439
6436
  }
6440
- function Il(e) {
6437
+ function Al(e) {
6441
6438
  if (e.kind !== "field")
6442
6439
  return;
6443
6440
  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;
@@ -6478,7 +6475,7 @@ const Mt = (e) => Object.fromEntries(
6478
6475
  ]
6479
6476
  ) ?? []
6480
6477
  );
6481
- function Ll(e) {
6478
+ function Il(e) {
6482
6479
  if (e.kind !== "method")
6483
6480
  return;
6484
6481
  const t = e, i = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [], n = t.parameters?.map(({ name: s, type: r, description: a }) => ({
@@ -6509,7 +6506,7 @@ function Ll(e) {
6509
6506
  deprecation: typeof t.deprecated == "boolean" ? t.deprecated ? "" : void 0 : t.deprecated
6510
6507
  };
6511
6508
  }
6512
- function Fl(e) {
6509
+ function Ll(e) {
6513
6510
  const t = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [];
6514
6511
  return {
6515
6512
  event: e.name,
@@ -6537,14 +6534,14 @@ const as = (e) => e.flatMap(
6537
6534
  name: `::part(${i.name})`,
6538
6535
  description: i.description || void 0
6539
6536
  })) ?? []
6540
- ), Nl = (e) => e.attributes?.map((t) => ({
6537
+ ), Fl = (e) => e.attributes?.map((t) => ({
6541
6538
  name: t.name ?? "",
6542
6539
  description: Qe(t.description, t.deprecated) || void 0,
6543
6540
  default: t.default,
6544
6541
  value: {
6545
- type: Dl(t.type.values?.map(sn))
6542
+ type: Nl(t.type.values?.map(sn))
6546
6543
  }
6547
- })) ?? [], Dl = (e) => e?.length === 1 ? e[0] : e, Qe = (e = "", t = !1) => t === !1 ? e : `**Deprecated**${typeof t == "string" ? `: ${t}` : ""}. ${e}`, $e = {
6544
+ })) ?? [], Nl = (e) => e?.length === 1 ? e[0] : e, Qe = (e = "", t = !1) => t === !1 ? e : `**Deprecated**${typeof t == "string" ? `: ${t}` : ""}. ${e}`, $e = {
6548
6545
  slots: "Slots",
6549
6546
  events: "Events",
6550
6547
  cssProperties: "CSS Properties",
@@ -6552,7 +6549,7 @@ const as = (e) => e.flatMap(
6552
6549
  methods: "Methods"
6553
6550
  };
6554
6551
  function ls(e) {
6555
- const t = jl(e.slots), i = Rl(e.events), n = Ml(e.cssProperties), s = Ol(e.cssParts), r = Jl(e.members), a = Qe(e.description, e.deprecated).trim();
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();
6556
6553
  return [...a ? [`${a}
6557
6554
  --`] : [], i, r, t, n, s].filter(Boolean).join(`
6558
6555
 
@@ -6560,28 +6557,28 @@ function ls(e) {
6560
6557
  }
6561
6558
  const Pe = (e, t) => t === void 0 || t.length === 0 ? "" : `### ${e}
6562
6559
  ${t.join(`
6563
- `)}`, jl = (e) => Pe(
6560
+ `)}`, Dl = (e) => Pe(
6564
6561
  $e.slots,
6565
6562
  e?.map((t) => `- ${t.name ? `**${t.name}**` : "_default_"} - ${t.description}`)
6566
- ), Rl = (e) => Pe(
6563
+ ), jl = (e) => Pe(
6567
6564
  $e.events,
6568
6565
  e?.filter((t) => t.name !== null && t.name !== void 0).map((t) => `- **${t.name}**${t.description ? ` - ${t.description}` : ""}`)
6569
- ), Ml = (e = []) => Pe(
6566
+ ), Rl = (e = []) => Pe(
6570
6567
  $e.cssProperties,
6571
6568
  e?.map(
6572
6569
  (t) => `- **${t.name}** - ${t.description} ${t.default ? `_(default: ${t.default})_}` : ""}`
6573
6570
  )
6574
- ), Ol = (e) => Pe(
6571
+ ), Ml = (e) => Pe(
6575
6572
  $e.cssParts,
6576
6573
  e?.map((t) => `- **${t.name}** - ${t.description}`)
6577
- ), Jl = (e) => Pe(
6574
+ ), Ol = (e) => Pe(
6578
6575
  $e.methods,
6579
6576
  e.filter(gs).map(
6580
6577
  (t) => [`- \`${t.name}${t.signature}\``, Qe(t.description, t.deprecated)].filter(Boolean).join(" - ")
6581
6578
  )
6582
6579
  );
6583
- function Kl(e, t) {
6584
- const i = Wl(e), n = as(e), s = cs(e), r = R();
6580
+ function Jl(e, t) {
6581
+ const i = Kl(e), n = as(e), s = cs(e), r = N();
6585
6582
  return {
6586
6583
  $schema: "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
6587
6584
  name: r.name,
@@ -6599,21 +6596,21 @@ function Kl(e, t) {
6599
6596
  }
6600
6597
  };
6601
6598
  }
6602
- const Wl = (e) => e.map((t) => ({
6599
+ const Kl = (e) => e.map((t) => ({
6603
6600
  name: t.tagName,
6604
6601
  description: ls(t),
6605
6602
  "doc-url": t.demos?.[0]?.url,
6606
- attributes: Nl(t),
6603
+ attributes: Fl(t),
6607
6604
  slots: t.slots?.map((i) => ({
6608
6605
  name: i.name,
6609
6606
  description: i.description
6610
6607
  })),
6611
6608
  events: Di(t),
6612
6609
  js: {
6613
- properties: Bl(t),
6610
+ properties: Wl(t),
6614
6611
  events: Di(t)
6615
6612
  }
6616
- })), Bl = (e) => e.members.filter(hs).map((t) => ({
6613
+ })), Wl = (e) => e.members.filter(hs).map((t) => ({
6617
6614
  name: t.name,
6618
6615
  description: t.description,
6619
6616
  type: t.type?.text
@@ -6621,30 +6618,30 @@ const Wl = (e) => e.map((t) => ({
6621
6618
  name: t.name,
6622
6619
  type: t.type?.text,
6623
6620
  description: t.description
6624
- })) ?? [], _l = (e) => e.map((t) => ({
6621
+ })) ?? [], Bl = (e) => e.map((t) => ({
6625
6622
  name: t.tagName,
6626
6623
  description: ls(t),
6627
- attributes: Hl(t),
6624
+ attributes: _l(t),
6628
6625
  references: t.demos?.map((i) => ({ name: i.description, url: i.url })) ?? []
6629
- })), Hl = (e) => e.attributes?.map((t) => ({
6626
+ })), _l = (e) => e.attributes?.map((t) => ({
6630
6627
  name: t.name,
6631
6628
  description: Qe(t.description, t.deprecated) || void 0,
6632
- values: Ul(t)
6633
- })) ?? [], Ul = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], zl = (e) => ({
6629
+ values: Hl(t)
6630
+ })) ?? [], Hl = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], Ul = (e) => ({
6634
6631
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
6635
6632
  version: 1.1,
6636
- tags: _l(e)
6637
- }), ql = (e) => ({
6633
+ tags: Bl(e)
6634
+ }), zl = (e) => ({
6638
6635
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
6639
6636
  version: 1.1,
6640
6637
  properties: as(e),
6641
6638
  pseudoElements: cs(e)
6642
- }), Gl = "@arcgis/lumina:generateDocs";
6643
- function Vl(e) {
6639
+ }), ql = "@arcgis/lumina:generateDocs";
6640
+ function Gl(e) {
6644
6641
  return e._documentationFileNames.stencilLikeDocsJson !== void 0 && e.provideAssets([
6645
6642
  {
6646
6643
  type: "dynamic",
6647
- source: () => JSON.stringify(xl(e), null, 2),
6644
+ source: () => JSON.stringify(Pl(e), null, 2),
6648
6645
  destination: u.join("../..", e._documentationFileNames.stencilLikeDocsJson)
6649
6646
  }
6650
6647
  ]), e._documentationFileNames.apiJson !== void 0 && e.provideAssets([
@@ -6654,34 +6651,34 @@ function Vl(e) {
6654
6651
  destination: u.join("../..", e._documentationFileNames.apiJson)
6655
6652
  }
6656
6653
  ]), {
6657
- name: Gl,
6654
+ name: ql,
6658
6655
  async writeBundle() {
6659
6656
  if (e.isInStorybook)
6660
6657
  return;
6661
- const { jetBrains: t } = e.options.documentation ?? {}, i = e._documentationFileNames, n = i.vsCodeHtml === void 0 ? void 0 : u.join(e.dir.dist, i.vsCodeHtml), s = i.vsCodeCss === void 0 ? void 0 : u.join(e.dir.dist, i.vsCodeCss), r = i.webTypes === void 0 ? void 0 : u.join(e.dir.dist, i.webTypes), a = [n, s, r].filter(j);
6658
+ const { jetBrains: t } = e.options.documentation ?? {}, i = e._documentationFileNames, n = i.vsCodeHtml === void 0 ? void 0 : u.join(e.dir.dist, i.vsCodeHtml), s = i.vsCodeCss === void 0 ? void 0 : u.join(e.dir.dist, i.vsCodeCss), r = i.webTypes === void 0 ? void 0 : u.join(e.dir.dist, i.webTypes), a = [n, s, r].filter(R);
6662
6659
  if (a.length === 0)
6663
6660
  return;
6664
6661
  await ts(a);
6665
6662
  const c = [];
6666
6663
  if (n !== void 0) {
6667
- const l = JSON.stringify(zl(e.apiJsonComponents), null, 2);
6664
+ const l = JSON.stringify(Ul(e.apiJsonComponents), null, 2);
6668
6665
  c.push(F(n, l));
6669
6666
  }
6670
6667
  if (s !== void 0) {
6671
- const l = JSON.stringify(ql(e.apiJsonComponents), null, 2);
6668
+ const l = JSON.stringify(zl(e.apiJsonComponents), null, 2);
6672
6669
  c.push(F(s, l));
6673
6670
  }
6674
6671
  if (r !== void 0) {
6675
- const l = Kl(e.apiJsonComponents, typeof t == "object" ? t : {});
6672
+ const l = Jl(e.apiJsonComponents, typeof t == "object" ? t : {});
6676
6673
  c.push(F(r, JSON.stringify(l, null, 2)));
6677
6674
  }
6678
6675
  await Promise.all(c);
6679
6676
  }
6680
6677
  };
6681
6678
  }
6682
- const Xl = (e) => `import type { h, EventHandler } from "@arcgis/lumina";
6679
+ const Vl = (e) => `import type { h, EventHandler } from "@arcgis/lumina";
6683
6680
 
6684
- ${e.map(Ql).join(`
6681
+ ${e.map(Xl).join(`
6685
6682
 
6686
6683
  `)}
6687
6684
 
@@ -6693,7 +6690,7 @@ ${e.map(({ tagName: t, pascalCaseName: i }) => ` "${t}": Lumina${i};`).join
6693
6690
  }
6694
6691
  }
6695
6692
  }`;
6696
- function Ql({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6693
+ function Xl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6697
6694
  const [s, r] = Xe(e, i);
6698
6695
  return [
6699
6696
  `interface Lumina${t} extends ${s}h.JSX.HTMLAttributes<HTML${t}Element> {
@@ -6706,7 +6703,7 @@ function Ql({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6706
6703
  r
6707
6704
  ].join("");
6708
6705
  }
6709
- function Zl(e) {
6706
+ function Ql(e) {
6710
6707
  const t = ` interface IntrinsicElements extends PreactJsx.IntrinsicElements {
6711
6708
  ${e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": Preact${i};`).join(`
6712
6709
  `)}
@@ -6714,7 +6711,7 @@ ${e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": Preact${i};`).join
6714
6711
  return `import { JSX as PreactJsx } from "preact";
6715
6712
  import type { EventHandler } from "@arcgis/lumina";
6716
6713
 
6717
- ${e.map(Yl).join(`
6714
+ ${e.map(Zl).join(`
6718
6715
 
6719
6716
  `)}
6720
6717
 
@@ -6727,7 +6724,7 @@ ${t}
6727
6724
  }
6728
6725
  }`;
6729
6726
  }
6730
- function Yl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6727
+ function Zl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6731
6728
  const [s, r] = Xe(e, i);
6732
6729
  return [
6733
6730
  `interface Preact${t} extends ${s}PreactJsx.HTMLAttributes<HTML${t}Element> {
@@ -6740,13 +6737,13 @@ function Yl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6740
6737
  r
6741
6738
  ].join("");
6742
6739
  }
6743
- function ed(e) {
6740
+ function Yl(e) {
6744
6741
  const t = e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": React${i};`).join(`
6745
6742
  `);
6746
6743
  return `import type { HTMLProps } from 'react';
6747
6744
  import type { EventHandler } from "@arcgis/lumina";
6748
6745
 
6749
- ${e.map(td).join(`
6746
+ ${e.map(ed).join(`
6750
6747
 
6751
6748
  `)}
6752
6749
 
@@ -6772,7 +6769,7 @@ ${t}
6772
6769
  }
6773
6770
  }`;
6774
6771
  }
6775
- function td({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6772
+ function ed({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6776
6773
  const [s, r] = Xe(e, i);
6777
6774
  return [
6778
6775
  `interface React${t} extends ${s}HTMLProps<HTML${t}Element> {
@@ -6785,10 +6782,10 @@ function td({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6785
6782
  r
6786
6783
  ].join("");
6787
6784
  }
6788
- const id = (e) => `import { JSXBase as StencilJsx } from "@stencil/core/internal";
6785
+ const td = (e) => `import { JSXBase as StencilJsx } from "@stencil/core/internal";
6789
6786
  import type { EventHandler } from "@arcgis/lumina";
6790
6787
 
6791
- ${e.map(nd).join(`
6788
+ ${e.map(id).join(`
6792
6789
 
6793
6790
  `)}
6794
6791
 
@@ -6806,7 +6803,7 @@ declare module "@stencil/core/internal/stencil-public-runtime" {
6806
6803
  interface IntrinsicElements extends ExposedElements {}
6807
6804
  }
6808
6805
  }`;
6809
- function nd({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6806
+ function id({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6810
6807
  const [s, r] = Xe(e, i);
6811
6808
  return [
6812
6809
  `interface Stencil${t} extends ${s}StencilJsx.HTMLAttributes<HTML${t}Element> {
@@ -6819,16 +6816,16 @@ function nd({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6819
6816
  r
6820
6817
  ].join("");
6821
6818
  }
6822
- const sd = (e, t, i) => [i, t, rd(e), od(e)].join(`
6819
+ const nd = (e, t, i) => [i, t, sd(e), rd(e)].join(`
6823
6820
 
6824
- `), rd = (e) => e.filter((t) => (t.events?.length ?? 0) > 0).map(
6821
+ `), sd = (e) => e.filter((t) => (t.events?.length ?? 0) > 0).map(
6825
6822
  ({ pascalCaseName: t }) => `export interface ${t}CustomEvent<T> extends CustomEvent<T> {
6826
6823
  detail: T;
6827
6824
  target: HTML${t}Element;
6828
6825
  currentTarget: HTML${t}Element;
6829
6826
  }`
6830
6827
  ).join(`
6831
- `), od = (e) => `export { ToEvents, TargetedEvent } from "@arcgis/lumina";
6828
+ `), rd = (e) => `export { ToEvents, TargetedEvent } from "@arcgis/lumina";
6832
6829
 
6833
6830
  declare global {
6834
6831
  interface HTMLElementTagNameMap {
@@ -6836,12 +6833,12 @@ ${e.map(({ pascalCaseName: t, tagName: i }) => ` "${i}": HTML${t}Element;`).j
6836
6833
  `)}
6837
6834
  }
6838
6835
 
6839
- ${e.map(ad).join(`
6836
+ ${e.map(od).join(`
6840
6837
  `).split(`
6841
6838
  `).map((t) => t.length > 0 ? ` ${t}` : t).join(`
6842
6839
  `)}
6843
6840
  }`;
6844
- function ad({ name: e, pascalCaseName: t, events: i = [] }) {
6841
+ function od({ name: e, pascalCaseName: t, events: i = [] }) {
6845
6842
  const n = i.length > 0, s = `${t}CustomEvent`, r = `HTML${t}Element`;
6846
6843
  return [
6847
6844
  n ? `interface ${r}EventMap {
@@ -6860,7 +6857,7 @@ ${n ? ` addEventListener<K extends keyof ${r}EventMap>(type: K, listener: (this
6860
6857
  }`
6861
6858
  ].join("");
6862
6859
  }
6863
- function cd(e) {
6860
+ function ad(e) {
6864
6861
  let t;
6865
6862
  return {
6866
6863
  name: "@arcgis/lumina:generateFrameworkTypes",
@@ -6868,11 +6865,11 @@ function cd(e) {
6868
6865
  generateBundle() {
6869
6866
  if (e.isInStorybook)
6870
6867
  return;
6871
- t = Ja(e);
6868
+ t = Oa(e);
6872
6869
  const i = u.join(e.dir.dist, "index.d.ts");
6873
6870
  e._declarationTextTransformers.push((n) => {
6874
6871
  const { filePath: s, content: r } = n;
6875
- return s === i ? { filePath: s, content: sd(e.apiJsonComponents, r, t) } : n;
6872
+ return s === i ? { filePath: s, content: nd(e.apiJsonComponents, r, t) } : n;
6876
6873
  });
6877
6874
  },
6878
6875
  async writeBundle() {
@@ -6882,10 +6879,10 @@ function cd(e) {
6882
6879
  await z(i);
6883
6880
  const n = `/// <reference types="../index.d.ts" />
6884
6881
  ${t.replaceAll("./", "../")}`, s = Object.entries({
6885
- react: ed(e.apiJsonComponents),
6886
- preact: Zl(e.apiJsonComponents),
6887
- stencil: id(e.apiJsonComponents),
6888
- lumina: Xl(e.apiJsonComponents)
6882
+ react: Yl(e.apiJsonComponents),
6883
+ preact: Ql(e.apiJsonComponents),
6884
+ stencil: td(e.apiJsonComponents),
6885
+ lumina: Vl(e.apiJsonComponents)
6889
6886
  }).map(
6890
6887
  async ([r, a]) => await F(u.join(i, `${r}.d.ts`), `${n}
6891
6888
  ${a}`)
@@ -6894,36 +6891,36 @@ ${a}`)
6894
6891
  }
6895
6892
  };
6896
6893
  }
6897
- function ld(e) {
6894
+ function cd(e) {
6898
6895
  return {
6899
6896
  name: "@arcgis/lumina:buildWrappers",
6900
6897
  apply: () => e.viteCommand === "build" && !!e.options.build?.wrappers?.length,
6901
6898
  async writeBundle() {
6902
6899
  e.isInStorybook || await Promise.all(
6903
6900
  e.options.build?.wrappers?.map(async (t) => {
6904
- t.type === "react18" && await ud(e, t);
6901
+ t.type === "react18" && await pd(e, t);
6905
6902
  }) ?? []
6906
6903
  );
6907
6904
  }
6908
6905
  };
6909
6906
  }
6910
- const dd = "react", ji = "@lit/react", pd = `
6911
- import React from "${dd}";
6907
+ const ld = "react", ji = "@lit/react", dd = `
6908
+ import React from "${ld}";
6912
6909
  import { createComponent } from "${ji}";
6913
6910
  import type { EventName } from "${ji}";
6914
6911
  import { makeReactWrapperFactory, getReactWrapperOptions } from "@arcgis/lumina";
6915
6912
 
6916
6913
  const createWrapper = /*@__PURE__*/ makeReactWrapperFactory(React, createComponent) as typeof createComponent;
6917
6914
  `;
6918
- async function ud(e, t) {
6919
- const { name: i } = R(), n = [];
6915
+ async function pd(e, t) {
6916
+ const { name: i } = N(), n = [];
6920
6917
  for (const a of e.apiJson.modules)
6921
6918
  for (const c of a.declarations)
6922
- "customElement" in c && n.push(md(c));
6923
- const s = [`/// <reference types="${i}" preserve="true" />`, pd, ...n].join(""), r = u.resolve(t.proxiesFile);
6919
+ "customElement" in c && n.push(ud(c));
6920
+ const s = [`/// <reference types="${i}" preserve="true" />`, dd, ...n].join(""), r = u.resolve(t.proxiesFile);
6924
6921
  await z(u.dirname(r), { recursive: !0 }), await F(r, s);
6925
6922
  }
6926
- function md(e) {
6923
+ function ud(e) {
6927
6924
  const t = e.events?.map(
6928
6925
  (i) => ` ${Ee(`on${ws(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
6929
6926
  ).join(`
@@ -6939,33 +6936,33 @@ ${t}
6939
6936
  );
6940
6937
  `;
6941
6938
  }
6942
- function kd(e = {}) {
6939
+ function Pd(e = {}) {
6943
6940
  const t = new P(e), i = [
6944
6941
  t._plugin,
6942
+ il(t),
6945
6943
  nl(t),
6946
- sl(t),
6947
- Cl(t),
6948
- xr(t),
6949
- Hc(t),
6950
- cd(t),
6951
- Vl(t),
6952
- Sc(t),
6953
- vo(t),
6954
- Vc(t),
6955
6944
  El(t),
6956
- wl(t),
6957
- dl(t),
6945
+ xr(t),
6946
+ _c(t),
6947
+ ad(t),
6948
+ Gl(t),
6949
+ vc(t),
6950
+ ho(t),
6951
+ Gc(t),
6952
+ Tl(t),
6953
+ bl(t),
6954
+ ll(t),
6958
6955
  Ms(t),
6959
- Cc(t),
6956
+ Ec(t),
6960
6957
  // Deprecated feature will be dropped in https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2765
6961
6958
  // eslint-disable-next-line @typescript-eslint/no-deprecated
6962
- Qc(t),
6963
- ld(t),
6964
- Zc(t)
6965
- ].filter(j);
6959
+ Xc(t),
6960
+ cd(t),
6961
+ Qc(t)
6962
+ ].filter(R);
6966
6963
  return i.context = t, i;
6967
6964
  }
6968
- const Ad = {
6965
+ const xd = {
6969
6966
  initializeComponentDependencies: yn,
6970
6967
  updateLuminaTs: ss,
6971
6968
  propertyToAttributeMappings: B,
@@ -6980,7 +6977,7 @@ const Ad = {
6980
6977
  };
6981
6978
  export {
6982
6979
  Je as LuminaApiExtractor,
6983
- Ad as exportsForCodemod,
6980
+ xd as exportsForCodemod,
6984
6981
  qe as inferCdnUrl,
6985
- kd as useLumina
6982
+ Pd as useLumina
6986
6983
  };