@arcgis/lumina-compiler 6.0.0-next.4 → 6.0.0-next.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +708 -690
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -1,32 +1,32 @@
1
- import { externalizeDependencies as Cs } from "@arcgis/node-toolkit/vite/externalizeDependenciesPlugin";
2
- import { isNotUndefined as R } from "@arcgis/toolkit/predicate";
1
+ import { externalizeDependencies as Es } from "@arcgis/node-toolkit/vite/externalizeDependenciesPlugin";
2
+ import { isNotUndefined as D } from "@arcgis/toolkit/predicate";
3
3
  import { f as b, l as T } from "./chunks/logger.js";
4
4
  import o from "typescript";
5
- import { camelToKebab as si, getPreamble as Es, uncapitalize as Ct, capitalize as Ts } from "@arcgis/toolkit/string";
6
- import { lazyMetaSubItemJoiner as $s, lazyMetaItemJoiner as Je, lazyMetaGroupJoiner as Ps, propertyFlagAttribute as Et, propertyFlagReflect as ks, propertyFlagBoolean as Is, propertyFlagNumber as xs, propertyFlagState as As, propertyFlagReadOnly as Ls, propertyFlagNoAccessor as Ns, propertyFlagUseDefault as js } from "@arcgis/lumina/config";
7
- import { path as u, isPosix as ri, toPosixPathSeparators as G, toSystemPathSeparators as Re, getCwd as ni } from "@arcgis/node-toolkit/path";
8
- import { isApiMethodAsync as Fs, globalPackageIdentifier as Rs, isApiMethod as Ds, isApiProperty as Os } from "@arcgis/api-extractor/utils/apiHelpers";
9
- import { existsAsync as K, findPath as oi } from "@arcgis/node-toolkit/file";
10
- import { readFile as z, readdir as at, mkdir as X, writeFile as _, copyFile as Ms, rm as Js, cp as Bs } from "node:fs/promises";
11
- import { retrievePackageJson as j, fetchPackageLocation as $e, asyncRetrievePackageJson as ai } from "@arcgis/node-toolkit/packageJson";
12
- import { build as Ks } from "esbuild";
13
- import _s from "mime-types";
14
- import { forEachWithConcurrency as Ws } from "@arcgis/toolkit/promise";
15
- import { glob as Us } from "tinyglobby";
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";
16
16
  import { renameComponentFolder as Ge } from "@arcgis/api-extractor/extractor/webComponent/pathMapping";
17
- import { useApiExtractor as zs } from "@arcgis/api-extractor/vite/plugin";
18
- import { writeFileSync as ci } from "node:fs";
19
- import { styleText as Hs } from "node:util";
20
- import { unsafeGetUndocumentedPrinter as qs, unsafeUndocumentedTs as Tt } from "@arcgis/api-extractor/utils/internalTypeScriptApis";
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";
21
21
  import { pathIsComponentEntrypoint as Pe } from "@arcgis/api-extractor/extractor/webComponent/findComponents";
22
- import { loadApiExtractorConfig as Vs, mergeApiExtractorConfigs as $t } from "@arcgis/api-extractor/extractor/config";
23
- import { loadTypeScriptConfig as Gs } from "@arcgis/node-toolkit/vite/typeScript";
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";
24
24
  import { mappedFind as Xe } from "@arcgis/toolkit/array";
25
- import { isPropertyEscapeNeeded as li, maybeEscapePropertyName as Xs } from "@arcgis/api-extractor/utils/partPrinter";
26
- import { getPackageNameFromExternalSpecifier as Ys, getMemberName as di } from "@arcgis/api-extractor/utils/astHelpers";
27
- import { identity as pi } from "@arcgis/toolkit/function";
28
- function Qs(e) {
29
- const t = e.options?.build?.dependencies ?? {}, i = Cs({
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({
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 Qs(e) {
42
42
  e.isInStorybook && (i.resolveId = void 0);
43
43
  }, i;
44
44
  }
45
- const Zs = "Fragment", Be = "DynamicHtmlTag", Ke = "DynamicSvgTag", ke = /* @__PURE__ */ Symbol("dynamic html tag name"), Ye = /* @__PURE__ */ Symbol("dynamic svg tag name"), ui = /* @__PURE__ */ new Set([
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([
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 Zs = "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
- ]), mi = /* @__PURE__ */ new Set([
77
+ ]), fi = /* @__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
@@ -913,9 +913,9 @@ const Zs = "Fragment", Be = "DynamicHtmlTag", Ke = "DynamicSvgTag", ke = /* @__P
913
913
  }
914
914
  }
915
915
  };
916
- fi(W.common);
917
- Object.values(W.perElement).forEach(fi);
918
- function fi(e) {
916
+ gi(W.common);
917
+ Object.values(W.perElement).forEach(gi);
918
+ function gi(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 fi(e) {
924
924
  e.stringifiedNonReflected
925
925
  ));
926
926
  }
927
- const Pt = /* @__PURE__ */ new Set(["itemScope"]), gi = /* @__PURE__ */ new Set([
927
+ const kt = /* @__PURE__ */ new Set(["itemScope"]), hi = /* @__PURE__ */ new Set([
928
928
  "abort",
929
929
  "animationCancel",
930
930
  "animationEnd",
@@ -1023,7 +1023,7 @@ const Pt = /* @__PURE__ */ new Set(["itemScope"]), gi = /* @__PURE__ */ new Set(
1023
1023
  "volumeChange",
1024
1024
  "waiting",
1025
1025
  "wheel"
1026
- ]), er = /* @__PURE__ */ new Set([
1026
+ ]), ir = /* @__PURE__ */ new Set([
1027
1027
  "area",
1028
1028
  "base",
1029
1029
  "br",
@@ -1040,7 +1040,7 @@ const Pt = /* @__PURE__ */ new Set(["itemScope"]), gi = /* @__PURE__ */ new Set(
1040
1040
  "source",
1041
1041
  "track",
1042
1042
  "wbr"
1043
- ]), ct = /* @__PURE__ */ new Set([
1043
+ ]), lt = /* @__PURE__ */ new Set([
1044
1044
  "animate",
1045
1045
  "animateMotion",
1046
1046
  "animateTransform",
@@ -1099,7 +1099,7 @@ const Pt = /* @__PURE__ */ new Set(["itemScope"]), gi = /* @__PURE__ */ new Set(
1099
1099
  "tspan",
1100
1100
  "use",
1101
1101
  "view"
1102
- ]), tr = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), lt = /* @__PURE__ */ new Set([
1102
+ ]), sr = /* @__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 Pt = /* @__PURE__ */ new Set(["itemScope"]), gi = /* @__PURE__ */ new Set(
1131
1131
  "munder",
1132
1132
  "munderover",
1133
1133
  "semantics"
1134
- ]), ir = /* @__PURE__ */ new Set([
1134
+ ]), rr = /* @__PURE__ */ new Set([
1135
1135
  "annotation-xml",
1136
1136
  "color-profile",
1137
1137
  "font-face",
@@ -1141,7 +1141,7 @@ const Pt = /* @__PURE__ */ new Set(["itemScope"]), gi = /* @__PURE__ */ new Set(
1141
1141
  "font-face-name",
1142
1142
  "missing-glyph"
1143
1143
  ]);
1144
- function sr(e) {
1144
+ function nr(e) {
1145
1145
  if (e.length === 0)
1146
1146
  return "";
1147
1147
  const t = e[0];
@@ -1154,11 +1154,11 @@ function sr(e) {
1154
1154
  }
1155
1155
  return e.trim().length === 0 ? t : e;
1156
1156
  }
1157
- const rr = (e) => e.replaceAll("\\", "\\\\").replace(nr, "\\${").replaceAll("`", "\\`"), nr = /\$\{/gu, or = (e) => !ar.test(e), ar = /^[^\s"'=<>`]+$/u, cr = /[&<>]/gu, lr = {
1157
+ const or = (e) => e.replaceAll("\\", "\\\\").replace(ar, "\\${").replaceAll("`", "\\`"), ar = /\$\{/gu, cr = (e) => !lr.test(e), lr = /^[^\s"'=<>`]+$/u, dr = /[&<>]/gu, pr = {
1158
1158
  "&": "&amp;",
1159
1159
  "<": "&lt;",
1160
1160
  ">": "&gt;"
1161
- }, hi = (e) => e.replace(cr, (t) => lr[t]), dt = (e) => typeof e == "string" && e.includes("-") && !ir.has(e), dr = ["keyed", "ref", "repeat", "live"], ae = "staticHtml", Y = "staticSvg", ce = "html", se = "svg", yi = /* @__PURE__ */ Symbol("maybe HTML namespace or maybe SVG"), vi = "css", bi = "mathml", wi = [vi, ce, bi, ae, Y, se], pr = new Set(wi), ur = ["safeClassMap", "safeStyleMap", "deferLoad", "stabilizedRef"], mr = "nothing", fr = [...dr, ...wi, ...ur, mr], gr = (e) => o.isArrayLiteralExpression(e) && e.elements.every((t) => fe(t)), fe = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e), re = {
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 = {
1162
1162
  [ce]: ["lit", "lit/html.js", "lit-html"],
1163
1163
  /**
1164
1164
  * Sadly, Lit called these "html" and "svg", rather than "staticHtml" and
@@ -1169,8 +1169,8 @@ const rr = (e) => e.replaceAll("\\", "\\\\").replace(nr, "\\${").replaceAll("`",
1169
1169
  [ae]: ["lit/static-html.js", "lit-html/static.js"],
1170
1170
  [se]: ["lit", "lit-html", "lit/html.js"],
1171
1171
  [Y]: ["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"],
1172
+ [wi]: ["lit", "lit-html", "lit/html.js"],
1173
+ [bi]: ["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 rr = (e) => e.replaceAll("\\", "\\\\").replace(nr, "\\${").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
- }, hr = /* @__PURE__ */ new Set([
1183
+ }, vr = /* @__PURE__ */ new Set([
1184
1184
  "h",
1185
1185
  "Fragment",
1186
1186
  "state",
@@ -1190,7 +1190,7 @@ const rr = (e) => e.replaceAll("\\", "\\\\").replace(nr, "\\${").replaceAll("`",
1190
1190
  "bindProperty",
1191
1191
  "bindEvent",
1192
1192
  "bindAttribute"
1193
- ]), yr = /\.(?:css|s[ac]ss|less|styl(?:us)?|postcss|pcss|sss)(\\?|$)/u, de = "@arcgis/lumina:loadLitCss", Ie = "?litCss", Q = "?layeredLitCss", Ze = "?globalFileLitCss", vr = (e) => ({
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) => ({
1194
1194
  name: de,
1195
1195
  enforce: "pre",
1196
1196
  configResolved(t) {
@@ -1230,14 +1230,14 @@ const rr = (e) => e.replaceAll("\\", "\\\\").replace(nr, "\\${").replaceAll("`",
1230
1230
  if (l && (a = a.slice(0, -Ze.length)), !c && !d && !l)
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(Si) || !f.endsWith(br) ? (T.warn(
1233
+ return typeof f != "string" || !f.startsWith(Ci) || !f.endsWith(Sr) ? (T.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 = Ci(f), { code: "", map: { mappings: "" } }) : {
1238
+ ), m) : l ? (e._globalCssString = Ei(f), { code: "", map: { mappings: "" } }) : {
1239
1239
  ...g,
1240
- code: Er(f, e.hmrEnabled, e.shouldMinify, d),
1240
+ code: $r(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 rr = (e) => e.replaceAll("\\", "\\\\").replace(nr, "\\${").replaceAll("`",
1247
1247
  }
1248
1248
  };
1249
1249
  }
1250
- }), Si = 'export default "', br = '"', wr = `import { css } from '${re.css[0]}';
1251
- export const styles = css\``, Sr = "`;\nexport default styles;", Cr = `
1250
+ }), Ci = 'export default "', Sr = '"', Cr = `import { css } from '${re.css[0]}';
1251
+ export const styles = css\``, Er = "`;\nexport default styles;", Tr = `
1252
1252
 
1253
1253
  if(import.meta.hot) {
1254
1254
  import.meta.hot.data.styles ??= styles;
@@ -1259,24 +1259,24 @@ if(import.meta.hot) {
1259
1259
  }
1260
1260
  import.meta.hot.data.styles.styleSheet.replaceSync(nextExports.styles.cssText);
1261
1261
  });
1262
- }`, Ci = (e) => e.slice(Si.length - 1);
1263
- function Er(e, t, i, s) {
1264
- const n = Ci(e), r = JSON.parse(n), a = rr(r), c = s ? `@layer{${i ? "" : `
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 ? "" : `
1265
1265
  `}${a}${i ? "" : `
1266
1266
  `}}` : a;
1267
- return `${wr}${c}${Sr}${t ? Cr : ""}`;
1267
+ return `${Cr}${c}${Er}${t ? Tr : ""}`;
1268
1268
  }
1269
- function Tr(e) {
1270
- return `import("${$r}").then(({ setCustomElementsManifest }) => {
1271
- setCustomElementsManifest(${Pr(e)});
1269
+ function Pr(e) {
1270
+ return `import("${kr}").then(({ setCustomElementsManifest }) => {
1271
+ setCustomElementsManifest(${Ir(e)});
1272
1272
  });`;
1273
1273
  }
1274
- const $r = "@storybook/web-components-vite", Pr = (e) => `JSON.parse(\`${kr(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
1275
- function kr(e) {
1274
+ const kr = "@storybook/web-components-vite", Ir = (e) => `JSON.parse(\`${xr(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
1275
+ function xr(e) {
1276
1276
  return e.replaceAll('\\"', '"').replaceAll("`", "\\`").replaceAll("${", "\\${");
1277
1277
  }
1278
- function Ir(e) {
1279
- xr(e);
1278
+ function Ar(e) {
1279
+ Lr(e);
1280
1280
  const t = e.options.css?.globalStylesPath;
1281
1281
  if (t === void 0)
1282
1282
  return "";
@@ -1284,21 +1284,21 @@ function Ir(e) {
1284
1284
  return e.viteCommand === "serve" || e.isInStorybook ? [
1285
1285
  `import globalStyles from "${i}${Q}";`,
1286
1286
  "document.adoptedStyleSheets = [...document.adoptedStyleSheets, globalStyles.styleSheet!];",
1287
- Ti("", e)
1287
+ $i("", e)
1288
1288
  ].join(`
1289
1289
  `) : `import "${i}${Ze}";`;
1290
1290
  }
1291
- const Ei = "hydrated";
1292
- function xr(e) {
1291
+ const Ti = "hydrated";
1292
+ function Lr(e) {
1293
1293
  e._globalHydratedCssString = [
1294
1294
  ":not([",
1295
- e.options.css?.hydratedAttribute ?? Ei,
1295
+ e.options.css?.hydratedAttribute ?? Ti,
1296
1296
  "]):is(",
1297
1297
  e.apiJsonComponents.map((t) => t.tagName).join(","),
1298
1298
  "){visibility:hidden}"
1299
1299
  ].join("");
1300
1300
  }
1301
- function Ti(e, t) {
1301
+ function $i(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 Ti(e, t) {
1306
1306
  ].join(`
1307
1307
  `);
1308
1308
  }
1309
- const Ar = (e) => `@layer{${e.shouldMinify ? "" : `
1309
+ const Nr = (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 Lr(e) {
1314
+ function jr(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(Nr(n, e, s.sourcePath)), t.push(s.sourcePath));
1318
+ n.customElement === !0 && (i.push(Fr(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
- Ir(e),
1323
- e.hmrEnabled ? Fr : "",
1322
+ Ar(e),
1323
+ e.hmrEnabled ? Rr : "",
1324
1324
  "",
1325
- e.isInStorybook ? Tr(e.apiJson) : "",
1325
+ e.isInStorybook ? Pr(e.apiJson) : "",
1326
1326
  "",
1327
1327
  "export const defineCustomElements = makeDefineCustomElements(runtime, {",
1328
1328
  i.join(`,
1329
1329
  `),
1330
1330
  "});",
1331
- e.hmrEnabled ? Rr(t) : ""
1331
+ e.hmrEnabled ? Or(t) : ""
1332
1332
  ].join(`
1333
1333
  `);
1334
1334
  }
1335
- const Nr = (e, t, i) => [
1335
+ const Fr = (e, t, i) => [
1336
1336
  ` "${e.tagName}": [`,
1337
1337
  `()=>import("${u.join(t.dir.root, i)}"),`,
1338
- jr(e),
1338
+ Dr(e),
1339
1339
  "]"
1340
1340
  ].join("");
1341
- function jr(e) {
1342
- const { properties: t, asyncMethods: i, syncMethods: s, formAssociated: n } = $i(e), r = t.map((g) => g.join($s)).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(Ps)}"` : ""}${n ? ",1" : ""}`;
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" : ""}`;
1344
1344
  }
1345
- function $i(e) {
1345
+ function Pi(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 !== si(a.name);
1350
+ const c = typeof a.attribute == "string", d = c && a.attribute !== ni(a.name);
1351
1351
  t.push(
1352
1352
  c && !d ? [a.name] : [a.name, d ? String(a.attribute) : ""]
1353
1353
  );
1354
- } else a.kind === "method" && a.name !== "componentOnReady" && (Fs(a) ? i.push(a.name) : s.push(a.name));
1354
+ } else a.kind === "method" && a.name !== "componentOnReady" && (Ds(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 Fr = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
1360
- `, Rr = (e) => `
1359
+ const Rr = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
1360
+ `, Or = (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
- }`, Dr = "@arcgis/lumina-compiler", Pi = {
1368
- name: Dr
1367
+ }`, Mr = "@arcgis/lumina-compiler", ki = {
1368
+ name: Mr
1369
1369
  };
1370
- var Or = ["@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 ??= Jr(e, t), await ne;
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;
1373
1373
  }
1374
- function Mr() {
1374
+ function Br() {
1375
1375
  if (xe === void 0)
1376
1376
  throw Error(
1377
1377
  b(
@@ -1381,7 +1381,7 @@ function Mr() {
1381
1381
  );
1382
1382
  return xe;
1383
1383
  }
1384
- function Ii() {
1384
+ function xi() {
1385
1385
  if (et === void 0)
1386
1386
  throw Error(
1387
1387
  b(
@@ -1391,18 +1391,18 @@ function Ii() {
1391
1391
  );
1392
1392
  return et;
1393
1393
  }
1394
- async function Jr(e, t) {
1394
+ async function Kr(e, t) {
1395
1395
  const i = j(e), s = i.dependencies ?? {}, n = i.peerDependencies ?? {}, a = (await Promise.all(
1396
- [...Object.keys(s), ...Object.keys(n)].filter((l) => !Br.has(l)).flatMap(async (l) => await xi(l, e))
1397
- )).filter(R);
1396
+ [...Object.keys(s), ...Object.keys(n)].filter((l) => !_r.has(l)).flatMap(async (l) => await Ai(l, e))
1397
+ )).filter(D);
1398
1398
  xe ??= a, et = Object.fromEntries(a.flatMap((l) => Object.entries(l.components)));
1399
1399
  const c = t?.serve?.extraDependencies?.map(
1400
1400
  (l) => typeof l == "string" ? l : l.name
1401
1401
  ), d = c === void 0 ? a : a.filter((l) => !c.includes(l.packageName));
1402
1402
  return xe ??= d, d;
1403
1403
  }
1404
- const Br = /* @__PURE__ */ new Set([
1405
- ...Or,
1404
+ const _r = /* @__PURE__ */ new Set([
1405
+ ...Jr,
1406
1406
  "@arcgis/languages-sdk-specs",
1407
1407
  "@commander-js/extra-typings",
1408
1408
  "@custom-elements-manifest/analyzer",
@@ -1436,29 +1436,29 @@ const Br = /* @__PURE__ */ new Set([
1436
1436
  "vscode-languageserver-types"
1437
1437
  ]);
1438
1438
  let xe, et, ne;
1439
- async function xi(e, t) {
1440
- const i = await $e(e, t), s = await ai(i), n = "exports" in s, r = Yr.bind(void 0, n), a = "@stencil/core" in (s.dependencies ?? {}) || "@stencil/core" in (s.devDependencies ?? {}), c = u.join(i, "dist/esm/loader.js");
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
1441
  if (a ? await K(c) : !1) {
1442
- const g = await z(c, "utf8"), h = Kr(g, "bootstrapLazy("), y = g.indexOf(", options", h), v = g.slice(h, y), w = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
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;
1443
1443
  try {
1444
- const C = JSON.parse(w), E = Gr(C, { packageName: e, getImportPath: r });
1444
+ const C = JSON.parse(w), E = Yr(C, { packageName: e, getImportPath: r });
1445
1445
  return { packageName: e, type: "stencil", components: E, packageLocation: i, packageJson: s };
1446
1446
  } catch (C) {
1447
1447
  T.warn("@arcgis/lumina", `Failed to parse dist/esm/loader.js for ${e}.
1448
1448
  Error: ${String(C)}`);
1449
1449
  }
1450
1450
  }
1451
- const l = kt(s.customElements);
1451
+ const l = It(s.customElements);
1452
1452
  if (l != null) {
1453
- const g = u.join(i, l), h = JSON.parse(await z(g, "utf-8")), y = _r(h), v = Ai(h, {
1453
+ const g = u.join(i, l), h = JSON.parse(await z(g, "utf-8")), y = Ur(h), v = Li(h, {
1454
1454
  packageName: e,
1455
1455
  getImportPath: r
1456
1456
  });
1457
1457
  return { type: y ? "@arcgis/lumina" : "unknown", packageName: e, components: v, packageLocation: i, packageJson: s };
1458
1458
  }
1459
- const p = kt(s["web-types"]);
1459
+ const p = It(s["web-types"]);
1460
1460
  if (p != null) {
1461
- const g = u.join(i, p), h = JSON.parse(await z(g, "utf-8")), y = Wr(h, {
1461
+ const g = u.join(i, p), h = JSON.parse(await z(g, "utf-8")), y = zr(h, {
1462
1462
  packageName: e,
1463
1463
  getImportPath: r
1464
1464
  });
@@ -1466,19 +1466,19 @@ Error: ${String(C)}`);
1466
1466
  }
1467
1467
  const m = u.join(i, "dist/components");
1468
1468
  if (await K(m)) {
1469
- const g = await Xr(m, {
1469
+ const g = await Qr(m, {
1470
1470
  packageName: e,
1471
1471
  getImportPath: r
1472
1472
  });
1473
1473
  return { type: "unknown", packageName: e, components: g, packageLocation: i, packageJson: s };
1474
1474
  }
1475
1475
  }
1476
- const kt = (e) => Array.isArray(e) ? e[0] : e;
1477
- function Kr(e, t) {
1476
+ const It = (e) => Array.isArray(e) ? e[0] : e;
1477
+ function Wr(e, t) {
1478
1478
  const i = e.indexOf(t);
1479
1479
  return i === -1 ? -1 : i + t.length;
1480
1480
  }
1481
- function Ai(e, t, i = !1) {
1481
+ function Li(e, t, i = !1) {
1482
1482
  const s = /* @__PURE__ */ Object.create(null);
1483
1483
  if (e.modules === void 0)
1484
1484
  return s;
@@ -1515,11 +1515,11 @@ function Ai(e, t, i = !1) {
1515
1515
  }
1516
1516
  return s;
1517
1517
  }
1518
- const _r = (e) => (
1518
+ const Ur = (e) => (
1519
1519
  // Since 5.0
1520
1520
  e.compiler?.name === "@arcgis/api-extractor" || // Before 5.0
1521
- e.compiler?.name === Pi.name
1522
- ), Wr = (e, t) => Object.fromEntries(
1521
+ e.compiler?.name === ki.name
1522
+ ), zr = (e, t) => Object.fromEntries(
1523
1523
  (e.contributions?.html?.elements ?? e.contributions?.html?.tags)?.map(
1524
1524
  (i) => [
1525
1525
  i.name,
@@ -1530,7 +1530,7 @@ const _r = (e) => (
1530
1530
  }
1531
1531
  ]
1532
1532
  ) ?? []
1533
- ), Ur = 1, zr = 2, Hr = 4, qr = 8, Vr = Ur | zr | Hr | qr, Gr = (e, t) => Object.fromEntries(
1533
+ ), Hr = 1, qr = 2, Vr = 4, Gr = 8, Xr = Hr | qr | Vr | Gr, Yr = (e, t) => Object.fromEntries(
1534
1534
  e.flatMap(
1535
1535
  ([i, s]) => s.map(
1536
1536
  ([n, r, a]) => [
@@ -1539,14 +1539,14 @@ const _r = (e) => (
1539
1539
  packageName: t.packageName,
1540
1540
  modulePath: t.getImportPath(r),
1541
1541
  propToAttribute: Object.fromEntries(
1542
- Object.entries(a ?? {}).filter(([c, [d]]) => d & Vr).map(([c, [d, l = c]]) => [c, l])
1542
+ Object.entries(a ?? {}).filter(([c, [d]]) => d & Xr).map(([c, [d, l = c]]) => [c, l])
1543
1543
  )
1544
1544
  }
1545
1545
  ]
1546
1546
  )
1547
1547
  )
1548
- ), Xr = async (e, t) => Object.fromEntries(
1549
- (await at(e)).filter((i) => i.endsWith(".d.ts")).map((i) => {
1548
+ ), Qr = async (e, t) => Object.fromEntries(
1549
+ (await ct(e)).filter((i) => i.endsWith(".d.ts")).map((i) => {
1550
1550
  const s = i.slice(0, -5);
1551
1551
  return [
1552
1552
  s,
@@ -1557,34 +1557,34 @@ const _r = (e) => (
1557
1557
  }
1558
1558
  ];
1559
1559
  })
1560
- ), Yr = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, Qr = (e) => e.startsWith("/") ? e : `/${e}`, pt = (e, t) => `${e}@fs${Qr(t)}`;
1561
- function Zr(e, t) {
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) {
1562
1562
  const i = u.resolve(e), s = u.resolve(i, t.split(/[?#]/u)[0].replace(/^[/\\]+/u, "")), n = u.relative(i, s);
1563
1563
  return n === ".." || n.startsWith(`..${u.sep}`) || u.isAbsolute(n) ? void 0 : s;
1564
1564
  }
1565
- const Li = "packages/core-packages/core/src", en = "packages/core-packages/core/output/npm/esm", te = !import.meta.url.includes("node_modules");
1566
- function ut(e) {
1567
- return te && e.name !== "@esri/calcite-components" ? "6.0.0-next.3" : e.version;
1565
+ const Ni = "packages/core-packages/core/src", sn = "packages/core-packages/core/output/npm/esm", te = !import.meta.url.includes("node_modules");
1566
+ function mt(e) {
1567
+ return te && e.name !== "@esri/calcite-components" ? "6.0.0-next.4" : e.version;
1568
1568
  }
1569
- function Ni({ command: e }) {
1569
+ function ji({ command: e }) {
1570
1570
  return e === "serve" && process.argv.includes("--local-core");
1571
1571
  }
1572
- function ji(e) {
1572
+ function Fi(e) {
1573
1573
  const t = e?.apiExtractorPluginConfig.unsafeConfigOverride?.types?.typeScriptConfig?.config.options.target ?? o.ScriptTarget.ESNext, i = o.ScriptTarget[t].toLowerCase();
1574
1574
  return i === "latest" ? "esnext" : i;
1575
1575
  }
1576
1576
  const tt = "@arcgis/lumina:provideAssets";
1577
- function ie(e, t, i = mt, s = "max-age=31536000, immutable") {
1577
+ function ie(e, t, i = ft, s = "max-age=31536000, immutable") {
1578
1578
  if (e.viteCommand !== "serve")
1579
1579
  throw Error(b(tt, "serveAssets() is only available when Vite is running in serve mode"));
1580
1580
  const n = e._serverConfigured, r = e.server.middlewares.stack.length;
1581
1581
  if (t.forEach((a) => {
1582
- const c = Ri(a), d = Oi(e.dir, Di(c)), l = sn(e.viteConfig.base, d, e.dir.distCdn);
1582
+ const c = Ri(a), d = Mi(e.dir, Oi(c)), l = nn(e.viteConfig.base, d, e.dir.distCdn);
1583
1583
  e.server.middlewares.use(l, (p, m, f) => {
1584
- const g = rn(p.url), h = c.type === "directory" ? Zr(c.source, g) : c.source, y = u.join(d, g), v = i.find((w) => w.match(y, e));
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
1585
  return h === void 0 ? (m.statusCode = 403, m.end(), !0) : ((typeof h == "function" ? Promise.resolve(h()) : z(h)).then((w) => {
1586
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", _s.lookup(g) || "application/octet-stream"), m.write(C), m.end();
1587
+ m.setHeader("Cache-Control", s), m.setHeader("Content-Type", Ws.lookup(g) || "application/octet-stream"), m.write(C), m.end();
1588
1588
  }).catch((w) => {
1589
1589
  (c.type !== "directory" || process.env.DEBUG) && T.warn(
1590
1590
  tt,
@@ -1597,22 +1597,22 @@ function ie(e, t, i = mt, s = "max-age=31536000, immutable") {
1597
1597
  e.server.middlewares.stack.splice(0, 0, ...a);
1598
1598
  }
1599
1599
  }
1600
- async function Fi(e, t, i = mt) {
1600
+ async function Di(e, t, i = ft) {
1601
1601
  await Promise.all(
1602
1602
  t.map(async (s) => {
1603
- const n = Ri(s), r = Oi(e.dir, Di(n));
1603
+ const n = Ri(s), r = Mi(e.dir, Oi(n));
1604
1604
  if (n.type === "directory") {
1605
- const a = u.resolve(n.source), d = (await at(a, { recursive: !0, withFileTypes: !0 })).filter((l) => l.isFile()).map((l) => {
1605
+ const a = u.resolve(n.source), d = (await ct(a, { recursive: !0, withFileTypes: !0 })).filter((l) => l.isFile()).map((l) => {
1606
1606
  const p = u.resolve(l.parentPath, l.name), m = u.relative(a, p), f = u.join(r, m);
1607
1607
  return [p, f];
1608
1608
  });
1609
- await Ji(d.map(([l, p]) => p)), await Ws(
1609
+ await Bi(d.map(([l, p]) => p)), await Us(
1610
1610
  d,
1611
1611
  16,
1612
- async ([l, p]) => await It(l, p, i, e)
1612
+ async ([l, p]) => await xt(l, p, i, e)
1613
1613
  );
1614
1614
  } else if (n.type === "file")
1615
- await X(u.dirname(r), { recursive: !0 }), await It(n.source, r, i, e);
1615
+ await X(u.dirname(r), { recursive: !0 }), await xt(n.source, r, i, e);
1616
1616
  else if (n.type === "dynamic") {
1617
1617
  await X(u.dirname(r), { recursive: !0 });
1618
1618
  const a = await Promise.resolve(n.source());
@@ -1621,7 +1621,7 @@ async function Fi(e, t, i = mt) {
1621
1621
  })
1622
1622
  );
1623
1623
  }
1624
- const Ri = ri ? (e) => e : (e) => e.type === "dynamic" ? {
1624
+ const Ri = oi ? (e) => e : (e) => e.type === "dynamic" ? {
1625
1625
  ...e,
1626
1626
  destination: G(e.destination)
1627
1627
  } : {
@@ -1629,16 +1629,16 @@ const Ri = ri ? (e) => e : (e) => e.type === "dynamic" ? {
1629
1629
  source: G(e.source),
1630
1630
  destination: G(e.destination)
1631
1631
  };
1632
- async function It(e, t, i, s) {
1632
+ async function xt(e, t, i, s) {
1633
1633
  const n = i.find((r) => r.match(t, s));
1634
1634
  if (n === void 0)
1635
- await Ms(e, t);
1635
+ await Js(e, t);
1636
1636
  else {
1637
1637
  const r = await z(e, "utf8"), a = n.transform(r, t, s);
1638
1638
  await _(t, a);
1639
1639
  }
1640
1640
  }
1641
- function Di(e) {
1641
+ function Oi(e) {
1642
1642
  if (e.type === "dynamic")
1643
1643
  return e.destination;
1644
1644
  if (e.source.endsWith(u.sep)) {
@@ -1646,47 +1646,47 @@ function Di(e) {
1646
1646
  throw Error(
1647
1647
  b(
1648
1648
  tt,
1649
- `Unexpectedly tried to provide an asset with type "file", whose source looks like a directory: ${Re(e.source)}. If source is meant to be a directory, change to "type":"directory". If source is a file, make sure source path does not end with / or \\`
1649
+ `Unexpectedly tried to provide an asset with type "file", whose source looks like a directory: ${De(e.source)}. If source is meant to be a directory, change to "type":"directory". If source is a file, make sure source path does not end with / or \\`
1650
1650
  )
1651
1651
  );
1652
1652
  return e.destination;
1653
1653
  }
1654
1654
  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
1655
  }
1656
- function Oi({ dist: e, distCdnAssets: t }, i) {
1657
- const s = tn(i), n = u.join(
1656
+ function Mi({ dist: e, distCdnAssets: t }, i) {
1657
+ const s = rn(i), n = u.join(
1658
1658
  t,
1659
1659
  s ? u.relative(t, i) : i
1660
- ), r = u.relative(e, n), a = Mi(r);
1660
+ ), r = u.relative(e, n), a = Ji(r);
1661
1661
  return u.join(e, a);
1662
1662
  }
1663
- function tn(e) {
1663
+ function rn(e) {
1664
1664
  if (e.startsWith(u.sep)) {
1665
- const t = ni(), i = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
1665
+ const t = ai(), i = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
1666
1666
  return e.startsWith(`/${i}/`) || e.startsWith("/Users/");
1667
1667
  } else
1668
- return !!(!ri && u.isAbsolute(e));
1668
+ return !!(!oi && u.isAbsolute(e));
1669
1669
  }
1670
- function sn(e, t, i) {
1671
- const s = Mi(u.relative(i, t)), n = s.startsWith("/") ? s.slice(1) : s;
1670
+ function nn(e, t, i) {
1671
+ const s = Ji(u.relative(i, t)), n = s.startsWith("/") ? s.slice(1) : s;
1672
1672
  return `${e}${n}`;
1673
1673
  }
1674
- const Mi = (e) => e.replaceAll("../", ""), rn = (e = "") => e.split("?")[0].split("#")[0];
1675
- async function Ji(e) {
1674
+ const Ji = (e) => e.replaceAll("../", ""), on = (e = "") => e.split("?")[0].split("#")[0];
1675
+ async function Bi(e) {
1676
1676
  const t = new Set(e.map(u.dirname));
1677
1677
  await Promise.all(Array.from(t, async (i) => await X(i, { recursive: !0 })));
1678
1678
  }
1679
- const nn = {
1679
+ const an = {
1680
1680
  match: (e, t) => t.environment === "production" && e.endsWith(".json"),
1681
1681
  transform: (e) => JSON.stringify(JSON.parse(e))
1682
- }, mt = [nn], 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
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
1683
1683
  _e.name === "@arcgis/lumina";
1684
- async function on(e, t, i, s) {
1684
+ async function cn(e, t, i, s) {
1685
1685
  if (!H)
1686
1686
  return [];
1687
1687
  const n = e._localCdnCore, r = n?.packageLocation ?? await $e(Ae);
1688
1688
  if (i === "cdn") {
1689
- const a = await ai(r), c = De(a, s);
1689
+ const a = await ci(r), c = Re(a, s);
1690
1690
  return [
1691
1691
  // Use the ESM CDN
1692
1692
  // <script src="https://jsdev.arcgis.com/VERSION/"><\/script>
@@ -1702,18 +1702,18 @@ async function on(e, t, i, s) {
1702
1702
  })
1703
1703
  },
1704
1704
  // <link rel="stylesheet" id="arcgisCoreStylesheet" href="https://jsdev.arcgis.com/VERSION/esri/themes/light/main.css" />
1705
- Bi(c)
1705
+ Ki(c)
1706
1706
  ];
1707
1707
  } else
1708
- return an(t, r, n?.sourceLocation !== void 0);
1708
+ return ln(t, r, n?.sourceLocation !== void 0);
1709
1709
  }
1710
- function an(e, t, i) {
1710
+ function ln(e, t, i) {
1711
1711
  const s = `${e}${me}`;
1712
1712
  return [
1713
1713
  // Browser tests import this as a Vite CSS module and adopt its stylesheet, so CSS must remain on the /@fs route.
1714
1714
  // Core's prebuilt JavaScript assets use the untransformed route configured below.
1715
- Bi(
1716
- i ? `${e}${me}/` : pt(e, `${t}/assets/`)
1715
+ Ki(
1716
+ i ? `${e}${me}/` : ut(e, `${t}/assets/`)
1717
1717
  ),
1718
1718
  {
1719
1719
  // This import is injected dynamically, so external consumers must tell Vite to optimize it. Within the monorepo,
@@ -1726,7 +1726,7 @@ function an(e, t, i) {
1726
1726
  }
1727
1727
  ];
1728
1728
  }
1729
- async function cn(e) {
1729
+ async function dn(e) {
1730
1730
  const t = e._localCdnCore, i = t?.packageLocation ?? await $e(Ae), s = t?.sourceLocation !== void 0 ? [
1731
1731
  {
1732
1732
  type: "directory",
@@ -1768,27 +1768,27 @@ async function cn(e) {
1768
1768
  ];
1769
1769
  e.server.middlewares.use("/builddate.txt", (n, r) => {
1770
1770
  r.setHeader("Cache-Control", "no-cache"), r.setHeader("Content-Type", "text/plain");
1771
- const a = t?.sourceLocation ? "6.0.0-next.3" : j(i).version;
1771
+ const a = t?.sourceLocation ? "6.0.0-next.4" : j(i).version;
1772
1772
  r.end(JSON.stringify({ version: a }));
1773
1773
  }), ie(e, s, [], "no-cache");
1774
1774
  }
1775
- const Bi = (e) => ({
1775
+ const Ki = (e) => ({
1776
1776
  // Not using join() because it would turn https:// into https:/
1777
1777
  cssHref: `${e}esri/themes/light/main.css`,
1778
1778
  // This is used be the theme switcher in `@arcgis/storybook-utils`
1779
1779
  id: "arcgisCoreStylesheet"
1780
- }), ft = "customElement.js";
1781
- function ln(e, t) {
1780
+ }), gt = "customElement.js";
1781
+ function pn(e, t) {
1782
1782
  if (!t.startsWith(e))
1783
1783
  return t;
1784
1784
  const s = t.split(u.sep);
1785
- return s.at(dn) !== s.at(pn) ? t : u.join(s.slice(0, -1).join(u.sep), ft);
1785
+ return s.at(un) !== s.at(mn) ? t : u.join(s.slice(0, -1).join(u.sep), gt);
1786
1786
  }
1787
- const dn = -1, pn = -2, un = /["']\.\.?\/[^'"]+/gu, mn = (e, t, i, s) => e.replaceAll(un, (n) => {
1787
+ const un = -1, mn = -2, fn = /["']\.\.?\/[^'"]+/gu, gn = (e, t, i, s) => e.replaceAll(fn, (n) => {
1788
1788
  const r = n.slice(1);
1789
1789
  if (!r.startsWith("./") && !r.startsWith("../"))
1790
1790
  return n;
1791
- const a = u.join(s, r), c = !r.endsWith(".js") && !r.split("/").at(-1).includes(".") ? ln(t.dir.distComponents, a) : a, d = c.startsWith(t.dir.distComponents) ? t.dir.dist + Ge(c.slice(t.dir.dist.length), t.apiExtractor) : c;
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;
1792
1792
  if (i === s && a === d)
1793
1793
  return n;
1794
1794
  const l = he(i, d), p = n.endsWith("/") ? `${l}/` : l;
@@ -1797,12 +1797,12 @@ const dn = -1, pn = -2, un = /["']\.\.?\/[^'"]+/gu, mn = (e, t, i, s) => e.repla
1797
1797
  const i = u.relative(e, t);
1798
1798
  return i.startsWith(".") ? i : `.${u.sep}${i}`;
1799
1799
  };
1800
- async function fn(e, t, i) {
1800
+ async function hn(e, t, i) {
1801
1801
  const s = u.resolve(e.dir.root, t);
1802
- e.viteConfig.build.emptyOutDir !== !1 && await K(s) && await Js(s, { recursive: !0, force: !0 }), await X(s, { recursive: !0 }), await Bs(e.dir.distCdn, u.join(s, "build"), { recursive: !0 });
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 });
1803
1803
  const n = [
1804
1804
  "index.html",
1805
- ...await Us("**/*.html", {
1805
+ ...await zs("**/*.html", {
1806
1806
  cwd: e.dir.src,
1807
1807
  onlyFiles: !0,
1808
1808
  // The files we are looking for are unlikely to be symbolic links
@@ -1840,7 +1840,21 @@ async function fn(e, t, i) {
1840
1840
  })
1841
1841
  ), await e.options.build?.webApp?.afterBuildEnd?.(e);
1842
1842
  }
1843
- const Ki = /* @__PURE__ */ new Set([
1843
+ const At = /* @__PURE__ */ new Map();
1844
+ function yn(e) {
1845
+ const t = e.endsWith(".js") ? `${e.slice(0, -3)}.d.ts` : `${e}.d.ts`, i = at(`node_modules/${t}`);
1846
+ if (i === void 0)
1847
+ throw Error(`Could not find declarations for ${e} while transforming a dynamic CDN import.`);
1848
+ const s = At.get(i);
1849
+ if (s !== void 0)
1850
+ return s;
1851
+ const r = o.createSourceFile(i, Hs(i, "utf8"), o.ScriptTarget.Latest).statements.some(vn);
1852
+ return At.set(i, r), r;
1853
+ }
1854
+ function vn(e) {
1855
+ 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
+ }
1857
+ const _i = /* @__PURE__ */ new Set([
1844
1858
  "chunks",
1845
1859
  "components",
1846
1860
  "docs",
@@ -1853,13 +1867,13 @@ const Ki = /* @__PURE__ */ new Set([
1853
1867
  "collection",
1854
1868
  "extras",
1855
1869
  "support"
1856
- ]), O = "@arcgis/lumina:buildCdn", le = "cdn", _i = "index", Z = "main";
1857
- function gn(e) {
1870
+ ]), O = "@arcgis/lumina:buildCdn", le = "cdn", Wi = "index", Z = "main";
1871
+ function bn(e) {
1858
1872
  const { skip: t = !1, namespace: i, esbuildOptions: s = {}, entrypointTransformer: n } = e.options.build?.cdn ?? {}, r = e.options.build?.webApp?.destination, a = i !== void 0;
1859
1873
  if (a) {
1860
1874
  if (i.toLowerCase() !== i)
1861
1875
  throw new Error(`Expected CDN namespace to be all lowercase. Received: ${i}`);
1862
- if (Ki.has(i))
1876
+ if (_i.has(i))
1863
1877
  throw new Error(
1864
1878
  `Namespace name "${i}" is restricted as it collides with a well-known Lumina dist/ folder name or Stencil dist/ folder name.`
1865
1879
  );
@@ -1867,11 +1881,11 @@ function gn(e) {
1867
1881
  'The "namespace" option in the "build.cdn" is deprecated and will be removed in the next major version.'
1868
1882
  );
1869
1883
  }
1870
- const c = i ?? _i;
1884
+ const c = i ?? Wi;
1871
1885
  if (e.provideAssets([
1872
1886
  {
1873
1887
  type: "dynamic",
1874
- source: () => Ar(e),
1888
+ source: () => Nr(e),
1875
1889
  destination: `../${a ? c : Z}.css`
1876
1890
  }
1877
1891
  ]), !t)
@@ -1887,7 +1901,7 @@ function gn(e) {
1887
1901
  );
1888
1902
  return;
1889
1903
  }
1890
- 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 hn(
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(
1891
1905
  e,
1892
1906
  c,
1893
1907
  s,
@@ -1895,7 +1909,7 @@ function gn(e) {
1895
1909
  n,
1896
1910
  d
1897
1911
  );
1898
- await yn(
1912
+ await Sn(
1899
1913
  m,
1900
1914
  e,
1901
1915
  a ? `${c}.esm` : c,
@@ -1903,11 +1917,11 @@ function gn(e) {
1903
1917
  d
1904
1918
  );
1905
1919
  const f = Date.now();
1906
- T.info(O, `CDN was built in ${f - l}ms`), r && await fn(e, r, `${a ? `${c}.esm` : c}.js`);
1920
+ T.info(O, `CDN was built in ${f - l}ms`), r && await hn(e, r, `${a ? `${c}.esm` : c}.js`);
1907
1921
  }
1908
1922
  };
1909
1923
  }
1910
- async function hn(e, t, i, s, n, r) {
1924
+ async function wn(e, t, i, s, n, r) {
1911
1925
  const a = e.environment;
1912
1926
  if (i.minify && r)
1913
1927
  throw Error(
@@ -1930,8 +1944,8 @@ async function hn(e, t, i, s, n, r) {
1930
1944
  * The script's file name will be stripped inside defineCustomElements.
1931
1945
  **/
1932
1946
  defineCustomElements({resourcesUrl: import.meta.url});
1933
- ${Ti(e._globalCssString, e)}`, d = n?.(c, e) ?? c;
1934
- return await Ks({
1947
+ ${$i(e._globalCssString, e)}`, d = n?.(c, e) ?? c;
1948
+ return await _s({
1935
1949
  bundle: !0,
1936
1950
  minify: r ? !0 : a === "production",
1937
1951
  treeShaking: !0,
@@ -1956,7 +1970,7 @@ ${Ti(e._globalCssString, e)}`, d = n?.(c, e) ?? c;
1956
1970
  chunkNames: "[hash]",
1957
1971
  resolveExtensions: [".js", ".json"],
1958
1972
  banner: { js: e.banner },
1959
- target: ji(e),
1973
+ target: Fi(e),
1960
1974
  ...i,
1961
1975
  write: !1,
1962
1976
  plugins: [
@@ -2015,8 +2029,8 @@ ${Ti(e._globalCssString, e)}`, d = n?.(c, e) ?? c;
2015
2029
  }
2016
2030
  });
2017
2031
  }
2018
- const xt = "stdin.js";
2019
- async function yn(e, t, i, s, n) {
2032
+ const Lt = "stdin.js";
2033
+ async function Sn(e, t, i, s, n) {
2020
2034
  const r = t.dir.distCdn, a = `${i}.js`;
2021
2035
  let c;
2022
2036
  n && (c = new Set(s.map((p) => `${p.out}.js`)), c.add(a));
@@ -2028,15 +2042,15 @@ async function yn(e, t, i, s, n) {
2028
2042
  isAsync: void 0,
2029
2043
  oldSingleExportName: void 0
2030
2044
  }, f = G(p.path.slice(r.length));
2031
- if (f === xt) {
2045
+ if (f === Lt) {
2032
2046
  if (n) {
2033
- const h = p.text.match(vn)?.[0];
2047
+ const h = p.text.match(Cn)?.[0];
2034
2048
  if (h === void 0)
2035
2049
  throw Error(
2036
- `Failed to find the runtime variable name in the CDN entrypoint file. This likely indicates a bug in Lumina. ${xt} contents:
2050
+ `Failed to find the runtime variable name in the CDN entrypoint file. This likely indicates a bug in Lumina. ${Lt} contents:
2037
2051
  ${p.text}`
2038
2052
  );
2039
- m.code = `${m.code.trimEnd()}${bn(h, s)}`, m.isAsync = !1;
2053
+ m.code = `${m.code.trimEnd()}${En(h, s)}`, m.isAsync = !1;
2040
2054
  }
2041
2055
  return [a, m];
2042
2056
  }
@@ -2046,7 +2060,7 @@ ${p.text}`
2046
2060
  n && d.forEach((p, m) => {
2047
2061
  if (p.isAsync === void 0)
2048
2062
  if (m.endsWith(".js")) {
2049
- if (Wi(p, d), c?.has(m) === !0 && p.code.includes(Ui))
2063
+ if (Ui(p, d), c?.has(m) === !0 && p.code.includes(zi))
2050
2064
  throw Error(
2051
2065
  b(
2052
2066
  O,
@@ -2066,8 +2080,8 @@ ${p.text}`
2066
2080
  }
2067
2081
  await Promise.all(l.values()), await Promise.all(Array.from(d.entries(), async ([p, { code: m }]) => await _(r + p, m)));
2068
2082
  }
2069
- const vn = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
2070
- function bn(e, t) {
2083
+ const Cn = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
2084
+ function En(e, t) {
2071
2085
  let i = [
2072
2086
  "window.$arcgis",
2073
2087
  "||",
@@ -2091,6 +2105,9 @@ function bn(e, t) {
2091
2105
  if (i += [
2092
2106
  "a.t=(c,...x)=>",
2093
2107
  "Promise.all(",
2108
+ // Unwrap .default exports to match the more common non-dynamic ESM imports
2109
+ // semantics. This reduces the bundle size in the final output by avoiding
2110
+ // .default unwrapping at each import site.
2094
2111
  'x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))',
2095
2112
  ").then(c);",
2096
2113
  // Start loading from reactiveUtils the modules we need to enable integration.
@@ -2108,33 +2125,33 @@ function bn(e, t) {
2108
2125
  }
2109
2126
  return i += ")", i;
2110
2127
  }
2111
- function Wi(e, t) {
2128
+ function Ui(e, t) {
2112
2129
  if (e.isProcessing) {
2113
- e.isAsync = !0, At(e);
2130
+ e.isAsync = !0, Nt(e);
2114
2131
  return;
2115
2132
  }
2116
2133
  e.isProcessing = !0;
2117
2134
  const i = [], s = [], n = [], r = /* @__PURE__ */ new Set(), a = [];
2118
2135
  let c = 0;
2119
- const d = e.code.matchAll(wn);
2136
+ const d = e.code.matchAll(Tn);
2120
2137
  for (const S of d) {
2121
2138
  const [A, L, U, F, N] = S, B = N.startsWith(Le);
2122
2139
  if (c !== 0 && c !== S.index) {
2123
- const D = e.code.slice(c, S.index);
2124
- n.push(D), a.push([c, D.length, 0, ""]);
2140
+ const R = e.code.slice(c, S.index);
2141
+ n.push(R), a.push([c, R.length, 0, ""]);
2125
2142
  }
2126
2143
  if (c = S.index + A.length, B)
2127
- a.push([S.index, A.length, 0, ""]), s.push(`"${Hi(N.slice(Le.length))}"`), i.push(L?.replaceAll(" as ", ":") ?? U ?? F ?? "");
2144
+ a.push([S.index, A.length, 0, ""]), s.push(`"${qi(N.slice(Le.length))}"`), i.push(L?.replaceAll(" as ", ":") ?? U ?? F ?? "");
2128
2145
  else {
2129
- const D = zi(N, t), M = D?.isAsync === !0;
2146
+ const R = Hi(N, t), M = R?.isAsync === !0;
2130
2147
  if (L !== void 0) {
2131
2148
  const be = [];
2132
2149
  for (const Me of L.slice(1, -1).split(",")) {
2133
- const [wt, St = wt] = Me.split(" as ");
2134
- M || r.add(St), be.push(`${wt}:${St}`);
2150
+ const [St, Ct = St] = Me.split(" as ");
2151
+ M || r.add(Ct), be.push(`${St}:${Ct}`);
2135
2152
  }
2136
2153
  if (M) {
2137
- const Me = D.oldSingleExportName === void 0 ? `{${be.join(",")}}` : be[0].split(":")[1];
2154
+ const Me = R.oldSingleExportName === void 0 ? `{${be.join(",")}}` : be[0].split(":")[1];
2138
2155
  a.push([S.index + 6, 0, L.length, Me]);
2139
2156
  }
2140
2157
  } else if (U === void 0 && F === void 0)
@@ -2145,7 +2162,7 @@ function Wi(e, t) {
2145
2162
  b(
2146
2163
  O,
2147
2164
  `Expected local import specifiers to use only named or side-effect import syntax. Found ${A} in a chunk:
2148
- ${D.code}`
2165
+ ${R.code}`
2149
2166
  )
2150
2167
  );
2151
2168
  r.add(F ?? U);
@@ -2155,10 +2172,10 @@ ${D.code}`
2155
2172
  e.isProcessing = !1;
2156
2173
  const l = e.isAsync === !0;
2157
2174
  if (e.isAsync = l || a.length > 0, !e.isAsync) {
2158
- e.code = Lt(e.code, t);
2175
+ e.code = jt(e.code, t);
2159
2176
  return;
2160
2177
  }
2161
- const p = En(r);
2178
+ const p = kn(r);
2162
2179
  let m = e.code.slice(0, c);
2163
2180
  for (let S = a.length - 1; S >= 0; S--) {
2164
2181
  const [A, L, U, F] = a[S];
@@ -2169,15 +2186,15 @@ ${D.code}`
2169
2186
  }
2170
2187
  m = m.slice(0, A) + B + m.slice(A + N);
2171
2188
  }
2172
- const [f, g] = At(e), h = i.findLastIndex((S) => S.length > 0), y = i.slice(0, h + 1).join(","), v = i.length === 0 ? "_" : `([${y}])`, w = `${Ui}${v}=>{`, C = s.join(","), E = `${g}},${C})`;
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})`;
2173
2190
  let P = e.code.slice(c, f);
2174
- P = `${n.join("")}${P}`, P = Lt(P, t);
2191
+ P = `${n.join("")}${P}`, P = jt(P, t);
2175
2192
  const x = `${m}${w}${P}${E}`;
2176
2193
  e.code = x;
2177
2194
  }
2178
- const Ui = "export default $arcgis.t(";
2179
- function At(e) {
2180
- const t = Sn.exec(e.code), i = t?.index ?? e.code.length;
2195
+ const zi = "export default $arcgis.t(";
2196
+ function Nt(e) {
2197
+ const t = $n.exec(e.code), i = t?.index ?? e.code.length;
2181
2198
  let s = "";
2182
2199
  if (t !== null) {
2183
2200
  const n = t[1].split(",");
@@ -2193,51 +2210,52 @@ function At(e) {
2193
2210
  }
2194
2211
  return [i, s];
2195
2212
  }
2196
- const wn = /import(?:(\{[^}]+\})from|\*as ([\w$]+) from| ([\w$]+) from)?"([^"]+)";/gu, Sn = /export\{([^}]+)\};\n$/u, Le = "@arcgis/core/";
2197
- function zi(e, t) {
2213
+ const Tn = /import(?:(\{[^}]+\})from|\*as ([\w$]+) from| ([\w$]+) from)?"([^"]+)";/gu, $n = /export\{([^}]+)\};\n$/u, Le = "@arcgis/core/";
2214
+ function Hi(e, t) {
2198
2215
  if (!e.startsWith("./"))
2199
2216
  return;
2200
2217
  const i = e.slice(2), s = t.get(i);
2201
2218
  if (s === void 0)
2202
2219
  throw Error(b(O, `Failed to find the ${e} module`));
2203
- if (s.isAsync === void 0 && Wi(s, t), s.isAsync === void 0)
2220
+ if (s.isAsync === void 0 && Ui(s, t), s.isAsync === void 0)
2204
2221
  throw Error(b(O, `Failed to infer whether the ${e} module has top-level await`));
2205
2222
  return s;
2206
2223
  }
2207
- function Lt(e, t) {
2208
- return e.replaceAll(Cn, (i, s) => {
2209
- if (s.startsWith(Le))
2210
- return `$arcgis.t(m=>m[0],"${Hi(s.slice(Le.length))}")`;
2211
- if (s.startsWith("./")) {
2212
- const n = zi(s, t);
2224
+ function jt(e, t) {
2225
+ return e.replaceAll(Pn, (i, s) => {
2226
+ if (s.startsWith(Le)) {
2227
+ const n = qi(s.slice(Le.length));
2228
+ return `$arcgis.t(m=>${yn(s) ? "({default:m[0]})" : "m[0]"},"${n}")`;
2229
+ } else if (s.startsWith("./")) {
2230
+ const n = Hi(s, t);
2213
2231
  if (n?.isAsync === !0)
2214
2232
  return `${i}.then(m=>m.default${n.oldSingleExportName === void 0 ? "" : `.then(e=>({${n.oldSingleExportName}:e}))`})`;
2215
2233
  }
2216
2234
  return i;
2217
2235
  });
2218
2236
  }
2219
- const Cn = /(?<![.\w\d])import\("([^"]+)"\)/gu, Hi = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
2220
- function En(e) {
2237
+ const Pn = /(?<![.\w\d])import\("([^"]+)"\)/gu, qi = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
2238
+ function kn(e) {
2221
2239
  const t = [it];
2222
2240
  return () => {
2223
2241
  for (; ; ) {
2224
- const i = Pn(t);
2225
- if (kn(t), !e.has(i))
2242
+ const i = An(t);
2243
+ if (Ln(t), !e.has(i))
2226
2244
  return e.add(i), i;
2227
2245
  }
2228
2246
  };
2229
2247
  }
2230
- const it = 0, gt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", qi = `${gt}0123456789`, Tn = gt.length, $n = qi.length;
2231
- function Pn(e) {
2232
- let t = gt[e[0]];
2248
+ const it = 0, ht = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Vi = `${ht}0123456789`, In = ht.length, xn = Vi.length;
2249
+ function An(e) {
2250
+ let t = ht[e[0]];
2233
2251
  for (let i = 1; i < e.length; ++i)
2234
- t += qi[e[i]];
2252
+ t += Vi[e[i]];
2235
2253
  return t;
2236
2254
  }
2237
- function kn(e) {
2255
+ function Ln(e) {
2238
2256
  let t = e.length - 1;
2239
2257
  for (; t >= 0; ) {
2240
- const i = t === 0 ? Tn : $n;
2258
+ const i = t === 0 ? In : xn;
2241
2259
  if (e[t] += 1, e[t] >= i)
2242
2260
  e[t] = it, t--;
2243
2261
  else
@@ -2245,11 +2263,11 @@ function kn(e) {
2245
2263
  }
2246
2264
  e.push(it);
2247
2265
  }
2248
- function De(e = j(), t = !1) {
2249
- const i = e.name === "@esri/calcite-components", s = ut(e) ?? e.version, n = s.includes("next");
2266
+ function Re(e = j(), t = !1) {
2267
+ const i = e.name === "@esri/calcite-components", s = mt(e) ?? e.version, n = s.includes("next");
2250
2268
  if (i && n)
2251
2269
  return `https://cdn.jsdelivr.net/npm/@esri/calcite-components@${s}/dist/${le}/`;
2252
- const r = t || n ? "jsdev.arcgis.com" : "js.arcgis.com", a = In(e.name), c = xn(s);
2270
+ const r = t || n ? "jsdev.arcgis.com" : "js.arcgis.com", a = Nn(e.name), c = jn(s);
2253
2271
  if (c === void 0)
2254
2272
  throw Error(
2255
2273
  b(
@@ -2259,18 +2277,18 @@ function De(e = j(), t = !1) {
2259
2277
  );
2260
2278
  return a === "core" ? `https://${r}/${c}/` : i ? `https://${r}/${a}/${c}/` : `https://${r}/${c}/${a}/`;
2261
2279
  }
2262
- const In = (e) => e.split("/").pop() ?? e;
2263
- function xn(e) {
2280
+ const Nn = (e) => e.split("/").pop() ?? e;
2281
+ function jn(e) {
2264
2282
  const t = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)(?<prerelease>-.*)?$/u, i = e.match(t);
2265
2283
  if (i?.groups === void 0)
2266
2284
  return;
2267
2285
  const { major: s, minor: n, patch: r, prerelease: a } = i.groups, c = `${s}.${n}.${r}`;
2268
2286
  return a?.startsWith("-next") ? `${c}-next` : c;
2269
2287
  }
2270
- async function An(e, t, i, s, n) {
2271
- const r = t.packageName, { hasCss: a, cdnName: c } = await Vi(t.packageLocation) ?? {};
2288
+ async function Fn(e, t, i, s, n) {
2289
+ const r = t.packageName, { hasCss: a, cdnName: c } = await Gi(t.packageLocation) ?? {};
2272
2290
  if (i === "cdn") {
2273
- const m = t.cdnUrl ?? De(t.packageJson, n);
2291
+ const m = t.cdnUrl ?? Re(t.packageJson, n);
2274
2292
  return [
2275
2293
  ...a ? [
2276
2294
  {
@@ -2305,24 +2323,24 @@ async function An(e, t, i, s, n) {
2305
2323
  ...l,
2306
2324
  `import { defineCustomElements as defineCustomElements$${s} } from "${p}";`,
2307
2325
  `defineCustomElements$${s}(globalThis.window, {`,
2308
- ` resourcesUrl: "${pt(e, t.packageLocation)}/dist/${c}/",`,
2326
+ ` resourcesUrl: "${ut(e, t.packageLocation)}/dist/${c}/",`,
2309
2327
  "});"
2310
2328
  ]
2311
2329
  }
2312
2330
  ];
2313
2331
  }
2314
- async function Vi(e) {
2315
- const t = u.join(e, "dist"), i = u.basename(e), n = (await at(t)).filter(
2316
- (a) => !Ki.has(a) && !a.includes(".")
2332
+ async function Gi(e) {
2333
+ const t = u.join(e, "dist"), i = u.basename(e), n = (await ct(t)).filter(
2334
+ (a) => !_i.has(a) && !a.includes(".")
2317
2335
  ), r = n.find(
2318
2336
  (a) => a.startsWith("arcgis-") || // This is the case for template-components and field-apps-custom-elements
2319
2337
  a === i
2320
2338
  );
2321
2339
  return r === void 0 ? await Promise.all(
2322
- n.map(async (a) => await Nt(t, a))
2323
- ).then((a) => a.find(R)) : await Nt(t, r);
2340
+ n.map(async (a) => await Ft(t, a))
2341
+ ).then((a) => a.find(D)) : await Ft(t, r);
2324
2342
  }
2325
- async function Nt(e, t) {
2343
+ async function Ft(e, t) {
2326
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([
2327
2345
  K(i),
2328
2346
  K(s),
@@ -2333,17 +2351,17 @@ async function Nt(e, t) {
2333
2351
  cdnName: t
2334
2352
  } : void 0;
2335
2353
  }
2336
- async function Ln(e, t, i, s, n) {
2337
- const a = t.packageJson.exports?.[`./${Z}.css`] === void 0 ? await Vi(t.packageLocation) : void 0, c = a?.cdnName ?? le, d = a === void 0 ? `${_i}.js` : `${a.cdnName}.esm.js`;
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`;
2338
2356
  if (i === "cdn")
2339
2357
  return {
2340
2358
  tag: "script",
2341
2359
  attrs: {
2342
2360
  type: "module",
2343
- src: `${t.cdnUrl ?? De(t.packageJson, n)}${d}`
2361
+ src: `${t.cdnUrl ?? Re(t.packageJson, n)}${d}`
2344
2362
  }
2345
2363
  };
2346
- const l = Nn(t.packageJson), p = `${t.packageName}/${u.normalize(l)}${Q}`, m = [
2364
+ const l = Rn(t.packageJson), p = `${t.packageName}/${u.normalize(l)}${Q}`, m = [
2347
2365
  `import styles$${s} from "${p}";`,
2348
2366
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${s}.styleSheet];`
2349
2367
  ], f = `${t.packageName}/loader`;
@@ -2357,12 +2375,12 @@ async function Ln(e, t, i, s, n) {
2357
2375
  ...m,
2358
2376
  `import { defineCustomElements as defineCustomElements$${s} } from "${f}";`,
2359
2377
  `defineCustomElements$${s}({`,
2360
- ` resourcesUrl: "${pt(e, t.packageLocation)}/dist/${c}/",`,
2378
+ ` resourcesUrl: "${ut(e, t.packageLocation)}/dist/${c}/",`,
2361
2379
  "});"
2362
2380
  ]
2363
2381
  };
2364
2382
  }
2365
- function Nn(e) {
2383
+ function Rn(e) {
2366
2384
  const { exports: t } = e;
2367
2385
  if (t === void 0)
2368
2386
  throw new Error(
@@ -2372,21 +2390,21 @@ function Nn(e) {
2372
2390
  return s ? s[0] : i.length > 0 ? i[0][0] : `./${Z}.css`;
2373
2391
  }
2374
2392
  async function oe(e, t) {
2375
- return t !== void 0 ? await jt(e, t) : (e._loadersCache ??= jt(e), await e._loadersCache);
2393
+ return t !== void 0 ? await Dt(e, t) : (e._loadersCache ??= Dt(e), await e._loadersCache);
2376
2394
  }
2377
- async function jt(e, t) {
2395
+ async function Dt(e, t) {
2378
2396
  const i = e.viteCommand === "build" ? "cdn" : "lazyNpm", s = e.environment === "development", n = t ?? e.viteConfig.base;
2379
2397
  let r = 0;
2380
2398
  const a = async (m) => (await Promise.all(
2381
2399
  m.map(async (f) => {
2382
2400
  const g = r++;
2383
- return f.type === "stencil" ? await An(n, f, i, g, s) : f.type === "@arcgis/lumina" ? await Ln(n, f, i, g, s) : void 0;
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;
2384
2402
  })
2385
- )).filter(R).flat(), c = await Promise.all([
2403
+ )).filter(D).flat(), c = await Promise.all([
2386
2404
  // This may contain an import map so must be first
2387
- on(e, n, i, s),
2405
+ cn(e, n, i, s),
2388
2406
  ne.then(a),
2389
- Gi(e).then(a)
2407
+ Xi(e).then(a)
2390
2408
  ]), d = u.join(e.dir.src, "loader.ts"), l = t ?? (i === "cdn" ? `./${e.options.build?.cdn?.namespace ?? le}/` : void 0);
2391
2409
  return [
2392
2410
  ...c.flat(),
@@ -2405,11 +2423,11 @@ async function jt(e, t) {
2405
2423
  }
2406
2424
  ];
2407
2425
  }
2408
- async function Gi(e) {
2426
+ async function Xi(e) {
2409
2427
  const t = e.options?.serve?.extraDependencies ?? [];
2410
2428
  return t.length === 0 ? [] : (e._serveOnlyDependencies ??= Promise.all(
2411
2429
  t.map(async (i) => {
2412
- const s = typeof i == "string" ? void 0 : i, n = typeof i == "string" ? i : i.name, r = await xi(n);
2430
+ const s = typeof i == "string" ? void 0 : i, n = typeof i == "string" ? i : i.name, r = await Ai(n);
2413
2431
  if (r === void 0)
2414
2432
  throw Error(
2415
2433
  b(
@@ -2422,14 +2440,14 @@ async function Gi(e) {
2422
2440
  cdnUrl: s?.getCdnUrl(e)
2423
2441
  };
2424
2442
  })
2425
- ).then((i) => i.filter(R)), await e._serveOnlyDependencies);
2443
+ ).then((i) => i.filter(D)), await e._serveOnlyDependencies);
2426
2444
  }
2427
- const Xi = "/C:@arcgis/lumina-compiler/testSetupFile", st = `${Xi}/dependencies`, Ft = /^\/C:@arcgis\/lumina-compiler\/testSetupFile/u, We = [Xi];
2428
- function jn(e) {
2429
- return e.apiJsonEnabled ? `${Rt(e)}
2430
- import "${st}";` : Rt(e);
2445
+ const Yi = "/C:@arcgis/lumina-compiler/testSetupFile", st = `${Yi}/dependencies`, Rt = /^\/C:@arcgis\/lumina-compiler\/testSetupFile/u, We = [Yi];
2446
+ function On(e) {
2447
+ return e.apiJsonEnabled ? `${Ot(e)}
2448
+ import "${st}";` : Ot(e);
2431
2449
  }
2432
- async function Fn(e) {
2450
+ async function Mn(e) {
2433
2451
  return (await oe(e)).map((i, s) => {
2434
2452
  if ("javascriptCode" in i)
2435
2453
  return i.javascriptCode.join(`
@@ -2454,16 +2472,16 @@ async function Fn(e) {
2454
2472
 
2455
2473
  `);
2456
2474
  }
2457
- const Rt = (e) => [e.isInPuppeteerTestBackEnd ? Rn : "", Dn].join(""), Rn = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
2475
+ const Ot = (e) => [e.isInPuppeteerTestBackEnd ? Jn : "", Bn].join(""), Jn = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
2458
2476
  setupPuppeteerTest();
2459
- `, Dn = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
2477
+ `, Bn = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
2460
2478
  setupLuminaTest();
2461
- `, On = "@arcgis/lumina:generateLoaderTs";
2479
+ `, Kn = "@arcgis/lumina:generateLoaderTs";
2462
2480
  let Ne;
2463
- function Mn(e) {
2481
+ function _n(e) {
2464
2482
  const t = /[\\\/]src[\\\/]loader\.ts$/u;
2465
- return [zs(e.apiExtractorPluginConfig), {
2466
- name: On,
2483
+ return [qs(e.apiExtractorPluginConfig), {
2484
+ name: Kn,
2467
2485
  configResolved() {
2468
2486
  Ne = `${e.dir.root}src/loader.ts`;
2469
2487
  },
@@ -2478,7 +2496,7 @@ function Mn(e) {
2478
2496
  id: t
2479
2497
  },
2480
2498
  async handler() {
2481
- return e.apiJsonDeferred !== void 0 && await e.apiJsonDeferred.promise, Lr(e);
2499
+ return e.apiJsonDeferred !== void 0 && await e.apiJsonDeferred.promise, jr(e);
2482
2500
  }
2483
2501
  },
2484
2502
  async handleHotUpdate() {
@@ -2488,7 +2506,7 @@ function Mn(e) {
2488
2506
  name: "@arcgis/lumina:generateTestSetupVirtualFile",
2489
2507
  resolveId: {
2490
2508
  filter: {
2491
- id: Ft
2509
+ id: Rt
2492
2510
  },
2493
2511
  // Vitest treats the configured setup-file ID as a filesystem path and
2494
2512
  // loads it without resolving it through Vite. The dependency module is
@@ -2498,27 +2516,27 @@ function Mn(e) {
2498
2516
  },
2499
2517
  load: {
2500
2518
  filter: {
2501
- id: Ft
2519
+ id: Rt
2502
2520
  },
2503
- handler: async (r) => r.startsWith(st) ? await Fn(e) : jn(e)
2521
+ handler: async (r) => r.startsWith(st) ? await Mn(e) : On(e)
2504
2522
  }
2505
2523
  }];
2506
2524
  }
2507
- function Dt(e) {
2525
+ function Mt(e) {
2508
2526
  const t = e.server.moduleGraph.getModuleById(Ne);
2509
2527
  t !== void 0 && e.server.moduleGraph.invalidateModule(t);
2510
2528
  }
2511
- const Ot = (e) => {
2529
+ const Jt = (e) => {
2512
2530
  e.server.ws.send({
2513
2531
  type: "full-reload",
2514
2532
  path: u.join("/", u.relative(e.dir.root, Ne))
2515
2533
  });
2516
2534
  };
2517
- function Jn(e) {
2535
+ function Wn(e) {
2518
2536
  let t;
2519
2537
  const i = () => [
2520
2538
  ...e.options.assets?.transformers ?? [],
2521
- ...mt
2539
+ ...ft
2522
2540
  ];
2523
2541
  return {
2524
2542
  name: "@arcgis/lumina:handleStaticAssets",
@@ -2537,38 +2555,38 @@ function Jn(e) {
2537
2555
  * `configureServer`.
2538
2556
  */
2539
2557
  configResolved() {
2540
- e.viteCommand === "serve" && (t = Mt(e));
2558
+ e.viteCommand === "serve" && (t = Bt(e));
2541
2559
  },
2542
2560
  options() {
2543
- e.viteCommand === "build" && (t = Mt(e));
2561
+ e.viteCommand === "build" && (t = Bt(e));
2544
2562
  },
2545
2563
  async configureServer(s) {
2546
2564
  e.server = s, ie(e, await t, i()), s.watcher.on("addDir", (n) => {
2547
2565
  if (n.endsWith("assets")) {
2548
2566
  const r = u.dirname(n);
2549
- u.join(r, "/") === e.dir.root ? ie(e, [Qi], i()) : n.startsWith(e.dir.srcComponents) && ie(e, [Yi(n, r)], i());
2567
+ u.join(r, "/") === e.dir.root ? ie(e, [Zi], i()) : n.startsWith(e.dir.srcComponents) && ie(e, [Qi(n, r)], i());
2550
2568
  }
2551
2569
  });
2552
2570
  },
2553
2571
  async writeBundle() {
2554
- await Fi(e, await t, i());
2572
+ await Di(e, await t, i());
2555
2573
  }
2556
2574
  };
2557
2575
  }
2558
- async function Mt(e) {
2576
+ async function Bt(e) {
2559
2577
  const t = K("assets"), i = await e.componentFilesPromise, s = await Promise.all(
2560
2578
  i.map(async (n) => {
2561
2579
  const r = u.dirname(n), a = u.join(r, "assets");
2562
- return await K(a) ? Yi(a, r) : void 0;
2580
+ return await K(a) ? Qi(a, r) : void 0;
2563
2581
  })
2564
2582
  );
2565
- return await t && s.push(Qi), s.filter(R);
2583
+ return await t && s.push(Zi), s.filter(D);
2566
2584
  }
2567
- const Yi = (e, t) => ({
2585
+ const Qi = (e, t) => ({
2568
2586
  type: "directory",
2569
2587
  source: e,
2570
2588
  destination: u.basename(t)
2571
- }), Qi = { type: "directory", source: "assets/", destination: "" }, Ue = "@arcgis/lumina:printTotalBuildSize", Bn = (e) => ({
2589
+ }), Zi = { type: "directory", source: "assets/", destination: "" }, Ue = "@arcgis/lumina:printTotalBuildSize", Un = (e) => ({
2572
2590
  name: Ue,
2573
2591
  apply: () => e.viteCommand === "build",
2574
2592
  configResolved(t) {
@@ -2587,10 +2605,10 @@ const Yi = (e, t) => ({
2587
2605
  const m = console.log;
2588
2606
  console.log = function(...g) {
2589
2607
  if (m.apply(console, g), g.length === 1 && typeof g[0] == "string") {
2590
- const [h, y] = g[0].match(_n) ?? [];
2608
+ const [h, y] = g[0].match(Hn) ?? [];
2591
2609
  if (!h)
2592
2610
  return;
2593
- p || (p = g[0].slice(0, g[0].indexOf(h) + h.length).replaceAll(Wn, "").length);
2611
+ p || (p = g[0].slice(0, g[0].indexOf(h) + h.length).replaceAll(qn, "").length);
2594
2612
  const v = Number.parseFloat(h.replace(" kB", "").replaceAll(",", ""));
2595
2613
  y ? (l += Number.parseFloat(y.replace(" kB", "").replaceAll(",", "")), d += v) : c += v;
2596
2614
  }
@@ -2601,36 +2619,36 @@ const Yi = (e, t) => ({
2601
2619
  console.log = m;
2602
2620
  }
2603
2621
  if (d > 0) {
2604
- const g = l > 0 ? d : c, h = Kt(g), y = e.dir.relativeDist;
2622
+ const g = l > 0 ? d : c, h = Wt(g), y = e.dir.relativeDist;
2605
2623
  console.log(
2606
2624
  [
2607
- Bt,
2625
+ _t,
2608
2626
  y,
2609
- Kn,
2627
+ zn,
2610
2628
  "*",
2611
2629
  " ".repeat(p - `${y}*`.length - h.length),
2612
2630
  h,
2613
- Jt,
2614
- l > 0 ? ` ${Bt}│ gzip: ${Kt(l)}${Jt}` : ""
2631
+ Kt,
2632
+ l > 0 ? ` ${_t}│ gzip: ${Wt(l)}${Kt}` : ""
2615
2633
  ].join("")
2616
2634
  );
2617
2635
  }
2618
2636
  };
2619
2637
  }
2620
- }), Jt = "\x1B[22m\x1B[1m\x1B[22m", Bt = "\x1B[2m", Kn = "\x1B[22m\x1B[36m", _n = /\d+(?:,\d+)?\.\d{2} kB/gu, Wn = /\x1B\[\d+m/gu, Un = new Intl.NumberFormat("en", {
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", {
2621
2639
  maximumFractionDigits: 2,
2622
2640
  minimumFractionDigits: 2
2623
- }), Kt = (e) => `${Un.format(e)} kB`, zn = (e, t = u.resolve("src")) => u.relative(t, u.join(e, "..", ft.slice(0, -3)));
2624
- var Hn = ["@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"];
2625
- const _t = "@arcgis/lumina:configureVite", qn = (e) => ({
2626
- name: _t,
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,
2627
2645
  async config({
2628
2646
  server: t,
2629
2647
  publicDir: i,
2630
2648
  build: { cssMinify: s, target: n, sourcemap: r, lib: a, rollupOptions: { output: c = [] } = {}, watch: d, emptyOutDir: l } = {},
2631
2649
  test: p = {}
2632
2650
  }, m) {
2633
- const f = d != null, { include: g, browser: h, environment: y, forceRerunTriggers: v } = p, w = H && te && Ni(m) ? oi(Li, import.meta.dirname) : void 0, C = w === void 0 ? [] : [
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 ? [] : [
2634
2652
  G(u.join(w, "**/*.{ts,tsx,mjs}")),
2635
2653
  `!${G(u.join(w, "**/*.d.ts"))}`
2636
2654
  ], E = {
@@ -2713,7 +2731,7 @@ const _t = "@arcgis/lumina:configureVite", qn = (e) => ({
2713
2731
  */
2714
2732
  exclude: [
2715
2733
  ...te ? [
2716
- ...Hn,
2734
+ ...Xn,
2717
2735
  // This exact import is also supplied through optimizableImports in `dependencies/arcgisCore.ts`
2718
2736
  // Optimizing it in the monorepo creates a separate core config instance, so the app does not receive the
2719
2737
  // configured assetsPath.
@@ -2746,7 +2764,7 @@ const _t = "@arcgis/lumina:configureVite", qn = (e) => ({
2746
2764
  if (typeof p.setupFiles == "string" ? p.setupFiles = [...We, p.setupFiles] : Array.isArray(p.setupFiles) ? p.setupFiles = [...We, ...p.setupFiles] : p.setupFiles = [...We], e.isInPuppeteerTestBackEnd) {
2747
2765
  if (h?.enabled === !0)
2748
2766
  throw Error(
2749
- b(_t, "Can't enable both Vitest browser mode and Puppeteer testing at the same time")
2767
+ b(Ut, "Can't enable both Vitest browser mode and Puppeteer testing at the same time")
2750
2768
  );
2751
2769
  return {
2752
2770
  test: {
@@ -2780,7 +2798,7 @@ const _t = "@arcgis/lumina:configureVite", qn = (e) => ({
2780
2798
  publicDir: i ?? !1,
2781
2799
  build: {
2782
2800
  cssMinify: s ?? (e.environment === "production" ? !0 : void 0),
2783
- target: n ?? ji(e),
2801
+ target: n ?? Fi(e),
2784
2802
  sourcemap: r ?? (e.environment === "development" ? "inline" : e.options.build?.enableSourceMapsInProduction ?? !1),
2785
2803
  lib: {
2786
2804
  entry: E,
@@ -2845,15 +2863,15 @@ const _t = "@arcgis/lumina:configureVite", qn = (e) => ({
2845
2863
  e._originalRollupInputOptions ??= t.input;
2846
2864
  const s = { ...e._originalRollupInputOptions };
2847
2865
  i.forEach((n) => {
2848
- const r = zn(n);
2866
+ const r = Gn(n);
2849
2867
  s[r] = n;
2850
2868
  }), t.input = s;
2851
2869
  }
2852
- }), Se = "@arcgis/lumina:serveLocalCdn", Vn = /^\/?@arcgis\/core(?=\/|$)/u, Zi = "/index.js", Gn = je(Zi), rt = `\0${Se}:index`, Xn = je(rt), Yn = 3e3, Qn = [
2870
+ }), Se = "@arcgis/lumina:serveLocalCdn", Qn = /^\/?@arcgis\/core(?=\/|$)/u, es = "/index.js", Zn = je(es), rt = `\0${Se}:index`, eo = je(rt), to = 3e3, io = [
2853
2871
  /^https?:\/\/localhost(?::[0-9]+)?$/u,
2854
2872
  /^https?:\/\/(?:[a-z0-9-]+\.)*(?:arcgis|esri)\.com(?::[0-9]+)?$/iu
2855
2873
  ];
2856
- function Zn(e) {
2874
+ function so(e) {
2857
2875
  if (!H)
2858
2876
  return;
2859
2877
  const t = j().name, i = t.split("/").pop() ?? t, s = `/${i}/index.js`, n = je(s), r = `\0${Se}:${i}`, a = je(r);
@@ -2861,49 +2879,49 @@ function Zn(e) {
2861
2879
  name: Se,
2862
2880
  enforce: "pre",
2863
2881
  apply(c) {
2864
- const d = io(e, c);
2882
+ const d = oo(e, c);
2865
2883
  return d || (e._localCdnCore = void 0), d;
2866
2884
  },
2867
2885
  config: {
2868
2886
  order: "post",
2869
2887
  handler(c, d) {
2870
- const l = c.server, p = Ni(d), m = p ? Li : en, f = oi(m, import.meta.dirname);
2888
+ const l = c.server, p = ji(d), m = p ? Ni : sn, f = at(m, import.meta.dirname);
2871
2889
  if (f === void 0)
2872
2890
  throw Error(b(Se, `Unable to find ${m}.`));
2873
2891
  return e._localCdnCore = p ? { packageLocation: u.dirname(f), sourceLocation: f } : { packageLocation: f }, {
2874
2892
  server: {
2875
- port: l?.port ?? Yn,
2876
- cors: l?.cors ?? { origin: Qn }
2893
+ port: l?.port ?? to,
2894
+ cors: l?.cors ?? { origin: io }
2877
2895
  },
2878
2896
  resolve: {
2879
2897
  // The alias also matches CDN-rooted requests such as /@arcgis/core/WebMap.js. Vite resolves .js requests
2880
2898
  // to TypeScript in source mode and handles relative and bare imports from the resulting filesystem path.
2881
- alias: [{ find: Vn, replacement: f }]
2899
+ alias: [{ find: Qn, replacement: f }]
2882
2900
  }
2883
2901
  };
2884
2902
  }
2885
2903
  },
2886
2904
  resolveId: {
2887
- filter: { id: [Gn, n] },
2905
+ filter: { id: [Zn, n] },
2888
2906
  handler(c) {
2889
- if (c === Zi)
2907
+ if (c === es)
2890
2908
  return rt;
2891
2909
  if (c === s)
2892
2910
  return r;
2893
2911
  }
2894
2912
  },
2895
2913
  load: {
2896
- filter: { id: [Xn, a] },
2914
+ filter: { id: [eo, a] },
2897
2915
  async handler(c) {
2898
2916
  if (c === rt)
2899
2917
  return `import ${JSON.stringify(s)};
2900
2918
  `;
2901
2919
  if (c === r)
2902
- return await to(e);
2920
+ return await no(e);
2903
2921
  }
2904
2922
  },
2905
2923
  handleHotUpdate({ file: c, server: d }) {
2906
- if (eo(c, e._localCdnCore?.sourceLocation))
2924
+ if (ro(c, e._localCdnCore?.sourceLocation))
2907
2925
  return d.ws.send({ type: "full-reload" }), [];
2908
2926
  }
2909
2927
  };
@@ -2911,30 +2929,30 @@ function Zn(e) {
2911
2929
  function je(e) {
2912
2930
  return new RegExp(`^${RegExp.escape(e)}$`, "u");
2913
2931
  }
2914
- function eo(e, t) {
2932
+ function ro(e, t) {
2915
2933
  return t !== void 0 && e.startsWith(u.join(t, u.sep));
2916
2934
  }
2917
- async function to(e) {
2935
+ async function no(e) {
2918
2936
  const t = e.viteConfig.server, i = t.origin?.replace(/\/$/u, "") ?? `${t.https ? "https" : "http"}://localhost:${String(t.port)}`;
2919
2937
  return `${(await oe(e, `${i}/`)).flatMap((n) => "javascriptCode" in n ? n.javascriptCode : []).join(`
2920
2938
  `)}
2921
2939
  `;
2922
2940
  }
2923
- function io(e, t) {
2941
+ function oo(e, t) {
2924
2942
  return te && e.viteCommand === "serve" && !e.isInTest && t.resolve?.conditions?.includes("storybook") !== !0 && t.server?.middlewareMode !== !0;
2925
2943
  }
2926
- const so = (e) => ({
2944
+ const ao = (e) => ({
2927
2945
  name: "@arcgis/lumina:setAssetPath",
2928
2946
  apply: () => e.viteCommand === "build",
2929
2947
  config: (t) => ({
2930
- base: t.base ?? e.options.assets?.defaultPath ?? De()
2948
+ base: t.base ?? e.options.assets?.defaultPath ?? Re()
2931
2949
  })
2932
2950
  });
2933
- function ro(e = j()) {
2934
- const t = ut(e) ?? "0.0.1";
2935
- return Es(t);
2951
+ function co(e = j()) {
2952
+ const t = mt(e) ?? "0.0.1";
2953
+ return Ts(t);
2936
2954
  }
2937
- const no = (e) => `/* ${e} */`, k = (e) => (t, i) => {
2955
+ const lo = (e) => `/* ${e} */`, k = (e) => (t, i) => {
2938
2956
  Object.defineProperty(t, i, {
2939
2957
  get() {
2940
2958
  throw Error(
@@ -2973,8 +2991,8 @@ const ue = {
2973
2991
  apiJson: "docs/api.json",
2974
2992
  stencilLikeDocsJson: "docs/docs.json"
2975
2993
  }, nt = (e) => e.viteConfig.root.includes("/test-packages/") ? 2 : void 0;
2976
- async function es(e, t, i = j()) {
2977
- const s = oo(e, i), n = u.join(t, "lumina.ts"), a = await K(n) ? await z(n, "utf8") : "";
2994
+ async function ts(e, t, i = j()) {
2995
+ const s = po(e, i), n = u.join(t, "lumina.ts"), a = await K(n) ? await z(n, "utf8") : "";
2978
2996
  if (a.trim().replaceAll(`\r
2979
2997
  `, `
2980
2998
  `) === s.trim())
@@ -2992,9 +3010,9 @@ Current content:
2992
3010
  ${a}`
2993
3011
  )
2994
3012
  );
2995
- return ci(n, s), !0;
3013
+ return li(n, s), !0;
2996
3014
  }
2997
- function oo(e, t = j()) {
3015
+ function po(e, t = j()) {
2998
3016
  const i = e.filter((d) => d.type === "@arcgis/lumina").map((d) => `
2999
3017
  /// <reference types="${d.packageName}/types/lumina" />`), s = e.filter((d) => d.type === "stencil"), n = s.map(
3000
3018
  (d, l) => `
@@ -3005,7 +3023,7 @@ declare module "@arcgis/lumina" {
3005
3023
  interface ImportStencilElements extends ${s.map((d, l) => `JSX$${l}.IntrinsicElements`).join(", ")} {}
3006
3024
  }`, a = t.devDependencies ?? {};
3007
3025
  return [
3008
- ao,
3026
+ uo,
3009
3027
  a.vitest ? `
3010
3028
  /// <reference types="vitest/config" />
3011
3029
  /// <reference types="vitest/browser" />` : "",
@@ -3016,7 +3034,7 @@ declare module "@arcgis/lumina" {
3016
3034
  `
3017
3035
  ].join("");
3018
3036
  }
3019
- const ao = `/**
3037
+ const uo = `/**
3020
3038
  * This file is autogenerated by \`@arcgis/lumina-compiler\` - do not edit it manually.
3021
3039
  * Manual edits will be overwritten.
3022
3040
  *
@@ -3024,7 +3042,7 @@ const ao = `/**
3024
3042
  *
3025
3043
  * If you need to provide additional types, create a separate file.
3026
3044
  */
3027
- /// <reference types="@arcgis/lumina/globalTypes" />`, Ce = "@arcgis/lumina:dependencySupport", ts = (e, t) => e.viteCommand === "serve" && /**
3045
+ /// <reference types="@arcgis/lumina/globalTypes" />`, Ce = "@arcgis/lumina:dependencySupport", is = (e, t) => e.viteCommand === "serve" && /**
3028
3046
  * Vitest started calling transformIndexHtml in browser mode versions ^2.1.4
3029
3047
  * However, it is a bit buggy (see
3030
3048
  * https://github.com/vitejs/vite/issues/19213). Instead, we are using test
@@ -3035,13 +3053,13 @@ const ao = `/**
3035
3053
  * is doing:
3036
3054
  * https://github.com/storybookjs/storybook/blob/a5c2cf1712f70b4e3ecf38d3c98e7db8e8d67849/code/builders/builder-vite/src/plugins/code-generator-plugin.ts#L110
3037
3055
  */
3038
- e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, co = (e) => ({
3056
+ 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) => ({
3039
3057
  name: Ce,
3040
3058
  async configureServer(t) {
3041
- H && (e.server = t, await cn(e));
3059
+ H && (e.server = t, await dn(e));
3042
3060
  },
3043
3061
  configResolved() {
3044
- !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = lo(e).catch(
3062
+ !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = fo(e).catch(
3045
3063
  (t) => T.error(Ce, `Failed to update package's src/lumina.ts: ${String(t)}`)
3046
3064
  ));
3047
3065
  },
@@ -3049,7 +3067,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
3049
3067
  // Add imports to index.html before Vite starts resolving imports
3050
3068
  order: "pre",
3051
3069
  async handler(t, i) {
3052
- return ts(e, i) ? (await oe(e)).map(
3070
+ return is(e, i) ? (await oe(e)).map(
3053
3071
  (n) => "javascriptCode" in n ? {
3054
3072
  tag: "script",
3055
3073
  attrs: {
@@ -3091,26 +3109,26 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
3091
3109
  await e._updateLuminaTsPromise;
3092
3110
  }
3093
3111
  });
3094
- async function lo(e) {
3095
- const i = (await Promise.all([ne, Gi(e)])).flat();
3096
- if (!await es(i, e.dir.src))
3112
+ async function fo(e) {
3113
+ const i = (await Promise.all([ne, Xi(e)])).flat();
3114
+ if (!await ts(i, e.dir.src))
3097
3115
  return;
3098
3116
  let n = !1;
3099
3117
  function r() {
3100
- n || T.warn(Ce, po), n = !0;
3118
+ n || T.warn(Ce, go), n = !0;
3101
3119
  }
3102
3120
  process.on("exit", () => {
3103
3121
  r(), clearTimeout(c);
3104
3122
  });
3105
3123
  const c = setTimeout(r, 2e3);
3106
3124
  }
3107
- const po = Hs(
3125
+ const go = Vs(
3108
3126
  "greenBright",
3109
3127
  `lumina.ts has been updated (potentially because your dependencies changed). Please commit the updated file.
3110
3128
  If build failed with TypeScript errors, try running the build again to check whether new lumina.ts resolves the errors.`
3111
3129
  );
3112
- async function uo(e) {
3113
- 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 : $t(t, e.apiExtractorPluginConfig.unsafeConfigOverride);
3130
+ async function ho(e) {
3131
+ 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);
3114
3132
  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([
3115
3133
  {
3116
3134
  type: "dynamic",
@@ -3118,7 +3136,7 @@ async function uo(e) {
3118
3136
  destination: u.join("../..", e._documentationFileNames.apiJson)
3119
3137
  }
3120
3138
  ]);
3121
- const s = i?.types?.typeScriptConfig ?? Gs(
3139
+ const s = i?.types?.typeScriptConfig ?? Ys(
3122
3140
  process.cwd(),
3123
3141
  e.options.types?.tsconfigPath ?? i?.types?.typeScriptConfigPath,
3124
3142
  !0
@@ -3164,7 +3182,7 @@ async function uo(e) {
3164
3182
  if ([...p.addedModules, ...p.removedModules].some(
3165
3183
  (f) => Pe(f.sourcePath, "src/components/")
3166
3184
  ))
3167
- Dt(e), Ot(e);
3185
+ Mt(e), Jt(e);
3168
3186
  else {
3169
3187
  for (const f of p.changedModules) {
3170
3188
  if (!Pe(f.new.sourcePath, "src/components/"))
@@ -3177,29 +3195,29 @@ async function uo(e) {
3177
3195
  if (g === void 0 && h === void 0)
3178
3196
  continue;
3179
3197
  if (g !== void 0 && h === void 0 || g === void 0 && h !== void 0 || g.tagName !== h.tagName || g.formAssociated !== h.formAssociated) {
3180
- Ot(e);
3198
+ Jt(e);
3181
3199
  break;
3182
3200
  }
3183
- const y = $i(h);
3201
+ const y = Pi(h);
3184
3202
  e.server.ws.send({ type: "custom", event: "component-meta-update", data: y });
3185
3203
  }
3186
- Dt(e);
3204
+ Mt(e);
3187
3205
  }
3188
- Wt(e, p.apiJson);
3206
+ zt(e, p.apiJson);
3189
3207
  }
3190
3208
  }
3191
3209
  },
3192
3210
  afterApiJsonCreate: (l) => {
3193
- e.options.apiJson?.afterCreate?.(l.apiJson, !r), r = !0, (e.viteCommand === "build" ? e.viteConfig.build.watch : e.viteConfig.server.watch) === null && (e.apiJsonDeferred.resolve(), Wt(e, l.apiJson));
3211
+ 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));
3194
3212
  }
3195
- }, c = i === void 0 ? a : $t(i, a);
3213
+ }, c = i === void 0 ? a : Pt(i, a);
3196
3214
  e.apiExtractorPluginConfig.configFilePath = "", e.apiExtractorPluginConfig.unsafeConfigOverride = c;
3197
3215
  const d = e.apiExtractorPluginConfig.afterExtractorCreated;
3198
3216
  e.apiExtractorPluginConfig.afterExtractorCreated = (l) => {
3199
3217
  e.apiExtractor = l, d?.(l);
3200
3218
  };
3201
3219
  }
3202
- function Wt(e, t) {
3220
+ function zt(e, t) {
3203
3221
  const i = { ...t, modules: [] }, s = [], n = e.viteCommand === "build" ? [] : void 0;
3204
3222
  for (const r of t.modules) {
3205
3223
  const a = { ...r, declarations: [] };
@@ -3224,10 +3242,10 @@ function Wt(e, t) {
3224
3242
  }
3225
3243
  e._localDefinedComponents = void 0, e.privateApiJson = t, e.apiJsonComponents = s, e.apiJson = i, n !== void 0 && (e.componentFilesPromise = Promise.resolve(n));
3226
3244
  }
3227
- var mo = Object.defineProperty, I = (e, t, i, s) => {
3245
+ var yo = Object.defineProperty, I = (e, t, i, s) => {
3228
3246
  for (var n = void 0, r = e.length - 1, a; r >= 0; r--)
3229
3247
  (a = e[r]) && (n = a(t, i, n) || n);
3230
- return n && mo(t, i, n), n;
3248
+ return n && yo(t, i, n), n;
3231
3249
  };
3232
3250
  const V = "@arcgis/lumina:context";
3233
3251
  class $ {
@@ -3253,7 +3271,7 @@ class $ {
3253
3271
  distComponents: f,
3254
3272
  distCdn: g,
3255
3273
  distCdnAssets: h
3256
- }, T.initialize(r.logger, c), r.root !== ni())
3274
+ }, T.initialize(r.logger, c), r.root !== ai())
3257
3275
  throw Error(
3258
3276
  b(
3259
3277
  V,
@@ -3272,11 +3290,11 @@ class $ {
3272
3290
  extract: !0
3273
3291
  }, (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);
3274
3292
  const C = this.viteCommand === "serve" && !this.isInStorybook, E = this.apiExtractorPluginConfig.unsafeConfigOverride;
3275
- C && (E.context.isLuminaMinimalExtraction = !0, E.types.typeCheckedExtraction = !1, E.types.fullTypeCheck = !1), this.isInStorybook && (E.context.dtsEmitPath = ""), this._typeScriptPrinter = qs({
3293
+ C && (E.context.isLuminaMinimalExtraction = !0, E.types.typeCheckedExtraction = !1, E.types.fullTypeCheck = !1), this.isInStorybook && (E.context.dtsEmitPath = ""), this._typeScriptPrinter = Gs({
3276
3294
  // Do not downlevel. ESBuild will do that if needed.
3277
3295
  target: o.ScriptTarget.ESNext,
3278
3296
  sourceMap: r.build.sourcemap !== !1
3279
- }), ts(this) && oe(this);
3297
+ }), is(this) && oe(this);
3280
3298
  }
3281
3299
  },
3282
3300
  configureServer: {
@@ -3304,7 +3322,7 @@ class $ {
3304
3322
  webTypes: i.jetBrains === !1 ? void 0 : i.jetBrains?.webTypesFileName ? pe(i.jetBrains.webTypesFileName) : ue.webTypes,
3305
3323
  vsCodeHtml: i.vsCode === !1 ? void 0 : i.vsCode?.htmlFileName ? pe(i.vsCode.htmlFileName) : ue.vsCodeHtml,
3306
3324
  vsCodeCss: i.vsCode === !1 ? void 0 : i.vsCode?.cssFileName ? pe(i.vsCode.cssFileName) : ue.vsCodeCss
3307
- }, this.apiExtractorPluginConfig = this.options.apiExtractor ?? {}, this.configsPromise = uo(this);
3325
+ }, this.apiExtractorPluginConfig = this.options.apiExtractor ?? {}, this.configsPromise = ho(this);
3308
3326
  const s = process.cwd().length + 1;
3309
3327
  this.componentFilesPromise = this.configsPromise.then(() => {
3310
3328
  const r = this.apiExtractorPluginConfig.unsafeConfigOverride.types.typeScriptConfig.config.fileNames, a = [];
@@ -3313,12 +3331,12 @@ class $ {
3313
3331
  Pe(l, "src/components") && a.push(l);
3314
3332
  }
3315
3333
  return a;
3316
- }), ki(void 0, t);
3317
- const n = t.build?.preamble ?? ro();
3318
- this.banner = no(n);
3334
+ }), Ii(void 0, t);
3335
+ const n = t.build?.preamble ?? co();
3336
+ this.banner = lo(n);
3319
3337
  }
3320
3338
  _inferBuildSetup({ command: t, mode: i }, s) {
3321
- 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(Pi.name, `Vite is running in unknown mode "${i}". Assuming development`), this.environment = "development"), this.viteCommand = t;
3339
+ 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;
3322
3340
  const n = s?.__IS_IN_PUPPETEER__ === !0, r = this.viteCommand === "serve" && this.isInTest && this.options.puppeteerTesting?.enabled === !0;
3323
3341
  this.isInPuppeteerTestBackEnd = r && !n, this.isInPuppeteerTestFrontEnd = r && n;
3324
3342
  }
@@ -3466,12 +3484,12 @@ I([
3466
3484
  I([
3467
3485
  k("configResolved()")
3468
3486
  ], $.prototype, "_typeScriptPrinter");
3469
- function fo(e, t, i) {
3470
- const s = Ii()[t] ?? is(e)[t];
3487
+ function vo(e, t, i) {
3488
+ const s = xi()[t] ?? ss(e)[t];
3471
3489
  if (s === void 0) {
3472
3490
  if (e.options?.build?.dependencies?.silenceUnknownJsxElementUsage?.(t, i, e) === !0)
3473
3491
  return;
3474
- const n = Re(i);
3492
+ const n = De(i);
3475
3493
  throw Error(
3476
3494
  b(
3477
3495
  "@arcgis/lumina:resolveTagName",
@@ -3481,11 +3499,11 @@ function fo(e, t, i) {
3481
3499
  }
3482
3500
  return s;
3483
3501
  }
3484
- function go(e, t) {
3502
+ function bo(e, t) {
3485
3503
  return e.packageName === void 0 ? he(t, e.modulePath) : u.join(e.packageName, e.modulePath);
3486
3504
  }
3487
- function is(e) {
3488
- return e._localDefinedComponents ??= Ai(
3505
+ function ss(e) {
3506
+ return e._localDefinedComponents ??= Li(
3489
3507
  e.privateApiJson,
3490
3508
  {
3491
3509
  packageName: void 0,
@@ -3496,19 +3514,19 @@ function is(e) {
3496
3514
  e.viteCommand === "build"
3497
3515
  ), e._localDefinedComponents;
3498
3516
  }
3499
- const Ut = "makeRuntime(", ho = "@arcgis/core", yo = "@arcgis/lumina:injectRuntimeOptions", vo = (e) => ({
3500
- name: yo,
3517
+ const Ht = "makeRuntime(", wo = "@arcgis/core", So = "@arcgis/lumina:injectRuntimeOptions", Co = (e) => ({
3518
+ name: So,
3501
3519
  transform: {
3502
3520
  filter: {
3503
3521
  id: /\/src\/runtime\.ts$/u
3504
3522
  },
3505
3523
  handler(t, i) {
3506
- const s = t.indexOf(Ut);
3524
+ const s = t.indexOf(Ht);
3507
3525
  if (s === -1)
3508
3526
  throw new Error(
3509
3527
  `Failed to find makeRuntime() function call in src/runtime.ts. Id: ${i}. Code: ${t}`
3510
3528
  );
3511
- const n = s + Ut.length, r = e.options.css?.commonStylesPath;
3529
+ const n = s + Ht.length, r = e.options.css?.commonStylesPath;
3512
3530
  return {
3513
3531
  code: [
3514
3532
  r === void 0 ? "" : `import commonStyles from "${he(e.dir.src, r)}${Ie}";`,
@@ -3516,7 +3534,7 @@ const Ut = "makeRuntime(", ho = "@arcgis/core", yo = "@arcgis/lumina:injectRunti
3516
3534
  "{",
3517
3535
  "defaultAssetPath:import.meta.env.BASE_URL,",
3518
3536
  'hydratedAttribute:"',
3519
- e.options.css?.hydratedAttribute ?? Ei,
3537
+ e.options.css?.hydratedAttribute ?? Ti,
3520
3538
  '",',
3521
3539
  r === void 0 ? "" : "commonStyles",
3522
3540
  "}",
@@ -3524,7 +3542,7 @@ const Ut = "makeRuntime(", ho = "@arcgis/core", yo = "@arcgis/lumina:injectRunti
3524
3542
  // Dependency injection. Lumina cannot directly import these to avoid
3525
3543
  // a cyclical dependency.
3526
3544
  H ? `
3527
- import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${ho}/applications/Components/reactiveUtils.js";
3545
+ import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${wo}/applications/Components/reactiveUtils.js";
3528
3546
  createObservable,
3529
3547
  runtime.t = trackAccess;
3530
3548
  runtime.o = createObservable;
@@ -3536,11 +3554,11 @@ runtime.r = runTracked;` : ""
3536
3554
  }
3537
3555
  }
3538
3556
  });
3539
- function bo(e) {
3557
+ function Eo(e) {
3540
3558
  return `import "../${e.options.build?.cdn?.namespace === void 0 ? `${le}/${Z}.css` : `${e.options.build.cdn.namespace}/${e.options.build.cdn.namespace}.css`}";
3541
3559
  `;
3542
3560
  }
3543
- const we = "@arcgis/lumina:addNonLazyImports", wo = (e) => ({
3561
+ const we = "@arcgis/lumina:addNonLazyImports", To = (e) => ({
3544
3562
  name: we,
3545
3563
  apply: () => e.viteCommand === "build",
3546
3564
  generateBundle(t, i) {
@@ -3552,7 +3570,7 @@ const we = "@arcgis/lumina:addNonLazyImports", wo = (e) => ({
3552
3570
  if (d !== a && (c.fileName = d), c.type === "chunk") {
3553
3571
  const l = u.dirname(u.join(e.dir.dist, a)), p = d === a ? l : u.dirname(u.join(e.dir.dist, d));
3554
3572
  let m = c.code;
3555
- m = mn(m, e, p, l), !e.isInStorybook && d === "chunks/runtime.js" && (r = !0, m = bo(e) + m), m = `${e.banner}${n}${m}`, c.code = m;
3573
+ 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;
3556
3574
  }
3557
3575
  }), !r && !e.isInStorybook)
3558
3576
  throw Error(b(we, "Expected to find a chunks/runtime.js file in the Vite's build output."));
@@ -3566,11 +3584,11 @@ const we = "@arcgis/lumina:addNonLazyImports", wo = (e) => ({
3566
3584
  i.forEach(([r, { referencedTagNames: a, referencedDeferredTagNames: c, referencedBy: d }]) => {
3567
3585
  if (s.has(r) || a.length === 0 && c.length === 0)
3568
3586
  return;
3569
- const l = ss(t, d, s);
3587
+ const l = rs(t, d, s);
3570
3588
  if (l.forEach((p) => {
3571
3589
  t[p].referencedTagNames.splice(0, 0, ...a), t[p].referencedDeferredTagNames.splice(0, 0, ...c);
3572
3590
  }), (a.length > 0 || c.length > 0) && l.length === 0) {
3573
- const p = Re(r);
3591
+ const p = De(r);
3574
3592
  throw Error(
3575
3593
  b(
3576
3594
  we,
@@ -3589,14 +3607,14 @@ Possible causes:
3589
3607
  return [];
3590
3608
  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);
3591
3609
  function m(P) {
3592
- const x = fo(e, P, r);
3610
+ const x = vo(e, P, r);
3593
3611
  if (x === void 0)
3594
3612
  return;
3595
- const S = go(x, p);
3613
+ const S = bo(x, p);
3596
3614
  if (S !== `./${p}`)
3597
- return S.startsWith(".") ? `${S}/${zt}` : S;
3615
+ return S.startsWith(".") ? `${S}/${qt}` : S;
3598
3616
  }
3599
- const f = new Set(a), g = new Set(c), h = Array.from(f, m).filter(R), y = (P) => `import "${P}";
3617
+ const f = new Set(a), g = new Set(c), h = Array.from(f, m).filter(D), y = (P) => `import "${P}";
3600
3618
  `, v = h.map(y).join(""), w = Array.from(g, (P) => {
3601
3619
  const x = m(P);
3602
3620
  if (x !== void 0) {
@@ -3610,15 +3628,15 @@ Possible causes:
3610
3628
  return `.set("${P}", () => import("${x}"))
3611
3629
  `;
3612
3630
  }
3613
- }).filter(R), C = `${v}export * from "./${ft}";`, E = w.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
3631
+ }).filter(D), C = `${v}export * from "./${gt}";`, E = w.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
3614
3632
  ${C}
3615
3633
  deferredLoaders${w.join("")};` : C;
3616
- return await _(u.join(e.dir.dist, p, zt), E);
3634
+ return await _(u.join(e.dir.dist, p, qt), E);
3617
3635
  });
3618
3636
  await Promise.all(n);
3619
3637
  }
3620
- }), zt = "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)));
3621
- function Ht(e, t, i) {
3638
+ }), 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)));
3639
+ function Vt(e, t, i) {
3622
3640
  if (ee(e))
3623
3641
  return e;
3624
3642
  {
@@ -3637,14 +3655,14 @@ function ee(e) {
3637
3655
  return (
3638
3656
  // Inlined string literal
3639
3657
  typeof e == "string" || // Syntax kinds that are never undefined
3640
- So.has(e.kind) || // Ternary with both branches never undefined
3658
+ $o.has(e.kind) || // Ternary with both branches never undefined
3641
3659
  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
3642
- o.isBinaryExpression(e) && (Co.has(e.operatorToken.kind) || ee(e.left) && ee(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3660
+ o.isBinaryExpression(e) && (Po.has(e.operatorToken.kind) || ee(e.left) && ee(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3643
3661
  (o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && ee(e.expression) || // JSX that got converted to html`<p>Something</p>`
3644
- o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && pr.has(e.tag.text)
3662
+ o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && mr.has(e.tag.text)
3645
3663
  );
3646
3664
  }
3647
- const So = /* @__PURE__ */ new Set([
3665
+ const $o = /* @__PURE__ */ new Set([
3648
3666
  o.SyntaxKind.NumericLiteral,
3649
3667
  o.SyntaxKind.BigIntLiteral,
3650
3668
  o.SyntaxKind.StringLiteral,
@@ -3663,7 +3681,7 @@ const So = /* @__PURE__ */ new Set([
3663
3681
  o.SyntaxKind.ClassExpression,
3664
3682
  // Trust? Trust.
3665
3683
  o.SyntaxKind.NonNullExpression
3666
- ]), Co = /* @__PURE__ */ new Set([
3684
+ ]), Po = /* @__PURE__ */ new Set([
3667
3685
  o.SyntaxKind.PlusEqualsToken,
3668
3686
  o.SyntaxKind.MinusEqualsToken,
3669
3687
  o.SyntaxKind.AsteriskAsteriskEqualsToken,
@@ -3698,9 +3716,9 @@ const So = /* @__PURE__ */ new Set([
3698
3716
  o.SyntaxKind.SlashToken,
3699
3717
  o.SyntaxKind.PercentToken,
3700
3718
  o.SyntaxKind.AsteriskAsteriskToken
3701
- ]), Eo = {
3719
+ ]), ko = {
3702
3720
  property(e, t, i, s) {
3703
- const n = To(s, i, e), r = n?.type === "stringifiedReflected", a = n?.type === "reflected" || r;
3721
+ const n = Io(s, i, e), r = n?.type === "stringifiedReflected", a = n?.type === "reflected" || r;
3704
3722
  if (a) {
3705
3723
  const f = He(t);
3706
3724
  if (f === !0)
@@ -3713,11 +3731,11 @@ const So = /* @__PURE__ */ new Set([
3713
3731
  return [n.name, ...c];
3714
3732
  const [l, p] = c, m = n?.type === "stringifiedNonReflected";
3715
3733
  if (r || m) {
3716
- const f = Ht(
3734
+ const f = Vt(
3717
3735
  p,
3718
3736
  e,
3719
3737
  m ? "" : void 0
3720
- ), h = i === "value" && (s === "input" || s === "textarea" || s === ke) ? Po(f, e) : f;
3738
+ ), h = i === "value" && (s === "input" || s === "textarea" || s === ke) ? Ao(f, e) : f;
3721
3739
  if (h !== p)
3722
3740
  return [m ? `.${i}` : n.name, l, h];
3723
3741
  }
@@ -3729,7 +3747,7 @@ const So = /* @__PURE__ */ new Set([
3729
3747
  return [i];
3730
3748
  if (s === !1)
3731
3749
  return [];
3732
- const n = Ee(e, t, !0), a = n[0] !== "=" ? n : [n[0], Ht(n[1], e)];
3750
+ const n = Ee(e, t, !0), a = n[0] !== "=" ? n : [n[0], Vt(n[1], e)];
3733
3751
  return [i, ...a];
3734
3752
  },
3735
3753
  booleanAttribute(e, t, i) {
@@ -3741,8 +3759,8 @@ const So = /* @__PURE__ */ new Set([
3741
3759
  throw new Error(
3742
3760
  `Event prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3743
3761
  );
3744
- const s = i.slice(2), n = Ct(s);
3745
- return [`@${gi.has(n) ? s.toLowerCase() : Ct(s)}=`, ...vt(e, t, void 0)];
3762
+ const s = i.slice(2), n = Et(s);
3763
+ return [`@${hi.has(n) ? s.toLowerCase() : Et(s)}=`, ...bt(e, t, void 0)];
3746
3764
  },
3747
3765
  directives(e, t) {
3748
3766
  if (t === void 0 || !o.isJsxExpression(t))
@@ -3777,20 +3795,20 @@ const So = /* @__PURE__ */ new Set([
3777
3795
  ])
3778
3796
  ];
3779
3797
  },
3780
- class: Vt,
3781
- style: Vt,
3782
- key: (e, t) => [ht(t, e.sourceFile)],
3798
+ class: Xt,
3799
+ style: Xt,
3800
+ key: (e, t) => [yt(t, e.sourceFile)],
3783
3801
  deferLoad(e, t, i, s) {
3784
3802
  if (typeof s != "string")
3785
3803
  throw Error("deferLoad prop is not currently supported on dynamic tag names.");
3786
- if (!dt(s))
3804
+ if (!pt(s))
3787
3805
  throw Error(`deferLoad prop is only supported on custom elements. Found ${String(s)}`);
3788
3806
  e.neededImports.add("deferLoad");
3789
3807
  const n = e.importRenames.deferLoad;
3790
3808
  return [o.factory.createIdentifier(n)];
3791
3809
  }
3792
3810
  };
3793
- function To(e, t, i) {
3811
+ function Io(e, t, i) {
3794
3812
  if (typeof e == "string") {
3795
3813
  const r = (i.externalComponents[e] ?? i.localComponents[e])?.propToAttribute?.[t];
3796
3814
  if (r !== void 0)
@@ -3822,7 +3840,7 @@ function ze(e, t) {
3822
3840
  if (n !== void 0)
3823
3841
  return { name: n, type: "stringifiedNonReflected" };
3824
3842
  }
3825
- function ht(e, t) {
3843
+ function yt(e, t) {
3826
3844
  if (e !== void 0 && o.isJsxExpression(e) && e.expression !== void 0)
3827
3845
  return e.expression;
3828
3846
  if (e !== void 0 && o.isStringLiteral(e))
@@ -3845,10 +3863,10 @@ function Ee(e, t, i = !1) {
3845
3863
  `Invalid JSX syntax detected or there is a bug in Lumina. Found ${t.getText(e.sourceFile)}. Expected JSX attribute value to be wrapped in { }`
3846
3864
  );
3847
3865
  if (o.isStringLiteral(t))
3848
- return qt(t, i);
3866
+ return Gt(t, i);
3849
3867
  if (o.isJsxExpression(t) && t.expression) {
3850
3868
  if (o.isStringLiteral(t.expression))
3851
- return qt(t.expression, i);
3869
+ return Gt(t.expression, i);
3852
3870
  if (i) {
3853
3871
  if (o.isNumericLiteral(t.expression))
3854
3872
  return [`=${t.expression.text}`];
@@ -3856,16 +3874,16 @@ function Ee(e, t, i = !1) {
3856
3874
  return [`=${t.expression.getText(e.sourceFile)}`];
3857
3875
  }
3858
3876
  }
3859
- return ["=", ...vt(e, t, void 0)];
3877
+ return ["=", ...bt(e, t, void 0)];
3860
3878
  }
3861
- function qt(e, t) {
3879
+ function Gt(e, t) {
3862
3880
  if (!t)
3863
3881
  return ["=", e];
3864
3882
  const i = e.text;
3865
3883
  if (i.length === 0)
3866
3884
  return [];
3867
- const s = hi(i);
3868
- if (or(s)) {
3885
+ const s = yi(i);
3886
+ if (cr(s)) {
3869
3887
  const n = s.replaceAll('"', "&#34;");
3870
3888
  if (n.length > s.length) {
3871
3889
  const r = s.replaceAll("'", "&#39;");
@@ -3876,7 +3894,7 @@ function qt(e, t) {
3876
3894
  } else
3877
3895
  return [`=${s}`];
3878
3896
  }
3879
- function Vt(e, t, i) {
3897
+ function Xt(e, t, i) {
3880
3898
  if (t !== void 0 && o.isStringLiteral(t))
3881
3899
  return [`${i}="${t.text}"`];
3882
3900
  if (t === void 0 || !o.isJsxExpression(t) || t.expression === void 0)
@@ -3884,7 +3902,7 @@ function Vt(e, t, i) {
3884
3902
  `${i} prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3885
3903
  );
3886
3904
  const s = t.expression;
3887
- if ($o(s)) {
3905
+ if (xo(s)) {
3888
3906
  const r = i === "class" ? "safeClassMap" : "safeStyleMap";
3889
3907
  e.neededImports.add(r);
3890
3908
  const a = e.importRenames[r], c = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
@@ -3894,18 +3912,18 @@ function Vt(e, t, i) {
3894
3912
  } else
3895
3913
  return [i, ...Ee(e, t, !0)];
3896
3914
  }
3897
- const $o = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3898
- function Po(e, t) {
3915
+ const xo = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3916
+ function Ao(e, t) {
3899
3917
  t.neededImports.add("live");
3900
3918
  const i = t.importRenames.live;
3901
3919
  return o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [
3902
3920
  typeof e == "string" ? o.factory.createStringLiteral(e) : e
3903
3921
  ]);
3904
3922
  }
3905
- function ko(e) {
3906
- if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in Gt && e.expression.arguments.length <= 1)
3923
+ function Lo(e) {
3924
+ 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)
3907
3925
  return {
3908
- propType: Gt[e.expression.expression.text],
3926
+ propType: Yt[e.expression.expression.text],
3909
3927
  // To simplify checking logic in convertProps, wrap expression in JSX expression
3910
3928
  initializer: o.factory.createJsxExpression(
3911
3929
  void 0,
@@ -3914,21 +3932,21 @@ function ko(e) {
3914
3932
  )
3915
3933
  };
3916
3934
  }
3917
- const Gt = {
3935
+ const Yt = {
3918
3936
  bindProperty: "property",
3919
3937
  bindAttribute: "attribute",
3920
3938
  bindBooleanAttribute: "booleanAttribute",
3921
3939
  bindEvent: "event"
3922
3940
  };
3923
- function Io(e, t, i) {
3924
- return Ao.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : ui.has(e) || e.includes("-") ? "attribute" : !dt(i) && (mi.has(e) || (i === Ye ? !1 : i === ke ? (
3941
+ function No(e, t, i) {
3942
+ 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 ? (
3925
3943
  // When tag name is dynamic, we can't help but check if the prop name matches an "always attribute" in any html element
3926
3944
  Object.values(Qe).some((r) => r.has(e))
3927
- ) : Qe[i]?.has(e) === !0)) ? Pt.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === Ye || i !== ke && (ct.has(i) || lt.has(i)) ? e in W.common.reflected || e in W.common.stringifiedReflected || e in W.common.stringifiedNonReflected ? "property" : Pt.has(e) ? "booleanAttribute" : "attribute" : "property";
3945
+ ) : 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";
3928
3946
  }
3929
- const xo = ["class", "style", "ref", "directives", "key", "deferLoad"], Ao = new Set(xo), Lo = (e) => typeof e != "string" || e.trim().length > 0;
3947
+ const jo = ["class", "style", "ref", "directives", "key", "deferLoad"], Fo = new Set(jo), Do = (e) => typeof e != "string" || e.trim().length > 0;
3930
3948
  function Oe({ key: e, parts: t, litTag: i }, s) {
3931
- const n = No(t);
3949
+ const n = Ro(t);
3932
3950
  if (n.length % 2 === 0)
3933
3951
  throw new Error("Normalized template parts array length must be odd");
3934
3952
  const [r, ...a] = n;
@@ -3949,11 +3967,11 @@ function Oe({ key: e, parts: t, litTag: i }, s) {
3949
3967
  const d = s.importRenames[c], l = o.factory.createTaggedTemplateExpression(
3950
3968
  o.factory.createIdentifier(d),
3951
3969
  void 0,
3952
- a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), jo(a))
3970
+ a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), Oo(a))
3953
3971
  );
3954
3972
  return qe(s, e, l);
3955
3973
  }
3956
- const No = (e) => e.reduce(
3974
+ const Ro = (e) => e.reduce(
3957
3975
  (t, i, s) => {
3958
3976
  const n = t.at(-1), r = typeof n == "string", a = typeof i == "string";
3959
3977
  if (r && a)
@@ -3963,7 +3981,7 @@ const No = (e) => e.reduce(
3963
3981
  },
3964
3982
  [""]
3965
3983
  );
3966
- function jo(e) {
3984
+ function Oo(e) {
3967
3985
  if (!(e.length % 2 === 0))
3968
3986
  throw new Error("templatePartsToSpans should be called with normalized parts array without the first item");
3969
3987
  const i = e.length / 2;
@@ -3988,27 +4006,27 @@ function qe(e, t, i) {
3988
4006
  const s = e.importRenames.keyed;
3989
4007
  return o.factory.createCallExpression(o.factory.createIdentifier(s), void 0, [t, i]);
3990
4008
  }
3991
- const rs = (e, t) => e.getFullText(t.sourceFile).slice(0, e.getLeadingTriviaWidth(t.sourceFile));
3992
- function ns(e, t) {
3993
- const i = yt(e);
4009
+ const ns = (e, t) => e.getFullText(t.sourceFile).slice(0, e.getLeadingTriviaWidth(t.sourceFile));
4010
+ function os(e, t) {
4011
+ const i = vt(e);
3994
4012
  return i.length === 0 ? t : o.setSyntheticLeadingComments(
3995
4013
  t,
3996
4014
  i.map((s) => ({
3997
4015
  ...s,
3998
4016
  pos: -1,
3999
4017
  end: -1,
4000
- text: os(e.slice(s.pos, s.end))
4018
+ text: as(e.slice(s.pos, s.end))
4001
4019
  }))
4002
4020
  );
4003
4021
  }
4004
- const yt = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
4005
- function Fo(e) {
4006
- const t = yt(e);
4022
+ const vt = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
4023
+ function Mo(e) {
4024
+ const t = vt(e);
4007
4025
  if (t.length === 0)
4008
4026
  return [e || " "];
4009
4027
  const i = t.reduceRight(
4010
4028
  ([n, ...r], a) => {
4011
- const c = Ro(n), d = os(c.slice(a.pos, a.end));
4029
+ const c = Jo(n), d = as(c.slice(a.pos, a.end));
4012
4030
  return [
4013
4031
  c.slice(0, a.pos),
4014
4032
  /**
@@ -4026,13 +4044,13 @@ function Fo(e) {
4026
4044
  const s = i.at(-1);
4027
4045
  return (typeof s != "string" || s.trim() !== "") && i.push(" "), i;
4028
4046
  }
4029
- const os = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
4030
- function Ro(e) {
4047
+ const as = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
4048
+ function Jo(e) {
4031
4049
  if (typeof e == "string")
4032
4050
  return e;
4033
4051
  throw new Error(`Expected string, got ${typeof e}: ${String(e)}`);
4034
4052
  }
4035
- function Do(e, t) {
4053
+ function Bo(e, t) {
4036
4054
  if (!(o.isPropertyAccessExpression(t.expression) && t.expression.name.text === "map"))
4037
4055
  return t;
4038
4056
  const s = t.arguments[0];
@@ -4044,7 +4062,7 @@ function Do(e, t) {
4044
4062
  return t;
4045
4063
  const c = ge(s.body);
4046
4064
  let d = !0, l;
4047
- if (Xt(c))
4065
+ if (Qt(c))
4048
4066
  l = c;
4049
4067
  else {
4050
4068
  if (!o.isBlock(c))
@@ -4053,20 +4071,20 @@ function Do(e, t) {
4053
4071
  if (!(v && o.isReturnStatement(v) && v.expression))
4054
4072
  return t;
4055
4073
  const C = ge(v.expression);
4056
- if (!Xt(C))
4074
+ if (!Qt(C))
4057
4075
  return t;
4058
4076
  const E = c.statements.slice(0, -1);
4059
- if (E.some(as))
4077
+ if (E.some(cs))
4060
4078
  return t;
4061
4079
  d = E.length === 0, l = C;
4062
4080
  }
4063
- const p = o.isJsxElement(l) ? l.openingElement : l, m = us(p);
4081
+ const p = o.isJsxElement(l) ? l.openingElement : l, m = ms(p);
4064
4082
  if (m === -1)
4065
4083
  return t;
4066
4084
  const f = p.attributes.properties[m];
4067
4085
  if (f === void 0 || !o.isJsxAttribute(f))
4068
4086
  return t;
4069
- const g = ht(f.initializer, e.sourceFile), h = Oo(r, s, g, d, e);
4087
+ const g = yt(f.initializer, e.sourceFile), h = Ko(r, s, g, d, e);
4070
4088
  if (h === void 0)
4071
4089
  return t;
4072
4090
  e.liftedKeys.add(f.name), e.neededImports.add("repeat");
@@ -4088,22 +4106,22 @@ function Do(e, t) {
4088
4106
  )
4089
4107
  ]);
4090
4108
  }
4091
- const Xt = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e);
4092
- function as(e) {
4109
+ const Qt = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e);
4110
+ function cs(e) {
4093
4111
  if (o.isReturnStatement(e))
4094
4112
  return !0;
4095
4113
  let t = !1;
4096
4114
  return o.visitEachChild(
4097
4115
  e,
4098
- (i) => (t ||= as(i), i),
4116
+ (i) => (t ||= cs(i), i),
4099
4117
  void 0
4100
4118
  ), t;
4101
4119
  }
4102
- function Oo(e, t, i, s, n) {
4120
+ function Ko(e, t, i, s, n) {
4103
4121
  const r = J(i);
4104
4122
  if (r === void 0)
4105
4123
  return;
4106
- let a = cs(e.name, r);
4124
+ let a = ls(e.name, r);
4107
4125
  const c = t.parameters.at(1);
4108
4126
  if (c !== void 0 && o.isIdentifier(c.name) && // A more basic check is also provided in lumina/no-unnecessary-key rule
4109
4127
  r.every(Fe, c.name)) {
@@ -4115,7 +4133,7 @@ function Oo(e, t, i, s, n) {
4115
4133
  return;
4116
4134
  }
4117
4135
  if (!s) {
4118
- const d = Jo(r, a, t);
4136
+ const d = Wo(r, a, t);
4119
4137
  if (d === void 0)
4120
4138
  return;
4121
4139
  a = d;
@@ -4154,7 +4172,7 @@ function J(e) {
4154
4172
  }
4155
4173
  return t;
4156
4174
  } else {
4157
- if (Mo.has(e.kind))
4175
+ if (_o.has(e.kind))
4158
4176
  return [];
4159
4177
  {
4160
4178
  const t = ge(e);
@@ -4162,7 +4180,7 @@ function J(e) {
4162
4180
  }
4163
4181
  }
4164
4182
  }
4165
- const Mo = /* @__PURE__ */ new Set([
4183
+ const _o = /* @__PURE__ */ new Set([
4166
4184
  o.SyntaxKind.NumericLiteral,
4167
4185
  o.SyntaxKind.BigIntLiteral,
4168
4186
  o.SyntaxKind.StringLiteral,
@@ -4171,20 +4189,20 @@ const Mo = /* @__PURE__ */ new Set([
4171
4189
  o.SyntaxKind.FalseKeyword,
4172
4190
  o.SyntaxKind.NullKeyword,
4173
4191
  o.SyntaxKind.TrueKeyword
4174
- ]), ge = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? ge(e.expression) : e, cs = (e, t) => o.isObjectBindingPattern(e) ? _o(e, t) : e;
4175
- function Jo(e, t, i) {
4192
+ ]), 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;
4193
+ function Wo(e, t, i) {
4176
4194
  if (e.every(Fe, t))
4177
4195
  return t;
4178
4196
  if (o.isIdentifier(t)) {
4179
- const s = o.isBlock(i.body) ? Xe(i.body.statements, (r) => Bo(r, t)) : void 0;
4197
+ const s = o.isBlock(i.body) ? Xe(i.body.statements, (r) => Uo(r, t)) : void 0;
4180
4198
  if (s === void 0)
4181
4199
  return;
4182
- const n = cs(s, e);
4200
+ const n = ls(s, e);
4183
4201
  if (e.every(Fe, n))
4184
4202
  return n;
4185
4203
  }
4186
4204
  }
4187
- function Bo(e, t) {
4205
+ function Uo(e, t) {
4188
4206
  if (!o.isVariableStatement(e) || !(e.declarationList.flags & o.NodeFlags.Const))
4189
4207
  return;
4190
4208
  const i = e.declarationList.declarations[0];
@@ -4192,34 +4210,34 @@ function Bo(e, t) {
4192
4210
  }
4193
4211
  function Fe(e) {
4194
4212
  const t = this;
4195
- return o.isIdentifier(t) ? t.text === e : t.elements.some(Ko, e);
4213
+ return o.isIdentifier(t) ? t.text === e : t.elements.some(zo, e);
4196
4214
  }
4197
- function Ko(e) {
4215
+ function zo(e) {
4198
4216
  const t = this;
4199
4217
  return o.isOmittedExpression(e) ? !1 : Fe.call(e.name, t);
4200
4218
  }
4201
- function _o(e, t) {
4219
+ function Ho(e, t) {
4202
4220
  let i = !1;
4203
4221
  const s = e.elements.filter((n) => o.isIdentifier(n.name) ? t.includes(n.name.text) : (i = !0, !0));
4204
4222
  return i || s.length === 0 ? e : o.factory.updateObjectBindingPattern(e, s);
4205
4223
  }
4206
- const ls = (e, t) => t.liftedKeys.has(e);
4224
+ const ds = (e, t) => t.liftedKeys.has(e);
4207
4225
  function q(e, t, i) {
4208
4226
  if (fe(i))
4209
- return ds(e, i);
4210
- const s = o.isCallExpression(i) ? Do(e, i) : i, n = o.visitEachChild(
4227
+ return ps(e, i);
4228
+ const s = o.isCallExpression(i) ? Bo(e, i) : i, n = o.visitEachChild(
4211
4229
  s,
4212
4230
  // Do not add "" if parent is binary expression to not turn {(a && <b />) || c} into {(a && <b />) || "" || c}
4213
4231
  q.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
4214
4232
  e.transformationContext
4215
4233
  );
4216
- return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || fe(ge(i.right)) || gr(i.right)) ? zo(n) : n;
4234
+ return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || fe(ge(i.right)) || yr(i.right)) ? Go(n) : n;
4217
4235
  }
4218
- function ds(e, t) {
4219
- const i = ps(e, t);
4236
+ function ps(e, t) {
4237
+ const i = us(e, t);
4220
4238
  return Oe(i, e);
4221
4239
  }
4222
- function ps(e, t) {
4240
+ function us(e, t) {
4223
4241
  const i = "children" in t ? t.children : [];
4224
4242
  if (o.isJsxFragment(t))
4225
4243
  return { key: void 0, ...Te(i, e) };
@@ -4227,17 +4245,17 @@ function ps(e, t) {
4227
4245
  if (o.isJsxNamespacedName(r))
4228
4246
  throw Error(`JSX namespaced elements are not supported. Found ${r.getText(e.sourceFile)} `);
4229
4247
  if (!o.isIdentifier(r) || !r.text.startsWith(r.text[0].toLowerCase()) && r.text !== Be && r.text !== Ke) {
4230
- const S = o.isIdentifier(r) && r.text === Zs ? Te(i, e) : {
4248
+ const S = o.isIdentifier(r) && r.text === tr ? Te(i, e) : {
4231
4249
  // No need to wrap the function call in a lit-html tag
4232
4250
  litTag: void 0,
4233
- parts: [Uo(e, t, r, i)]
4251
+ parts: [Vo(e, t, r, i)]
4234
4252
  };
4235
4253
  return {
4236
- key: Wo(n, e),
4254
+ key: qo(n, e),
4237
4255
  ...S
4238
4256
  };
4239
4257
  }
4240
- const c = r.text === Be ? ke : r.text === Ke ? Ye : r.text, d = r.text === Be ? ae : r.text === Ke ? Y : tr.has(c) ? yi : ct.has(c) ? se : ce, l = dt(c), p = l ? e.localComponents[c]?.requiredProperties : void 0, m = p === void 0 ? void 0 : new Set(p);
4258
+ 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);
4241
4259
  let f;
4242
4260
  const g = [];
4243
4261
  let h = !1;
@@ -4250,16 +4268,16 @@ Found ${x.getText(e.sourceFile)}`
4250
4268
  const { name: S, initializer: A } = x;
4251
4269
  if (o.isJsxNamespacedName(S))
4252
4270
  throw Error(`JSX namespaced attributes are not supported. Found ${S.getText(e.sourceFile)}`);
4253
- const L = S.text, U = ko(A), F = U?.propType ?? Io(L, A, c);
4271
+ const L = S.text, U = Lo(A), F = U?.propType ?? No(L, A, c);
4254
4272
  m?.delete(L);
4255
- const N = Eo[F](e, U?.initializer ?? A, L, c);
4273
+ const N = ko[F](e, U?.initializer ?? A, L, c);
4256
4274
  if (N.length === 0)
4257
4275
  return [];
4258
- const B = e.compiler.shouldMinifyJsx ? [" "] : Fo(rs(S, e));
4259
- return F === "key" ? (f = typeof N[0] == "object" && !ls(S, e) ? N[0] : void 0, B.some(Lo) ? B : []) : F === "directives" || F === "ref" || L === "deferLoad" ? (h ||= F === "deferLoad", g.push(
4276
+ const B = e.compiler.shouldMinifyJsx ? [" "] : Mo(ns(S, e));
4277
+ 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(
4260
4278
  ...B,
4261
4279
  ...N.flatMap(
4262
- (D, M) => typeof D == "string" || M === 0 || typeof N[M - 1] == "string" ? D : [" ", D]
4280
+ (R, M) => typeof R == "string" || M === 0 || typeof N[M - 1] == "string" ? R : [" ", R]
4263
4281
  )
4264
4282
  ), []) : [...B, ...N];
4265
4283
  });
@@ -4267,12 +4285,12 @@ Found ${x.getText(e.sourceFile)}`
4267
4285
  "mustIncludeAllRequiredProperties",
4268
4286
  e.sourceFile.fileName,
4269
4287
  `Missing required properties for <${c}> }: ${Array.from(m).join(", ")}`
4270
- ), g.length > 0 && y.push(...g), typeof c == "string" && lt.has(c))
4288
+ ), g.length > 0 && y.push(...g), typeof c == "string" && dt.has(c))
4271
4289
  throw Error(
4272
4290
  `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`
4273
4291
  );
4274
4292
  l && (h ? e.customElementsToImportDeferred.add(c) : e.customElementsToImport.add(c));
4275
- const v = typeof c == "string" && er.has(c), w = Te(i, e);
4293
+ const v = typeof c == "string" && ir.has(c), w = Te(i, e);
4276
4294
  if (v && w.parts.length > 0)
4277
4295
  throw Error(
4278
4296
  `Void HTML elements like <${c}> cannot have children. Found ${t.getText(e.sourceFile)}`
@@ -4296,21 +4314,21 @@ Found ${x.getText(e.sourceFile)}`
4296
4314
  ];
4297
4315
  return { key: f, parts: P, litTag: d };
4298
4316
  }
4299
- function Wo(e, t) {
4300
- const i = e.attributes.properties[us(e)];
4301
- return i && o.isJsxAttribute(i) && !ls(i.name, t) ? ht(i.initializer, t.sourceFile) : void 0;
4317
+ function qo(e, t) {
4318
+ const i = e.attributes.properties[ms(e)];
4319
+ return i && o.isJsxAttribute(i) && !ds(i.name, t) ? yt(i.initializer, t.sourceFile) : void 0;
4302
4320
  }
4303
- const us = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
4304
- function Uo(e, t, i, s) {
4321
+ const ms = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
4322
+ function Vo(e, t, i, s) {
4305
4323
  const r = (o.isJsxElement(t) ? t.openingElement : t).attributes.properties.map((d) => {
4306
4324
  if (o.isJsxSpreadAttribute(d))
4307
- return ns(rs(d, e), o.factory.createSpreadAssignment(d.expression));
4325
+ return os(ns(d, e), o.factory.createSpreadAssignment(d.expression));
4308
4326
  const { name: l, initializer: p } = d;
4309
4327
  if (o.isJsxNamespacedName(l))
4310
4328
  throw Error(`JSX namespaced attributes are not supported. Found ${l.getText(e.sourceFile)}`);
4311
4329
  if (l.text === "key")
4312
4330
  return;
4313
- const m = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : fe(p) ? ds(e, p) : q(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), f = li(l.text) ? o.factory.createStringLiteral(l.text) : l;
4331
+ 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;
4314
4332
  return o.factory.createPropertyAssignment(f, m);
4315
4333
  }), { parts: a, litTag: c } = Te(s, e);
4316
4334
  return a.length > 0 && r.push(
@@ -4319,20 +4337,20 @@ function Uo(e, t, i, s) {
4319
4337
  Oe({ key: void 0, parts: a, litTag: c }, e)
4320
4338
  )
4321
4339
  ), o.factory.createCallExpression(i, void 0, [
4322
- o.factory.createObjectLiteralExpression(r.filter(R))
4340
+ o.factory.createObjectLiteralExpression(r.filter(D))
4323
4341
  ]);
4324
4342
  }
4325
4343
  function Te(e, t) {
4326
4344
  let i;
4327
4345
  const s = e.flatMap((n) => {
4328
4346
  if (o.isJsxText(n))
4329
- return [t.compiler.shouldMinifyJsx ? sr(n.text) : n.text];
4347
+ return [t.compiler.shouldMinifyJsx ? nr(n.text) : n.text];
4330
4348
  if (o.isJsxExpression(n))
4331
- return vt(t, n, n);
4349
+ return bt(t, n, n);
4332
4350
  {
4333
- const r = ps(t, n);
4351
+ const r = us(t, n);
4334
4352
  if (r.key === void 0 && r.litTag !== ae && r.litTag !== Y) {
4335
- if (r.litTag === yi)
4353
+ if (r.litTag === vi)
4336
4354
  return r.parts;
4337
4355
  if (i !== void 0 && r.litTag !== void 0 && i !== r.litTag)
4338
4356
  throw new Error(
@@ -4345,21 +4363,21 @@ function Te(e, t) {
4345
4363
  });
4346
4364
  return { litTag: i, parts: s };
4347
4365
  }
4348
- function zo(e) {
4366
+ function Go(e) {
4349
4367
  return e.operatorToken.kind === o.SyntaxKind.AmpersandAmpersandToken ? o.factory.createBinaryExpression(
4350
4368
  e,
4351
4369
  o.factory.createToken(o.SyntaxKind.BarBarToken),
4352
4370
  o.factory.createStringLiteral("")
4353
4371
  ) : e;
4354
4372
  }
4355
- function vt(e, t, i) {
4373
+ function bt(e, t, i) {
4356
4374
  if (t.expression === void 0) {
4357
4375
  if (e.compiler.shouldMinifyJsx)
4358
4376
  return [];
4359
4377
  const s = t.getText(e.sourceFile).slice(1, -1);
4360
- return yt(s).length === 0 ? [] : [ns(s, o.factory.createIdentifier("undefined"))];
4378
+ return vt(s).length === 0 ? [] : [os(s, o.factory.createIdentifier("undefined"))];
4361
4379
  }
4362
- return o.isStringLiteral(t.expression) ? [hi(t.expression.text)] : (
4380
+ return o.isStringLiteral(t.expression) ? [yi(t.expression.text)] : (
4363
4381
  /**
4364
4382
  * There is a bug in Chrome DevTools, where it won't let you set a
4365
4383
  * breakpoint inside a tagged template literal. It seems like they did
@@ -4396,17 +4414,17 @@ function vt(e, t, i) {
4396
4414
  ] : [q(e, i, t.expression)]
4397
4415
  );
4398
4416
  }
4399
- const ms = (e) => e.reduce((t, [i, s]) => (t[i] ??= [], t[i].push(s), t), {}), fs = ms(
4417
+ const fs = (e) => e.reduce((t, [i, s]) => (t[i] ??= [], t[i].push(s), t), {}), gs = fs(
4400
4418
  Object.entries(re).flatMap(
4401
4419
  ([e, t]) => t.map((i) => [i, e])
4402
4420
  )
4403
- ), gs = new Set(Object.keys(fs));
4404
- function Ho(e, t) {
4421
+ ), hs = new Set(Object.keys(gs));
4422
+ function Xo(e, t) {
4405
4423
  const i = t.importClause, s = i === void 0, n = t.moduleSpecifier;
4406
4424
  if (!o.isStringLiteral(n))
4407
4425
  return t;
4408
- const r = qo(e.sourceFile.fileName, n.text, ""), a = i?.phaseModifier !== o.SyntaxKind.TypeKeyword;
4409
- if (a && e.existingImportedModules.add(r), yr.test(n.text) && // If id already includes ?, bypass our custom behavior
4426
+ const r = Yo(e.sourceFile.fileName, n.text, ""), a = i?.phaseModifier !== o.SyntaxKind.TypeKeyword;
4427
+ if (a && e.existingImportedModules.add(r), br.test(n.text) && // If id already includes ?, bypass our custom behavior
4410
4428
  !n.text.includes("?")) {
4411
4429
  if (s) {
4412
4430
  if (e.compiler.viteCommand !== "build" || e.compiler.isInStorybook || e.compiler.isInTest)
@@ -4439,12 +4457,12 @@ function Ho(e, t) {
4439
4457
  const c = i.namedBindings;
4440
4458
  if (c === void 0 || !o.isNamedImports(c))
4441
4459
  return t;
4442
- const d = gs.has(n.text);
4460
+ const d = hs.has(n.text);
4443
4461
  if (c.elements.forEach((l) => {
4444
4462
  const p = (l.propertyName ?? l.name).text, m = re[p];
4445
4463
  if (d) {
4446
4464
  if (m?.some((h) => h === n.text)) {
4447
- const h = hs(p, r);
4465
+ const h = ys(p, r);
4448
4466
  e.existingLitImports.add(h), e.importRenames[h] = l.name?.text ?? h;
4449
4467
  }
4450
4468
  } else (l.name.text === "h" || l.name.text === "createElement") && j().name !== "@arcgis/lumina" && (e.hasNonLuminaJsxImport = !0);
@@ -4454,7 +4472,7 @@ function Ho(e, t) {
4454
4472
  let l = !1;
4455
4473
  const p = c.elements.filter((f) => {
4456
4474
  const g = (f.propertyName ?? f.name).text;
4457
- return hr.has(g) ? !1 : (l ||= !f.isTypeOnly, !0);
4475
+ return vr.has(g) ? !1 : (l ||= !f.isTypeOnly, !0);
4458
4476
  });
4459
4477
  if (p.length === 0)
4460
4478
  return;
@@ -4483,22 +4501,22 @@ function Ho(e, t) {
4483
4501
  }
4484
4502
  return t;
4485
4503
  }
4486
- const hs = (e, t) => e === ce && re.staticHtml.includes(t) ? ae : e === se && re.staticSvg.includes(t) ? Y : e, qo = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
4487
- function Vo(e) {
4488
- return o.isImportDeclaration(e) ? Go(this, e) : e;
4504
+ 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;
4505
+ function Qo(e) {
4506
+ return o.isImportDeclaration(e) ? Zo(this, e) : e;
4489
4507
  }
4490
- function Go(e, t) {
4508
+ function Zo(e, t) {
4491
4509
  const i = t.importClause, s = i?.namedBindings, n = t.moduleSpecifier;
4492
- if (!o.isStringLiteral(n) || !s || !o.isNamedImports(s) || !gs.has(n.text))
4510
+ if (!o.isStringLiteral(n) || !s || !o.isNamedImports(s) || !hs.has(n.text))
4493
4511
  return t;
4494
4512
  const r = i.phaseModifier === o.SyntaxKind.TypeKeyword;
4495
4513
  let a = !1;
4496
4514
  const c = s.elements.map((d) => {
4497
- const l = (d.propertyName ?? d.name).text, p = hs(l, n.text);
4515
+ const l = (d.propertyName ?? d.name).text, p = ys(l, n.text);
4498
4516
  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;
4499
4517
  });
4500
- return fs[n.text]?.forEach((d) => {
4501
- !e.neededImports.has(d) || e.existingLitImports.has(d) || (e.neededImports.delete(d), a = !0, c.push(ys(d, e)));
4518
+ return gs[n.text]?.forEach((d) => {
4519
+ !e.neededImports.has(d) || e.existingLitImports.has(d) || (e.neededImports.delete(d), a = !0, c.push(vs(d, e)));
4502
4520
  }), a ? o.factory.updateImportDeclaration(
4503
4521
  t,
4504
4522
  t.modifiers,
@@ -4512,8 +4530,8 @@ function Go(e, t) {
4512
4530
  t.attributes
4513
4531
  ) : t;
4514
4532
  }
4515
- function Xo(e) {
4516
- const t = ms(
4533
+ function ea(e) {
4534
+ const t = fs(
4517
4535
  Array.from(e.neededImports, (i) => [re[i][0], i])
4518
4536
  );
4519
4537
  return Object.entries(t).map(
@@ -4523,14 +4541,14 @@ function Xo(e) {
4523
4541
  void 0,
4524
4542
  void 0,
4525
4543
  o.factory.createNamedImports(
4526
- s.map((n) => (e.neededImports.delete(n), ys(n, e)))
4544
+ s.map((n) => (e.neededImports.delete(n), vs(n, e)))
4527
4545
  )
4528
4546
  ),
4529
4547
  o.factory.createStringLiteral(i)
4530
4548
  )
4531
4549
  );
4532
4550
  }
4533
- function ys(e, t) {
4551
+ function vs(e, t) {
4534
4552
  const i = e === ae ? ce : e === Y ? se : e, s = t.importRenames[e];
4535
4553
  return s === i ? o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(i)) : o.factory.createImportSpecifier(
4536
4554
  !1,
@@ -4538,21 +4556,21 @@ function ys(e, t) {
4538
4556
  o.factory.createIdentifier(s)
4539
4557
  );
4540
4558
  }
4541
- function Yo(e) {
4542
- const t = Mr().map(({ packageName: i }) => i);
4559
+ function ta(e) {
4560
+ const t = Br().map(({ packageName: i }) => i);
4543
4561
  return e.existingImportedModules.forEach((i) => {
4544
4562
  if (u.isAbsolute(i))
4545
4563
  return;
4546
- const s = Ys(i), n = i.slice(s.length + 1);
4564
+ const s = Zs(i), n = i.slice(s.length + 1);
4547
4565
  if (t.includes(s ?? "") && (n.startsWith("dist/components") || n.startsWith("components"))) {
4548
- const r = Re(e.sourceFile.fileName);
4566
+ const r = De(e.sourceFile.fileName);
4549
4567
  throw new Error(
4550
4568
  `Did not expect to find any explicit imports for "${i}". Found import in ${r}. Imports for web components that your component consumes will be added automatically at build-time as appropriate for a given output target. Type-only imports are still allowed. If you believe this is an error, please notify Lumina maintainers.`
4551
4569
  );
4552
4570
  }
4553
4571
  }), [];
4554
4572
  }
4555
- function Qo(e) {
4573
+ function ia(e) {
4556
4574
  if (e.compiler.viteCommand === "serve")
4557
4575
  return e.customElementsToImport.clear(), e.customElementsToImportDeferred.clear(), [];
4558
4576
  const t = e.compiler._customElementDependencies;
@@ -4567,7 +4585,7 @@ function Qo(e) {
4567
4585
  t[s] ??= { referencedBy: [], referencedTagNames: [], referencedDeferredTagNames: [] }, t[s].referencedBy.push(e.sourceFile.fileName);
4568
4586
  }), [];
4569
4587
  }
4570
- const Zo = (e, t) => {
4588
+ const sa = (e, t) => {
4571
4589
  const i = e.pragmas;
4572
4590
  if (i?.has("jsx") === !0 || i?.has("jsxImportSource") === !0)
4573
4591
  return e.statements;
@@ -4587,11 +4605,11 @@ const Zo = (e, t) => {
4587
4605
  }
4588
4606
  const r = {
4589
4607
  compiler: t.compiler,
4590
- externalComponents: Ii(),
4591
- localComponents: is(t.compiler),
4608
+ externalComponents: xi(),
4609
+ localComponents: ss(t.compiler),
4592
4610
  sourceFile: e,
4593
4611
  transformationContext: t.transformation,
4594
- importRenames: ea(e),
4612
+ importRenames: ra(e),
4595
4613
  existingImportedModules: /* @__PURE__ */ new Set(),
4596
4614
  importedFunctionComponentsFromModules: /* @__PURE__ */ new Set(),
4597
4615
  existingLitImports: /* @__PURE__ */ new Set(),
@@ -4605,7 +4623,7 @@ const Zo = (e, t) => {
4605
4623
  let a = [];
4606
4624
  if (e.statements.every((d) => {
4607
4625
  if (o.isImportDeclaration(d)) {
4608
- const l = Ho(r, d);
4626
+ const l = Xo(r, d);
4609
4627
  if (l === void 0)
4610
4628
  return !0;
4611
4629
  if (a.push(l), r.hasNonLuminaJsxImport)
@@ -4615,11 +4633,11 @@ const Zo = (e, t) => {
4615
4633
  return !0;
4616
4634
  }), r.hasNonLuminaJsxImport)
4617
4635
  return e.statements;
4618
- if (r.neededImports.size > 0 && (a = a.map(Vo, r), r.existingLitImports.size > 0))
4636
+ if (r.neededImports.size > 0 && (a = a.map(Qo, r), r.existingLitImports.size > 0))
4619
4637
  throw new Error(
4620
4638
  `Expected context.existingLitImports to be empty by now. Found: ${Array.from(r.existingLitImports).join(", ")}`
4621
4639
  );
4622
- const c = [Xo, Yo, Qo].flatMap(
4640
+ const c = [ea, ta, ia].flatMap(
4623
4641
  (d) => d(r)
4624
4642
  );
4625
4643
  if (r.neededImports.size > 0)
@@ -4628,24 +4646,24 @@ const Zo = (e, t) => {
4628
4646
  );
4629
4647
  return [...c, ...a];
4630
4648
  };
4631
- function ea(e) {
4632
- return ta(e), Object.fromEntries(
4633
- fr.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4649
+ function ra(e) {
4650
+ return na(e), Object.fromEntries(
4651
+ hr.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4634
4652
  );
4635
4653
  }
4636
- function ta(e) {
4654
+ function na(e) {
4637
4655
  if (!("identifiers" in e))
4638
4656
  throw new Error(
4639
4657
  "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."
4640
4658
  );
4641
4659
  }
4642
- const Yt = "customElement", ia = (e, t) => {
4660
+ const Zt = "customElement", oa = (e, t) => {
4643
4661
  const i = [];
4644
4662
  if (t.apiModule?.declarations.forEach((r) => {
4645
4663
  const a = r;
4646
4664
  a.customElement !== void 0 && i.push(
4647
4665
  o.factory.createExpressionStatement(
4648
- o.factory.createCallExpression(o.factory.createIdentifier(Yt), void 0, [
4666
+ o.factory.createCallExpression(o.factory.createIdentifier(Zt), void 0, [
4649
4667
  o.factory.createStringLiteral(a.tagName ?? ""),
4650
4668
  o.factory.createIdentifier(a.name)
4651
4669
  ])
@@ -4663,13 +4681,13 @@ const Yt = "customElement", ia = (e, t) => {
4663
4681
  void 0,
4664
4682
  void 0,
4665
4683
  o.factory.createNamedImports([
4666
- o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(Yt))
4684
+ o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(Zt))
4667
4685
  ])
4668
4686
  ),
4669
4687
  o.factory.createStringLiteral(s)
4670
4688
  ), ...e.statements, ...i];
4671
4689
  };
4672
- function sa(e, t, i) {
4690
+ function aa(e, t, i) {
4673
4691
  return t.size === 0 ? e : [
4674
4692
  o.factory.createPropertyDeclaration(
4675
4693
  [
@@ -4683,8 +4701,8 @@ function sa(e, t, i) {
4683
4701
  Array.from(
4684
4702
  t.entries(),
4685
4703
  ([s, n]) => o.factory.createPropertyAssignment(
4686
- li(s) ? o.factory.createStringLiteral(s) : s,
4687
- ra(n, i)
4704
+ di(s) ? o.factory.createStringLiteral(s) : s,
4705
+ ca(n, i)
4688
4706
  )
4689
4707
  )
4690
4708
  )
@@ -4692,7 +4710,7 @@ function sa(e, t, i) {
4692
4710
  ...e
4693
4711
  ];
4694
4712
  }
4695
- function ra(e, t) {
4713
+ function ca(e, t) {
4696
4714
  let i = 0, s = !0;
4697
4715
  const n = [], r = [];
4698
4716
  for (const d of e.properties)
@@ -4702,27 +4720,27 @@ function ra(e, t) {
4702
4720
  return !0;
4703
4721
  const l = d.name.text, p = d.initializer, m = p.kind === o.SyntaxKind.TrueKeyword, f = p.kind === o.SyntaxKind.FalseKeyword;
4704
4722
  if (l === "attribute")
4705
- return s = !1, i |= m ? Et : 0, !m && !f;
4723
+ return s = !1, i |= m ? Tt : 0, !m && !f;
4706
4724
  if (l === "reflect")
4707
- return i |= m ? ks : 0, !1;
4725
+ return i |= m ? Is : 0, !1;
4708
4726
  if (l === "type" && o.isIdentifier(p)) {
4709
4727
  if (p.text === "Boolean")
4710
- return i |= Is, !1;
4711
- if (p.text === "Number")
4712
4728
  return i |= xs, !1;
4729
+ if (p.text === "Number")
4730
+ return i |= As, !1;
4713
4731
  } else {
4714
4732
  if (l === "state")
4715
- return s = !1, i |= m ? As : 0, !1;
4733
+ return s = !1, i |= m ? Ls : 0, !1;
4716
4734
  if (l === "readOnly")
4717
- return i |= m ? Ls : 0, !1;
4718
- if (l === "noAccessor")
4719
4735
  return i |= m ? Ns : 0, !1;
4720
- if (l === "useDefault")
4736
+ if (l === "noAccessor")
4721
4737
  return i |= m ? js : 0, !1;
4738
+ if (l === "useDefault")
4739
+ return i |= m ? Fs : 0, !1;
4722
4740
  }
4723
4741
  return !0;
4724
4742
  }
4725
- s && (i |= Et);
4743
+ s && (i |= Tt);
4726
4744
  const c = o.factory.createNumericLiteral(i);
4727
4745
  return n.length === 0 && (t || r.length === 0) ? c : o.factory.createArrayLiteralExpression([
4728
4746
  c,
@@ -4737,7 +4755,7 @@ function ra(e, t) {
4737
4755
  ...t ? [] : [o.factory.createObjectLiteralExpression(r)]
4738
4756
  ]);
4739
4757
  }
4740
- function na(e, t, i) {
4758
+ function la(e, t, i) {
4741
4759
  let s = -1, n = -1, r = -1;
4742
4760
  e.options?.properties.forEach((p, m) => {
4743
4761
  if (o.isSpreadAssignment(p))
@@ -4749,23 +4767,23 @@ function na(e, t, i) {
4749
4767
  f === "type" ? s = m : f === "attribute" ? n = m : f === "readOnly" && (r = m);
4750
4768
  }
4751
4769
  });
4752
- const a = i.attribute === void 0 && n === -1, c = i.readonly === !0 && i.docsOnlyReadonly !== !0 && r === -1, d = oa(e, i, s), l = [
4770
+ const a = i.attribute === void 0 && n === -1, c = i.readonly === !0 && i.docsOnlyReadonly !== !0 && r === -1, d = da(e, i, s), l = [
4753
4771
  ...a ? [o.factory.createPropertyAssignment("attribute", o.factory.createFalse())] : [],
4754
4772
  ...c ? [o.factory.createPropertyAssignment("readOnly", o.factory.createTrue())] : [],
4755
4773
  ...d !== void 0 ? [d] : []
4756
4774
  ];
4757
4775
  return l.length > 0 ? e.options === void 0 ? o.factory.createObjectLiteralExpression(l, !1) : o.factory.updateObjectLiteralExpression(e.options, [...e.options.properties, ...l]) : e.options;
4758
4776
  }
4759
- function oa(e, t, i) {
4777
+ function da(e, t, i) {
4760
4778
  if (t.attribute === void 0)
4761
4779
  return;
4762
- const s = aa(t.type.values);
4780
+ const s = pa(t.type.values);
4763
4781
  return s === "Other" || t.readonly === !0 && (s !== "Boolean" || t.reflects === void 0) || e.options?.properties[i] !== void 0 ? void 0 : o.factory.createPropertyAssignment(
4764
4782
  o.factory.createIdentifier("type"),
4765
4783
  o.factory.createIdentifier(s)
4766
4784
  );
4767
4785
  }
4768
- function aa(e) {
4786
+ function pa(e) {
4769
4787
  let t = !1, i = !1, s = !1;
4770
4788
  if (e?.forEach((n) => {
4771
4789
  t ||= n.type === "number", i ||= n.type === "boolean", s ||= n.type === "string" || n.type === "any" || n.type === "unknown";
@@ -4777,7 +4795,7 @@ function aa(e) {
4777
4795
  }
4778
4796
  return "Other";
4779
4797
  }
4780
- function ca(e, t, i, s, n, r) {
4798
+ function ua(e, t, i, s, n, r) {
4781
4799
  if (i.modifiers === void 0)
4782
4800
  return i;
4783
4801
  let a = -1, c = -1;
@@ -4787,23 +4805,23 @@ function ca(e, t, i, s, n, r) {
4787
4805
  p === "property" && (a = l), p === "state" && (c = l);
4788
4806
  }
4789
4807
  }), a !== -1) {
4790
- const d = la(e, t, i, s, n), l = Qt(i, a, n), p = na(l, n, d);
4791
- return r.set(d.name, p ?? o.factory.createObjectLiteralExpression()), l.options = p, Zt(i, a);
4808
+ const d = ma(e, t, i, s, n), l = ei(i, a, n), p = la(l, n, d);
4809
+ return r.set(d.name, p ?? o.factory.createObjectLiteralExpression()), l.options = p, ti(i, a);
4792
4810
  } else if (c !== -1) {
4793
- const d = Qt(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 = di(i.name);
4811
+ 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);
4794
4812
  if (m === void 0)
4795
4813
  throw new Error("Failed to statically determine the state property name");
4796
- return r.set(m, p), Zt(i, c);
4814
+ return r.set(m, p), ti(i, c);
4797
4815
  } else
4798
4816
  return i;
4799
4817
  }
4800
- function la(e, t, i, s, n) {
4818
+ function ma(e, t, i, s, n) {
4801
4819
  const r = t ?? (e.compiler.isInTest ? {
4802
4820
  members: []
4803
4821
  } : void 0);
4804
4822
  if (r === void 0)
4805
4823
  throw Error(`Failed to find API component for ${s} in ${n.fileName}`);
4806
- const a = di(i.name);
4824
+ const a = pi(i.name);
4807
4825
  let c;
4808
4826
  for (let d = 0; d < r.members.length; ++d) {
4809
4827
  const l = r.members[d];
@@ -4818,11 +4836,11 @@ function la(e, t, i, s, n) {
4818
4836
  throw Error(
4819
4837
  `Failed to statically determine the property name: ${i.getText(n)} in ${s} in ${n.fileName}`
4820
4838
  );
4821
- c.name = a, c.attribute ??= si(a);
4839
+ c.name = a, c.attribute ??= ni(a);
4822
4840
  }
4823
4841
  return c;
4824
4842
  }
4825
- function Qt(e, t, i) {
4843
+ function ei(e, t, i) {
4826
4844
  const s = e.modifiers[t], n = s.expression, r = n.arguments.at(0);
4827
4845
  if (r && !o.isObjectLiteralExpression(r))
4828
4846
  throw new Error(
@@ -4830,7 +4848,7 @@ function Qt(e, t, i) {
4830
4848
  );
4831
4849
  return { decorator: s, callExpression: n, options: r };
4832
4850
  }
4833
- function Zt(e, t) {
4851
+ function ti(e, t) {
4834
4852
  const i = [
4835
4853
  ...e.modifiers.slice(0, t),
4836
4854
  ...e.modifiers.slice(t + 1)
@@ -4857,7 +4875,7 @@ function Zt(e, t) {
4857
4875
  e.initializer
4858
4876
  );
4859
4877
  }
4860
- function da(e, t, i, s) {
4878
+ function fa(e, t, i, s) {
4861
4879
  let n;
4862
4880
  if (e.apiJsonEnabled)
4863
4881
  for (let d = 0; d < e.privateApiJson.modules.length; ++d) {
@@ -4880,9 +4898,9 @@ function da(e, t, i, s) {
4880
4898
  } finally {
4881
4899
  c = i.statements, i.statements = a;
4882
4900
  }
4883
- return pa(i, c);
4901
+ return ga(i, c);
4884
4902
  }
4885
- const pa = (e, t) => o.factory.updateSourceFile(
4903
+ const ga = (e, t) => o.factory.updateSourceFile(
4886
4904
  e,
4887
4905
  t,
4888
4906
  /*
@@ -4897,10 +4915,10 @@ const pa = (e, t) => o.factory.updateSourceFile(
4897
4915
  !1,
4898
4916
  e.libReferenceDirectives
4899
4917
  );
4900
- function ua(e, t) {
4918
+ function ha(e, t) {
4901
4919
  t.compiler.viteCommand === "build" && ("emitNode" in e && (e.emitNode ??= {}), o.setEmitFlags(e, o.EmitFlags.NoComments));
4902
4920
  }
4903
- const ma = (e, t) => {
4921
+ const ya = (e, t) => {
4904
4922
  let i;
4905
4923
  if (t.apiModule !== void 0)
4906
4924
  for (let d = 0; d < t.apiModule.declarations.length; ++d) {
@@ -4916,16 +4934,16 @@ const ma = (e, t) => {
4916
4934
  function n() {
4917
4935
  s = /* @__PURE__ */ new Map();
4918
4936
  }
4919
- const r = (d) => sa(d, s, t.compiler.shouldMinify);
4937
+ const r = (d) => aa(d, s, t.compiler.shouldMinify);
4920
4938
  function a(d, l) {
4921
- const p = ga(t, i, d, l, e, s);
4922
- return ua(p, t), p;
4939
+ const p = ba(t, i, d, l, e, s);
4940
+ return ha(p, t), p;
4923
4941
  }
4924
4942
  return e.statements.map(
4925
- (d) => vs(a, d, t, n, r)
4943
+ (d) => bs(a, d, t, n, r)
4926
4944
  );
4927
4945
  };
4928
- function vs(e, t, i, s, n = pi) {
4946
+ function bs(e, t, i, s, n = ui) {
4929
4947
  if (o.isClassDeclaration(t) && // Ignore classes that don't extend anything - those are definitely not components
4930
4948
  t.heritageClauses?.some((r) => r.token === o.SyntaxKind.ExtendsKeyword)) {
4931
4949
  let r = !1;
@@ -4948,15 +4966,15 @@ function vs(e, t, i, s, n = pi) {
4948
4966
  } else
4949
4967
  return i.compiler.isInTest ? o.visitEachChild(
4950
4968
  t,
4951
- (a) => vs(e, a, i, s, n),
4969
+ (a) => bs(e, a, i, s, n),
4952
4970
  i.transformation
4953
4971
  ) : t;
4954
4972
  }
4955
- const fa = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4956
- function ga(e, t, i, s, n, r) {
4973
+ const va = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4974
+ function ba(e, t, i, s, n, r) {
4957
4975
  if (o.isMethodDeclaration(i)) {
4958
4976
  const a = i.modifiers?.filter(
4959
- (c) => !o.isDecorator(c) || !ha(c)
4977
+ (c) => !o.isDecorator(c) || !wa(c)
4960
4978
  );
4961
4979
  if (a?.length !== i.modifiers?.length)
4962
4980
  return o.factory.updateMethodDeclaration(
@@ -4970,7 +4988,7 @@ function ga(e, t, i, s, n, r) {
4970
4988
  i.type,
4971
4989
  i.body
4972
4990
  );
4973
- if ("text" in i.name && fa.has(i.name.text) && i.body) {
4991
+ if ("text" in i.name && va.has(i.name.text) && i.body) {
4974
4992
  const c = i.name.text;
4975
4993
  return i.body.statements.some(
4976
4994
  (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
@@ -4996,14 +5014,14 @@ function ga(e, t, i, s, n, r) {
4996
5014
  );
4997
5015
  }
4998
5016
  }
4999
- return o.isPropertyDeclaration(i) || o.isAccessor(i) ? ca(e, t, i, s, n, r) : i;
5000
- }
5001
- const ha = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", ya = [
5002
- Zo,
5003
- ia,
5004
- ma
5005
- ], va = "@arcgis/lumina:transformComponents", ba = (e) => ({
5006
- name: va,
5017
+ return o.isPropertyDeclaration(i) || o.isAccessor(i) ? ua(e, t, i, s, n, r) : i;
5018
+ }
5019
+ const wa = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", Sa = [
5020
+ sa,
5021
+ oa,
5022
+ ya
5023
+ ], Ca = "@arcgis/lumina:transformComponents", Ea = (e) => ({
5024
+ name: Ca,
5007
5025
  transform: {
5008
5026
  // Transform JSX to lit-html first so that vite:esbuild doesn't transform JSX to h().
5009
5027
  // Also, we need to run on the original fs file, before other transforms so
@@ -5023,11 +5041,11 @@ const ha = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expressio
5023
5041
  e.apiJsonDeferred === void 0 ? [ne] : [ne, e.apiJsonDeferred.promise]
5024
5042
  );
5025
5043
  const n = e.getSourceFile(i, t), a = o.transform(n, [
5026
- (f) => () => da(e, f, n, [
5044
+ (f) => () => fa(e, f, n, [
5027
5045
  ...e.options.types?.sourceFileTransformers ?? [],
5028
- ...ya
5046
+ ...Sa
5029
5047
  ])
5030
- ]).transformed[0], c = e._typeScriptPrinter, d = e.viteConfig.build.sourcemap === !1 ? void 0 : Tt.createSourceMapGenerator(wa, u.basename(i), "", u.dirname(i), {}), l = Tt.createTextWriter(`
5048
+ ]).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(`
5031
5049
  `);
5032
5050
  c.writeFile(a, l, d);
5033
5051
  const p = l.getText(), m = d?.toJSON();
@@ -5037,42 +5055,42 @@ const ha = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expressio
5037
5055
  };
5038
5056
  }
5039
5057
  }
5040
- }), wa = {
5058
+ }), Ta = {
5041
5059
  getCurrentDirectory: o.sys.getCurrentDirectory,
5042
- getCanonicalFileName: o.sys.useCaseSensitiveFileNames ? pi : (e) => e.toLowerCase()
5043
- }, Sa = (e) => ({
5060
+ getCanonicalFileName: o.sys.useCaseSensitiveFileNames ? ui : (e) => e.toLowerCase()
5061
+ }, $a = (e) => ({
5044
5062
  name: "@arcgis/lumina:handleDynamicAssets",
5045
5063
  configureServer(t) {
5046
- e.server = t, ei(e).forEach(({ assets: i, transformers: s }) => ie(e, i, s));
5064
+ e.server = t, ii(e).forEach(({ assets: i, transformers: s }) => ie(e, i, s));
5047
5065
  },
5048
5066
  async writeBundle() {
5049
5067
  await Promise.all(
5050
- ei(e).map(
5051
- async ({ assets: t, transformers: i }) => await Fi(e, t, i)
5068
+ ii(e).map(
5069
+ async ({ assets: t, transformers: i }) => await Di(e, t, i)
5052
5070
  )
5053
5071
  );
5054
5072
  }
5055
5073
  });
5056
- function ei(e) {
5074
+ function ii(e) {
5057
5075
  const t = [], i = e.assetsToProvide?.filter((s) => s.apply === void 0 || s.apply === e.viteCommand) ?? [];
5058
5076
  return e.options.assets?.extra?.forEach((s) => {
5059
5077
  "type" in s ? t.push(s) : "assets" in s && t.push(...s.assets);
5060
5078
  }), t.length > 0 && i.push({ assets: t }), e.isInBuildWatch || (e.assetsToProvide = void 0), i;
5061
5079
  }
5062
- const ot = "@arcgis/lumina:updatePackageJson", Ca = (e) => ({
5080
+ const ot = "@arcgis/lumina:updatePackageJson", Pa = (e) => ({
5063
5081
  name: ot,
5064
5082
  apply: () => e.viteCommand === "serve" && e.environment === "development" && !e.isInTest && !e.isInCi,
5065
5083
  configResolved() {
5066
- Ea(e).catch(
5084
+ ka(e).catch(
5067
5085
  (t) => T.error(ot, `Failed to update package's package.json:${String(t)}`)
5068
5086
  );
5069
5087
  }
5070
5088
  });
5071
- async function Ea(e) {
5072
- const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await z(t, "utf-8")), s = Ta(i, e);
5073
- s && ci(t, JSON.stringify(s, null, 2));
5089
+ async function ka(e) {
5090
+ const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await z(t, "utf-8")), s = Ia(i, e);
5091
+ s && li(t, JSON.stringify(s, null, 2));
5074
5092
  }
5075
- function Ta(e, t) {
5093
+ function Ia(e, t) {
5076
5094
  const i = e?.devDependencies ?? {};
5077
5095
  Object.keys(e?.peerDependencies ?? {}).forEach((l) => {
5078
5096
  l in i || T.warn(
@@ -5111,21 +5129,21 @@ function Ta(e, t) {
5111
5129
  if (s)
5112
5130
  return e;
5113
5131
  }
5114
- const $a = (e) => ({
5132
+ const xa = (e) => ({
5115
5133
  deprecation: "docs.json is deprecated and will be removed in a future release. Use api.json instead",
5116
5134
  timestamp: e.apiJson.timestamp,
5117
5135
  compiler: e.apiJson.compiler,
5118
- components: Pa(e),
5136
+ components: Aa(e),
5119
5137
  typeLibrary: {}
5120
5138
  });
5121
- function Pa(e) {
5139
+ function Aa(e) {
5122
5140
  const t = [];
5123
5141
  for (const i of e.apiJson.modules)
5124
5142
  for (const s of i.declarations)
5125
- s.customElement === !0 && t.push(ka(s, i.sourcePath));
5143
+ s.customElement === !0 && t.push(La(s, i.sourcePath));
5126
5144
  return t;
5127
5145
  }
5128
- function ka(e, t) {
5146
+ function La(e, t) {
5129
5147
  const i = e.superclass ? [{ name: "superclass", text: JSON.stringify(e.superclass) }] : [];
5130
5148
  return {
5131
5149
  filePath: t,
@@ -5140,9 +5158,9 @@ function ka(e, t) {
5140
5158
  dependencies: [],
5141
5159
  dependencyGraph: {},
5142
5160
  deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated,
5143
- props: e.members.map(Ia).filter(R),
5144
- methods: e.members.map(xa).filter(R),
5145
- events: e.events?.map(Aa) ?? [],
5161
+ props: e.members.map(Na).filter(D),
5162
+ methods: e.members.map(ja).filter(D),
5163
+ events: e.events?.map(Fa) ?? [],
5146
5164
  styles: e.cssProperties?.map(({ name: s, description: n, deprecated: r }) => ({
5147
5165
  name: s,
5148
5166
  annotation: "prop",
@@ -5167,7 +5185,7 @@ function Ve(e, t = "") {
5167
5185
  }
5168
5186
  return t;
5169
5187
  }
5170
- function Ia(e) {
5188
+ function Na(e) {
5171
5189
  if (e.kind !== "field")
5172
5190
  return;
5173
5191
  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;
@@ -5177,7 +5195,7 @@ function Ia(e) {
5177
5195
  complexType: t.type === void 0 ? void 0 : {
5178
5196
  original: t.type.text,
5179
5197
  resolved: t.type.text,
5180
- references: bt(t.type.references)
5198
+ references: wt(t.type.references)
5181
5199
  },
5182
5200
  mutable: !0,
5183
5201
  attr: "attribute" in t && typeof t.attribute == "string" ? t.attribute : void 0,
@@ -5196,7 +5214,7 @@ function Ia(e) {
5196
5214
  required: n
5197
5215
  };
5198
5216
  }
5199
- const bt = (e) => Object.fromEntries(
5217
+ const wt = (e) => Object.fromEntries(
5200
5218
  e?.map(
5201
5219
  (t) => [
5202
5220
  t.name,
@@ -5208,7 +5226,7 @@ const bt = (e) => Object.fromEntries(
5208
5226
  ]
5209
5227
  ) ?? []
5210
5228
  );
5211
- function xa(e) {
5229
+ function ja(e) {
5212
5230
  if (e.kind !== "method")
5213
5231
  return;
5214
5232
  const t = e, i = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [], s = t.parameters?.map(({ name: n, type: r, description: a }) => ({
@@ -5227,7 +5245,7 @@ function xa(e) {
5227
5245
  signature: t.signature ?? "()=>unknown",
5228
5246
  parameters: s,
5229
5247
  return: t.return?.type?.text ?? "void",
5230
- references: bt([
5248
+ references: wt([
5231
5249
  ...t.return?.type?.references ?? [],
5232
5250
  ...t.parameters?.flatMap((n) => n.type.references ?? []) ?? []
5233
5251
  ])
@@ -5239,7 +5257,7 @@ function xa(e) {
5239
5257
  deprecation: typeof t.deprecated == "boolean" ? t.deprecated ? "" : void 0 : t.deprecated
5240
5258
  };
5241
5259
  }
5242
- function Aa(e) {
5260
+ function Fa(e) {
5243
5261
  const t = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [];
5244
5262
  return {
5245
5263
  event: e.name,
@@ -5248,7 +5266,7 @@ function Aa(e) {
5248
5266
  complexType: {
5249
5267
  original: e.type.text,
5250
5268
  resolved: e.type.text,
5251
- references: bt(e.type.references)
5269
+ references: wt(e.type.references)
5252
5270
  },
5253
5271
  cancelable: e.cancelable ?? !0,
5254
5272
  composed: e.composed ?? !0,
@@ -5264,8 +5282,8 @@ const ye = {
5264
5282
  cssParts: "CSS Parts",
5265
5283
  methods: "Methods"
5266
5284
  };
5267
- function bs(e) {
5268
- const t = La(e.slots), i = Na(e.events), s = ja(e.cssProperties), n = Fa(e.cssParts), r = Ra(e.members), a = e.description?.trim();
5285
+ function ws(e) {
5286
+ 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();
5269
5287
  return [...a ? [`${a}
5270
5288
  --`] : [], i, r, t, s, n].filter(Boolean).join(`
5271
5289
 
@@ -5273,28 +5291,28 @@ function bs(e) {
5273
5291
  }
5274
5292
  const ve = (e, t) => t === void 0 || t.length === 0 ? "" : `### ${e}
5275
5293
  ${t.join(`
5276
- `)}`, La = (e) => ve(
5294
+ `)}`, Da = (e) => ve(
5277
5295
  ye.slots,
5278
5296
  e?.filter((t) => t.deprecated === void 0).map(
5279
5297
  (t) => `- ${t.name ? `**${t.name}**` : "_default_"}${t.description === void 0 ? "" : ` - ${t.description}`}`
5280
5298
  )
5281
- ), Na = (e) => ve(
5299
+ ), Ra = (e) => ve(
5282
5300
  ye.events,
5283
5301
  e?.filter((t) => t.deprecated === void 0).map((t) => `- **${t.name}**${t.description === void 0 ? "" : ` - ${t.description}`}`)
5284
- ), ja = (e = []) => ve(
5302
+ ), Oa = (e = []) => ve(
5285
5303
  ye.cssProperties,
5286
5304
  e?.filter((t) => t.deprecated === void 0).map(
5287
5305
  (t) => `- **${t.name}**${t.description === void 0 ? "" : ` - ${t.description}`} ${t.default ? `_(default: ${t.default})_}` : ""}`
5288
5306
  )
5289
- ), Fa = (e) => ve(
5307
+ ), Ma = (e) => ve(
5290
5308
  ye.cssParts,
5291
5309
  e?.filter((t) => t.deprecated === void 0).map((t) => `- **${t.name}**${t.description === void 0 ? "" : ` - ${t.description}`}`)
5292
- ), Ra = (e) => ve(
5310
+ ), Ja = (e) => ve(
5293
5311
  ye.methods,
5294
- e.filter(Ds).filter((t) => t.deprecated === void 0).map(
5312
+ e.filter(Os).filter((t) => t.deprecated === void 0).map(
5295
5313
  (t) => `- \`${t.name}${t.signature}\`${t.description ? ` - ${t.description}` : ""}`
5296
5314
  )
5297
- ), ws = (e) => {
5315
+ ), Ss = (e) => {
5298
5316
  const t = [], i = /* @__PURE__ */ new Set();
5299
5317
  for (let s = 0; s < e.length; ++s) {
5300
5318
  const n = e[s].cssProperties;
@@ -5308,13 +5326,13 @@ ${t.join(`
5308
5326
  }
5309
5327
  }
5310
5328
  return t;
5311
- }, Ss = (e) => e.flatMap(
5329
+ }, Cs = (e) => e.flatMap(
5312
5330
  (t) => t.cssParts?.filter((i) => i.deprecated === void 0).map((i) => ({
5313
5331
  name: `::part(${i.name})`,
5314
5332
  description: t.tagName + (i.description === void 0 ? "" : `: ${i.description}`)
5315
5333
  })) ?? []
5316
5334
  );
5317
- function Da(e) {
5335
+ function Ba(e) {
5318
5336
  if (e.attributes === void 0)
5319
5337
  return [];
5320
5338
  const t = [];
@@ -5325,7 +5343,7 @@ function Da(e) {
5325
5343
  description: s.description || void 0,
5326
5344
  default: s.default,
5327
5345
  value: {
5328
- type: Oa(
5346
+ type: Ka(
5329
5347
  s.type.values?.map(
5330
5348
  (n) => n.type === "string" && n.value !== void 0 ? `"${n.value}"` : n.value ?? n.type
5331
5349
  )
@@ -5335,13 +5353,13 @@ function Da(e) {
5335
5353
  }
5336
5354
  return t;
5337
5355
  }
5338
- const Oa = (e) => e?.length === 1 ? e[0] : e;
5339
- function Ma(e, t) {
5340
- const i = Ja(e), s = ws(e), n = Ss(e), r = j();
5356
+ const Ka = (e) => e?.length === 1 ? e[0] : e;
5357
+ function _a(e, t) {
5358
+ const i = Wa(e), s = Ss(e), n = Cs(e), r = j();
5341
5359
  return {
5342
5360
  $schema: "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
5343
5361
  name: r.name,
5344
- version: ut(r) ?? r.version,
5362
+ version: mt(r) ?? r.version,
5345
5363
  "description-markup": "markdown",
5346
5364
  "default-icon": t.defaultIcon,
5347
5365
  contributions: {
@@ -5355,116 +5373,116 @@ function Ma(e, t) {
5355
5373
  }
5356
5374
  };
5357
5375
  }
5358
- const Ja = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5376
+ const Wa = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5359
5377
  name: t.tagName,
5360
- description: bs(t),
5378
+ description: ws(t),
5361
5379
  "doc-url": t.demos?.[0]?.url,
5362
- attributes: Da(t),
5380
+ attributes: Ba(t),
5363
5381
  slots: t.slots?.map((i) => ({
5364
5382
  name: i.name,
5365
5383
  description: i.description
5366
5384
  })),
5367
5385
  // REFACTOR: this was deprecated in the spec: https://github.com/JetBrains/web-types/blob/11e46e47cb65edc1930dc1fae854005ad45ac08f/schema/web-types.json#L866
5368
- events: ti(t),
5386
+ events: si(t),
5369
5387
  js: {
5370
- properties: Ba(t),
5371
- events: ti(t)
5388
+ properties: Ua(t),
5389
+ events: si(t)
5372
5390
  }
5373
- })), Ba = (e) => e.members.filter(Os).filter((t) => t.deprecated === void 0).map((t) => ({
5391
+ })), Ua = (e) => e.members.filter(Ms).filter((t) => t.deprecated === void 0).map((t) => ({
5374
5392
  name: t.name,
5375
5393
  description: t.description,
5376
5394
  type: t.type?.text
5377
- })) ?? [], ti = (e) => e.events?.filter((t) => t.deprecated === void 0).map((t) => ({
5395
+ })) ?? [], si = (e) => e.events?.filter((t) => t.deprecated === void 0).map((t) => ({
5378
5396
  name: t.name,
5379
5397
  type: t.type?.text,
5380
5398
  description: t.description
5381
- })) ?? [], Ka = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5399
+ })) ?? [], za = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5382
5400
  name: t.tagName,
5383
- description: bs(t),
5384
- attributes: _a(t),
5401
+ description: ws(t),
5402
+ attributes: Ha(t),
5385
5403
  references: t.demos?.map((i) => ({ name: i.description, url: i.url })) ?? []
5386
- })), _a = (e) => e.attributes?.filter((t) => t.deprecated === void 0).map((t) => ({
5404
+ })), Ha = (e) => e.attributes?.filter((t) => t.deprecated === void 0).map((t) => ({
5387
5405
  name: t.name,
5388
5406
  description: t.description || void 0,
5389
- values: Wa(t)
5390
- })) ?? [], Wa = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], Ua = (e) => ({
5407
+ values: qa(t)
5408
+ })) ?? [], qa = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], Va = (e) => ({
5391
5409
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
5392
5410
  version: 1.1,
5393
- tags: Ka(e)
5394
- }), za = (e) => ({
5411
+ tags: za(e)
5412
+ }), Ga = (e) => ({
5395
5413
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
5396
5414
  version: 1.1,
5397
- properties: ws(e),
5398
- pseudoElements: Ss(e)
5399
- }), Ha = "@arcgis/lumina:generateDocs";
5400
- function qa(e) {
5415
+ properties: Ss(e),
5416
+ pseudoElements: Cs(e)
5417
+ }), Xa = "@arcgis/lumina:generateDocs";
5418
+ function Ya(e) {
5401
5419
  return e._documentationFileNames.stencilLikeDocsJson !== void 0 && e.provideAssets([
5402
5420
  {
5403
5421
  type: "dynamic",
5404
- source: () => JSON.stringify($a(e), null, nt(e)),
5422
+ source: () => JSON.stringify(xa(e), null, nt(e)),
5405
5423
  destination: u.join("../..", e._documentationFileNames.stencilLikeDocsJson)
5406
5424
  }
5407
5425
  ]), {
5408
- name: Ha,
5426
+ name: Xa,
5409
5427
  async writeBundle() {
5410
5428
  if (e.isInStorybook)
5411
5429
  return;
5412
- 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(R);
5430
+ 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);
5413
5431
  if (c.length === 0)
5414
5432
  return;
5415
- await Ji(c);
5433
+ await Bi(c);
5416
5434
  const d = [];
5417
5435
  if (n !== void 0) {
5418
- const l = JSON.stringify(Ua(e.apiJsonComponents), null, t);
5436
+ const l = JSON.stringify(Va(e.apiJsonComponents), null, t);
5419
5437
  d.push(_(n, l));
5420
5438
  }
5421
5439
  if (r !== void 0) {
5422
- const l = JSON.stringify(za(e.apiJsonComponents), null, t);
5440
+ const l = JSON.stringify(Ga(e.apiJsonComponents), null, t);
5423
5441
  d.push(_(r, l));
5424
5442
  }
5425
5443
  if (a !== void 0) {
5426
- const l = Ma(e.apiJsonComponents, typeof i == "object" ? i : {});
5444
+ const l = _a(e.apiJsonComponents, typeof i == "object" ? i : {});
5427
5445
  d.push(_(a, JSON.stringify(l, null, t)));
5428
5446
  }
5429
5447
  await Promise.all(d);
5430
5448
  }
5431
5449
  };
5432
5450
  }
5433
- function Va(e) {
5451
+ function Qa(e) {
5434
5452
  return {
5435
5453
  name: "@arcgis/lumina:buildWrappers",
5436
5454
  apply: () => e.viteCommand === "build" && !!e.options.build?.wrappers?.length,
5437
5455
  async writeBundle() {
5438
5456
  e.isInStorybook || await Promise.all(
5439
5457
  e.options.build?.wrappers?.map(async (t) => {
5440
- t.type === "react18" && await Ya(e, t);
5458
+ t.type === "react18" && await tc(e, t);
5441
5459
  }) ?? []
5442
5460
  );
5443
5461
  }
5444
5462
  };
5445
5463
  }
5446
- const Ga = "react", ii = "@lit/react", Xa = `
5447
- import React from "${Ga}";
5448
- import { createComponent } from "${ii}";
5449
- import type { EventName } from "${ii}";
5464
+ const Za = "react", ri = "@lit/react", ec = `
5465
+ import React from "${Za}";
5466
+ import { createComponent } from "${ri}";
5467
+ import type { EventName } from "${ri}";
5450
5468
  import { makeReactWrapperFactory, getReactWrapperOptions } from "@arcgis/lumina";
5451
5469
 
5452
5470
  const createWrapper = /*@__PURE__*/ makeReactWrapperFactory(React, createComponent) as typeof createComponent;
5453
5471
  `;
5454
- async function Ya(e, t) {
5472
+ async function tc(e, t) {
5455
5473
  const { name: i } = j(), s = [];
5456
5474
  for (const a of e.apiJson.modules)
5457
5475
  for (const c of a.declarations)
5458
- Qa(c) && s.push(Za(c));
5459
- const n = [`/// <reference types="${i}" preserve="true" />`, Xa, ...s].join(""), r = u.resolve(t.proxiesFile);
5476
+ ic(c) && s.push(sc(c));
5477
+ const n = [`/// <reference types="${i}" preserve="true" />`, ec, ...s].join(""), r = u.resolve(t.proxiesFile);
5460
5478
  await X(u.dirname(r), { recursive: !0 }), await _(r, n);
5461
5479
  }
5462
- function Qa(e) {
5480
+ function ic(e) {
5463
5481
  return e.customElement === !0 && e.abstract !== !0;
5464
5482
  }
5465
- function Za(e) {
5483
+ function sc(e) {
5466
5484
  const t = e.events?.map(
5467
- (i) => ` ${Xs(`on${Ts(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
5485
+ (i) => ` ${Qs(`on${$s(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
5468
5486
  ).join(`
5469
5487
  `);
5470
5488
  return `
@@ -5479,42 +5497,42 @@ ${t}
5479
5497
  );
5480
5498
  `;
5481
5499
  }
5482
- function kc(e = {}) {
5500
+ function Lc(e = {}) {
5483
5501
  const t = new $(e), s = [
5484
5502
  t._plugin,
5485
- qn(t),
5486
- Zn(t),
5503
+ Yn(t),
5487
5504
  so(t),
5488
- Ca(t),
5489
- Mn(t),
5490
- qa(t),
5491
- ba(t),
5492
- vo(t),
5493
- vr(t),
5494
- Jn(t),
5495
- Sa(t),
5496
- wo(t),
5497
- co(t),
5498
- Qs(t),
5499
- gn(t),
5500
- Va(t),
5501
- Bn(t)
5502
- ].filter(R);
5505
+ ao(t),
5506
+ Pa(t),
5507
+ _n(t),
5508
+ Ya(t),
5509
+ Ea(t),
5510
+ Co(t),
5511
+ wr(t),
5512
+ Wn(t),
5513
+ $a(t),
5514
+ To(t),
5515
+ mo(t),
5516
+ er(t),
5517
+ bn(t),
5518
+ Qa(t),
5519
+ Un(t)
5520
+ ].filter(D);
5503
5521
  return s.context = t, s;
5504
5522
  }
5505
- const Ic = {
5506
- initializeComponentDependencies: ki,
5507
- updateLuminaTs: es,
5523
+ const Nc = {
5524
+ initializeComponentDependencies: Ii,
5525
+ updateLuminaTs: ts,
5508
5526
  propertyToAttributeMappings: W,
5509
- nativeEvents: gi,
5510
- svgElements: ct,
5511
- mathMlElements: lt,
5512
- alwaysAttributes: ui,
5513
- nativeAlwaysAttributes: mi,
5527
+ nativeEvents: hi,
5528
+ svgElements: lt,
5529
+ mathMlElements: dt,
5530
+ alwaysAttributes: mi,
5531
+ nativeAlwaysAttributes: fi,
5514
5532
  htmlAlwaysAttributes: Qe
5515
5533
  };
5516
5534
  export {
5517
- Ic as exportsForCodemod,
5518
- De as inferCdnUrl,
5519
- kc as useLumina
5535
+ Nc as exportsForCodemod,
5536
+ Re as inferCdnUrl,
5537
+ Lc as useLumina
5520
5538
  };