@arcgis/lumina-compiler 6.0.0-next.13 → 6.0.0-next.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,32 +1,32 @@
1
- import { externalizeDependencies as Es } from "@arcgis/node-toolkit/vite/externalizeDependenciesPlugin";
2
- import { isNotUndefined as D } from "@arcgis/toolkit/predicate";
3
- import { f as b, l as T } from "./chunks/logger.js";
1
+ import { externalizeDependencies as Cs } from "@arcgis/node-toolkit/vite/externalizeDependenciesPlugin";
2
+ import { isNotUndefined as F } from "@arcgis/toolkit/predicate";
3
+ import { f as b, l as $ } from "./chunks/logger.js";
4
4
  import o from "typescript";
5
- import { camelToKebab as ni, getPreamble as Ts, uncapitalize as Et, capitalize as $s } from "@arcgis/toolkit/string";
6
- import { lazyMetaSubItemJoiner as Ps, lazyMetaItemJoiner as Je, lazyMetaGroupJoiner as ks, propertyFlagAttribute as Tt, propertyFlagReflect as Is, propertyFlagBoolean as xs, propertyFlagNumber as As, propertyFlagState as Ls, propertyFlagReadOnly as Ns, propertyFlagNoAccessor as js, propertyFlagUseDefault as Fs } from "@arcgis/lumina/config";
7
- import { path as u, isPosix as oi, toPosixPathSeparators as G, toSystemPathSeparators as De, getCwd as ai } from "@arcgis/node-toolkit/path";
8
- import { isApiMethodAsync as Ds, globalPackageIdentifier as Rs, isApiMethod as Os, isApiProperty as Ms } from "@arcgis/api-extractor/utils/apiHelpers";
9
- import { existsAsync as K, findPath as at } from "@arcgis/node-toolkit/file";
10
- import { readFile as z, readdir as ct, mkdir as X, writeFile as _, copyFile as Js, rm as Bs, cp as Ks } from "node:fs/promises";
11
- import { retrievePackageJson as j, fetchPackageLocation as $e, asyncRetrievePackageJson as ci } from "@arcgis/node-toolkit/packageJson";
12
- import { build as _s } from "esbuild";
13
- import Ws from "mime-types";
14
- import { forEachWithConcurrency as Us } from "@arcgis/toolkit/promise";
15
- import { glob as zs } from "tinyglobby";
5
+ import { camelToKebab as ri, getPreamble as Es, uncapitalize as Et } from "@arcgis/toolkit/string";
6
+ import { lazyMetaSubItemJoiner as Ts, lazyMetaItemJoiner as Je, lazyMetaGroupJoiner as $s, propertyFlagAttribute as Tt, propertyFlagReflect as Ps, propertyFlagBoolean as ks, propertyFlagNumber as Is, propertyFlagState as xs, propertyFlagReadOnly as As, propertyFlagNoAccessor as Ls, propertyFlagUseDefault as Ns } from "@arcgis/lumina/config";
7
+ import { path as u, isPosix as ni, toPosixPathSeparators as G, toSystemPathSeparators as De, getCwd as oi } from "@arcgis/node-toolkit/path";
8
+ import { isApiMethodAsync as js, globalPackageIdentifier as Fs, isApiMethod as Ds, isApiProperty as Rs } from "@arcgis/api-extractor/utils/apiHelpers";
9
+ import { existsAsync as _, findPath as at } from "@arcgis/node-toolkit/file";
10
+ import { readFile as W, readdir as ct, mkdir as ie, writeFile as z, copyFile as Os, rm as Ms, cp as Js } from "node:fs/promises";
11
+ import { retrievePackageJson as D, fetchPackageLocation as $e, asyncRetrievePackageJson as ai } from "@arcgis/node-toolkit/packageJson";
12
+ import { build as Bs } from "esbuild";
13
+ import Ks from "mime-types";
14
+ import { forEachWithConcurrency as _s } from "@arcgis/toolkit/promise";
15
+ import { glob as Us } from "tinyglobby";
16
16
  import { renameComponentFolder as Ge } from "@arcgis/api-extractor/extractor/webComponent/pathMapping";
17
- import { readFileSync as Hs, writeFileSync as li } from "node:fs";
18
- import { useApiExtractor as qs } from "@arcgis/api-extractor/vite/plugin";
19
- import { styleText as Vs } from "node:util";
20
- import { unsafeGetUndocumentedPrinter as Gs, unsafeUndocumentedTs as $t } from "@arcgis/api-extractor/utils/internalTypeScriptApis";
17
+ import { readFileSync as Ws, writeFileSync as ci } from "node:fs";
18
+ import { useApiExtractor as zs } from "@arcgis/api-extractor/vite/plugin";
19
+ import { styleText as qs } from "node:util";
20
+ import { unsafeGetUndocumentedPrinter as Hs, unsafeUndocumentedTs as $t } from "@arcgis/api-extractor/utils/internalTypeScriptApis";
21
21
  import { pathIsComponentEntrypoint as Pe } from "@arcgis/api-extractor/extractor/webComponent/findComponents";
22
- import { loadApiExtractorConfig as Xs, mergeApiExtractorConfigs as Pt } from "@arcgis/api-extractor/extractor/config";
23
- import { loadTypeScriptConfig as Ys } from "@arcgis/node-toolkit/vite/typeScript";
22
+ import { loadApiExtractorConfig as Vs, mergeApiExtractorConfigs as Pt } from "@arcgis/api-extractor/extractor/config";
23
+ import { loadTypeScriptConfig as Gs } from "@arcgis/node-toolkit/vite/typeScript";
24
24
  import { mappedFind as Xe } from "@arcgis/toolkit/array";
25
- import { isPropertyEscapeNeeded as di, maybeEscapePropertyName as Qs } from "@arcgis/api-extractor/utils/partPrinter";
26
- import { getPackageNameFromExternalSpecifier as Zs, getMemberName as pi } from "@arcgis/api-extractor/utils/astHelpers";
27
- import { identity as ui } from "@arcgis/toolkit/function";
28
- function er(e) {
29
- const t = e.options?.build?.dependencies ?? {}, i = Es({
25
+ import { isPropertyEscapeNeeded as li } from "@arcgis/api-extractor/utils/partPrinter";
26
+ import { getPackageNameFromExternalSpecifier as Xs, getMemberName as di } from "@arcgis/api-extractor/utils/astHelpers";
27
+ import { identity as pi } from "@arcgis/toolkit/function";
28
+ function Ys(e) {
29
+ const t = e.options?.build?.dependencies ?? {}, i = Cs({
30
30
  bundleIn: t.bundleIn,
31
31
  externalize: [
32
32
  // TODO: remove these once Lit is declared as a peer dependency
@@ -42,7 +42,7 @@ function er(e) {
42
42
  e.isInStorybook && (i.resolveId = void 0);
43
43
  }, i;
44
44
  }
45
- const tr = "Fragment", Be = "DynamicHtmlTag", Ke = "DynamicSvgTag", ke = /* @__PURE__ */ Symbol("dynamic html tag name"), Ye = /* @__PURE__ */ Symbol("dynamic svg tag name"), mi = /* @__PURE__ */ new Set([
45
+ const Qs = "Fragment", Be = "DynamicHtmlTag", Ke = "DynamicSvgTag", ke = /* @__PURE__ */ Symbol("dynamic html tag name"), Ye = /* @__PURE__ */ Symbol("dynamic svg tag name"), ui = /* @__PURE__ */ new Set([
46
46
  /**
47
47
  * There is a "className" property. However, in JSX typings we use "class"
48
48
  * instead to keep name shorter and to match Stencil's name. Thus, it should
@@ -74,7 +74,7 @@ const tr = "Fragment", Be = "DynamicHtmlTag", Ke = "DynamicSvgTag", ke = /* @__P
74
74
  "vocab",
75
75
  // These don't exist as a property, only as an attribute
76
76
  "exportParts"
77
- ]), fi = /* @__PURE__ */ new Set([
77
+ ]), mi = /* @__PURE__ */ new Set([
78
78
  /*
79
79
  * From https://github.com/preactjs/preact/blob/f3edc902447dae7393de7fccaff3b722dee79467/src/diff/props.js#L107-L118
80
80
  * See also https://github.com/facebook/react/blob/8fd963a1e5ec89459cac27fb1d9ad193a0604110/packages/react-dom-bindings/src/client/ReactDOMComponent.js#L389
@@ -100,7 +100,7 @@ const tr = "Fragment", Be = "DynamicHtmlTag", Ke = "DynamicSvgTag", ke = /* @__P
100
100
  meta: /* @__PURE__ */ new Set(["charset"]),
101
101
  math: /* @__PURE__ */ new Set(["dir", "displaystyle", "scriptlevel"]),
102
102
  menu: /* @__PURE__ */ new Set(["label", "type"])
103
- }, W = {
103
+ }, U = {
104
104
  common: {
105
105
  reflected: {
106
106
  hidden: "hidden",
@@ -913,9 +913,9 @@ const tr = "Fragment", Be = "DynamicHtmlTag", Ke = "DynamicSvgTag", ke = /* @__P
913
913
  }
914
914
  }
915
915
  };
916
- gi(W.common);
917
- Object.values(W.perElement).forEach(gi);
918
- function gi(e) {
916
+ fi(U.common);
917
+ Object.values(U.perElement).forEach(fi);
918
+ function fi(e) {
919
919
  e?.reflected !== void 0 && (e.reflected = Object.assign(/* @__PURE__ */ Object.create(null), e.reflected)), e?.stringifiedReflected !== void 0 && (e.stringifiedReflected = Object.assign(
920
920
  /* @__PURE__ */ Object.create(null),
921
921
  e.stringifiedReflected
@@ -924,7 +924,7 @@ function gi(e) {
924
924
  e.stringifiedNonReflected
925
925
  ));
926
926
  }
927
- const kt = /* @__PURE__ */ new Set(["itemScope"]), hi = /* @__PURE__ */ new Set([
927
+ const kt = /* @__PURE__ */ new Set(["itemScope"]), gi = /* @__PURE__ */ new Set([
928
928
  "abort",
929
929
  "animationCancel",
930
930
  "animationEnd",
@@ -1023,7 +1023,7 @@ const kt = /* @__PURE__ */ new Set(["itemScope"]), hi = /* @__PURE__ */ new Set(
1023
1023
  "volumeChange",
1024
1024
  "waiting",
1025
1025
  "wheel"
1026
- ]), ir = /* @__PURE__ */ new Set([
1026
+ ]), Zs = /* @__PURE__ */ new Set([
1027
1027
  "area",
1028
1028
  "base",
1029
1029
  "br",
@@ -1099,7 +1099,7 @@ const kt = /* @__PURE__ */ new Set(["itemScope"]), hi = /* @__PURE__ */ new Set(
1099
1099
  "tspan",
1100
1100
  "use",
1101
1101
  "view"
1102
- ]), sr = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), dt = /* @__PURE__ */ new Set([
1102
+ ]), er = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), dt = /* @__PURE__ */ new Set([
1103
1103
  "annotation-xml",
1104
1104
  "annotation",
1105
1105
  "maction",
@@ -1131,7 +1131,7 @@ const kt = /* @__PURE__ */ new Set(["itemScope"]), hi = /* @__PURE__ */ new Set(
1131
1131
  "munder",
1132
1132
  "munderover",
1133
1133
  "semantics"
1134
- ]), rr = /* @__PURE__ */ new Set([
1134
+ ]), tr = /* @__PURE__ */ new Set([
1135
1135
  "annotation-xml",
1136
1136
  "color-profile",
1137
1137
  "font-face",
@@ -1141,7 +1141,7 @@ const kt = /* @__PURE__ */ new Set(["itemScope"]), hi = /* @__PURE__ */ new Set(
1141
1141
  "font-face-name",
1142
1142
  "missing-glyph"
1143
1143
  ]);
1144
- function nr(e) {
1144
+ function ir(e) {
1145
1145
  if (e.length === 0)
1146
1146
  return "";
1147
1147
  const t = e[0];
@@ -1149,16 +1149,16 @@ function nr(e) {
1149
1149
  `)) {
1150
1150
  const n = t === `
1151
1151
  `, r = e.lastIndexOf(`
1152
- `), c = e.slice(r + 1).trim().length === 0, d = n ? e.trimStart() : e;
1153
- return c ? d.trimEnd() : d;
1152
+ `), l = e.slice(r + 1).trim().length === 0, d = n ? e.trimStart() : e;
1153
+ return l ? d.trimEnd() : d;
1154
1154
  }
1155
1155
  return e.trim().length === 0 ? t : e;
1156
1156
  }
1157
- const or = (e) => e.replaceAll("\\", "\\\\").replace(ar, "\\${").replaceAll("`", "\\`"), ar = /\$\{/gu, cr = (e) => !lr.test(e), lr = /^[^\s"'=<>`]+$/u, dr = /[&<>]/gu, pr = {
1157
+ const sr = (e) => e.replaceAll("\\", "\\\\").replace(rr, "\\${").replaceAll("`", "\\`"), rr = /\$\{/gu, nr = (e) => !or.test(e), or = /^[^\s"'=<>`]+$/u, ar = /[&<>]/gu, cr = {
1158
1158
  "&": "&amp;",
1159
1159
  "<": "&lt;",
1160
1160
  ">": "&gt;"
1161
- }, yi = (e) => e.replace(dr, (t) => pr[t]), pt = (e) => typeof e == "string" && e.includes("-") && !rr.has(e), ur = ["keyed", "ref", "repeat", "live"], ae = "staticHtml", Y = "staticSvg", ce = "html", se = "svg", vi = /* @__PURE__ */ Symbol("maybe HTML namespace or maybe SVG"), bi = "css", wi = "mathml", Si = [bi, ce, wi, ae, Y, se], mr = new Set(Si), fr = ["safeClassMap", "safeStyleMap", "deferLoad", "stabilizedRef"], gr = "nothing", hr = [...ur, ...Si, ...fr, gr], yr = (e) => o.isArrayLiteralExpression(e) && e.elements.every((t) => fe(t)), fe = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e), re = {
1161
+ }, hi = (e) => e.replace(ar, (t) => cr[t]), pt = (e) => typeof e == "string" && e.includes("-") && !tr.has(e), lr = ["keyed", "ref", "repeat", "live"], ae = "staticHtml", X = "staticSvg", ce = "html", se = "svg", yi = /* @__PURE__ */ Symbol("maybe HTML namespace or maybe SVG"), vi = "css", bi = "mathml", wi = [vi, ce, bi, ae, X, se], dr = new Set(wi), pr = ["safeClassMap", "safeStyleMap", "deferLoad", "stabilizedRef"], ur = "nothing", mr = [...lr, ...wi, ...pr, ur], fr = (e) => o.isArrayLiteralExpression(e) && e.elements.every((t) => fe(t)), fe = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e), re = {
1162
1162
  [ce]: ["lit", "lit/html.js", "lit-html"],
1163
1163
  /**
1164
1164
  * Sadly, Lit called these "html" and "svg", rather than "staticHtml" and
@@ -1168,9 +1168,9 @@ const or = (e) => e.replaceAll("\\", "\\\\").replace(ar, "\\${").replaceAll("`",
1168
1168
  */
1169
1169
  [ae]: ["lit/static-html.js", "lit-html/static.js"],
1170
1170
  [se]: ["lit", "lit-html", "lit/html.js"],
1171
- [Y]: ["lit/static-html.js", "lit-html/static.js"],
1172
- [wi]: ["lit", "lit-html", "lit/html.js"],
1173
- [bi]: ["lit", "@lit/reactive-element/css-tag.js", "@lit/reactive-element"],
1171
+ [X]: ["lit/static-html.js", "lit-html/static.js"],
1172
+ [bi]: ["lit", "lit-html", "lit/html.js"],
1173
+ [vi]: ["lit", "@lit/reactive-element/css-tag.js", "@lit/reactive-element"],
1174
1174
  safeClassMap: ["@arcgis/lumina"],
1175
1175
  safeStyleMap: ["@arcgis/lumina"],
1176
1176
  deferLoad: ["@arcgis/lumina"],
@@ -1180,7 +1180,7 @@ const or = (e) => e.replaceAll("\\", "\\\\").replace(ar, "\\${").replaceAll("`",
1180
1180
  repeat: ["lit/directives/repeat.js", "lit-html/directives/repeat.js"],
1181
1181
  ref: ["lit/directives/ref.js", "lit-html/directives/ref.js"],
1182
1182
  nothing: ["lit", "@arcgis/lumina", "lit/html.js", "lit-html", "lit-element/lit-element.js"]
1183
- }, vr = /* @__PURE__ */ new Set([
1183
+ }, gr = /* @__PURE__ */ new Set([
1184
1184
  "h",
1185
1185
  "Fragment",
1186
1186
  "state",
@@ -1190,7 +1190,7 @@ const or = (e) => e.replaceAll("\\", "\\\\").replace(ar, "\\${").replaceAll("`",
1190
1190
  "bindProperty",
1191
1191
  "bindEvent",
1192
1192
  "bindAttribute"
1193
- ]), br = /\.(?:css|s[ac]ss|less|styl(?:us)?|postcss|pcss|sss)(\\?|$)/u, de = "@arcgis/lumina:loadLitCss", Ie = "?litCss", Q = "?layeredLitCss", Ze = "?globalFileLitCss", wr = (e) => ({
1193
+ ]), hr = /\.(?:css|s[ac]ss|less|styl(?:us)?|postcss|pcss|sss)(\\?|$)/u, de = "@arcgis/lumina:loadLitCss", Ie = "?litCss", Y = "?layeredLitCss", Ze = "?globalFileLitCss", yr = (e) => ({
1194
1194
  name: de,
1195
1195
  enforce: "pre",
1196
1196
  configResolved(t) {
@@ -1222,22 +1222,22 @@ const or = (e) => e.replaceAll("\\", "\\\\").replace(ar, "\\${").replaceAll("`",
1222
1222
  ...s,
1223
1223
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
1224
1224
  async handler(r, a) {
1225
- const c = a.endsWith(Ie);
1226
- c && (a = a.slice(0, -Ie.length));
1227
- const d = a.endsWith(Q);
1228
- d && (a = a.slice(0, -Q.length));
1229
- const l = a.endsWith(Ze);
1230
- if (l && (a = a.slice(0, -Ze.length)), !c && !d && !l)
1225
+ const l = a.endsWith(Ie);
1226
+ l && (a = a.slice(0, -Ie.length));
1227
+ const d = a.endsWith(Y);
1228
+ d && (a = a.slice(0, -Y.length));
1229
+ const c = a.endsWith(Ze);
1230
+ if (c && (a = a.slice(0, -Ze.length)), !l && !d && !c)
1231
1231
  return await s.handler.call(this, r, a);
1232
1232
  const p = `${a}?inline`, m = await s.handler.call(this, r, p), { code: f, ...g } = typeof m == "string" ? { code: m } : m ?? {};
1233
- return typeof f != "string" || !f.startsWith(Ci) || !f.endsWith(Sr) ? (T.warn(
1233
+ return typeof f != "string" || !f.startsWith(Si) || !f.endsWith(vr) ? ($.warn(
1234
1234
  de,
1235
1235
  `Expected vite:css-post to return a JS module with a string literal. Received: ${JSON.stringify(
1236
1236
  f
1237
1237
  )}`
1238
- ), m) : l ? (e._globalCssString = Ei(f), { code: "", map: { mappings: "" } }) : {
1238
+ ), m) : c ? (e._globalCssString = Ci(f), { code: "", map: { mappings: "" } }) : {
1239
1239
  ...g,
1240
- code: $r(f, e.hmrEnabled, e.shouldMinify, d),
1240
+ code: Cr(f, e.hmrEnabled, e.shouldMinify, d),
1241
1241
  /**
1242
1242
  * Vite's original transform does not generate source maps for inlined
1243
1243
  * css, thus we can't either
@@ -1247,8 +1247,8 @@ const or = (e) => e.replaceAll("\\", "\\\\").replace(ar, "\\${").replaceAll("`",
1247
1247
  }
1248
1248
  };
1249
1249
  }
1250
- }), Ci = 'export default "', Sr = '"', Cr = `import { css } from '${re.css[0]}';
1251
- export const styles = css\``, Er = "`;\nexport default styles;", Tr = `
1250
+ }), Si = 'export default "', vr = '"', br = `import { css } from '${re.css[0]}';
1251
+ export const styles = css\``, wr = "`;\nexport default styles;", Sr = `
1252
1252
 
1253
1253
  if(import.meta.hot) {
1254
1254
  import.meta.hot.data.styles ??= styles;
@@ -1259,46 +1259,46 @@ if(import.meta.hot) {
1259
1259
  }
1260
1260
  import.meta.hot.data.styles.styleSheet.replaceSync(nextExports.styles.cssText);
1261
1261
  });
1262
- }`, Ei = (e) => e.slice(Ci.length - 1);
1263
- function $r(e, t, i, s) {
1264
- const n = Ei(e), r = JSON.parse(n), a = or(r), c = s ? `@layer{${i ? "" : `
1262
+ }`, Ci = (e) => e.slice(Si.length - 1);
1263
+ function Cr(e, t, i, s) {
1264
+ const n = Ci(e), r = JSON.parse(n), a = sr(r), l = s ? `@layer{${i ? "" : `
1265
1265
  `}${a}${i ? "" : `
1266
1266
  `}}` : a;
1267
- return `${Cr}${c}${Er}${t ? Tr : ""}`;
1267
+ return `${br}${l}${wr}${t ? Sr : ""}`;
1268
1268
  }
1269
- function Pr(e) {
1270
- return `import("${kr}").then(({ setCustomElementsManifest }) => {
1271
- setCustomElementsManifest(${Ir(e)});
1269
+ function Er(e) {
1270
+ return `import("${Tr}").then(({ setCustomElementsManifest }) => {
1271
+ setCustomElementsManifest(${$r(e)});
1272
1272
  });`;
1273
1273
  }
1274
- const kr = "@storybook/web-components-vite", Ir = (e) => `JSON.parse(\`${xr(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
1275
- function xr(e) {
1274
+ const Tr = "@storybook/web-components-vite", $r = (e) => `JSON.parse(\`${Pr(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
1275
+ function Pr(e) {
1276
1276
  return e.replaceAll('\\"', '"').replaceAll("`", "\\`").replaceAll("${", "\\${");
1277
1277
  }
1278
- function Ar(e) {
1279
- Lr(e);
1278
+ function kr(e) {
1279
+ Ir(e);
1280
1280
  const t = e.options.css?.globalStylesPath;
1281
1281
  if (t === void 0)
1282
1282
  return "";
1283
1283
  const i = u.join(e.dir.root, t);
1284
1284
  return e.viteCommand === "serve" || e.isInStorybook ? [
1285
- `import globalStyles from "${i}${Q}";`,
1285
+ `import globalStyles from "${i}${Y}";`,
1286
1286
  "document.adoptedStyleSheets = [...document.adoptedStyleSheets, globalStyles.styleSheet!];",
1287
- $i("", e)
1287
+ Ti("", e)
1288
1288
  ].join(`
1289
1289
  `) : `import "${i}${Ze}";`;
1290
1290
  }
1291
- const Ti = "hydrated";
1292
- function Lr(e) {
1291
+ const Ei = "hydrated";
1292
+ function Ir(e) {
1293
1293
  e._globalHydratedCssString = [
1294
1294
  ":not([",
1295
- e.options.css?.hydratedAttribute ?? Ti,
1295
+ e.options.css?.hydratedAttribute ?? Ei,
1296
1296
  "]):is(",
1297
1297
  e.apiJsonComponents.map((t) => t.tagName).join(","),
1298
1298
  "){visibility:hidden}"
1299
1299
  ].join("");
1300
1300
  }
1301
- function $i(e, t) {
1301
+ function Ti(e, t) {
1302
1302
  return [
1303
1303
  "const globalCss = new CSSStyleSheet;",
1304
1304
  `globalCss.replaceSync("@layer{${`${t._globalHydratedCssString}${t.shouldMinify ? "" : "\\n\\n"}${e ? e.slice(1, -1) : ""}`}}");`,
@@ -1306,72 +1306,72 @@ function $i(e, t) {
1306
1306
  ].join(`
1307
1307
  `);
1308
1308
  }
1309
- const Nr = (e) => `@layer{${e.shouldMinify ? "" : `
1309
+ const xr = (e) => `@layer{${e.shouldMinify ? "" : `
1310
1310
  `}${e._globalHydratedCssString}${e.shouldMinify ? "" : `
1311
1311
 
1312
1312
  `}${e._globalCssString ? JSON.parse(e._globalCssString) : ""}${e.shouldMinify ? "" : `
1313
1313
  `}}`;
1314
- function jr(e) {
1314
+ function Ar(e) {
1315
1315
  const t = [], i = [];
1316
1316
  for (const s of e.privateApiJson.modules)
1317
1317
  for (const n of s.declarations)
1318
- n.customElement === !0 && (i.push(Fr(n, e, s.sourcePath)), t.push(s.sourcePath));
1318
+ n.customElement === !0 && (i.push(Lr(n, e, s.sourcePath)), t.push(s.sourcePath));
1319
1319
  return [
1320
1320
  'import { runtime } from "./runtime.ts";',
1321
1321
  'import { makeDefineCustomElements } from "@arcgis/lumina";',
1322
- Ar(e),
1323
- e.hmrEnabled ? Rr : "",
1322
+ kr(e),
1323
+ e.hmrEnabled ? jr : "",
1324
1324
  "",
1325
- e.isInStorybook ? Pr(e.apiJson) : "",
1325
+ e.isInStorybook ? Er(e.apiJson) : "",
1326
1326
  "",
1327
1327
  "export const defineCustomElements = makeDefineCustomElements(runtime, {",
1328
1328
  i.join(`,
1329
1329
  `),
1330
1330
  "});",
1331
- e.hmrEnabled ? Or(t) : ""
1331
+ e.hmrEnabled ? Fr(t) : ""
1332
1332
  ].join(`
1333
1333
  `);
1334
1334
  }
1335
- const Fr = (e, t, i) => [
1335
+ const Lr = (e, t, i) => [
1336
1336
  ` "${e.tagName}": [`,
1337
1337
  `()=>import("${u.join(t.dir.root, i)}"),`,
1338
- Dr(e),
1338
+ Nr(e),
1339
1339
  "]"
1340
1340
  ].join("");
1341
- function Dr(e) {
1342
- const { properties: t, asyncMethods: i, syncMethods: s, formAssociated: n } = Pi(e), r = t.map((g) => g.join(Ps)).join(Je), a = i.join(Je), c = s.join(Je), d = [r, a, c], l = d.findLastIndex((g) => g.length > 0), p = d.slice(0, l + 1);
1343
- return `${p.length > 0 || n ? `"${p.join(ks)}"` : ""}${n ? ",1" : ""}`;
1341
+ function Nr(e) {
1342
+ const { properties: t, asyncMethods: i, syncMethods: s, formAssociated: n } = $i(e), r = t.map((g) => g.join(Ts)).join(Je), a = i.join(Je), l = s.join(Je), d = [r, a, l], c = d.findLastIndex((g) => g.length > 0), p = d.slice(0, c + 1);
1343
+ return `${p.length > 0 || n ? `"${p.join($s)}"` : ""}${n ? ",1" : ""}`;
1344
1344
  }
1345
- function Pi(e) {
1345
+ function $i(e) {
1346
1346
  const t = [], i = [], s = [];
1347
1347
  for (let r = 0; r < e.members.length; ++r) {
1348
1348
  const a = e.members[r];
1349
1349
  if (a.kind === "field") {
1350
- const c = typeof a.attribute == "string", d = c && a.attribute !== ni(a.name);
1350
+ const l = typeof a.attribute == "string", d = l && a.attribute !== ri(a.name);
1351
1351
  t.push(
1352
- c && !d ? [a.name] : [a.name, d ? String(a.attribute) : ""]
1352
+ l && !d ? [a.name] : [a.name, d ? String(a.attribute) : ""]
1353
1353
  );
1354
- } else a.kind === "method" && a.name !== "componentOnReady" && (Ds(a) ? i.push(a.name) : s.push(a.name));
1354
+ } else a.kind === "method" && a.name !== "componentOnReady" && (js(a) ? i.push(a.name) : s.push(a.name));
1355
1355
  }
1356
1356
  const n = e.formAssociated === !0;
1357
1357
  return { tagName: e.tagName, properties: t, asyncMethods: i, syncMethods: s, formAssociated: n };
1358
1358
  }
1359
- const Rr = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
1360
- `, Or = (e) => `
1359
+ const jr = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
1360
+ `, Fr = (e) => `
1361
1361
  if(import.meta.hot) {
1362
1362
  import.meta.hot.on("component-meta-update", handleComponentMetaUpdate);
1363
1363
  import.meta.hot.accept([
1364
1364
  ${e.map((t) => ` "/${t}",`).join(`
1365
1365
  `)}
1366
1366
  ], handleHmrUpdate);
1367
- }`, Mr = "@arcgis/lumina-compiler", ki = {
1368
- name: Mr
1367
+ }`, Dr = "@arcgis/lumina-compiler", Pi = {
1368
+ name: Dr
1369
1369
  };
1370
- var Jr = ["@arcgis/api-extractor", "@arcgis/arcade-languageservice", "@arcgis/arcade-parser", "@arcgis/core", "@arcgis/languages-api-utils", "@arcgis/languages-sdk-spec", "@arcgis/lumina", "@arcgis/lumina-compiler", "@arcgis/lumina-toolkit", "@arcgis/node-toolkit", "@arcgis/stencil-to-lumina", "@arcgis/toolkit", "@arcgis/typescript-config"];
1371
- async function Ii(e, t) {
1372
- return ne ??= Kr(e, t), await ne;
1370
+ var Rr = ["@arcgis/api-extractor", "@arcgis/arcade-languageservice", "@arcgis/arcade-parser", "@arcgis/core", "@arcgis/languages-api-utils", "@arcgis/languages-sdk-spec", "@arcgis/lumina", "@arcgis/lumina-compiler", "@arcgis/lumina-toolkit", "@arcgis/node-toolkit", "@arcgis/stencil-to-lumina", "@arcgis/toolkit", "@arcgis/typescript-config"];
1371
+ async function ki(e, t) {
1372
+ return ne ??= Mr(e, t), await ne;
1373
1373
  }
1374
- function Br() {
1374
+ function Or() {
1375
1375
  if (xe === void 0)
1376
1376
  throw Error(
1377
1377
  b(
@@ -1381,7 +1381,7 @@ function Br() {
1381
1381
  );
1382
1382
  return xe;
1383
1383
  }
1384
- function xi() {
1384
+ function Ii() {
1385
1385
  if (et === void 0)
1386
1386
  throw Error(
1387
1387
  b(
@@ -1391,18 +1391,18 @@ function xi() {
1391
1391
  );
1392
1392
  return et;
1393
1393
  }
1394
- async function Kr(e, t) {
1395
- const i = j(e), s = i.dependencies ?? {}, n = i.peerDependencies ?? {}, a = (await Promise.all(
1396
- [...Object.keys(s), ...Object.keys(n)].filter((l) => !_r.has(l)).flatMap(async (l) => await Ai(l, e))
1397
- )).filter(D);
1398
- xe ??= a, et = Object.fromEntries(a.flatMap((l) => Object.entries(l.components)));
1399
- const c = t?.serve?.extraDependencies?.map(
1400
- (l) => typeof l == "string" ? l : l.name
1401
- ), d = c === void 0 ? a : a.filter((l) => !c.includes(l.packageName));
1394
+ async function Mr(e, t) {
1395
+ const i = D(e), s = i.dependencies ?? {}, n = i.peerDependencies ?? {}, a = (await Promise.all(
1396
+ [...Object.keys(s), ...Object.keys(n)].filter((c) => !Jr.has(c)).flatMap(async (c) => await xi(c, e))
1397
+ )).filter(F);
1398
+ xe ??= a, et = Object.fromEntries(a.flatMap((c) => Object.entries(c.components)));
1399
+ const l = t?.serve?.extraDependencies?.map(
1400
+ (c) => typeof c == "string" ? c : c.name
1401
+ ), d = l === void 0 ? a : a.filter((c) => !l.includes(c.packageName));
1402
1402
  return xe ??= d, d;
1403
1403
  }
1404
- const _r = /* @__PURE__ */ new Set([
1405
- ...Jr,
1404
+ const Jr = /* @__PURE__ */ new Set([
1405
+ ...Rr,
1406
1406
  "@arcgis/languages-sdk-specs",
1407
1407
  "@commander-js/extra-typings",
1408
1408
  "@custom-elements-manifest/analyzer",
@@ -1412,7 +1412,6 @@ const _r = /* @__PURE__ */ new Set([
1412
1412
  "@lit-labs/ssr",
1413
1413
  "@lit/context",
1414
1414
  "@lit-labs/ssr-client",
1415
- "@lit/react",
1416
1415
  "@types/color",
1417
1416
  "@types/sortablejs",
1418
1417
  "color",
@@ -1436,21 +1435,21 @@ const _r = /* @__PURE__ */ new Set([
1436
1435
  "vscode-languageserver-types"
1437
1436
  ]);
1438
1437
  let xe, et, ne;
1439
- async function Ai(e, t) {
1440
- const i = await $e(e, t), s = await ci(i), n = "exports" in s, r = Zr.bind(void 0, n), a = "@stencil/core" in (s.dependencies ?? {}) || "@stencil/core" in (s.devDependencies ?? {}), c = u.join(i, "dist/esm/loader.js");
1441
- if (a ? await K(c) : !1) {
1442
- const g = await z(c, "utf8"), h = Wr(g, "bootstrapLazy("), y = g.indexOf(", options", h), v = g.slice(h, y), w = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
1438
+ async function xi(e, t) {
1439
+ const i = await $e(e, t), s = await ai(i), n = "exports" in s, r = Xr.bind(void 0, n), a = "@stencil/core" in (s.dependencies ?? {}) || "@stencil/core" in (s.devDependencies ?? {}), l = u.join(i, "dist/esm/loader.js");
1440
+ if (a ? await _(l) : !1) {
1441
+ const g = await W(l, "utf8"), h = Br(g, "bootstrapLazy("), y = g.indexOf(", options", h), v = g.slice(h, y), w = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
1443
1442
  try {
1444
- const C = JSON.parse(w), E = Yr(C, { packageName: e, getImportPath: r });
1445
- return { packageName: e, type: "stencil", components: E, packageLocation: i, packageJson: s };
1446
- } catch (C) {
1447
- T.warn("@arcgis/lumina", `Failed to parse dist/esm/loader.js for ${e}.
1448
- Error: ${String(C)}`);
1443
+ const S = JSON.parse(w), T = Vr(S, { packageName: e, getImportPath: r });
1444
+ return { packageName: e, type: "stencil", components: T, packageLocation: i, packageJson: s };
1445
+ } catch (S) {
1446
+ $.warn("@arcgis/lumina", `Failed to parse dist/esm/loader.js for ${e}.
1447
+ Error: ${String(S)}`);
1449
1448
  }
1450
1449
  }
1451
- const l = It(s.customElements);
1452
- if (l != null) {
1453
- const g = u.join(i, l), h = JSON.parse(await z(g, "utf-8")), y = Ur(h), v = Li(h, {
1450
+ const c = It(s.customElements);
1451
+ if (c != null) {
1452
+ const g = u.join(i, c), h = JSON.parse(await W(g, "utf-8")), y = Kr(h), v = Ai(h, {
1454
1453
  packageName: e,
1455
1454
  getImportPath: r
1456
1455
  });
@@ -1458,15 +1457,15 @@ Error: ${String(C)}`);
1458
1457
  }
1459
1458
  const p = It(s["web-types"]);
1460
1459
  if (p != null) {
1461
- const g = u.join(i, p), h = JSON.parse(await z(g, "utf-8")), y = zr(h, {
1460
+ const g = u.join(i, p), h = JSON.parse(await W(g, "utf-8")), y = _r(h, {
1462
1461
  packageName: e,
1463
1462
  getImportPath: r
1464
1463
  });
1465
1464
  return { type: "unknown", packageName: e, components: y, packageLocation: i, packageJson: s };
1466
1465
  }
1467
1466
  const m = u.join(i, "dist/components");
1468
- if (await K(m)) {
1469
- const g = await Qr(m, {
1467
+ if (await _(m)) {
1468
+ const g = await Gr(m, {
1470
1469
  packageName: e,
1471
1470
  getImportPath: r
1472
1471
  });
@@ -1474,11 +1473,11 @@ Error: ${String(C)}`);
1474
1473
  }
1475
1474
  }
1476
1475
  const It = (e) => Array.isArray(e) ? e[0] : e;
1477
- function Wr(e, t) {
1476
+ function Br(e, t) {
1478
1477
  const i = e.indexOf(t);
1479
1478
  return i === -1 ? -1 : i + t.length;
1480
1479
  }
1481
- function Li(e, t, i = !1) {
1480
+ function Ai(e, t, i = !1) {
1482
1481
  const s = /* @__PURE__ */ Object.create(null);
1483
1482
  if (e.modules === void 0)
1484
1483
  return s;
@@ -1489,7 +1488,7 @@ function Li(e, t, i = !1) {
1489
1488
  const d = r.declarations[a];
1490
1489
  if (d.customElement !== !0)
1491
1490
  continue;
1492
- const l = (
1491
+ const c = (
1493
1492
  // New api.json
1494
1493
  "sourcePath" in r ? r.path : (
1495
1494
  // Older api.json
@@ -1497,7 +1496,7 @@ function Li(e, t, i = !1) {
1497
1496
  )
1498
1497
  ), p = d.tagName, m = {
1499
1498
  packageName: t.packageName,
1500
- modulePath: l ?? t.getImportPath(p),
1499
+ modulePath: c ?? t.getImportPath(p),
1501
1500
  propToAttribute: Object.fromEntries(
1502
1501
  (d.attributes ?? []).map((f) => [f.fieldName ?? f.name, f.name])
1503
1502
  ),
@@ -1515,11 +1514,11 @@ function Li(e, t, i = !1) {
1515
1514
  }
1516
1515
  return s;
1517
1516
  }
1518
- const Ur = (e) => (
1517
+ const Kr = (e) => (
1519
1518
  // Since 5.0
1520
1519
  e.compiler?.name === "@arcgis/api-extractor" || // Before 5.0
1521
- e.compiler?.name === ki.name
1522
- ), zr = (e, t) => Object.fromEntries(
1520
+ e.compiler?.name === Pi.name
1521
+ ), _r = (e, t) => Object.fromEntries(
1523
1522
  (e.contributions?.html?.elements ?? e.contributions?.html?.tags)?.map(
1524
1523
  (i) => [
1525
1524
  i.name,
@@ -1530,7 +1529,7 @@ const Ur = (e) => (
1530
1529
  }
1531
1530
  ]
1532
1531
  ) ?? []
1533
- ), Hr = 1, qr = 2, Vr = 4, Gr = 8, Xr = Hr | qr | Vr | Gr, Yr = (e, t) => Object.fromEntries(
1532
+ ), Ur = 1, Wr = 2, zr = 4, qr = 8, Hr = Ur | Wr | zr | qr, Vr = (e, t) => Object.fromEntries(
1534
1533
  e.flatMap(
1535
1534
  ([i, s]) => s.map(
1536
1535
  ([n, r, a]) => [
@@ -1539,13 +1538,13 @@ const Ur = (e) => (
1539
1538
  packageName: t.packageName,
1540
1539
  modulePath: t.getImportPath(r),
1541
1540
  propToAttribute: Object.fromEntries(
1542
- Object.entries(a ?? {}).filter(([c, [d]]) => d & Xr).map(([c, [d, l = c]]) => [c, l])
1541
+ Object.entries(a ?? {}).filter(([l, [d]]) => d & Hr).map(([l, [d, c = l]]) => [l, c])
1543
1542
  )
1544
1543
  }
1545
1544
  ]
1546
1545
  )
1547
1546
  )
1548
- ), Qr = async (e, t) => Object.fromEntries(
1547
+ ), Gr = async (e, t) => Object.fromEntries(
1549
1548
  (await ct(e)).filter((i) => i.endsWith(".d.ts")).map((i) => {
1550
1549
  const s = i.slice(0, -5);
1551
1550
  return [
@@ -1557,36 +1556,36 @@ const Ur = (e) => (
1557
1556
  }
1558
1557
  ];
1559
1558
  })
1560
- ), Zr = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, en = (e) => e.startsWith("/") ? e : `/${e}`, ut = (e, t) => `${e}@fs${en(t)}`;
1561
- function tn(e, t) {
1559
+ ), Xr = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, Yr = (e) => e.startsWith("/") ? e : `/${e}`, ut = (e, t) => `${e}@fs${Yr(t)}`;
1560
+ function Qr(e, t) {
1562
1561
  const i = u.resolve(e), s = u.resolve(i, t.split(/[?#]/u)[0].replace(/^[/\\]+/u, "")), n = u.relative(i, s);
1563
1562
  return n === ".." || n.startsWith(`..${u.sep}`) || u.isAbsolute(n) ? void 0 : s;
1564
1563
  }
1565
- const Ni = "packages/core-packages/core/src", sn = "packages/core-packages/core/output/npm/esm", te = !import.meta.url.includes("node_modules");
1564
+ const Li = "packages/core-packages/core/src", Zr = "packages/core-packages/core/output/npm/esm", ee = !import.meta.url.includes("node_modules");
1566
1565
  function mt(e) {
1567
- return te && e.name !== "@esri/calcite-components" ? "6.0.0-next.13" : e.version;
1566
+ return ee && e.name !== "@esri/calcite-components" ? "6.0.0-next.15" : e.version;
1568
1567
  }
1569
- function ji({ command: e }) {
1568
+ function Ni({ command: e }) {
1570
1569
  return e === "serve" && process.argv.includes("--local-core");
1571
1570
  }
1572
- function Fi(e) {
1571
+ function ji(e) {
1573
1572
  const t = e?.apiExtractorPluginConfig.unsafeConfigOverride?.types?.typeScriptConfig?.config.options.target ?? o.ScriptTarget.ESNext, i = o.ScriptTarget[t].toLowerCase();
1574
1573
  return i === "latest" ? "esnext" : i;
1575
1574
  }
1576
1575
  const tt = "@arcgis/lumina:provideAssets";
1577
- function ie(e, t, i = ft, s = "max-age=31536000, immutable") {
1576
+ function te(e, t, i = ft, s = "max-age=31536000, immutable") {
1578
1577
  if (e.viteCommand !== "serve")
1579
1578
  throw Error(b(tt, "serveAssets() is only available when Vite is running in serve mode"));
1580
1579
  const n = e._serverConfigured, r = e.server.middlewares.stack.length;
1581
1580
  if (t.forEach((a) => {
1582
- const c = Ri(a), d = Mi(e.dir, Oi(c)), l = nn(e.viteConfig.base, d, e.dir.distCdn);
1583
- e.server.middlewares.use(l, (p, m, f) => {
1584
- const g = on(p.url), h = c.type === "directory" ? tn(c.source, g) : c.source, y = u.join(d, g), v = i.find((w) => w.match(y, e));
1585
- return h === void 0 ? (m.statusCode = 403, m.end(), !0) : ((typeof h == "function" ? Promise.resolve(h()) : z(h)).then((w) => {
1586
- const C = (typeof h == "function" ? void 0 : v?.transform(w.toString("utf8"), y, e)) ?? w;
1587
- m.setHeader("Cache-Control", s), m.setHeader("Content-Type", Ws.lookup(g) || "application/octet-stream"), m.write(C), m.end();
1581
+ const l = Di(a), d = Oi(e.dir, Ri(l)), c = tn(e.viteConfig.base, d, e.dir.distCdn);
1582
+ e.server.middlewares.use(c, (p, m, f) => {
1583
+ const g = sn(p.url), h = l.type === "directory" ? Qr(l.source, g) : l.source, y = u.join(d, g), v = i.find((w) => w.match(y, e));
1584
+ return h === void 0 ? (m.statusCode = 403, m.end(), !0) : ((typeof h == "function" ? Promise.resolve(h()) : W(h)).then((w) => {
1585
+ const S = (typeof h == "function" ? void 0 : v?.transform(w.toString("utf8"), y, e)) ?? w;
1586
+ m.setHeader("Cache-Control", s), m.setHeader("Content-Type", Ks.lookup(g) || "application/octet-stream"), m.write(S), m.end();
1588
1587
  }).catch((w) => {
1589
- (c.type !== "directory" || process.env.DEBUG) && T.warn(
1588
+ (l.type !== "directory" || process.env.DEBUG) && $.warn(
1590
1589
  tt,
1591
1590
  `Error occurred when trying to serve a file in response to request for "${p.originalUrl ?? g}":${String(w)}`
1592
1591
  ), f();
@@ -1597,31 +1596,31 @@ function ie(e, t, i = ft, s = "max-age=31536000, immutable") {
1597
1596
  e.server.middlewares.stack.splice(0, 0, ...a);
1598
1597
  }
1599
1598
  }
1600
- async function Di(e, t, i = ft) {
1599
+ async function Fi(e, t, i = ft) {
1601
1600
  await Promise.all(
1602
1601
  t.map(async (s) => {
1603
- const n = Ri(s), r = Mi(e.dir, Oi(n));
1602
+ const n = Di(s), r = Oi(e.dir, Ri(n));
1604
1603
  if (n.type === "directory") {
1605
- const a = u.resolve(n.source), d = (await ct(a, { recursive: !0, withFileTypes: !0 })).filter((l) => l.isFile()).map((l) => {
1606
- const p = u.resolve(l.parentPath, l.name), m = u.relative(a, p), f = u.join(r, m);
1604
+ const a = u.resolve(n.source), d = (await ct(a, { recursive: !0, withFileTypes: !0 })).filter((c) => c.isFile()).map((c) => {
1605
+ const p = u.resolve(c.parentPath, c.name), m = u.relative(a, p), f = u.join(r, m);
1607
1606
  return [p, f];
1608
1607
  });
1609
- await Bi(d.map(([l, p]) => p)), await Us(
1608
+ await Ji(d.map(([c, p]) => p)), await _s(
1610
1609
  d,
1611
1610
  16,
1612
- async ([l, p]) => await xt(l, p, i, e)
1611
+ async ([c, p]) => await xt(c, p, i, e)
1613
1612
  );
1614
1613
  } else if (n.type === "file")
1615
- await X(u.dirname(r), { recursive: !0 }), await xt(n.source, r, i, e);
1614
+ await ie(u.dirname(r), { recursive: !0 }), await xt(n.source, r, i, e);
1616
1615
  else if (n.type === "dynamic") {
1617
- await X(u.dirname(r), { recursive: !0 });
1616
+ await ie(u.dirname(r), { recursive: !0 });
1618
1617
  const a = await Promise.resolve(n.source());
1619
- await _(r, a);
1618
+ await z(r, a);
1620
1619
  }
1621
1620
  })
1622
1621
  );
1623
1622
  }
1624
- const Ri = oi ? (e) => e : (e) => e.type === "dynamic" ? {
1623
+ const Di = ni ? (e) => e : (e) => e.type === "dynamic" ? {
1625
1624
  ...e,
1626
1625
  destination: G(e.destination)
1627
1626
  } : {
@@ -1632,13 +1631,13 @@ const Ri = oi ? (e) => e : (e) => e.type === "dynamic" ? {
1632
1631
  async function xt(e, t, i, s) {
1633
1632
  const n = i.find((r) => r.match(t, s));
1634
1633
  if (n === void 0)
1635
- await Js(e, t);
1634
+ await Os(e, t);
1636
1635
  else {
1637
- const r = await z(e, "utf8"), a = n.transform(r, t, s);
1638
- await _(t, a);
1636
+ const r = await W(e, "utf8"), a = n.transform(r, t, s);
1637
+ await z(t, a);
1639
1638
  }
1640
1639
  }
1641
- function Oi(e) {
1640
+ function Ri(e) {
1642
1641
  if (e.type === "dynamic")
1643
1642
  return e.destination;
1644
1643
  if (e.source.endsWith(u.sep)) {
@@ -1653,40 +1652,40 @@ function Oi(e) {
1653
1652
  }
1654
1653
  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;
1655
1654
  }
1656
- function Mi({ dist: e, distCdnAssets: t }, i) {
1657
- const s = rn(i), n = u.join(
1655
+ function Oi({ dist: e, distCdnAssets: t }, i) {
1656
+ const s = en(i), n = u.join(
1658
1657
  t,
1659
1658
  s ? u.relative(t, i) : i
1660
- ), r = u.relative(e, n), a = Ji(r);
1659
+ ), r = u.relative(e, n), a = Mi(r);
1661
1660
  return u.join(e, a);
1662
1661
  }
1663
- function rn(e) {
1662
+ function en(e) {
1664
1663
  if (e.startsWith(u.sep)) {
1665
- const t = ai(), i = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
1664
+ const t = oi(), i = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
1666
1665
  return e.startsWith(`/${i}/`) || e.startsWith("/Users/");
1667
1666
  } else
1668
- return !!(!oi && u.isAbsolute(e));
1667
+ return !!(!ni && u.isAbsolute(e));
1669
1668
  }
1670
- function nn(e, t, i) {
1671
- const s = Ji(u.relative(i, t)), n = s.startsWith("/") ? s.slice(1) : s;
1669
+ function tn(e, t, i) {
1670
+ const s = Mi(u.relative(i, t)), n = s.startsWith("/") ? s.slice(1) : s;
1672
1671
  return `${e}${n}`;
1673
1672
  }
1674
- const Ji = (e) => e.replaceAll("../", ""), on = (e = "") => e.split("?")[0].split("#")[0];
1675
- async function Bi(e) {
1673
+ const Mi = (e) => e.replaceAll("../", ""), sn = (e = "") => e.split("?")[0].split("#")[0];
1674
+ async function Ji(e) {
1676
1675
  const t = new Set(e.map(u.dirname));
1677
- await Promise.all(Array.from(t, async (i) => await X(i, { recursive: !0 })));
1676
+ await Promise.all(Array.from(t, async (i) => await ie(i, { recursive: !0 })));
1678
1677
  }
1679
- const an = {
1678
+ const rn = {
1680
1679
  match: (e, t) => t.environment === "production" && e.endsWith(".json"),
1681
1680
  transform: (e) => JSON.stringify(JSON.parse(e))
1682
- }, ft = [an], Ae = "@arcgis/core", me = "@arcgis/core/assets", _e = j(), H = Ae in (_e.dependencies ?? {}) || Ae in (_e.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
1681
+ }, ft = [rn], Ae = "@arcgis/core", me = "@arcgis/core/assets", _e = D(), q = Ae in (_e.dependencies ?? {}) || Ae in (_e.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
1683
1682
  _e.name === "@arcgis/lumina";
1684
- async function cn(e, t, i, s) {
1685
- if (!H)
1683
+ async function nn(e, t, i, s) {
1684
+ if (!q)
1686
1685
  return [];
1687
1686
  const n = e._localCdnCore, r = n?.packageLocation ?? await $e(Ae);
1688
1687
  if (i === "cdn") {
1689
- const a = await ci(r), c = Re(a, s);
1688
+ const a = await ai(r), l = Re(a, s);
1690
1689
  return [
1691
1690
  // Use the ESM CDN
1692
1691
  // <script src="https://jsdev.arcgis.com/VERSION/"><\/script>
@@ -1697,22 +1696,22 @@ async function cn(e, t, i, s) {
1697
1696
  },
1698
1697
  children: JSON.stringify({
1699
1698
  imports: {
1700
- "@arcgis/core/": `${c}@arcgis/core/`
1699
+ "@arcgis/core/": `${l}@arcgis/core/`
1701
1700
  }
1702
1701
  })
1703
1702
  },
1704
1703
  // <link rel="stylesheet" id="arcgisCoreStylesheet" href="https://jsdev.arcgis.com/VERSION/esri/themes/light/main.css" />
1705
- Ki(c)
1704
+ Bi(l)
1706
1705
  ];
1707
1706
  } else
1708
- return ln(t, r, n?.sourceLocation !== void 0);
1707
+ return on(t, r, n?.sourceLocation !== void 0);
1709
1708
  }
1710
- function ln(e, t, i) {
1709
+ function on(e, t, i) {
1711
1710
  const s = `${e}${me}`;
1712
1711
  return [
1713
1712
  // Browser tests import this as a Vite CSS module and adopt its stylesheet, so CSS must remain on the /@fs route.
1714
1713
  // Core's prebuilt JavaScript assets use the untransformed route configured below.
1715
- Ki(
1714
+ Bi(
1716
1715
  i ? `${e}${me}/` : ut(e, `${t}/assets/`)
1717
1716
  ),
1718
1717
  {
@@ -1726,7 +1725,7 @@ function ln(e, t, i) {
1726
1725
  }
1727
1726
  ];
1728
1727
  }
1729
- async function dn(e) {
1728
+ async function an(e) {
1730
1729
  const t = e._localCdnCore, i = t?.packageLocation ?? await $e(Ae), s = t?.sourceLocation !== void 0 ? [
1731
1730
  {
1732
1731
  type: "directory",
@@ -1768,41 +1767,41 @@ async function dn(e) {
1768
1767
  ];
1769
1768
  e.server.middlewares.use("/builddate.txt", (n, r) => {
1770
1769
  r.setHeader("Cache-Control", "no-cache"), r.setHeader("Content-Type", "text/plain");
1771
- const a = t?.sourceLocation ? "6.0.0-next.13" : j(i).version;
1770
+ const a = t?.sourceLocation ? "6.0.0-next.15" : D(i).version;
1772
1771
  r.end(JSON.stringify({ version: a }));
1773
- }), ie(e, s, [], "no-cache");
1772
+ }), te(e, s, [], "no-cache");
1774
1773
  }
1775
- const Ki = (e) => ({
1774
+ const Bi = (e) => ({
1776
1775
  // Not using join() because it would turn https:// into https:/
1777
1776
  cssHref: `${e}esri/themes/light/main.css`,
1778
1777
  // This is used be the theme switcher in `@arcgis/storybook-utils`
1779
1778
  id: "arcgisCoreStylesheet"
1780
1779
  }), gt = "customElement.js";
1781
- function pn(e, t) {
1780
+ function cn(e, t) {
1782
1781
  if (!t.startsWith(e))
1783
1782
  return t;
1784
1783
  const s = t.split(u.sep);
1785
- return s.at(un) !== s.at(mn) ? t : u.join(s.slice(0, -1).join(u.sep), gt);
1784
+ return s.at(ln) !== s.at(dn) ? t : u.join(s.slice(0, -1).join(u.sep), gt);
1786
1785
  }
1787
- const un = -1, mn = -2, fn = /["']\.\.?\/[^'"]+/gu, gn = (e, t, i, s) => e.replaceAll(fn, (n) => {
1786
+ const ln = -1, dn = -2, pn = /["']\.\.?\/[^'"]+/gu, un = (e, t, i, s) => e.replaceAll(pn, (n) => {
1788
1787
  const r = n.slice(1);
1789
1788
  if (!r.startsWith("./") && !r.startsWith("../"))
1790
1789
  return n;
1791
- const a = u.join(s, r), c = !r.endsWith(".js") && !r.split("/").at(-1).includes(".") ? pn(t.dir.distComponents, a) : a, d = c.startsWith(t.dir.distComponents) ? t.dir.dist + Ge(c.slice(t.dir.dist.length), t.apiExtractor) : c;
1790
+ const a = u.join(s, r), l = !r.endsWith(".js") && !r.split("/").at(-1).includes(".") ? cn(t.dir.distComponents, a) : a, d = l.startsWith(t.dir.distComponents) ? t.dir.dist + Ge(l.slice(t.dir.dist.length), t.apiExtractor) : l;
1792
1791
  if (i === s && a === d)
1793
1792
  return n;
1794
- const l = he(i, d), p = n.endsWith("/") ? `${l}/` : l;
1793
+ const c = he(i, d), p = n.endsWith("/") ? `${c}/` : c;
1795
1794
  return `${n[0]}${p}`;
1796
1795
  }), he = (e, t) => {
1797
1796
  const i = u.relative(e, t);
1798
1797
  return i.startsWith(".") ? i : `.${u.sep}${i}`;
1799
1798
  };
1800
- async function hn(e, t, i) {
1799
+ async function mn(e, t, i) {
1801
1800
  const s = u.resolve(e.dir.root, t);
1802
- e.viteConfig.build.emptyOutDir !== !1 && await K(s) && await Bs(s, { recursive: !0, force: !0 }), await X(s, { recursive: !0 }), await Ks(e.dir.distCdn, u.join(s, "build"), { recursive: !0 });
1801
+ e.viteConfig.build.emptyOutDir !== !1 && await _(s) && await Ms(s, { recursive: !0, force: !0 }), await ie(s, { recursive: !0 }), await Js(e.dir.distCdn, u.join(s, "build"), { recursive: !0 });
1803
1802
  const n = [
1804
1803
  "index.html",
1805
- ...await zs("**/*.html", {
1804
+ ...await Us("**/*.html", {
1806
1805
  cwd: e.dir.src,
1807
1806
  onlyFiles: !0,
1808
1807
  // The files we are looking for are unlikely to be symbolic links
@@ -1810,51 +1809,51 @@ async function hn(e, t, i) {
1810
1809
  // Not applicable for our glob pattern
1811
1810
  expandDirectories: !1
1812
1811
  })
1813
- ], r = u.relative(e.dir.root, e.dir.src), a = await oe(e), c = u.join(e.dir.src, "loader.ts"), d = a.map((l) => {
1814
- if ("cssHref" in l)
1815
- return `<link rel="stylesheet" href="${l.cssHref}">`;
1816
- if ("javascriptCode" in l && l.javascriptCode.at(0)?.includes(c) === !0)
1812
+ ], r = u.relative(e.dir.root, e.dir.src), a = await oe(e), l = u.join(e.dir.src, "loader.ts"), d = a.map((c) => {
1813
+ if ("cssHref" in c)
1814
+ return `<link rel="stylesheet" href="${c.cssHref}">`;
1815
+ if ("javascriptCode" in c && c.javascriptCode.at(0)?.includes(l) === !0)
1817
1816
  return "";
1818
- if ("tag" in l) {
1819
- const p = l.children ?? "";
1817
+ if ("tag" in c) {
1818
+ const p = c.children ?? "";
1820
1819
  if (typeof p == "string")
1821
- return `<${l.tag} ${Object.entries(l.attrs ?? {}).map(([m, f]) => `${m}="${f}"`).join(" ")}>${p}</${l.tag}>`;
1820
+ return `<${c.tag} ${Object.entries(c.attrs ?? {}).map(([m, f]) => `${m}="${f}"`).join(" ")}>${p}</${c.tag}>`;
1822
1821
  }
1823
- throw Error(b("@arcgis/lumina:buildWebApp", `Unsupported loader type: ${JSON.stringify(l)}`));
1822
+ throw Error(b("@arcgis/lumina:buildWebApp", `Unsupported loader type: ${JSON.stringify(c)}`));
1824
1823
  }).join(`
1825
1824
  `);
1826
1825
  await Promise.all(
1827
- n.map(async (l, p) => {
1828
- const f = p === 0 ? l : u.join(r, l), g = u.join(e.dir.root, f), h = u.join(s, f);
1829
- await X(u.dirname(h), { recursive: !0 });
1830
- const y = await z(g, "utf-8"), v = he(u.dirname(f), `build/${i}`), w = `${d}<script type="module" src="${v}"><\/script>
1831
- `, C = Math.min(
1826
+ n.map(async (c, p) => {
1827
+ const f = p === 0 ? c : u.join(r, c), g = u.join(e.dir.root, f), h = u.join(s, f);
1828
+ await ie(u.dirname(h), { recursive: !0 });
1829
+ const y = await W(g, "utf-8"), v = he(u.dirname(f), `build/${i}`), w = `${d}<script type="module" src="${v}"><\/script>
1830
+ `, S = Math.min(
1832
1831
  ...[y.indexOf("<style>"), y.indexOf("<script"), y.indexOf("</head>")].filter(
1833
1832
  (x) => x !== -1
1834
1833
  )
1835
1834
  );
1836
- if (C === Number.POSITIVE_INFINITY)
1835
+ if (S === Number.POSITIVE_INFINITY)
1837
1836
  throw Error(b("@arcgis/lumina:buildWebApp", `Failed to find <head> or <style> tag in ${g}`));
1838
- const E = y.slice(0, C) + w + y.slice(C), P = e.options?.build?.webApp?.transformFile?.(E, h, e) ?? E;
1839
- await _(h, P, "utf-8");
1837
+ const T = y.slice(0, S) + w + y.slice(S), E = e.options?.build?.webApp?.transformFile?.(T, h, e) ?? T;
1838
+ await z(h, E, "utf-8");
1840
1839
  })
1841
1840
  ), await e.options.build?.webApp?.afterBuildEnd?.(e);
1842
1841
  }
1843
1842
  const At = /* @__PURE__ */ new Map();
1844
- function yn(e) {
1843
+ function fn(e) {
1845
1844
  const t = e.endsWith(".js") ? `${e.slice(0, -3)}.d.ts` : `${e}.d.ts`, i = at(`node_modules/${t}`);
1846
1845
  if (i === void 0)
1847
1846
  throw Error(`Could not find declarations for ${e} while transforming a dynamic CDN import.`);
1848
1847
  const s = At.get(i);
1849
1848
  if (s !== void 0)
1850
1849
  return s;
1851
- const r = o.createSourceFile(i, Hs(i, "utf8"), o.ScriptTarget.Latest).statements.some(vn);
1850
+ const r = o.createSourceFile(i, Ws(i, "utf8"), o.ScriptTarget.Latest).statements.some(gn);
1852
1851
  return At.set(i, r), r;
1853
1852
  }
1854
- function vn(e) {
1853
+ function gn(e) {
1855
1854
  return o.isExportAssignment(e) ? !e.isExportEquals : o.isClassDeclaration(e) || o.isFunctionDeclaration(e) ? e.modifiers?.some((t) => t.kind === o.SyntaxKind.DefaultKeyword) === !0 : o.isExportDeclaration(e) && !e.isTypeOnly && e.exportClause !== void 0 ? o.isNamedExports(e.exportClause) && e.exportClause.elements.some((t) => !t.isTypeOnly && t.name.text === "default") : !1;
1856
1855
  }
1857
- const _i = /* @__PURE__ */ new Set([
1856
+ const Ki = /* @__PURE__ */ new Set([
1858
1857
  "chunks",
1859
1858
  "components",
1860
1859
  "docs",
@@ -1867,13 +1866,13 @@ const _i = /* @__PURE__ */ new Set([
1867
1866
  "collection",
1868
1867
  "extras",
1869
1868
  "support"
1870
- ]), O = "@arcgis/lumina:buildCdn", le = "cdn", Wi = "index", Z = "main";
1871
- function bn(e) {
1869
+ ]), O = "@arcgis/lumina:buildCdn", le = "cdn", _i = "index", Q = "main";
1870
+ function hn(e) {
1872
1871
  const { skip: t = !1, namespace: i, esbuildOptions: s = {}, entrypointTransformer: n } = e.options.build?.cdn ?? {}, r = e.options.build?.webApp?.destination, a = i !== void 0;
1873
1872
  if (a) {
1874
1873
  if (i.toLowerCase() !== i)
1875
1874
  throw new Error(`Expected CDN namespace to be all lowercase. Received: ${i}`);
1876
- if (_i.has(i))
1875
+ if (Ki.has(i))
1877
1876
  throw new Error(
1878
1877
  `Namespace name "${i}" is restricted as it collides with a well-known Lumina dist/ folder name or Stencil dist/ folder name.`
1879
1878
  );
@@ -1881,12 +1880,12 @@ function bn(e) {
1881
1880
  'The "namespace" option in the "build.cdn" is deprecated and will be removed in the next major version.'
1882
1881
  );
1883
1882
  }
1884
- const c = i ?? Wi;
1883
+ const l = i ?? _i;
1885
1884
  if (e.provideAssets([
1886
1885
  {
1887
1886
  type: "dynamic",
1888
- source: () => Nr(e),
1889
- destination: `../${a ? c : Z}.css`
1887
+ source: () => xr(e),
1888
+ destination: `../${a ? l : Q}.css`
1890
1889
  }
1891
1890
  ]), !t)
1892
1891
  return {
@@ -1895,33 +1894,33 @@ function bn(e) {
1895
1894
  if (e.isInStorybook)
1896
1895
  return;
1897
1896
  if ((e.apiJsonComponents ?? []).length === 0) {
1898
- T.warn(
1897
+ $.warn(
1899
1898
  O,
1900
1899
  "Skipping CDN build as no public custom elements were found in this package. Double check that your component files follow the required naming convention: https://webgis.esri.com/references/lumina/component."
1901
1900
  );
1902
1901
  return;
1903
1902
  }
1904
- const d = H && j().name !== "@arcgis/embeddable-components", l = Date.now(), p = Array.isArray(s.entryPoints) ? s.entryPoints.map((g) => typeof g == "string" ? { in: g, out: "" } : g) : typeof s.entryPoints == "object" ? Object.entries(s.entryPoints).map(([g, h]) => ({ in: h, out: g })) : [], m = await wn(
1903
+ const d = q && D().name !== "@arcgis/embeddable-components", c = Date.now(), p = Array.isArray(s.entryPoints) ? s.entryPoints.map((g) => typeof g == "string" ? { in: g, out: "" } : g) : typeof s.entryPoints == "object" ? Object.entries(s.entryPoints).map(([g, h]) => ({ in: h, out: g })) : [], m = await yn(
1905
1904
  e,
1906
- c,
1905
+ l,
1907
1906
  s,
1908
1907
  p,
1909
1908
  n,
1910
1909
  d
1911
1910
  );
1912
- await Sn(
1911
+ await vn(
1913
1912
  m,
1914
1913
  e,
1915
- a ? `${c}.esm` : c,
1914
+ a ? `${l}.esm` : l,
1916
1915
  p,
1917
1916
  d
1918
1917
  );
1919
1918
  const f = Date.now();
1920
- T.info(O, `CDN was built in ${f - l}ms`), r && await hn(e, r, `${a ? `${c}.esm` : c}.js`);
1919
+ $.info(O, `CDN was built in ${f - c}ms`), r && await mn(e, r, `${a ? `${l}.esm` : l}.js`);
1921
1920
  }
1922
1921
  };
1923
1922
  }
1924
- async function wn(e, t, i, s, n, r) {
1923
+ async function yn(e, t, i, s, n, r) {
1925
1924
  const a = e.environment;
1926
1925
  if (i.minify && r)
1927
1926
  throw Error(
@@ -1937,15 +1936,15 @@ async function wn(e, t, i, s, n, r) {
1937
1936
  "Source maps in the CDN build are not yet supported - open a feature request with Lumina maintainers if it is needed"
1938
1937
  )
1939
1938
  );
1940
- const c = `import { defineCustomElements } from "./loader";
1939
+ const l = `import { defineCustomElements } from "./loader";
1941
1940
  /**
1942
1941
  * We use import.meta.url to get the path to the current file
1943
1942
  * and pass it to defineCustomElements to set the resources url.
1944
1943
  * The script's file name will be stripped inside defineCustomElements.
1945
1944
  **/
1946
1945
  defineCustomElements({resourcesUrl: import.meta.url});
1947
- ${$i(e._globalCssString, e)}`, d = n?.(c, e) ?? c;
1948
- return await _s({
1946
+ ${Ti(e._globalCssString, e)}`, d = n?.(l, e) ?? l;
1947
+ return await Bs({
1949
1948
  bundle: !0,
1950
1949
  minify: r ? !0 : a === "production",
1951
1950
  treeShaking: !0,
@@ -1970,20 +1969,20 @@ ${$i(e._globalCssString, e)}`, d = n?.(c, e) ?? c;
1970
1969
  chunkNames: "[hash]",
1971
1970
  resolveExtensions: [".js", ".json"],
1972
1971
  banner: { js: e.banner },
1973
- target: Fi(e),
1972
+ target: ji(e),
1974
1973
  ...i,
1975
1974
  write: !1,
1976
1975
  plugins: [
1977
1976
  {
1978
1977
  name: "@arcgis/lumina:accessorSupport",
1979
- setup(l) {
1980
- l.onResolve(
1978
+ setup(c) {
1979
+ c.onResolve(
1981
1980
  { filter: /^@arcgis\/core\/applications\/Components\/reactiveUtils.js$/ },
1982
1981
  (p) => p.importer.endsWith("runtime.js") ? {
1983
1982
  path: p.path,
1984
1983
  namespace: "@arcgis/lumina:accessorSupport"
1985
1984
  } : void 0
1986
- ), l.onLoad({ filter: /^/, namespace: "@arcgis/lumina:accessorSupport" }, () => ({
1985
+ ), c.onLoad({ filter: /^/, namespace: "@arcgis/lumina:accessorSupport" }, () => ({
1987
1986
  contents: "export const createObservable=undefined, trackAccess=undefined, createTrackingTarget=undefined, runTracked = undefined;",
1988
1987
  loader: "js"
1989
1988
  }));
@@ -1994,18 +1993,18 @@ ${$i(e._globalCssString, e)}`, d = n?.(c, e) ?? c;
1994
1993
  // manual injection further below. Thus drop the CSS import from the
1995
1994
  // chunks/runtime.js file.
1996
1995
  name: "@arcgis/lumina:customGlobalCssInjection",
1997
- setup(l) {
1996
+ setup(c) {
1998
1997
  const p = e.options.build?.cdn?.namespace === void 0 ? (
1999
1998
  // eslint-disable-next-line require-unicode-regexp
2000
- new RegExp(`\\/${le}\\/${Z}\\.css$`)
1999
+ new RegExp(`\\/${le}\\/${Q}\\.css$`)
2001
2000
  ) : (
2002
2001
  // eslint-disable-next-line require-unicode-regexp
2003
2002
  new RegExp(`\\/${e.options.build.cdn.namespace}\\/${e.options.build.cdn.namespace}\\.css$`)
2004
2003
  );
2005
- l.onResolve({ filter: p }, ({ path: m }) => ({
2004
+ c.onResolve({ filter: p }, ({ path: m }) => ({
2006
2005
  path: m,
2007
2006
  namespace: "build-cdn:global-css"
2008
- })), l.onLoad({ filter: /.*/, namespace: "build-cdn:global-css" }, () => ({
2007
+ })), c.onLoad({ filter: /.*/, namespace: "build-cdn:global-css" }, () => ({
2009
2008
  contents: "",
2010
2009
  loader: "js"
2011
2010
  }));
@@ -2030,10 +2029,10 @@ ${$i(e._globalCssString, e)}`, d = n?.(c, e) ?? c;
2030
2029
  });
2031
2030
  }
2032
2031
  const Lt = "stdin.js";
2033
- async function Sn(e, t, i, s, n) {
2032
+ async function vn(e, t, i, s, n) {
2034
2033
  const r = t.dir.distCdn, a = `${i}.js`;
2035
- let c;
2036
- n && (c = new Set(s.map((p) => `${p.out}.js`)), c.add(a));
2034
+ let l;
2035
+ n && (l = new Set(s.map((p) => `${p.out}.js`)), l.add(a));
2037
2036
  const d = new Map(
2038
2037
  e.outputFiles.map((p) => {
2039
2038
  const m = {
@@ -2044,13 +2043,13 @@ async function Sn(e, t, i, s, n) {
2044
2043
  }, f = G(p.path.slice(r.length));
2045
2044
  if (f === Lt) {
2046
2045
  if (n) {
2047
- const h = p.text.match(Cn)?.[0];
2046
+ const h = p.text.match(bn)?.[0];
2048
2047
  if (h === void 0)
2049
2048
  throw Error(
2050
2049
  `Failed to find the runtime variable name in the CDN entrypoint file. This likely indicates a bug in Lumina. ${Lt} contents:
2051
2050
  ${p.text}`
2052
2051
  );
2053
- m.code = `${m.code.trimEnd()}${En(h, s)}`, m.isAsync = !1;
2052
+ m.code = `${m.code.trimEnd()}${wn(h, s)}`, m.isAsync = !1;
2054
2053
  }
2055
2054
  return [a, m];
2056
2055
  }
@@ -2060,7 +2059,7 @@ ${p.text}`
2060
2059
  n && d.forEach((p, m) => {
2061
2060
  if (p.isAsync === void 0)
2062
2061
  if (m.endsWith(".js")) {
2063
- if (Ui(p, d), c?.has(m) === !0 && p.code.includes(zi))
2062
+ if (Ui(p, d), l?.has(m) === !0 && p.code.includes(Wi))
2064
2063
  throw Error(
2065
2064
  b(
2066
2065
  O,
@@ -2070,18 +2069,18 @@ ${p.text}`
2070
2069
  } else
2071
2070
  p.isAsync = !1;
2072
2071
  }), t.options.build?.cdn?.transformer?.(d, t);
2073
- const l = /* @__PURE__ */ new Map();
2072
+ const c = /* @__PURE__ */ new Map();
2074
2073
  for (const p of d.keys()) {
2075
2074
  const m = p.lastIndexOf("/");
2076
2075
  if (m !== -1) {
2077
2076
  const f = p.slice(0, m);
2078
- l.set(f, X(r + f, { recursive: !0 }));
2077
+ c.set(f, ie(r + f, { recursive: !0 }));
2079
2078
  }
2080
2079
  }
2081
- await Promise.all(l.values()), await Promise.all(Array.from(d.entries(), async ([p, { code: m }]) => await _(r + p, m)));
2080
+ await Promise.all(c.values()), await Promise.all(Array.from(d.entries(), async ([p, { code: m }]) => await z(r + p, m)));
2082
2081
  }
2083
- const Cn = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
2084
- function En(e, t) {
2082
+ const bn = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
2083
+ function wn(e, t) {
2085
2084
  let i = [
2086
2085
  "window.$arcgis",
2087
2086
  "||",
@@ -2093,7 +2092,7 @@ function En(e, t) {
2093
2092
  const n = [];
2094
2093
  for (const r of t) {
2095
2094
  if (r.in.includes("*")) {
2096
- T.warn(O, `$arcgis.import does not support wildcard imports, so ${r.in} will be ignored.`);
2095
+ $.warn(O, `$arcgis.import does not support wildcard imports, so ${r.in} will be ignored.`);
2097
2096
  continue;
2098
2097
  }
2099
2098
  if (r.out.startsWith(".") || r.out.startsWith("/"))
@@ -2120,7 +2119,7 @@ function En(e, t) {
2120
2119
  // minified to a variable name that is already used inside the closure).
2121
2120
  `)($arcgis,${e}`
2122
2121
  ].join(""), s) {
2123
- const r = j().name;
2122
+ const r = D().name;
2124
2123
  i += `,"${r}/",".js"`;
2125
2124
  }
2126
2125
  return i += ")", i;
@@ -2132,76 +2131,76 @@ function Ui(e, t) {
2132
2131
  }
2133
2132
  e.isProcessing = !0;
2134
2133
  const i = [], s = [], n = [], r = /* @__PURE__ */ new Set(), a = [];
2135
- let c = 0;
2136
- const d = e.code.matchAll(Tn);
2137
- for (const S of d) {
2138
- const [A, L, U, F, N] = S, B = N.startsWith(Le);
2139
- if (c !== 0 && c !== S.index) {
2140
- const R = e.code.slice(c, S.index);
2141
- n.push(R), a.push([c, R.length, 0, ""]);
2134
+ let l = 0;
2135
+ const d = e.code.matchAll(Sn);
2136
+ for (const C of d) {
2137
+ const [L, A, M, j, N] = C, K = N.startsWith(Le);
2138
+ if (l !== 0 && l !== C.index) {
2139
+ const R = e.code.slice(l, C.index);
2140
+ n.push(R), a.push([l, R.length, 0, ""]);
2142
2141
  }
2143
- if (c = S.index + A.length, B)
2144
- a.push([S.index, A.length, 0, ""]), s.push(`"${qi(N.slice(Le.length))}"`), i.push(L?.replaceAll(" as ", ":") ?? U ?? F ?? "");
2142
+ if (l = C.index + L.length, K)
2143
+ a.push([C.index, L.length, 0, ""]), s.push(`"${qi(N.slice(Le.length))}"`), i.push(A?.replaceAll(" as ", ":") ?? M ?? j ?? "");
2145
2144
  else {
2146
- const R = Hi(N, t), M = R?.isAsync === !0;
2147
- if (L !== void 0) {
2145
+ const R = zi(N, t), J = R?.isAsync === !0;
2146
+ if (A !== void 0) {
2148
2147
  const be = [];
2149
- for (const Me of L.slice(1, -1).split(",")) {
2148
+ for (const Me of A.slice(1, -1).split(",")) {
2150
2149
  const [St, Ct = St] = Me.split(" as ");
2151
- M || r.add(Ct), be.push(`${St}:${Ct}`);
2150
+ J || r.add(Ct), be.push(`${St}:${Ct}`);
2152
2151
  }
2153
- if (M) {
2152
+ if (J) {
2154
2153
  const Me = R.oldSingleExportName === void 0 ? `{${be.join(",")}}` : be[0].split(":")[1];
2155
- a.push([S.index + 6, 0, L.length, Me]);
2154
+ a.push([C.index + 6, 0, A.length, Me]);
2156
2155
  }
2157
- } else if (U === void 0 && F === void 0)
2158
- M && a.push([S.index + 6, 0, 0, ""]);
2156
+ } else if (M === void 0 && j === void 0)
2157
+ J && a.push([C.index + 6, 0, 0, ""]);
2159
2158
  else {
2160
- if (M)
2159
+ if (J)
2161
2160
  throw Error(
2162
2161
  b(
2163
2162
  O,
2164
- `Expected local import specifiers to use only named or side-effect import syntax. Found ${A} in a chunk:
2163
+ `Expected local import specifiers to use only named or side-effect import syntax. Found ${L} in a chunk:
2165
2164
  ${R.code}`
2166
2165
  )
2167
2166
  );
2168
- r.add(F ?? U);
2167
+ r.add(j ?? M);
2169
2168
  }
2170
2169
  }
2171
2170
  }
2172
2171
  e.isProcessing = !1;
2173
- const l = e.isAsync === !0;
2174
- if (e.isAsync = l || a.length > 0, !e.isAsync) {
2172
+ const c = e.isAsync === !0;
2173
+ if (e.isAsync = c || a.length > 0, !e.isAsync) {
2175
2174
  e.code = jt(e.code, t);
2176
2175
  return;
2177
2176
  }
2178
- const p = kn(r);
2179
- let m = e.code.slice(0, c);
2180
- for (let S = a.length - 1; S >= 0; S--) {
2181
- const [A, L, U, F] = a[S];
2182
- let N = L, B = "";
2183
- if (L === 0) {
2184
- const M = p();
2185
- s.push(M), B = ` ${M} from`, F !== "" ? (N = U + 4, i.push(F)) : i.push("");
2177
+ const p = Tn(r);
2178
+ let m = e.code.slice(0, l);
2179
+ for (let C = a.length - 1; C >= 0; C--) {
2180
+ const [L, A, M, j] = a[C];
2181
+ let N = A, K = "";
2182
+ if (A === 0) {
2183
+ const J = p();
2184
+ s.push(J), K = ` ${J} from`, j !== "" ? (N = M + 4, i.push(j)) : i.push("");
2186
2185
  }
2187
- m = m.slice(0, A) + B + m.slice(A + N);
2186
+ m = m.slice(0, L) + K + m.slice(L + N);
2188
2187
  }
2189
- const [f, g] = Nt(e), h = i.findLastIndex((S) => S.length > 0), y = i.slice(0, h + 1).join(","), v = i.length === 0 ? "_" : `([${y}])`, w = `${zi}${v}=>{`, C = s.join(","), E = `${g}},${C})`;
2190
- let P = e.code.slice(c, f);
2191
- P = `${n.join("")}${P}`, P = jt(P, t);
2192
- const x = `${m}${w}${P}${E}`;
2188
+ const [f, g] = Nt(e), h = i.findLastIndex((C) => C.length > 0), y = i.slice(0, h + 1).join(","), v = i.length === 0 ? "_" : `([${y}])`, w = `${Wi}${v}=>{`, S = s.join(","), T = `${g}},${S})`;
2189
+ let E = e.code.slice(l, f);
2190
+ E = `${n.join("")}${E}`, E = jt(E, t);
2191
+ const x = `${m}${w}${E}${T}`;
2193
2192
  e.code = x;
2194
2193
  }
2195
- const zi = "export default $arcgis.t(";
2194
+ const Wi = "export default $arcgis.t(";
2196
2195
  function Nt(e) {
2197
- const t = $n.exec(e.code), i = t?.index ?? e.code.length;
2196
+ const t = Cn.exec(e.code), i = t?.index ?? e.code.length;
2198
2197
  let s = "";
2199
2198
  if (t !== null) {
2200
2199
  const n = t[1].split(",");
2201
2200
  if (n.length > 1)
2202
2201
  s = `return{${n.map((r) => {
2203
- const [a, c = a] = r.split(" as ");
2204
- return `${c}:${a}`;
2202
+ const [a, l = a] = r.split(" as ");
2203
+ return `${l}:${a}`;
2205
2204
  }).join(",")}}`;
2206
2205
  else {
2207
2206
  const [r, a = r] = n[0].split(" as ");
@@ -2210,8 +2209,8 @@ function Nt(e) {
2210
2209
  }
2211
2210
  return [i, s];
2212
2211
  }
2213
- const Tn = /import(?:(\{[^}]+\})from|\*as ([\w$]+) from| ([\w$]+) from)?"([^"]+)";/gu, $n = /export\{([^}]+)\};\n$/u, Le = "@arcgis/core/";
2214
- function Hi(e, t) {
2212
+ const Sn = /import(?:(\{[^}]+\})from|\*as ([\w$]+) from| ([\w$]+) from)?"([^"]+)";/gu, Cn = /export\{([^}]+)\};\n$/u, Le = "@arcgis/core/";
2213
+ function zi(e, t) {
2215
2214
  if (!e.startsWith("./"))
2216
2215
  return;
2217
2216
  const i = e.slice(2), s = t.get(i);
@@ -2222,40 +2221,40 @@ function Hi(e, t) {
2222
2221
  return s;
2223
2222
  }
2224
2223
  function jt(e, t) {
2225
- return e.replaceAll(Pn, (i, s) => {
2224
+ return e.replaceAll(En, (i, s) => {
2226
2225
  if (s.startsWith(Le)) {
2227
2226
  const n = qi(s.slice(Le.length));
2228
- return `$arcgis.t(m=>${yn(s) ? "({default:m[0]})" : "m[0]"},"${n}")`;
2227
+ return `$arcgis.t(m=>${fn(s) ? "({default:m[0]})" : "m[0]"},"${n}")`;
2229
2228
  } else if (s.startsWith("./")) {
2230
- const n = Hi(s, t);
2229
+ const n = zi(s, t);
2231
2230
  if (n?.isAsync === !0)
2232
2231
  return `${i}.then(m=>m.default${n.oldSingleExportName === void 0 ? "" : `.then(e=>({${n.oldSingleExportName}:e}))`})`;
2233
2232
  }
2234
2233
  return i;
2235
2234
  });
2236
2235
  }
2237
- const Pn = /(?<![.\w\d])import\("([^"]+)"\)/gu, qi = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
2238
- function kn(e) {
2236
+ const En = /(?<![.\w\d])import\("([^"]+)"\)/gu, qi = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
2237
+ function Tn(e) {
2239
2238
  const t = [it];
2240
2239
  return () => {
2241
2240
  for (; ; ) {
2242
- const i = An(t);
2243
- if (Ln(t), !e.has(i))
2241
+ const i = kn(t);
2242
+ if (In(t), !e.has(i))
2244
2243
  return e.add(i), i;
2245
2244
  }
2246
2245
  };
2247
2246
  }
2248
- const it = 0, ht = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Vi = `${ht}0123456789`, In = ht.length, xn = Vi.length;
2249
- function An(e) {
2247
+ const it = 0, ht = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Hi = `${ht}0123456789`, $n = ht.length, Pn = Hi.length;
2248
+ function kn(e) {
2250
2249
  let t = ht[e[0]];
2251
2250
  for (let i = 1; i < e.length; ++i)
2252
- t += Vi[e[i]];
2251
+ t += Hi[e[i]];
2253
2252
  return t;
2254
2253
  }
2255
- function Ln(e) {
2254
+ function In(e) {
2256
2255
  let t = e.length - 1;
2257
2256
  for (; t >= 0; ) {
2258
- const i = t === 0 ? In : xn;
2257
+ const i = t === 0 ? $n : Pn;
2259
2258
  if (e[t] += 1, e[t] >= i)
2260
2259
  e[t] = it, t--;
2261
2260
  else
@@ -2263,30 +2262,30 @@ function Ln(e) {
2263
2262
  }
2264
2263
  e.push(it);
2265
2264
  }
2266
- function Re(e = j(), t = !1) {
2265
+ function Re(e = D(), t = !1) {
2267
2266
  const i = e.name === "@esri/calcite-components", s = mt(e) ?? e.version, n = s.includes("next");
2268
2267
  if (i && n)
2269
2268
  return `https://cdn.jsdelivr.net/npm/@esri/calcite-components@${s}/dist/${le}/`;
2270
- const r = t || n ? "jsdev.arcgis.com" : "js.arcgis.com", a = Nn(e.name), c = jn(s);
2271
- if (c === void 0)
2269
+ const r = t || n ? "jsdev.arcgis.com" : "js.arcgis.com", a = xn(e.name), l = An(s);
2270
+ if (l === void 0)
2272
2271
  throw Error(
2273
2272
  b(
2274
2273
  "@arcgis/lumina:dependencies",
2275
2274
  `Failed to parse a semver version: ${e.name}. Ensure the version follows D.D.D format. Package version: ${e.version}`
2276
2275
  )
2277
2276
  );
2278
- return a === "core" ? `https://${r}/${c}/` : i ? `https://${r}/${a}/${c}/` : `https://${r}/${c}/${a}/`;
2277
+ return a === "core" ? `https://${r}/${l}/` : i ? `https://${r}/${a}/${l}/` : `https://${r}/${l}/${a}/`;
2279
2278
  }
2280
- const Nn = (e) => e.split("/").pop() ?? e;
2281
- function jn(e) {
2279
+ const xn = (e) => e.split("/").pop() ?? e;
2280
+ function An(e) {
2282
2281
  const t = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)(?<prerelease>-.*)?$/u, i = e.match(t);
2283
2282
  if (i?.groups === void 0)
2284
2283
  return;
2285
- const { major: s, minor: n, patch: r, prerelease: a } = i.groups, c = `${s}.${n}.${r}`;
2286
- return a?.startsWith("-next") ? `${c}-next` : c;
2284
+ const { major: s, minor: n, patch: r, prerelease: a } = i.groups, l = `${s}.${n}.${r}`;
2285
+ return a?.startsWith("-next") ? `${l}-next` : l;
2287
2286
  }
2288
- async function Fn(e, t, i, s, n) {
2289
- const r = t.packageName, { hasCss: a, cdnName: c } = await Gi(t.packageLocation) ?? {};
2287
+ async function Ln(e, t, i, s, n) {
2288
+ const r = t.packageName, { hasCss: a, cdnName: l } = await Vi(t.packageLocation) ?? {};
2290
2289
  if (i === "cdn") {
2291
2290
  const m = t.cdnUrl ?? Re(t.packageJson, n);
2292
2291
  return [
@@ -2295,7 +2294,7 @@ async function Fn(e, t, i, s, n) {
2295
2294
  tag: "link",
2296
2295
  attrs: {
2297
2296
  rel: "stylesheet",
2298
- src: `${m}${c}.css`
2297
+ src: `${m}${l}.css`
2299
2298
  }
2300
2299
  }
2301
2300
  ] : [],
@@ -2303,12 +2302,12 @@ async function Fn(e, t, i, s, n) {
2303
2302
  tag: "script",
2304
2303
  attrs: {
2305
2304
  type: "module",
2306
- src: `${m}${c}.esm.js`
2305
+ src: `${m}${l}.esm.js`
2307
2306
  }
2308
2307
  }
2309
2308
  ];
2310
2309
  }
2311
- const d = `${r}/dist/${c}/${c}.css${Q}`, l = a ? [
2310
+ const d = `${r}/dist/${l}/${l}.css${Y}`, c = a ? [
2312
2311
  `import styles$${s} from "${d}";`,
2313
2312
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${s}.styleSheet];`
2314
2313
  ] : [], p = `${r}/dist/esm/loader.js`;
@@ -2320,39 +2319,39 @@ async function Fn(e, t, i, s, n) {
2320
2319
  */
2321
2320
  optimizableImports: [p],
2322
2321
  javascriptCode: [
2323
- ...l,
2322
+ ...c,
2324
2323
  `import { defineCustomElements as defineCustomElements$${s} } from "${p}";`,
2325
2324
  `defineCustomElements$${s}(globalThis.window, {`,
2326
- ` resourcesUrl: "${ut(e, t.packageLocation)}/dist/${c}/",`,
2325
+ ` resourcesUrl: "${ut(e, t.packageLocation)}/dist/${l}/",`,
2327
2326
  "});"
2328
2327
  ]
2329
2328
  }
2330
2329
  ];
2331
2330
  }
2332
- async function Gi(e) {
2331
+ async function Vi(e) {
2333
2332
  const t = u.join(e, "dist"), i = u.basename(e), n = (await ct(t)).filter(
2334
- (a) => !_i.has(a) && !a.includes(".")
2333
+ (a) => !Ki.has(a) && !a.includes(".")
2335
2334
  ), r = n.find(
2336
2335
  (a) => a.startsWith("arcgis-") || // This is the case for template-components and field-apps-custom-elements
2337
2336
  a === i
2338
2337
  );
2339
2338
  return r === void 0 ? await Promise.all(
2340
2339
  n.map(async (a) => await Ft(t, a))
2341
- ).then((a) => a.find(D)) : await Ft(t, r);
2340
+ ).then((a) => a.find(F)) : await Ft(t, r);
2342
2341
  }
2343
2342
  async function Ft(e, t) {
2344
- const i = u.join(e, t, `${t}.css`), s = u.join(e, t, "assets"), n = u.join(e, t, `${t}.esm.js`), [r, a, c] = await Promise.all([
2345
- K(i),
2346
- K(s),
2347
- K(n)
2343
+ const i = u.join(e, t, `${t}.css`), s = u.join(e, t, "assets"), n = u.join(e, t, `${t}.esm.js`), [r, a, l] = await Promise.all([
2344
+ _(i),
2345
+ _(s),
2346
+ _(n)
2348
2347
  ]);
2349
- return r || a || c ? {
2348
+ return r || a || l ? {
2350
2349
  hasCss: r,
2351
2350
  cdnName: t
2352
2351
  } : void 0;
2353
2352
  }
2354
- async function Dn(e, t, i, s, n) {
2355
- const a = t.packageJson.exports?.[`./${Z}.css`] === void 0 ? await Gi(t.packageLocation) : void 0, c = a?.cdnName ?? le, d = a === void 0 ? `${Wi}.js` : `${a.cdnName}.esm.js`;
2353
+ async function Nn(e, t, i, s, n) {
2354
+ const a = t.packageJson.exports?.[`./${Q}.css`] === void 0 ? await Vi(t.packageLocation) : void 0, l = a?.cdnName ?? le, d = a === void 0 ? `${_i}.js` : `${a.cdnName}.esm.js`;
2356
2355
  if (i === "cdn")
2357
2356
  return {
2358
2357
  tag: "script",
@@ -2361,7 +2360,7 @@ async function Dn(e, t, i, s, n) {
2361
2360
  src: `${t.cdnUrl ?? Re(t.packageJson, n)}${d}`
2362
2361
  }
2363
2362
  };
2364
- const l = Rn(t.packageJson), p = `${t.packageName}/${u.normalize(l)}${Q}`, m = [
2363
+ const c = jn(t.packageJson), p = `${t.packageName}/${u.normalize(c)}${Y}`, m = [
2365
2364
  `import styles$${s} from "${p}";`,
2366
2365
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${s}.styleSheet];`
2367
2366
  ], f = `${t.packageName}/loader`;
@@ -2375,19 +2374,19 @@ async function Dn(e, t, i, s, n) {
2375
2374
  ...m,
2376
2375
  `import { defineCustomElements as defineCustomElements$${s} } from "${f}";`,
2377
2376
  `defineCustomElements$${s}({`,
2378
- ` resourcesUrl: "${ut(e, t.packageLocation)}/dist/${c}/",`,
2377
+ ` resourcesUrl: "${ut(e, t.packageLocation)}/dist/${l}/",`,
2379
2378
  "});"
2380
2379
  ]
2381
2380
  };
2382
2381
  }
2383
- function Rn(e) {
2382
+ function jn(e) {
2384
2383
  const { exports: t } = e;
2385
2384
  if (t === void 0)
2386
2385
  throw new Error(
2387
2386
  `Package "${e.name}" does not have an "exports" field. All Lumina packages must include an "exports" field.`
2388
2387
  );
2389
- const i = Object.entries(t).filter(([n]) => u.extname(n) === ".css"), s = i.find(([, n]) => n === `./${Z}.css`);
2390
- return s ? s[0] : i.length > 0 ? i[0][0] : `./${Z}.css`;
2388
+ const i = Object.entries(t).filter(([n]) => u.extname(n) === ".css"), s = i.find(([, n]) => n === `./${Q}.css`);
2389
+ return s ? s[0] : i.length > 0 ? i[0][0] : `./${Q}.css`;
2391
2390
  }
2392
2391
  async function oe(e, t) {
2393
2392
  return t !== void 0 ? await Dt(e, t) : (e._loadersCache ??= Dt(e), await e._loadersCache);
@@ -2398,16 +2397,16 @@ async function Dt(e, t) {
2398
2397
  const a = async (m) => (await Promise.all(
2399
2398
  m.map(async (f) => {
2400
2399
  const g = r++;
2401
- return f.type === "stencil" ? await Fn(n, f, i, g, s) : f.type === "@arcgis/lumina" ? await Dn(n, f, i, g, s) : void 0;
2400
+ return f.type === "stencil" ? await Ln(n, f, i, g, s) : f.type === "@arcgis/lumina" ? await Nn(n, f, i, g, s) : void 0;
2402
2401
  })
2403
- )).filter(D).flat(), c = await Promise.all([
2402
+ )).filter(F).flat(), l = await Promise.all([
2404
2403
  // This may contain an import map so must be first
2405
- cn(e, n, i, s),
2404
+ nn(e, n, i, s),
2406
2405
  ne.then(a),
2407
- Xi(e).then(a)
2408
- ]), d = u.join(e.dir.src, "loader.ts"), l = t ?? (i === "cdn" ? `./${e.options.build?.cdn?.namespace ?? le}/` : void 0);
2406
+ Gi(e).then(a)
2407
+ ]), d = u.join(e.dir.src, "loader.ts"), c = t ?? (i === "cdn" ? `./${e.options.build?.cdn?.namespace ?? le}/` : void 0);
2409
2408
  return [
2410
- ...c.flat(),
2409
+ ...l.flat(),
2411
2410
  {
2412
2411
  optimizableImports: [
2413
2412
  /**
@@ -2418,16 +2417,16 @@ async function Dt(e, t) {
2418
2417
  javascriptCode: [
2419
2418
  `import { defineCustomElements } from "${d}";`,
2420
2419
  "globalThis.devOnly$ownTagNames = new Set();",
2421
- `defineCustomElements(${l === void 0 ? "" : `{resourcesUrl:${JSON.stringify(l)}}`});`
2420
+ `defineCustomElements(${c === void 0 ? "" : `{resourcesUrl:${JSON.stringify(c)}}`});`
2422
2421
  ]
2423
2422
  }
2424
2423
  ];
2425
2424
  }
2426
- async function Xi(e) {
2425
+ async function Gi(e) {
2427
2426
  const t = e.options?.serve?.extraDependencies ?? [];
2428
2427
  return t.length === 0 ? [] : (e._serveOnlyDependencies ??= Promise.all(
2429
2428
  t.map(async (i) => {
2430
- const s = typeof i == "string" ? void 0 : i, n = typeof i == "string" ? i : i.name, r = await Ai(n);
2429
+ const s = typeof i == "string" ? void 0 : i, n = typeof i == "string" ? i : i.name, r = await xi(n);
2431
2430
  if (r === void 0)
2432
2431
  throw Error(
2433
2432
  b(
@@ -2440,14 +2439,14 @@ async function Xi(e) {
2440
2439
  cdnUrl: s?.getCdnUrl(e)
2441
2440
  };
2442
2441
  })
2443
- ).then((i) => i.filter(D)), await e._serveOnlyDependencies);
2442
+ ).then((i) => i.filter(F)), await e._serveOnlyDependencies);
2444
2443
  }
2445
- const Yi = "/C:@arcgis/lumina-compiler/testSetupFile", st = `${Yi}/dependencies`, Rt = /^\/C:@arcgis\/lumina-compiler\/testSetupFile/u, We = [Yi];
2446
- function On(e) {
2444
+ const Xi = "/C:@arcgis/lumina-compiler/testSetupFile", st = `${Xi}/dependencies`, Rt = /^\/C:@arcgis\/lumina-compiler\/testSetupFile/u, Ue = [Xi];
2445
+ function Fn(e) {
2447
2446
  return e.apiJsonEnabled ? `${Ot(e)}
2448
2447
  import "${st}";` : Ot(e);
2449
2448
  }
2450
- async function Mn(e) {
2449
+ async function Dn(e) {
2451
2450
  return (await oe(e)).map((i, s) => {
2452
2451
  if ("javascriptCode" in i)
2453
2452
  return i.javascriptCode.join(`
@@ -2458,7 +2457,7 @@ async function Mn(e) {
2458
2457
  * The $index naming is already used by makeLoaders(), so we use the
2459
2458
  * $t prefix to avoid collisions.
2460
2459
  */
2461
- `import styles$t${s} from "${i.cssHref}${Q}";`,
2460
+ `import styles$t${s} from "${i.cssHref}${Y}";`,
2462
2461
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$t${s}.styleSheet];`
2463
2462
  ].join(`
2464
2463
  `);
@@ -2472,16 +2471,16 @@ async function Mn(e) {
2472
2471
 
2473
2472
  `);
2474
2473
  }
2475
- const Ot = (e) => [e.isInPuppeteerTestBackEnd ? Jn : "", Bn].join(""), Jn = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
2474
+ const Ot = (e) => [e.isInPuppeteerTestBackEnd ? Rn : "", On].join(""), Rn = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
2476
2475
  setupPuppeteerTest();
2477
- `, Bn = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
2476
+ `, On = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
2478
2477
  setupLuminaTest();
2479
- `, Kn = "@arcgis/lumina:generateLoaderTs";
2478
+ `, Mn = "@arcgis/lumina:generateLoaderTs";
2480
2479
  let Ne;
2481
- function _n(e) {
2480
+ function Jn(e) {
2482
2481
  const t = /[\\\/]src[\\\/]loader\.ts$/u;
2483
- return [qs(e.apiExtractorPluginConfig), {
2484
- name: Kn,
2482
+ return [zs(e.apiExtractorPluginConfig), {
2483
+ name: Mn,
2485
2484
  configResolved() {
2486
2485
  Ne = `${e.dir.root}src/loader.ts`;
2487
2486
  },
@@ -2496,7 +2495,7 @@ function _n(e) {
2496
2495
  id: t
2497
2496
  },
2498
2497
  async handler() {
2499
- return e.apiJsonDeferred !== void 0 && await e.apiJsonDeferred.promise, jr(e);
2498
+ return e.apiJsonDeferred !== void 0 && await e.apiJsonDeferred.promise, Ar(e);
2500
2499
  }
2501
2500
  },
2502
2501
  async handleHotUpdate() {
@@ -2518,7 +2517,7 @@ function _n(e) {
2518
2517
  filter: {
2519
2518
  id: Rt
2520
2519
  },
2521
- handler: async (r) => r.startsWith(st) ? await Mn(e) : On(e)
2520
+ handler: async (r) => r.startsWith(st) ? await Dn(e) : Fn(e)
2522
2521
  }
2523
2522
  }];
2524
2523
  }
@@ -2532,7 +2531,7 @@ const Jt = (e) => {
2532
2531
  path: u.join("/", u.relative(e.dir.root, Ne))
2533
2532
  });
2534
2533
  };
2535
- function Wn(e) {
2534
+ function Bn(e) {
2536
2535
  let t;
2537
2536
  const i = () => [
2538
2537
  ...e.options.assets?.transformers ?? [],
@@ -2561,56 +2560,56 @@ function Wn(e) {
2561
2560
  e.viteCommand === "build" && (t = Bt(e));
2562
2561
  },
2563
2562
  async configureServer(s) {
2564
- e.server = s, ie(e, await t, i()), s.watcher.on("addDir", (n) => {
2563
+ e.server = s, te(e, await t, i()), s.watcher.on("addDir", (n) => {
2565
2564
  if (n.endsWith("assets")) {
2566
2565
  const r = u.dirname(n);
2567
- u.join(r, "/") === e.dir.root ? ie(e, [Zi], i()) : n.startsWith(e.dir.srcComponents) && ie(e, [Qi(n, r)], i());
2566
+ u.join(r, "/") === e.dir.root ? te(e, [Qi], i()) : n.startsWith(e.dir.srcComponents) && te(e, [Yi(n, r)], i());
2568
2567
  }
2569
2568
  });
2570
2569
  },
2571
2570
  async writeBundle() {
2572
- await Di(e, await t, i());
2571
+ await Fi(e, await t, i());
2573
2572
  }
2574
2573
  };
2575
2574
  }
2576
2575
  async function Bt(e) {
2577
- const t = K("assets"), i = await e.componentFilesPromise, s = await Promise.all(
2576
+ const t = _("assets"), i = await e.componentFilesPromise, s = await Promise.all(
2578
2577
  i.map(async (n) => {
2579
2578
  const r = u.dirname(n), a = u.join(r, "assets");
2580
- return await K(a) ? Qi(a, r) : void 0;
2579
+ return await _(a) ? Yi(a, r) : void 0;
2581
2580
  })
2582
2581
  );
2583
- return await t && s.push(Zi), s.filter(D);
2582
+ return await t && s.push(Qi), s.filter(F);
2584
2583
  }
2585
- const Qi = (e, t) => ({
2584
+ const Yi = (e, t) => ({
2586
2585
  type: "directory",
2587
2586
  source: e,
2588
2587
  destination: u.basename(t)
2589
- }), Zi = { type: "directory", source: "assets/", destination: "" }, Ue = "@arcgis/lumina:printTotalBuildSize", Un = (e) => ({
2590
- name: Ue,
2588
+ }), Qi = { type: "directory", source: "assets/", destination: "" }, We = "@arcgis/lumina:printTotalBuildSize", Kn = (e) => ({
2589
+ name: We,
2591
2590
  apply: () => e.viteCommand === "build",
2592
2591
  configResolved(t) {
2593
2592
  const i = t.plugins.find(({ name: n }) => n === "vite:reporter");
2594
2593
  if (i === void 0) {
2595
2594
  if ("rolldownVersion" in this.meta)
2596
2595
  return;
2597
- T.warn(Ue, "Unable to find the vite's built-in vite:reporter plugin");
2596
+ $.warn(We, "Unable to find the vite's built-in vite:reporter plugin");
2598
2597
  return;
2599
2598
  }
2600
2599
  const s = i.writeBundle;
2601
2600
  if (typeof s != "function")
2602
- throw Error(b(Ue, "Expected vite:reporter to declare a writeBundle() function"));
2601
+ throw Error(b(We, "Expected vite:reporter to declare a writeBundle() function"));
2603
2602
  i.writeBundle = async function(r, a) {
2604
- let c = 0, d = 0, l = 0, p = 0;
2603
+ let l = 0, d = 0, c = 0, p = 0;
2605
2604
  const m = console.log;
2606
2605
  console.log = function(...g) {
2607
2606
  if (m.apply(console, g), g.length === 1 && typeof g[0] == "string") {
2608
- const [h, y] = g[0].match(Hn) ?? [];
2607
+ const [h, y] = g[0].match(Un) ?? [];
2609
2608
  if (!h)
2610
2609
  return;
2611
- p || (p = g[0].slice(0, g[0].indexOf(h) + h.length).replaceAll(qn, "").length);
2610
+ p || (p = g[0].slice(0, g[0].indexOf(h) + h.length).replaceAll(Wn, "").length);
2612
2611
  const v = Number.parseFloat(h.replace(" kB", "").replaceAll(",", ""));
2613
- y ? (l += Number.parseFloat(y.replace(" kB", "").replaceAll(",", "")), d += v) : c += v;
2612
+ y ? (c += Number.parseFloat(y.replace(" kB", "").replaceAll(",", "")), d += v) : l += v;
2614
2613
  }
2615
2614
  };
2616
2615
  try {
@@ -2619,38 +2618,39 @@ const Qi = (e, t) => ({
2619
2618
  console.log = m;
2620
2619
  }
2621
2620
  if (d > 0) {
2622
- const g = l > 0 ? d : c, h = Wt(g), y = e.dir.relativeDist;
2621
+ const g = c > 0 ? d : l, h = Ut(g), y = e.dir.relativeDist;
2623
2622
  console.log(
2624
2623
  [
2625
2624
  _t,
2626
2625
  y,
2627
- zn,
2626
+ _n,
2628
2627
  "*",
2629
2628
  " ".repeat(p - `${y}*`.length - h.length),
2630
2629
  h,
2631
2630
  Kt,
2632
- l > 0 ? ` ${_t}│ gzip: ${Wt(l)}${Kt}` : ""
2631
+ c > 0 ? ` ${_t}│ gzip: ${Ut(c)}${Kt}` : ""
2633
2632
  ].join("")
2634
2633
  );
2635
2634
  }
2636
2635
  };
2637
2636
  }
2638
- }), Kt = "\x1B[22m\x1B[1m\x1B[22m", _t = "\x1B[2m", zn = "\x1B[22m\x1B[36m", Hn = /\d+(?:,\d+)?\.\d{2} kB/gu, qn = /\x1B\[\d+m/gu, Vn = new Intl.NumberFormat("en", {
2637
+ }), Kt = "\x1B[22m\x1B[1m\x1B[22m", _t = "\x1B[2m", _n = "\x1B[22m\x1B[36m", Un = /\d+(?:,\d+)?\.\d{2} kB/gu, Wn = /\x1B\[\d+m/gu, zn = new Intl.NumberFormat("en", {
2639
2638
  maximumFractionDigits: 2,
2640
2639
  minimumFractionDigits: 2
2641
- }), Wt = (e) => `${Vn.format(e)} kB`, Gn = (e, t = u.resolve("src")) => u.relative(t, u.join(e, "..", gt.slice(0, -3)));
2642
- var Xn = ["@arcgis-test/lit-components/loader", "@arcgis/ai-components/loader", "@arcgis/api-extractor", "@arcgis/arcade-languageservice", "@arcgis/arcade-parser", "@arcgis/charts-components/loader", "@arcgis/coding-components/loader", "@arcgis/common-components/loader", "@arcgis/core", "@arcgis/embeddable-components/loader", "@arcgis/languages-api-utils", "@arcgis/languages-sdk-spec", "@arcgis/lumina", "@arcgis/lumina-toolkit", "@arcgis/map-components/loader", "@arcgis/node-toolkit", "@arcgis/portal-components/loader", "@arcgis/stencil-to-lumina", "@arcgis/toolkit", "@arcgis/typescript-config"];
2643
- const Ut = "@arcgis/lumina:configureVite", Yn = (e) => ({
2644
- name: Ut,
2640
+ }), Ut = (e) => `${zn.format(e)} kB`, qn = (e, t = u.resolve("src")) => u.relative(t, u.join(e, "..", gt.slice(0, -3)));
2641
+ var Hn = ["@arcgis-test/lit-components/loader", "@arcgis/ai-components/loader", "@arcgis/api-extractor", "@arcgis/arcade-languageservice", "@arcgis/arcade-parser", "@arcgis/coding-components/loader", "@arcgis/common-components/loader", "@arcgis/core", "@arcgis/embeddable-components/loader", "@arcgis/languages-api-utils", "@arcgis/languages-sdk-spec", "@arcgis/lumina", "@arcgis/lumina-toolkit", "@arcgis/map-components/loader", "@arcgis/node-toolkit", "@arcgis/portal-components/loader", "@arcgis/stencil-to-lumina", "@arcgis/toolkit", "@arcgis/typescript-config"];
2642
+ const Wt = "@arcgis/lumina:configureVite", Vn = /\.[cm]?[jt]sx?$/u, Gn = (e) => ({
2643
+ name: Wt,
2645
2644
  async config({
2646
- server: t,
2647
- publicDir: i,
2648
- build: { cssMinify: s, target: n, sourcemap: r, lib: a, rollupOptions: { output: c = [] } = {}, watch: d, emptyOutDir: l } = {},
2649
- test: p = {}
2650
- }, m) {
2651
- const f = d != null, { include: g, browser: h, environment: y, forceRerunTriggers: v } = p, w = H && te && ji(m) ? at(Ni, import.meta.dirname) : void 0, C = w === void 0 ? [] : [
2652
- G(u.join(w, "**/*.{ts,tsx,mjs}")),
2653
- `!${G(u.join(w, "**/*.d.ts"))}`
2645
+ appType: t,
2646
+ server: i,
2647
+ publicDir: s,
2648
+ build: { cssMinify: n, target: r, sourcemap: a, lib: l, rollupOptions: { output: d = [] } = {}, watch: c, emptyOutDir: p } = {},
2649
+ test: m = {}
2650
+ }, f) {
2651
+ const g = c != null, { include: h, browser: y, environment: v, forceRerunTriggers: w } = m, S = q && ee && Ni(f) ? at(Li, import.meta.dirname) : void 0, T = S === void 0 ? [] : [
2652
+ G(u.join(S, "**/*.{ts,tsx,mjs}")),
2653
+ `!${G(u.join(S, "**/*.d.ts"))}`
2654
2654
  ], E = {
2655
2655
  // Public utilities exposed by the package
2656
2656
  index: "src/index.ts",
@@ -2659,7 +2659,7 @@ const Ut = "@arcgis/lumina:configureVite", Yn = (e) => ({
2659
2659
  * the CDN build
2660
2660
  */
2661
2661
  loader: "src/loader.ts"
2662
- }, { loader: P, ...x } = E, S = e.environment === "development" || e.isInTest ? {
2662
+ }, { loader: x, ...C } = E, L = e.environment === "development" || e.isInTest ? {
2663
2663
  "process.env.ESRI_INTERNAL": "true"
2664
2664
  } : void 0, A = {
2665
2665
  /**
@@ -2674,9 +2674,9 @@ const Ut = "@arcgis/lumina:configureVite", Yn = (e) => ({
2674
2674
  * is not visible to dep-optimizer's ESBuild instance.
2675
2675
  */
2676
2676
  entries: [
2677
- ...Object.values(x),
2677
+ ...Object.values(C),
2678
2678
  ...await e.componentFilesPromise,
2679
- ...C,
2679
+ ...T,
2680
2680
  // Vitest scans setup files, but misses Lumina's because we add it
2681
2681
  // dynamically. Include it because it imports js-beautify. Can't
2682
2682
  // explicitly declare js-beautify in the "include" because dependencies
@@ -2706,9 +2706,9 @@ const Ut = "@arcgis/lumina:configureVite", Yn = (e) => ({
2706
2706
  include: [
2707
2707
  // Used by controllers. Need to add manually because @arcgis/lumina is
2708
2708
  // excluded per comment below, so Vite will discover these usages too late.
2709
- ...H && !te ? ["@arcgis/core/applications/Components/reactiveUtils.js", "@arcgis/core/core/reactiveUtils.js"] : [],
2709
+ ...q && !ee ? ["@arcgis/core/applications/Components/reactiveUtils.js", "@arcgis/core/core/reactiveUtils.js"] : [],
2710
2710
  // Used by core. Because we exclude core from scanning, these are discovered late, causing errors
2711
- ...H && te ? [
2711
+ ...q && ee ? [
2712
2712
  "tslib",
2713
2713
  "@arcgis/core > luxon",
2714
2714
  "@arcgis/core > @esri/arcgis-html-sanitizer",
@@ -2730,8 +2730,8 @@ const Ut = "@arcgis/lumina:configureVite", Yn = (e) => ({
2730
2730
  * inside the package, and by Calcite outside the package).
2731
2731
  */
2732
2732
  exclude: [
2733
- ...te ? [
2734
- ...Xn,
2733
+ ...ee ? [
2734
+ ...Hn,
2735
2735
  // This exact import is also supplied through optimizableImports in `dependencies/arcgisCore.ts`
2736
2736
  // Optimizing it in the monorepo creates a separate core config instance, so the app does not receive the
2737
2737
  // configured assetsPath.
@@ -2764,52 +2764,56 @@ const Ut = "@arcgis/lumina:configureVite", Yn = (e) => ({
2764
2764
  "@lit/task"
2765
2765
  ]
2766
2766
  };
2767
- if (typeof p.setupFiles == "string" ? p.setupFiles = [...We, p.setupFiles] : Array.isArray(p.setupFiles) ? p.setupFiles = [...We, ...p.setupFiles] : p.setupFiles = [...We], e.isInPuppeteerTestBackEnd) {
2768
- if (h?.enabled === !0)
2767
+ if (typeof m.setupFiles == "string" ? m.setupFiles = [...Ue, m.setupFiles] : Array.isArray(m.setupFiles) ? m.setupFiles = [...Ue, ...m.setupFiles] : m.setupFiles = [...Ue], e.isInPuppeteerTestBackEnd) {
2768
+ if (y?.enabled === !0)
2769
2769
  throw Error(
2770
- b(Ut, "Can't enable both Vitest browser mode and Puppeteer testing at the same time")
2770
+ b(Wt, "Can't enable both Vitest browser mode and Puppeteer testing at the same time")
2771
2771
  );
2772
+ const M = {
2773
+ puppeteerLaunchOptions: e.options.puppeteerTesting?.launchOptions,
2774
+ puppeteerWaitForChangesDelay: e.options.puppeteerTesting?.waitForChangesDelay,
2775
+ globalSetup: ["@arcgis/lumina-compiler/puppeteerTesting/globalSetup"],
2776
+ runner: "@arcgis/lumina-compiler/puppeteerTesting/runner",
2777
+ // Run all test files that include *.e2e.* or *.spec.* in the name.
2778
+ include: h ? void 0 : ["**/*.{e2e,spec}.?(c|m)[jt]s?(x)"],
2779
+ /**
2780
+ * Using happy-dom because:
2781
+ * - faster than js-dom
2782
+ * - supports shadow dom
2783
+ * - is preferred by the Vitest team
2784
+ */
2785
+ environment: v ?? "happy-dom",
2786
+ /**
2787
+ * Re-run all tests on any file change.
2788
+ */
2789
+ forceRerunTriggers: w === void 0 ? ["**/*.{ts,tsx}"] : void 0
2790
+ };
2772
2791
  return {
2773
- test: {
2774
- puppeteerLaunchOptions: e.options.puppeteerTesting?.launchOptions,
2775
- puppeteerWaitForChangesDelay: e.options.puppeteerTesting?.waitForChangesDelay,
2776
- globalSetup: ["@arcgis/lumina-compiler/puppeteerTesting/globalSetup"],
2777
- runner: "@arcgis/lumina-compiler/puppeteerTesting/runner",
2778
- // Run all test files that include *.e2e.* or *.spec.* in the name.
2779
- include: g ? void 0 : ["**/*.{e2e,spec}.?(c|m)[jt]s?(x)"],
2780
- /**
2781
- * Using happy-dom because:
2782
- * - faster than js-dom
2783
- * - supports shadow dom
2784
- * - is preferred by the Vitest team
2785
- */
2786
- environment: y ?? "happy-dom",
2787
- /**
2788
- * Re-run all tests on any file change.
2789
- */
2790
- forceRerunTriggers: v === void 0 ? ["**/*.{ts,tsx}"] : void 0
2791
- },
2792
+ appType: t ?? "mpa",
2793
+ test: M,
2792
2794
  optimizeDeps: A,
2793
- define: S
2795
+ define: L
2794
2796
  };
2795
2797
  }
2796
2798
  return {
2799
+ // Missing assets should return 404 instead of falling back to the test app.
2800
+ appType: t ?? "mpa",
2797
2801
  server: {
2798
- open: t?.open ?? !0
2802
+ open: i?.open ?? !0
2799
2803
  },
2800
2804
  // We have handleStaticAssets() instead (which uses /assets/ folders)
2801
- publicDir: i ?? !1,
2805
+ publicDir: s ?? !1,
2802
2806
  build: {
2803
- cssMinify: s ?? (e.environment === "production" ? !0 : void 0),
2804
- target: n ?? Fi(e),
2805
- sourcemap: r ?? (e.environment === "development" ? "inline" : e.options.build?.enableSourceMapsInProduction ?? !1),
2807
+ cssMinify: n ?? (e.environment === "production" ? !0 : void 0),
2808
+ target: r ?? ji(e),
2809
+ sourcemap: a ?? (e.environment === "development" ? "inline" : e.options.build?.enableSourceMapsInProduction ?? !1),
2806
2810
  lib: {
2807
2811
  entry: E,
2808
- formats: (a ? a.formats : void 0) ?? ["es"]
2812
+ formats: (l ? l.formats : void 0) ?? ["es"]
2809
2813
  },
2810
2814
  rollupOptions: {
2811
2815
  output: {
2812
- chunkFileNames: (Array.isArray(c) ? void 0 : c.chunkFileNames) || "chunks/[name].js",
2816
+ chunkFileNames: (Array.isArray(d) ? void 0 : d.chunkFileNames) || "chunks/[name].js",
2813
2817
  ...// Does not exist in Rolldown, and probably not needed
2814
2818
  // https://github.com/rolldown/rolldown/issues/206
2815
2819
  "rolldownVersion" in this.meta ? void 0 : {
@@ -2817,7 +2821,7 @@ const Ut = "@arcgis/lumina:configureVite", Yn = (e) => ({
2817
2821
  * 2015 is the newest option. Rollup's generated code does not use
2818
2822
  * newer features at the moment.
2819
2823
  */
2820
- generatedCode: (Array.isArray(c) ? void 0 : c.generatedCode) ?? "es2015"
2824
+ generatedCode: (Array.isArray(d) ? void 0 : d.generatedCode) ?? "es2015"
2821
2825
  }
2822
2826
  }
2823
2827
  },
@@ -2831,23 +2835,29 @@ const Ut = "@arcgis/lumina:configureVite", Yn = (e) => ({
2831
2835
  * - in API Extractor we can avoid writing unchanged files to disk if
2832
2836
  * the out dir is not emptied between watch rebuilds.
2833
2837
  */
2834
- emptyOutDir: l ?? !f
2838
+ emptyOutDir: p ?? !g
2835
2839
  },
2836
2840
  optimizeDeps: A,
2837
- define: S,
2841
+ define: L,
2838
2842
  test: {
2839
2843
  /*
2840
2844
  * If in browser, run all test files that include *.e2e.* in the name.
2841
2845
  * Otherwise, run all files including *.test.* or *.spec.* in the name.
2842
2846
  */
2843
- include: g ? void 0 : [h?.enabled ?? !0 ? "**/*.e2e.?(c|m)[jt]s?(x)" : "**/*.{test,spec}.?(c|m)[jt]s?(x)"],
2847
+ include: h ? void 0 : [y?.enabled ?? !0 ? "**/*.e2e.?(c|m)[jt]s?(x)" : "**/*.{test,spec}.?(c|m)[jt]s?(x)"],
2844
2848
  browser: {
2845
- enabled: e.isInPuppeteerTestFrontEnd ? !1 : h?.enabled ?? !0,
2846
- instances: h?.instances === void 0 ? [{ browser: "chromium" }] : void 0
2849
+ enabled: e.isInPuppeteerTestFrontEnd ? !1 : y?.enabled ?? !0,
2850
+ instances: y?.instances === void 0 ? [{ browser: "chromium" }] : void 0
2847
2851
  }
2848
2852
  }
2849
2853
  };
2850
2854
  },
2855
+ configureServer(t) {
2856
+ t.middlewares.use((i, s, n) => {
2857
+ const r = i.url?.split("?", 1)[0];
2858
+ r !== void 0 && Vn.test(r) && delete i.headers["sec-fetch-dest"], n();
2859
+ });
2860
+ },
2851
2861
  /**
2852
2862
  * Instead of using build.lib.entry for defining component entrypoints, we do
2853
2863
  * so in options() hook because it is called on each build --watch re-build,
@@ -2866,65 +2876,65 @@ const Ut = "@arcgis/lumina:configureVite", Yn = (e) => ({
2866
2876
  e._originalRollupInputOptions ??= t.input;
2867
2877
  const s = { ...e._originalRollupInputOptions };
2868
2878
  i.forEach((n) => {
2869
- const r = Gn(n);
2879
+ const r = qn(n);
2870
2880
  s[r] = n;
2871
2881
  }), t.input = s;
2872
2882
  }
2873
- }), Se = "@arcgis/lumina:serveLocalCdn", Qn = /^\/?@arcgis\/core(?=\/|$)/u, es = "/index.js", Zn = je(es), rt = `\0${Se}:index`, eo = je(rt), to = 3e3, io = [
2883
+ }), Se = "@arcgis/lumina:serveLocalCdn", Xn = /^\/?@arcgis\/core(?=\/|$)/u, Zi = "/index.js", Yn = je(Zi), rt = `\0${Se}:index`, Qn = je(rt), Zn = 3e3, eo = [
2874
2884
  /^https?:\/\/localhost(?::[0-9]+)?$/u,
2875
2885
  /^https?:\/\/(?:[a-z0-9-]+\.)*(?:arcgis|esri)\.com(?::[0-9]+)?$/iu
2876
2886
  ];
2877
- function so(e) {
2878
- if (!H)
2887
+ function to(e) {
2888
+ if (!q)
2879
2889
  return;
2880
- const t = j().name, i = t.split("/").pop() ?? t, s = `/${i}/index.js`, n = je(s), r = `\0${Se}:${i}`, a = je(r);
2890
+ const t = D().name, i = t.split("/").pop() ?? t, s = `/${i}/index.js`, n = je(s), r = `\0${Se}:${i}`, a = je(r);
2881
2891
  return {
2882
2892
  name: Se,
2883
2893
  enforce: "pre",
2884
- apply(c) {
2885
- const d = oo(e, c);
2894
+ apply(l) {
2895
+ const d = ro(e, l);
2886
2896
  return d || (e._localCdnCore = void 0), d;
2887
2897
  },
2888
2898
  config: {
2889
2899
  order: "post",
2890
- handler(c, d) {
2891
- const l = c.server, p = ji(d), m = p ? Ni : sn, f = at(m, import.meta.dirname);
2900
+ handler(l, d) {
2901
+ const c = l.server, p = Ni(d), m = p ? Li : Zr, f = at(m, import.meta.dirname);
2892
2902
  if (f === void 0)
2893
2903
  throw Error(b(Se, `Unable to find ${m}.`));
2894
2904
  return e._localCdnCore = p ? { packageLocation: u.dirname(f), sourceLocation: f } : { packageLocation: f }, {
2895
2905
  server: {
2896
- port: l?.port ?? to,
2897
- cors: l?.cors ?? { origin: io }
2906
+ port: c?.port ?? Zn,
2907
+ cors: c?.cors ?? { origin: eo }
2898
2908
  },
2899
2909
  resolve: {
2900
2910
  // The alias also matches CDN-rooted requests such as /@arcgis/core/WebMap.js. Vite resolves .js requests
2901
2911
  // to TypeScript in source mode and handles relative and bare imports from the resulting filesystem path.
2902
- alias: [{ find: Qn, replacement: f }]
2912
+ alias: [{ find: Xn, replacement: f }]
2903
2913
  }
2904
2914
  };
2905
2915
  }
2906
2916
  },
2907
2917
  resolveId: {
2908
- filter: { id: [Zn, n] },
2909
- handler(c) {
2910
- if (c === es)
2918
+ filter: { id: [Yn, n] },
2919
+ handler(l) {
2920
+ if (l === Zi)
2911
2921
  return rt;
2912
- if (c === s)
2922
+ if (l === s)
2913
2923
  return r;
2914
2924
  }
2915
2925
  },
2916
2926
  load: {
2917
- filter: { id: [eo, a] },
2918
- async handler(c) {
2919
- if (c === rt)
2927
+ filter: { id: [Qn, a] },
2928
+ async handler(l) {
2929
+ if (l === rt)
2920
2930
  return `import ${JSON.stringify(s)};
2921
2931
  `;
2922
- if (c === r)
2923
- return await no(e);
2932
+ if (l === r)
2933
+ return await so(e);
2924
2934
  }
2925
2935
  },
2926
- handleHotUpdate({ file: c, server: d }) {
2927
- if (ro(c, e._localCdnCore?.sourceLocation))
2936
+ handleHotUpdate({ file: l, server: d }) {
2937
+ if (io(l, e._localCdnCore?.sourceLocation))
2928
2938
  return d.ws.send({ type: "full-reload" }), [];
2929
2939
  }
2930
2940
  };
@@ -2932,30 +2942,30 @@ function so(e) {
2932
2942
  function je(e) {
2933
2943
  return new RegExp(`^${RegExp.escape(e)}$`, "u");
2934
2944
  }
2935
- function ro(e, t) {
2945
+ function io(e, t) {
2936
2946
  return t !== void 0 && e.startsWith(u.join(t, u.sep));
2937
2947
  }
2938
- async function no(e) {
2948
+ async function so(e) {
2939
2949
  const t = e.viteConfig.server, i = t.origin?.replace(/\/$/u, "") ?? `${t.https ? "https" : "http"}://localhost:${String(t.port)}`;
2940
2950
  return `${(await oe(e, `${i}/`)).flatMap((n) => "javascriptCode" in n ? n.javascriptCode : []).join(`
2941
2951
  `)}
2942
2952
  `;
2943
2953
  }
2944
- function oo(e, t) {
2945
- return te && e.viteCommand === "serve" && !e.isInTest && t.resolve?.conditions?.includes("storybook") !== !0 && t.server?.middlewareMode !== !0;
2954
+ function ro(e, t) {
2955
+ return ee && e.viteCommand === "serve" && !e.isInTest && t.resolve?.conditions?.includes("storybook") !== !0 && t.server?.middlewareMode !== !0;
2946
2956
  }
2947
- const ao = (e) => ({
2957
+ const no = (e) => ({
2948
2958
  name: "@arcgis/lumina:setAssetPath",
2949
2959
  apply: () => e.viteCommand === "build",
2950
2960
  config: (t) => ({
2951
2961
  base: t.base ?? e.options.assets?.defaultPath ?? Re()
2952
2962
  })
2953
2963
  });
2954
- function co(e = j()) {
2964
+ function oo(e = D()) {
2955
2965
  const t = mt(e) ?? "0.0.1";
2956
- return Ts(t);
2966
+ return Es(t);
2957
2967
  }
2958
- const lo = (e) => `/* ${e} */`, k = (e) => (t, i) => {
2968
+ const ao = (e) => `/* ${e} */`, k = (e) => (t, i) => {
2959
2969
  Object.defineProperty(t, i, {
2960
2970
  get() {
2961
2971
  throw Error(
@@ -2994,8 +3004,8 @@ const ue = {
2994
3004
  apiJson: "docs/api.json",
2995
3005
  stencilLikeDocsJson: "docs/docs.json"
2996
3006
  }, nt = (e) => e.viteConfig.root.includes("/test-packages/") ? 2 : void 0;
2997
- async function ts(e, t, i = j()) {
2998
- const s = po(e, i), n = u.join(t, "lumina.ts"), a = await K(n) ? await z(n, "utf8") : "";
3007
+ async function es(e, t, i = D()) {
3008
+ const s = co(e, i), n = u.join(t, "lumina.ts"), a = await _(n) ? await W(n, "utf8") : "";
2999
3009
  if (a.trim().replaceAll(`\r
3000
3010
  `, `
3001
3011
  `) === s.trim())
@@ -3013,20 +3023,20 @@ Current content:
3013
3023
  ${a}`
3014
3024
  )
3015
3025
  );
3016
- return li(n, s), !0;
3026
+ return ci(n, s), !0;
3017
3027
  }
3018
- function po(e, t = j()) {
3028
+ function co(e, t = D()) {
3019
3029
  const i = e.filter((d) => d.type === "@arcgis/lumina").map((d) => `
3020
3030
  /// <reference types="${d.packageName}/types/lumina" />`), s = e.filter((d) => d.type === "stencil"), n = s.map(
3021
- (d, l) => `
3022
- import type { JSX as JSX$${l} } from "${d.packageName}/dist/types/components";`
3031
+ (d, c) => `
3032
+ import type { JSX as JSX$${c} } from "${d.packageName}/dist/types/components";`
3023
3033
  ), r = s.length === 0 ? "" : `
3024
3034
 
3025
3035
  declare module "@arcgis/lumina" {
3026
- interface ImportStencilElements extends ${s.map((d, l) => `JSX$${l}.IntrinsicElements`).join(", ")} {}
3036
+ interface ImportStencilElements extends ${s.map((d, c) => `JSX$${c}.IntrinsicElements`).join(", ")} {}
3027
3037
  }`, a = t.devDependencies ?? {};
3028
3038
  return [
3029
- uo,
3039
+ lo,
3030
3040
  a.vitest ? `
3031
3041
  /// <reference types="vitest/config" />
3032
3042
  /// <reference types="vitest/browser" />` : "",
@@ -3037,7 +3047,7 @@ declare module "@arcgis/lumina" {
3037
3047
  `
3038
3048
  ].join("");
3039
3049
  }
3040
- const uo = `/**
3050
+ const lo = `/**
3041
3051
  * This file is autogenerated by \`@arcgis/lumina-compiler\` - do not edit it manually.
3042
3052
  * Manual edits will be overwritten.
3043
3053
  *
@@ -3045,7 +3055,7 @@ const uo = `/**
3045
3055
  *
3046
3056
  * If you need to provide additional types, create a separate file.
3047
3057
  */
3048
- /// <reference types="@arcgis/lumina/globalTypes" />`, Ce = "@arcgis/lumina:dependencySupport", is = (e, t) => e.viteCommand === "serve" && /**
3058
+ /// <reference types="@arcgis/lumina/globalTypes" />`, Ce = "@arcgis/lumina:dependencySupport", ts = (e, t) => e.viteCommand === "serve" && /**
3049
3059
  * Vitest started calling transformIndexHtml in browser mode versions ^2.1.4
3050
3060
  * However, it is a bit buggy (see
3051
3061
  * https://github.com/vitejs/vite/issues/19213). Instead, we are using test
@@ -3056,21 +3066,21 @@ const uo = `/**
3056
3066
  * is doing:
3057
3067
  * https://github.com/storybookjs/storybook/blob/a5c2cf1712f70b4e3ecf38d3c98e7db8e8d67849/code/builders/builder-vite/src/plugins/code-generator-plugin.ts#L110
3058
3068
  */
3059
- e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, mo = (e) => ({
3069
+ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, po = (e) => ({
3060
3070
  name: Ce,
3061
3071
  async configureServer(t) {
3062
- H && (e.server = t, await dn(e));
3072
+ q && (e.server = t, await an(e));
3063
3073
  },
3064
3074
  configResolved() {
3065
- !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = fo(e).catch(
3066
- (t) => T.error(Ce, `Failed to update package's src/lumina.ts: ${String(t)}`)
3075
+ !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = uo(e).catch(
3076
+ (t) => $.error(Ce, `Failed to update package's src/lumina.ts: ${String(t)}`)
3067
3077
  ));
3068
3078
  },
3069
3079
  transformIndexHtml: {
3070
3080
  // Add imports to index.html before Vite starts resolving imports
3071
3081
  order: "pre",
3072
3082
  async handler(t, i) {
3073
- return is(e, i) ? (await oe(e)).map(
3083
+ return ts(e, i) ? (await oe(e)).map(
3074
3084
  (n) => "javascriptCode" in n ? {
3075
3085
  tag: "script",
3076
3086
  attrs: {
@@ -3112,26 +3122,26 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
3112
3122
  await e._updateLuminaTsPromise;
3113
3123
  }
3114
3124
  });
3115
- async function fo(e) {
3116
- const i = (await Promise.all([ne, Xi(e)])).flat();
3117
- if (!await ts(i, e.dir.src))
3125
+ async function uo(e) {
3126
+ const i = (await Promise.all([ne, Gi(e)])).flat();
3127
+ if (!await es(i, e.dir.src))
3118
3128
  return;
3119
3129
  let n = !1;
3120
3130
  function r() {
3121
- n || T.warn(Ce, go), n = !0;
3131
+ n || $.warn(Ce, mo), n = !0;
3122
3132
  }
3123
3133
  process.on("exit", () => {
3124
- r(), clearTimeout(c);
3134
+ r(), clearTimeout(l);
3125
3135
  });
3126
- const c = setTimeout(r, 2e3);
3136
+ const l = setTimeout(r, 2e3);
3127
3137
  }
3128
- const go = Vs(
3138
+ const mo = qs(
3129
3139
  "greenBright",
3130
3140
  `lumina.ts has been updated (potentially because your dependencies changed). Please commit the updated file.
3131
3141
  If build failed with TypeScript errors, try running the build again to check whether new lumina.ts resolves the errors.`
3132
3142
  );
3133
- async function ho(e) {
3134
- const t = e.options.apiExtractor?.configFilePath === "" ? void 0 : await Xs(process.cwd()), i = e.apiExtractorPluginConfig.unsafeConfigOverride === void 0 || t === void 0 ? t ?? e.apiExtractorPluginConfig.unsafeConfigOverride : Pt(t, e.apiExtractorPluginConfig.unsafeConfigOverride);
3143
+ async function fo(e) {
3144
+ const t = e.options.apiExtractor?.configFilePath === "" ? void 0 : await Vs(process.cwd()), i = e.apiExtractorPluginConfig.unsafeConfigOverride === void 0 || t === void 0 ? t ?? e.apiExtractorPluginConfig.unsafeConfigOverride : Pt(t, e.apiExtractorPluginConfig.unsafeConfigOverride);
3135
3145
  e._documentationFileNames.apiJson = i?.context?.apiJsonEmitPath === void 0 ? e.options.documentation?.apiJsonFileName === !1 ? void 0 : e.options.documentation?.apiJsonFileName ? pe(e.options.documentation.apiJsonFileName) : ue.apiJson : i.context.apiJsonEmitPath || void 0, e._documentationFileNames.apiJson !== void 0 && e.provideAssets([
3136
3146
  {
3137
3147
  type: "dynamic",
@@ -3139,7 +3149,7 @@ async function ho(e) {
3139
3149
  destination: u.join("../..", e._documentationFileNames.apiJson)
3140
3150
  }
3141
3151
  ]);
3142
- const s = i?.types?.typeScriptConfig ?? Ys(
3152
+ const s = i?.types?.typeScriptConfig ?? Gs(
3143
3153
  process.cwd(),
3144
3154
  e.options.types?.tsconfigPath ?? i?.types?.typeScriptConfigPath,
3145
3155
  !0
@@ -3164,7 +3174,7 @@ async function ho(e) {
3164
3174
  afterDiagnostic: e.options.types?.afterDiagnostic,
3165
3175
  typeScriptInstanceCreated: e.options.types?.typeScriptInstanceCreated,
3166
3176
  declarationTextTransformers: e.options.types?.declarationTextTransformers?.map(
3167
- (l) => (p) => l(p, e)
3177
+ (c) => (p) => c(p, e)
3168
3178
  ),
3169
3179
  typeScriptConfig: n,
3170
3180
  // Already merged, so pass empty object to avoid merging again
@@ -3177,9 +3187,9 @@ async function ho(e) {
3177
3187
  getComponentDemoUrl: e.options.documentation?.getComponentDemoUrl
3178
3188
  },
3179
3189
  watch: {
3180
- onUpdate: async (l) => {
3190
+ onUpdate: async (c) => {
3181
3191
  e.apiJsonDeferred = Promise.withResolvers();
3182
- const p = await l;
3192
+ const p = await c;
3183
3193
  if (e.apiJsonDeferred.resolve(), e.apiJsonDeferred = void 0, p !== void 0) {
3184
3194
  if (e.viteCommand === "serve")
3185
3195
  if ([...p.addedModules, ...p.removedModules].some(
@@ -3201,7 +3211,7 @@ async function ho(e) {
3201
3211
  Jt(e);
3202
3212
  break;
3203
3213
  }
3204
- const y = Pi(h);
3214
+ const y = $i(h);
3205
3215
  e.server.ws.send({ type: "custom", event: "component-meta-update", data: y });
3206
3216
  }
3207
3217
  Mt(e);
@@ -3210,48 +3220,48 @@ async function ho(e) {
3210
3220
  }
3211
3221
  }
3212
3222
  },
3213
- afterApiJsonCreate: (l) => {
3214
- e.options.apiJson?.afterCreate?.(l.apiJson, !r), r = !0, (e.viteCommand === "build" ? e.viteConfig.build.watch : e.viteConfig.server.watch) === null && (e.apiJsonDeferred.resolve(), zt(e, l.apiJson));
3223
+ afterApiJsonCreate: (c) => {
3224
+ e.options.apiJson?.afterCreate?.(c.apiJson, !r), r = !0, (e.viteCommand === "build" ? e.viteConfig.build.watch : e.viteConfig.server.watch) === null && (e.apiJsonDeferred.resolve(), zt(e, c.apiJson));
3215
3225
  }
3216
- }, c = i === void 0 ? a : Pt(i, a);
3217
- e.apiExtractorPluginConfig.configFilePath = "", e.apiExtractorPluginConfig.unsafeConfigOverride = c;
3226
+ }, l = i === void 0 ? a : Pt(i, a);
3227
+ e.apiExtractorPluginConfig.configFilePath = "", e.apiExtractorPluginConfig.unsafeConfigOverride = l;
3218
3228
  const d = e.apiExtractorPluginConfig.afterExtractorCreated;
3219
- e.apiExtractorPluginConfig.afterExtractorCreated = (l) => {
3220
- e.apiExtractor = l, d?.(l);
3229
+ e.apiExtractorPluginConfig.afterExtractorCreated = (c) => {
3230
+ e.apiExtractor = c, d?.(c);
3221
3231
  };
3222
3232
  }
3223
3233
  function zt(e, t) {
3224
3234
  const i = { ...t, modules: [] }, s = [], n = e.viteCommand === "build" ? [] : void 0;
3225
3235
  for (const r of t.modules) {
3226
3236
  const a = { ...r, declarations: [] };
3227
- let c = !1;
3237
+ let l = !1;
3228
3238
  for (const d of r.declarations) {
3229
3239
  if (d.customElement !== !0) {
3230
3240
  a.declarations.push(d);
3231
3241
  continue;
3232
3242
  }
3233
- const l = d;
3234
- if (n?.push(r.sourcePath), l.privacy !== void 0) {
3235
- c = !0;
3243
+ const c = d;
3244
+ if (n?.push(r.sourcePath), c.privacy !== void 0) {
3245
+ l = !0;
3236
3246
  continue;
3237
3247
  }
3238
3248
  const p = {
3239
- ...l,
3240
- members: l.members.filter((m) => m.privacy === void 0)
3249
+ ...c,
3250
+ members: c.members.filter((m) => m.privacy === void 0)
3241
3251
  };
3242
3252
  a.declarations.push(p), s.push(p);
3243
3253
  }
3244
- c || i.modules.push(a);
3254
+ l || i.modules.push(a);
3245
3255
  }
3246
3256
  e._localDefinedComponents = void 0, e.privateApiJson = t, e.apiJsonComponents = s, e.apiJson = i, n !== void 0 && (e.componentFilesPromise = Promise.resolve(n));
3247
3257
  }
3248
- var yo = Object.defineProperty, I = (e, t, i, s) => {
3258
+ var go = Object.defineProperty, I = (e, t, i, s) => {
3249
3259
  for (var n = void 0, r = e.length - 1, a; r >= 0; r--)
3250
3260
  (a = e[r]) && (n = a(t, i, n) || n);
3251
- return n && yo(t, i, n), n;
3261
+ return n && go(t, i, n), n;
3252
3262
  };
3253
3263
  const V = "@arcgis/lumina:context";
3254
- class $ {
3264
+ class P {
3255
3265
  constructor(t) {
3256
3266
  this._typeScriptSourceFiles = /* @__PURE__ */ new Map(), this._plugin = {
3257
3267
  name: V,
@@ -3264,27 +3274,27 @@ class $ {
3264
3274
  this.viteConfig = r;
3265
3275
  const a = r.build.minify !== !1;
3266
3276
  this.shouldMinify = a && this.viteCommand !== "serve", Object.hasOwn(this, "shouldMinifyJsx") || (this.shouldMinifyJsx = this.viteCommand !== "serve" || this.isInTest);
3267
- const c = u.join(r.root, u.sep), d = u.join(c, "src", u.sep), l = u.join(d, "components", u.sep), p = u.join(u.resolve(c, r.build.outDir), u.sep), m = u.join(u.relative(c, p), u.sep), f = u.join(p, "components", u.sep), g = u.join(p, this.options.build?.cdn?.namespace ?? le, u.sep), h = u.join(g, "assets", u.sep);
3277
+ const l = u.join(r.root, u.sep), d = u.join(l, "src", u.sep), c = u.join(d, "components", u.sep), p = u.join(u.resolve(l, r.build.outDir), u.sep), m = u.join(u.relative(l, p), u.sep), f = u.join(p, "components", u.sep), g = u.join(p, this.options.build?.cdn?.namespace ?? le, u.sep), h = u.join(g, "assets", u.sep);
3268
3278
  if (this.dir = {
3269
- root: c,
3279
+ root: l,
3270
3280
  src: d,
3271
- srcComponents: l,
3281
+ srcComponents: c,
3272
3282
  relativeDist: m,
3273
3283
  dist: p,
3274
3284
  distComponents: f,
3275
3285
  distCdn: g,
3276
3286
  distCdnAssets: h
3277
- }, T.initialize(r.logger, c), r.root !== ai())
3287
+ }, $.initialize(r.logger, l), r.root !== oi())
3278
3288
  throw Error(
3279
3289
  b(
3280
3290
  V,
3281
3291
  "Vite's config.root is not equal process.cwd(). This is not officially supported by Lumina and may lead to unexpected behavior. If you need this to be supported, comment on https://devtopia.esri.com/WebGIS/webgis-sdk/issues/2126 or contact Lumina maintainers."
3282
3292
  )
3283
3293
  );
3284
- p === c ? T.warn(
3294
+ p === l ? $.warn(
3285
3295
  V,
3286
3296
  "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/)"
3287
- ) : m.startsWith("..") && T.warn(
3297
+ ) : m.startsWith("..") && $.warn(
3288
3298
  V,
3289
3299
  "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."
3290
3300
  ), this.isInStorybook = r.resolve.conditions.includes("storybook"), this.isFullApiExtraction = this.viteCommand === "build" || this.isInStorybook, this.hmrEnabled = this.viteCommand === "serve" && !this.isInTest && !!(r.server?.hmr ?? !0), this.isInBuildWatch = r.command === "build" && r.build.watch != null;
@@ -3292,12 +3302,12 @@ class $ {
3292
3302
  this.apiJsonEnabled = !y && !this.isInPuppeteerTestBackEnd && !v && !w, this.apiJsonEnabled ? (this.apiExtractorPluginConfig.serve = {
3293
3303
  extract: !0
3294
3304
  }, (this.viteCommand === "build" ? r.build.watch : r.server.watch) === null && (this.apiJsonDeferred = Promise.withResolvers())) : (this._localDefinedComponents = {}, this.options.build ??= {}, this.options.build.dependencies ??= {}, this.apiExtractorPluginConfig.serve = void 0, this.options.build.dependencies.silenceUnknownJsxElementUsage = () => !0);
3295
- const C = this.viteCommand === "serve" && !this.isInStorybook, E = this.apiExtractorPluginConfig.unsafeConfigOverride;
3296
- C && (E.context.isLuminaMinimalExtraction = !0, E.types.typeCheckedExtraction = !1, E.types.fullTypeCheck = !1), this.isInStorybook && (E.context.dtsEmitPath = ""), this._typeScriptPrinter = Gs({
3305
+ const S = this.viteCommand === "serve" && !this.isInStorybook, T = this.apiExtractorPluginConfig.unsafeConfigOverride;
3306
+ S && (T.context.isLuminaMinimalExtraction = !0, T.types.typeCheckedExtraction = !1, T.types.fullTypeCheck = !1), this.isInStorybook && (T.context.dtsEmitPath = ""), this._typeScriptPrinter = Hs({
3297
3307
  // Do not downlevel. ESBuild will do that if needed.
3298
3308
  target: o.ScriptTarget.ESNext,
3299
3309
  sourceMap: r.build.sourcemap !== !1
3300
- }), is(this) && oe(this);
3310
+ }), ts(this) && oe(this);
3301
3311
  }
3302
3312
  },
3303
3313
  configureServer: {
@@ -3325,21 +3335,21 @@ class $ {
3325
3335
  webTypes: i.jetBrains === !1 ? void 0 : i.jetBrains?.webTypesFileName ? pe(i.jetBrains.webTypesFileName) : ue.webTypes,
3326
3336
  vsCodeHtml: i.vsCode === !1 ? void 0 : i.vsCode?.htmlFileName ? pe(i.vsCode.htmlFileName) : ue.vsCodeHtml,
3327
3337
  vsCodeCss: i.vsCode === !1 ? void 0 : i.vsCode?.cssFileName ? pe(i.vsCode.cssFileName) : ue.vsCodeCss
3328
- }, this.apiExtractorPluginConfig = this.options.apiExtractor ?? {}, this.configsPromise = ho(this);
3338
+ }, this.apiExtractorPluginConfig = this.options.apiExtractor ?? {}, this.configsPromise = fo(this);
3329
3339
  const s = process.cwd().length + 1;
3330
3340
  this.componentFilesPromise = this.configsPromise.then(() => {
3331
3341
  const r = this.apiExtractorPluginConfig.unsafeConfigOverride.types.typeScriptConfig.config.fileNames, a = [];
3332
- for (let c = 0; c < r.length; ++c) {
3333
- const l = r[c].slice(s);
3334
- Pe(l, "src/components") && a.push(l);
3342
+ for (let l = 0; l < r.length; ++l) {
3343
+ const c = r[l].slice(s);
3344
+ Pe(c, "src/components") && a.push(c);
3335
3345
  }
3336
3346
  return a;
3337
- }), Ii(void 0, t);
3338
- const n = t.build?.preamble ?? co();
3339
- this.banner = lo(n);
3347
+ }), ki(void 0, t);
3348
+ const n = t.build?.preamble ?? oo();
3349
+ this.banner = ao(n);
3340
3350
  }
3341
3351
  _inferBuildSetup({ command: t, mode: i }, s) {
3342
- this.isInTest = process.env.NODE_ENV === "test", i === "production" || i === "development" ? this.environment = i : i === "test" || i === "benchmark" ? (this.environment = "development", this.isInTest = !0) : (T.warn(ki.name, `Vite is running in unknown mode "${i}". Assuming development`), this.environment = "development"), this.viteCommand = t;
3352
+ this.isInTest = process.env.NODE_ENV === "test", i === "production" || i === "development" ? this.environment = i : i === "test" || i === "benchmark" ? (this.environment = "development", this.isInTest = !0) : ($.warn(Pi.name, `Vite is running in unknown mode "${i}". Assuming development`), this.environment = "development"), this.viteCommand = t;
3343
3353
  const n = s?.__IS_IN_PUPPETEER__ === !0, r = this.viteCommand === "serve" && this.isInTest && this.options.puppeteerTesting?.enabled === !0;
3344
3354
  this.isInPuppeteerTestBackEnd = r && !n, this.isInPuppeteerTestFrontEnd = r && n;
3345
3355
  }
@@ -3360,11 +3370,11 @@ class $ {
3360
3370
  )
3361
3371
  );
3362
3372
  if (r === void 0 && !n) {
3363
- const c = this._typeScriptSourceFiles.get(t);
3364
- if (c?.text === i)
3365
- return c;
3373
+ const l = this._typeScriptSourceFiles.get(t);
3374
+ if (l?.text === i)
3375
+ return l;
3366
3376
  }
3367
- return i !== r?.text && ((this.viteCommand !== "serve" || this.isInStorybook) && T.warn(
3377
+ return i !== r?.text && ((this.viteCommand !== "serve" || this.isInStorybook) && $.warn(
3368
3378
  V,
3369
3379
  "The Vite's transform() content didn't match TypeScript's content. This may happen if some plugin transformed a file before Lumina or Vite got out of sync with TypeScript. This may lead to false errors. Debug your build configuration or report it as a bug",
3370
3380
  t
@@ -3411,7 +3421,7 @@ class $ {
3411
3421
  if (Array.isArray(this.assetsToProvide))
3412
3422
  this.assetsToProvide.push({ assets: t, transformers: i, apply: s });
3413
3423
  else if (this.viteCommand === "serve")
3414
- s === "serve" && ie(this, t, i);
3424
+ s === "serve" && te(this, t, i);
3415
3425
  else
3416
3426
  throw Error(
3417
3427
  b(
@@ -3421,74 +3431,74 @@ class $ {
3421
3431
  );
3422
3432
  }
3423
3433
  logLintWarning(t) {
3424
- T.warn("@arcgis/lumina:linting", t);
3434
+ $.warn("@arcgis/lumina:linting", t);
3425
3435
  }
3426
3436
  logLintError(t, i, s) {
3427
- this._silencedRules?.[t]?.includes(i.slice(this.dir.root.length)) !== !0 ? T.error("@arcgis/lumina:linting", s, i) : T.warn("@arcgis/lumina:linting", s, i);
3437
+ this._silencedRules?.[t]?.includes(i.slice(this.dir.root.length)) !== !0 ? $.error("@arcgis/lumina:linting", s, i) : $.warn("@arcgis/lumina:linting", s, i);
3428
3438
  }
3429
3439
  }
3430
3440
  I([
3431
3441
  k("configResolved()")
3432
- ], $.prototype, "shouldMinify");
3442
+ ], P.prototype, "shouldMinify");
3433
3443
  I([
3434
3444
  k("configResolved()")
3435
- ], $.prototype, "shouldMinifyJsx");
3445
+ ], P.prototype, "shouldMinifyJsx");
3436
3446
  I([
3437
3447
  k("configResolved()")
3438
- ], $.prototype, "dir");
3448
+ ], P.prototype, "dir");
3439
3449
  I([
3440
3450
  k("load()")
3441
- ], $.prototype, "apiJson");
3451
+ ], P.prototype, "apiJson");
3442
3452
  I([
3443
3453
  k("load()")
3444
- ], $.prototype, "apiJsonComponents");
3454
+ ], P.prototype, "apiJsonComponents");
3445
3455
  I([
3446
3456
  k("load()")
3447
- ], $.prototype, "privateApiJson");
3457
+ ], P.prototype, "privateApiJson");
3448
3458
  I([
3449
3459
  k("configResolved()")
3450
- ], $.prototype, "apiJsonEnabled");
3460
+ ], P.prototype, "apiJsonEnabled");
3451
3461
  I([
3452
3462
  k("apply()")
3453
- ], $.prototype, "environment");
3463
+ ], P.prototype, "environment");
3454
3464
  I([
3455
3465
  k("apply()")
3456
- ], $.prototype, "isInTest");
3466
+ ], P.prototype, "isInTest");
3457
3467
  I([
3458
3468
  k("apply()")
3459
- ], $.prototype, "isInPuppeteerTestBackEnd");
3469
+ ], P.prototype, "isInPuppeteerTestBackEnd");
3460
3470
  I([
3461
3471
  k("apply()")
3462
- ], $.prototype, "isInPuppeteerTestFrontEnd");
3472
+ ], P.prototype, "isInPuppeteerTestFrontEnd");
3463
3473
  I([
3464
3474
  k("configResolved()")
3465
- ], $.prototype, "isInBuildWatch");
3475
+ ], P.prototype, "isInBuildWatch");
3466
3476
  I([
3467
3477
  k("configResolved()")
3468
- ], $.prototype, "isInStorybook");
3478
+ ], P.prototype, "isInStorybook");
3469
3479
  I([
3470
3480
  k("configResolved()")
3471
- ], $.prototype, "hmrEnabled");
3481
+ ], P.prototype, "hmrEnabled");
3472
3482
  I([
3473
3483
  k("apply()")
3474
- ], $.prototype, "viteCommand");
3484
+ ], P.prototype, "viteCommand");
3475
3485
  I([
3476
3486
  k("configResolved()")
3477
- ], $.prototype, "isFullApiExtraction");
3487
+ ], P.prototype, "isFullApiExtraction");
3478
3488
  I([
3479
3489
  k("configResolved()")
3480
- ], $.prototype, "viteConfig");
3490
+ ], P.prototype, "viteConfig");
3481
3491
  I([
3482
3492
  k("configureServer()")
3483
- ], $.prototype, "server");
3493
+ ], P.prototype, "server");
3484
3494
  I([
3485
3495
  k("transform()")
3486
- ], $.prototype, "_globalHydratedCssString");
3496
+ ], P.prototype, "_globalHydratedCssString");
3487
3497
  I([
3488
3498
  k("configResolved()")
3489
- ], $.prototype, "_typeScriptPrinter");
3490
- function vo(e, t, i) {
3491
- const s = xi()[t] ?? ss(e)[t];
3499
+ ], P.prototype, "_typeScriptPrinter");
3500
+ function ho(e, t, i) {
3501
+ const s = Ii()[t] ?? is(e)[t];
3492
3502
  if (s === void 0) {
3493
3503
  if (e.options?.build?.dependencies?.silenceUnknownJsxElementUsage?.(t, i, e) === !0)
3494
3504
  return;
@@ -3502,11 +3512,11 @@ function vo(e, t, i) {
3502
3512
  }
3503
3513
  return s;
3504
3514
  }
3505
- function bo(e, t) {
3515
+ function yo(e, t) {
3506
3516
  return e.packageName === void 0 ? he(t, e.modulePath) : u.join(e.packageName, e.modulePath);
3507
3517
  }
3508
- function ss(e) {
3509
- return e._localDefinedComponents ??= Li(
3518
+ function is(e) {
3519
+ return e._localDefinedComponents ??= Ai(
3510
3520
  e.privateApiJson,
3511
3521
  {
3512
3522
  packageName: void 0,
@@ -3517,19 +3527,19 @@ function ss(e) {
3517
3527
  e.viteCommand === "build"
3518
3528
  ), e._localDefinedComponents;
3519
3529
  }
3520
- const Ht = "makeRuntime(", wo = "@arcgis/core", So = "@arcgis/lumina:injectRuntimeOptions", Co = (e) => ({
3521
- name: So,
3530
+ const qt = "makeRuntime(", vo = "@arcgis/core", bo = "@arcgis/lumina:injectRuntimeOptions", wo = (e) => ({
3531
+ name: bo,
3522
3532
  transform: {
3523
3533
  filter: {
3524
3534
  id: /\/src\/runtime\.ts$/u
3525
3535
  },
3526
3536
  handler(t, i) {
3527
- const s = t.indexOf(Ht);
3537
+ const s = t.indexOf(qt);
3528
3538
  if (s === -1)
3529
3539
  throw new Error(
3530
3540
  `Failed to find makeRuntime() function call in src/runtime.ts. Id: ${i}. Code: ${t}`
3531
3541
  );
3532
- const n = s + Ht.length, r = e.options.css?.commonStylesPath;
3542
+ const n = s + qt.length, r = e.options.css?.commonStylesPath;
3533
3543
  return {
3534
3544
  code: [
3535
3545
  r === void 0 ? "" : `import commonStyles from "${he(e.dir.src, r)}${Ie}";`,
@@ -3537,15 +3547,15 @@ const Ht = "makeRuntime(", wo = "@arcgis/core", So = "@arcgis/lumina:injectRunti
3537
3547
  "{",
3538
3548
  "defaultAssetPath:import.meta.env.BASE_URL,",
3539
3549
  'hydratedAttribute:"',
3540
- e.options.css?.hydratedAttribute ?? Ti,
3550
+ e.options.css?.hydratedAttribute ?? Ei,
3541
3551
  '",',
3542
3552
  r === void 0 ? "" : "commonStyles",
3543
3553
  "}",
3544
3554
  t.slice(n),
3545
3555
  // Dependency injection. Lumina cannot directly import these to avoid
3546
3556
  // a cyclical dependency.
3547
- H ? `
3548
- import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${wo}/applications/Components/reactiveUtils.js";
3557
+ q ? `
3558
+ import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${vo}/applications/Components/reactiveUtils.js";
3549
3559
  createObservable,
3550
3560
  runtime.t = trackAccess;
3551
3561
  runtime.o = createObservable;
@@ -3557,23 +3567,23 @@ runtime.r = runTracked;` : ""
3557
3567
  }
3558
3568
  }
3559
3569
  });
3560
- function Eo(e) {
3561
- return `import "../${e.options.build?.cdn?.namespace === void 0 ? `${le}/${Z}.css` : `${e.options.build.cdn.namespace}/${e.options.build.cdn.namespace}.css`}";
3570
+ function So(e) {
3571
+ return `import "../${e.options.build?.cdn?.namespace === void 0 ? `${le}/${Q}.css` : `${e.options.build.cdn.namespace}/${e.options.build.cdn.namespace}.css`}";
3562
3572
  `;
3563
3573
  }
3564
- const we = "@arcgis/lumina:addNonLazyImports", To = (e) => ({
3574
+ const we = "@arcgis/lumina:addNonLazyImports", Co = (e) => ({
3565
3575
  name: we,
3566
3576
  apply: () => e.viteCommand === "build",
3567
3577
  generateBundle(t, i) {
3568
3578
  const n = e.viteConfig.build.sourcemap !== !1 ? " " : `
3569
3579
  `;
3570
3580
  let r = !1;
3571
- if (Object.entries(i).forEach(([a, c]) => {
3581
+ if (Object.entries(i).forEach(([a, l]) => {
3572
3582
  const d = Ge(a, e.apiExtractor);
3573
- if (d !== a && (c.fileName = d), c.type === "chunk") {
3574
- const l = u.dirname(u.join(e.dir.dist, a)), p = d === a ? l : u.dirname(u.join(e.dir.dist, d));
3575
- let m = c.code;
3576
- m = gn(m, e, p, l), !e.isInStorybook && d === "chunks/runtime.js" && (r = !0, m = Eo(e) + m), m = `${e.banner}${n}${m}`, c.code = m;
3583
+ if (d !== a && (l.fileName = d), l.type === "chunk") {
3584
+ const c = u.dirname(u.join(e.dir.dist, a)), p = d === a ? c : u.dirname(u.join(e.dir.dist, d));
3585
+ let m = l.code;
3586
+ m = un(m, e, p, c), !e.isInStorybook && d === "chunks/runtime.js" && (r = !0, m = So(e) + m), m = `${e.banner}${n}${m}`, l.code = m;
3577
3587
  }
3578
3588
  }), !r && !e.isInStorybook)
3579
3589
  throw Error(b(we, "Expected to find a chunks/runtime.js file in the Vite's build output."));
@@ -3584,18 +3594,18 @@ const we = "@arcgis/lumina:addNonLazyImports", To = (e) => ({
3584
3594
  const t = e._customElementDependencies, i = Object.entries(t), s = new Set(
3585
3595
  i.map(([r]) => r).filter((r) => Pe(r, e.dir.srcComponents))
3586
3596
  );
3587
- i.forEach(([r, { referencedTagNames: a, referencedDeferredTagNames: c, referencedBy: d }]) => {
3588
- if (s.has(r) || a.length === 0 && c.length === 0)
3597
+ i.forEach(([r, { referencedTagNames: a, referencedDeferredTagNames: l, referencedBy: d }]) => {
3598
+ if (s.has(r) || a.length === 0 && l.length === 0)
3589
3599
  return;
3590
- const l = rs(t, d, s);
3591
- if (l.forEach((p) => {
3592
- t[p].referencedTagNames.splice(0, 0, ...a), t[p].referencedDeferredTagNames.splice(0, 0, ...c);
3593
- }), (a.length > 0 || c.length > 0) && l.length === 0) {
3600
+ const c = ss(t, d, s);
3601
+ if (c.forEach((p) => {
3602
+ t[p].referencedTagNames.splice(0, 0, ...a), t[p].referencedDeferredTagNames.splice(0, 0, ...l);
3603
+ }), (a.length > 0 || l.length > 0) && c.length === 0) {
3594
3604
  const p = De(r);
3595
3605
  throw Error(
3596
3606
  b(
3597
3607
  we,
3598
- `Unable to determine what files imported ${p}. This is necessary because this file referenced other web components (${[...a, ...c].join(", ")}), and so the compiler needs to know what component entrypoints these imports should be added to. Please double check if you are referencing ${p} in the code dynamically in the way that Lumina cannot detect, and report this issue to the Lumina maintainers.
3608
+ `Unable to determine what files imported ${p}. This is necessary because this file referenced other web components (${[...a, ...l].join(", ")}), and so the compiler needs to know what component entrypoints these imports should be added to. Please double check if you are referencing ${p} in the code dynamically in the way that Lumina cannot detect, and report this issue to the Lumina maintainers.
3599
3609
 
3600
3610
  Possible causes:
3601
3611
  - You are re-exporting a functional component from a barrel file. Refactor such cases to import the functional component directly from the file that declares it.
@@ -3605,42 +3615,42 @@ Possible causes:
3605
3615
  );
3606
3616
  }
3607
3617
  });
3608
- const n = i.flatMap(async ([r, { referencedTagNames: a, referencedDeferredTagNames: c }]) => {
3618
+ const n = i.flatMap(async ([r, { referencedTagNames: a, referencedDeferredTagNames: l }]) => {
3609
3619
  if (!s.has(r))
3610
3620
  return [];
3611
- const d = u.dirname(r), l = e.dir.src + Ge(d.slice(e.dir.src.length), e.apiExtractor), p = u.relative(e.dir.src, l);
3612
- function m(P) {
3613
- const x = vo(e, P, r);
3621
+ const d = u.dirname(r), c = e.dir.src + Ge(d.slice(e.dir.src.length), e.apiExtractor), p = u.relative(e.dir.src, c);
3622
+ function m(E) {
3623
+ const x = ho(e, E, r);
3614
3624
  if (x === void 0)
3615
3625
  return;
3616
- const S = bo(x, p);
3617
- if (S !== `./${p}`)
3618
- return S.startsWith(".") ? `${S}/${qt}` : S;
3626
+ const C = yo(x, p);
3627
+ if (C !== `./${p}`)
3628
+ return C.startsWith(".") ? `${C}/${Ht}` : C;
3619
3629
  }
3620
- const f = new Set(a), g = new Set(c), h = Array.from(f, m).filter(D), y = (P) => `import "${P}";
3621
- `, v = h.map(y).join(""), w = Array.from(g, (P) => {
3622
- const x = m(P);
3630
+ const f = new Set(a), g = new Set(l), h = Array.from(f, m).filter(F), y = (E) => `import "${E}";
3631
+ `, v = h.map(y).join(""), w = Array.from(g, (E) => {
3632
+ const x = m(E);
3623
3633
  if (x !== void 0) {
3624
- if (f.has(P)) {
3625
- T.warn(
3634
+ if (f.has(E)) {
3635
+ $.warn(
3626
3636
  we,
3627
- `"${P}" is used both with and without deferLoad in ${r} (either directly in ${r} or via a functional component). deferLoad will be ignored in this case.`
3637
+ `"${E}" is used both with and without deferLoad in ${r} (either directly in ${r} or via a functional component). deferLoad will be ignored in this case.`
3628
3638
  );
3629
3639
  return;
3630
3640
  }
3631
- return `.set("${P}", () => import("${x}"))
3641
+ return `.set("${E}", () => import("${x}"))
3632
3642
  `;
3633
3643
  }
3634
- }).filter(D), C = `${v}export * from "./${gt}";`, E = w.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
3635
- ${C}
3636
- deferredLoaders${w.join("")};` : C;
3637
- return await _(u.join(e.dir.dist, p, qt), E);
3644
+ }).filter(F), S = `${v}export * from "./${gt}";`, T = w.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
3645
+ ${S}
3646
+ deferredLoaders${w.join("")};` : S;
3647
+ return await z(u.join(e.dir.dist, p, Ht), T);
3638
3648
  });
3639
3649
  await Promise.all(n);
3640
3650
  }
3641
- }), qt = "index.js", rs = (e, t, i, s = /* @__PURE__ */ new Set()) => t.flatMap((n) => i.has(n) ? [n] : s.has(n) ? [] : (s.add(n), rs(e, e[n].referencedBy, i, s)));
3651
+ }), Ht = "index.js", ss = (e, t, i, s = /* @__PURE__ */ new Set()) => t.flatMap((n) => i.has(n) ? [n] : s.has(n) ? [] : (s.add(n), ss(e, e[n].referencedBy, i, s)));
3642
3652
  function Vt(e, t, i) {
3643
- if (ee(e))
3653
+ if (Z(e))
3644
3654
  return e;
3645
3655
  {
3646
3656
  i === void 0 && t.neededImports.add("nothing");
@@ -3654,18 +3664,18 @@ function Vt(e, t, i) {
3654
3664
  );
3655
3665
  }
3656
3666
  }
3657
- function ee(e) {
3667
+ function Z(e) {
3658
3668
  return (
3659
3669
  // Inlined string literal
3660
3670
  typeof e == "string" || // Syntax kinds that are never undefined
3661
- $o.has(e.kind) || // Ternary with both branches never undefined
3662
- o.isConditionalExpression(e) && ee(e.whenTrue) && ee(e.whenFalse) || // Binary expression with operator that never results in undefined Or both sides are definitely not undefined
3663
- o.isBinaryExpression(e) && (Po.has(e.operatorToken.kind) || ee(e.left) && ee(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3664
- (o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && ee(e.expression) || // JSX that got converted to html`<p>Something</p>`
3665
- o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && mr.has(e.tag.text)
3671
+ Eo.has(e.kind) || // Ternary with both branches never undefined
3672
+ o.isConditionalExpression(e) && Z(e.whenTrue) && Z(e.whenFalse) || // Binary expression with operator that never results in undefined Or both sides are definitely not undefined
3673
+ o.isBinaryExpression(e) && (To.has(e.operatorToken.kind) || Z(e.left) && Z(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3674
+ (o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && Z(e.expression) || // JSX that got converted to html`<p>Something</p>`
3675
+ o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && dr.has(e.tag.text)
3666
3676
  );
3667
3677
  }
3668
- const $o = /* @__PURE__ */ new Set([
3678
+ const Eo = /* @__PURE__ */ new Set([
3669
3679
  o.SyntaxKind.NumericLiteral,
3670
3680
  o.SyntaxKind.BigIntLiteral,
3671
3681
  o.SyntaxKind.StringLiteral,
@@ -3684,7 +3694,7 @@ const $o = /* @__PURE__ */ new Set([
3684
3694
  o.SyntaxKind.ClassExpression,
3685
3695
  // Trust? Trust.
3686
3696
  o.SyntaxKind.NonNullExpression
3687
- ]), Po = /* @__PURE__ */ new Set([
3697
+ ]), To = /* @__PURE__ */ new Set([
3688
3698
  o.SyntaxKind.PlusEqualsToken,
3689
3699
  o.SyntaxKind.MinusEqualsToken,
3690
3700
  o.SyntaxKind.AsteriskAsteriskEqualsToken,
@@ -3719,33 +3729,33 @@ const $o = /* @__PURE__ */ new Set([
3719
3729
  o.SyntaxKind.SlashToken,
3720
3730
  o.SyntaxKind.PercentToken,
3721
3731
  o.SyntaxKind.AsteriskAsteriskToken
3722
- ]), ko = {
3732
+ ]), $o = {
3723
3733
  property(e, t, i, s) {
3724
- const n = Io(s, i, e), r = n?.type === "stringifiedReflected", a = n?.type === "reflected" || r;
3734
+ const n = Po(s, i, e), r = n?.type === "stringifiedReflected", a = n?.type === "reflected" || r;
3725
3735
  if (a) {
3726
- const f = He(t);
3736
+ const f = qe(t);
3727
3737
  if (f === !0)
3728
3738
  return [n.name];
3729
3739
  if (f === !1)
3730
3740
  return [];
3731
3741
  }
3732
- const c = t === void 0 ? ["=", o.factory.createToken(o.SyntaxKind.TrueKeyword)] : Ee(e, t, a), d = c[0] !== "=";
3742
+ const l = t === void 0 ? ["=", o.factory.createToken(o.SyntaxKind.TrueKeyword)] : Ee(e, t, a), d = l[0] !== "=";
3733
3743
  if (a && d)
3734
- return [n.name, ...c];
3735
- const [l, p] = c, m = n?.type === "stringifiedNonReflected";
3744
+ return [n.name, ...l];
3745
+ const [c, p] = l, m = n?.type === "stringifiedNonReflected";
3736
3746
  if (r || m) {
3737
3747
  const f = Vt(
3738
3748
  p,
3739
3749
  e,
3740
3750
  m ? "" : void 0
3741
- ), h = i === "value" && (s === "input" || s === "textarea" || s === ke) ? Ao(f, e) : f;
3751
+ ), h = i === "value" && (s === "input" || s === "textarea" || s === ke) ? Io(f, e) : f;
3742
3752
  if (h !== p)
3743
- return [m ? `.${i}` : n.name, l, h];
3753
+ return [m ? `.${i}` : n.name, c, h];
3744
3754
  }
3745
- return [`.${i}`, ...c];
3755
+ return [`.${i}`, ...l];
3746
3756
  },
3747
3757
  attribute(e, t, i) {
3748
- const s = t === void 0 || He(t);
3758
+ const s = t === void 0 || qe(t);
3749
3759
  if (s === !0)
3750
3760
  return [i];
3751
3761
  if (s === !1)
@@ -3754,7 +3764,7 @@ const $o = /* @__PURE__ */ new Set([
3754
3764
  return [i, ...a];
3755
3765
  },
3756
3766
  booleanAttribute(e, t, i) {
3757
- const s = t === void 0 || He(t);
3767
+ const s = t === void 0 || qe(t);
3758
3768
  return s === !0 ? [i] : s === !1 ? [] : [`?${i}`, ...Ee(e, t, !1)];
3759
3769
  },
3760
3770
  event(e, t, i) {
@@ -3763,7 +3773,7 @@ const $o = /* @__PURE__ */ new Set([
3763
3773
  `Event prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3764
3774
  );
3765
3775
  const s = i.slice(2), n = Et(s);
3766
- return [`@${hi.has(n) ? s.toLowerCase() : Et(s)}=`, ...bt(e, t, void 0)];
3776
+ return [`@${gi.has(n) ? s.toLowerCase() : Et(s)}=`, ...bt(e, t, void 0)];
3767
3777
  },
3768
3778
  directives(e, t) {
3769
3779
  if (t === void 0 || !o.isJsxExpression(t))
@@ -3779,7 +3789,7 @@ const $o = /* @__PURE__ */ new Set([
3779
3789
  throw new Error(
3780
3790
  `Directives prop cannot contain a spread argument - it needs to be statically analyzable. Still, the following are allowed: directives={[directiveA, condition ? a : b, c()]}. Found ${String(t.expression?.getText(e.sourceFile))}`
3781
3791
  );
3782
- return q(e, void 0, n);
3792
+ return H(e, void 0, n);
3783
3793
  });
3784
3794
  },
3785
3795
  ref(e, t) {
@@ -3794,7 +3804,7 @@ const $o = /* @__PURE__ */ new Set([
3794
3804
  const n = s ? e.importRenames.stabilizedRef : e.importRenames.ref;
3795
3805
  return [
3796
3806
  o.factory.createCallExpression(o.factory.createIdentifier(n), void 0, [
3797
- q(e, void 0, t.expression)
3807
+ H(e, void 0, t.expression)
3798
3808
  ])
3799
3809
  ];
3800
3810
  },
@@ -3811,21 +3821,21 @@ const $o = /* @__PURE__ */ new Set([
3811
3821
  return [o.factory.createIdentifier(n)];
3812
3822
  }
3813
3823
  };
3814
- function Io(e, t, i) {
3824
+ function Po(e, t, i) {
3815
3825
  if (typeof e == "string") {
3816
3826
  const r = (i.externalComponents[e] ?? i.localComponents[e])?.propToAttribute?.[t];
3817
3827
  if (r !== void 0)
3818
3828
  return { name: r, type: "reflected" };
3819
3829
  }
3820
- const s = ze(W.common, t);
3830
+ const s = ze(U.common, t);
3821
3831
  if (s !== void 0)
3822
3832
  return s;
3823
3833
  if (typeof e == "string") {
3824
- const n = ze(W.perElement[e], t);
3834
+ const n = ze(U.perElement[e], t);
3825
3835
  if (n !== void 0)
3826
3836
  return n;
3827
3837
  } else {
3828
- const n = Object.values(W.perElement).map(
3838
+ const n = Object.values(U.perElement).map(
3829
3839
  (a) => ze(a, t)
3830
3840
  ), r = Xe(n, (a) => a?.type === "stringifiedNonReflected" ? a : void 0) ?? Xe(n, (a) => a?.type === "stringifiedReflected" ? a : void 0);
3831
3841
  if (r !== void 0)
@@ -3850,7 +3860,7 @@ function yt(e, t) {
3850
3860
  return e;
3851
3861
  throw new Error(`key prop value must be an expression. Found ${String(e?.getText(t))}`);
3852
3862
  }
3853
- function He(e) {
3863
+ function qe(e) {
3854
3864
  if (e === void 0)
3855
3865
  return !0;
3856
3866
  if (o.isJsxExpression(e)) {
@@ -3885,8 +3895,8 @@ function Gt(e, t) {
3885
3895
  const i = e.text;
3886
3896
  if (i.length === 0)
3887
3897
  return [];
3888
- const s = yi(i);
3889
- if (cr(s)) {
3898
+ const s = hi(i);
3899
+ if (nr(s)) {
3890
3900
  const n = s.replaceAll('"', "&#34;");
3891
3901
  if (n.length > s.length) {
3892
3902
  const r = s.replaceAll("'", "&#39;");
@@ -3905,25 +3915,25 @@ function Xt(e, t, i) {
3905
3915
  `${i} prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3906
3916
  );
3907
3917
  const s = t.expression;
3908
- if (xo(s)) {
3918
+ if (ko(s)) {
3909
3919
  const r = i === "class" ? "safeClassMap" : "safeStyleMap";
3910
3920
  e.neededImports.add(r);
3911
- const a = e.importRenames[r], c = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
3912
- q(e, void 0, s)
3921
+ const a = e.importRenames[r], l = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
3922
+ H(e, void 0, s)
3913
3923
  ]);
3914
- return [`${i}=`, c];
3924
+ return [`${i}=`, l];
3915
3925
  } else
3916
3926
  return [i, ...Ee(e, t, !0)];
3917
3927
  }
3918
- const xo = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3919
- function Ao(e, t) {
3928
+ const ko = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3929
+ function Io(e, t) {
3920
3930
  t.neededImports.add("live");
3921
3931
  const i = t.importRenames.live;
3922
3932
  return o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [
3923
3933
  typeof e == "string" ? o.factory.createStringLiteral(e) : e
3924
3934
  ]);
3925
3935
  }
3926
- function Lo(e) {
3936
+ function xo(e) {
3927
3937
  if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in Yt && e.expression.arguments.length <= 1)
3928
3938
  return {
3929
3939
  propType: Yt[e.expression.expression.text],
@@ -3941,15 +3951,15 @@ const Yt = {
3941
3951
  bindBooleanAttribute: "booleanAttribute",
3942
3952
  bindEvent: "event"
3943
3953
  };
3944
- function No(e, t, i) {
3945
- return Fo.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : mi.has(e) || e.includes("-") ? "attribute" : !pt(i) && (fi.has(e) || (i === Ye ? !1 : i === ke ? (
3954
+ function Ao(e, t, i) {
3955
+ return No.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : ui.has(e) || e.includes("-") ? "attribute" : !pt(i) && (mi.has(e) || (i === Ye ? !1 : i === ke ? (
3946
3956
  // When tag name is dynamic, we can't help but check if the prop name matches an "always attribute" in any html element
3947
3957
  Object.values(Qe).some((r) => r.has(e))
3948
- ) : Qe[i]?.has(e) === !0)) ? kt.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === Ye || i !== ke && (lt.has(i) || dt.has(i)) ? e in W.common.reflected || e in W.common.stringifiedReflected || e in W.common.stringifiedNonReflected ? "property" : kt.has(e) ? "booleanAttribute" : "attribute" : "property";
3958
+ ) : Qe[i]?.has(e) === !0)) ? kt.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === Ye || i !== ke && (lt.has(i) || dt.has(i)) ? e in U.common.reflected || e in U.common.stringifiedReflected || e in U.common.stringifiedNonReflected ? "property" : kt.has(e) ? "booleanAttribute" : "attribute" : "property";
3949
3959
  }
3950
- const jo = ["class", "style", "ref", "directives", "key", "deferLoad"], Fo = new Set(jo), Do = (e) => typeof e != "string" || e.trim().length > 0;
3960
+ const Lo = ["class", "style", "ref", "directives", "key", "deferLoad"], No = new Set(Lo), jo = (e) => typeof e != "string" || e.trim().length > 0;
3951
3961
  function Oe({ key: e, parts: t, litTag: i }, s) {
3952
- const n = Ro(t);
3962
+ const n = Fo(t);
3953
3963
  if (n.length % 2 === 0)
3954
3964
  throw new Error("Normalized template parts array length must be odd");
3955
3965
  const [r, ...a] = n;
@@ -3957,24 +3967,24 @@ function Oe({ key: e, parts: t, litTag: i }, s) {
3957
3967
  throw new Error("First normalized template part must be a string");
3958
3968
  if (i === void 0) {
3959
3969
  if (a.length === 0)
3960
- return qe(s, e, o.factory.createStringLiteral(r));
3970
+ return He(s, e, o.factory.createStringLiteral(r));
3961
3971
  if (r === "" && a.length === 2 && a[1] === "")
3962
- return qe(
3972
+ return He(
3963
3973
  s,
3964
3974
  e,
3965
3975
  typeof a[0] == "string" ? o.factory.createStringLiteral(r) : a[0]
3966
3976
  );
3967
3977
  }
3968
- const c = typeof i == "string" ? i : ce;
3969
- s.neededImports.add(c);
3970
- const d = s.importRenames[c], l = o.factory.createTaggedTemplateExpression(
3978
+ const l = typeof i == "string" ? i : ce;
3979
+ s.neededImports.add(l);
3980
+ const d = s.importRenames[l], c = o.factory.createTaggedTemplateExpression(
3971
3981
  o.factory.createIdentifier(d),
3972
3982
  void 0,
3973
- a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), Oo(a))
3983
+ a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), Do(a))
3974
3984
  );
3975
- return qe(s, e, l);
3985
+ return He(s, e, c);
3976
3986
  }
3977
- const Ro = (e) => e.reduce(
3987
+ const Fo = (e) => e.reduce(
3978
3988
  (t, i, s) => {
3979
3989
  const n = t.at(-1), r = typeof n == "string", a = typeof i == "string";
3980
3990
  if (r && a)
@@ -3984,7 +3994,7 @@ const Ro = (e) => e.reduce(
3984
3994
  },
3985
3995
  [""]
3986
3996
  );
3987
- function Oo(e) {
3997
+ function Do(e) {
3988
3998
  if (!(e.length % 2 === 0))
3989
3999
  throw new Error("templatePartsToSpans should be called with normalized parts array without the first item");
3990
4000
  const i = e.length / 2;
@@ -3992,25 +4002,25 @@ function Oo(e) {
3992
4002
  const r = n * 2, a = e[r];
3993
4003
  if (typeof a == "string")
3994
4004
  throw new Error("Expected to receive a normalized array of parts");
3995
- const c = r + 1, d = e[c];
4005
+ const l = r + 1, d = e[l];
3996
4006
  if (typeof d != "string")
3997
4007
  throw new Error("Expected to receive a normalized array of parts");
3998
- const l = n === i - 1;
4008
+ const c = n === i - 1;
3999
4009
  return o.factory.createTemplateSpan(
4000
4010
  a,
4001
- l ? o.factory.createTemplateTail(d) : o.factory.createTemplateMiddle(d)
4011
+ c ? o.factory.createTemplateTail(d) : o.factory.createTemplateMiddle(d)
4002
4012
  );
4003
4013
  });
4004
4014
  }
4005
- function qe(e, t, i) {
4015
+ function He(e, t, i) {
4006
4016
  if (t === void 0)
4007
4017
  return i;
4008
4018
  e.neededImports.add("keyed");
4009
4019
  const s = e.importRenames.keyed;
4010
4020
  return o.factory.createCallExpression(o.factory.createIdentifier(s), void 0, [t, i]);
4011
4021
  }
4012
- const ns = (e, t) => e.getFullText(t.sourceFile).slice(0, e.getLeadingTriviaWidth(t.sourceFile));
4013
- function os(e, t) {
4022
+ const rs = (e, t) => e.getFullText(t.sourceFile).slice(0, e.getLeadingTriviaWidth(t.sourceFile));
4023
+ function ns(e, t) {
4014
4024
  const i = vt(e);
4015
4025
  return i.length === 0 ? t : o.setSyntheticLeadingComments(
4016
4026
  t,
@@ -4018,26 +4028,26 @@ function os(e, t) {
4018
4028
  ...s,
4019
4029
  pos: -1,
4020
4030
  end: -1,
4021
- text: as(e.slice(s.pos, s.end))
4031
+ text: os(e.slice(s.pos, s.end))
4022
4032
  }))
4023
4033
  );
4024
4034
  }
4025
4035
  const vt = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
4026
- function Mo(e) {
4036
+ function Ro(e) {
4027
4037
  const t = vt(e);
4028
4038
  if (t.length === 0)
4029
4039
  return [e || " "];
4030
4040
  const i = t.reduceRight(
4031
4041
  ([n, ...r], a) => {
4032
- const c = Jo(n), d = as(c.slice(a.pos, a.end));
4042
+ const l = Oo(n), d = os(l.slice(a.pos, a.end));
4033
4043
  return [
4034
- c.slice(0, a.pos),
4044
+ l.slice(0, a.pos),
4035
4045
  /**
4036
4046
  * Literal values (like this) in place of directives are ignored by Lit:
4037
4047
  * https://github.com/lit/lit/blob/56cb2ca4a86f2c7f6af757c612f05e50d1966615/packages/lit-html/src/lit-html.ts#L1111
4038
4048
  */
4039
4049
  o.factory.createNoSubstitutionTemplateLiteral(d),
4040
- c.slice(a.end),
4050
+ l.slice(a.end),
4041
4051
  ...r
4042
4052
  ];
4043
4053
  },
@@ -4047,13 +4057,13 @@ function Mo(e) {
4047
4057
  const s = i.at(-1);
4048
4058
  return (typeof s != "string" || s.trim() !== "") && i.push(" "), i;
4049
4059
  }
4050
- const as = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
4051
- function Jo(e) {
4060
+ const os = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
4061
+ function Oo(e) {
4052
4062
  if (typeof e == "string")
4053
4063
  return e;
4054
4064
  throw new Error(`Expected string, got ${typeof e}: ${String(e)}`);
4055
4065
  }
4056
- function Bo(e, t) {
4066
+ function Mo(e, t) {
4057
4067
  if (!(o.isPropertyAccessExpression(t.expression) && t.expression.name.text === "map"))
4058
4068
  return t;
4059
4069
  const s = t.arguments[0];
@@ -4063,31 +4073,31 @@ function Bo(e, t) {
4063
4073
  if (!(typeof r == "object" && // If .map() callback has 3rd argument, it's not supported
4064
4074
  s.parameters.length <= 2))
4065
4075
  return t;
4066
- const c = ge(s.body);
4067
- let d = !0, l;
4068
- if (Qt(c))
4069
- l = c;
4076
+ const l = ge(s.body);
4077
+ let d = !0, c;
4078
+ if (Qt(l))
4079
+ c = l;
4070
4080
  else {
4071
- if (!o.isBlock(c))
4081
+ if (!o.isBlock(l))
4072
4082
  return t;
4073
- const v = c.statements.at(-1);
4083
+ const v = l.statements.at(-1);
4074
4084
  if (!(v && o.isReturnStatement(v) && v.expression))
4075
4085
  return t;
4076
- const C = ge(v.expression);
4077
- if (!Qt(C))
4086
+ const S = ge(v.expression);
4087
+ if (!Qt(S))
4078
4088
  return t;
4079
- const E = c.statements.slice(0, -1);
4080
- if (E.some(cs))
4089
+ const T = l.statements.slice(0, -1);
4090
+ if (T.some(as))
4081
4091
  return t;
4082
- d = E.length === 0, l = C;
4092
+ d = T.length === 0, c = S;
4083
4093
  }
4084
- const p = o.isJsxElement(l) ? l.openingElement : l, m = ms(p);
4094
+ const p = o.isJsxElement(c) ? c.openingElement : c, m = us(p);
4085
4095
  if (m === -1)
4086
4096
  return t;
4087
4097
  const f = p.attributes.properties[m];
4088
4098
  if (f === void 0 || !o.isJsxAttribute(f))
4089
4099
  return t;
4090
- const g = yt(f.initializer, e.sourceFile), h = Ko(r, s, g, d, e);
4100
+ const g = yt(f.initializer, e.sourceFile), h = Jo(r, s, g, d, e);
4091
4101
  if (h === void 0)
4092
4102
  return t;
4093
4103
  e.liftedKeys.add(f.name), e.neededImports.add("repeat");
@@ -4105,30 +4115,30 @@ function Bo(e, t) {
4105
4115
  s.parameters,
4106
4116
  s.type,
4107
4117
  s.equalsGreaterThanToken,
4108
- c
4118
+ l
4109
4119
  )
4110
4120
  ]);
4111
4121
  }
4112
4122
  const Qt = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e);
4113
- function cs(e) {
4123
+ function as(e) {
4114
4124
  if (o.isReturnStatement(e))
4115
4125
  return !0;
4116
4126
  let t = !1;
4117
4127
  return o.visitEachChild(
4118
4128
  e,
4119
- (i) => (t ||= cs(i), i),
4129
+ (i) => (t ||= as(i), i),
4120
4130
  void 0
4121
4131
  ), t;
4122
4132
  }
4123
- function Ko(e, t, i, s, n) {
4124
- const r = J(i);
4133
+ function Jo(e, t, i, s, n) {
4134
+ const r = B(i);
4125
4135
  if (r === void 0)
4126
4136
  return;
4127
- let a = ls(e.name, r);
4128
- const c = t.parameters.at(1);
4129
- if (c !== void 0 && o.isIdentifier(c.name) && // A more basic check is also provided in lumina/no-unnecessary-key rule
4130
- r.every(Fe, c.name)) {
4131
- T.warn(
4137
+ let a = cs(e.name, r);
4138
+ const l = t.parameters.at(1);
4139
+ if (l !== void 0 && o.isIdentifier(l.name) && // A more basic check is also provided in lumina/no-unnecessary-key rule
4140
+ r.every(Fe, l.name)) {
4141
+ $.warn(
4132
4142
  "@arcgis/lumina:jsxToLitHtml",
4133
4143
  "It looks like you are trying to use .map() index as a key={} prop value. Doing so is potentially pointless and may cause performance degradation. In Lit it is safe to omit the key={} prop. If you really mean to use index as the key, then use the keyed() Lit directive directly, rather than the JSX key={} prop.",
4134
4144
  n.sourceFile.fileName
@@ -4136,7 +4146,7 @@ function Ko(e, t, i, s, n) {
4136
4146
  return;
4137
4147
  }
4138
4148
  if (!s) {
4139
- const d = Wo(r, a, t);
4149
+ const d = Ko(r, a, t);
4140
4150
  if (d === void 0)
4141
4151
  return;
4142
4152
  a = d;
@@ -4152,38 +4162,38 @@ function Ko(e, t, i, s, n) {
4152
4162
  e.initializer
4153
4163
  );
4154
4164
  }
4155
- function J(e) {
4165
+ function B(e) {
4156
4166
  if (o.isIdentifier(e))
4157
4167
  return [e.text];
4158
4168
  if (o.isPropertyAccessExpression(e))
4159
- return J(e.expression);
4169
+ return B(e.expression);
4160
4170
  if (o.isElementAccessExpression(e))
4161
- return J(e.argumentExpression);
4171
+ return B(e.argumentExpression);
4162
4172
  if (o.isConditionalExpression(e)) {
4163
- const t = J(e.condition), i = J(e.whenTrue), s = J(e.whenFalse);
4173
+ const t = B(e.condition), i = B(e.whenTrue), s = B(e.whenFalse);
4164
4174
  return t === void 0 || i === void 0 || s === void 0 ? void 0 : [...t, ...i, ...s];
4165
4175
  } else if (o.isBinaryExpression(e)) {
4166
- const t = J(e.left), i = J(e.right);
4176
+ const t = B(e.left), i = B(e.right);
4167
4177
  return t === void 0 || i === void 0 ? void 0 : [...t, ...i];
4168
4178
  } else if (o.isTemplateExpression(e)) {
4169
4179
  const t = [];
4170
4180
  for (const i of e.templateSpans) {
4171
- const s = J(i.expression);
4181
+ const s = B(i.expression);
4172
4182
  if (s === void 0)
4173
4183
  return;
4174
4184
  t.push(...s);
4175
4185
  }
4176
4186
  return t;
4177
4187
  } else {
4178
- if (_o.has(e.kind))
4188
+ if (Bo.has(e.kind))
4179
4189
  return [];
4180
4190
  {
4181
4191
  const t = ge(e);
4182
- return t !== e ? J(t) : void 0;
4192
+ return t !== e ? B(t) : void 0;
4183
4193
  }
4184
4194
  }
4185
4195
  }
4186
- const _o = /* @__PURE__ */ new Set([
4196
+ const Bo = /* @__PURE__ */ new Set([
4187
4197
  o.SyntaxKind.NumericLiteral,
4188
4198
  o.SyntaxKind.BigIntLiteral,
4189
4199
  o.SyntaxKind.StringLiteral,
@@ -4192,20 +4202,20 @@ const _o = /* @__PURE__ */ new Set([
4192
4202
  o.SyntaxKind.FalseKeyword,
4193
4203
  o.SyntaxKind.NullKeyword,
4194
4204
  o.SyntaxKind.TrueKeyword
4195
- ]), ge = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? ge(e.expression) : e, ls = (e, t) => o.isObjectBindingPattern(e) ? Ho(e, t) : e;
4196
- function Wo(e, t, i) {
4205
+ ]), ge = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? ge(e.expression) : e, cs = (e, t) => o.isObjectBindingPattern(e) ? Wo(e, t) : e;
4206
+ function Ko(e, t, i) {
4197
4207
  if (e.every(Fe, t))
4198
4208
  return t;
4199
4209
  if (o.isIdentifier(t)) {
4200
- const s = o.isBlock(i.body) ? Xe(i.body.statements, (r) => Uo(r, t)) : void 0;
4210
+ const s = o.isBlock(i.body) ? Xe(i.body.statements, (r) => _o(r, t)) : void 0;
4201
4211
  if (s === void 0)
4202
4212
  return;
4203
- const n = ls(s, e);
4213
+ const n = cs(s, e);
4204
4214
  if (e.every(Fe, n))
4205
4215
  return n;
4206
4216
  }
4207
4217
  }
4208
- function Uo(e, t) {
4218
+ function _o(e, t) {
4209
4219
  if (!o.isVariableStatement(e) || !(e.declarationList.flags & o.NodeFlags.Const))
4210
4220
  return;
4211
4221
  const i = e.declarationList.declarations[0];
@@ -4213,34 +4223,34 @@ function Uo(e, t) {
4213
4223
  }
4214
4224
  function Fe(e) {
4215
4225
  const t = this;
4216
- return o.isIdentifier(t) ? t.text === e : t.elements.some(zo, e);
4226
+ return o.isIdentifier(t) ? t.text === e : t.elements.some(Uo, e);
4217
4227
  }
4218
- function zo(e) {
4228
+ function Uo(e) {
4219
4229
  const t = this;
4220
4230
  return o.isOmittedExpression(e) ? !1 : Fe.call(e.name, t);
4221
4231
  }
4222
- function Ho(e, t) {
4232
+ function Wo(e, t) {
4223
4233
  let i = !1;
4224
4234
  const s = e.elements.filter((n) => o.isIdentifier(n.name) ? t.includes(n.name.text) : (i = !0, !0));
4225
4235
  return i || s.length === 0 ? e : o.factory.updateObjectBindingPattern(e, s);
4226
4236
  }
4227
- const ds = (e, t) => t.liftedKeys.has(e);
4228
- function q(e, t, i) {
4237
+ const ls = (e, t) => t.liftedKeys.has(e);
4238
+ function H(e, t, i) {
4229
4239
  if (fe(i))
4230
- return ps(e, i);
4231
- const s = o.isCallExpression(i) ? Bo(e, i) : i, n = o.visitEachChild(
4240
+ return ds(e, i);
4241
+ const s = o.isCallExpression(i) ? Mo(e, i) : i, n = o.visitEachChild(
4232
4242
  s,
4233
4243
  // Do not add "" if parent is binary expression to not turn {(a && <b />) || c} into {(a && <b />) || "" || c}
4234
- q.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
4244
+ H.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
4235
4245
  e.transformationContext
4236
4246
  );
4237
- return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || fe(ge(i.right)) || yr(i.right)) ? Go(n) : n;
4247
+ return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || fe(ge(i.right)) || fr(i.right)) ? Ho(n) : n;
4238
4248
  }
4239
- function ps(e, t) {
4240
- const i = us(e, t);
4249
+ function ds(e, t) {
4250
+ const i = ps(e, t);
4241
4251
  return Oe(i, e);
4242
4252
  }
4243
- function us(e, t) {
4253
+ function ps(e, t) {
4244
4254
  const i = "children" in t ? t.children : [];
4245
4255
  if (o.isJsxFragment(t))
4246
4256
  return { key: void 0, ...Te(i, e) };
@@ -4248,17 +4258,17 @@ function us(e, t) {
4248
4258
  if (o.isJsxNamespacedName(r))
4249
4259
  throw Error(`JSX namespaced elements are not supported. Found ${r.getText(e.sourceFile)} `);
4250
4260
  if (!o.isIdentifier(r) || !r.text.startsWith(r.text[0].toLowerCase()) && r.text !== Be && r.text !== Ke) {
4251
- const S = o.isIdentifier(r) && r.text === tr ? Te(i, e) : {
4261
+ const C = o.isIdentifier(r) && r.text === Qs ? Te(i, e) : {
4252
4262
  // No need to wrap the function call in a lit-html tag
4253
4263
  litTag: void 0,
4254
- parts: [Vo(e, t, r, i)]
4264
+ parts: [qo(e, t, r, i)]
4255
4265
  };
4256
4266
  return {
4257
- key: qo(n, e),
4258
- ...S
4267
+ key: zo(n, e),
4268
+ ...C
4259
4269
  };
4260
4270
  }
4261
- const c = r.text === Be ? ke : r.text === Ke ? Ye : r.text, d = r.text === Be ? ae : r.text === Ke ? Y : sr.has(c) ? vi : lt.has(c) ? se : ce, l = pt(c), p = l ? e.localComponents[c]?.requiredProperties : void 0, m = p === void 0 ? void 0 : new Set(p);
4271
+ const l = r.text === Be ? ke : r.text === Ke ? Ye : r.text, d = r.text === Be ? ae : r.text === Ke ? X : er.has(l) ? yi : lt.has(l) ? se : ce, c = pt(l), p = c ? e.localComponents[l]?.requiredProperties : void 0, m = p === void 0 ? void 0 : new Set(p);
4262
4272
  let f;
4263
4273
  const g = [];
4264
4274
  let h = !1;
@@ -4268,43 +4278,43 @@ function us(e, t) {
4268
4278
  `JSX spread attribute syntax is not supported. See alternatives: https://webgis.esri.com/references/lumina/jsx#spread-attributes
4269
4279
  Found ${x.getText(e.sourceFile)}`
4270
4280
  );
4271
- const { name: S, initializer: A } = x;
4272
- if (o.isJsxNamespacedName(S))
4273
- throw Error(`JSX namespaced attributes are not supported. Found ${S.getText(e.sourceFile)}`);
4274
- const L = S.text, U = Lo(A), F = U?.propType ?? No(L, A, c);
4275
- m?.delete(L);
4276
- const N = ko[F](e, U?.initializer ?? A, L, c);
4281
+ const { name: C, initializer: L } = x;
4282
+ if (o.isJsxNamespacedName(C))
4283
+ throw Error(`JSX namespaced attributes are not supported. Found ${C.getText(e.sourceFile)}`);
4284
+ const A = C.text, M = xo(L), j = M?.propType ?? Ao(A, L, l);
4285
+ m?.delete(A);
4286
+ const N = $o[j](e, M?.initializer ?? L, A, l);
4277
4287
  if (N.length === 0)
4278
4288
  return [];
4279
- const B = e.compiler.shouldMinifyJsx ? [" "] : Mo(ns(S, e));
4280
- return F === "key" ? (f = typeof N[0] == "object" && !ds(S, e) ? N[0] : void 0, B.some(Do) ? B : []) : F === "directives" || F === "ref" || L === "deferLoad" ? (h ||= F === "deferLoad", g.push(
4281
- ...B,
4289
+ const K = e.compiler.shouldMinifyJsx ? [" "] : Ro(rs(C, e));
4290
+ return j === "key" ? (f = typeof N[0] == "object" && !ls(C, e) ? N[0] : void 0, K.some(jo) ? K : []) : j === "directives" || j === "ref" || A === "deferLoad" ? (h ||= j === "deferLoad", g.push(
4291
+ ...K,
4282
4292
  ...N.flatMap(
4283
- (R, M) => typeof R == "string" || M === 0 || typeof N[M - 1] == "string" ? R : [" ", R]
4293
+ (R, J) => typeof R == "string" || J === 0 || typeof N[J - 1] == "string" ? R : [" ", R]
4284
4294
  )
4285
- ), []) : [...B, ...N];
4295
+ ), []) : [...K, ...N];
4286
4296
  });
4287
4297
  if (m !== void 0 && m.size > 0 && e.compiler.logLintError(
4288
4298
  "mustIncludeAllRequiredProperties",
4289
4299
  e.sourceFile.fileName,
4290
- `Missing required properties for <${c}> }: ${Array.from(m).join(", ")}`
4291
- ), g.length > 0 && y.push(...g), typeof c == "string" && dt.has(c))
4300
+ `Missing required properties for <${l}> }: ${Array.from(m).join(", ")}`
4301
+ ), g.length > 0 && y.push(...g), typeof l == "string" && dt.has(l))
4292
4302
  throw Error(
4293
- `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`
4303
+ `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 "${l}" element`
4294
4304
  );
4295
- l && (h ? e.customElementsToImportDeferred.add(c) : e.customElementsToImport.add(c));
4296
- const v = typeof c == "string" && ir.has(c), w = Te(i, e);
4305
+ c && (h ? e.customElementsToImportDeferred.add(l) : e.customElementsToImport.add(l));
4306
+ const v = typeof l == "string" && Zs.has(l), w = Te(i, e);
4297
4307
  if (v && w.parts.length > 0)
4298
4308
  throw Error(
4299
- `Void HTML elements like <${c}> cannot have children. Found ${t.getText(e.sourceFile)}`
4309
+ `Void HTML elements like <${l}> cannot have children. Found ${t.getText(e.sourceFile)}`
4300
4310
  );
4301
- const C = (d === se || d === Y) && w.parts.length === 0, E = [
4311
+ const S = (d === se || d === X) && w.parts.length === 0, T = [
4302
4312
  "<",
4303
- typeof c == "string" ? c : r,
4313
+ typeof l == "string" ? l : r,
4304
4314
  ...y,
4305
- C ? `${y.length === 0 ? "" : " "}/>` : ">"
4306
- ], P = v || C ? E : [
4307
- ...E,
4315
+ S ? `${y.length === 0 ? "" : " "}/>` : ">"
4316
+ ], E = v || S ? T : [
4317
+ ...T,
4308
4318
  /**
4309
4319
  * If parent was an HTML element (e.g. `<svg>`), but children are SVG
4310
4320
  * fragments (e.g. `<circle />`, then wrap the children in their own
@@ -4312,48 +4322,48 @@ Found ${x.getText(e.sourceFile)}`
4312
4322
  */
4313
4323
  ...w.litTag !== void 0 && w.litTag !== d ? [Oe({ key: void 0, ...w }, e)] : w.parts,
4314
4324
  "</",
4315
- typeof c == "string" ? c : r,
4325
+ typeof l == "string" ? l : r,
4316
4326
  ">"
4317
4327
  ];
4318
- return { key: f, parts: P, litTag: d };
4328
+ return { key: f, parts: E, litTag: d };
4319
4329
  }
4320
- function qo(e, t) {
4321
- const i = e.attributes.properties[ms(e)];
4322
- return i && o.isJsxAttribute(i) && !ds(i.name, t) ? yt(i.initializer, t.sourceFile) : void 0;
4330
+ function zo(e, t) {
4331
+ const i = e.attributes.properties[us(e)];
4332
+ return i && o.isJsxAttribute(i) && !ls(i.name, t) ? yt(i.initializer, t.sourceFile) : void 0;
4323
4333
  }
4324
- const ms = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
4325
- function Vo(e, t, i, s) {
4334
+ const us = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
4335
+ function qo(e, t, i, s) {
4326
4336
  const r = (o.isJsxElement(t) ? t.openingElement : t).attributes.properties.map((d) => {
4327
4337
  if (o.isJsxSpreadAttribute(d))
4328
- return os(ns(d, e), o.factory.createSpreadAssignment(d.expression));
4329
- const { name: l, initializer: p } = d;
4330
- if (o.isJsxNamespacedName(l))
4331
- throw Error(`JSX namespaced attributes are not supported. Found ${l.getText(e.sourceFile)}`);
4332
- if (l.text === "key")
4338
+ return ns(rs(d, e), o.factory.createSpreadAssignment(d.expression));
4339
+ const { name: c, initializer: p } = d;
4340
+ if (o.isJsxNamespacedName(c))
4341
+ throw Error(`JSX namespaced attributes are not supported. Found ${c.getText(e.sourceFile)}`);
4342
+ if (c.text === "key")
4333
4343
  return;
4334
- const m = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : fe(p) ? ps(e, p) : q(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), f = di(l.text) ? o.factory.createStringLiteral(l.text) : l;
4344
+ const m = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : fe(p) ? ds(e, p) : H(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), f = li(c.text) ? o.factory.createStringLiteral(c.text) : c;
4335
4345
  return o.factory.createPropertyAssignment(f, m);
4336
- }), { parts: a, litTag: c } = Te(s, e);
4346
+ }), { parts: a, litTag: l } = Te(s, e);
4337
4347
  return a.length > 0 && r.push(
4338
4348
  o.factory.createPropertyAssignment(
4339
4349
  o.factory.createIdentifier("children"),
4340
- Oe({ key: void 0, parts: a, litTag: c }, e)
4350
+ Oe({ key: void 0, parts: a, litTag: l }, e)
4341
4351
  )
4342
4352
  ), o.factory.createCallExpression(i, void 0, [
4343
- o.factory.createObjectLiteralExpression(r.filter(D))
4353
+ o.factory.createObjectLiteralExpression(r.filter(F))
4344
4354
  ]);
4345
4355
  }
4346
4356
  function Te(e, t) {
4347
4357
  let i;
4348
4358
  const s = e.flatMap((n) => {
4349
4359
  if (o.isJsxText(n))
4350
- return [t.compiler.shouldMinifyJsx ? nr(n.text) : n.text];
4360
+ return [t.compiler.shouldMinifyJsx ? ir(n.text) : n.text];
4351
4361
  if (o.isJsxExpression(n))
4352
4362
  return bt(t, n, n);
4353
4363
  {
4354
- const r = us(t, n);
4355
- if (r.key === void 0 && r.litTag !== ae && r.litTag !== Y) {
4356
- if (r.litTag === vi)
4364
+ const r = ps(t, n);
4365
+ if (r.key === void 0 && r.litTag !== ae && r.litTag !== X) {
4366
+ if (r.litTag === yi)
4357
4367
  return r.parts;
4358
4368
  if (i !== void 0 && r.litTag !== void 0 && i !== r.litTag)
4359
4369
  throw new Error(
@@ -4366,7 +4376,7 @@ function Te(e, t) {
4366
4376
  });
4367
4377
  return { litTag: i, parts: s };
4368
4378
  }
4369
- function Go(e) {
4379
+ function Ho(e) {
4370
4380
  return e.operatorToken.kind === o.SyntaxKind.AmpersandAmpersandToken ? o.factory.createBinaryExpression(
4371
4381
  e,
4372
4382
  o.factory.createToken(o.SyntaxKind.BarBarToken),
@@ -4378,9 +4388,9 @@ function bt(e, t, i) {
4378
4388
  if (e.compiler.shouldMinifyJsx)
4379
4389
  return [];
4380
4390
  const s = t.getText(e.sourceFile).slice(1, -1);
4381
- return vt(s).length === 0 ? [] : [os(s, o.factory.createIdentifier("undefined"))];
4391
+ return vt(s).length === 0 ? [] : [ns(s, o.factory.createIdentifier("undefined"))];
4382
4392
  }
4383
- return o.isStringLiteral(t.expression) ? [yi(t.expression.text)] : (
4393
+ return o.isStringLiteral(t.expression) ? [hi(t.expression.text)] : (
4384
4394
  /**
4385
4395
  * There is a bug in Chrome DevTools, where it won't let you set a
4386
4396
  * breakpoint inside a tagged template literal. It seems like they did
@@ -4401,7 +4411,7 @@ function bt(e, t, i) {
4401
4411
  * making this change useless.
4402
4412
  */
4403
4413
  e.compiler.viteCommand === "serve" && e.compiler.viteConfig.build.sourcemap !== !1 && !e.compiler.shouldMinifyJsx && o.isArrowFunction(t.expression) && !o.isBlock(t.expression.body) ? [
4404
- q(
4414
+ H(
4405
4415
  e,
4406
4416
  i,
4407
4417
  o.factory.updateArrowFunction(
@@ -4414,29 +4424,29 @@ function bt(e, t, i) {
4414
4424
  o.factory.createBlock([o.factory.createReturnStatement(t.expression.body)], !0)
4415
4425
  )
4416
4426
  )
4417
- ] : [q(e, i, t.expression)]
4427
+ ] : [H(e, i, t.expression)]
4418
4428
  );
4419
4429
  }
4420
- const fs = (e) => e.reduce((t, [i, s]) => (t[i] ??= [], t[i].push(s), t), {}), gs = fs(
4430
+ const ms = (e) => e.reduce((t, [i, s]) => (t[i] ??= [], t[i].push(s), t), {}), fs = ms(
4421
4431
  Object.entries(re).flatMap(
4422
4432
  ([e, t]) => t.map((i) => [i, e])
4423
4433
  )
4424
- ), hs = new Set(Object.keys(gs));
4425
- function Xo(e, t) {
4434
+ ), gs = new Set(Object.keys(fs));
4435
+ function Vo(e, t) {
4426
4436
  const i = t.importClause, s = i === void 0, n = t.moduleSpecifier;
4427
4437
  if (!o.isStringLiteral(n))
4428
4438
  return t;
4429
- const r = Yo(e.sourceFile.fileName, n.text, ""), a = i?.phaseModifier !== o.SyntaxKind.TypeKeyword;
4430
- if (a && e.existingImportedModules.add(r), br.test(n.text) && // If id already includes ?, bypass our custom behavior
4439
+ const r = Go(e.sourceFile.fileName, n.text, ""), a = i?.phaseModifier !== o.SyntaxKind.TypeKeyword;
4440
+ if (a && e.existingImportedModules.add(r), hr.test(n.text) && // If id already includes ?, bypass our custom behavior
4431
4441
  !n.text.includes("?")) {
4432
4442
  if (s) {
4433
4443
  if (e.compiler.viteCommand !== "build" || e.compiler.isInStorybook || e.compiler.isInTest)
4434
4444
  return t;
4435
- const l = e.sourceFile.fileName, p = l.includes("/node_modules/") || l.includes("/dist/"), m = `import "${n.text}"`;
4445
+ const c = e.sourceFile.fileName, p = c.includes("/node_modules/") || c.includes("/dist/"), m = `import "${n.text}"`;
4436
4446
  throw Error(
4437
- p ? `Unexpected case: during build, all node_modules runtime dependencies should be externalized (unless explicitly configured otherwise). ${l} is not externalized, and it contains a side-effect CSS import \`${m}\`. How should such CSS import be handled? Options:
4438
- 1. (suggested) Externalize ${l}, which will make end-user's bundler treat this CSS import as global CSS.
4439
- 2. Write a transform() plugin to drop the CSS import from ${l}, and then manually import the CSS as needed inside your shadow root or your library's global CSS file.` : `${l}: Found a side-effect CSS import \`${m}\`. Such import is not allowed as it won't work with shadow DOM. Please use \`import { styles } from "${n.text}";\` instead and then add \`static override styles = styles;\` to your component. If this needs to be global CSS, @import it inside your global CSS file`
4447
+ p ? `Unexpected case: during build, all node_modules runtime dependencies should be externalized (unless explicitly configured otherwise). ${c} is not externalized, and it contains a side-effect CSS import \`${m}\`. How should such CSS import be handled? Options:
4448
+ 1. (suggested) Externalize ${c}, which will make end-user's bundler treat this CSS import as global CSS.
4449
+ 2. Write a transform() plugin to drop the CSS import from ${c}, and then manually import the CSS as needed inside your shadow root or your library's global CSS file.` : `${c}: Found a side-effect CSS import \`${m}\`. Such import is not allowed as it won't work with shadow DOM. Please use \`import { styles } from "${n.text}";\` instead and then add \`static override styles = styles;\` to your component. If this needs to be global CSS, @import it inside your global CSS file`
4440
4450
  );
4441
4451
  }
4442
4452
  return o.factory.updateImportDeclaration(
@@ -4447,40 +4457,40 @@ function Xo(e, t) {
4447
4457
  // runs for .tsx files, so .css imports in .ts files won't work. However,
4448
4458
  // that is unlikely for web component libraries. A workaround is to
4449
4459
  // rename the file or explicitly add (undocumented) ?litCss flag
4450
- o.factory.createStringLiteral(n.text + (e.isInLightDomComponent ? Q : Ie)),
4460
+ o.factory.createStringLiteral(n.text + (e.isInLightDomComponent ? Y : Ie)),
4451
4461
  t.attributes
4452
4462
  );
4453
4463
  }
4454
4464
  if (s)
4455
4465
  return t;
4456
4466
  if (i.name !== void 0) {
4457
- const l = i.name.text, p = i.name.text.startsWith(l[0].toUpperCase()), m = u.isAbsolute(r);
4467
+ const c = i.name.text, p = i.name.text.startsWith(c[0].toUpperCase()), m = u.isAbsolute(r);
4458
4468
  a && p && m && e.importedFunctionComponentsFromModules.add(r);
4459
4469
  }
4460
- const c = i.namedBindings;
4461
- if (c === void 0 || !o.isNamedImports(c))
4470
+ const l = i.namedBindings;
4471
+ if (l === void 0 || !o.isNamedImports(l))
4462
4472
  return t;
4463
- const d = hs.has(n.text);
4464
- if (c.elements.forEach((l) => {
4465
- const p = (l.propertyName ?? l.name).text, m = re[p];
4473
+ const d = gs.has(n.text);
4474
+ if (l.elements.forEach((c) => {
4475
+ const p = (c.propertyName ?? c.name).text, m = re[p];
4466
4476
  if (d) {
4467
4477
  if (m?.some((h) => h === n.text)) {
4468
- const h = ys(p, r);
4469
- e.existingLitImports.add(h), e.importRenames[h] = l.name?.text ?? h;
4478
+ const h = hs(p, r);
4479
+ e.existingLitImports.add(h), e.importRenames[h] = c.name?.text ?? h;
4470
4480
  }
4471
- } else (l.name.text === "h" || l.name.text === "createElement") && j().name !== "@arcgis/lumina" && (e.hasNonLuminaJsxImport = !0);
4481
+ } else (c.name.text === "h" || c.name.text === "createElement") && D().name !== "@arcgis/lumina" && (e.hasNonLuminaJsxImport = !0);
4472
4482
  const f = p.startsWith(p[0].toUpperCase()), g = u.isAbsolute(r);
4473
- a && !l.isTypeOnly && f && g && e.importedFunctionComponentsFromModules.add(r);
4483
+ a && !c.isTypeOnly && f && g && e.importedFunctionComponentsFromModules.add(r);
4474
4484
  }), n.text === "@arcgis/lumina") {
4475
- let l = !1;
4476
- const p = c.elements.filter((f) => {
4485
+ let c = !1;
4486
+ const p = l.elements.filter((f) => {
4477
4487
  const g = (f.propertyName ?? f.name).text;
4478
- return vr.has(g) ? !1 : (l ||= !f.isTypeOnly, !0);
4488
+ return gr.has(g) ? !1 : (c ||= !f.isTypeOnly, !0);
4479
4489
  });
4480
4490
  if (p.length === 0)
4481
4491
  return;
4482
- if (p.length !== c.elements.length) {
4483
- const f = i.phaseModifier === o.SyntaxKind.TypeKeyword || !l, g = l ? p : p.map(
4492
+ if (p.length !== l.elements.length) {
4493
+ const f = i.phaseModifier === o.SyntaxKind.TypeKeyword || !c, g = c ? p : p.map(
4484
4494
  (h) => o.factory.updateImportSpecifier(
4485
4495
  h,
4486
4496
  !1,
@@ -4495,7 +4505,7 @@ function Xo(e, t) {
4495
4505
  i,
4496
4506
  f ? o.SyntaxKind.TypeKeyword : void 0,
4497
4507
  i.name,
4498
- o.factory.updateNamedImports(c, g)
4508
+ o.factory.updateNamedImports(l, g)
4499
4509
  ),
4500
4510
  t.moduleSpecifier,
4501
4511
  t.attributes
@@ -4504,22 +4514,22 @@ function Xo(e, t) {
4504
4514
  }
4505
4515
  return t;
4506
4516
  }
4507
- const ys = (e, t) => e === ce && re.staticHtml.includes(t) ? ae : e === se && re.staticSvg.includes(t) ? Y : e, Yo = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
4508
- function Qo(e) {
4509
- return o.isImportDeclaration(e) ? Zo(this, e) : e;
4517
+ const hs = (e, t) => e === ce && re.staticHtml.includes(t) ? ae : e === se && re.staticSvg.includes(t) ? X : e, Go = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
4518
+ function Xo(e) {
4519
+ return o.isImportDeclaration(e) ? Yo(this, e) : e;
4510
4520
  }
4511
- function Zo(e, t) {
4521
+ function Yo(e, t) {
4512
4522
  const i = t.importClause, s = i?.namedBindings, n = t.moduleSpecifier;
4513
- if (!o.isStringLiteral(n) || !s || !o.isNamedImports(s) || !hs.has(n.text))
4523
+ if (!o.isStringLiteral(n) || !s || !o.isNamedImports(s) || !gs.has(n.text))
4514
4524
  return t;
4515
4525
  const r = i.phaseModifier === o.SyntaxKind.TypeKeyword;
4516
4526
  let a = !1;
4517
- const c = s.elements.map((d) => {
4518
- const l = (d.propertyName ?? d.name).text, p = ys(l, n.text);
4527
+ const l = s.elements.map((d) => {
4528
+ const c = (d.propertyName ?? d.name).text, p = hs(c, n.text);
4519
4529
  return e.existingLitImports.delete(p), e.neededImports.has(p) ? (e.neededImports.delete(p), a = !0, o.factory.updateImportSpecifier(d, !1, d.propertyName, d.name)) : r ? o.factory.updateImportSpecifier(d, !0, d.propertyName, d.name) : d;
4520
4530
  });
4521
- return gs[n.text]?.forEach((d) => {
4522
- !e.neededImports.has(d) || e.existingLitImports.has(d) || (e.neededImports.delete(d), a = !0, c.push(vs(d, e)));
4531
+ return fs[n.text]?.forEach((d) => {
4532
+ !e.neededImports.has(d) || e.existingLitImports.has(d) || (e.neededImports.delete(d), a = !0, l.push(ys(d, e)));
4523
4533
  }), a ? o.factory.updateImportDeclaration(
4524
4534
  t,
4525
4535
  t.modifiers,
@@ -4527,14 +4537,14 @@ function Zo(e, t) {
4527
4537
  i,
4528
4538
  void 0,
4529
4539
  i.name,
4530
- o.factory.updateNamedImports(s, c)
4540
+ o.factory.updateNamedImports(s, l)
4531
4541
  ),
4532
4542
  t.moduleSpecifier,
4533
4543
  t.attributes
4534
4544
  ) : t;
4535
4545
  }
4536
- function ea(e) {
4537
- const t = fs(
4546
+ function Qo(e) {
4547
+ const t = ms(
4538
4548
  Array.from(e.neededImports, (i) => [re[i][0], i])
4539
4549
  );
4540
4550
  return Object.entries(t).map(
@@ -4544,27 +4554,27 @@ function ea(e) {
4544
4554
  void 0,
4545
4555
  void 0,
4546
4556
  o.factory.createNamedImports(
4547
- s.map((n) => (e.neededImports.delete(n), vs(n, e)))
4557
+ s.map((n) => (e.neededImports.delete(n), ys(n, e)))
4548
4558
  )
4549
4559
  ),
4550
4560
  o.factory.createStringLiteral(i)
4551
4561
  )
4552
4562
  );
4553
4563
  }
4554
- function vs(e, t) {
4555
- const i = e === ae ? ce : e === Y ? se : e, s = t.importRenames[e];
4564
+ function ys(e, t) {
4565
+ const i = e === ae ? ce : e === X ? se : e, s = t.importRenames[e];
4556
4566
  return s === i ? o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(i)) : o.factory.createImportSpecifier(
4557
4567
  !1,
4558
4568
  o.factory.createIdentifier(i),
4559
4569
  o.factory.createIdentifier(s)
4560
4570
  );
4561
4571
  }
4562
- function ta(e) {
4563
- const t = Br().map(({ packageName: i }) => i);
4572
+ function Zo(e) {
4573
+ const t = Or().map(({ packageName: i }) => i);
4564
4574
  return e.existingImportedModules.forEach((i) => {
4565
4575
  if (u.isAbsolute(i))
4566
4576
  return;
4567
- const s = Zs(i), n = i.slice(s.length + 1);
4577
+ const s = Xs(i), n = i.slice(s.length + 1);
4568
4578
  if (t.includes(s ?? "") && (n.startsWith("dist/components") || n.startsWith("components"))) {
4569
4579
  const r = De(e.sourceFile.fileName);
4570
4580
  throw new Error(
@@ -4573,7 +4583,7 @@ function ta(e) {
4573
4583
  }
4574
4584
  }), [];
4575
4585
  }
4576
- function ia(e) {
4586
+ function ea(e) {
4577
4587
  if (e.compiler.viteCommand === "serve")
4578
4588
  return e.customElementsToImport.clear(), e.customElementsToImportDeferred.clear(), [];
4579
4589
  const t = e.compiler._customElementDependencies;
@@ -4588,15 +4598,15 @@ function ia(e) {
4588
4598
  t[s] ??= { referencedBy: [], referencedTagNames: [], referencedDeferredTagNames: [] }, t[s].referencedBy.push(e.sourceFile.fileName);
4589
4599
  }), [];
4590
4600
  }
4591
- const sa = (e, t) => {
4601
+ const ta = (e, t) => {
4592
4602
  const i = e.pragmas;
4593
4603
  if (i?.has("jsx") === !0 || i?.has("jsxImportSource") === !0)
4594
4604
  return e.statements;
4595
4605
  let s = !1, n;
4596
4606
  if (t.apiModule !== void 0) {
4597
4607
  const d = t.apiModule.declarations;
4598
- for (let l = 0; l < d.length; ++l) {
4599
- const p = d[l];
4608
+ for (let c = 0; c < d.length; ++c) {
4609
+ const p = d[c];
4600
4610
  if (p.customElement === !0) {
4601
4611
  const m = p;
4602
4612
  s = m.encapsulation !== void 0;
@@ -4608,11 +4618,11 @@ const sa = (e, t) => {
4608
4618
  }
4609
4619
  const r = {
4610
4620
  compiler: t.compiler,
4611
- externalComponents: xi(),
4612
- localComponents: ss(t.compiler),
4621
+ externalComponents: Ii(),
4622
+ localComponents: is(t.compiler),
4613
4623
  sourceFile: e,
4614
4624
  transformationContext: t.transformation,
4615
- importRenames: ra(e),
4625
+ importRenames: ia(e),
4616
4626
  existingImportedModules: /* @__PURE__ */ new Set(),
4617
4627
  importedFunctionComponentsFromModules: /* @__PURE__ */ new Set(),
4618
4628
  existingLitImports: /* @__PURE__ */ new Set(),
@@ -4626,41 +4636,41 @@ const sa = (e, t) => {
4626
4636
  let a = [];
4627
4637
  if (e.statements.every((d) => {
4628
4638
  if (o.isImportDeclaration(d)) {
4629
- const l = Xo(r, d);
4630
- if (l === void 0)
4639
+ const c = Vo(r, d);
4640
+ if (c === void 0)
4631
4641
  return !0;
4632
- if (a.push(l), r.hasNonLuminaJsxImport)
4642
+ if (a.push(c), r.hasNonLuminaJsxImport)
4633
4643
  return !1;
4634
4644
  } else
4635
- a.push(q(r, void 0, d));
4645
+ a.push(H(r, void 0, d));
4636
4646
  return !0;
4637
4647
  }), r.hasNonLuminaJsxImport)
4638
4648
  return e.statements;
4639
- if (r.neededImports.size > 0 && (a = a.map(Qo, r), r.existingLitImports.size > 0))
4649
+ if (r.neededImports.size > 0 && (a = a.map(Xo, r), r.existingLitImports.size > 0))
4640
4650
  throw new Error(
4641
4651
  `Expected context.existingLitImports to be empty by now. Found: ${Array.from(r.existingLitImports).join(", ")}`
4642
4652
  );
4643
- const c = [ea, ta, ia].flatMap(
4653
+ const l = [Qo, Zo, ea].flatMap(
4644
4654
  (d) => d(r)
4645
4655
  );
4646
4656
  if (r.neededImports.size > 0)
4647
4657
  throw new Error(
4648
4658
  `Expected context.neededLitImports to be empty by now. Found: ${Array.from(r.neededImports).join(", ")}`
4649
4659
  );
4650
- return [...c, ...a];
4660
+ return [...l, ...a];
4651
4661
  };
4652
- function ra(e) {
4653
- return na(e), Object.fromEntries(
4654
- hr.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4662
+ function ia(e) {
4663
+ return sa(e), Object.fromEntries(
4664
+ mr.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4655
4665
  );
4656
4666
  }
4657
- function na(e) {
4667
+ function sa(e) {
4658
4668
  if (!("identifiers" in e))
4659
4669
  throw new Error(
4660
4670
  "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."
4661
4671
  );
4662
4672
  }
4663
- const Zt = "customElement", oa = (e, t) => {
4673
+ const Zt = "customElement", ra = (e, t) => {
4664
4674
  const i = [];
4665
4675
  if (t.apiModule?.declarations.forEach((r) => {
4666
4676
  const a = r;
@@ -4690,7 +4700,7 @@ const Zt = "customElement", oa = (e, t) => {
4690
4700
  o.factory.createStringLiteral(s)
4691
4701
  ), ...e.statements, ...i];
4692
4702
  };
4693
- function aa(e, t, i) {
4703
+ function na(e, t, i) {
4694
4704
  return t.size === 0 ? e : [
4695
4705
  o.factory.createPropertyDeclaration(
4696
4706
  [
@@ -4704,8 +4714,8 @@ function aa(e, t, i) {
4704
4714
  Array.from(
4705
4715
  t.entries(),
4706
4716
  ([s, n]) => o.factory.createPropertyAssignment(
4707
- di(s) ? o.factory.createStringLiteral(s) : s,
4708
- ca(n, i)
4717
+ li(s) ? o.factory.createStringLiteral(s) : s,
4718
+ oa(n, i)
4709
4719
  )
4710
4720
  )
4711
4721
  )
@@ -4713,7 +4723,7 @@ function aa(e, t, i) {
4713
4723
  ...e
4714
4724
  ];
4715
4725
  }
4716
- function ca(e, t) {
4726
+ function oa(e, t) {
4717
4727
  let i = 0, s = !0;
4718
4728
  const n = [], r = [];
4719
4729
  for (const d of e.properties)
@@ -4721,32 +4731,32 @@ function ca(e, t) {
4721
4731
  function a(d) {
4722
4732
  if (!o.isPropertyAssignment(d) || !o.isIdentifier(d.name))
4723
4733
  return !0;
4724
- const l = d.name.text, p = d.initializer, m = p.kind === o.SyntaxKind.TrueKeyword, f = p.kind === o.SyntaxKind.FalseKeyword;
4725
- if (l === "attribute")
4734
+ const c = d.name.text, p = d.initializer, m = p.kind === o.SyntaxKind.TrueKeyword, f = p.kind === o.SyntaxKind.FalseKeyword;
4735
+ if (c === "attribute")
4726
4736
  return s = !1, i |= m ? Tt : 0, !m && !f;
4727
- if (l === "reflect")
4728
- return i |= m ? Is : 0, !1;
4729
- if (l === "type" && o.isIdentifier(p)) {
4737
+ if (c === "reflect")
4738
+ return i |= m ? Ps : 0, !1;
4739
+ if (c === "type" && o.isIdentifier(p)) {
4730
4740
  if (p.text === "Boolean")
4731
- return i |= xs, !1;
4741
+ return i |= ks, !1;
4732
4742
  if (p.text === "Number")
4733
- return i |= As, !1;
4743
+ return i |= Is, !1;
4734
4744
  } else {
4735
- if (l === "state")
4736
- return s = !1, i |= m ? Ls : 0, !1;
4737
- if (l === "readOnly")
4745
+ if (c === "state")
4746
+ return s = !1, i |= m ? xs : 0, !1;
4747
+ if (c === "readOnly")
4748
+ return i |= m ? As : 0, !1;
4749
+ if (c === "noAccessor")
4750
+ return i |= m ? Ls : 0, !1;
4751
+ if (c === "useDefault")
4738
4752
  return i |= m ? Ns : 0, !1;
4739
- if (l === "noAccessor")
4740
- return i |= m ? js : 0, !1;
4741
- if (l === "useDefault")
4742
- return i |= m ? Fs : 0, !1;
4743
4753
  }
4744
4754
  return !0;
4745
4755
  }
4746
4756
  s && (i |= Tt);
4747
- const c = o.factory.createNumericLiteral(i);
4748
- return n.length === 0 && (t || r.length === 0) ? c : o.factory.createArrayLiteralExpression([
4749
- c,
4757
+ const l = o.factory.createNumericLiteral(i);
4758
+ return n.length === 0 && (t || r.length === 0) ? l : o.factory.createArrayLiteralExpression([
4759
+ l,
4750
4760
  o.factory.createObjectLiteralExpression(n),
4751
4761
  /**
4752
4762
  * In dev mode, to improve readability for non-source-map developers,
@@ -4758,7 +4768,7 @@ function ca(e, t) {
4758
4768
  ...t ? [] : [o.factory.createObjectLiteralExpression(r)]
4759
4769
  ]);
4760
4770
  }
4761
- function la(e, t, i) {
4771
+ function aa(e, t, i) {
4762
4772
  let s = -1, n = -1, r = -1;
4763
4773
  e.options?.properties.forEach((p, m) => {
4764
4774
  if (o.isSpreadAssignment(p))
@@ -4770,23 +4780,23 @@ function la(e, t, i) {
4770
4780
  f === "type" ? s = m : f === "attribute" ? n = m : f === "readOnly" && (r = m);
4771
4781
  }
4772
4782
  });
4773
- const a = i.attribute === void 0 && n === -1, c = i.readonly === !0 && i.docsOnlyReadonly !== !0 && r === -1, d = da(e, i, s), l = [
4783
+ const a = i.attribute === void 0 && n === -1, l = i.readonly === !0 && i.docsOnlyReadonly !== !0 && r === -1, d = ca(e, i, s), c = [
4774
4784
  ...a ? [o.factory.createPropertyAssignment("attribute", o.factory.createFalse())] : [],
4775
- ...c ? [o.factory.createPropertyAssignment("readOnly", o.factory.createTrue())] : [],
4785
+ ...l ? [o.factory.createPropertyAssignment("readOnly", o.factory.createTrue())] : [],
4776
4786
  ...d !== void 0 ? [d] : []
4777
4787
  ];
4778
- return l.length > 0 ? e.options === void 0 ? o.factory.createObjectLiteralExpression(l, !1) : o.factory.updateObjectLiteralExpression(e.options, [...e.options.properties, ...l]) : e.options;
4788
+ return c.length > 0 ? e.options === void 0 ? o.factory.createObjectLiteralExpression(c, !1) : o.factory.updateObjectLiteralExpression(e.options, [...e.options.properties, ...c]) : e.options;
4779
4789
  }
4780
- function da(e, t, i) {
4790
+ function ca(e, t, i) {
4781
4791
  if (t.attribute === void 0)
4782
4792
  return;
4783
- const s = pa(t.type.values);
4793
+ const s = la(t.type.values);
4784
4794
  return s === "Other" || t.readonly === !0 && (s !== "Boolean" || t.reflects === void 0) || e.options?.properties[i] !== void 0 ? void 0 : o.factory.createPropertyAssignment(
4785
4795
  o.factory.createIdentifier("type"),
4786
4796
  o.factory.createIdentifier(s)
4787
4797
  );
4788
4798
  }
4789
- function pa(e) {
4799
+ function la(e) {
4790
4800
  let t = !1, i = !1, s = !1;
4791
4801
  if (e?.forEach((n) => {
4792
4802
  t ||= n.type === "number", i ||= n.type === "boolean", s ||= n.type === "string" || n.type === "any" || n.type === "unknown";
@@ -4798,50 +4808,50 @@ function pa(e) {
4798
4808
  }
4799
4809
  return "Other";
4800
4810
  }
4801
- function ua(e, t, i, s, n, r) {
4811
+ function da(e, t, i, s, n, r) {
4802
4812
  if (i.modifiers === void 0)
4803
4813
  return i;
4804
- let a = -1, c = -1;
4805
- if (i.modifiers.forEach((d, l) => {
4814
+ let a = -1, l = -1;
4815
+ if (i.modifiers.forEach((d, c) => {
4806
4816
  if (o.isDecorator(d) && o.isCallExpression(d.expression) && o.isIdentifier(d.expression.expression)) {
4807
4817
  const p = d.expression.expression.text;
4808
- p === "property" && (a = l), p === "state" && (c = l);
4818
+ p === "property" && (a = c), p === "state" && (l = c);
4809
4819
  }
4810
4820
  }), a !== -1) {
4811
- const d = ma(e, t, i, s, n), l = ei(i, a, n), p = la(l, n, d);
4812
- return r.set(d.name, p ?? o.factory.createObjectLiteralExpression()), l.options = p, ti(i, a);
4813
- } else if (c !== -1) {
4814
- const d = ei(i, c, n), l = o.factory.createPropertyAssignment("state", o.factory.createTrue()), p = d.options === void 0 ? o.factory.createObjectLiteralExpression([l]) : o.factory.updateObjectLiteralExpression(d.options, [...d.options.properties, l]), m = pi(i.name);
4821
+ const d = pa(e, t, i, s, n), c = ei(i, a, n), p = aa(c, n, d);
4822
+ return r.set(d.name, p ?? o.factory.createObjectLiteralExpression()), c.options = p, ti(i, a);
4823
+ } else if (l !== -1) {
4824
+ const d = ei(i, l, n), c = o.factory.createPropertyAssignment("state", o.factory.createTrue()), p = d.options === void 0 ? o.factory.createObjectLiteralExpression([c]) : o.factory.updateObjectLiteralExpression(d.options, [...d.options.properties, c]), m = di(i.name);
4815
4825
  if (m === void 0)
4816
4826
  throw new Error("Failed to statically determine the state property name");
4817
- return r.set(m, p), ti(i, c);
4827
+ return r.set(m, p), ti(i, l);
4818
4828
  } else
4819
4829
  return i;
4820
4830
  }
4821
- function ma(e, t, i, s, n) {
4831
+ function pa(e, t, i, s, n) {
4822
4832
  const r = t ?? (e.compiler.isInTest ? {
4823
4833
  members: []
4824
4834
  } : void 0);
4825
4835
  if (r === void 0)
4826
4836
  throw Error(`Failed to find API component for ${s} in ${n.fileName}`);
4827
- const a = pi(i.name);
4828
- let c;
4837
+ const a = di(i.name);
4838
+ let l;
4829
4839
  for (let d = 0; d < r.members.length; ++d) {
4830
- const l = r.members[d];
4831
- l.name === a && l.kind === "field" && (c = l);
4840
+ const c = r.members[d];
4841
+ c.name === a && c.kind === "field" && (l = c);
4832
4842
  }
4833
- if (c ??= e.compiler.isInTest ? { kind: "field", attribute: "", name: "", type: { text: "" } } : void 0, c === void 0)
4843
+ if (l ??= e.compiler.isInTest ? { kind: "field", attribute: "", name: "", type: { text: "" } } : void 0, l === void 0)
4834
4844
  throw Error(
4835
4845
  `Failed to find API property for ${i.getText(n)} in ${s} in ${n.fileName}`
4836
4846
  );
4837
- if (c.name === "") {
4847
+ if (l.name === "") {
4838
4848
  if (a === void 0)
4839
4849
  throw Error(
4840
4850
  `Failed to statically determine the property name: ${i.getText(n)} in ${s} in ${n.fileName}`
4841
4851
  );
4842
- c.name = a, c.attribute ??= ni(a);
4852
+ l.name = a, l.attribute ??= ri(a);
4843
4853
  }
4844
- return c;
4854
+ return l;
4845
4855
  }
4846
4856
  function ei(e, t, i) {
4847
4857
  const s = e.modifiers[t], n = s.expression, r = n.arguments.at(0);
@@ -4878,13 +4888,13 @@ function ti(e, t) {
4878
4888
  e.initializer
4879
4889
  );
4880
4890
  }
4881
- function fa(e, t, i, s) {
4891
+ function ua(e, t, i, s) {
4882
4892
  let n;
4883
4893
  if (e.apiJsonEnabled)
4884
4894
  for (let d = 0; d < e.privateApiJson.modules.length; ++d) {
4885
- const l = e.privateApiJson.modules[d];
4886
- if (l.sourcePath === i.fileName.slice(e.dir.root.length)) {
4887
- n = l;
4895
+ const c = e.privateApiJson.modules[d];
4896
+ if (c.sourcePath === i.fileName.slice(e.dir.root.length)) {
4897
+ n = c;
4888
4898
  break;
4889
4899
  }
4890
4900
  }
@@ -4893,17 +4903,17 @@ function fa(e, t, i, s) {
4893
4903
  apiModule: n,
4894
4904
  transformation: t
4895
4905
  }, a = i.statements;
4896
- let c = a;
4906
+ let l = a;
4897
4907
  try {
4898
4908
  s.forEach((d) => {
4899
4909
  i.statements = d(i, r);
4900
4910
  });
4901
4911
  } finally {
4902
- c = i.statements, i.statements = a;
4912
+ l = i.statements, i.statements = a;
4903
4913
  }
4904
- return ga(i, c);
4914
+ return ma(i, l);
4905
4915
  }
4906
- const ga = (e, t) => o.factory.updateSourceFile(
4916
+ const ma = (e, t) => o.factory.updateSourceFile(
4907
4917
  e,
4908
4918
  t,
4909
4919
  /*
@@ -4918,16 +4928,16 @@ const ga = (e, t) => o.factory.updateSourceFile(
4918
4928
  !1,
4919
4929
  e.libReferenceDirectives
4920
4930
  );
4921
- function ha(e, t) {
4931
+ function fa(e, t) {
4922
4932
  t.compiler.viteCommand === "build" && ("emitNode" in e && (e.emitNode ??= {}), o.setEmitFlags(e, o.EmitFlags.NoComments));
4923
4933
  }
4924
- const ya = (e, t) => {
4934
+ const ga = (e, t) => {
4925
4935
  let i;
4926
4936
  if (t.apiModule !== void 0)
4927
4937
  for (let d = 0; d < t.apiModule.declarations.length; ++d) {
4928
- const l = t.apiModule.declarations[d];
4929
- if (l.customElement === !0) {
4930
- i = l;
4938
+ const c = t.apiModule.declarations[d];
4939
+ if (c.customElement === !0) {
4940
+ i = c;
4931
4941
  break;
4932
4942
  }
4933
4943
  }
@@ -4937,25 +4947,25 @@ const ya = (e, t) => {
4937
4947
  function n() {
4938
4948
  s = /* @__PURE__ */ new Map();
4939
4949
  }
4940
- const r = (d) => aa(d, s, t.compiler.shouldMinify);
4941
- function a(d, l) {
4942
- const p = ba(t, i, d, l, e, s);
4943
- return ha(p, t), p;
4950
+ const r = (d) => na(d, s, t.compiler.shouldMinify);
4951
+ function a(d, c) {
4952
+ const p = ya(t, i, d, c, e, s);
4953
+ return fa(p, t), p;
4944
4954
  }
4945
4955
  return e.statements.map(
4946
- (d) => bs(a, d, t, n, r)
4956
+ (d) => vs(a, d, t, n, r)
4947
4957
  );
4948
4958
  };
4949
- function bs(e, t, i, s, n = ui) {
4959
+ function vs(e, t, i, s, n = pi) {
4950
4960
  if (o.isClassDeclaration(t) && // Ignore classes that don't extend anything - those are definitely not components
4951
4961
  t.heritageClauses?.some((r) => r.token === o.SyntaxKind.ExtendsKeyword)) {
4952
4962
  let r = !1;
4953
4963
  const a = t.name?.text;
4954
4964
  s?.();
4955
- const c = n(
4956
- t.members.map((l) => {
4957
- const p = e(l, a);
4958
- return r ||= p !== l, p;
4965
+ const l = n(
4966
+ t.members.map((c) => {
4967
+ const p = e(c, a);
4968
+ return r ||= p !== c, p;
4959
4969
  })
4960
4970
  );
4961
4971
  return r ? o.factory.updateClassDeclaration(
@@ -4964,20 +4974,20 @@ function bs(e, t, i, s, n = ui) {
4964
4974
  t.name,
4965
4975
  t.typeParameters,
4966
4976
  t.heritageClauses,
4967
- c
4977
+ l
4968
4978
  ) : t;
4969
4979
  } else
4970
4980
  return i.compiler.isInTest ? o.visitEachChild(
4971
4981
  t,
4972
- (a) => bs(e, a, i, s, n),
4982
+ (a) => vs(e, a, i, s, n),
4973
4983
  i.transformation
4974
4984
  ) : t;
4975
4985
  }
4976
- const va = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4977
- function ba(e, t, i, s, n, r) {
4986
+ const ha = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4987
+ function ya(e, t, i, s, n, r) {
4978
4988
  if (o.isMethodDeclaration(i)) {
4979
4989
  const a = i.modifiers?.filter(
4980
- (c) => !o.isDecorator(c) || !wa(c)
4990
+ (l) => !o.isDecorator(l) || !va(l)
4981
4991
  );
4982
4992
  if (a?.length !== i.modifiers?.length)
4983
4993
  return o.factory.updateMethodDeclaration(
@@ -4991,10 +5001,10 @@ function ba(e, t, i, s, n, r) {
4991
5001
  i.type,
4992
5002
  i.body
4993
5003
  );
4994
- if ("text" in i.name && va.has(i.name.text) && i.body) {
4995
- const c = i.name.text;
5004
+ if ("text" in i.name && ha.has(i.name.text) && i.body) {
5005
+ const l = i.name.text;
4996
5006
  return i.body.statements.some(
4997
- (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 === c
5007
+ (c) => o.isExpressionStatement(c) && o.isCallExpression(c.expression) && o.isPropertyAccessExpression(c.expression.expression) && c.expression.expression.expression.kind === o.SyntaxKind.SuperKeyword && c.expression.expression.name.text === l
4998
5008
  ) ? i : o.factory.updateMethodDeclaration(
4999
5009
  i,
5000
5010
  i.modifiers,
@@ -5007,7 +5017,7 @@ function ba(e, t, i, s, n, r) {
5007
5017
  o.factory.updateBlock(i.body, [
5008
5018
  o.factory.createExpressionStatement(
5009
5019
  o.factory.createCallExpression(
5010
- o.factory.createPropertyAccessExpression(o.factory.createSuper(), c),
5020
+ o.factory.createPropertyAccessExpression(o.factory.createSuper(), l),
5011
5021
  void 0,
5012
5022
  []
5013
5023
  )
@@ -5017,14 +5027,14 @@ function ba(e, t, i, s, n, r) {
5017
5027
  );
5018
5028
  }
5019
5029
  }
5020
- return o.isPropertyDeclaration(i) || o.isAccessor(i) ? ua(e, t, i, s, n, r) : i;
5021
- }
5022
- const wa = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", Sa = [
5023
- sa,
5024
- oa,
5025
- ya
5026
- ], Ca = "@arcgis/lumina:transformComponents", Ea = (e) => ({
5027
- name: Ca,
5030
+ return o.isPropertyDeclaration(i) || o.isAccessor(i) ? da(e, t, i, s, n, r) : i;
5031
+ }
5032
+ const va = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", ba = [
5033
+ ta,
5034
+ ra,
5035
+ ga
5036
+ ], wa = "@arcgis/lumina:transformComponents", Sa = (e) => ({
5037
+ name: wa,
5028
5038
  transform: {
5029
5039
  // Transform JSX to lit-html first so that vite:esbuild doesn't transform JSX to h().
5030
5040
  // Also, we need to run on the original fs file, before other transforms so
@@ -5044,32 +5054,32 @@ const wa = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expressio
5044
5054
  e.apiJsonDeferred === void 0 ? [ne] : [ne, e.apiJsonDeferred.promise]
5045
5055
  );
5046
5056
  const n = e.getSourceFile(i, t), a = o.transform(n, [
5047
- (f) => () => fa(e, f, n, [
5057
+ (f) => () => ua(e, f, n, [
5048
5058
  ...e.options.types?.sourceFileTransformers ?? [],
5049
- ...Sa
5059
+ ...ba
5050
5060
  ])
5051
- ]).transformed[0], c = e._typeScriptPrinter, d = e.viteConfig.build.sourcemap === !1 ? void 0 : $t.createSourceMapGenerator(Ta, u.basename(i), "", u.dirname(i), {}), l = $t.createTextWriter(`
5061
+ ]).transformed[0], l = e._typeScriptPrinter, d = e.viteConfig.build.sourcemap === !1 ? void 0 : $t.createSourceMapGenerator(Ca, u.basename(i), "", u.dirname(i), {}), c = $t.createTextWriter(`
5052
5062
  `);
5053
- c.writeFile(a, l, d);
5054
- const p = l.getText(), m = d?.toJSON();
5063
+ l.writeFile(a, c, d);
5064
+ const p = c.getText(), m = d?.toJSON();
5055
5065
  return {
5056
5066
  code: p,
5057
5067
  map: m ?? null
5058
5068
  };
5059
5069
  }
5060
5070
  }
5061
- }), Ta = {
5071
+ }), Ca = {
5062
5072
  getCurrentDirectory: o.sys.getCurrentDirectory,
5063
- getCanonicalFileName: o.sys.useCaseSensitiveFileNames ? ui : (e) => e.toLowerCase()
5064
- }, $a = (e) => ({
5073
+ getCanonicalFileName: o.sys.useCaseSensitiveFileNames ? pi : (e) => e.toLowerCase()
5074
+ }, Ea = (e) => ({
5065
5075
  name: "@arcgis/lumina:handleDynamicAssets",
5066
5076
  configureServer(t) {
5067
- e.server = t, ii(e).forEach(({ assets: i, transformers: s }) => ie(e, i, s));
5077
+ e.server = t, ii(e).forEach(({ assets: i, transformers: s }) => te(e, i, s));
5068
5078
  },
5069
5079
  async writeBundle() {
5070
5080
  await Promise.all(
5071
5081
  ii(e).map(
5072
- async ({ assets: t, transformers: i }) => await Di(e, t, i)
5082
+ async ({ assets: t, transformers: i }) => await Fi(e, t, i)
5073
5083
  )
5074
5084
  );
5075
5085
  }
@@ -5080,73 +5090,73 @@ function ii(e) {
5080
5090
  "type" in s ? t.push(s) : "assets" in s && t.push(...s.assets);
5081
5091
  }), t.length > 0 && i.push({ assets: t }), e.isInBuildWatch || (e.assetsToProvide = void 0), i;
5082
5092
  }
5083
- const ot = "@arcgis/lumina:updatePackageJson", Pa = (e) => ({
5093
+ const ot = "@arcgis/lumina:updatePackageJson", Ta = (e) => ({
5084
5094
  name: ot,
5085
5095
  apply: () => e.viteCommand === "serve" && e.environment === "development" && !e.isInTest && !e.isInCi,
5086
5096
  configResolved() {
5087
- ka(e).catch(
5088
- (t) => T.error(ot, `Failed to update package's package.json:${String(t)}`)
5097
+ $a(e).catch(
5098
+ (t) => $.error(ot, `Failed to update package's package.json:${String(t)}`)
5089
5099
  );
5090
5100
  }
5091
5101
  });
5092
- async function ka(e) {
5093
- const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await z(t, "utf-8")), s = Ia(i, e);
5094
- s && li(t, JSON.stringify(s, null, 2));
5102
+ async function $a(e) {
5103
+ const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await W(t, "utf-8")), s = Pa(i, e);
5104
+ s && ci(t, JSON.stringify(s, null, 2));
5095
5105
  }
5096
- function Ia(e, t) {
5106
+ function Pa(e, t) {
5097
5107
  const i = e?.devDependencies ?? {};
5098
- Object.keys(e?.peerDependencies ?? {}).forEach((l) => {
5099
- l in i || T.warn(
5108
+ Object.keys(e?.peerDependencies ?? {}).forEach((c) => {
5109
+ c in i || $.warn(
5100
5110
  ot,
5101
- `Every peerDependency should also be a devDependency, or else some tools will get confused (like Turbo Build). Found "${l}" that is not a devDependency. Please edit your package.json`
5111
+ `Every peerDependency should also be a devDependency, or else some tools will get confused (like Turbo Build). Found "${c}" that is not a devDependency. Please edit your package.json`
5102
5112
  );
5103
5113
  });
5104
5114
  let s = !1;
5105
- const n = (l) => u.relative(t.dir.root, u.join(t.dir.dist, l)), r = t._documentationFileNames;
5115
+ const n = (c) => u.relative(t.dir.root, u.join(t.dir.dist, c)), r = t._documentationFileNames;
5106
5116
  if (r.vsCodeCss !== void 0) {
5107
- const l = e["css.customData"] ?? [], p = n(r.vsCodeCss);
5108
- l.includes(p) || (e["css.customData"] = [...l, p], s = !0);
5117
+ const c = e["css.customData"] ?? [], p = n(r.vsCodeCss);
5118
+ c.includes(p) || (e["css.customData"] = [...c, p], s = !0);
5109
5119
  }
5110
5120
  if (r.apiJson !== void 0) {
5111
- const l = n(r.apiJson);
5112
- e.customElements !== l && (e.customElements = l, s = !0);
5121
+ const c = n(r.apiJson);
5122
+ e.customElements !== c && (e.customElements = c, s = !0);
5113
5123
  }
5114
5124
  if (r.vsCodeHtml !== void 0) {
5115
- const l = e["html.customData"] ?? [], p = n(r.vsCodeHtml);
5116
- l.includes(p) || (e["html.customData"] = [...l, p], s = !0);
5125
+ const c = e["html.customData"] ?? [], p = n(r.vsCodeHtml);
5126
+ c.includes(p) || (e["html.customData"] = [...c, p], s = !0);
5117
5127
  }
5118
5128
  if (r.webTypes !== void 0) {
5119
- const l = n(r.webTypes);
5120
- e["web-types"] !== l && (s = !0, e["web-types"] = l);
5129
+ const c = n(r.webTypes);
5130
+ e["web-types"] !== c && (s = !0, e["web-types"] = c);
5121
5131
  }
5122
- const a = `./${Z}.css`, c = t.options.build?.cdn?.namespace !== void 0, d = he(
5132
+ const a = `./${Q}.css`, l = t.options.build?.cdn?.namespace !== void 0, d = he(
5123
5133
  t.dir.root,
5124
5134
  u.join(t.dir.distCdn, a)
5125
5135
  );
5126
- if (!c) {
5136
+ if (!l) {
5127
5137
  e.exports?.[a] !== d && (e.exports ??= {}, e.exports[a] = d, s = !0);
5128
- const l = e.name.split("/").length > 1 ? e.name.split("/")[1] : e.name;
5138
+ const c = e.name.split("/").length > 1 ? e.name.split("/")[1] : e.name;
5129
5139
  for (const p of Object.keys(e.exports))
5130
- p.endsWith(`${l}.css`) && e.exports[p] !== d && (e.exports[p] = d, s = !0);
5140
+ p.endsWith(`${c}.css`) && e.exports[p] !== d && (e.exports[p] = d, s = !0);
5131
5141
  }
5132
5142
  if (s)
5133
5143
  return e;
5134
5144
  }
5135
- const xa = (e) => ({
5145
+ const ka = (e) => ({
5136
5146
  deprecation: "docs.json is deprecated and will be removed in a future release. Use api.json instead",
5137
5147
  timestamp: e.apiJson.timestamp,
5138
5148
  compiler: e.apiJson.compiler,
5139
- components: Aa(e),
5149
+ components: Ia(e),
5140
5150
  typeLibrary: {}
5141
5151
  });
5142
- function Aa(e) {
5152
+ function Ia(e) {
5143
5153
  const t = [];
5144
5154
  for (const i of e.apiJson.modules)
5145
5155
  for (const s of i.declarations)
5146
- s.customElement === !0 && t.push(La(s, i.sourcePath));
5156
+ s.customElement === !0 && t.push(xa(s, i.sourcePath));
5147
5157
  return t;
5148
5158
  }
5149
- function La(e, t) {
5159
+ function xa(e, t) {
5150
5160
  const i = e.superclass ? [{ name: "superclass", text: JSON.stringify(e.superclass) }] : [];
5151
5161
  return {
5152
5162
  filePath: t,
@@ -5161,9 +5171,9 @@ function La(e, t) {
5161
5171
  dependencies: [],
5162
5172
  dependencyGraph: {},
5163
5173
  deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated,
5164
- props: e.members.map(Na).filter(D),
5165
- methods: e.members.map(ja).filter(D),
5166
- events: e.events?.map(Fa) ?? [],
5174
+ props: e.members.map(Aa).filter(F),
5175
+ methods: e.members.map(La).filter(F),
5176
+ events: e.events?.map(Na) ?? [],
5167
5177
  styles: e.cssProperties?.map(({ name: s, description: n, deprecated: r }) => ({
5168
5178
  name: s,
5169
5179
  annotation: "prop",
@@ -5188,7 +5198,7 @@ function Ve(e, t = "") {
5188
5198
  }
5189
5199
  return t;
5190
5200
  }
5191
- function Na(e) {
5201
+ function Aa(e) {
5192
5202
  if (e.kind !== "field")
5193
5203
  return;
5194
5204
  const t = e, i = t.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(t.inheritedFrom) }] : [], s = t.readonly ? [{ name: "readonly", text: "" }] : [], n = t.docsTags?.some((r) => r.name === "required") ?? !1;
@@ -5222,14 +5232,14 @@ const wt = (e) => Object.fromEntries(
5222
5232
  (t) => [
5223
5233
  t.name,
5224
5234
  {
5225
- location: t.package === Rs ? "global" : t.package === void 0 ? "local" : "import",
5235
+ location: t.package === Fs ? "global" : t.package === void 0 ? "local" : "import",
5226
5236
  path: typeof t.module == "string" && typeof t.package == "string" ? u.join(t.package, t.module) : t.module ?? t.package,
5227
5237
  id: "notImplemented"
5228
5238
  }
5229
5239
  ]
5230
5240
  ) ?? []
5231
5241
  );
5232
- function ja(e) {
5242
+ function La(e) {
5233
5243
  if (e.kind !== "method")
5234
5244
  return;
5235
5245
  const t = e, i = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [], s = t.parameters?.map(({ name: n, type: r, description: a }) => ({
@@ -5260,7 +5270,7 @@ function ja(e) {
5260
5270
  deprecation: typeof t.deprecated == "boolean" ? t.deprecated ? "" : void 0 : t.deprecated
5261
5271
  };
5262
5272
  }
5263
- function Fa(e) {
5273
+ function Na(e) {
5264
5274
  const t = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [];
5265
5275
  return {
5266
5276
  event: e.name,
@@ -5285,8 +5295,8 @@ const ye = {
5285
5295
  cssParts: "CSS Parts",
5286
5296
  methods: "Methods"
5287
5297
  };
5288
- function ws(e) {
5289
- const t = Da(e.slots), i = Ra(e.events), s = Oa(e.cssProperties), n = Ma(e.cssParts), r = Ja(e.members), a = e.description?.trim();
5298
+ function bs(e) {
5299
+ const t = ja(e.slots), i = Fa(e.events), s = Da(e.cssProperties), n = Ra(e.cssParts), r = Oa(e.members), a = e.description?.trim();
5290
5300
  return [...a ? [`${a}
5291
5301
  --`] : [], i, r, t, s, n].filter(Boolean).join(`
5292
5302
 
@@ -5294,28 +5304,28 @@ function ws(e) {
5294
5304
  }
5295
5305
  const ve = (e, t) => t === void 0 || t.length === 0 ? "" : `### ${e}
5296
5306
  ${t.join(`
5297
- `)}`, Da = (e) => ve(
5307
+ `)}`, ja = (e) => ve(
5298
5308
  ye.slots,
5299
5309
  e?.filter((t) => t.deprecated === void 0).map(
5300
5310
  (t) => `- ${t.name ? `**${t.name}**` : "_default_"}${t.description === void 0 ? "" : ` - ${t.description}`}`
5301
5311
  )
5302
- ), Ra = (e) => ve(
5312
+ ), Fa = (e) => ve(
5303
5313
  ye.events,
5304
5314
  e?.filter((t) => t.deprecated === void 0).map((t) => `- **${t.name}**${t.description === void 0 ? "" : ` - ${t.description}`}`)
5305
- ), Oa = (e = []) => ve(
5315
+ ), Da = (e = []) => ve(
5306
5316
  ye.cssProperties,
5307
5317
  e?.filter((t) => t.deprecated === void 0).map(
5308
5318
  (t) => `- **${t.name}**${t.description === void 0 ? "" : ` - ${t.description}`} ${t.default ? `_(default: ${t.default})_}` : ""}`
5309
5319
  )
5310
- ), Ma = (e) => ve(
5320
+ ), Ra = (e) => ve(
5311
5321
  ye.cssParts,
5312
5322
  e?.filter((t) => t.deprecated === void 0).map((t) => `- **${t.name}**${t.description === void 0 ? "" : ` - ${t.description}`}`)
5313
- ), Ja = (e) => ve(
5323
+ ), Oa = (e) => ve(
5314
5324
  ye.methods,
5315
- e.filter(Os).filter((t) => t.deprecated === void 0).map(
5325
+ e.filter(Ds).filter((t) => t.deprecated === void 0).map(
5316
5326
  (t) => `- \`${t.name}${t.signature}\`${t.description ? ` - ${t.description}` : ""}`
5317
5327
  )
5318
- ), Ss = (e) => {
5328
+ ), ws = (e) => {
5319
5329
  const t = [], i = /* @__PURE__ */ new Set();
5320
5330
  for (let s = 0; s < e.length; ++s) {
5321
5331
  const n = e[s].cssProperties;
@@ -5329,13 +5339,13 @@ ${t.join(`
5329
5339
  }
5330
5340
  }
5331
5341
  return t;
5332
- }, Cs = (e) => e.flatMap(
5342
+ }, Ss = (e) => e.flatMap(
5333
5343
  (t) => t.cssParts?.filter((i) => i.deprecated === void 0).map((i) => ({
5334
5344
  name: `::part(${i.name})`,
5335
5345
  description: t.tagName + (i.description === void 0 ? "" : `: ${i.description}`)
5336
5346
  })) ?? []
5337
5347
  );
5338
- function Ba(e) {
5348
+ function Ma(e) {
5339
5349
  if (e.attributes === void 0)
5340
5350
  return [];
5341
5351
  const t = [];
@@ -5346,7 +5356,7 @@ function Ba(e) {
5346
5356
  description: s.description || void 0,
5347
5357
  default: s.default,
5348
5358
  value: {
5349
- type: Ka(
5359
+ type: Ja(
5350
5360
  s.type.values?.map(
5351
5361
  (n) => n.type === "string" && n.value !== void 0 ? `"${n.value}"` : n.value ?? n.type
5352
5362
  )
@@ -5356,9 +5366,9 @@ function Ba(e) {
5356
5366
  }
5357
5367
  return t;
5358
5368
  }
5359
- const Ka = (e) => e?.length === 1 ? e[0] : e;
5360
- function _a(e, t) {
5361
- const i = Wa(e), s = Ss(e), n = Cs(e), r = j();
5369
+ const Ja = (e) => e?.length === 1 ? e[0] : e;
5370
+ function Ba(e, t) {
5371
+ const i = Ka(e), s = ws(e), n = Ss(e), r = D();
5362
5372
  return {
5363
5373
  $schema: "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
5364
5374
  name: r.name,
@@ -5376,11 +5386,11 @@ function _a(e, t) {
5376
5386
  }
5377
5387
  };
5378
5388
  }
5379
- const Wa = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5389
+ const Ka = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5380
5390
  name: t.tagName,
5381
- description: ws(t),
5391
+ description: bs(t),
5382
5392
  "doc-url": t.demos?.[0]?.url,
5383
- attributes: Ba(t),
5393
+ attributes: Ma(t),
5384
5394
  slots: t.slots?.map((i) => ({
5385
5395
  name: i.name,
5386
5396
  description: i.description
@@ -5388,10 +5398,10 @@ const Wa = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5388
5398
  // REFACTOR: this was deprecated in the spec: https://github.com/JetBrains/web-types/blob/11e46e47cb65edc1930dc1fae854005ad45ac08f/schema/web-types.json#L866
5389
5399
  events: si(t),
5390
5400
  js: {
5391
- properties: Ua(t),
5401
+ properties: _a(t),
5392
5402
  events: si(t)
5393
5403
  }
5394
- })), Ua = (e) => e.members.filter(Ms).filter((t) => t.deprecated === void 0).map((t) => ({
5404
+ })), _a = (e) => e.members.filter(Rs).filter((t) => t.deprecated === void 0).map((t) => ({
5395
5405
  name: t.name,
5396
5406
  description: t.description,
5397
5407
  type: t.type?.text
@@ -5399,143 +5409,93 @@ const Wa = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5399
5409
  name: t.name,
5400
5410
  type: t.type?.text,
5401
5411
  description: t.description
5402
- })) ?? [], za = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5412
+ })) ?? [], Ua = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5403
5413
  name: t.tagName,
5404
- description: ws(t),
5405
- attributes: Ha(t),
5414
+ description: bs(t),
5415
+ attributes: Wa(t),
5406
5416
  references: t.demos?.map((i) => ({ name: i.description, url: i.url })) ?? []
5407
- })), Ha = (e) => e.attributes?.filter((t) => t.deprecated === void 0).map((t) => ({
5417
+ })), Wa = (e) => e.attributes?.filter((t) => t.deprecated === void 0).map((t) => ({
5408
5418
  name: t.name,
5409
5419
  description: t.description || void 0,
5410
- values: qa(t)
5411
- })) ?? [], qa = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], Va = (e) => ({
5420
+ values: za(t)
5421
+ })) ?? [], za = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], qa = (e) => ({
5412
5422
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
5413
5423
  version: 1.1,
5414
- tags: za(e)
5415
- }), Ga = (e) => ({
5424
+ tags: Ua(e)
5425
+ }), Ha = (e) => ({
5416
5426
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
5417
5427
  version: 1.1,
5418
- properties: Ss(e),
5419
- pseudoElements: Cs(e)
5420
- }), Xa = "@arcgis/lumina:generateDocs";
5421
- function Ya(e) {
5428
+ properties: ws(e),
5429
+ pseudoElements: Ss(e)
5430
+ }), Va = "@arcgis/lumina:generateDocs";
5431
+ function Ga(e) {
5422
5432
  return e._documentationFileNames.stencilLikeDocsJson !== void 0 && e.provideAssets([
5423
5433
  {
5424
5434
  type: "dynamic",
5425
- source: () => JSON.stringify(xa(e), null, nt(e)),
5435
+ source: () => JSON.stringify(ka(e), null, nt(e)),
5426
5436
  destination: u.join("../..", e._documentationFileNames.stencilLikeDocsJson)
5427
5437
  }
5428
5438
  ]), {
5429
- name: Xa,
5439
+ name: Va,
5430
5440
  async writeBundle() {
5431
5441
  if (e.isInStorybook)
5432
5442
  return;
5433
- const t = nt(e), { jetBrains: i } = e.options.documentation ?? {}, s = e._documentationFileNames, n = s.vsCodeHtml === void 0 ? void 0 : u.join(e.dir.dist, s.vsCodeHtml), r = s.vsCodeCss === void 0 ? void 0 : u.join(e.dir.dist, s.vsCodeCss), a = s.webTypes === void 0 ? void 0 : u.join(e.dir.dist, s.webTypes), c = [n, r, a].filter(D);
5434
- if (c.length === 0)
5443
+ const t = nt(e), { jetBrains: i } = e.options.documentation ?? {}, s = e._documentationFileNames, n = s.vsCodeHtml === void 0 ? void 0 : u.join(e.dir.dist, s.vsCodeHtml), r = s.vsCodeCss === void 0 ? void 0 : u.join(e.dir.dist, s.vsCodeCss), a = s.webTypes === void 0 ? void 0 : u.join(e.dir.dist, s.webTypes), l = [n, r, a].filter(F);
5444
+ if (l.length === 0)
5435
5445
  return;
5436
- await Bi(c);
5446
+ await Ji(l);
5437
5447
  const d = [];
5438
5448
  if (n !== void 0) {
5439
- const l = JSON.stringify(Va(e.apiJsonComponents), null, t);
5440
- d.push(_(n, l));
5449
+ const c = JSON.stringify(qa(e.apiJsonComponents), null, t);
5450
+ d.push(z(n, c));
5441
5451
  }
5442
5452
  if (r !== void 0) {
5443
- const l = JSON.stringify(Ga(e.apiJsonComponents), null, t);
5444
- d.push(_(r, l));
5453
+ const c = JSON.stringify(Ha(e.apiJsonComponents), null, t);
5454
+ d.push(z(r, c));
5445
5455
  }
5446
5456
  if (a !== void 0) {
5447
- const l = _a(e.apiJsonComponents, typeof i == "object" ? i : {});
5448
- d.push(_(a, JSON.stringify(l, null, t)));
5457
+ const c = Ba(e.apiJsonComponents, typeof i == "object" ? i : {});
5458
+ d.push(z(a, JSON.stringify(c, null, t)));
5449
5459
  }
5450
5460
  await Promise.all(d);
5451
5461
  }
5452
5462
  };
5453
5463
  }
5454
- function Qa(e) {
5455
- return {
5456
- name: "@arcgis/lumina:buildWrappers",
5457
- apply: () => e.viteCommand === "build" && !!e.options.build?.wrappers?.length,
5458
- async writeBundle() {
5459
- e.isInStorybook || await Promise.all(
5460
- e.options.build?.wrappers?.map(async (t) => {
5461
- t.type === "react18" && await tc(e, t);
5462
- }) ?? []
5463
- );
5464
- }
5465
- };
5466
- }
5467
- const Za = "react", ri = "@lit/react", ec = `
5468
- import React from "${Za}";
5469
- import { createComponent } from "${ri}";
5470
- import type { EventName } from "${ri}";
5471
- import { makeReactWrapperFactory, getReactWrapperOptions } from "@arcgis/lumina";
5472
-
5473
- const createWrapper = /*@__PURE__*/ makeReactWrapperFactory(React, createComponent) as typeof createComponent;
5474
- `;
5475
- async function tc(e, t) {
5476
- const { name: i } = j(), s = [];
5477
- for (const a of e.apiJson.modules)
5478
- for (const c of a.declarations)
5479
- ic(c) && s.push(sc(c));
5480
- const n = [`/// <reference types="${i}" preserve="true" />`, ec, ...s].join(""), r = u.resolve(t.proxiesFile);
5481
- await X(u.dirname(r), { recursive: !0 }), await _(r, n);
5482
- }
5483
- function ic(e) {
5484
- return e.customElement === !0 && e.abstract !== !0;
5485
- }
5486
- function sc(e) {
5487
- const t = e.events?.map(
5488
- (i) => ` ${Qs(`on${$s(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
5489
- ).join(`
5490
- `);
5491
- return `
5492
- /** @deprecated since 5.0. React wrappers are not needed in React 19 or above. Use \`<${e.tagName} />\` directly. */
5493
- export const ${e.pascalCaseName} = /*@__PURE__*/ createWrapper(
5494
- getReactWrapperOptions(
5495
- "${e.tagName}" as unknown as HTML${e.pascalCaseName}Element,
5496
- {${t ? `
5497
- ${t}
5498
- ` : ""}}
5499
- )
5500
- );
5501
- `;
5502
- }
5503
- function Lc(e = {}) {
5504
- const t = new $(e), s = [
5464
+ function Ec(e = {}) {
5465
+ const t = new P(e), s = [
5505
5466
  t._plugin,
5506
- Yn(t),
5507
- so(t),
5508
- ao(t),
5509
- Pa(t),
5510
- _n(t),
5511
- Ya(t),
5467
+ Gn(t),
5468
+ to(t),
5469
+ no(t),
5470
+ Ta(t),
5471
+ Jn(t),
5472
+ Ga(t),
5473
+ Sa(t),
5474
+ wo(t),
5475
+ yr(t),
5476
+ Bn(t),
5512
5477
  Ea(t),
5513
5478
  Co(t),
5514
- wr(t),
5515
- Wn(t),
5516
- $a(t),
5517
- To(t),
5518
- mo(t),
5519
- er(t),
5520
- bn(t),
5521
- Qa(t),
5522
- Un(t)
5523
- ].filter(D);
5479
+ po(t),
5480
+ Ys(t),
5481
+ hn(t),
5482
+ Kn(t)
5483
+ ].filter(F);
5524
5484
  return s.context = t, s;
5525
5485
  }
5526
- const Nc = {
5527
- initializeComponentDependencies: Ii,
5528
- updateLuminaTs: ts,
5529
- propertyToAttributeMappings: W,
5530
- nativeEvents: hi,
5486
+ const Tc = {
5487
+ initializeComponentDependencies: ki,
5488
+ updateLuminaTs: es,
5489
+ propertyToAttributeMappings: U,
5490
+ nativeEvents: gi,
5531
5491
  svgElements: lt,
5532
5492
  mathMlElements: dt,
5533
- alwaysAttributes: mi,
5534
- nativeAlwaysAttributes: fi,
5493
+ alwaysAttributes: ui,
5494
+ nativeAlwaysAttributes: mi,
5535
5495
  htmlAlwaysAttributes: Qe
5536
5496
  };
5537
5497
  export {
5538
- Nc as exportsForCodemod,
5498
+ Tc as exportsForCodemod,
5539
5499
  Re as inferCdnUrl,
5540
- Lc as useLumina
5500
+ Ec as useLumina
5541
5501
  };