@arcgis/lumina-compiler 4.33.0-next.98 → 4.33.0-next.99

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
@@ -168,6 +168,7 @@ const Is = (e) => (t, n) => (
168
168
  Ns,
169
169
  js,
170
170
  xs,
171
+ Ds,
171
172
  ...e.options.types?.declarationTextTransformers ?? [],
172
173
  ...e._declarationTextTransformers
173
174
  ].reduce(
@@ -199,19 +200,33 @@ ${e.content}`
199
200
  filePath: e.filePath,
200
201
  content: e.content.replace(n.regex, (i, s) => n.replacements[s])
201
202
  };
202
- };
203
- function Ds(e, t) {
203
+ }, Ds = (e) => {
204
+ const t = e.content.match(Rs)?.[1] ?? e.content.match(Ms)?.[1];
205
+ if (t !== void 0) {
206
+ const n = A(u.relative(process.cwd(), e.filePath));
207
+ throw Error(
208
+ `Found a .json import (${t}) in ${n}. This can cause TypeScript errors for consumers of your package. See alternative options: https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2047
209
+ File content:
210
+
211
+ ${e.content}
212
+
213
+ `
214
+ );
215
+ }
216
+ return e;
217
+ }, Rs = /^import (?:type \* as )?[^"'\n]+["'](\.[^\n]*?\.json)["'];$/mu, Ms = /(?<![.\w\d-])import\(['"]([\w@\-/\\.]+)\.json['"]\)/u;
218
+ function Os(e, t) {
204
219
  const n = z(t.name);
205
220
  return e.members.find((i) => i.name === n);
206
221
  }
207
- function Rs(e, t, n) {
222
+ function Js(e, t, n) {
208
223
  const i = u.relative(t, e);
209
224
  return n.modules.find((s) => s.path === i);
210
225
  }
211
226
  function Mn(e, t, n, i) {
212
227
  const s = {
213
228
  compiler: e,
214
- apiModule: e.isInPuppeteerTestBackEnd ? void 0 : Rs(n.fileName, e.dir.root, e.privateApiJson),
229
+ apiModule: e.isInPuppeteerTestBackEnd ? void 0 : Js(n.fileName, e.dir.root, e.privateApiJson),
215
230
  transformation: t
216
231
  }, r = n.statements;
217
232
  let a = n.statements;
@@ -222,9 +237,9 @@ function Mn(e, t, n, i) {
222
237
  a = c(n, s);
223
238
  }), Object.defineProperty(n, "statements", {
224
239
  value: r
225
- }), Ms(n, a);
240
+ }), Ks(n, a);
226
241
  }
227
- const Ms = (e, t) => o.factory.updateSourceFile(
242
+ const Ks = (e, t) => o.factory.updateSourceFile(
228
243
  e,
229
244
  t,
230
245
  /*
@@ -238,11 +253,11 @@ const Ms = (e, t) => o.factory.updateSourceFile(
238
253
  e.typeReferenceDirectives,
239
254
  e.hasNoDefaultLib,
240
255
  e.libReferenceDirectives
241
- ), Os = (e) => `${Rt}${" ".repeat(e.length - Rt.length - Mt.length)}${Mt}`, Rt = "/*", Mt = "*/", Js = (e) => e.statements.map(_s), Ks = "@arcgis/lumina", Bs = "LitElement", Ws = "PublicLitElement", On = "TargetedEvent";
242
- function _s(e) {
243
- if (o.isImportDeclaration(e) && o.isStringLiteral(e.moduleSpecifier) && e.moduleSpecifier.text === Ks && e.importClause?.namedBindings && o.isNamedImports(e.importClause.namedBindings)) {
256
+ ), Bs = (e) => `${Rt}${" ".repeat(e.length - Rt.length - Mt.length)}${Mt}`, Rt = "/*", Mt = "*/", Ws = (e) => e.statements.map(zs), _s = "@arcgis/lumina", Hs = "LitElement", Us = "PublicLitElement", On = "TargetedEvent";
257
+ function zs(e) {
258
+ if (o.isImportDeclaration(e) && o.isStringLiteral(e.moduleSpecifier) && e.moduleSpecifier.text === _s && e.importClause?.namedBindings && o.isNamedImports(e.importClause.namedBindings)) {
244
259
  const t = e.importClause.namedBindings.elements.findIndex(
245
- (i) => (i.propertyName ?? i.name).text === Bs
260
+ (i) => (i.propertyName ?? i.name).text === Hs
246
261
  );
247
262
  if (t === -1)
248
263
  return e;
@@ -259,7 +274,7 @@ function _s(e) {
259
274
  o.factory.updateImportSpecifier(
260
275
  n,
261
276
  n.isTypeOnly,
262
- o.factory.createIdentifier(Ws),
277
+ o.factory.createIdentifier(Us),
263
278
  n.name
264
279
  ),
265
280
  ...e.importClause.namedBindings.elements.slice(t + 1),
@@ -277,14 +292,14 @@ function _s(e) {
277
292
  return e;
278
293
  }
279
294
  const Jn = "_setterTypes";
280
- function Hs(e, t, n) {
295
+ function qs(e, t, n) {
281
296
  return o.factory.createPropertyDeclaration(
282
297
  [o.factory.createModifier(o.SyntaxKind.ReadonlyKeyword)],
283
298
  o.factory.createIdentifier(Jn),
284
299
  void 0,
285
300
  o.factory.createTypeLiteralNode(
286
301
  e.map((i) => {
287
- const [s, r] = Us(i.name, i.type, n._typeScriptPrinter, t);
302
+ const [s, r] = Gs(i.name, i.type, n._typeScriptPrinter, t);
288
303
  return o.factory.createPropertySignature(
289
304
  void 0,
290
305
  s,
@@ -296,7 +311,7 @@ function Hs(e, t, n) {
296
311
  void 0
297
312
  );
298
313
  }
299
- function Us(e, t, n, i) {
314
+ function Gs(e, t, n, i) {
300
315
  const s = n.printNode(o.EmitHint.Unspecified, e, i), r = n.printNode(o.EmitHint.Unspecified, t, i), a = `declare class A { ${s}: ${r} }`, d = o.createSourceFile(
301
316
  "a.d.ts",
302
317
  a,
@@ -306,7 +321,7 @@ function Us(e, t, n, i) {
306
321
  ).statements[0].members[0];
307
322
  return [d.name, d.type];
308
323
  }
309
- const zs = "Fragment", Xe = "DynamicHtmlTag", Qe = "DynamicSvgTag", Ae = Symbol("dynamic html tag name"), at = Symbol("dynamic svg tag name"), Kn = /* @__PURE__ */ new Set([
324
+ const Vs = "Fragment", Xe = "DynamicHtmlTag", Qe = "DynamicSvgTag", Ae = Symbol("dynamic html tag name"), at = Symbol("dynamic svg tag name"), Kn = /* @__PURE__ */ new Set([
310
325
  /**
311
326
  * There is a "className" property. However, in JSX typings we use "class"
312
327
  * instead to keep name shorter and to match Stencil's name. Thus, it should
@@ -1275,7 +1290,7 @@ const Ot = /* @__PURE__ */ new Set(["itemScope"]), _n = /* @__PURE__ */ new Set(
1275
1290
  "volumeChange",
1276
1291
  "waiting",
1277
1292
  "wheel"
1278
- ]), qs = /* @__PURE__ */ new Set([
1293
+ ]), Xs = /* @__PURE__ */ new Set([
1279
1294
  "area",
1280
1295
  "base",
1281
1296
  "br",
@@ -1351,7 +1366,7 @@ const Ot = /* @__PURE__ */ new Set(["itemScope"]), _n = /* @__PURE__ */ new Set(
1351
1366
  "tspan",
1352
1367
  "use",
1353
1368
  "view"
1354
- ]), Gs = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), gt = /* @__PURE__ */ new Set([
1369
+ ]), Qs = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), gt = /* @__PURE__ */ new Set([
1355
1370
  "annotation-xml",
1356
1371
  "annotation",
1357
1372
  "maction",
@@ -1383,7 +1398,7 @@ const Ot = /* @__PURE__ */ new Set(["itemScope"]), _n = /* @__PURE__ */ new Set(
1383
1398
  "munder",
1384
1399
  "munderover",
1385
1400
  "semantics"
1386
- ]), Vs = /* @__PURE__ */ new Set([
1401
+ ]), Ys = /* @__PURE__ */ new Set([
1387
1402
  "annotation-xml",
1388
1403
  "color-profile",
1389
1404
  "font-face",
@@ -1392,7 +1407,7 @@ const Ot = /* @__PURE__ */ new Set(["itemScope"]), _n = /* @__PURE__ */ new Set(
1392
1407
  "font-face-format",
1393
1408
  "font-face-name",
1394
1409
  "missing-glyph"
1395
- ]), Xs = /\r\n|[\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/gu, Qs = new Map(
1410
+ ]), Zs = /\r\n|[\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/gu, er = new Map(
1396
1411
  Object.entries({
1397
1412
  " ": "\\t",
1398
1413
  "\v": "\\v",
@@ -1417,22 +1432,22 @@ const Ot = /* @__PURE__ */ new Set(["itemScope"]), _n = /* @__PURE__ */ new Set(
1417
1432
  })
1418
1433
  );
1419
1434
  function Hn(e) {
1420
- return `\\u${`0000${e.toString(Ys).toUpperCase()}`.slice(-4)}`;
1435
+ return `\\u${`0000${e.toString(tr).toUpperCase()}`.slice(-4)}`;
1421
1436
  }
1422
- const Ys = 16;
1423
- function Zs(e, t, n) {
1424
- if (e.charCodeAt(0) === ir) {
1437
+ const tr = 16;
1438
+ function nr(e, t, n) {
1439
+ if (e.charCodeAt(0) === or) {
1425
1440
  const i = n.charCodeAt(t + e.length);
1426
- return i >= sr && i <= rr ? "\\x00" : "\\0";
1441
+ return i >= ar && i <= cr ? "\\x00" : "\\0";
1427
1442
  }
1428
- return Qs.get(e) || Hn(e.charCodeAt(0));
1443
+ return er.get(e) || Hn(e.charCodeAt(0));
1429
1444
  }
1430
- const er = (e) => e.replace(Xs, Zs), Jt = /[^\u0000-\u007F]/g;
1431
- function tr(e) {
1432
- return e = er(e), Jt.test(e) ? e.replace(Jt, (t) => Hn(t.charCodeAt(0))) : e;
1445
+ const ir = (e) => e.replace(Zs, nr), Jt = /[^\u0000-\u007F]/g;
1446
+ function sr(e) {
1447
+ return e = ir(e), Jt.test(e) ? e.replace(Jt, (t) => Hn(t.charCodeAt(0))) : e;
1433
1448
  }
1434
- const nr = tr, ir = 0, sr = 48, rr = 57, or = /\$\{/gu, ar = (e) => e.replace(or, "\\${");
1435
- function cr(e) {
1449
+ const rr = sr, or = 0, ar = 48, cr = 57, lr = /\$\{/gu, dr = (e) => e.replace(lr, "\\${");
1450
+ function pr(e) {
1436
1451
  if (e.length === 0)
1437
1452
  return "";
1438
1453
  const t = e[0];
@@ -1445,11 +1460,11 @@ function cr(e) {
1445
1460
  }
1446
1461
  return e.trim().length === 0 ? t : e;
1447
1462
  }
1448
- const Ke = (e) => ar(nr(e)), lr = (e) => !dr.test(e), dr = /^[^\s"'=<>`]+$/u, pr = /[&<>]/gu, ur = {
1463
+ const Ke = (e) => dr(rr(e)), ur = (e) => !mr.test(e), mr = /^[^\s"'=<>`]+$/u, fr = /[&<>]/gu, yr = {
1449
1464
  "&": "&amp;",
1450
1465
  "<": "&lt;",
1451
1466
  ">": "&gt;"
1452
- }, Un = (e) => e.replace(pr, (t) => ur[t]), vt = (e) => typeof e == "string" && e.includes("-") && !Vs.has(e), wt = (e, t) => e.getFullText(t.sourceFile).slice(0, e.getLeadingTriviaWidth(t.sourceFile));
1467
+ }, Un = (e) => e.replace(fr, (t) => yr[t]), vt = (e) => typeof e == "string" && e.includes("-") && !Ys.has(e), wt = (e, t) => e.getFullText(t.sourceFile).slice(0, e.getLeadingTriviaWidth(t.sourceFile));
1453
1468
  function St(e, t) {
1454
1469
  const n = bt(e);
1455
1470
  return n.length === 0 ? t : o.setSyntheticLeadingComments(
@@ -1463,7 +1478,7 @@ function St(e, t) {
1463
1478
  );
1464
1479
  }
1465
1480
  const bt = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
1466
- function mr(e) {
1481
+ function hr(e) {
1467
1482
  const t = bt(e);
1468
1483
  if (t.length === 0)
1469
1484
  return [e || " "];
@@ -1495,8 +1510,8 @@ function Ye(e) {
1495
1510
  return e;
1496
1511
  throw new Error(`Expected string, got ${typeof e}: ${String(e)}`);
1497
1512
  }
1498
- const fr = (e, t) => t.apiModule === void 0 ? e.statements : e.statements.map((n) => yr(n, e, t));
1499
- function yr(e, t, n) {
1513
+ const gr = (e, t) => t.apiModule === void 0 ? e.statements : e.statements.map((n) => vr(n, e, t));
1514
+ function vr(e, t, n) {
1500
1515
  if (o.isClassDeclaration(e)) {
1501
1516
  const i = e, s = i.name?.text, r = n.apiModule.declarations.find(
1502
1517
  (p) => p.name === s && "customElement" in p
@@ -1505,13 +1520,13 @@ function yr(e, t, n) {
1505
1520
  return e;
1506
1521
  const a = [], c = /* @__PURE__ */ new Set(), l = [], d = [];
1507
1522
  for (let p = 0; p < i.members.length; p++) {
1508
- const m = i.members[p], f = hr(m, r, l, c, t);
1523
+ const m = i.members[p], f = wr(m, r, l, c, t);
1509
1524
  f === void 0 ? a.push(m) : Array.isArray(f) ? d.push(...f) : d.push(f);
1510
1525
  }
1511
1526
  return c.size > 0 && a.forEach((p) => {
1512
1527
  const m = z(p.name);
1513
- m !== void 0 && c.has(m) && d.push(vr(p));
1514
- }), l.length > 0 && d.push(Hs(l, t, n.compiler)), o.factory.updateClassDeclaration(
1528
+ m !== void 0 && c.has(m) && d.push(br(p));
1529
+ }), l.length > 0 && d.push(qs(l, t, n.compiler)), o.factory.updateClassDeclaration(
1515
1530
  i,
1516
1531
  i.modifiers,
1517
1532
  i.name,
@@ -1526,7 +1541,7 @@ function yr(e, t, n) {
1526
1541
  } else
1527
1542
  return e;
1528
1543
  }
1529
- function hr(e, t, n, i, s) {
1544
+ function wr(e, t, n, i, s) {
1530
1545
  const r = z(e.name);
1531
1546
  if (r === void 0)
1532
1547
  return;
@@ -1539,7 +1554,7 @@ function hr(e, t, n, i, s) {
1539
1554
  Wt(e.modifiers),
1540
1555
  e.name,
1541
1556
  void 0,
1542
- wr(e.type, s),
1557
+ Tr(e.type, s),
1543
1558
  e.initializer
1544
1559
  );
1545
1560
  if (a.readonly === !0)
@@ -1614,13 +1629,13 @@ function hr(e, t, n, i, s) {
1614
1629
  }
1615
1630
  const Kt = /^typeof this\.(?<accessor>[^.]+)\.(?<boundProperty>[^.]+)$/u;
1616
1631
  function Bt(e, t, n) {
1617
- const s = (t?.pos !== -1 ? t?.getText(n) : void 0)?.match(gr) ?? [];
1632
+ const s = (t?.pos !== -1 ? t?.getText(n) : void 0)?.match(Sr) ?? [];
1618
1633
  for (const r of s)
1619
1634
  e.add(r);
1620
1635
  return t;
1621
1636
  }
1622
- const gr = /(?<=this.)[\w$]+/gu;
1623
- function vr(e) {
1637
+ const Sr = /(?<=this.)[\w$]+/gu;
1638
+ function br(e) {
1624
1639
  if (o.isPropertyDeclaration(e)) {
1625
1640
  const t = Se(e.modifiers);
1626
1641
  if (t !== e.modifiers)
@@ -1675,7 +1690,7 @@ function Se(e) {
1675
1690
  )
1676
1691
  ];
1677
1692
  }
1678
- function wr(e, t) {
1693
+ function Tr(e, t) {
1679
1694
  if (e === void 0)
1680
1695
  return;
1681
1696
  const n = o.isImportTypeNode(e) && e.qualifier && o.isIdentifier(e.qualifier) && e.qualifier.escapedText === "EventEmitter" ? e.typeArguments ?? [] : o.isTypeReferenceNode(e) && o.isIdentifier(e.typeName) && e.typeName.escapedText === "EventEmitter" ? e.typeArguments ?? [] : void 0;
@@ -1686,21 +1701,10 @@ function wr(e, t) {
1686
1701
  `Unhandled event type node: ${e.getFullText(t)} (in ${A(t.fileName)}). Double check you are using events correctly or report this issue to Lumina maintainers`
1687
1702
  ), e);
1688
1703
  }
1689
- const Sr = (e) => e.statements.map(br);
1690
- function br(e) {
1691
- if (o.isImportDeclaration(e)) {
1692
- const t = e.moduleSpecifier.text;
1693
- if (t.endsWith(".json"))
1694
- throw new Error(
1695
- `Found a .json import (${t}) in a .d.ts file. This can cause TypeScript errors for consumers of your package. See alternative options: https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2047`
1696
- );
1697
- }
1698
- return e;
1699
- }
1700
- const Tr = [Js, fr, Sr];
1701
- function Er(e) {
1704
+ const Er = [Ws, gr];
1705
+ function Cr(e) {
1702
1706
  let t;
1703
- const n = Cr(e);
1707
+ const n = $r(e);
1704
1708
  return {
1705
1709
  name: "@arcgis/lumina:componentDtsTransformer",
1706
1710
  supports(i) {
@@ -1728,22 +1732,22 @@ function Er(e) {
1728
1732
  }
1729
1733
  };
1730
1734
  }
1731
- const Cr = (e) => (t) => (n) => Mn(e, t, n, [
1732
- ...Tr,
1735
+ const $r = (e) => (t) => (n) => Mn(e, t, n, [
1736
+ ...Er,
1733
1737
  ...e.options.types?.declarationAstTransformers ?? []
1734
- ]), $r = (e) => new Proxy(e, {
1735
- get: xr,
1736
- set: Pr
1738
+ ]), xr = (e) => new Proxy(e, {
1739
+ get: Pr,
1740
+ set: Ir
1737
1741
  });
1738
- function xr(e, t, n) {
1742
+ function Pr(e, t, n) {
1739
1743
  if (t in e)
1740
1744
  return Reflect.get(e, t, n);
1741
1745
  throw new Error(`Requested unexpected property ${String(t)}`);
1742
1746
  }
1743
- function Pr(e, t) {
1747
+ function Ir(e, t) {
1744
1748
  throw new Error(`Unexpectedly tried to set the ${String(t)} property.`);
1745
1749
  }
1746
- function Ir(e) {
1750
+ function kr(e) {
1747
1751
  const t = e.options.types ?? {};
1748
1752
  let n = !1;
1749
1753
  const i = {
@@ -1785,7 +1789,7 @@ function Ir(e) {
1785
1789
  }
1786
1790
  },
1787
1791
  ...t?.resolvers ?? [],
1788
- Er(e)
1792
+ Cr(e)
1789
1793
  ]
1790
1794
  });
1791
1795
  return {
@@ -1806,7 +1810,7 @@ function Ir(e) {
1806
1810
  if (typeof c != "function")
1807
1811
  throw new Error("Expected transform to be a function");
1808
1812
  if (await a.call(this, r), await c.call(
1809
- $r({}),
1813
+ xr({}),
1810
1814
  "",
1811
1815
  /*
1812
1816
  * Have to give it a file that will be matched by the tsconfig's
@@ -1818,7 +1822,7 @@ function Ir(e) {
1818
1822
  }
1819
1823
  };
1820
1824
  }
1821
- const kr = async (e) => Object.fromEntries(
1825
+ const Ar = async (e) => Object.fromEntries(
1822
1826
  (await e.componentFilesPromise).map((t) => [qn(t), t])
1823
1827
  ), qn = (e, t = u.resolve("src")) => u.relative(t, u.join(e, "..", ft.slice(0, -3))), Tt = async (e, t, n = t) => await Je(n, { recursive: !0 }).catch((i) => {
1824
1828
  if (String(i).includes("ENOENT"))
@@ -1836,15 +1840,15 @@ const kr = async (e) => Object.fromEntries(
1836
1840
  function pe(e, t) {
1837
1841
  if (!e.startsWith(t) || !e.endsWith(".tsx"))
1838
1842
  return !1;
1839
- const [n, i] = e.slice(0, -4).split(u.sep).slice(Ar);
1843
+ const [n, i] = e.slice(0, -4).split(u.sep).slice(Lr);
1840
1844
  return n === i;
1841
1845
  }
1842
- const Ar = -2, _t = 5, Ht = 1, Ut = 1, zt = 3, qt = 4, Be = o;
1843
- Lr(Be.createSourceMapGenerator);
1844
- Fr(Be.createTextWriter);
1845
- Nr(Be.getNewLineCharacter);
1846
+ const Lr = -2, _t = 5, Ht = 1, Ut = 1, zt = 3, qt = 4, Be = o;
1847
+ Fr(Be.createSourceMapGenerator);
1848
+ Nr(Be.createTextWriter);
1849
+ jr(Be.getNewLineCharacter);
1846
1850
  const ae = Be;
1847
- function Lr(e) {
1851
+ function Fr(e) {
1848
1852
  if (typeof e != "function")
1849
1853
  throw new Error(
1850
1854
  "Failed to find ts.createSourceMapGenerator() function. Lumina needs to be updated to support the new TypeScript version"
@@ -1854,7 +1858,7 @@ function Lr(e) {
1854
1858
  `ts.createSourceMapGenerator() signature changed. Expected ${_t} arguments. Lumina needs to be updated to support the new TypeScript version`
1855
1859
  );
1856
1860
  }
1857
- function Fr(e) {
1861
+ function Nr(e) {
1858
1862
  if (typeof e != "function")
1859
1863
  throw new Error(
1860
1864
  "Failed to find ts.createTextWriter() function. Lumina needs to be updated to support the new TypeScript version"
@@ -1864,7 +1868,7 @@ function Fr(e) {
1864
1868
  `ts.createTextWriter() signature changed. Expected ${Ht} arguments. Lumina needs to be updated to support the new TypeScript version`
1865
1869
  );
1866
1870
  }
1867
- function Nr(e) {
1871
+ function jr(e) {
1868
1872
  if (typeof e != "function")
1869
1873
  throw new Error(
1870
1874
  "Failed to find ts.getNewLineCharacter() function. Lumina needs to be updated to support the new TypeScript version"
@@ -1874,7 +1878,7 @@ function Nr(e) {
1874
1878
  `ts.getNewLineCharacter() signature changed. Expected ${Ut} argument. Lumina needs to be updated to support the new TypeScript version`
1875
1879
  );
1876
1880
  }
1877
- function jr(e) {
1881
+ function Dr(e) {
1878
1882
  if (typeof e != "function")
1879
1883
  throw new Error(
1880
1884
  "Failed to find ts.Printer.writeFile() function. Lumina needs to be updated to support the new TypeScript version"
@@ -1884,7 +1888,7 @@ function jr(e) {
1884
1888
  `ts.Printer.writeFile() signature changed. Expected ${zt} arguments. Lumina needs to be updated to support the new TypeScript version`
1885
1889
  );
1886
1890
  }
1887
- function Dr(e) {
1891
+ function Rr(e) {
1888
1892
  if (typeof e != "function")
1889
1893
  throw new Error(
1890
1894
  "Failed to find ts.Printer.writeNode() function. Lumina needs to be updated to support the new TypeScript version"
@@ -1896,23 +1900,23 @@ function Dr(e) {
1896
1900
  }
1897
1901
  function Gn(e) {
1898
1902
  const t = ae.createPrinter(e);
1899
- return jr(t.writeFile), Dr(t.writeNode), t;
1903
+ return Dr(t.writeFile), Rr(t.writeNode), t;
1900
1904
  }
1901
1905
  function Gt(e) {
1902
1906
  const t = o.isUnionTypeNode(e) ? e.types.map(Vt) : [Vt(e)], n = new Set(t), i = n.delete("true"), s = n.delete("false");
1903
1907
  (i || s) && n.add("boolean");
1904
1908
  let r = Array.from(n).sort();
1905
- if (r.length > 1 && (r = r.map((a) => a.includes("=>") ? `(${a})` : a)), !(r.length > Rr))
1906
- return r.map(Jr);
1909
+ if (r.length > 1 && (r = r.map((a) => a.includes("=>") ? `(${a})` : a)), !(r.length > Mr))
1910
+ return r.map(Kr);
1907
1911
  }
1908
- const Rr = 40, Mr = (e) => e?.some(
1912
+ const Mr = 40, Or = (e) => e?.some(
1909
1913
  (t) => t.type === "number" || t.type === "boolean" || t.type === "string" || /**
1910
1914
  * Treat "any" as possibly literal, but not "unknown". Matches Stencil
1911
1915
  * behavior.
1912
1916
  */
1913
1917
  t.type === "any"
1914
- ) ?? !1, Or = (e) => e.length === 1 && e[0].type !== "string" && e[0].type !== "number" && e[0].type !== "boolean" && e[0].type !== "any" ? void 0 : e, Vn = (e) => e.map(Xn).join(" | "), Xn = (e) => e.type === "string" && e.value !== void 0 ? `"${e.value}"` : e.value ?? e.type;
1915
- function Jr(e) {
1918
+ ) ?? !1, Jr = (e) => e.length === 1 && e[0].type !== "string" && e[0].type !== "number" && e[0].type !== "boolean" && e[0].type !== "any" ? void 0 : e, Vn = (e) => e.map(Xn).join(" | "), Xn = (e) => e.type === "string" && e.value !== void 0 ? `"${e.value}"` : e.value ?? e.type;
1919
+ function Kr(e) {
1916
1920
  return e === "boolean" ? { type: "boolean" } : Number.isNaN(Number.parseFloat(e)) ? e.startsWith('"') || e.startsWith("'") ? {
1917
1921
  value: e.slice(1, -1),
1918
1922
  type: "string"
@@ -1923,25 +1927,25 @@ function Jr(e) {
1923
1927
  type: "number"
1924
1928
  };
1925
1929
  }
1926
- const Kr = (e, t, n, i) => {
1930
+ const Br = (e, t, n, i) => {
1927
1931
  const s = e.typeScriptTypeChecker, r = o.isSetAccessor(t) ? t.parameters[0] : t, a = s.getTypeAtLocation(r), c = !n;
1928
1932
  return Le(s, a, i, e.dir, c);
1929
1933
  };
1930
- function Br(e, t) {
1934
+ function Wr(e, t) {
1931
1935
  if (e.length === 0)
1932
1936
  return;
1933
- const n = t.matchAll(Wr), i = [];
1937
+ const n = t.matchAll(_r), i = [];
1934
1938
  for (const s of n) {
1935
1939
  const r = e.find((a) => a.name === s[0]);
1936
1940
  r !== void 0 && i.push({ ...r, start: s.index, end: s.index + r.name.length });
1937
1941
  }
1938
1942
  return i.length === 0 ? void 0 : i;
1939
1943
  }
1940
- const Wr = /"[^"]+"|'[^"]+'|\w+/gu;
1944
+ const _r = /"[^"]+"|'[^"]+'|\w+/gu;
1941
1945
  function Le(e, t, n, i, s = !1) {
1942
1946
  let { typeNode: r, references: a } = Qt(e, t, n, i), c = Gt(r);
1943
1947
  c === void 0 && ({ typeNode: r, references: a } = Qt(e, t, n, i, !1), c = Gt(r) ?? []);
1944
- const l = s ? c.filter((f) => f.type !== "null" && f.type !== "undefined") : c, d = Vn(l), p = Or(l), m = Br(a, d);
1948
+ const l = s ? c.filter((f) => f.type !== "null" && f.type !== "undefined") : c, d = Vn(l), p = Jr(l), m = Wr(a, d);
1945
1949
  return {
1946
1950
  text: d,
1947
1951
  references: m,
@@ -1949,21 +1953,21 @@ function Le(e, t, n, i, s = !1) {
1949
1953
  };
1950
1954
  }
1951
1955
  function Vt(e) {
1952
- _r.writeNode(o.EmitHint.Unspecified, e, void 0, Ze);
1956
+ Hr.writeNode(o.EmitHint.Unspecified, e, void 0, Ze);
1953
1957
  const t = Ze.getText();
1954
1958
  return Ze.clear(), t;
1955
1959
  }
1956
- const _r = Gn({ removeComments: !0 }), Ze = ae.createTextWriter(`
1957
- `), Qn = o.TypeFormatFlags.NoTruncation | o.TypeFormatFlags.WriteArrayAsGenericType | o.TypeFormatFlags.SuppressAnyReturnType | o.TypeFormatFlags.MultilineObjectLiterals, Hr = Qn & o.TypeFormatFlags.NodeBuilderFlagsMask, Ur = Hr | o.NodeBuilderFlags.IgnoreErrors | o.NodeBuilderFlags.NoTruncation;
1958
- function zr(e, t, n, i = !0) {
1960
+ const Hr = Gn({ removeComments: !0 }), Ze = ae.createTextWriter(`
1961
+ `), Qn = o.TypeFormatFlags.NoTruncation | o.TypeFormatFlags.WriteArrayAsGenericType | o.TypeFormatFlags.SuppressAnyReturnType | o.TypeFormatFlags.MultilineObjectLiterals, Ur = Qn & o.TypeFormatFlags.NodeBuilderFlagsMask, zr = Ur | o.NodeBuilderFlags.IgnoreErrors | o.NodeBuilderFlags.NoTruncation;
1962
+ function qr(e, t, n, i = !0) {
1959
1963
  const s = /* @__PURE__ */ new Map();
1960
1964
  X(t, s, n, i);
1961
1965
  const r = t.flags & o.TypeFlags.Union ? t.types.every(Xt) : Xt(t), a = e.typeToTypeNode(
1962
1966
  t,
1963
1967
  void 0,
1964
- Ur & (r ? ~o.TypeFormatFlags.MultilineObjectLiterals : -1)
1968
+ zr & (r ? ~o.TypeFormatFlags.MultilineObjectLiterals : -1)
1965
1969
  );
1966
- return s.forEach(qr), a === void 0 ? (console.error("Failed to convert type to type node."), o.factory.createTypeReferenceNode(o.factory.createIdentifier("unknown"), void 0)) : a;
1970
+ return s.forEach(Gr), a === void 0 ? (console.error("Failed to convert type to type node."), o.factory.createTypeReferenceNode(o.factory.createIdentifier("unknown"), void 0)) : a;
1967
1971
  }
1968
1972
  const Xt = (e) => e.flags & o.TypeFlags.Object ? e.getProperties().length === 1 : !!(e.flags & o.TypeFlags.PossiblyFalsy);
1969
1973
  function Qt(e, t, n, i, s = !0) {
@@ -1995,10 +1999,10 @@ function Qt(e, t, n, i, s = !0) {
1995
1999
  name: f,
1996
2000
  package: void 0,
1997
2001
  module: "index.js"
1998
- } : Gr(m, f, n, i);
2002
+ } : Vr(m, f, n, i);
1999
2003
  r.push(y), a.add(f);
2000
2004
  }
2001
- return { typeNode: zr(e, t, c, s), references: r };
2005
+ return { typeNode: qr(e, t, c, s), references: r };
2002
2006
  }
2003
2007
  function X(e, t, n, i = !0) {
2004
2008
  if (typeof e != "object" || e === null || !("checker" in e))
@@ -2028,10 +2032,10 @@ function X(e, t, n, i = !0) {
2028
2032
  c !== "resolvedBaseConstructorType" && c !== "resolvedBaseTypes" && c !== "typeParameters" && c !== "typeParameter" && (Array.isArray(l) ? l.forEach((d) => X(d, t, n, i)) : X(l, t, n, i));
2029
2033
  });
2030
2034
  }
2031
- function qr(e, t) {
2035
+ function Gr(e, t) {
2032
2036
  e.origin !== void 0 && (t.origin = e.origin), e.aliasSymbol !== void 0 && (t.aliasSymbol = e.aliasSymbol), e.aliasTypeArguments !== void 0 && (t.aliasTypeArguments = e.aliasTypeArguments);
2033
2037
  }
2034
- function Gr(e, t, n, i) {
2038
+ function Vr(e, t, n, i) {
2035
2039
  const s = e?.declarations?.map((c) => c.getSourceFile()) ?? [];
2036
2040
  if (s.length === 0) {
2037
2041
  if (t === "Array")
@@ -2050,7 +2054,7 @@ function Gr(e, t, n, i) {
2050
2054
  package: In,
2051
2055
  module: void 0
2052
2056
  };
2053
- const { packageName: r, moduleName: a } = Vr(s[0].fileName, i);
2057
+ const { packageName: r, moduleName: a } = Xr(s[0].fileName, i);
2054
2058
  return r ? {
2055
2059
  name: t,
2056
2060
  package: r,
@@ -2062,7 +2066,7 @@ function Gr(e, t, n, i) {
2062
2066
  module: a
2063
2067
  };
2064
2068
  }
2065
- function Vr(e, t) {
2069
+ function Xr(e, t) {
2066
2070
  const n = e.split("/node_modules/");
2067
2071
  if (n.length > 1) {
2068
2072
  const a = n.at(-1);
@@ -2075,18 +2079,18 @@ function Vr(e, t) {
2075
2079
  }
2076
2080
  return {
2077
2081
  packageName: void 0,
2078
- moduleName: u.relative(t.root, Qr(Xr(e, t)))
2082
+ moduleName: u.relative(t.root, Yr(Qr(e, t)))
2079
2083
  };
2080
2084
  }
2081
- function Xr(e, t) {
2085
+ function Qr(e, t) {
2082
2086
  return pe(e, t.srcComponents) ? u.join(t.dist, qn(e, t.src)) : e.startsWith(t.src) ? u.join(t.dist, e.slice(t.src.length)) : e;
2083
2087
  }
2084
- const Qr = (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`;
2088
+ const Yr = (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`;
2085
2089
  function Yn(e) {
2086
2090
  const t = e.split("/"), i = e[0].startsWith("@") ? 2 : 1, s = t.slice(0, i).join("/"), r = t.slice(i).join("/");
2087
2091
  return { packageName: s, moduleName: r };
2088
2092
  }
2089
- const Yr = (e) => e.includes("/node_modules/") || e.includes("/dist/");
2093
+ const Zr = (e) => e.includes("/node_modules/") || e.includes("/dist/");
2090
2094
  function Yt(e, t, n) {
2091
2095
  const i = e.declarations;
2092
2096
  if (i !== void 0)
@@ -2100,7 +2104,7 @@ function Yt(e, t, n) {
2100
2104
  for (const c of a) {
2101
2105
  const l = Zt(c, t, n);
2102
2106
  if (l !== void 0)
2103
- return Zr(l);
2107
+ return eo(l);
2104
2108
  }
2105
2109
  }
2106
2110
  }
@@ -2124,16 +2128,16 @@ function Zt(e, t, n) {
2124
2128
  });
2125
2129
  });
2126
2130
  }
2127
- const Zr = (e) => e.split("#")[0];
2128
- function eo(e) {
2131
+ const eo = (e) => e.split("#")[0];
2132
+ function to(e) {
2129
2133
  const t = [];
2130
- for (const n of e.matchAll(to)) {
2131
- const i = n.groups.name, s = n.groups.description.replaceAll(no, " ").trim();
2134
+ for (const n of e.matchAll(no)) {
2135
+ const i = n.groups.name, s = n.groups.description.replaceAll(io, " ").trim();
2132
2136
  t.push({ name: i, description: s.endsWith("*") ? s.slice(0, -1).trim() : s });
2133
2137
  }
2134
2138
  return t.length === 0 ? void 0 : t;
2135
2139
  }
2136
- const to = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, no = /\n\s+\*? ?/gu, io = ["css", "less", "sass", "scss", "styl", "stylus", "pcss", "postcss", "sss"], Fe = new RegExp(`\\.(${io.join("|")})(\\?|$)`, "u"), so = /^import ["'](?<specifier>[^"']+)["'];$/gmu, ro = () => "throwError", en = "@arcgis/lumina:loadLitCss", q = "?layered", xe = "?global", oo = (e) => ({
2140
+ const no = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, io = /\n\s+\*? ?/gu, so = ["css", "less", "sass", "scss", "styl", "stylus", "pcss", "postcss", "sss"], Fe = new RegExp(`\\.(${so.join("|")})(\\?|$)`, "u"), ro = /^import ["'](?<specifier>[^"']+)["'];$/gmu, oo = () => "throwError", en = "@arcgis/lumina:loadLitCss", q = "?layered", xe = "?global", ao = (e) => ({
2137
2141
  name: en,
2138
2142
  enforce: "pre",
2139
2143
  configResolved(t) {
@@ -2157,7 +2161,7 @@ const to = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, no = /\n\s+\
2157
2161
  if (l)
2158
2162
  return e._globalCssString = ti(m), { code: "", map: { mappings: "" } };
2159
2163
  {
2160
- const y = e.isFullApiExtraction ? eo(r) : void 0;
2164
+ const y = e.isFullApiExtraction ? to(r) : void 0;
2161
2165
  if (y !== void 0) {
2162
2166
  e._cssDocs ??= /* @__PURE__ */ new Map(), e._cssDocs.set(a, y);
2163
2167
  const h = e._cssImports.get(a);
@@ -2177,7 +2181,7 @@ const to = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, no = /\n\s+\
2177
2181
  }
2178
2182
  return {
2179
2183
  ...f,
2180
- code: po(m, e.hmrEnabled, e.shouldMinify, c),
2184
+ code: uo(m, e.hmrEnabled, e.shouldMinify, c),
2181
2185
  /**
2182
2186
  * Vite's original transform does not generate source maps for inlined
2183
2187
  * css, thus we can't either
@@ -2191,21 +2195,21 @@ const to = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, no = /\n\s+\
2191
2195
  if (!(n.endsWith(".js") || n.endsWith(".ts") || n.endsWith(".tsx") || e.isInStorybook && n.endsWith(".mdx")))
2192
2196
  return;
2193
2197
  let s = 0;
2194
- const r = Yr(n);
2198
+ const r = Zr(n);
2195
2199
  let a = !1;
2196
- const c = t.replaceAll(so, (l, d) => {
2200
+ const c = t.replaceAll(ro, (l, d) => {
2197
2201
  if (!Fe.test(d) || d.includes("?"))
2198
2202
  return l;
2199
2203
  if (r) {
2200
- if ((e.options.css?.sideEffectImportHandling ?? ro)(d, n) === "drop")
2201
- return a = !0, Os(l);
2204
+ if ((e.options.css?.sideEffectImportHandling ?? oo)(d, n) === "drop")
2205
+ return a = !0, Bs(l);
2202
2206
  {
2203
2207
  const f = A(u.relative(ke(), n));
2204
2208
  throw new Error(
2205
2209
  `Found a side-effect CSS import \`${l}\` in "${f}". 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`
2206
2210
  );
2207
2211
  }
2208
- } else if (e.isInStorybook && mo(n, e)) {
2212
+ } else if (e.isInStorybook && fo(n, e)) {
2209
2213
  a = !0;
2210
2214
  const p = `storybookCss$${s}`;
2211
2215
  return s += 1, [
@@ -2235,7 +2239,7 @@ const to = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, no = /\n\s+\
2235
2239
  map: null
2236
2240
  } : void 0;
2237
2241
  }
2238
- }), Zn = 'export default "', ei = '"', ao = "import { css } from '@lit/reactive-element/css-tag.js';\nexport const styles = css`", co = "`;\nexport default styles;", lo = `
2242
+ }), Zn = 'export default "', ei = '"', co = "import { css } from '@lit/reactive-element/css-tag.js';\nexport const styles = css`", lo = "`;\nexport default styles;", po = `
2239
2243
 
2240
2244
  if(import.meta.hot) {
2241
2245
  import.meta.hot.data.styles ??= styles;
@@ -2247,25 +2251,25 @@ if(import.meta.hot) {
2247
2251
  import.meta.hot.data.styles.styleSheet.replaceSync(nextExports.styles.cssText);
2248
2252
  });
2249
2253
  }`, ti = (e) => e.slice(Zn.length, -ei.length);
2250
- function po(e, t, n, i) {
2251
- const r = ti(e).replaceAll('\\"', '"').replaceAll("`", "\\`").replaceAll("\\r", ""), a = Ke(uo(r)), c = i ? `@layer{${n ? "" : `
2254
+ function uo(e, t, n, i) {
2255
+ const r = ti(e).replaceAll('\\"', '"').replaceAll("`", "\\`").replaceAll("\\r", ""), a = Ke(mo(r)), c = i ? `@layer{${n ? "" : `
2252
2256
  `}${a}${n ? "" : `
2253
2257
  `}}` : a;
2254
- return `${ao}${c}${co}${t ? lo : ""}`;
2258
+ return `${co}${c}${lo}${t ? po : ""}`;
2255
2259
  }
2256
- const uo = (e) => e.replaceAll("\\n", `
2257
- `), mo = (e, t) => e.endsWith(".mdx") || e.includes(".stories.") || e.includes(".story.") || e.startsWith(`${t.dir.root}stories/`);
2258
- function fo(e) {
2260
+ const mo = (e) => e.replaceAll("\\n", `
2261
+ `), fo = (e, t) => e.endsWith(".mdx") || e.includes(".stories.") || e.includes(".story.") || e.startsWith(`${t.dir.root}stories/`);
2262
+ function yo(e) {
2259
2263
  return `import("@storybook/web-components").then(({ setCustomElementsManifest }) => {
2260
- setCustomElementsManifest(${yo(e)});
2264
+ setCustomElementsManifest(${ho(e)});
2261
2265
  });`;
2262
2266
  }
2263
- const yo = (e) => `JSON.parse(\`${ho(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
2264
- function ho(e) {
2267
+ const ho = (e) => `JSON.parse(\`${go(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
2268
+ function go(e) {
2265
2269
  return e.replaceAll('\\"', '"').replaceAll("`", "\\`").replaceAll("${", "\\${");
2266
2270
  }
2267
- function go(e) {
2268
- vo(e);
2271
+ function vo(e) {
2272
+ wo(e);
2269
2273
  const t = e.options.css?.globalStylesPath;
2270
2274
  if (t === void 0)
2271
2275
  return "";
@@ -2278,7 +2282,7 @@ function go(e) {
2278
2282
  `) : `import "${n}${xe}";`;
2279
2283
  }
2280
2284
  const ni = "hydrated";
2281
- function vo(e) {
2285
+ function wo(e) {
2282
2286
  e._globalHydratedCssString = [
2283
2287
  ":not([",
2284
2288
  e.options.css?.hydratedAttribute ?? ni,
@@ -2295,15 +2299,15 @@ function ii(e, t) {
2295
2299
  ].join(`
2296
2300
  `);
2297
2301
  }
2298
- const wo = (e) => `${e._globalHydratedCssString}${e.shouldMinify ? "" : `
2302
+ const So = (e) => `${e._globalHydratedCssString}${e.shouldMinify ? "" : `
2299
2303
 
2300
2304
  `}${e._globalCssString ? JSON.parse(`"${e._globalCssString}"`) : ""}`;
2301
- function So(e) {
2305
+ function bo(e) {
2302
2306
  const t = [], n = [];
2303
2307
  for (const s of e.privateApiJson.modules) {
2304
2308
  t.push(s.path);
2305
2309
  for (const r of s.declarations)
2306
- "customElement" in r && n.push(To(r, e, s.path));
2310
+ "customElement" in r && n.push(Eo(r, e, s.path));
2307
2311
  }
2308
2312
  return [
2309
2313
  // Deprecated feature will be dropped in https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2765
@@ -2311,27 +2315,27 @@ function So(e) {
2311
2315
  e.viteCommand === "build" && e.options.build?.ssr?.stencilCompatibility?.enabled === !0 ? 'import "@lit-labs/ssr-client/lit-element-hydrate-support.js";' : "",
2312
2316
  'import { runtime } from "./runtime";',
2313
2317
  'import { makeDefineCustomElements } from "@arcgis/lumina";',
2314
- go(e),
2315
- e.hmrEnabled ? Co : "",
2318
+ vo(e),
2319
+ e.hmrEnabled ? $o : "",
2316
2320
  "",
2317
- e.isInStorybook ? fo(e.apiJson) : "",
2321
+ e.isInStorybook ? yo(e.apiJson) : "",
2318
2322
  "",
2319
2323
  "export const defineCustomElements = makeDefineCustomElements(runtime, {",
2320
2324
  n.join(`,
2321
2325
  `),
2322
2326
  "});",
2323
- e.hmrEnabled ? $o(t) : ""
2327
+ e.hmrEnabled ? xo(t) : ""
2324
2328
  ].join(`
2325
2329
  `);
2326
2330
  }
2327
- const bo = `import "./index";
2328
- export declare const defineCustomElements: import("@arcgis/lumina").DefineCustomElements;`, To = (e, t, n) => [
2331
+ const To = `import "./index";
2332
+ export declare const defineCustomElements: import("@arcgis/lumina").DefineCustomElements;`, Eo = (e, t, n) => [
2329
2333
  ` "${e.tagName}": [`,
2330
2334
  `()=>import("${u.join(t.dir.root, n)}"),`,
2331
- Eo(e),
2335
+ Co(e),
2332
2336
  "]"
2333
2337
  ].join("");
2334
- function Eo(e) {
2338
+ function Co(e) {
2335
2339
  const { properties: t, asyncMethods: n, syncMethods: i } = si(e), s = t.map((p) => p.join(us)).join(Ve), r = n.join(Ve), a = i.join(Ve), c = [s, r, a], l = c.findLastIndex((p) => p.length > 0), d = c.slice(0, l + 1);
2336
2340
  return d.length > 0 ? `"${d.join(ms)}"` : "";
2337
2341
  }
@@ -2348,8 +2352,8 @@ function si(e) {
2348
2352
  ), i = n.filter((r) => r.async === !0).map((r) => r.name), s = n.filter((r) => r.async !== !0).map((r) => r.name);
2349
2353
  return { tagName: e.tagName, properties: t, asyncMethods: i, syncMethods: s };
2350
2354
  }
2351
- const Co = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
2352
- `, $o = (e) => `
2355
+ const $o = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
2356
+ `, xo = (e) => `
2353
2357
  if(import.meta.hot) {
2354
2358
  import.meta.hot.on("component-meta-update", handleComponentMetaUpdate);
2355
2359
  import.meta.hot.accept([
@@ -2358,11 +2362,11 @@ ${e.map((t) => ` "/${t}",`).join(`
2358
2362
  ], handleHmrUpdate);
2359
2363
  }`;
2360
2364
  function lt(e, t) {
2361
- const n = Io(t.getJsDocTags());
2365
+ const n = ko(t.getJsDocTags());
2362
2366
  let i = o.displayPartsToString(t.getDocumentationComment(e));
2363
2367
  i = i.replaceAll(ri, oi);
2364
2368
  {
2365
- const s = n.at(-1), r = s?.text?.indexOf(xo);
2369
+ const s = n.at(-1), r = s?.text?.indexOf(Po);
2366
2370
  r !== void 0 && r !== -1 && (i += s.text.slice(r), s.text = s.text?.slice(0, r));
2367
2371
  }
2368
2372
  return {
@@ -2370,16 +2374,16 @@ function lt(e, t) {
2370
2374
  description: i || void 0
2371
2375
  };
2372
2376
  }
2373
- const xo = `
2377
+ const Po = `
2374
2378
 
2375
- [Read more...]`, Po = "internal", ri = /\{@link(?:code|plain)? ([^}]+)\}/gu;
2379
+ [Read more...]`, Io = "internal", ri = /\{@link(?:code|plain)? ([^}]+)\}/gu;
2376
2380
  function oi(e, t) {
2377
2381
  let n = t.indexOf(" ");
2378
2382
  n === -1 && (n = t.length);
2379
2383
  const i = t.slice(0, n);
2380
2384
  return `[${t.slice(n + 1) || i}](${i})`;
2381
2385
  }
2382
- const Io = (e) => e.map((t) => ({
2386
+ const ko = (e) => e.map((t) => ({
2383
2387
  name: t.name,
2384
2388
  text: t.text?.map((n) => n.text).join("").replaceAll(ri, oi)
2385
2389
  })), tn = ({ modifiers: e = [] }, t) => Y(
@@ -2391,7 +2395,7 @@ function ce(e, t, n, i) {
2391
2395
  if (i ??= s === void 0 ? void 0 : lt(t, s), i !== void 0) {
2392
2396
  for (const r of i.docsTags) {
2393
2397
  const { name: a, text: c } = r;
2394
- a === "deprecated" ? n.deprecated = c || !0 : a === "summary" ? n.summary = c : a === "default" ? n.default = c : a === "readonly" ? n.readonly = !0 : a === "notPublic" ? (console.warn("The @notPublic JSDoc tag is deprecated. Use @internal or @private instead."), n.docsTags ??= [], n.docsTags.push({ name: Po, text: c })) : a === "private" ? n.privacy = "private" : a === "csspart" ? n.cssParts.push(et(c)) : a === "cssstate" ? n.cssStates.push(et(c)) : a === "slot" ? n.slots.push(et(c)) : (n.docsTags ??= [], n.docsTags.push(r));
2398
+ a === "deprecated" ? n.deprecated = c || !0 : a === "summary" ? n.summary = c : a === "default" ? n.default = c : a === "readonly" ? n.readonly = !0 : a === "notPublic" ? (console.warn("The @notPublic JSDoc tag is deprecated. Use @internal or @private instead."), n.docsTags ??= [], n.docsTags.push({ name: Io, text: c })) : a === "private" ? n.privacy = "private" : a === "csspart" ? n.cssParts.push(et(c)) : a === "cssstate" ? n.cssStates.push(et(c)) : a === "slot" ? n.slots.push(et(c)) : (n.docsTags ??= [], n.docsTags.push(r));
2395
2399
  }
2396
2400
  n.description = i.description;
2397
2401
  }
@@ -2414,15 +2418,15 @@ function et(e) {
2414
2418
  description: s
2415
2419
  };
2416
2420
  }
2417
- const ko = "@arcgis/lumina:addMethodMetadata";
2418
- function Ao(e, t, n, i, s) {
2421
+ const Ao = "@arcgis/lumina:addMethodMetadata";
2422
+ function Lo(e, t, n, i, s) {
2419
2423
  const r = n.getSignatureFromDeclaration(e);
2420
2424
  if (r === void 0)
2421
2425
  return;
2422
2426
  for (const d of e.parameters) {
2423
2427
  if (!o.isIdentifier(d.name)) {
2424
2428
  console.warn(
2425
- `${ko}: Object binding patterns are not yet supported in the docs. Found ${d.name?.getText(i)} in ${e.name.getText(i)} in ${A(i.fileName)}`
2429
+ `${Ao}: Object binding patterns are not yet supported in the docs. Found ${d.name?.getText(i)} in ${e.name.getText(i)} in ${A(i.fileName)}`
2426
2430
  );
2427
2431
  return;
2428
2432
  }
@@ -2441,8 +2445,8 @@ function Ao(e, t, n, i, s) {
2441
2445
  type: c
2442
2446
  }, t.signature = l.replace(" =>", ":");
2443
2447
  }
2444
- const Lo = (e) => e.modifiers?.some?.((t) => t.kind === o.SyntaxKind.AsyncKeyword) ?? !1;
2445
- function Fo(e, t, n, i) {
2448
+ const Fo = (e) => e.modifiers?.some?.((t) => t.kind === o.SyntaxKind.AsyncKeyword) ?? !1;
2449
+ function No(e, t, n, i) {
2446
2450
  const s = n.typeScriptTypeChecker, a = s.getTypeAtLocation(e).getProperty("emit");
2447
2451
  if (a?.valueDeclaration === void 0)
2448
2452
  return;
@@ -2467,11 +2471,11 @@ function Fo(e, t, n, i) {
2467
2471
  composed: void 0,
2468
2472
  privacy: void 0
2469
2473
  };
2470
- return ce(e.name, s, y), No(e, y, i), y.privacy === void 0 ? y : void 0;
2474
+ return ce(e.name, s, y), jo(e, y, i), y.privacy === void 0 ? y : void 0;
2471
2475
  }
2472
2476
  }
2473
2477
  const be = "createEvent";
2474
- function No(e, t, n) {
2478
+ function jo(e, t, n) {
2475
2479
  if (!e.initializer || !o.isCallExpression(e.initializer))
2476
2480
  return;
2477
2481
  const i = e.initializer;
@@ -2499,7 +2503,7 @@ function Q(e, t) {
2499
2503
  throw new Error(`Expected boolean literal. Instead found ${e?.getText(t)}`);
2500
2504
  }
2501
2505
  const Et = "@arcgis/lumina-compiler";
2502
- class jo extends ts {
2506
+ class Do extends ts {
2503
2507
  constructor(t, n) {
2504
2508
  super({ isFullApiExtraction: t.isFullApiExtraction, cwd: t.dir.root }), this.context = t, this.isPathOnly = n, this.localCssImports = void 0, this.localDeclaredComponents = void 0, this.indexedComponents = /* @__PURE__ */ new Map(), this.apiComponent = void 0, this.pairedSetter = void 0, this._resolvedInheritance = /* @__PURE__ */ new Map();
2505
2509
  }
@@ -2511,7 +2515,7 @@ class jo extends ts {
2511
2515
  const n = super.extractModules(t);
2512
2516
  for (const i of n)
2513
2517
  for (const s of i.declarations)
2514
- "customElement" in s && (this.context.isFullApiExtraction && Mo(s, this.context, this.indexedComponents), this.inheritMembers(s, n), this.context.isFullApiExtraction && (s.members.sort(tt), s.attributes?.sort(tt), s.events?.sort(tt)));
2518
+ "customElement" in s && (this.context.isFullApiExtraction && Oo(s, this.context, this.indexedComponents), this.inheritMembers(s, n), this.context.isFullApiExtraction && (s.members.sort(tt), s.attributes?.sort(tt), s.events?.sort(tt)));
2515
2519
  return n;
2516
2520
  }
2517
2521
  extractDeclarations(t) {
@@ -2688,13 +2692,13 @@ ${c}.componentOnReady().then(() => {
2688
2692
  inheritedFrom: void 0,
2689
2693
  privacy: void 0
2690
2694
  };
2691
- return this.context.isFullApiExtraction && (this.extractComponentFieldDetails(t, l), (r === void 0 && (l.type.values === void 0 || !Mr(l.type.values)) || l.readonly && !l.reflects) && (l.attribute = void 0)), l;
2695
+ return this.context.isFullApiExtraction && (this.extractComponentFieldDetails(t, l), (r === void 0 && (l.type.values === void 0 || !Or(l.type.values)) || l.readonly && !l.reflects) && (l.attribute = void 0)), l;
2692
2696
  }
2693
2697
  /**
2694
2698
  * Based on a `non-@property()` property, extract a public event if it is one.
2695
2699
  */
2696
2700
  extractComponentEvent(t, n) {
2697
- return Fo(t, n, this.context, this.file);
2701
+ return No(t, n, this.context, this.file);
2698
2702
  }
2699
2703
  /**
2700
2704
  * When doing full API extraction, extract additional details for a field.
@@ -2706,7 +2710,7 @@ ${c}.componentOnReady().then(() => {
2706
2710
  const d = this.pairedSetter ?? t, p = n.default;
2707
2711
  Nt(t, n, this.file);
2708
2712
  const m = p === void 0 && n.default === "true", f = n.docsTags?.some((v) => v.name === "required") ?? !1;
2709
- n.type = Kr(this.context, d, f, this.file);
2713
+ n.type = Br(this.context, d, f, this.file);
2710
2714
  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);
2711
2715
  if ("initializer" in t && t.initializer !== void 0 && (!n.default || !n.description) || y) {
2712
2716
  const v = t.initializer, g = s.getSymbolAtLocation(v), S = g !== void 0 && (g.flags ?? 0) & o.SymbolFlags.Alias ? s.getAliasedSymbol(g) : g, b = S?.getDeclarations() ?? [];
@@ -2759,12 +2763,12 @@ ${c}.componentOnReady().then(() => {
2759
2763
  inheritedFrom: void 0,
2760
2764
  docsTags: void 0,
2761
2765
  signature: "",
2762
- async: Lo(t) ? !0 : void 0,
2766
+ async: Fo(t) ? !0 : void 0,
2763
2767
  privacy: void 0
2764
2768
  };
2765
2769
  if (this.context.isFullApiExtraction) {
2766
2770
  const s = this.context.typeScriptTypeChecker;
2767
- Ao(t, i, s, this.file, this.context.dir);
2771
+ Lo(t, i, s, this.file, this.context.dir);
2768
2772
  }
2769
2773
  return i;
2770
2774
  }
@@ -2859,16 +2863,16 @@ const ie = {
2859
2863
  name: "LitElement",
2860
2864
  package: "@arcgis/lumina"
2861
2865
  }, tt = (e, t) => e.name.localeCompare(t.name);
2862
- async function Do(e, t) {
2866
+ async function Ro(e, t) {
2863
2867
  t || (e.componentFilesPromise = Tt(e, e.dir.srcComponents));
2864
- const n = await e.componentFilesPromise, i = await Ho(e, n);
2868
+ const n = await e.componentFilesPromise, i = await Uo(e, n);
2865
2869
  e._componentPathMapping = {}, e._localDefinedComponents = void 0;
2866
2870
  const s = ai(i, e, !1);
2867
2871
  e.privateApiJson = s;
2868
2872
  const [r, a] = ci(s);
2869
2873
  return e.apiJsonComponents = a, e.apiJson = r, s;
2870
2874
  }
2871
- function Ro(e, t, n) {
2875
+ function Mo(e, t, n) {
2872
2876
  const i = e.getSourceFile(t, n), s = ai([i], e, !0), r = s.modules[0];
2873
2877
  {
2874
2878
  const f = ci(s)[0].modules[0], y = e.apiJson.modules.findIndex((g) => g.path === f.path), h = e.apiJson.modules[y], v = Array.from(e.apiJson.modules);
@@ -2894,7 +2898,7 @@ function Ro(e, t, n) {
2894
2898
  return d ||= m.length !== p.length, d ? void 0 : m;
2895
2899
  }
2896
2900
  function ai(e, t, n) {
2897
- const i = t.options.apiJson?.Extractor ?? jo, r = new i(t, n).extract(e);
2901
+ const i = t.options.apiJson?.Extractor ?? Do, r = new i(t, n).extract(e);
2898
2902
  return t.options.apiJson?.afterCreate?.(r, n), r;
2899
2903
  }
2900
2904
  function ci(e) {
@@ -2913,7 +2917,7 @@ function ci(e) {
2913
2917
  }
2914
2918
  return [t, n];
2915
2919
  }
2916
- function Mo(e, t, n) {
2920
+ function Oo(e, t, n) {
2917
2921
  e.members.forEach((i) => {
2918
2922
  if (i.kind === "field")
2919
2923
  Te(i.type, n, t);
@@ -2926,14 +2930,14 @@ function Mo(e, t, n) {
2926
2930
  }
2927
2931
  function Te(e, t, n) {
2928
2932
  e !== void 0 && (e.references?.reduce(
2929
- (i, s) => Oo(s, t, n, i),
2933
+ (i, s) => Jo(s, t, n, i),
2930
2934
  0
2931
2935
  ), e.text = e.text.replaceAll(
2932
- _o,
2936
+ Ho,
2933
2937
  (i, s) => Ct(t.get(s)) ?? i
2934
- ), e.values?.forEach(Jo, t));
2938
+ ), e.values?.forEach(Ko, t));
2935
2939
  }
2936
- function Oo(e, t, n, i) {
2940
+ function Jo(e, t, n, i) {
2937
2941
  if (i > 0 && (e.start !== void 0 && (e.start += i), e.end !== void 0 && (e.end += i)), e.package !== void 0)
2938
2942
  return i;
2939
2943
  if (e.module?.startsWith("dist/components/") === !0)
@@ -2944,16 +2948,16 @@ function Oo(e, t, n, i) {
2944
2948
  const r = e.name.length;
2945
2949
  e.name = Ct(s);
2946
2950
  const a = e.name.length - r - nn;
2947
- e.viewUrl = s.demos?.at(0)?.url, e.start = e.start - nn, e.end = e.end + a, i += a - Wo;
2951
+ e.viewUrl = s.demos?.at(0)?.url, e.start = e.start - nn, e.end = e.end + a, i += a - _o;
2948
2952
  }
2949
2953
  }
2950
2954
  return i;
2951
2955
  }
2952
- function Jo(e) {
2956
+ function Ko(e) {
2953
2957
  e.type.startsWith("ToElement<") && (e.type = Ct(this.get(e.type.slice(10, -1))) ?? e.type);
2954
2958
  }
2955
- const Ct = (e) => e ? `HTML${e.pascalCaseName}Element` : void 0, Ko = "ToElement<", nn = Ko.length, Bo = ">", Wo = Bo.length, _o = /ToElement<(\w+)>/gu;
2956
- async function Ho(e, t) {
2959
+ const Ct = (e) => e ? `HTML${e.pascalCaseName}Element` : void 0, Bo = "ToElement<", nn = Bo.length, Wo = ">", _o = Wo.length, Ho = /ToElement<(\w+)>/gu;
2960
+ async function Uo(e, t) {
2957
2961
  if (e.viteCommand === "serve" && (Object.hasOwn(e, "typeScriptHost") || (e.typeScriptHost = o.createCompilerHost(e.typeScriptConfig, !1))), e.typeScriptProgram !== void 0) {
2958
2962
  const n = e.typeScriptProgram.getSourceFiles(), i = new Set(t);
2959
2963
  return n.filter((s) => i.has(s.fileName));
@@ -2966,9 +2970,9 @@ async function Ho(e, t) {
2966
2970
  );
2967
2971
  }
2968
2972
  async function li(e) {
2969
- return ue ??= zo(e), await ue;
2973
+ return ue ??= qo(e), await ue;
2970
2974
  }
2971
- function Uo() {
2975
+ function zo() {
2972
2976
  if (dt === void 0)
2973
2977
  throw new Error(
2974
2978
  "Component dependencies have not yet been initialized. Await componentDependenciesPromise promise first."
@@ -2982,13 +2986,13 @@ function di() {
2982
2986
  );
2983
2987
  return pt;
2984
2988
  }
2985
- async function zo(e) {
2989
+ async function qo(e) {
2986
2990
  const t = R(e), n = t.dependencies ?? {}, i = t.peerDependencies ?? {}, r = (await Promise.all(
2987
- [...Object.keys(n), ...Object.keys(i)].filter((a) => !qo.has(a)).flatMap(async (a) => await pi(a, e))
2991
+ [...Object.keys(n), ...Object.keys(i)].filter((a) => !Go.has(a)).flatMap(async (a) => await pi(a, e))
2988
2992
  )).filter(N);
2989
2993
  return dt ??= r, pt = Object.fromEntries(r.flatMap((a) => Object.entries(a.components))), r;
2990
2994
  }
2991
- const qo = /* @__PURE__ */ new Set([
2995
+ const Go = /* @__PURE__ */ new Set([
2992
2996
  "@arcgis/arcade-languageservice",
2993
2997
  "@arcgis/components-build-utils",
2994
2998
  "@arcgis/components-utils",
@@ -3026,11 +3030,11 @@ const qo = /* @__PURE__ */ new Set([
3026
3030
  ]);
3027
3031
  let dt, pt, ue;
3028
3032
  async function pi(e, t) {
3029
- const n = await Me(e, t), i = await Oe(n), s = "exports" in i, r = Zo.bind(void 0, s), a = "@stencil/core" in (i.dependencies ?? {}) || "@stencil/core" in (i.devDependencies ?? {}), c = u.join(n, "dist/esm/loader.js");
3033
+ const n = await Me(e, t), i = await Oe(n), s = "exports" in i, r = ea.bind(void 0, s), a = "@stencil/core" in (i.dependencies ?? {}) || "@stencil/core" in (i.devDependencies ?? {}), c = u.join(n, "dist/esm/loader.js");
3030
3034
  if (a ? await W(c) : !1) {
3031
- const y = await D(c, "utf8"), h = Go(y, "bootstrapLazy("), v = y.indexOf(", options", h), g = y.slice(h, v), S = g.startsWith('JSON.parse("') ? g.slice(12, -2).replaceAll('\\"', '"') : g;
3035
+ const y = await D(c, "utf8"), h = Vo(y, "bootstrapLazy("), v = y.indexOf(", options", h), g = y.slice(h, v), S = g.startsWith('JSON.parse("') ? g.slice(12, -2).replaceAll('\\"', '"') : g;
3032
3036
  try {
3033
- const b = JSON.parse(S), E = Qo(b, { packageName: e, getImportPath: r });
3037
+ const b = JSON.parse(S), E = Yo(b, { packageName: e, getImportPath: r });
3034
3038
  return { packageName: e, type: "stencil", components: E };
3035
3039
  } catch (b) {
3036
3040
  console.warn(`@arcgis/lumina: Failed to parse dist/esm/loader.js for ${e}.
@@ -3039,7 +3043,7 @@ Error: ${String(b)}`);
3039
3043
  }
3040
3044
  const d = sn(i.customElements);
3041
3045
  if (d != null) {
3042
- const y = u.join(n, d), h = JSON.parse(await D(y, "utf-8")), v = Vo(h), g = ui(h, {
3046
+ const y = u.join(n, d), h = JSON.parse(await D(y, "utf-8")), v = Xo(h), g = ui(h, {
3043
3047
  packageName: e,
3044
3048
  getImportPath: r
3045
3049
  });
@@ -3047,7 +3051,7 @@ Error: ${String(b)}`);
3047
3051
  }
3048
3052
  const p = sn(i["web-types"]);
3049
3053
  if (p != null) {
3050
- const y = u.join(n, p), h = JSON.parse(await D(y, "utf-8")), v = Xo(h, {
3054
+ const y = u.join(n, p), h = JSON.parse(await D(y, "utf-8")), v = Qo(h, {
3051
3055
  packageName: e,
3052
3056
  getImportPath: r,
3053
3057
  packageRoot: n
@@ -3056,7 +3060,7 @@ Error: ${String(b)}`);
3056
3060
  }
3057
3061
  const m = u.join(n, "dist/components");
3058
3062
  if (await W(m)) {
3059
- const y = await Yo(m, {
3063
+ const y = await Zo(m, {
3060
3064
  packageName: e,
3061
3065
  getImportPath: r
3062
3066
  });
@@ -3064,7 +3068,7 @@ Error: ${String(b)}`);
3064
3068
  }
3065
3069
  }
3066
3070
  const sn = (e) => Array.isArray(e) ? e[0] : e;
3067
- function Go(e, t) {
3071
+ function Vo(e, t) {
3068
3072
  const n = e.indexOf(t);
3069
3073
  return n === -1 ? -1 : n + t.length;
3070
3074
  }
@@ -3086,7 +3090,7 @@ function ui(e, t) {
3086
3090
  }
3087
3091
  return n;
3088
3092
  }
3089
- const Vo = (e) => e.compiler?.name === Et, Xo = (e, t) => Object.fromEntries(
3093
+ const Xo = (e) => e.compiler?.name === Et, Qo = (e, t) => Object.fromEntries(
3090
3094
  (e.contributions?.html?.elements ?? e.contributions?.html?.tags)?.map(
3091
3095
  (n) => [
3092
3096
  n.name,
@@ -3097,7 +3101,7 @@ const Vo = (e) => e.compiler?.name === Et, Xo = (e, t) => Object.fromEntries(
3097
3101
  }
3098
3102
  ]
3099
3103
  ) ?? []
3100
- ), Qo = (e, t) => Object.fromEntries(
3104
+ ), Yo = (e, t) => Object.fromEntries(
3101
3105
  e.flatMap(
3102
3106
  ([n, i]) => i.map(
3103
3107
  ([s, r, a]) => [
@@ -3115,7 +3119,7 @@ const Vo = (e) => e.compiler?.name === Et, Xo = (e, t) => Object.fromEntries(
3115
3119
  ]
3116
3120
  )
3117
3121
  )
3118
- ), Yo = async (e, t) => Object.fromEntries(
3122
+ ), Zo = async (e, t) => Object.fromEntries(
3119
3123
  (await Je(e)).filter((n) => n.endsWith(".d.ts")).map((n) => {
3120
3124
  const i = n.slice(0, -5);
3121
3125
  return [
@@ -3127,12 +3131,12 @@ const Vo = (e) => e.compiler?.name === Et, Xo = (e, t) => Object.fromEntries(
3127
3131
  }
3128
3132
  ];
3129
3133
  })
3130
- ), Zo = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, ea = (e) => e.startsWith("/") ? e : `/${e}`, $t = (e, t) => `${e}@fs${ea(t)}`;
3134
+ ), ea = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, ta = (e) => e.startsWith("/") ? e : `/${e}`, $t = (e, t) => `${e}@fs${ta(t)}`;
3131
3135
  function We(e = R(), t = !1, n = e.name === "@esri/calcite-components") {
3132
3136
  const i = e.version.includes("next");
3133
3137
  if (e.name === "@esri/calcite-components" && i)
3134
3138
  return `https://cdn.jsdelivr.net/npm/@esri/calcite-components@${e.version}/dist/calcite/`;
3135
- const s = t || i ? "jsdev.arcgis.com" : "js.arcgis.com", r = ta(e.name), a = na(e.version, n);
3139
+ const s = t || i ? "jsdev.arcgis.com" : "js.arcgis.com", r = na(e.name), a = ia(e.version, n);
3136
3140
  return [
3137
3141
  "https://",
3138
3142
  s,
@@ -3143,8 +3147,8 @@ function We(e = R(), t = !1, n = e.name === "@esri/calcite-components") {
3143
3147
  "/"
3144
3148
  ].join("");
3145
3149
  }
3146
- const ta = (e) => e.split("/").pop() ?? e;
3147
- function na(e, t) {
3150
+ const na = (e) => e.split("/").pop() ?? e;
3151
+ function ia(e, t) {
3148
3152
  if (/\d+\.\d+\.\d+-(?:.*)$/u.test(e))
3149
3153
  return "next";
3150
3154
  const i = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)/u, s = e.match(i);
@@ -3154,8 +3158,8 @@ function na(e, t) {
3154
3158
  }
3155
3159
  return "next";
3156
3160
  }
3157
- async function ia(e, t, n, i) {
3158
- const s = t.packageName, r = await Me(s), a = await Oe(r), c = sa(a);
3161
+ async function sa(e, t, n, i) {
3162
+ const s = t.packageName, r = await Me(s), a = await Oe(r), c = ra(a);
3159
3163
  if (c === void 0)
3160
3164
  throw new Error(`Failed to infer the CDN namespace name for the ${s}`);
3161
3165
  const [l, d] = c, p = d.slice(0, -4);
@@ -3182,7 +3186,7 @@ async function ia(e, t, n, i) {
3182
3186
  ]
3183
3187
  };
3184
3188
  }
3185
- function sa(e) {
3189
+ function ra(e) {
3186
3190
  const n = Object.values(e.exports ?? {}).find(
3187
3191
  (c) => typeof c == "string" && c.endsWith(".css") && c.split("/").length === 4
3188
3192
  );
@@ -3191,7 +3195,7 @@ function sa(e) {
3191
3195
  const [i, s, r, a] = n.split("/");
3192
3196
  return [r, a];
3193
3197
  }
3194
- const ra = ["keyed", "ref", "repeat", "live"], te = "staticHtml", G = "staticSvg", ne = "html", Z = "svg", mi = Symbol("maybe HTML namespace or maybe SVG"), fi = "css", yi = "mathml", hi = [fi, ne, yi, te, G, Z], oa = new Set(hi), aa = ["safeClassMap", "safeStyleMap", "deferLoad"], ca = "nothing", la = [...ra, ...hi, ...aa, ca], Ne = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e);
3198
+ const oa = ["keyed", "ref", "repeat", "live"], te = "staticHtml", G = "staticSvg", ne = "html", Z = "svg", mi = Symbol("maybe HTML namespace or maybe SVG"), fi = "css", yi = "mathml", hi = [fi, ne, yi, te, G, Z], aa = new Set(hi), ca = ["safeClassMap", "safeStyleMap", "deferLoad"], la = "nothing", da = [...oa, ...hi, ...ca, la], Ne = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e);
3195
3199
  function rn(e, t, n) {
3196
3200
  if (V(e))
3197
3201
  return e;
@@ -3211,14 +3215,14 @@ function V(e) {
3211
3215
  return (
3212
3216
  // Inlined string literal
3213
3217
  typeof e == "string" || // Syntax kinds that are never undefined
3214
- da.has(e.kind) || // Ternary with both branches never undefined
3218
+ pa.has(e.kind) || // Ternary with both branches never undefined
3215
3219
  o.isConditionalExpression(e) && V(e.whenTrue) && V(e.whenFalse) || // Binary expression with operator that never results in undefined Or both sides are definitely not undefined
3216
- o.isBinaryExpression(e) && (pa.has(e.operatorToken.kind) || V(e.left) && V(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3220
+ o.isBinaryExpression(e) && (ua.has(e.operatorToken.kind) || V(e.left) && V(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3217
3221
  (o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && V(e.expression) || // JSX that got converted to html`<p>Something</p>`
3218
- o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && oa.has(e.tag.text)
3222
+ o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && aa.has(e.tag.text)
3219
3223
  );
3220
3224
  }
3221
- const da = /* @__PURE__ */ new Set([
3225
+ const pa = /* @__PURE__ */ new Set([
3222
3226
  o.SyntaxKind.NumericLiteral,
3223
3227
  o.SyntaxKind.BigIntLiteral,
3224
3228
  o.SyntaxKind.StringLiteral,
@@ -3237,7 +3241,7 @@ const da = /* @__PURE__ */ new Set([
3237
3241
  o.SyntaxKind.ClassExpression,
3238
3242
  // Trust? Trust.
3239
3243
  o.SyntaxKind.NonNullExpression
3240
- ]), pa = /* @__PURE__ */ new Set([
3244
+ ]), ua = /* @__PURE__ */ new Set([
3241
3245
  o.SyntaxKind.PlusEqualsToken,
3242
3246
  o.SyntaxKind.MinusEqualsToken,
3243
3247
  o.SyntaxKind.AsteriskAsteriskEqualsToken,
@@ -3272,9 +3276,9 @@ const da = /* @__PURE__ */ new Set([
3272
3276
  o.SyntaxKind.SlashToken,
3273
3277
  o.SyntaxKind.PercentToken,
3274
3278
  o.SyntaxKind.AsteriskAsteriskToken
3275
- ]), ua = {
3279
+ ]), ma = {
3276
3280
  property(e, t, n, i) {
3277
- const s = ma(i, n, e), r = s?.type === "stringifiedReflected", a = s?.type === "reflected" || r;
3281
+ const s = fa(i, n, e), r = s?.type === "stringifiedReflected", a = s?.type === "reflected" || r;
3278
3282
  if (a) {
3279
3283
  const f = it(t);
3280
3284
  if (f === !0)
@@ -3291,7 +3295,7 @@ const da = /* @__PURE__ */ new Set([
3291
3295
  p,
3292
3296
  e,
3293
3297
  m ? "" : void 0
3294
- ), h = n === "value" && (i === "input" || i === "textarea" || i === Ae) ? ya(f, e) : f;
3298
+ ), h = n === "value" && (i === "input" || i === "textarea" || i === Ae) ? ha(f, e) : f;
3295
3299
  if (h !== p)
3296
3300
  return [m ? `.${n}` : s.name, d, h];
3297
3301
  }
@@ -3361,7 +3365,7 @@ const da = /* @__PURE__ */ new Set([
3361
3365
  return [o.factory.createIdentifier(s)];
3362
3366
  }
3363
3367
  };
3364
- function ma(e, t, n) {
3368
+ function fa(e, t, n) {
3365
3369
  if (typeof e == "string") {
3366
3370
  const r = (n.externalComponents[e] ?? n.localComponents[e])?.propToAttribute?.[t];
3367
3371
  if (r !== void 0)
@@ -3436,7 +3440,7 @@ function on(e, t) {
3436
3440
  if (n.length === 0)
3437
3441
  return [];
3438
3442
  const i = Un(n);
3439
- if (lr(i)) {
3443
+ if (ur(i)) {
3440
3444
  const s = i.replaceAll('"', "&#34;");
3441
3445
  if (s.length > i.length) {
3442
3446
  const r = i.replaceAll("'", "&#39;");
@@ -3455,7 +3459,7 @@ function an(e, t, n) {
3455
3459
  `${n} prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3456
3460
  );
3457
3461
  const i = t.expression;
3458
- if (fa(i)) {
3462
+ if (ya(i)) {
3459
3463
  const r = n === "class" ? "safeClassMap" : "safeStyleMap";
3460
3464
  e.neededImports.add(r);
3461
3465
  const a = e.importRenames[r], c = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
@@ -3465,15 +3469,15 @@ function an(e, t, n) {
3465
3469
  } else
3466
3470
  return [n, ...Pe(e, t, !0)];
3467
3471
  }
3468
- const fa = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3469
- function ya(e, t) {
3472
+ const ya = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3473
+ function ha(e, t) {
3470
3474
  t.neededImports.add("live");
3471
3475
  const n = t.importRenames.live;
3472
3476
  return o.factory.createCallExpression(o.factory.createIdentifier(n), void 0, [
3473
3477
  typeof e == "string" ? o.factory.createStringLiteral(e) : e
3474
3478
  ]);
3475
3479
  }
3476
- function ha(e) {
3480
+ function ga(e) {
3477
3481
  if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in cn && e.expression.arguments.length <= 1)
3478
3482
  return {
3479
3483
  propType: cn[e.expression.expression.text],
@@ -3491,15 +3495,15 @@ const cn = {
3491
3495
  bindBooleanAttribute: "booleanAttribute",
3492
3496
  bindEvent: "event"
3493
3497
  };
3494
- function ga(e, t, n) {
3495
- return wa.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : (Kn.has(e) || e.includes("-")) && (e !== "itemId" || n !== "arcgis-map" && n !== "arcgis-scene") ? "attribute" : !vt(n) && (Bn.has(e) || (n === at ? !1 : n === Ae ? (
3498
+ function va(e, t, n) {
3499
+ return Sa.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : (Kn.has(e) || e.includes("-")) && (e !== "itemId" || n !== "arcgis-map" && n !== "arcgis-scene") ? "attribute" : !vt(n) && (Bn.has(e) || (n === at ? !1 : n === Ae ? (
3496
3500
  // When tag name is dynamic, we can't help but check if the prop name matches an "always attribute" in any html element
3497
3501
  Object.values(ct).some((r) => r.has(e))
3498
3502
  ) : ct[n]?.has(e) === !0)) ? Ot.has(e) ? "booleanAttribute" : "attribute" : n === "svg" || n === "math" || n === at || n !== Ae && (ht.has(n) || gt.has(n)) ? e in J.common.reflected || e in J.common.stringifiedReflected || e in J.common.stringifiedNonReflected ? "property" : Ot.has(e) ? "booleanAttribute" : "attribute" : "property";
3499
3503
  }
3500
- const va = ["class", "style", "ref", "directives", "key", "deferLoad"], wa = new Set(va), Sa = (e) => typeof e != "string" || e.trim().length > 0;
3504
+ const wa = ["class", "style", "ref", "directives", "key", "deferLoad"], Sa = new Set(wa), ba = (e) => typeof e != "string" || e.trim().length > 0;
3501
3505
  function _e({ key: e, parts: t, litTag: n }, i) {
3502
- const s = ba(t);
3506
+ const s = Ta(t);
3503
3507
  if (s.length % 2 === 0)
3504
3508
  throw new Error("Normalized template parts array length must be odd");
3505
3509
  const [r, ...a] = s;
@@ -3522,12 +3526,12 @@ function _e({ key: e, parts: t, litTag: n }, i) {
3522
3526
  void 0,
3523
3527
  a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(d, d) : o.factory.createTemplateExpression(
3524
3528
  o.factory.createTemplateHead(d, d),
3525
- Ta(a)
3529
+ Ea(a)
3526
3530
  )
3527
3531
  );
3528
3532
  return st(i, e, p);
3529
3533
  }
3530
- const ba = (e) => e.reduce(
3534
+ const Ta = (e) => e.reduce(
3531
3535
  (t, n, i) => {
3532
3536
  const s = t.at(-1), r = typeof s == "string", a = typeof n == "string";
3533
3537
  if (r && a)
@@ -3537,7 +3541,7 @@ const ba = (e) => e.reduce(
3537
3541
  },
3538
3542
  [""]
3539
3543
  );
3540
- function Ta(e) {
3544
+ function Ea(e) {
3541
3545
  if (!(e.length % 2 === 0))
3542
3546
  throw new Error("templatePartsToSpans should be called with normalized parts array without the first item");
3543
3547
  const n = e.length / 2;
@@ -3569,7 +3573,7 @@ function st(e, t, n) {
3569
3573
  const i = e.importRenames.keyed;
3570
3574
  return o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [t, n]);
3571
3575
  }
3572
- function Ea(e, t) {
3576
+ function Ca(e, t) {
3573
3577
  if (!(o.isPropertyAccessExpression(t.expression) && t.expression.name.text === "map"))
3574
3578
  return t;
3575
3579
  const i = t.arguments[0];
@@ -3603,7 +3607,7 @@ function Ea(e, t) {
3603
3607
  const f = p.attributes.properties[m];
3604
3608
  if (f === void 0 || !o.isJsxAttribute(f))
3605
3609
  return t;
3606
- const y = xt(f.initializer, e.sourceFile), h = Ca(r, i, y, l, e);
3610
+ const y = xt(f.initializer, e.sourceFile), h = $a(r, i, y, l, e);
3607
3611
  if (h === void 0)
3608
3612
  return t;
3609
3613
  e.liftedKeys.add(f.name), e.neededImports.add("repeat");
@@ -3636,7 +3640,7 @@ function gi(e) {
3636
3640
  void 0
3637
3641
  ), t;
3638
3642
  }
3639
- function Ca(e, t, n, i, s) {
3643
+ function $a(e, t, n, i, s) {
3640
3644
  const r = O(n);
3641
3645
  if (r === void 0)
3642
3646
  return;
@@ -3650,7 +3654,7 @@ function Ca(e, t, n, i, s) {
3650
3654
  return;
3651
3655
  }
3652
3656
  if (!i) {
3653
- const l = xa(r, a, t);
3657
+ const l = Pa(r, a, t);
3654
3658
  if (l === void 0)
3655
3659
  return;
3656
3660
  a = l;
@@ -3680,7 +3684,7 @@ function O(e) {
3680
3684
  const t = O(e.left), n = O(e.right);
3681
3685
  return t === void 0 || n === void 0 ? void 0 : [...t, ...n];
3682
3686
  } else {
3683
- if ($a.has(e.kind))
3687
+ if (xa.has(e.kind))
3684
3688
  return [];
3685
3689
  {
3686
3690
  const t = me(e);
@@ -3688,7 +3692,7 @@ function O(e) {
3688
3692
  }
3689
3693
  }
3690
3694
  }
3691
- const $a = /* @__PURE__ */ new Set([
3695
+ const xa = /* @__PURE__ */ new Set([
3692
3696
  o.SyntaxKind.NumericLiteral,
3693
3697
  o.SyntaxKind.BigIntLiteral,
3694
3698
  o.SyntaxKind.StringLiteral,
@@ -3697,12 +3701,12 @@ const $a = /* @__PURE__ */ new Set([
3697
3701
  o.SyntaxKind.FalseKeyword,
3698
3702
  o.SyntaxKind.NullKeyword,
3699
3703
  o.SyntaxKind.TrueKeyword
3700
- ]), me = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? me(e.expression) : e, vi = (e, t) => o.isObjectBindingPattern(e) ? ka(e, t) : e;
3701
- function xa(e, t, n) {
3704
+ ]), me = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? me(e.expression) : e, vi = (e, t) => o.isObjectBindingPattern(e) ? Aa(e, t) : e;
3705
+ function Pa(e, t, n) {
3702
3706
  if (e.every(je, t))
3703
3707
  return t;
3704
3708
  if (o.isIdentifier(t)) {
3705
- const i = o.isBlock(n.body) ? Y(n.body.statements, (r) => Pa(r, t)) : void 0;
3709
+ const i = o.isBlock(n.body) ? Y(n.body.statements, (r) => Ia(r, t)) : void 0;
3706
3710
  if (i === void 0)
3707
3711
  return;
3708
3712
  const s = vi(i, e);
@@ -3710,7 +3714,7 @@ function xa(e, t, n) {
3710
3714
  return s;
3711
3715
  }
3712
3716
  }
3713
- function Pa(e, t) {
3717
+ function Ia(e, t) {
3714
3718
  if (!o.isVariableStatement(e) || !(e.declarationList.flags & o.NodeFlags.Const))
3715
3719
  return;
3716
3720
  const n = e.declarationList.declarations[0];
@@ -3718,19 +3722,19 @@ function Pa(e, t) {
3718
3722
  }
3719
3723
  function je(e) {
3720
3724
  const t = this;
3721
- return o.isIdentifier(t) ? t.text === e : t.elements.some(Ia, e);
3725
+ return o.isIdentifier(t) ? t.text === e : t.elements.some(ka, e);
3722
3726
  }
3723
- function Ia(e) {
3727
+ function ka(e) {
3724
3728
  const t = this;
3725
3729
  return o.isOmittedExpression(e) ? !1 : je.call(e.name, t);
3726
3730
  }
3727
- function ka(e, t) {
3731
+ function Aa(e, t) {
3728
3732
  let n = !1;
3729
3733
  const i = e.elements.filter((s) => o.isIdentifier(s.name) ? t.includes(s.name.text) : (n = !0, !0));
3730
3734
  return n || i.length === 0 ? e : o.factory.updateObjectBindingPattern(e, i);
3731
3735
  }
3732
- const wi = (e, t) => t.liftedKeys.has(e), Aa = (e) => e.apiJsonComponents.map(({ name: t, importPath: n }) => `import type { ${t} } from "./${n}";`).join(`
3733
- `), La = /^[a-zA-Z_$][a-zA-Z\d_$]*$/u, He = (e) => !La.test(e), he = (e) => He(e) ? `"${e}"` : e;
3736
+ const wi = (e, t) => t.liftedKeys.has(e), La = (e) => e.apiJsonComponents.map(({ name: t, importPath: n }) => `import type { ${t} } from "./${n}";`).join(`
3737
+ `), Fa = /^[a-zA-Z_$][a-zA-Z\d_$]*$/u, He = (e) => !Fa.test(e), he = (e) => He(e) ? `"${e}"` : e;
3734
3738
  function Ue(e, t) {
3735
3739
  const n = [], i = [];
3736
3740
  let s = !1;
@@ -3756,13 +3760,13 @@ const dn = (e) => e.map((t) => `'${t}'`).join(" | ");
3756
3760
  function H(e, t, n) {
3757
3761
  if (Ne(n))
3758
3762
  return Si(e, n);
3759
- const i = o.isCallExpression(n) ? Ea(e, n) : n, s = o.visitEachChild(
3763
+ const i = o.isCallExpression(n) ? Ca(e, n) : n, s = o.visitEachChild(
3760
3764
  i,
3761
3765
  // Do not add "" if parent is binary expression to not turn {(a && <b />) || c} into {(a && <b />) || "" || c}
3762
3766
  H.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : n),
3763
3767
  e.transformationContext
3764
3768
  );
3765
- return t !== void 0 && o.isBinaryExpression(n) && (o.isJsxExpression(t) || Ne(me(n.right))) ? ja(s) : s;
3769
+ return t !== void 0 && o.isBinaryExpression(n) && (o.isJsxExpression(t) || Ne(me(n.right))) ? Da(s) : s;
3766
3770
  }
3767
3771
  function Si(e, t) {
3768
3772
  const n = bi(e, t);
@@ -3780,19 +3784,19 @@ function bi(e, t) {
3780
3784
  );
3781
3785
  }
3782
3786
  if (!o.isIdentifier(r) || !r.text.startsWith(r.text[0].toLowerCase()) && r.text !== Xe && r.text !== Qe) {
3783
- const T = o.isIdentifier(r) && r.text === zs ? Ie(n, e) : {
3787
+ const T = o.isIdentifier(r) && r.text === Vs ? Ie(n, e) : {
3784
3788
  // No need to wrap the function call in a lit-html tag
3785
3789
  litTag: void 0,
3786
- parts: [Na(e, t, r, n)]
3790
+ parts: [ja(e, t, r, n)]
3787
3791
  };
3788
3792
  return {
3789
- key: Fa(s, e),
3793
+ key: Na(s, e),
3790
3794
  ...T
3791
3795
  };
3792
3796
  }
3793
- const c = r.text === Xe ? Ae : r.text === Qe ? at : r.text, l = r.text === Xe ? te : r.text === Qe ? G : Gs.has(c) ? mi : ht.has(c) ? Z : ne, d = vt(c);
3797
+ const c = r.text === Xe ? Ae : r.text === Qe ? at : r.text, l = r.text === Xe ? te : r.text === Qe ? G : Qs.has(c) ? mi : ht.has(c) ? Z : ne, d = vt(c);
3794
3798
  let p;
3795
- d && e.compiler.viteCommand === "build" && (p = Da(e, c));
3799
+ d && e.compiler.viteCommand === "build" && (p = Ra(e, c));
3796
3800
  let m;
3797
3801
  const f = [];
3798
3802
  let y = !1;
@@ -3809,13 +3813,13 @@ Found ${C.getText(e.sourceFile)}`
3809
3813
  `JSX namespaced attributes are not supported. Found ${T.getText(e.sourceFile)} in "${M}"`
3810
3814
  );
3811
3815
  }
3812
- const w = T.text, k = ha(I), F = k?.propType ?? ga(w, I, c);
3816
+ const w = T.text, k = ga(I), F = k?.propType ?? va(w, I, c);
3813
3817
  p?.delete(w);
3814
- const j = ua[F](e, k?.initializer ?? I, w, c);
3818
+ const j = ma[F](e, k?.initializer ?? I, w, c);
3815
3819
  if (j.length === 0)
3816
3820
  return [];
3817
- const U = e.compiler.shouldMinifyJsx ? [" "] : mr(wt(T, e));
3818
- return F === "key" ? (m = typeof j[0] == "object" && !wi(T, e) ? j[0] : void 0, U.some(Sa) ? U : []) : F === "directives" || F === "ref" || w === "deferLoad" ? (y ||= F === "deferLoad", f.push(
3821
+ const U = e.compiler.shouldMinifyJsx ? [" "] : hr(wt(T, e));
3822
+ return F === "key" ? (m = typeof j[0] == "object" && !wi(T, e) ? j[0] : void 0, U.some(ba) ? U : []) : F === "directives" || F === "ref" || w === "deferLoad" ? (y ||= F === "deferLoad", f.push(
3819
3823
  ...U,
3820
3824
  ...j.flatMap(
3821
3825
  (M, we) => typeof M == "string" || we === 0 || typeof j[we - 1] == "string" ? M : [" ", M]
@@ -3831,7 +3835,7 @@ Found ${C.getText(e.sourceFile)}`
3831
3835
  `JSX syntax for MathML elements is not yet supported. If you need it, please request it. Otherwise, use the \`math\` function from Lit directly. Tried to use the "${c}" element`
3832
3836
  );
3833
3837
  d && (y ? e.customElementsToImportDeferred.add(c) : e.customElementsToImport.add(c));
3834
- const v = typeof c == "string" && qs.has(c), g = Ie(n, e);
3838
+ const v = typeof c == "string" && Xs.has(c), g = Ie(n, e);
3835
3839
  if (v && g.parts.length > 0) {
3836
3840
  const C = A(e.sourceFile.fileName);
3837
3841
  throw new Error(
@@ -3857,12 +3861,12 @@ Found ${C.getText(e.sourceFile)}`
3857
3861
  ];
3858
3862
  return { key: m, parts: E, litTag: l };
3859
3863
  }
3860
- function Fa(e, t) {
3864
+ function Na(e, t) {
3861
3865
  const n = e.attributes.properties[Ti(e)];
3862
3866
  return n && o.isJsxAttribute(n) && !wi(n.name, t) ? xt(n.initializer, t.sourceFile) : void 0;
3863
3867
  }
3864
3868
  const Ti = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
3865
- function Na(e, t, n, i) {
3869
+ function ja(e, t, n, i) {
3866
3870
  const r = (o.isJsxElement(t) ? t.openingElement : t).attributes.properties.map((l) => {
3867
3871
  if (o.isJsxSpreadAttribute(l))
3868
3872
  return St(wt(l, e), o.factory.createSpreadAssignment(l.expression));
@@ -3891,7 +3895,7 @@ function Ie(e, t) {
3891
3895
  let n;
3892
3896
  const i = e.flatMap((s) => {
3893
3897
  if (o.isJsxText(s))
3894
- return [t.compiler.shouldMinifyJsx ? cr(s.text) : s.text];
3898
+ return [t.compiler.shouldMinifyJsx ? pr(s.text) : s.text];
3895
3899
  if (o.isJsxExpression(s))
3896
3900
  return Pt(t, s, s);
3897
3901
  {
@@ -3910,7 +3914,7 @@ function Ie(e, t) {
3910
3914
  });
3911
3915
  return { litTag: n, parts: i };
3912
3916
  }
3913
- function ja(e) {
3917
+ function Da(e) {
3914
3918
  return e.operatorToken.kind === o.SyntaxKind.AmpersandAmpersandToken ? o.factory.createBinaryExpression(
3915
3919
  e,
3916
3920
  o.factory.createToken(o.SyntaxKind.BarBarToken),
@@ -3961,7 +3965,7 @@ function Pt(e, t, n) {
3961
3965
  ] : [H(e, n, t.expression)]
3962
3966
  );
3963
3967
  }
3964
- function Da(e, t) {
3968
+ function Ra(e, t) {
3965
3969
  if (t in e.localComponents)
3966
3970
  for (const i of e.compiler.privateApiJson.modules)
3967
3971
  for (const s of i.declarations) {
@@ -3997,11 +4001,11 @@ const Ei = (e) => e.reduce((t, [n, i]) => (t[n] ??= [], t[n].push(i), t), {}), f
3997
4001
  }, Ci = Ei(
3998
4002
  Object.entries(fe).flatMap(([e, t]) => t.map((n) => [n, e]))
3999
4003
  ), It = new Set(Object.keys(Ci));
4000
- function Ra(e, t) {
4004
+ function Ma(e, t) {
4001
4005
  const n = t.importClause, i = t.moduleSpecifier;
4002
4006
  if (!o.isStringLiteral(i))
4003
4007
  return t;
4004
- const s = Ma(e.sourceFile.fileName, i.text, ""), r = !n?.isTypeOnly;
4008
+ const s = Oa(e.sourceFile.fileName, i.text, ""), r = !n?.isTypeOnly;
4005
4009
  if (r && e.existingImportedModules.add(s), n === void 0)
4006
4010
  return t;
4007
4011
  if (e.isInLightDomComponent && i.text.startsWith(".") && Fe.test(i.text) && // If id already includes ?, bypass our custom behavior
@@ -4033,11 +4037,11 @@ function Ra(e, t) {
4033
4037
  r && !l.isTypeOnly && m && f && e.importedFunctionComponentsFromModules.add(s);
4034
4038
  }), t;
4035
4039
  }
4036
- const $i = (e, t) => e === ne && fe.staticHtml.includes(t) ? te : e === Z && fe.staticSvg.includes(t) ? G : e, Ma = (e, t, n) => t.startsWith(".") ? u.resolve(e, "..", `${t}${n}`) : t;
4037
- function Oa(e) {
4038
- return o.isImportDeclaration(e) ? Ja(this, e) : e;
4040
+ const $i = (e, t) => e === ne && fe.staticHtml.includes(t) ? te : e === Z && fe.staticSvg.includes(t) ? G : e, Oa = (e, t, n) => t.startsWith(".") ? u.resolve(e, "..", `${t}${n}`) : t;
4041
+ function Ja(e) {
4042
+ return o.isImportDeclaration(e) ? Ka(this, e) : e;
4039
4043
  }
4040
- function Ja(e, t) {
4044
+ function Ka(e, t) {
4041
4045
  const n = t.importClause, i = n?.namedBindings, s = t.moduleSpecifier;
4042
4046
  if (!o.isStringLiteral(s) || !i || !o.isNamedImports(i) || !It.has(s.text))
4043
4047
  return t;
@@ -4062,7 +4066,7 @@ function Ja(e, t) {
4062
4066
  t.attributes
4063
4067
  ) : t;
4064
4068
  }
4065
- function Ka(e) {
4069
+ function Ba(e) {
4066
4070
  const t = Ei(Array.from(e.neededImports, (n) => [fe[n][0], n]));
4067
4071
  return Object.entries(t).map(
4068
4072
  ([n, i]) => o.factory.createImportDeclaration(
@@ -4086,8 +4090,8 @@ function xi(e, t) {
4086
4090
  o.factory.createIdentifier(i)
4087
4091
  );
4088
4092
  }
4089
- function Ba(e) {
4090
- const t = Uo().map(({ packageName: n }) => n);
4093
+ function Wa(e) {
4094
+ const t = zo().map(({ packageName: n }) => n);
4091
4095
  return e.existingImportedModules.forEach((n) => {
4092
4096
  if (u.isAbsolute(n))
4093
4097
  return;
@@ -4100,7 +4104,7 @@ function Ba(e) {
4100
4104
  }
4101
4105
  }), [];
4102
4106
  }
4103
- function Wa(e) {
4107
+ function _a(e) {
4104
4108
  if (e.compiler.viteCommand === "serve")
4105
4109
  return e.customElementsToImport.clear(), e.customElementsToImportDeferred.clear(), [];
4106
4110
  const t = e.compiler._customElementDependencies;
@@ -4115,7 +4119,7 @@ function Wa(e) {
4115
4119
  t[i] ??= { referencedBy: [], referencedTagNames: [], referencedDeferredTagNames: [] }, t[i].referencedBy.push(e.sourceFile.fileName);
4116
4120
  }), [];
4117
4121
  }
4118
- function _a(e, t, n) {
4122
+ function Ha(e, t, n) {
4119
4123
  const i = di()[t] ?? Pi(e)[t];
4120
4124
  if (i === void 0) {
4121
4125
  const s = A(n);
@@ -4125,7 +4129,7 @@ function _a(e, t, n) {
4125
4129
  }
4126
4130
  return i;
4127
4131
  }
4128
- function Ha(e, t) {
4132
+ function Ua(e, t) {
4129
4133
  return e.packageName === void 0 ? ee(t, e.moduleName) : u.join(e.packageName, e.moduleName);
4130
4134
  }
4131
4135
  function Pi(e) {
@@ -4136,7 +4140,7 @@ function Pi(e) {
4136
4140
  }
4137
4141
  }), e._localDefinedComponents;
4138
4142
  }
4139
- const Ua = (e, t) => {
4143
+ const za = (e, t) => {
4140
4144
  const n = e.pragmas;
4141
4145
  if (n?.has("jsx") === !0 || n?.has("jsxImportSource") === !0)
4142
4146
  return e.statements;
@@ -4146,7 +4150,7 @@ const Ua = (e, t) => {
4146
4150
  localComponents: t.compiler.isInPuppeteerTestBackEnd ? {} : Pi(t.compiler),
4147
4151
  sourceFile: e,
4148
4152
  transformationContext: t.transformation,
4149
- importRenames: za(e),
4153
+ importRenames: qa(e),
4150
4154
  existingImportedModules: /* @__PURE__ */ new Set(),
4151
4155
  importedFunctionComponentsFromModules: /* @__PURE__ */ new Set(),
4152
4156
  existingLitImports: /* @__PURE__ */ new Set(),
@@ -4162,18 +4166,18 @@ const Ua = (e, t) => {
4162
4166
  let s = [];
4163
4167
  if (e.statements.every((a) => {
4164
4168
  if (o.isImportDeclaration(a)) {
4165
- if (s.push(Ra(i, a)), i.hasNonLuminaJsxImport)
4169
+ if (s.push(Ma(i, a)), i.hasNonLuminaJsxImport)
4166
4170
  return !1;
4167
4171
  } else
4168
4172
  s.push(H(i, void 0, a));
4169
4173
  return !0;
4170
4174
  }), i.hasNonLuminaJsxImport)
4171
4175
  return e.statements;
4172
- if (i.neededImports.size > 0 && (s = s.map(Oa, i), i.existingLitImports.size > 0))
4176
+ if (i.neededImports.size > 0 && (s = s.map(Ja, i), i.existingLitImports.size > 0))
4173
4177
  throw new Error(
4174
4178
  `Expected context.existingLitImports to be empty by now. Found: ${Array.from(i.existingLitImports).join(", ")}`
4175
4179
  );
4176
- const r = [Ka, Ba, Wa].flatMap(
4180
+ const r = [Ba, Wa, _a].flatMap(
4177
4181
  (a) => a(i)
4178
4182
  );
4179
4183
  if (i.neededImports.size > 0)
@@ -4182,18 +4186,18 @@ const Ua = (e, t) => {
4182
4186
  );
4183
4187
  return [...r, ...s];
4184
4188
  };
4185
- function za(e) {
4186
- return qa(e), Object.fromEntries(
4187
- la.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4189
+ function qa(e) {
4190
+ return Ga(e), Object.fromEntries(
4191
+ da.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4188
4192
  );
4189
4193
  }
4190
- function qa(e) {
4194
+ function Ga(e) {
4191
4195
  if (!("identifiers" in e))
4192
4196
  throw new Error(
4193
4197
  "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."
4194
4198
  );
4195
4199
  }
4196
- function Ga(e, t, n) {
4200
+ function Va(e, t, n) {
4197
4201
  return t.size === 0 ? e : [
4198
4202
  o.factory.createPropertyDeclaration(
4199
4203
  [
@@ -4207,7 +4211,7 @@ function Ga(e, t, n) {
4207
4211
  Array.from(t.entries()).map(
4208
4212
  ([i, s]) => o.factory.createPropertyAssignment(
4209
4213
  He(i) ? o.factory.createStringLiteral(i) : i,
4210
- Va(s, n)
4214
+ Xa(s, n)
4211
4215
  )
4212
4216
  )
4213
4217
  )
@@ -4215,7 +4219,7 @@ function Ga(e, t, n) {
4215
4219
  ...e
4216
4220
  ];
4217
4221
  }
4218
- function Va(e, t) {
4222
+ function Xa(e, t) {
4219
4223
  let n = 0, i = !0;
4220
4224
  const s = e.properties.filter((c) => {
4221
4225
  if (!o.isPropertyAssignment(c) || !o.isIdentifier(c.name))
@@ -4246,7 +4250,7 @@ function Va(e, t) {
4246
4250
  o.factory.createObjectLiteralExpression(r)
4247
4251
  ]);
4248
4252
  }
4249
- function Xa(e, t, n, i, s) {
4253
+ function Qa(e, t, n, i, s) {
4250
4254
  let r = -1, a = -1, c = -1;
4251
4255
  t.options?.properties.forEach((f, y) => {
4252
4256
  if (o.isSpreadAssignment(f))
@@ -4258,23 +4262,23 @@ function Xa(e, t, n, i, s) {
4258
4262
  h === "type" ? r = y : h === "attribute" ? a = y : h === "readOnly" && (c = y);
4259
4263
  }
4260
4264
  });
4261
- const l = s.attribute === void 0 && a === -1, d = s.readonly === !0 && s.docsOnlyReadonly !== !0 && c === -1, p = Qa(e, t, n, s, r), m = [
4265
+ const l = s.attribute === void 0 && a === -1, d = s.readonly === !0 && s.docsOnlyReadonly !== !0 && c === -1, p = Ya(e, t, n, s, r), m = [
4262
4266
  ...l ? [o.factory.createPropertyAssignment("attribute", o.factory.createFalse())] : [],
4263
4267
  ...d ? [o.factory.createPropertyAssignment("readOnly", o.factory.createTrue())] : [],
4264
4268
  ...p !== void 0 ? [p] : []
4265
4269
  ];
4266
4270
  return m.length > 0 ? t.options === void 0 ? o.factory.createObjectLiteralExpression(m, !1) : o.factory.updateObjectLiteralExpression(t.options, [...t.options.properties, ...m]) : t.options;
4267
4271
  }
4268
- function Qa(e, t, n, i, s) {
4272
+ function Ya(e, t, n, i, s) {
4269
4273
  if (i.attribute === void 0)
4270
4274
  return;
4271
- const r = Za(e), a = n.compiler.viteCommand === "serve" || r !== "Other" ? r : Ya(i.type.values);
4275
+ const r = ec(e), a = n.compiler.viteCommand === "serve" || r !== "Other" ? r : Za(i.type.values);
4272
4276
  return a === "Other" || i.readonly && (a !== "Boolean" || !i.reflects) || t.options?.properties[s] !== void 0 ? void 0 : o.factory.createPropertyAssignment(
4273
4277
  o.factory.createIdentifier("type"),
4274
4278
  o.factory.createIdentifier(a)
4275
4279
  );
4276
4280
  }
4277
- function Ya(e) {
4281
+ function Za(e) {
4278
4282
  let t = !1, n = !1, i = !1;
4279
4283
  if (e?.forEach((s) => {
4280
4284
  t ||= s.type === "number", n ||= s.type === "boolean", i ||= s.type === "string" || s.type === "any" || s.type === "unknown";
@@ -4286,7 +4290,7 @@ function Ya(e) {
4286
4290
  }
4287
4291
  return "Other";
4288
4292
  }
4289
- function Za(e) {
4293
+ function ec(e) {
4290
4294
  const t = e.type ?? (o.isSetAccessor(e) ? e.parameters[0].type : void 0);
4291
4295
  if (t === void 0) {
4292
4296
  if ("initializer" in e && e.initializer !== void 0) {
@@ -4303,7 +4307,7 @@ function Za(e) {
4303
4307
  }
4304
4308
  return "Other";
4305
4309
  }
4306
- function ec(e, t, n, i, s) {
4310
+ function tc(e, t, n, i, s) {
4307
4311
  if (t.modifiers === void 0)
4308
4312
  return t;
4309
4313
  let r = -1, a = -1;
@@ -4313,7 +4317,7 @@ function ec(e, t, n, i, s) {
4313
4317
  d === "property" && (r = l), d === "state" && (a = l);
4314
4318
  }
4315
4319
  }), r !== -1) {
4316
- const c = tc(e, t, n, i), l = pn(t, r, i), d = Xa(t, l, e, i, c);
4320
+ const c = nc(e, t, n, i), l = pn(t, r, i), d = Qa(t, l, e, i, c);
4317
4321
  let p = !1;
4318
4322
  return s.set(c.name, d ?? o.factory.createObjectLiteralExpression()), p = !0, l.options = d, un(t, l, r, p);
4319
4323
  } else if (a !== -1) {
@@ -4324,7 +4328,7 @@ function ec(e, t, n, i, s) {
4324
4328
  } else
4325
4329
  return t;
4326
4330
  }
4327
- function tc(e, t, n, i) {
4331
+ function nc(e, t, n, i) {
4328
4332
  const s = e.apiModule?.declarations.find(
4329
4333
  (a) => a.name === n
4330
4334
  ) ?? (e.compiler.isInTest ? {
@@ -4332,7 +4336,7 @@ function tc(e, t, n, i) {
4332
4336
  } : void 0);
4333
4337
  if (s === void 0)
4334
4338
  throw Error(`Failed to find API component for ${n} in ${i.fileName}`);
4335
- const r = Ds(s, t) ?? (e.compiler.isInTest ? { kind: "field", attribute: "", readonly: !1, name: "", type: { text: "" } } : void 0);
4339
+ const r = Os(s, t) ?? (e.compiler.isInTest ? { kind: "field", attribute: "", readonly: !1, name: "", type: { text: "" } } : void 0);
4336
4340
  if (r === void 0 || r.kind !== "field")
4337
4341
  throw Error(
4338
4342
  `Failed to find API property for ${t.getText(i)} in ${n} in ${i.fileName}`
@@ -4391,14 +4395,14 @@ function un(e, t, n, i) {
4391
4395
  e.initializer
4392
4396
  );
4393
4397
  }
4394
- const nc = (e, t) => {
4398
+ const ic = (e, t) => {
4395
4399
  if (t.apiModule === void 0 && !t.compiler.isInTest)
4396
4400
  return e.statements;
4397
4401
  let n;
4398
4402
  function i() {
4399
4403
  n = /* @__PURE__ */ new Map();
4400
4404
  }
4401
- const s = (c) => Ga(c, n, t.compiler.shouldMinify), r = (c, l) => sc(t, c, l, e, n);
4405
+ const s = (c) => Va(c, n, t.compiler.shouldMinify), r = (c, l) => rc(t, c, l, e, n);
4402
4406
  return e.statements.map(
4403
4407
  (c) => Ii(r, c, t, i, s)
4404
4408
  );
@@ -4430,11 +4434,11 @@ function Ii(e, t, n, i, s = kn) {
4430
4434
  n.transformation
4431
4435
  ) : t;
4432
4436
  }
4433
- const ic = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4434
- function sc(e, t, n, i, s) {
4437
+ const sc = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4438
+ function rc(e, t, n, i, s) {
4435
4439
  if (o.isMethodDeclaration(t)) {
4436
4440
  const r = t.modifiers?.filter(
4437
- (a) => !o.isDecorator(a) || !rc(a)
4441
+ (a) => !o.isDecorator(a) || !oc(a)
4438
4442
  );
4439
4443
  if (r?.length !== t.modifiers?.length)
4440
4444
  return o.factory.updateMethodDeclaration(
@@ -4448,7 +4452,7 @@ function sc(e, t, n, i, s) {
4448
4452
  t.type,
4449
4453
  t.body
4450
4454
  );
4451
- if ("text" in t.name && ic.has(t.name.text) && t.body) {
4455
+ if ("text" in t.name && sc.has(t.name.text) && t.body) {
4452
4456
  const a = t.name.text;
4453
4457
  return t.body.statements.some(
4454
4458
  (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
@@ -4474,10 +4478,10 @@ function sc(e, t, n, i, s) {
4474
4478
  );
4475
4479
  }
4476
4480
  }
4477
- return o.isPropertyDeclaration(t) || o.isAccessor(t) ? ec(e, t, n, i, s) : t;
4481
+ return o.isPropertyDeclaration(t) || o.isAccessor(t) ? tc(e, t, n, i, s) : t;
4478
4482
  }
4479
- const rc = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", mn = "makeRuntime(";
4480
- function oc(e, t) {
4483
+ const oc = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", mn = "makeRuntime(";
4484
+ function ac(e, t) {
4481
4485
  const n = e.indexOf(mn);
4482
4486
  if (n === -1)
4483
4487
  throw new Error("Failed to find makeRuntime() function call in src/runtime.ts");
@@ -4498,11 +4502,11 @@ function oc(e, t) {
4498
4502
  map: null
4499
4503
  };
4500
4504
  }
4501
- const ac = [
4502
- Ua,
4505
+ const cc = [
4506
+ za,
4503
4507
  Ps,
4504
- nc
4505
- ], cc = (e) => ({
4508
+ ic
4509
+ ], lc = (e) => ({
4506
4510
  name: "@arcgis/lumina:transformComponents",
4507
4511
  transform: {
4508
4512
  // Transform JSX to lit-html first so that vite:esbuild doesn't transform JSX to h().
@@ -4514,7 +4518,7 @@ const ac = [
4514
4518
  "It looks like you may be trying to define a component inside a test file. This is supported, but you must use the .tsx file extension for you test"
4515
4519
  );
4516
4520
  else if (n === `${e.dir.src}runtime.ts`)
4517
- return oc(t, e);
4521
+ return ac(t, e);
4518
4522
  return;
4519
4523
  }
4520
4524
  const i = e.getSourceFile(n, t);
@@ -4522,7 +4526,7 @@ const ac = [
4522
4526
  const r = o.transform(i, [
4523
4527
  (f) => () => Mn(e, f, i, [
4524
4528
  ...e.options.types?.sourceFileTransformers ?? [],
4525
- ...ac
4529
+ ...cc
4526
4530
  ])
4527
4531
  ]).transformed[0], a = e._compilerOptionsForPrinter, c = e._typeScriptPrinter, l = a.sourceMap ? ae.createSourceMapGenerator(
4528
4532
  e.typeScriptHost,
@@ -4540,7 +4544,7 @@ const ac = [
4540
4544
  }
4541
4545
  }
4542
4546
  });
4543
- function lc(e) {
4547
+ function dc(e) {
4544
4548
  const t = e.typeScriptConfig;
4545
4549
  return {
4546
4550
  ...t,
@@ -4572,7 +4576,7 @@ function lc(e) {
4572
4576
  skipLibCheck: !0
4573
4577
  };
4574
4578
  }
4575
- function dc(e) {
4579
+ function pc(e) {
4576
4580
  const t = e.options.types?.tsconfigPath, n = t && u.isAbsolute(t) ? t : Zi(t ?? "tsconfig.json");
4577
4581
  if (n === void 0)
4578
4582
  throw new Error(
@@ -4604,7 +4608,7 @@ function ki(e) {
4604
4608
  const n = o.ScriptTarget[t].toLowerCase();
4605
4609
  return n === "latest" ? "esnext" : n;
4606
4610
  }
4607
- function pc(e, t) {
4611
+ function uc(e, t) {
4608
4612
  if (e.isInStorybook && e.viteCommand === "serve") {
4609
4613
  const n = (a, c, l, ...d) => {
4610
4614
  const p = a.filter(
@@ -4626,10 +4630,10 @@ function pc(e, t) {
4626
4630
  e.typeScriptProgram = a.getProgram(), e.typeScriptTypeChecker = e.typeScriptProgram.getTypeChecker(), e._typeScriptReload?.resolve(), e._typeScriptReload = new os();
4627
4631
  }, e.typeScriptWatchProgram = o.createWatchProgram(i), e.typeScriptConfig = e.typeScriptProgram.getCompilerOptions();
4628
4632
  }
4629
- e.typeScriptConfig.sourceMap = t, e._compilerOptionsForPrinter = lc(e), e._typeScriptPrinter = Gn(e._compilerOptionsForPrinter);
4633
+ e.typeScriptConfig.sourceMap = t, e._compilerOptionsForPrinter = dc(e), e._typeScriptPrinter = Gn(e._compilerOptionsForPrinter);
4630
4634
  }
4631
4635
  const ut = "@arcgis/core", fn = R(), B = ut in (fn.dependencies ?? {}) || ut in (fn.peerDependencies ?? {});
4632
- async function uc(e, t) {
4636
+ async function mc(e, t) {
4633
4637
  if (!B)
4634
4638
  return [];
4635
4639
  const n = await Me(ut);
@@ -4661,7 +4665,7 @@ const yn = (e) => ({
4661
4665
  // This is used be the theme switcher in `@arcgis/storybook-utils`
4662
4666
  id: "arcgisCoreStylesheet"
4663
4667
  });
4664
- async function mc(e, t, n) {
4668
+ async function fc(e, t, n) {
4665
4669
  const i = u.resolve(e.dir.root, t);
4666
4670
  await W(i) && await ls(i, { recursive: !0, force: !0 }), await _(i, { recursive: !0 }), await ds(e.dir.distCdn, u.join(i, "build"), { recursive: !0 });
4667
4671
  const s = [
@@ -4712,7 +4716,7 @@ const Ai = /* @__PURE__ */ new Set([
4712
4716
  "extras",
4713
4717
  "support"
4714
4718
  ]), De = "cdn";
4715
- function fc(e) {
4719
+ function yc(e) {
4716
4720
  const { skip: t = !1, namespace: n = De, esbuildOptions: i = {} } = e.options.build?.cdn ?? {}, s = e.options.build?.webApp?.destination;
4717
4721
  if (n.toLowerCase() !== n)
4718
4722
  throw new Error(`Expected CDN namespace to be all lowercase. Received: ${n}`);
@@ -4722,21 +4726,21 @@ function fc(e) {
4722
4726
  );
4723
4727
  const r = n === De ? "index" : n;
4724
4728
  if (e.provideAssets([
4725
- { type: "dynamic", source: () => wo(e), destination: `../${r}.css` }
4729
+ { type: "dynamic", source: () => So(e), destination: `../${r}.css` }
4726
4730
  ]), !t)
4727
4731
  return {
4728
4732
  name: "@arcgis/lumina:buildCdn",
4729
4733
  async writeBundle() {
4730
4734
  if (e.isInStorybook)
4731
4735
  return;
4732
- const a = Date.now(), c = await yc(e, r, i);
4733
- await hc(c, e.dir.distCdn, r);
4736
+ const a = Date.now(), c = await hc(e, r, i);
4737
+ await gc(c, e.dir.distCdn, r);
4734
4738
  const l = Date.now();
4735
- console.log(`CDN was built in ${l - a}ms`), s && await mc(e, s, `${kt(r)}.js`);
4739
+ console.log(`CDN was built in ${l - a}ms`), s && await fc(e, s, `${kt(r)}.js`);
4736
4740
  }
4737
4741
  };
4738
4742
  }
4739
- async function yc(e, t, n) {
4743
+ async function hc(e, t, n) {
4740
4744
  const i = e.environment;
4741
4745
  if (n.minify && B)
4742
4746
  throw Error(
@@ -4809,22 +4813,22 @@ defineCustomElements({resourcesUrl: import.meta.url});`,
4809
4813
  }
4810
4814
  });
4811
4815
  }
4812
- async function hc(e, t, n) {
4816
+ async function gc(e, t, n) {
4813
4817
  const i = `${kt(n)}.js`, s = new Map(
4814
4818
  e.outputFiles.map((r) => {
4815
4819
  const a = { code: r.text, isAsync: void 0 }, c = r.path.slice(t.length);
4816
- return c === i && B && (a.code = `${a.code.trimEnd()}${gc}`, a.isAsync = !1), [c, a];
4820
+ return c === i && B && (a.code = `${a.code.trimEnd()}${vc}`, a.isAsync = !1), [c, a];
4817
4821
  })
4818
4822
  );
4819
4823
  B && s.entries().forEach(([r, a]) => {
4820
4824
  a.isAsync === void 0 && (r.endsWith(".js") ? Li(a, s) : a.isAsync = !1);
4821
4825
  }), await Promise.all(s.entries().map(async ([r, { code: a }]) => await L(t + r, a)));
4822
4826
  }
4823
- const gc = '{window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{},});var a=$arcgis;a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c)}';
4827
+ const vc = '{window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{},});var a=$arcgis;a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c)}';
4824
4828
  function Li(e, t) {
4825
4829
  const n = [], i = [], s = [], r = [];
4826
4830
  let a = 0;
4827
- const c = e.code.matchAll(vc);
4831
+ const c = e.code.matchAll(wc);
4828
4832
  for (const w of c) {
4829
4833
  const [k, F, j, U, M] = w, we = M.startsWith(Re);
4830
4834
  if (a !== 0 && a !== w.index) {
@@ -4856,7 +4860,7 @@ function Li(e, t) {
4856
4860
  l
4857
4861
  );
4858
4862
  let d = [];
4859
- const p = wc.exec(e.code), m = p?.index ?? e.code.length;
4863
+ const p = Sc.exec(e.code), m = p?.index ?? e.code.length;
4860
4864
  if (p !== null) {
4861
4865
  const [w, k] = p;
4862
4866
  d = k.split(",").map((F) => F.split(" as "));
@@ -4867,11 +4871,11 @@ function Li(e, t) {
4867
4871
  ].join(","), C = `${S}},${b})
4868
4872
  export{${E}}`;
4869
4873
  let T = e.code.slice(a, m);
4870
- T = `${s.join("")}${T}`, T = Sc(T, t);
4874
+ T = `${s.join("")}${T}`, T = bc(T, t);
4871
4875
  const I = `${l}${g}${T}${C}`;
4872
4876
  e.code = I;
4873
4877
  }
4874
- const vc = /import(?:(\{[^}]+\})from|\*as (\w+) from| ([\w$]+) from)?"([^"]+)";/gu, wc = /export\{([^}]+)\};\n$/u, Re = "@arcgis/core/", Ee = (e) => `_${e}`, oe = "$$";
4878
+ const wc = /import(?:(\{[^}]+\})from|\*as (\w+) from| ([\w$]+) from)?"([^"]+)";/gu, Sc = /export\{([^}]+)\};\n$/u, Re = "@arcgis/core/", Ee = (e) => `_${e}`, oe = "$$";
4875
4879
  function Fi(e, t) {
4876
4880
  if (!e.startsWith("./"))
4877
4881
  return !1;
@@ -4882,15 +4886,15 @@ function Fi(e, t) {
4882
4886
  throw Error(`Failed to infer whether the ${e} module has top-level await`);
4883
4887
  return i.isAsync;
4884
4888
  }
4885
- function Sc(e, t) {
4886
- return e.replaceAll(bc, (n, i) => i.startsWith(Re) ? `$arcgis.t(_=>_[0],"${Ni(i.slice(Re.length))}")` : i.startsWith("./") && Fi(i, t) ? `${n}.then(m=>m.${oe}.then(_=>m))` : n);
4889
+ function bc(e, t) {
4890
+ return e.replaceAll(Tc, (n, i) => i.startsWith(Re) ? `$arcgis.t(_=>_[0],"${Ni(i.slice(Re.length))}")` : i.startsWith("./") && Fi(i, t) ? `${n}.then(m=>m.${oe}.then(_=>m))` : n);
4887
4891
  }
4888
- const bc = /(?<![.\w\d])import\("([^"]+)"\)/gu, Ni = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
4892
+ const Tc = /(?<![.\w\d])import\("([^"]+)"\)/gu, Ni = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
4889
4893
  function kt(e) {
4890
4894
  return `${e}.esm`;
4891
4895
  }
4892
- async function Tc(e, t, n, i) {
4893
- const s = t.packageName, r = await Me(s), { hasCss: a, cdnName: c } = await Ec(u.join(r, "dist")) ?? {};
4896
+ async function Ec(e, t, n, i) {
4897
+ const s = t.packageName, r = await Me(s), { hasCss: a, cdnName: c } = await Cc(u.join(r, "dist")) ?? {};
4894
4898
  if (n === "cdn") {
4895
4899
  const m = await Oe(r), f = t.cdnUrl ?? We(m, !0);
4896
4900
  return [
@@ -4933,7 +4937,7 @@ async function Tc(e, t, n, i) {
4933
4937
  }
4934
4938
  ];
4935
4939
  }
4936
- async function Ec(e) {
4940
+ async function Cc(e) {
4937
4941
  const n = (await Je(e)).filter(
4938
4942
  (s) => !Ai.has(s) && !s.includes(".")
4939
4943
  ), i = n.find((s) => s.startsWith("arcgis-"));
@@ -4949,16 +4953,16 @@ async function hn(e, t) {
4949
4953
  } : void 0;
4950
4954
  }
4951
4955
  async function ye(e) {
4952
- return e._loadersCache ??= Cc(e), await e._loadersCache;
4956
+ return e._loadersCache ??= $c(e), await e._loadersCache;
4953
4957
  }
4954
- async function Cc(e) {
4958
+ async function $c(e) {
4955
4959
  const t = e.viteCommand === "build" ? "cdn" : "lazyNpm", n = e.viteConfig.base, i = async (c) => (await Promise.all(
4956
4960
  c.map(
4957
- async (l, d) => l.type === "stencil" ? await Tc(n, l, t, d) : l.type === "@arcgis/lumina" ? await ia(n, l, t, d) : void 0
4961
+ async (l, d) => l.type === "stencil" ? await Ec(n, l, t, d) : l.type === "@arcgis/lumina" ? await sa(n, l, t, d) : void 0
4958
4962
  )
4959
4963
  )).filter(N).flat(), s = await Promise.all([
4960
4964
  // This may contain an import map so must be first
4961
- uc(n, t),
4965
+ mc(n, t),
4962
4966
  ue.then(i),
4963
4967
  Di(e).then(i)
4964
4968
  ]), r = u.join(e.dir.src, "loader.ts");
@@ -5007,9 +5011,9 @@ async function Di(e) {
5007
5011
  })
5008
5012
  ).then((n) => n.filter(N)), await e._serveOnlyDependencies);
5009
5013
  }
5010
- const Ri = "/@arcgis/lumina-compiler/testLitSetupFile", Mi = "/@arcgis/lumina-compiler/testSetupFile", rt = [Ri, Mi], $c = ji.javascriptCode.join(`
5014
+ const Ri = "/@arcgis/lumina-compiler/testLitSetupFile", Mi = "/@arcgis/lumina-compiler/testSetupFile", rt = [Ri, Mi], xc = ji.javascriptCode.join(`
5011
5015
  `);
5012
- async function xc(e) {
5016
+ async function Pc(e) {
5013
5017
  if (!e.viteConfig.test?.browser?.enabled)
5014
5018
  return gn(e);
5015
5019
  const n = (await ye(e)).map((i, s) => {
@@ -5032,12 +5036,12 @@ async function xc(e) {
5032
5036
  `);
5033
5037
  return [gn(e), n].join("");
5034
5038
  }
5035
- const gn = (e) => [e.isInPuppeteerTestBackEnd ? Pc : "", Ic].join(""), Pc = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
5039
+ const gn = (e) => [e.isInPuppeteerTestBackEnd ? Ic : "", kc].join(""), Ic = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
5036
5040
  setupPuppeteerTest();
5037
- `, Ic = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
5041
+ `, kc = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
5038
5042
  setupLuminaTest();
5039
5043
  `;
5040
- function kc(e) {
5044
+ function Ac(e) {
5041
5045
  let t = !0, n = !1, i, s, r, a, c;
5042
5046
  const l = "@arcgis/lumina:generateVirtualFiles", d = {
5043
5047
  name: l,
@@ -5050,17 +5054,17 @@ function kc(e) {
5050
5054
  const v = h.startsWith(Ri), g = h.startsWith(Mi);
5051
5055
  if (!(!h.endsWith(".tsx") && h !== a && !v && !g)) {
5052
5056
  if (s === void 0 && !e.isInPuppeteerTestBackEnd) {
5053
- r === void 0 && clearTimeout(i), r ??= Do(e, t).catch((b) => {
5057
+ r === void 0 && clearTimeout(i), r ??= Ro(e, t).catch((b) => {
5054
5058
  throw n = !0, b;
5055
5059
  }), t = !1;
5056
5060
  const S = await r;
5057
5061
  s ??= S;
5058
5062
  }
5059
- return h === a ? So(e) : v ? $c : g ? await xc(e) : void 0;
5063
+ return h === a ? bo(e) : v ? xc : g ? await Pc(e) : void 0;
5060
5064
  }
5061
5065
  },
5062
5066
  async writeBundle() {
5063
- e.isInStorybook || await L(u.join(e.dir.dist, "loader.d.ts"), bo);
5067
+ e.isInStorybook || await L(u.join(e.dir.dist, "loader.d.ts"), To);
5064
5068
  },
5065
5069
  async handleHotUpdate({ file: h, modules: v, read: g }) {
5066
5070
  const S = await p(h, g);
@@ -5120,7 +5124,7 @@ function kc(e) {
5120
5124
  if (!pe(h, e.dir.srcComponents))
5121
5125
  return;
5122
5126
  g ??= await v();
5123
- const b = Ro(e, h, g);
5127
+ const b = Mo(e, h, g);
5124
5128
  if (b === void 0)
5125
5129
  return !1;
5126
5130
  for (const E of b) {
@@ -5142,21 +5146,21 @@ function kc(e) {
5142
5146
  });
5143
5147
  return d;
5144
5148
  }
5145
- const Ac = "@arcgis/lumina:provideAssets";
5149
+ const Lc = "@arcgis/lumina:provideAssets";
5146
5150
  function le(e, t, n = At) {
5147
5151
  if (e.viteCommand !== "serve")
5148
5152
  throw new Error("serveAssets() is only available when Vite is running in serve mode");
5149
5153
  const i = e._serverConfigured, s = e.server.middlewares.stack.length;
5150
5154
  if (t.forEach((r) => {
5151
- const a = Ji(r), c = Bi(e.dir, Ki(a)), l = Fc(e.viteConfig.base, c, e.dir.distCdn);
5155
+ const a = Ji(r), c = Bi(e.dir, Ki(a)), l = Nc(e.viteConfig.base, c, e.dir.distCdn);
5152
5156
  e.server.middlewares.use(l, (d, p, m) => {
5153
- const f = Nc(d.url), y = a.type === "directory" ? u.resolve(a.source, f.slice(1)) : a.source, h = u.join(c, f), v = n.find((g) => g.match(h, e));
5157
+ const f = jc(d.url), y = a.type === "directory" ? u.resolve(a.source, f.slice(1)) : a.source, h = u.join(c, f), v = n.find((g) => g.match(h, e));
5154
5158
  return (typeof y == "function" ? Promise.resolve(y()) : D(y)).then((g) => {
5155
5159
  const S = (typeof y == "function" ? void 0 : v?.transform(g.toString("utf8"), h, e)) ?? g;
5156
5160
  p.setHeader("Cache-Control", "max-age=31536000, immutable"), p.setHeader("Content-Type", hs.lookup(f) || "application/octet-stream"), p.write(S), p.end();
5157
5161
  }).catch((g) => {
5158
5162
  (a.type !== "directory" || process.env.DEBUG) && console.error(
5159
- Ac,
5163
+ Lc,
5160
5164
  `Error occurred when trying to serve a file in response to request for "${d.originalUrl ?? f}":`,
5161
5165
  g
5162
5166
  ), m();
@@ -5221,33 +5225,33 @@ function Ki(e) {
5221
5225
  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;
5222
5226
  }
5223
5227
  function Bi({ dist: e, distCdnAssets: t }, n) {
5224
- const i = Lc(n), s = u.join(
5228
+ const i = Fc(n), s = u.join(
5225
5229
  t,
5226
5230
  i ? u.relative(t, n) : n
5227
5231
  ), r = u.relative(e, s), a = Wi(r);
5228
5232
  return u.join(e, a);
5229
5233
  }
5230
- function Lc(e) {
5234
+ function Fc(e) {
5231
5235
  if (e.startsWith(u.sep)) {
5232
5236
  const t = ke(), n = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
5233
5237
  return e.startsWith(`/${n}/`) || e.startsWith("/Users/");
5234
5238
  } else
5235
5239
  return !!(!Pn && u.isAbsolute(e));
5236
5240
  }
5237
- function Fc(e, t, n) {
5241
+ function Nc(e, t, n) {
5238
5242
  const i = Wi(u.relative(n, t)), s = i.startsWith("/") ? i.slice(1) : i;
5239
5243
  return `${e}${s}`;
5240
5244
  }
5241
- const Wi = (e) => e.replaceAll("../", ""), Nc = (e = "") => e.split("?")[0].split("#")[0];
5245
+ const Wi = (e) => e.replaceAll("../", ""), jc = (e = "") => e.split("?")[0].split("#")[0];
5242
5246
  async function _i(e) {
5243
5247
  const t = new Set(e.map(u.dirname));
5244
5248
  await Promise.all(Array.from(t, async (n) => await _(n, { recursive: !0 })));
5245
5249
  }
5246
- const jc = {
5250
+ const Dc = {
5247
5251
  match: (e, t) => t.environment === "production" && e.endsWith(".json"),
5248
5252
  transform: (e) => JSON.stringify(JSON.parse(e))
5249
- }, At = [jc];
5250
- function Dc(e) {
5253
+ }, At = [Dc];
5254
+ function Rc(e) {
5251
5255
  let t;
5252
5256
  const n = () => [
5253
5257
  ...e.options.assets?.transformers ?? [],
@@ -5256,7 +5260,7 @@ function Dc(e) {
5256
5260
  return {
5257
5261
  name: "@arcgis/lumina:handleStaticAssets",
5258
5262
  configResolved() {
5259
- t = Rc(e);
5263
+ t = Mc(e);
5260
5264
  },
5261
5265
  async configureServer(i) {
5262
5266
  e.server = i, !e.isInPuppeteerTestBackEnd && (le(e, await t, n()), i.watcher.on("addDir", (s) => {
@@ -5271,7 +5275,7 @@ function Dc(e) {
5271
5275
  }
5272
5276
  };
5273
5277
  }
5274
- async function Rc(e) {
5278
+ async function Mc(e) {
5275
5279
  const t = W("assets"), n = await e.componentFilesPromise, i = await Promise.all(
5276
5280
  n.map(async (s) => {
5277
5281
  const r = u.dirname(s), a = u.join(r, "assets");
@@ -5285,7 +5289,7 @@ const Hi = (e, t) => ({
5285
5289
  source: e,
5286
5290
  destination: u.basename(t)
5287
5291
  }), Ui = { type: "directory", source: "assets/", destination: "" };
5288
- function Mc(e) {
5292
+ function Oc(e) {
5289
5293
  const { stencilCompatibility: t } = e.options.build?.ssr ?? {};
5290
5294
  if (t?.enabled === !0)
5291
5295
  return {
@@ -5337,7 +5341,7 @@ export * from "@arcgis/lumina/stencilSsrCompatibility";`;
5337
5341
  }
5338
5342
  };
5339
5343
  }
5340
- const Oc = (e) => ({
5344
+ const Jc = (e) => ({
5341
5345
  name: "@arcgis/lumina:printTotalBuildSize",
5342
5346
  apply: () => e.viteCommand === "build",
5343
5347
  configResolved(t) {
@@ -5354,10 +5358,10 @@ const Oc = (e) => ({
5354
5358
  const m = console.log;
5355
5359
  console.log = function(...y) {
5356
5360
  if (m.apply(console, y), y.length === 1 && typeof y[0] == "string") {
5357
- const [h, v] = y[0].match(Kc) ?? [];
5361
+ const [h, v] = y[0].match(Bc) ?? [];
5358
5362
  if (!h)
5359
5363
  return;
5360
- p || (p = y[0].slice(0, y[0].indexOf(h) + h.length).replaceAll(Bc, "").length);
5364
+ p || (p = y[0].slice(0, y[0].indexOf(h) + h.length).replaceAll(Wc, "").length);
5361
5365
  const g = Number.parseFloat(h.replace(" kB", "").replaceAll(",", ""));
5362
5366
  v ? (d += Number.parseFloat(v.replace(" kB", "").replaceAll(",", "")), l += g) : c += g;
5363
5367
  }
@@ -5373,7 +5377,7 @@ const Oc = (e) => ({
5373
5377
  [
5374
5378
  Sn,
5375
5379
  v,
5376
- Jc,
5380
+ Kc,
5377
5381
  "*",
5378
5382
  " ".repeat(p - `${v}*`.length - h.length),
5379
5383
  h,
@@ -5384,10 +5388,10 @@ const Oc = (e) => ({
5384
5388
  }
5385
5389
  };
5386
5390
  }
5387
- }), wn = "\x1B[22m\x1B[1m\x1B[22m", Sn = "\x1B[2m", Jc = "\x1B[22m\x1B[36m", Kc = /\d+(?:,\d+)?\.\d{2} kB/gu, Bc = /\x1B\[\d+m/gu, Wc = new Intl.NumberFormat("en", {
5391
+ }), wn = "\x1B[22m\x1B[1m\x1B[22m", Sn = "\x1B[2m", Kc = "\x1B[22m\x1B[36m", Bc = /\d+(?:,\d+)?\.\d{2} kB/gu, Wc = /\x1B\[\d+m/gu, _c = new Intl.NumberFormat("en", {
5388
5392
  maximumFractionDigits: 2,
5389
5393
  minimumFractionDigits: 2
5390
- }), bn = (e) => `${Wc.format(e)} kB`, _c = (e) => ({
5394
+ }), bn = (e) => `${_c.format(e)} kB`, Hc = (e) => ({
5391
5395
  name: "@arcgis/lumina:configureVite",
5392
5396
  async config({
5393
5397
  server: t,
@@ -5405,7 +5409,7 @@ const Oc = (e) => ({
5405
5409
  */
5406
5410
  loader: "src/loader.ts",
5407
5411
  // Entrypoint for bundling used components only:
5408
- ...await kr(e)
5412
+ ...await Ar(e)
5409
5413
  }, { loader: v, ...g } = h, S = e.environment === "development" || e.isInTest ? {
5410
5414
  "process.env.ESRI_INTERNAL": "true"
5411
5415
  } : void 0, b = !import.meta.url.includes("node_modules"), E = {
@@ -5535,18 +5539,18 @@ const Oc = (e) => ({
5535
5539
  css: C
5536
5540
  };
5537
5541
  }
5538
- }), Hc = (e) => ({
5542
+ }), Uc = (e) => ({
5539
5543
  name: "@arcgis/lumina:setAssetPath",
5540
5544
  apply: () => e.viteCommand === "build",
5541
5545
  config: (t) => ({
5542
5546
  base: t.base ?? e.options.assets?.defaultPath ?? We()
5543
5547
  })
5544
5548
  });
5545
- function Uc(e = R()) {
5549
+ function zc(e = R()) {
5546
5550
  const t = e.version ?? "0.0.1";
5547
5551
  return as(t);
5548
5552
  }
5549
- const zc = (e) => `/*! ${e} */`, x = (e) => (t, n) => {
5553
+ const qc = (e) => `/*! ${e} */`, x = (e) => (t, n) => {
5550
5554
  Object.defineProperty(t, n, {
5551
5555
  get() {
5552
5556
  throw new Error(
@@ -5580,7 +5584,7 @@ const re = {
5580
5584
  stencilLikeDocsJson: "docs/docs.json"
5581
5585
  };
5582
5586
  async function zi(e, t, n, i, s = R()) {
5583
- const r = qc(e, n, i, s), a = u.join(t, "lumina.ts");
5587
+ const r = Gc(e, n, i, s), a = u.join(t, "lumina.ts");
5584
5588
  if ((await W(a) ? await D(a, "utf8") : "") === r)
5585
5589
  return !1;
5586
5590
  if (process.env.CI)
@@ -5589,7 +5593,7 @@ async function zi(e, t, n, i, s = R()) {
5589
5593
  );
5590
5594
  return An(a, r), !0;
5591
5595
  }
5592
- function qc(e, t, n, i = R()) {
5596
+ function Gc(e, t, n, i = R()) {
5593
5597
  "@arcgis/components-controllers" in (i.dependencies ?? {}) && console.error(
5594
5598
  Ln.yellow(
5595
5599
  "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."
@@ -5605,11 +5609,11 @@ declare module "@arcgis/lumina" {
5605
5609
  interface ImportStencilElements extends ${r.map((m, f) => `JSX$${f}.IntrinsicElements`).join(", ")} {}
5606
5610
  }`, l = i.devDependencies ?? {}, d = n === "preview" ? "matchers" : n === "webdriverio" ? "webdriverio" : "playwright";
5607
5611
  return [
5608
- Gc,
5612
+ Vc,
5609
5613
  // Avoid cyclic references for tests in @arcgis/lumina
5610
5614
  i.name === "@arcgis/lumina" ? "" : `
5611
5615
  /// <reference types="@arcgis/lumina/typings" />`,
5612
- t ? Vc : "",
5616
+ t ? Xc : "",
5613
5617
  l.vitest ? `
5614
5618
  /// <reference types="vitest/config" />` : "",
5615
5619
  l["@vitest/browser"] ? `
@@ -5623,7 +5627,7 @@ declare module "@arcgis/lumina" {
5623
5627
  `
5624
5628
  ].join("");
5625
5629
  }
5626
- const Gc = `/**
5630
+ const Vc = `/**
5627
5631
  * This file is autogenerated by \`@arcgis/lumina-compiler\` - do not edit it manually.
5628
5632
  * Manual edits will be overwritten.
5629
5633
  *
@@ -5631,7 +5635,7 @@ const Gc = `/**
5631
5635
  * as well as @arcgis/core typings if you use @arcgis/core.
5632
5636
  *
5633
5637
  * If you need to provide additional typings, create a separate file.
5634
- */`, Vc = `
5638
+ */`, Xc = `
5635
5639
  /// <reference types="@arcgis/core/interfaces" />`, Tn = "@arcgis/lumina:dependencySupport", qi = (e, t) => e.viteCommand === "serve" && /**
5636
5640
  * Vitest started calling transformIndexHtml in browser mode versions ^2.1.4
5637
5641
  * However, it is a bit buggy (see
@@ -5643,10 +5647,10 @@ const Gc = `/**
5643
5647
  * is doing:
5644
5648
  * https://github.com/storybookjs/storybook/blob/a5c2cf1712f70b4e3ecf38d3c98e7db8e8d67849/code/builders/builder-vite/src/plugins/code-generator-plugin.ts#L110
5645
5649
  */
5646
- e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, Xc = (e) => ({
5650
+ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, Qc = (e) => ({
5647
5651
  name: Tn,
5648
5652
  configResolved() {
5649
- !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = Qc(e).catch(
5653
+ !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = Yc(e).catch(
5650
5654
  (t) => console.error(`${Tn}: Failed to update package's src/lumina.ts`, t)
5651
5655
  ));
5652
5656
  },
@@ -5694,7 +5698,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
5694
5698
  await e._updateLuminaTsPromise;
5695
5699
  }
5696
5700
  });
5697
- async function Qc(e) {
5701
+ async function Yc(e) {
5698
5702
  const n = (await Promise.all([ue, Di(e)])).flat();
5699
5703
  if (!await zi(
5700
5704
  n,
@@ -5705,21 +5709,21 @@ async function Qc(e) {
5705
5709
  return;
5706
5710
  let s = !1;
5707
5711
  function r() {
5708
- s || console.warn(Yc), s = !0;
5712
+ s || console.warn(Zc), s = !0;
5709
5713
  }
5710
5714
  process.on("exit", () => {
5711
5715
  r(), clearTimeout(c);
5712
5716
  });
5713
5717
  const c = setTimeout(r, 2e3);
5714
5718
  }
5715
- const Yc = Ln.greenBright(
5719
+ const Zc = Ln.greenBright(
5716
5720
  `lumina.ts has been updated (potentially because your dependencies changed). Please commit the updated file.
5717
5721
  If build failed with TypeScript errors, try running the build again to check whether new lumina.ts resolves the errors.`
5718
5722
  );
5719
- var Zc = Object.defineProperty, P = (e, t, n, i) => {
5723
+ var el = Object.defineProperty, P = (e, t, n, i) => {
5720
5724
  for (var s = void 0, r = e.length - 1, a; r >= 0; r--)
5721
5725
  (a = e[r]) && (s = a(t, n, s) || s);
5722
- return s && Zc(t, n, s), s;
5726
+ return s && el(t, n, s), s;
5723
5727
  };
5724
5728
  const Ce = "@arcgis/lumina:compilerContextPlugin";
5725
5729
  class $ {
@@ -5753,7 +5757,7 @@ class $ {
5753
5757
  `${Ce}: Vite output directory is set to the root directory. This can produce unexpected behavior. Please set the output directory to a subdirectory of the root directory (i.e dist/)`
5754
5758
  ) : p.startsWith("..") && console.warn(
5755
5759
  `${Ce}: 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.`
5756
- ), 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), pc(this, s.build.sourcemap !== !1), qi(this) && ye(this).catch(console.error);
5760
+ ), 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), uc(this, s.build.sourcemap !== !1), qi(this) && ye(this).catch(console.error);
5757
5761
  }
5758
5762
  },
5759
5763
  configureServer: {
@@ -5770,9 +5774,9 @@ class $ {
5770
5774
  webTypes: n.jetBrains === !1 ? void 0 : n.jetBrains?.webTypesFileName ? se(n.jetBrains.webTypesFileName) : re.webTypes,
5771
5775
  vsCodeHtml: n.vsCode === !1 ? void 0 : n.vsCode?.htmlFileName ? se(n.vsCode.htmlFileName) : re.vsCodeHtml,
5772
5776
  vsCodeCss: n.vsCode === !1 ? void 0 : n.vsCode?.cssFileName ? se(n.vsCode.cssFileName) : re.vsCodeCss
5773
- }, li().catch(console.error), this.componentFilesPromise = Tt(this, u.resolve("src/components")), dc(this);
5774
- const i = t.build?.preamble ?? Uc();
5775
- this.banner = zc(i);
5777
+ }, li().catch(console.error), this.componentFilesPromise = Tt(this, u.resolve("src/components")), pc(this);
5778
+ const i = t.build?.preamble ?? zc();
5779
+ this.banner = qc(i);
5776
5780
  }
5777
5781
  _inferBuildSetup({ command: t, mode: n }, i) {
5778
5782
  this.isInTest = process.env.NODE_ENV === "test", n === "production" || n === "development" ? this.environment = n : n === "test" || n === "benchmark" ? (this.environment = "development", this.isInTest = !0) : (console.warn(`${Et}: Vite is running in unknown mode "${n}". Assuming development`), this.environment = "development"), this.viteCommand = t;
@@ -5913,7 +5917,7 @@ P([
5913
5917
  P([
5914
5918
  x("configResolved()")
5915
5919
  ], $.prototype, "_typeScriptPrinter");
5916
- const el = (e) => ({
5920
+ const tl = (e) => ({
5917
5921
  name: "@arcgis/lumina:addNonLazyImports",
5918
5922
  apply: () => e.viteCommand === "build",
5919
5923
  generateBundle(t, n) {
@@ -5949,7 +5953,7 @@ const el = (e) => ({
5949
5953
  return [];
5950
5954
  const l = u.dirname(r), d = de(l, e.dir.srcComponents, e), p = u.relative(e.dir.src, d);
5951
5955
  function m(I) {
5952
- const w = Ha(_a(e, I, r), p);
5956
+ const w = Ua(Ha(e, I, r), p);
5953
5957
  if (w !== `./${p}`)
5954
5958
  return w.startsWith(".") ? `${w}/${En}` : w;
5955
5959
  }
@@ -5971,12 +5975,12 @@ ${E}
5971
5975
  deferredLoaders${b.join("")};` : E;
5972
5976
  return [
5973
5977
  L(u.join(e.dir.dist, p, En), T),
5974
- L(u.join(e.dir.dist, p, tl), C)
5978
+ L(u.join(e.dir.dist, p, nl), C)
5975
5979
  ];
5976
5980
  });
5977
5981
  await Promise.all(s);
5978
5982
  }
5979
- }), En = "index.js", tl = "index.d.ts", Gi = (e, t, n, i = /* @__PURE__ */ new Set()) => t.flatMap((s) => n.has(s) ? [s] : i.has(s) ? [] : (i.add(s), Gi(e, e[s].referencedBy, n, i))), nl = (e) => ({
5983
+ }), En = "index.js", nl = "index.d.ts", Gi = (e, t, n, i = /* @__PURE__ */ new Set()) => t.flatMap((s) => n.has(s) ? [s] : i.has(s) ? [] : (i.add(s), Gi(e, e[s].referencedBy, n, i))), il = (e) => ({
5980
5984
  name: "@arcgis/lumina:handleDynamicAssets",
5981
5985
  configureServer(t) {
5982
5986
  e.server = t, !e.isInPuppeteerTestBackEnd && Cn(e).forEach(({ assets: n, transformers: i }) => le(e, n, i));
@@ -5995,20 +5999,20 @@ function Cn(e) {
5995
5999
  "type" in i ? t.push(i) : "assets" in i && t.push(...i.assets);
5996
6000
  }), t.length > 0 && n.push({ assets: t }), e.assetsToProvide = void 0, n;
5997
6001
  }
5998
- const $n = "@arcgis/lumina:updatePackageJson", il = (e) => ({
6002
+ const $n = "@arcgis/lumina:updatePackageJson", sl = (e) => ({
5999
6003
  name: $n,
6000
6004
  apply: () => e.viteCommand === "serve" && e.environment === "development" && !e.isInTest && !e.isInCi,
6001
6005
  configResolved() {
6002
- sl(e).catch(
6006
+ rl(e).catch(
6003
6007
  (t) => console.error(`${$n}: Failed to update package's package.json`, t)
6004
6008
  );
6005
6009
  }
6006
6010
  });
6007
- async function sl(e) {
6008
- const t = u.join(e.dir.root, "package.json"), n = JSON.parse(await D(t, "utf-8")), i = rl(n, e);
6011
+ async function rl(e) {
6012
+ const t = u.join(e.dir.root, "package.json"), n = JSON.parse(await D(t, "utf-8")), i = ol(n, e);
6009
6013
  i && An(t, JSON.stringify(i, null, 2));
6010
6014
  }
6011
- function rl(e, t) {
6015
+ function ol(e, t) {
6012
6016
  const n = e?.devDependencies ?? {};
6013
6017
  Object.keys(e?.peerDependencies ?? {}).forEach((a) => {
6014
6018
  a in n || console.error(
@@ -6036,20 +6040,20 @@ function rl(e, t) {
6036
6040
  if (i)
6037
6041
  return e;
6038
6042
  }
6039
- const ol = (e) => ({
6043
+ const al = (e) => ({
6040
6044
  timestamp: e.apiJson.timestamp,
6041
6045
  compiler: e.apiJson.compiler,
6042
- components: al(e),
6046
+ components: cl(e),
6043
6047
  typeLibrary: {}
6044
6048
  });
6045
- function al(e) {
6049
+ function cl(e) {
6046
6050
  const t = [];
6047
6051
  for (const n of e.apiJson.modules)
6048
6052
  for (const i of n.declarations)
6049
- "customElement" in i && t.push(cl(i, n.path));
6053
+ "customElement" in i && t.push(ll(i, n.path));
6050
6054
  return t;
6051
6055
  }
6052
- function cl(e, t) {
6056
+ function ll(e, t) {
6053
6057
  const n = e.superclass ? [{ name: "superclass", text: JSON.stringify(e.superclass) }] : [];
6054
6058
  return {
6055
6059
  filePath: t,
@@ -6064,9 +6068,9 @@ function cl(e, t) {
6064
6068
  dependencies: [],
6065
6069
  dependencyGraph: {},
6066
6070
  deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated,
6067
- props: e.members.map(ll).filter(N),
6068
- methods: e.members.map(dl).filter(N),
6069
- events: e.events?.map(pl) ?? [],
6071
+ props: e.members.map(dl).filter(N),
6072
+ methods: e.members.map(pl).filter(N),
6073
+ events: e.events?.map(ul) ?? [],
6070
6074
  styles: e.cssProperties?.map((i) => ({
6071
6075
  name: i.name,
6072
6076
  annotation: "prop",
@@ -6078,7 +6082,7 @@ function cl(e, t) {
6078
6082
  listeners: []
6079
6083
  };
6080
6084
  }
6081
- function ll(e) {
6085
+ function dl(e) {
6082
6086
  if (e.kind !== "field")
6083
6087
  return;
6084
6088
  const t = e, n = t.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(t.inheritedFrom) }] : [], i = t.readonly ? [{ name: "readonly", text: "" }] : [], s = t.docsTags?.some((r) => r.name === "required") ?? !1;
@@ -6119,7 +6123,7 @@ const Lt = (e) => Object.fromEntries(
6119
6123
  ]
6120
6124
  ) ?? []
6121
6125
  );
6122
- function dl(e) {
6126
+ function pl(e) {
6123
6127
  if (e.kind !== "method")
6124
6128
  return;
6125
6129
  const t = e, n = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [], i = t.parameters?.map(({ name: s, type: r, description: a }) => ({
@@ -6150,7 +6154,7 @@ function dl(e) {
6150
6154
  deprecation: typeof t.deprecated == "boolean" ? t.deprecated ? "" : void 0 : t.deprecated
6151
6155
  };
6152
6156
  }
6153
- function pl(e) {
6157
+ function ul(e) {
6154
6158
  const t = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [];
6155
6159
  return {
6156
6160
  event: e.name,
@@ -6178,14 +6182,14 @@ const Vi = (e) => e.flatMap(
6178
6182
  name: `::part(${n.name})`,
6179
6183
  description: n.description || void 0
6180
6184
  })) ?? []
6181
- ), ul = (e) => e.attributes?.map((t) => ({
6185
+ ), ml = (e) => e.attributes?.map((t) => ({
6182
6186
  name: t.name ?? "",
6183
6187
  description: ze(t.description, t.deprecated) || void 0,
6184
6188
  default: t.default,
6185
6189
  value: {
6186
- type: ml(t.type.values?.map(Xn))
6190
+ type: fl(t.type.values?.map(Xn))
6187
6191
  }
6188
- })) ?? [], ml = (e) => e?.length === 1 ? e[0] : e, ze = (e = "", t = !1) => t === !1 ? e : `**Deprecated**${typeof t == "string" ? `: ${t}` : ""}. ${e}`, ge = {
6192
+ })) ?? [], fl = (e) => e?.length === 1 ? e[0] : e, ze = (e = "", t = !1) => t === !1 ? e : `**Deprecated**${typeof t == "string" ? `: ${t}` : ""}. ${e}`, ge = {
6189
6193
  slots: "Slots",
6190
6194
  events: "Events",
6191
6195
  cssProperties: "CSS Properties",
@@ -6193,7 +6197,7 @@ const Vi = (e) => e.flatMap(
6193
6197
  methods: "Methods"
6194
6198
  };
6195
6199
  function Qi(e) {
6196
- const t = fl(e.slots), n = yl(e.events), i = hl(e.cssProperties), s = gl(e.cssParts), r = vl(e.members), a = ze(e.description, e.deprecated).trim();
6200
+ const t = yl(e.slots), n = hl(e.events), i = gl(e.cssProperties), s = vl(e.cssParts), r = wl(e.members), a = ze(e.description, e.deprecated).trim();
6197
6201
  return [...a ? [`${a}
6198
6202
  --`] : [], n, r, t, i, s].filter(Boolean).join(`
6199
6203
 
@@ -6201,28 +6205,28 @@ function Qi(e) {
6201
6205
  }
6202
6206
  const ve = (e, t) => t === void 0 || t.length === 0 ? "" : `### ${e}
6203
6207
  ${t.join(`
6204
- `)}`, fl = (e) => ve(
6208
+ `)}`, yl = (e) => ve(
6205
6209
  ge.slots,
6206
6210
  e?.map((t) => `- ${t.name ? `**${t.name}**` : "_default_"} - ${t.description}`)
6207
- ), yl = (e) => ve(
6211
+ ), hl = (e) => ve(
6208
6212
  ge.events,
6209
6213
  e?.filter((t) => t.name !== null && t.name !== void 0).map((t) => `- **${t.name}**${t.description ? ` - ${t.description}` : ""}`)
6210
- ), hl = (e = []) => ve(
6214
+ ), gl = (e = []) => ve(
6211
6215
  ge.cssProperties,
6212
6216
  e?.map(
6213
6217
  (t) => `- **${t.name}** - ${t.description} ${t.default ? `_(default: ${t.default})_}` : ""}`
6214
6218
  )
6215
- ), gl = (e) => ve(
6219
+ ), vl = (e) => ve(
6216
6220
  ge.cssParts,
6217
6221
  e?.map((t) => `- **${t.name}** - ${t.description}`)
6218
- ), vl = (e) => ve(
6222
+ ), wl = (e) => ve(
6219
6223
  ge.methods,
6220
6224
  e.filter(is).map(
6221
6225
  (t) => [`- \`${t.name}${t.signature}\``, ze(t.description, t.deprecated)].filter(Boolean).join(" - ")
6222
6226
  )
6223
6227
  );
6224
- function wl(e, t) {
6225
- const n = Sl(e), i = Vi(e), s = Xi(e), r = R();
6228
+ function Sl(e, t) {
6229
+ const n = bl(e), i = Vi(e), s = Xi(e), r = R();
6226
6230
  return {
6227
6231
  $schema: "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
6228
6232
  name: r.name,
@@ -6240,21 +6244,21 @@ function wl(e, t) {
6240
6244
  }
6241
6245
  };
6242
6246
  }
6243
- const Sl = (e) => e.map((t) => ({
6247
+ const bl = (e) => e.map((t) => ({
6244
6248
  name: t.tagName,
6245
6249
  description: Qi(t),
6246
6250
  "doc-url": t.demos?.[0]?.url,
6247
- attributes: ul(t),
6251
+ attributes: ml(t),
6248
6252
  slots: t.slots?.map((n) => ({
6249
6253
  name: n.name,
6250
6254
  description: n.description
6251
6255
  })),
6252
6256
  events: xn(t),
6253
6257
  js: {
6254
- properties: bl(t),
6258
+ properties: Tl(t),
6255
6259
  events: xn(t)
6256
6260
  }
6257
- })), bl = (e) => e.members.filter(ss).map((t) => ({
6261
+ })), Tl = (e) => e.members.filter(ss).map((t) => ({
6258
6262
  name: t.name,
6259
6263
  description: t.description,
6260
6264
  type: t.type?.text
@@ -6262,30 +6266,30 @@ const Sl = (e) => e.map((t) => ({
6262
6266
  name: t.name,
6263
6267
  type: t.type?.text,
6264
6268
  description: t.description
6265
- })) ?? [], Tl = (e) => e.map((t) => ({
6269
+ })) ?? [], El = (e) => e.map((t) => ({
6266
6270
  name: t.tagName,
6267
6271
  description: Qi(t),
6268
- attributes: El(t),
6272
+ attributes: Cl(t),
6269
6273
  references: t.demos?.map((n) => ({ name: n.description, url: n.url })) ?? []
6270
- })), El = (e) => e.attributes?.map((t) => ({
6274
+ })), Cl = (e) => e.attributes?.map((t) => ({
6271
6275
  name: t.name,
6272
6276
  description: ze(t.description, t.deprecated) || void 0,
6273
- values: Cl(t)
6274
- })) ?? [], Cl = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], $l = (e) => ({
6277
+ values: $l(t)
6278
+ })) ?? [], $l = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], xl = (e) => ({
6275
6279
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
6276
6280
  version: 1.1,
6277
- tags: Tl(e)
6278
- }), xl = (e) => ({
6281
+ tags: El(e)
6282
+ }), Pl = (e) => ({
6279
6283
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
6280
6284
  version: 1.1,
6281
6285
  properties: Vi(e),
6282
6286
  pseudoElements: Xi(e)
6283
- }), Pl = "@arcgis/lumina:generateDocs";
6284
- function Il(e) {
6287
+ }), Il = "@arcgis/lumina:generateDocs";
6288
+ function kl(e) {
6285
6289
  return e._documentationFileNames.stencilLikeDocsJson !== void 0 && e.provideAssets([
6286
6290
  {
6287
6291
  type: "dynamic",
6288
- source: () => JSON.stringify(ol(e), null, 2),
6292
+ source: () => JSON.stringify(al(e), null, 2),
6289
6293
  destination: u.join("../..", e._documentationFileNames.stencilLikeDocsJson)
6290
6294
  }
6291
6295
  ]), e._documentationFileNames.apiJson !== void 0 && e.provideAssets([
@@ -6295,7 +6299,7 @@ function Il(e) {
6295
6299
  destination: u.join("../..", e._documentationFileNames.apiJson)
6296
6300
  }
6297
6301
  ]), {
6298
- name: Pl,
6302
+ name: Il,
6299
6303
  async writeBundle() {
6300
6304
  if (e.isInStorybook)
6301
6305
  return;
@@ -6305,24 +6309,24 @@ function Il(e) {
6305
6309
  await _i(a);
6306
6310
  const c = [];
6307
6311
  if (i !== void 0) {
6308
- const l = JSON.stringify($l(e.apiJsonComponents), null, 2);
6312
+ const l = JSON.stringify(xl(e.apiJsonComponents), null, 2);
6309
6313
  c.push(L(i, l));
6310
6314
  }
6311
6315
  if (s !== void 0) {
6312
- const l = JSON.stringify(xl(e.apiJsonComponents), null, 2);
6316
+ const l = JSON.stringify(Pl(e.apiJsonComponents), null, 2);
6313
6317
  c.push(L(s, l));
6314
6318
  }
6315
6319
  if (r !== void 0) {
6316
- const l = wl(e.apiJsonComponents, typeof t == "object" ? t : {});
6320
+ const l = Sl(e.apiJsonComponents, typeof t == "object" ? t : {});
6317
6321
  c.push(L(r, JSON.stringify(l, null, 2)));
6318
6322
  }
6319
6323
  await Promise.all(c);
6320
6324
  }
6321
6325
  };
6322
6326
  }
6323
- const kl = (e) => `import type { h, EventHandler } from "@arcgis/lumina";
6327
+ const Al = (e) => `import type { h, EventHandler } from "@arcgis/lumina";
6324
6328
 
6325
- ${e.map(Al).join(`
6329
+ ${e.map(Ll).join(`
6326
6330
 
6327
6331
  `)}
6328
6332
 
@@ -6334,7 +6338,7 @@ ${e.map(({ tagName: t, pascalCaseName: n }) => ` "${t}": Lumina${n};`).join
6334
6338
  }
6335
6339
  }
6336
6340
  }`;
6337
- function Al({ name: e, pascalCaseName: t, members: n, events: i = [] }) {
6341
+ function Ll({ name: e, pascalCaseName: t, members: n, events: i = [] }) {
6338
6342
  const [s, r] = Ue(e, n);
6339
6343
  return [
6340
6344
  `interface Lumina${t} extends ${s}h.JSX.HTMLAttributes<HTML${t}Element> {
@@ -6347,7 +6351,7 @@ function Al({ name: e, pascalCaseName: t, members: n, events: i = [] }) {
6347
6351
  r
6348
6352
  ].join("");
6349
6353
  }
6350
- function Ll(e) {
6354
+ function Fl(e) {
6351
6355
  const t = ` interface IntrinsicElements extends PreactJsx.IntrinsicElements {
6352
6356
  ${e.map(({ pascalCaseName: n, tagName: i }) => ` "${i}": Preact${n};`).join(`
6353
6357
  `)}
@@ -6355,7 +6359,7 @@ ${e.map(({ pascalCaseName: n, tagName: i }) => ` "${i}": Preact${n};`).join
6355
6359
  return `import { JSX as PreactJsx } from "preact";
6356
6360
  import type { EventHandler } from "@arcgis/lumina";
6357
6361
 
6358
- ${e.map(Fl).join(`
6362
+ ${e.map(Nl).join(`
6359
6363
 
6360
6364
  `)}
6361
6365
 
@@ -6368,7 +6372,7 @@ ${t}
6368
6372
  }
6369
6373
  }`;
6370
6374
  }
6371
- function Fl({ name: e, pascalCaseName: t, members: n, events: i = [] }) {
6375
+ function Nl({ name: e, pascalCaseName: t, members: n, events: i = [] }) {
6372
6376
  const [s, r] = Ue(e, n);
6373
6377
  return [
6374
6378
  `interface Preact${t} extends ${s}PreactJsx.HTMLAttributes<HTML${t}Element> {
@@ -6381,13 +6385,13 @@ function Fl({ name: e, pascalCaseName: t, members: n, events: i = [] }) {
6381
6385
  r
6382
6386
  ].join("");
6383
6387
  }
6384
- function Nl(e) {
6388
+ function jl(e) {
6385
6389
  const t = e.map(({ pascalCaseName: n, tagName: i }) => ` "${i}": React${n};`).join(`
6386
6390
  `);
6387
6391
  return `import type { HTMLProps } from 'react';
6388
6392
  import type { EventHandler } from "@arcgis/lumina";
6389
6393
 
6390
- ${e.map(jl).join(`
6394
+ ${e.map(Dl).join(`
6391
6395
 
6392
6396
  `)}
6393
6397
 
@@ -6413,7 +6417,7 @@ ${t}
6413
6417
  }
6414
6418
  }`;
6415
6419
  }
6416
- function jl({ name: e, pascalCaseName: t, members: n, events: i = [] }) {
6420
+ function Dl({ name: e, pascalCaseName: t, members: n, events: i = [] }) {
6417
6421
  const [s, r] = Ue(e, n);
6418
6422
  return [
6419
6423
  `interface React${t} extends ${s}HTMLProps<HTML${t}Element> {
@@ -6426,10 +6430,10 @@ function jl({ name: e, pascalCaseName: t, members: n, events: i = [] }) {
6426
6430
  r
6427
6431
  ].join("");
6428
6432
  }
6429
- const Dl = (e) => `import { JSXBase as StencilJsx } from "@stencil/core/internal";
6433
+ const Rl = (e) => `import { JSXBase as StencilJsx } from "@stencil/core/internal";
6430
6434
  import type { EventHandler } from "@arcgis/lumina";
6431
6435
 
6432
- ${e.map(Rl).join(`
6436
+ ${e.map(Ml).join(`
6433
6437
 
6434
6438
  `)}
6435
6439
 
@@ -6447,7 +6451,7 @@ declare module "@stencil/core/internal/stencil-public-runtime" {
6447
6451
  interface IntrinsicElements extends ExposedElements {}
6448
6452
  }
6449
6453
  }`;
6450
- function Rl({ name: e, pascalCaseName: t, members: n, events: i = [] }) {
6454
+ function Ml({ name: e, pascalCaseName: t, members: n, events: i = [] }) {
6451
6455
  const [s, r] = Ue(e, n);
6452
6456
  return [
6453
6457
  `interface Stencil${t} extends ${s}StencilJsx.HTMLAttributes<HTML${t}Element> {
@@ -6460,16 +6464,16 @@ function Rl({ name: e, pascalCaseName: t, members: n, events: i = [] }) {
6460
6464
  r
6461
6465
  ].join("");
6462
6466
  }
6463
- const Ml = (e, t, n) => [n, t, Ol(e), Jl(e)].join(`
6467
+ const Ol = (e, t, n) => [n, t, Jl(e), Kl(e)].join(`
6464
6468
 
6465
- `), Ol = (e) => e.filter((t) => (t.events?.length ?? 0) > 0).map(
6469
+ `), Jl = (e) => e.filter((t) => (t.events?.length ?? 0) > 0).map(
6466
6470
  ({ pascalCaseName: t }) => `export interface ${t}CustomEvent<T> extends CustomEvent<T> {
6467
6471
  detail: T;
6468
6472
  target: HTML${t}Element;
6469
6473
  currentTarget: HTML${t}Element;
6470
6474
  }`
6471
6475
  ).join(`
6472
- `), Jl = (e) => `export { ToEvents, TargetedEvent } from "@arcgis/lumina";
6476
+ `), Kl = (e) => `export { ToEvents, TargetedEvent } from "@arcgis/lumina";
6473
6477
 
6474
6478
  declare global {
6475
6479
  interface HTMLElementTagNameMap {
@@ -6477,12 +6481,12 @@ ${e.map(({ pascalCaseName: t, tagName: n }) => ` "${n}": HTML${t}Element;`).j
6477
6481
  `)}
6478
6482
  }
6479
6483
 
6480
- ${e.map(Kl).join(`
6484
+ ${e.map(Bl).join(`
6481
6485
  `).split(`
6482
6486
  `).map((t) => t.length > 0 ? ` ${t}` : t).join(`
6483
6487
  `)}
6484
6488
  }`;
6485
- function Kl({ name: e, pascalCaseName: t, events: n = [] }) {
6489
+ function Bl({ name: e, pascalCaseName: t, events: n = [] }) {
6486
6490
  const i = n.length > 0, s = `${t}CustomEvent`, r = `HTML${t}Element`;
6487
6491
  return [
6488
6492
  i ? `interface ${r}EventMap {
@@ -6501,7 +6505,7 @@ ${i ? ` addEventListener<K extends keyof ${r}EventMap>(type: K, listener: (this
6501
6505
  }`
6502
6506
  ].join("");
6503
6507
  }
6504
- function Bl(e) {
6508
+ function Wl(e) {
6505
6509
  let t;
6506
6510
  return {
6507
6511
  name: "@arcgis/lumina:generateFrameworkTypes",
@@ -6509,11 +6513,11 @@ function Bl(e) {
6509
6513
  generateBundle() {
6510
6514
  if (e.isInStorybook)
6511
6515
  return;
6512
- t = Aa(e);
6516
+ t = La(e);
6513
6517
  const n = u.join(e.dir.dist, "index.d.ts");
6514
6518
  e._declarationTextTransformers.push((i) => {
6515
6519
  const { filePath: s, content: r } = i;
6516
- return s === n ? { filePath: s, content: Ml(e.apiJsonComponents, r, t) } : i;
6520
+ return s === n ? { filePath: s, content: Ol(e.apiJsonComponents, r, t) } : i;
6517
6521
  });
6518
6522
  },
6519
6523
  async writeBundle() {
@@ -6523,10 +6527,10 @@ function Bl(e) {
6523
6527
  await _(n);
6524
6528
  const i = `/// <reference types="../index.d.ts" />
6525
6529
  ${t.replaceAll("./", "../")}`, s = Object.entries({
6526
- react: Nl(e.apiJsonComponents),
6527
- preact: Ll(e.apiJsonComponents),
6528
- stencil: Dl(e.apiJsonComponents),
6529
- lumina: kl(e.apiJsonComponents)
6530
+ react: jl(e.apiJsonComponents),
6531
+ preact: Fl(e.apiJsonComponents),
6532
+ stencil: Rl(e.apiJsonComponents),
6533
+ lumina: Al(e.apiJsonComponents)
6530
6534
  }).map(
6531
6535
  async ([r, a]) => await L(u.join(n, `${r}.d.ts`), `${i}
6532
6536
  ${a}`)
@@ -6535,20 +6539,20 @@ ${a}`)
6535
6539
  }
6536
6540
  };
6537
6541
  }
6538
- function Wl(e) {
6542
+ function _l(e) {
6539
6543
  return {
6540
6544
  name: "@arcgis/lumina:buildWrappers",
6541
6545
  apply: () => e.viteCommand === "build" && !!e.options.build?.wrappers?.length,
6542
6546
  async writeBundle() {
6543
6547
  e.isInStorybook || await Promise.all(
6544
6548
  e.options.build?.wrappers?.map(async (t) => {
6545
- t.type === "react18" && await Hl(e, t);
6549
+ t.type === "react18" && await Ul(e, t);
6546
6550
  }) ?? []
6547
6551
  );
6548
6552
  }
6549
6553
  };
6550
6554
  }
6551
- const _l = `
6555
+ const Hl = `
6552
6556
  import React from "react";
6553
6557
  import { createComponent } from "@lit/react";
6554
6558
  import type { EventName } from "@lit/react";
@@ -6556,15 +6560,15 @@ import { makeReactWrapperFactory, getReactWrapperOptions } from "@arcgis/lumina"
6556
6560
 
6557
6561
  const createWrapper = /*@__PURE__*/ makeReactWrapperFactory(React, createComponent) as typeof createComponent;
6558
6562
  `;
6559
- async function Hl(e, t) {
6563
+ async function Ul(e, t) {
6560
6564
  const { name: n } = R(), i = [];
6561
6565
  for (const a of e.apiJson.modules)
6562
6566
  for (const c of a.declarations)
6563
- "customElement" in c && i.push(Ul(c));
6564
- const s = [`/// <reference types="${n}" preserve="true" />`, _l, ...i].join(""), r = u.resolve(t.proxiesFile);
6567
+ "customElement" in c && i.push(zl(c));
6568
+ const s = [`/// <reference types="${n}" preserve="true" />`, Hl, ...i].join(""), r = u.resolve(t.proxiesFile);
6565
6569
  await _(u.dirname(r), { recursive: !0 }), await L(r, s);
6566
6570
  }
6567
- function Ul(e) {
6571
+ function zl(e) {
6568
6572
  const t = e.events?.map(
6569
6573
  (n) => ` ${he(`on${cs(n.name)}`)}: "${n.name}" as EventName<HTML${e.pascalCaseName}Element["${n.name}"]>,`
6570
6574
  ).join(`
@@ -6580,33 +6584,33 @@ ${t}
6580
6584
  );
6581
6585
  `;
6582
6586
  }
6583
- function rd(e = {}) {
6587
+ function od(e = {}) {
6584
6588
  const t = new $(e), n = [
6585
6589
  t._plugin,
6586
- _c(t),
6587
6590
  Hc(t),
6591
+ Uc(t),
6592
+ sl(t),
6593
+ kr(t),
6594
+ Ac(t),
6595
+ Wl(t),
6596
+ kl(t),
6597
+ lc(t),
6598
+ ao(t),
6599
+ Rc(t),
6588
6600
  il(t),
6589
- Ir(t),
6590
- kc(t),
6591
- Bl(t),
6592
- Il(t),
6593
- cc(t),
6594
- oo(t),
6595
- Dc(t),
6596
- nl(t),
6597
- el(t),
6598
- Xc(t),
6601
+ tl(t),
6602
+ Qc(t),
6599
6603
  gs(t),
6600
- fc(t),
6604
+ yc(t),
6601
6605
  // Deprecated feature will be dropped in https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2765
6602
6606
  // eslint-disable-next-line @typescript-eslint/no-deprecated
6603
- Mc(t),
6604
- Wl(t),
6605
- Oc(t)
6607
+ Oc(t),
6608
+ _l(t),
6609
+ Jc(t)
6606
6610
  ].filter(N);
6607
6611
  return n.context = t, n;
6608
6612
  }
6609
- const od = {
6613
+ const ad = {
6610
6614
  initializeComponentDependencies: li,
6611
6615
  updateLuminaTs: zi,
6612
6616
  propertyToAttributeMappings: J,
@@ -6620,8 +6624,8 @@ const od = {
6620
6624
  isPropertyEscapeNeeded: He
6621
6625
  };
6622
6626
  export {
6623
- jo as LuminaApiExtractor,
6624
- od as exportsForCodemod,
6627
+ Do as LuminaApiExtractor,
6628
+ ad as exportsForCodemod,
6625
6629
  We as inferCdnUrl,
6626
- rd as useLumina
6630
+ od as useLumina
6627
6631
  };