@arcgis/lumina-compiler 5.2.0-next.98 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,32 +1,32 @@
1
- import { externalizeDependencies as vs } from "@arcgis/node-toolkit/vite/externalizeDependenciesPlugin";
2
- import { isNotUndefined as R } from "@arcgis/toolkit/predicate";
3
- import { f as b, l as T } from "./logger-edpIalAo.js";
1
+ import { externalizeDependencies as Es } from "@arcgis/node-toolkit/vite/externalizeDependenciesPlugin";
2
+ import { isNotUndefined as D } from "@arcgis/toolkit/predicate";
3
+ import { f as b, l as T } from "./chunks/logger.js";
4
4
  import o from "typescript";
5
- import { camelToKebab as ei, getPreamble as bs, uncapitalize as wt, capitalize as ws } from "@arcgis/toolkit/string";
6
- import { lazyMetaSubItemJoiner as Ss, lazyMetaItemJoiner as Je, lazyMetaGroupJoiner as Cs, propertyFlagAttribute as St, propertyFlagReflect as Es, propertyFlagBoolean as Ts, propertyFlagNumber as $s, propertyFlagState as Ps, propertyFlagReadOnly as ks, propertyFlagNoAccessor as Is, propertyFlagUseDefault as xs } from "@arcgis/lumina/config";
7
- import { path as u, isPosix as ti, toPosixPathSeparators as G, toSystemPathSeparators as Re, getCwd as ii } from "@arcgis/node-toolkit/path";
8
- import { isApiMethodAsync as As, globalPackageIdentifier as Ls, isApiMethod as Ns, isApiProperty as js } from "@arcgis/api-extractor/utils/apiHelpers";
9
- import { existsAsync as _, findPath as si } from "@arcgis/node-toolkit/file";
10
- import { readFile as z, readdir as ot, mkdir as X, writeFile as K, copyFile as Fs, rm as Rs, cp as Ds } from "node:fs/promises";
11
- import { retrievePackageJson as j, fetchPackageLocation as $e, asyncRetrievePackageJson as ri } from "@arcgis/node-toolkit/packageJson";
12
- import { build as Os } from "esbuild";
13
- import Ms from "mime-types";
14
- import { forEachWithConcurrency as Js } from "@arcgis/toolkit/promise";
15
- import { glob as Bs } 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 _s } from "@arcgis/api-extractor/vite/plugin";
18
- import { writeFileSync as ni } from "node:fs";
19
- import { styleText as Ks } from "node:util";
20
- import { unsafeGetUndocumentedPrinter as Ws, unsafeUndocumentedTs as Ct } 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 Us, mergeApiExtractorConfigs as Et } from "@arcgis/api-extractor/extractor/config";
23
- import { loadTypeScriptConfig as zs } 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 oi, maybeEscapePropertyName as Hs } from "@arcgis/api-extractor/utils/partPrinter";
26
- import { getPackageNameFromExternalSpecifier as qs, getMemberName as ai } from "@arcgis/api-extractor/utils/astHelpers";
27
- import { identity as ci } from "@arcgis/toolkit/function";
28
- function Vs(e) {
29
- const t = e.options?.build?.dependencies ?? {}, i = vs({
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 Vs(e) {
42
42
  e.isInStorybook && (i.resolveId = void 0);
43
43
  }, i;
44
44
  }
45
- const Gs = "Fragment", Be = "DynamicHtmlTag", _e = "DynamicSvgTag", ke = /* @__PURE__ */ Symbol("dynamic html tag name"), Ye = /* @__PURE__ */ Symbol("dynamic svg tag name"), li = /* @__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 Gs = "Fragment", Be = "DynamicHtmlTag", _e = "DynamicSvgTag", ke = /* @__P
74
74
  "vocab",
75
75
  // These don't exist as a property, only as an attribute
76
76
  "exportParts"
77
- ]), di = /* @__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 Gs = "Fragment", Be = "DynamicHtmlTag", _e = "DynamicSvgTag", ke = /* @__P
913
913
  }
914
914
  }
915
915
  };
916
- pi(W.common);
917
- Object.values(W.perElement).forEach(pi);
918
- function pi(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 pi(e) {
924
924
  e.stringifiedNonReflected
925
925
  ));
926
926
  }
927
- const Tt = /* @__PURE__ */ new Set(["itemScope"]), ui = /* @__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 Tt = /* @__PURE__ */ new Set(["itemScope"]), ui = /* @__PURE__ */ new Set(
1023
1023
  "volumeChange",
1024
1024
  "waiting",
1025
1025
  "wheel"
1026
- ]), Xs = /* @__PURE__ */ new Set([
1026
+ ]), ir = /* @__PURE__ */ new Set([
1027
1027
  "area",
1028
1028
  "base",
1029
1029
  "br",
@@ -1040,7 +1040,7 @@ const Tt = /* @__PURE__ */ new Set(["itemScope"]), ui = /* @__PURE__ */ new Set(
1040
1040
  "source",
1041
1041
  "track",
1042
1042
  "wbr"
1043
- ]), at = /* @__PURE__ */ new Set([
1043
+ ]), lt = /* @__PURE__ */ new Set([
1044
1044
  "animate",
1045
1045
  "animateMotion",
1046
1046
  "animateTransform",
@@ -1099,7 +1099,7 @@ const Tt = /* @__PURE__ */ new Set(["itemScope"]), ui = /* @__PURE__ */ new Set(
1099
1099
  "tspan",
1100
1100
  "use",
1101
1101
  "view"
1102
- ]), Ys = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), ct = /* @__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 Tt = /* @__PURE__ */ new Set(["itemScope"]), ui = /* @__PURE__ */ new Set(
1131
1131
  "munder",
1132
1132
  "munderover",
1133
1133
  "semantics"
1134
- ]), Qs = /* @__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 Tt = /* @__PURE__ */ new Set(["itemScope"]), ui = /* @__PURE__ */ new Set(
1141
1141
  "font-face-name",
1142
1142
  "missing-glyph"
1143
1143
  ]);
1144
- function Zs(e) {
1144
+ function nr(e) {
1145
1145
  if (e.length === 0)
1146
1146
  return "";
1147
1147
  const t = e[0];
@@ -1149,28 +1149,28 @@ function Zs(e) {
1149
1149
  `)) {
1150
1150
  const n = t === `
1151
1151
  `, r = e.lastIndexOf(`
1152
- `), l = e.slice(r + 1).trim().length === 0, d = n ? e.trimStart() : e;
1153
- return l ? d.trimEnd() : d;
1152
+ `), c = e.slice(r + 1).trim().length === 0, d = n ? e.trimStart() : e;
1153
+ return c ? d.trimEnd() : d;
1154
1154
  }
1155
1155
  return e.trim().length === 0 ? t : e;
1156
1156
  }
1157
- const er = (e) => e.replaceAll("\\", "\\\\").replace(tr, "\\${").replaceAll("`", "\\`"), tr = /\$\{/gu, ir = (e) => !sr.test(e), sr = /^[^\s"'=<>`]+$/u, rr = /[&<>]/gu, nr = {
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
- }, mi = (e) => e.replace(rr, (t) => nr[t]), lt = (e) => typeof e == "string" && e.includes("-") && !Qs.has(e), or = ["keyed", "ref", "repeat", "live"], oe = "staticHtml", Y = "staticSvg", ae = "html", ie = "svg", fi = /* @__PURE__ */ Symbol("maybe HTML namespace or maybe SVG"), gi = "css", hi = "mathml", yi = [gi, ae, hi, oe, Y, ie], ar = new Set(yi), cr = ["safeClassMap", "safeStyleMap", "deferLoad", "stabilizedRef"], lr = "nothing", dr = [...or, ...yi, ...cr, lr], pr = (e) => o.isArrayLiteralExpression(e) && e.elements.every((t) => fe(t)), fe = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e), se = {
1162
- [ae]: ["lit", "lit/html.js", "lit-html"],
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
+ [ce]: ["lit", "lit/html.js", "lit-html"],
1163
1163
  /**
1164
1164
  * Sadly, Lit called these "html" and "svg", rather than "staticHtml" and
1165
1165
  * "staticSvg", leading to collision. We have to import them "as", as well as
1166
1166
  * check for existing "html" and "svg" imports from these locations to prevent
1167
1167
  * collisions.
1168
1168
  */
1169
- [oe]: ["lit/static-html.js", "lit-html/static.js"],
1170
- [ie]: ["lit", "lit-html", "lit/html.js"],
1169
+ [ae]: ["lit/static-html.js", "lit-html/static.js"],
1170
+ [se]: ["lit", "lit-html", "lit/html.js"],
1171
1171
  [Y]: ["lit/static-html.js", "lit-html/static.js"],
1172
- [hi]: ["lit", "lit-html", "lit/html.js"],
1173
- [gi]: ["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 er = (e) => e.replaceAll("\\", "\\\\").replace(tr, "\\${").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
- }, ur = /* @__PURE__ */ new Set([
1183
+ }, vr = /* @__PURE__ */ new Set([
1184
1184
  "h",
1185
1185
  "Fragment",
1186
1186
  "state",
@@ -1190,15 +1190,15 @@ const er = (e) => e.replaceAll("\\", "\\\\").replace(tr, "\\${").replaceAll("`",
1190
1190
  "bindProperty",
1191
1191
  "bindEvent",
1192
1192
  "bindAttribute"
1193
- ]), mr = /\.(?:css|s[ac]ss|less|styl(?:us)?|postcss|pcss|sss)(\\?|$)/u, le = "@arcgis/lumina:loadLitCss", Ie = "?litCss", Q = "?layeredLitCss", Ze = "?globalFileLitCss", fr = (e) => ({
1194
- name: le,
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
+ name: de,
1195
1195
  enforce: "pre",
1196
1196
  configResolved(t) {
1197
1197
  const i = t.plugins.find(({ name: r }) => r === "vite:css-post");
1198
1198
  if (i === void 0)
1199
1199
  throw Error(
1200
1200
  b(
1201
- le,
1201
+ de,
1202
1202
  "Unable to find the vite's built-in vite:css-post plugin. This may indicate you are trying to use Lumina with a different Vite version than it was designed for. Use `[p]npm list vite`/`yarn why vite` to check the Vite version you are using."
1203
1203
  )
1204
1204
  );
@@ -1206,7 +1206,7 @@ const er = (e) => e.replaceAll("\\", "\\\\").replace(tr, "\\${").replaceAll("`",
1206
1206
  if (typeof s != "object" || typeof s.handler != "function")
1207
1207
  throw Error(
1208
1208
  b(
1209
- le,
1209
+ de,
1210
1210
  "Expected vite:css-post to declare a transform:{handler()} property. This may indicate you are trying to use Vite 6 with Lumina version that is designed for Vite 7. Use `[p]npm list vite`/`yarn why vite` to check the Vite version you are using."
1211
1211
  )
1212
1212
  );
@@ -1214,7 +1214,7 @@ const er = (e) => e.replaceAll("\\", "\\\\").replace(tr, "\\${").replaceAll("`",
1214
1214
  if (n.length !== 1)
1215
1215
  throw Error(
1216
1216
  b(
1217
- le,
1217
+ de,
1218
1218
  `Expected vite:css-post's transform handler to have only a single property: handler. Found: ${n.join(",")}. This may indicate you are trying to use Lumina with a different Vite version than it was designed for. Use \`[p]npm list vite\`/\`yarn why vite\` to check the Vite version you are using.`
1219
1219
  )
1220
1220
  );
@@ -1222,22 +1222,22 @@ const er = (e) => e.replaceAll("\\", "\\\\").replace(tr, "\\${").replaceAll("`",
1222
1222
  ...s,
1223
1223
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
1224
1224
  async handler(r, a) {
1225
- const l = a.endsWith(Ie);
1226
- l && (a = a.slice(0, -Ie.length));
1225
+ const c = a.endsWith(Ie);
1226
+ c && (a = a.slice(0, -Ie.length));
1227
1227
  const d = a.endsWith(Q);
1228
1228
  d && (a = a.slice(0, -Q.length));
1229
- const c = a.endsWith(Ze);
1230
- if (c && (a = a.slice(0, -Ze.length)), !l && !d && !c)
1229
+ const l = a.endsWith(Ze);
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(vi) || !f.endsWith(gr) ? (T.warn(
1234
- le,
1233
+ return typeof f != "string" || !f.startsWith(Ci) || !f.endsWith(Sr) ? (T.warn(
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) : c ? (e._globalCssString = bi(f), { code: "", map: { mappings: "" } }) : {
1238
+ ), m) : l ? (e._globalCssString = Ei(f), { code: "", map: { mappings: "" } }) : {
1239
1239
  ...g,
1240
- code: br(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 er = (e) => e.replaceAll("\\", "\\\\").replace(tr, "\\${").replaceAll("`",
1247
1247
  }
1248
1248
  };
1249
1249
  }
1250
- }), vi = 'export default "', gr = '"', hr = `import { css } from '${se.css[0]}';
1251
- export const styles = css\``, yr = "`;\nexport default styles;", vr = `
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
- }`, bi = (e) => e.slice(vi.length - 1);
1263
- function br(e, t, i, s) {
1264
- const n = bi(e), r = JSON.parse(n), a = er(r), l = 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 `${hr}${l}${yr}${t ? vr : ""}`;
1267
+ return `${Cr}${c}${Er}${t ? Tr : ""}`;
1268
1268
  }
1269
- function wr(e) {
1270
- return `import("${Sr}").then(({ setCustomElementsManifest }) => {
1271
- setCustomElementsManifest(${Cr(e)});
1269
+ function Pr(e) {
1270
+ return `import("${kr}").then(({ setCustomElementsManifest }) => {
1271
+ setCustomElementsManifest(${Ir(e)});
1272
1272
  });`;
1273
1273
  }
1274
- const Sr = "@storybook/web-components-vite", Cr = (e) => `JSON.parse(\`${Er(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
1275
- function Er(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 Tr(e) {
1279
- $r(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 Tr(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
- Si("", e)
1287
+ $i("", e)
1288
1288
  ].join(`
1289
1289
  `) : `import "${i}${Ze}";`;
1290
1290
  }
1291
- const wi = "hydrated";
1292
- function $r(e) {
1291
+ const Ti = "hydrated";
1292
+ function Lr(e) {
1293
1293
  e._globalHydratedCssString = [
1294
1294
  ":not([",
1295
- e.options.css?.hydratedAttribute ?? wi,
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 Si(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,71 +1306,72 @@ function Si(e, t) {
1306
1306
  ].join(`
1307
1307
  `);
1308
1308
  }
1309
- const Pr = (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 kr(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(Ir(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
- Tr(e),
1323
- e.hmrEnabled ? Ar : "",
1322
+ Ar(e),
1323
+ e.hmrEnabled ? Rr : "",
1324
1324
  "",
1325
- e.isInStorybook ? wr(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 ? Lr(t) : ""
1331
+ e.hmrEnabled ? Or(t) : ""
1332
1332
  ].join(`
1333
1333
  `);
1334
1334
  }
1335
- const Ir = (e, t, i) => [
1335
+ const Fr = (e, t, i) => [
1336
1336
  ` "${e.tagName}": [`,
1337
1337
  `()=>import("${u.join(t.dir.root, i)}"),`,
1338
- xr(e),
1338
+ Dr(e),
1339
1339
  "]"
1340
1340
  ].join("");
1341
- function xr(e) {
1342
- const { properties: t, asyncMethods: i, syncMethods: s, formAssociated: n } = Ci(e), r = t.map((g) => g.join(Ss)).join(Je), a = i.join(Je), l = s.join(Je), d = [r, a, l], c = d.findLastIndex((g) => g.length > 0), p = d.slice(0, c + 1);
1343
- return `${p.length > 0 || n ? `"${p.join(Cs)}"` : ""}${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 Ci(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 l = typeof a.attribute == "string", d = l && a.attribute !== ei(a.name);
1350
+ const c = typeof a.attribute == "string", d = c && a.attribute !== ni(a.name);
1351
1351
  t.push(
1352
- l && !d ? [a.name] : [a.name, d ? String(a.attribute) : ""]
1352
+ c && !d ? [a.name] : [a.name, d ? String(a.attribute) : ""]
1353
1353
  );
1354
- } else a.kind === "method" && a.name !== "componentOnReady" && (As(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 Ar = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
1360
- `, Lr = (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
- }`, Nr = "@arcgis/lumina-compiler", Ei = {
1368
- name: Nr
1367
+ }`, Mr = "@arcgis/lumina-compiler", ki = {
1368
+ name: Mr
1369
1369
  };
1370
- async function Ti(e, t) {
1371
- return re ??= Fr(e, t), await re;
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;
1372
1373
  }
1373
- function jr() {
1374
+ function Br() {
1374
1375
  if (xe === void 0)
1375
1376
  throw Error(
1376
1377
  b(
@@ -1380,7 +1381,7 @@ function jr() {
1380
1381
  );
1381
1382
  return xe;
1382
1383
  }
1383
- function $i() {
1384
+ function xi() {
1384
1385
  if (et === void 0)
1385
1386
  throw Error(
1386
1387
  b(
@@ -1390,24 +1391,19 @@ function $i() {
1390
1391
  );
1391
1392
  return et;
1392
1393
  }
1393
- async function Fr(e, t) {
1394
+ async function Kr(e, t) {
1394
1395
  const i = j(e), s = i.dependencies ?? {}, n = i.peerDependencies ?? {}, a = (await Promise.all(
1395
- [...Object.keys(s), ...Object.keys(n)].filter((c) => !Rr.has(c)).flatMap(async (c) => await Pi(c, e))
1396
- )).filter(R);
1397
- xe ??= a, et = Object.fromEntries(a.flatMap((c) => Object.entries(c.components)));
1398
- const l = t?.serve?.extraDependencies?.map(
1399
- (c) => typeof c == "string" ? c : c.name
1400
- ), d = l === void 0 ? a : a.filter((c) => !l.includes(c.packageName));
1396
+ [...Object.keys(s), ...Object.keys(n)].filter((l) => !_r.has(l)).flatMap(async (l) => await Ai(l, e))
1397
+ )).filter(D);
1398
+ xe ??= a, et = Object.fromEntries(a.flatMap((l) => Object.entries(l.components)));
1399
+ const c = t?.serve?.extraDependencies?.map(
1400
+ (l) => typeof l == "string" ? l : l.name
1401
+ ), d = c === void 0 ? a : a.filter((l) => !c.includes(l.packageName));
1401
1402
  return xe ??= d, d;
1402
1403
  }
1403
- const Rr = /* @__PURE__ */ new Set([
1404
- "@arcgis/arcade-languageservice",
1405
- "@arcgis/node-toolkit",
1406
- "@arcgis/toolkit",
1407
- "@arcgis/core",
1408
- "@arcgis/languages-api-utils",
1404
+ const _r = /* @__PURE__ */ new Set([
1405
+ ...Jr,
1409
1406
  "@arcgis/languages-sdk-specs",
1410
- "@arcgis/lumina",
1411
1407
  "@commander-js/extra-typings",
1412
1408
  "@custom-elements-manifest/analyzer",
1413
1409
  "@esri/calcite-ui-icons",
@@ -1439,50 +1435,50 @@ const Rr = /* @__PURE__ */ new Set([
1439
1435
  "vscode-languageserver-textdocument",
1440
1436
  "vscode-languageserver-types"
1441
1437
  ]);
1442
- let xe, et, re;
1443
- async function Pi(e, t) {
1444
- const i = await $e(e, t), s = await ri(i), n = "exports" in s, r = Hr.bind(void 0, n), a = "@stencil/core" in (s.dependencies ?? {}) || "@stencil/core" in (s.devDependencies ?? {}), l = u.join(i, "dist/esm/loader.js");
1445
- if (a ? await _(l) : !1) {
1446
- const g = await z(l, "utf8"), h = Dr(g, "bootstrapLazy("), y = g.indexOf(", options", h), v = g.slice(h, y), w = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
1438
+ let xe, et, ne;
1439
+ async function Ai(e, t) {
1440
+ const i = await $e(e, t), s = await ci(i), n = "exports" in s, r = Zr.bind(void 0, n), a = "@stencil/core" in (s.dependencies ?? {}) || "@stencil/core" in (s.devDependencies ?? {}), c = u.join(i, "dist/esm/loader.js");
1441
+ if (a ? await K(c) : !1) {
1442
+ const g = await z(c, "utf8"), h = Wr(g, "bootstrapLazy("), y = g.indexOf(", options", h), v = g.slice(h, y), w = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
1447
1443
  try {
1448
- const C = JSON.parse(w), E = Ur(C, { packageName: e, getImportPath: r });
1444
+ const C = JSON.parse(w), E = Yr(C, { packageName: e, getImportPath: r });
1449
1445
  return { packageName: e, type: "stencil", components: E, packageLocation: i, packageJson: s };
1450
1446
  } catch (C) {
1451
1447
  T.warn("@arcgis/lumina", `Failed to parse dist/esm/loader.js for ${e}.
1452
1448
  Error: ${String(C)}`);
1453
1449
  }
1454
1450
  }
1455
- const c = $t(s.customElements);
1456
- if (c != null) {
1457
- const g = u.join(i, c), h = JSON.parse(await z(g, "utf-8")), y = Or(h), v = ki(h, {
1451
+ const l = It(s.customElements);
1452
+ if (l != null) {
1453
+ const g = u.join(i, l), h = JSON.parse(await z(g, "utf-8")), y = Ur(h), v = Li(h, {
1458
1454
  packageName: e,
1459
1455
  getImportPath: r
1460
1456
  });
1461
1457
  return { type: y ? "@arcgis/lumina" : "unknown", packageName: e, components: v, packageLocation: i, packageJson: s };
1462
1458
  }
1463
- const p = $t(s["web-types"]);
1459
+ const p = It(s["web-types"]);
1464
1460
  if (p != null) {
1465
- const g = u.join(i, p), h = JSON.parse(await z(g, "utf-8")), y = Mr(h, {
1461
+ const g = u.join(i, p), h = JSON.parse(await z(g, "utf-8")), y = zr(h, {
1466
1462
  packageName: e,
1467
1463
  getImportPath: r
1468
1464
  });
1469
1465
  return { type: "unknown", packageName: e, components: y, packageLocation: i, packageJson: s };
1470
1466
  }
1471
1467
  const m = u.join(i, "dist/components");
1472
- if (await _(m)) {
1473
- const g = await zr(m, {
1468
+ if (await K(m)) {
1469
+ const g = await Qr(m, {
1474
1470
  packageName: e,
1475
1471
  getImportPath: r
1476
1472
  });
1477
1473
  return { type: "unknown", packageName: e, components: g, packageLocation: i, packageJson: s };
1478
1474
  }
1479
1475
  }
1480
- const $t = (e) => Array.isArray(e) ? e[0] : e;
1481
- function Dr(e, t) {
1476
+ const It = (e) => Array.isArray(e) ? e[0] : e;
1477
+ function Wr(e, t) {
1482
1478
  const i = e.indexOf(t);
1483
1479
  return i === -1 ? -1 : i + t.length;
1484
1480
  }
1485
- function ki(e, t, i = !1) {
1481
+ function Li(e, t, i = !1) {
1486
1482
  const s = /* @__PURE__ */ Object.create(null);
1487
1483
  if (e.modules === void 0)
1488
1484
  return s;
@@ -1493,7 +1489,7 @@ function ki(e, t, i = !1) {
1493
1489
  const d = r.declarations[a];
1494
1490
  if (d.customElement !== !0)
1495
1491
  continue;
1496
- const c = (
1492
+ const l = (
1497
1493
  // New api.json
1498
1494
  "sourcePath" in r ? r.path : (
1499
1495
  // Older api.json
@@ -1501,7 +1497,7 @@ function ki(e, t, i = !1) {
1501
1497
  )
1502
1498
  ), p = d.tagName, m = {
1503
1499
  packageName: t.packageName,
1504
- modulePath: c ?? t.getImportPath(p),
1500
+ modulePath: l ?? t.getImportPath(p),
1505
1501
  propToAttribute: Object.fromEntries(
1506
1502
  (d.attributes ?? []).map((f) => [f.fieldName ?? f.name, f.name])
1507
1503
  ),
@@ -1519,11 +1515,11 @@ function ki(e, t, i = !1) {
1519
1515
  }
1520
1516
  return s;
1521
1517
  }
1522
- const Or = (e) => (
1518
+ const Ur = (e) => (
1523
1519
  // Since 5.0
1524
1520
  e.compiler?.name === "@arcgis/api-extractor" || // Before 5.0
1525
- e.compiler?.name === Ei.name
1526
- ), Mr = (e, t) => Object.fromEntries(
1521
+ e.compiler?.name === ki.name
1522
+ ), zr = (e, t) => Object.fromEntries(
1527
1523
  (e.contributions?.html?.elements ?? e.contributions?.html?.tags)?.map(
1528
1524
  (i) => [
1529
1525
  i.name,
@@ -1534,7 +1530,7 @@ const Or = (e) => (
1534
1530
  }
1535
1531
  ]
1536
1532
  ) ?? []
1537
- ), Jr = 1, Br = 2, _r = 4, Kr = 8, Wr = Jr | Br | _r | Kr, Ur = (e, t) => Object.fromEntries(
1533
+ ), Hr = 1, qr = 2, Vr = 4, Gr = 8, Xr = Hr | qr | Vr | Gr, Yr = (e, t) => Object.fromEntries(
1538
1534
  e.flatMap(
1539
1535
  ([i, s]) => s.map(
1540
1536
  ([n, r, a]) => [
@@ -1543,14 +1539,14 @@ const Or = (e) => (
1543
1539
  packageName: t.packageName,
1544
1540
  modulePath: t.getImportPath(r),
1545
1541
  propToAttribute: Object.fromEntries(
1546
- Object.entries(a ?? {}).filter(([l, [d]]) => d & Wr).map(([l, [d, c = l]]) => [l, c])
1542
+ Object.entries(a ?? {}).filter(([c, [d]]) => d & Xr).map(([c, [d, l = c]]) => [c, l])
1547
1543
  )
1548
1544
  }
1549
1545
  ]
1550
1546
  )
1551
1547
  )
1552
- ), zr = async (e, t) => Object.fromEntries(
1553
- (await ot(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) => {
1554
1550
  const s = i.slice(0, -5);
1555
1551
  return [
1556
1552
  s,
@@ -1561,29 +1557,36 @@ const Or = (e) => (
1561
1557
  }
1562
1558
  ];
1563
1559
  })
1564
- ), Hr = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, qr = (e) => e.startsWith("/") ? e : `/${e}`, dt = (e, t) => `${e}@fs${qr(t)}`;
1565
- function Vr(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) {
1566
1562
  const i = u.resolve(e), s = u.resolve(i, t.split(/[?#]/u)[0].replace(/^[/\\]+/u, "")), n = u.relative(i, s);
1567
1563
  return n === ".." || n.startsWith(`..${u.sep}`) || u.isAbsolute(n) ? void 0 : s;
1568
1564
  }
1569
- function Ii(e) {
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" ? "5.2.0" : e.version;
1568
+ }
1569
+ function ji({ command: e }) {
1570
+ return e === "serve" && process.argv.includes("--local-core");
1571
+ }
1572
+ function Fi(e) {
1570
1573
  const t = e?.apiExtractorPluginConfig.unsafeConfigOverride?.types?.typeScriptConfig?.config.options.target ?? o.ScriptTarget.ESNext, i = o.ScriptTarget[t].toLowerCase();
1571
1574
  return i === "latest" ? "esnext" : i;
1572
1575
  }
1573
1576
  const tt = "@arcgis/lumina:provideAssets";
1574
- function te(e, t, i = pt, s = "max-age=31536000, immutable") {
1577
+ function ie(e, t, i = ft, s = "max-age=31536000, immutable") {
1575
1578
  if (e.viteCommand !== "serve")
1576
1579
  throw Error(b(tt, "serveAssets() is only available when Vite is running in serve mode"));
1577
1580
  const n = e._serverConfigured, r = e.server.middlewares.stack.length;
1578
1581
  if (t.forEach((a) => {
1579
- const l = Ai(a), d = Ni(e.dir, Li(l)), c = Xr(e.viteConfig.base, d, e.dir.distCdn);
1580
- e.server.middlewares.use(c, (p, m, f) => {
1581
- const g = Yr(p.url), h = l.type === "directory" ? Vr(l.source, g) : l.source, y = u.join(d, g), v = i.find((w) => w.match(y, e));
1582
+ const c = Ri(a), d = Mi(e.dir, Oi(c)), l = nn(e.viteConfig.base, d, e.dir.distCdn);
1583
+ e.server.middlewares.use(l, (p, m, f) => {
1584
+ const g = on(p.url), h = c.type === "directory" ? tn(c.source, g) : c.source, y = u.join(d, g), v = i.find((w) => w.match(y, e));
1582
1585
  return h === void 0 ? (m.statusCode = 403, m.end(), !0) : ((typeof h == "function" ? Promise.resolve(h()) : z(h)).then((w) => {
1583
1586
  const C = (typeof h == "function" ? void 0 : v?.transform(w.toString("utf8"), y, e)) ?? w;
1584
- m.setHeader("Cache-Control", s), m.setHeader("Content-Type", Ms.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();
1585
1588
  }).catch((w) => {
1586
- (l.type !== "directory" || process.env.DEBUG) && T.warn(
1589
+ (c.type !== "directory" || process.env.DEBUG) && T.warn(
1587
1590
  tt,
1588
1591
  `Error occurred when trying to serve a file in response to request for "${p.originalUrl ?? g}":${String(w)}`
1589
1592
  ), f();
@@ -1594,31 +1597,31 @@ function te(e, t, i = pt, s = "max-age=31536000, immutable") {
1594
1597
  e.server.middlewares.stack.splice(0, 0, ...a);
1595
1598
  }
1596
1599
  }
1597
- async function xi(e, t, i = pt) {
1600
+ async function Di(e, t, i = ft) {
1598
1601
  await Promise.all(
1599
1602
  t.map(async (s) => {
1600
- const n = Ai(s), r = Ni(e.dir, Li(n));
1603
+ const n = Ri(s), r = Mi(e.dir, Oi(n));
1601
1604
  if (n.type === "directory") {
1602
- const a = u.resolve(n.source), d = (await ot(a, { recursive: !0, withFileTypes: !0 })).filter((c) => c.isFile()).map((c) => {
1603
- const p = u.resolve(c.parentPath, c.name), m = u.relative(a, p), f = u.join(r, m);
1605
+ const a = u.resolve(n.source), d = (await ct(a, { recursive: !0, withFileTypes: !0 })).filter((l) => l.isFile()).map((l) => {
1606
+ const p = u.resolve(l.parentPath, l.name), m = u.relative(a, p), f = u.join(r, m);
1604
1607
  return [p, f];
1605
1608
  });
1606
- await Fi(d.map(([c, p]) => p)), await Js(
1609
+ await Bi(d.map(([l, p]) => p)), await Us(
1607
1610
  d,
1608
1611
  16,
1609
- async ([c, p]) => await Pt(c, p, i, e)
1612
+ async ([l, p]) => await xt(l, p, i, e)
1610
1613
  );
1611
1614
  } else if (n.type === "file")
1612
- await X(u.dirname(r), { recursive: !0 }), await Pt(n.source, r, i, e);
1615
+ await X(u.dirname(r), { recursive: !0 }), await xt(n.source, r, i, e);
1613
1616
  else if (n.type === "dynamic") {
1614
1617
  await X(u.dirname(r), { recursive: !0 });
1615
1618
  const a = await Promise.resolve(n.source());
1616
- await K(r, a);
1619
+ await _(r, a);
1617
1620
  }
1618
1621
  })
1619
1622
  );
1620
1623
  }
1621
- const Ai = ti ? (e) => e : (e) => e.type === "dynamic" ? {
1624
+ const Ri = oi ? (e) => e : (e) => e.type === "dynamic" ? {
1622
1625
  ...e,
1623
1626
  destination: G(e.destination)
1624
1627
  } : {
@@ -1626,16 +1629,16 @@ const Ai = ti ? (e) => e : (e) => e.type === "dynamic" ? {
1626
1629
  source: G(e.source),
1627
1630
  destination: G(e.destination)
1628
1631
  };
1629
- async function Pt(e, t, i, s) {
1632
+ async function xt(e, t, i, s) {
1630
1633
  const n = i.find((r) => r.match(t, s));
1631
1634
  if (n === void 0)
1632
- await Fs(e, t);
1635
+ await Js(e, t);
1633
1636
  else {
1634
1637
  const r = await z(e, "utf8"), a = n.transform(r, t, s);
1635
- await K(t, a);
1638
+ await _(t, a);
1636
1639
  }
1637
1640
  }
1638
- function Li(e) {
1641
+ function Oi(e) {
1639
1642
  if (e.type === "dynamic")
1640
1643
  return e.destination;
1641
1644
  if (e.source.endsWith(u.sep)) {
@@ -1643,47 +1646,47 @@ function Li(e) {
1643
1646
  throw Error(
1644
1647
  b(
1645
1648
  tt,
1646
- `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 \\`
1647
1650
  )
1648
1651
  );
1649
1652
  return e.destination;
1650
1653
  }
1651
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;
1652
1655
  }
1653
- function Ni({ dist: e, distCdnAssets: t }, i) {
1654
- const s = Gr(i), n = u.join(
1656
+ function Mi({ dist: e, distCdnAssets: t }, i) {
1657
+ const s = rn(i), n = u.join(
1655
1658
  t,
1656
1659
  s ? u.relative(t, i) : i
1657
- ), r = u.relative(e, n), a = ji(r);
1660
+ ), r = u.relative(e, n), a = Ji(r);
1658
1661
  return u.join(e, a);
1659
1662
  }
1660
- function Gr(e) {
1663
+ function rn(e) {
1661
1664
  if (e.startsWith(u.sep)) {
1662
- const t = ii(), i = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
1665
+ const t = ai(), i = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
1663
1666
  return e.startsWith(`/${i}/`) || e.startsWith("/Users/");
1664
1667
  } else
1665
- return !!(!ti && u.isAbsolute(e));
1668
+ return !!(!oi && u.isAbsolute(e));
1666
1669
  }
1667
- function Xr(e, t, i) {
1668
- const s = ji(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;
1669
1672
  return `${e}${n}`;
1670
1673
  }
1671
- const ji = (e) => e.replaceAll("../", ""), Yr = (e = "") => e.split("?")[0].split("#")[0];
1672
- async function Fi(e) {
1674
+ const Ji = (e) => e.replaceAll("../", ""), on = (e = "") => e.split("?")[0].split("#")[0];
1675
+ async function Bi(e) {
1673
1676
  const t = new Set(e.map(u.dirname));
1674
1677
  await Promise.all(Array.from(t, async (i) => await X(i, { recursive: !0 })));
1675
1678
  }
1676
- const Qr = {
1679
+ const an = {
1677
1680
  match: (e, t) => t.environment === "production" && e.endsWith(".json"),
1678
1681
  transform: (e) => JSON.stringify(JSON.parse(e))
1679
- }, pt = [Qr], Ae = "@arcgis/core", me = "@arcgis/core/assets", Ke = j(), H = Ae in (Ke.dependencies ?? {}) || Ae in (Ke.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
1680
- Ke.name === "@arcgis/lumina";
1681
- async function Zr(e, t, i, s) {
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
+ _e.name === "@arcgis/lumina";
1684
+ async function cn(e, t, i, s) {
1682
1685
  if (!H)
1683
1686
  return [];
1684
1687
  const n = e._localCdnCore, r = n?.packageLocation ?? await $e(Ae);
1685
1688
  if (i === "cdn") {
1686
- const a = await ri(r), l = De({ name: "", version: a.version }, s);
1689
+ const a = await ci(r), c = Re(a, s);
1687
1690
  return [
1688
1691
  // Use the ESM CDN
1689
1692
  // <script src="https://jsdev.arcgis.com/VERSION/"><\/script>
@@ -1694,23 +1697,23 @@ async function Zr(e, t, i, s) {
1694
1697
  },
1695
1698
  children: JSON.stringify({
1696
1699
  imports: {
1697
- "@arcgis/core/": `${l}@arcgis/core/`
1700
+ "@arcgis/core/": `${c}@arcgis/core/`
1698
1701
  }
1699
1702
  })
1700
1703
  },
1701
1704
  // <link rel="stylesheet" id="arcgisCoreStylesheet" href="https://jsdev.arcgis.com/VERSION/esri/themes/light/main.css" />
1702
- Ri(l)
1705
+ Ki(c)
1703
1706
  ];
1704
1707
  } else
1705
- return en(t, r, n?.sourceLocation !== void 0);
1708
+ return ln(t, r, n?.sourceLocation !== void 0);
1706
1709
  }
1707
- function en(e, t, i) {
1710
+ function ln(e, t, i) {
1708
1711
  const s = `${e}${me}`;
1709
1712
  return [
1710
1713
  // Browser tests import this as a Vite CSS module and adopt its stylesheet, so CSS must remain on the /@fs route.
1711
1714
  // Core's prebuilt JavaScript assets use the untransformed route configured below.
1712
- Ri(
1713
- i ? `${e}${me}/` : dt(e, `${t}/assets/`)
1715
+ Ki(
1716
+ i ? `${e}${me}/` : ut(e, `${t}/assets/`)
1714
1717
  ),
1715
1718
  {
1716
1719
  // This import is injected dynamically, so external consumers must tell Vite to optimize it. Within the monorepo,
@@ -1723,7 +1726,7 @@ function en(e, t, i) {
1723
1726
  }
1724
1727
  ];
1725
1728
  }
1726
- async function tn(e) {
1729
+ async function dn(e) {
1727
1730
  const t = e._localCdnCore, i = t?.packageLocation ?? await $e(Ae), s = t?.sourceLocation !== void 0 ? [
1728
1731
  {
1729
1732
  type: "directory",
@@ -1764,40 +1767,42 @@ async function tn(e) {
1764
1767
  }
1765
1768
  ];
1766
1769
  e.server.middlewares.use("/builddate.txt", (n, r) => {
1767
- r.setHeader("Cache-Control", "no-cache"), r.setHeader("Content-Type", "text/plain"), r.end(JSON.stringify({ version: j(i).version }));
1768
- }), te(e, s, [], "no-cache");
1770
+ r.setHeader("Cache-Control", "no-cache"), r.setHeader("Content-Type", "text/plain");
1771
+ const a = t?.sourceLocation ? "5.2.0" : j(i).version;
1772
+ r.end(JSON.stringify({ version: a }));
1773
+ }), ie(e, s, [], "no-cache");
1769
1774
  }
1770
- const Ri = (e) => ({
1775
+ const Ki = (e) => ({
1771
1776
  // Not using join() because it would turn https:// into https:/
1772
1777
  cssHref: `${e}esri/themes/light/main.css`,
1773
1778
  // This is used be the theme switcher in `@arcgis/storybook-utils`
1774
1779
  id: "arcgisCoreStylesheet"
1775
- }), ut = "customElement.js";
1776
- function sn(e, t) {
1780
+ }), gt = "customElement.js";
1781
+ function pn(e, t) {
1777
1782
  if (!t.startsWith(e))
1778
1783
  return t;
1779
1784
  const s = t.split(u.sep);
1780
- return s.at(rn) !== s.at(nn) ? t : u.join(s.slice(0, -1).join(u.sep), ut);
1785
+ return s.at(un) !== s.at(mn) ? t : u.join(s.slice(0, -1).join(u.sep), gt);
1781
1786
  }
1782
- const rn = -1, nn = -2, on = /["']\.\.?\/[^'"]+/gu, an = (e, t, i, s) => e.replaceAll(on, (n) => {
1787
+ const un = -1, mn = -2, fn = /["']\.\.?\/[^'"]+/gu, gn = (e, t, i, s) => e.replaceAll(fn, (n) => {
1783
1788
  const r = n.slice(1);
1784
1789
  if (!r.startsWith("./") && !r.startsWith("../"))
1785
1790
  return n;
1786
- const a = u.join(s, r), l = !r.endsWith(".js") && !r.split("/").at(-1).includes(".") ? sn(t.dir.distComponents, a) : a, d = l.startsWith(t.dir.distComponents) ? t.dir.dist + Ge(l.slice(t.dir.dist.length), t.apiExtractor) : l;
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;
1787
1792
  if (i === s && a === d)
1788
1793
  return n;
1789
- const c = he(i, d), p = n.endsWith("/") ? `${c}/` : c;
1794
+ const l = he(i, d), p = n.endsWith("/") ? `${l}/` : l;
1790
1795
  return `${n[0]}${p}`;
1791
1796
  }), he = (e, t) => {
1792
1797
  const i = u.relative(e, t);
1793
1798
  return i.startsWith(".") ? i : `.${u.sep}${i}`;
1794
1799
  };
1795
- async function cn(e, t, i) {
1800
+ async function hn(e, t, i) {
1796
1801
  const s = u.resolve(e.dir.root, t);
1797
- e.viteConfig.build.emptyOutDir !== !1 && await _(s) && await Rs(s, { recursive: !0, force: !0 }), await X(s, { recursive: !0 }), await Ds(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 });
1798
1803
  const n = [
1799
1804
  "index.html",
1800
- ...await Bs("**/*.html", {
1805
+ ...await zs("**/*.html", {
1801
1806
  cwd: e.dir.src,
1802
1807
  onlyFiles: !0,
1803
1808
  // The files we are looking for are unlikely to be symbolic links
@@ -1805,22 +1810,22 @@ async function cn(e, t, i) {
1805
1810
  // Not applicable for our glob pattern
1806
1811
  expandDirectories: !1
1807
1812
  })
1808
- ], r = u.relative(e.dir.root, e.dir.src), a = await ne(e), l = u.join(e.dir.src, "loader.ts"), d = a.map((c) => {
1809
- if ("cssHref" in c)
1810
- return `<link rel="stylesheet" href="${c.cssHref}">`;
1811
- if ("javascriptCode" in c && c.javascriptCode.at(0)?.includes(l) === !0)
1813
+ ], r = u.relative(e.dir.root, e.dir.src), a = await oe(e), c = u.join(e.dir.src, "loader.ts"), d = a.map((l) => {
1814
+ if ("cssHref" in l)
1815
+ return `<link rel="stylesheet" href="${l.cssHref}">`;
1816
+ if ("javascriptCode" in l && l.javascriptCode.at(0)?.includes(c) === !0)
1812
1817
  return "";
1813
- if ("tag" in c) {
1814
- const p = c.children ?? "";
1818
+ if ("tag" in l) {
1819
+ const p = l.children ?? "";
1815
1820
  if (typeof p == "string")
1816
- return `<${c.tag} ${Object.entries(c.attrs ?? {}).map(([m, f]) => `${m}="${f}"`).join(" ")}>${p}</${c.tag}>`;
1821
+ return `<${l.tag} ${Object.entries(l.attrs ?? {}).map(([m, f]) => `${m}="${f}"`).join(" ")}>${p}</${l.tag}>`;
1817
1822
  }
1818
- throw Error(b("@arcgis/lumina:buildWebApp", `Unsupported loader type: ${JSON.stringify(c)}`));
1823
+ throw Error(b("@arcgis/lumina:buildWebApp", `Unsupported loader type: ${JSON.stringify(l)}`));
1819
1824
  }).join(`
1820
1825
  `);
1821
1826
  await Promise.all(
1822
- n.map(async (c, p) => {
1823
- const f = p === 0 ? c : u.join(r, c), g = u.join(e.dir.root, f), h = u.join(s, f);
1827
+ n.map(async (l, p) => {
1828
+ const f = p === 0 ? l : u.join(r, l), g = u.join(e.dir.root, f), h = u.join(s, f);
1824
1829
  await X(u.dirname(h), { recursive: !0 });
1825
1830
  const y = await z(g, "utf-8"), v = he(u.dirname(f), `build/${i}`), w = `${d}<script type="module" src="${v}"><\/script>
1826
1831
  `, C = Math.min(
@@ -1831,11 +1836,25 @@ async function cn(e, t, i) {
1831
1836
  if (C === Number.POSITIVE_INFINITY)
1832
1837
  throw Error(b("@arcgis/lumina:buildWebApp", `Failed to find <head> or <style> tag in ${g}`));
1833
1838
  const E = y.slice(0, C) + w + y.slice(C), P = e.options?.build?.webApp?.transformFile?.(E, h, e) ?? E;
1834
- await K(h, P, "utf-8");
1839
+ await _(h, P, "utf-8");
1835
1840
  })
1836
1841
  ), await e.options.build?.webApp?.afterBuildEnd?.(e);
1837
1842
  }
1838
- const Di = /* @__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([
1839
1858
  "chunks",
1840
1859
  "components",
1841
1860
  "docs",
@@ -1848,13 +1867,13 @@ const Di = /* @__PURE__ */ new Set([
1848
1867
  "collection",
1849
1868
  "extras",
1850
1869
  "support"
1851
- ]), O = "@arcgis/lumina:buildCdn", ce = "cdn", Oi = "index", Z = "main";
1852
- function ln(e) {
1870
+ ]), O = "@arcgis/lumina:buildCdn", le = "cdn", Wi = "index", Z = "main";
1871
+ function bn(e) {
1853
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;
1854
1873
  if (a) {
1855
1874
  if (i.toLowerCase() !== i)
1856
1875
  throw new Error(`Expected CDN namespace to be all lowercase. Received: ${i}`);
1857
- if (Di.has(i))
1876
+ if (_i.has(i))
1858
1877
  throw new Error(
1859
1878
  `Namespace name "${i}" is restricted as it collides with a well-known Lumina dist/ folder name or Stencil dist/ folder name.`
1860
1879
  );
@@ -1862,12 +1881,12 @@ function ln(e) {
1862
1881
  'The "namespace" option in the "build.cdn" is deprecated and will be removed in the next major version.'
1863
1882
  );
1864
1883
  }
1865
- const l = i ?? Oi;
1884
+ const c = i ?? Wi;
1866
1885
  if (e.provideAssets([
1867
1886
  {
1868
1887
  type: "dynamic",
1869
- source: () => Pr(e),
1870
- destination: `../${a ? l : Z}.css`
1888
+ source: () => Nr(e),
1889
+ destination: `../${a ? c : Z}.css`
1871
1890
  }
1872
1891
  ]), !t)
1873
1892
  return {
@@ -1882,27 +1901,27 @@ function ln(e) {
1882
1901
  );
1883
1902
  return;
1884
1903
  }
1885
- const d = H && j().name !== "@arcgis/embeddable-components", c = Date.now(), p = Array.isArray(s.entryPoints) ? s.entryPoints.map((g) => typeof g == "string" ? { in: g, out: "" } : g) : typeof s.entryPoints == "object" ? Object.entries(s.entryPoints).map(([g, h]) => ({ in: h, out: g })) : [], m = await dn(
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(
1886
1905
  e,
1887
- l,
1906
+ c,
1888
1907
  s,
1889
1908
  p,
1890
1909
  n,
1891
1910
  d
1892
1911
  );
1893
- await pn(
1912
+ await Sn(
1894
1913
  m,
1895
1914
  e,
1896
- a ? `${l}.esm` : l,
1915
+ a ? `${c}.esm` : c,
1897
1916
  p,
1898
1917
  d
1899
1918
  );
1900
1919
  const f = Date.now();
1901
- T.info(O, `CDN was built in ${f - c}ms`), r && await cn(e, r, `${a ? `${l}.esm` : l}.js`);
1920
+ T.info(O, `CDN was built in ${f - l}ms`), r && await hn(e, r, `${a ? `${c}.esm` : c}.js`);
1902
1921
  }
1903
1922
  };
1904
1923
  }
1905
- async function dn(e, t, i, s, n, r) {
1924
+ async function wn(e, t, i, s, n, r) {
1906
1925
  const a = e.environment;
1907
1926
  if (i.minify && r)
1908
1927
  throw Error(
@@ -1918,15 +1937,15 @@ async function dn(e, t, i, s, n, r) {
1918
1937
  "Source maps in the CDN build are not yet supported - open a feature request with Lumina maintainers if it is needed"
1919
1938
  )
1920
1939
  );
1921
- const l = `import { defineCustomElements } from "./loader";
1940
+ const c = `import { defineCustomElements } from "./loader";
1922
1941
  /**
1923
1942
  * We use import.meta.url to get the path to the current file
1924
1943
  * and pass it to defineCustomElements to set the resources url.
1925
1944
  * The script's file name will be stripped inside defineCustomElements.
1926
1945
  **/
1927
1946
  defineCustomElements({resourcesUrl: import.meta.url});
1928
- ${Si(e._globalCssString, e)}`, d = n?.(l, e) ?? l;
1929
- return await Os({
1947
+ ${$i(e._globalCssString, e)}`, d = n?.(c, e) ?? c;
1948
+ return await _s({
1930
1949
  bundle: !0,
1931
1950
  minify: r ? !0 : a === "production",
1932
1951
  treeShaking: !0,
@@ -1951,20 +1970,20 @@ ${Si(e._globalCssString, e)}`, d = n?.(l, e) ?? l;
1951
1970
  chunkNames: "[hash]",
1952
1971
  resolveExtensions: [".js", ".json"],
1953
1972
  banner: { js: e.banner },
1954
- target: Ii(e),
1973
+ target: Fi(e),
1955
1974
  ...i,
1956
1975
  write: !1,
1957
1976
  plugins: [
1958
1977
  {
1959
1978
  name: "@arcgis/lumina:accessorSupport",
1960
- setup(c) {
1961
- c.onResolve(
1979
+ setup(l) {
1980
+ l.onResolve(
1962
1981
  { filter: /^@arcgis\/core\/applications\/Components\/reactiveUtils.js$/ },
1963
1982
  (p) => p.importer.endsWith("runtime.js") ? {
1964
1983
  path: p.path,
1965
1984
  namespace: "@arcgis/lumina:accessorSupport"
1966
1985
  } : void 0
1967
- ), c.onLoad({ filter: /^/, namespace: "@arcgis/lumina:accessorSupport" }, () => ({
1986
+ ), l.onLoad({ filter: /^/, namespace: "@arcgis/lumina:accessorSupport" }, () => ({
1968
1987
  contents: "export const createObservable=undefined, trackAccess=undefined, createTrackingTarget=undefined, runTracked = undefined;",
1969
1988
  loader: "js"
1970
1989
  }));
@@ -1975,18 +1994,18 @@ ${Si(e._globalCssString, e)}`, d = n?.(l, e) ?? l;
1975
1994
  // manual injection further below. Thus drop the CSS import from the
1976
1995
  // chunks/runtime.js file.
1977
1996
  name: "@arcgis/lumina:customGlobalCssInjection",
1978
- setup(c) {
1997
+ setup(l) {
1979
1998
  const p = e.options.build?.cdn?.namespace === void 0 ? (
1980
1999
  // eslint-disable-next-line require-unicode-regexp
1981
- new RegExp(`\\/${ce}\\/${Z}\\.css$`)
2000
+ new RegExp(`\\/${le}\\/${Z}\\.css$`)
1982
2001
  ) : (
1983
2002
  // eslint-disable-next-line require-unicode-regexp
1984
2003
  new RegExp(`\\/${e.options.build.cdn.namespace}\\/${e.options.build.cdn.namespace}\\.css$`)
1985
2004
  );
1986
- c.onResolve({ filter: p }, ({ path: m }) => ({
2005
+ l.onResolve({ filter: p }, ({ path: m }) => ({
1987
2006
  path: m,
1988
2007
  namespace: "build-cdn:global-css"
1989
- })), c.onLoad({ filter: /.*/, namespace: "build-cdn:global-css" }, () => ({
2008
+ })), l.onLoad({ filter: /.*/, namespace: "build-cdn:global-css" }, () => ({
1990
2009
  contents: "",
1991
2010
  loader: "js"
1992
2011
  }));
@@ -2010,11 +2029,11 @@ ${Si(e._globalCssString, e)}`, d = n?.(l, e) ?? l;
2010
2029
  }
2011
2030
  });
2012
2031
  }
2013
- const kt = "stdin.js";
2014
- async function pn(e, t, i, s, n) {
2032
+ const Lt = "stdin.js";
2033
+ async function Sn(e, t, i, s, n) {
2015
2034
  const r = t.dir.distCdn, a = `${i}.js`;
2016
- let l;
2017
- n && (l = new Set(s.map((p) => `${p.out}.js`)), l.add(a));
2035
+ let c;
2036
+ n && (c = new Set(s.map((p) => `${p.out}.js`)), c.add(a));
2018
2037
  const d = new Map(
2019
2038
  e.outputFiles.map((p) => {
2020
2039
  const m = {
@@ -2023,15 +2042,15 @@ async function pn(e, t, i, s, n) {
2023
2042
  isAsync: void 0,
2024
2043
  oldSingleExportName: void 0
2025
2044
  }, f = G(p.path.slice(r.length));
2026
- if (f === kt) {
2045
+ if (f === Lt) {
2027
2046
  if (n) {
2028
- const h = p.text.match(un)?.[0];
2047
+ const h = p.text.match(Cn)?.[0];
2029
2048
  if (h === void 0)
2030
2049
  throw Error(
2031
- `Failed to find the runtime variable name in the CDN entrypoint file. This likely indicates a bug in Lumina. ${kt} contents:
2050
+ `Failed to find the runtime variable name in the CDN entrypoint file. This likely indicates a bug in Lumina. ${Lt} contents:
2032
2051
  ${p.text}`
2033
2052
  );
2034
- m.code = `${m.code.trimEnd()}${mn(h, s)}`, m.isAsync = !1;
2053
+ m.code = `${m.code.trimEnd()}${En(h, s)}`, m.isAsync = !1;
2035
2054
  }
2036
2055
  return [a, m];
2037
2056
  }
@@ -2041,7 +2060,7 @@ ${p.text}`
2041
2060
  n && d.forEach((p, m) => {
2042
2061
  if (p.isAsync === void 0)
2043
2062
  if (m.endsWith(".js")) {
2044
- if (Mi(p, d), l?.has(m) === !0 && p.code.includes(Ji))
2063
+ if (Ui(p, d), c?.has(m) === !0 && p.code.includes(zi))
2045
2064
  throw Error(
2046
2065
  b(
2047
2066
  O,
@@ -2051,18 +2070,18 @@ ${p.text}`
2051
2070
  } else
2052
2071
  p.isAsync = !1;
2053
2072
  }), t.options.build?.cdn?.transformer?.(d, t);
2054
- const c = /* @__PURE__ */ new Map();
2073
+ const l = /* @__PURE__ */ new Map();
2055
2074
  for (const p of d.keys()) {
2056
2075
  const m = p.lastIndexOf("/");
2057
2076
  if (m !== -1) {
2058
2077
  const f = p.slice(0, m);
2059
- c.set(f, X(r + f, { recursive: !0 }));
2078
+ l.set(f, X(r + f, { recursive: !0 }));
2060
2079
  }
2061
2080
  }
2062
- await Promise.all(c.values()), await Promise.all(Array.from(d.entries(), async ([p, { code: m }]) => await K(r + p, m)));
2081
+ await Promise.all(l.values()), await Promise.all(Array.from(d.entries(), async ([p, { code: m }]) => await _(r + p, m)));
2063
2082
  }
2064
- const un = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
2065
- function mn(e, t) {
2083
+ const Cn = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
2084
+ function En(e, t) {
2066
2085
  let i = [
2067
2086
  "window.$arcgis",
2068
2087
  "||",
@@ -2086,6 +2105,9 @@ function mn(e, t) {
2086
2105
  if (i += [
2087
2106
  "a.t=(c,...x)=>",
2088
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.
2089
2111
  'x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))',
2090
2112
  ").then(c);",
2091
2113
  // Start loading from reactiveUtils the modules we need to enable integration.
@@ -2103,33 +2125,33 @@ function mn(e, t) {
2103
2125
  }
2104
2126
  return i += ")", i;
2105
2127
  }
2106
- function Mi(e, t) {
2128
+ function Ui(e, t) {
2107
2129
  if (e.isProcessing) {
2108
- e.isAsync = !0, It(e);
2130
+ e.isAsync = !0, Nt(e);
2109
2131
  return;
2110
2132
  }
2111
2133
  e.isProcessing = !0;
2112
2134
  const i = [], s = [], n = [], r = /* @__PURE__ */ new Set(), a = [];
2113
- let l = 0;
2114
- const d = e.code.matchAll(fn);
2135
+ let c = 0;
2136
+ const d = e.code.matchAll(Tn);
2115
2137
  for (const S of d) {
2116
2138
  const [A, L, U, F, N] = S, B = N.startsWith(Le);
2117
- if (l !== 0 && l !== S.index) {
2118
- const D = e.code.slice(l, S.index);
2119
- n.push(D), a.push([l, D.length, 0, ""]);
2139
+ if (c !== 0 && c !== S.index) {
2140
+ const R = e.code.slice(c, S.index);
2141
+ n.push(R), a.push([c, R.length, 0, ""]);
2120
2142
  }
2121
- if (l = S.index + A.length, B)
2122
- a.push([S.index, A.length, 0, ""]), s.push(`"${_i(N.slice(Le.length))}"`), i.push(L?.replaceAll(" as ", ":") ?? U ?? F ?? "");
2143
+ if (c = S.index + A.length, B)
2144
+ a.push([S.index, A.length, 0, ""]), s.push(`"${qi(N.slice(Le.length))}"`), i.push(L?.replaceAll(" as ", ":") ?? U ?? F ?? "");
2123
2145
  else {
2124
- const D = Bi(N, t), M = D?.isAsync === !0;
2146
+ const R = Hi(N, t), M = R?.isAsync === !0;
2125
2147
  if (L !== void 0) {
2126
2148
  const be = [];
2127
2149
  for (const Me of L.slice(1, -1).split(",")) {
2128
- const [vt, bt = vt] = Me.split(" as ");
2129
- M || r.add(bt), be.push(`${vt}:${bt}`);
2150
+ const [St, Ct = St] = Me.split(" as ");
2151
+ M || r.add(Ct), be.push(`${St}:${Ct}`);
2130
2152
  }
2131
2153
  if (M) {
2132
- 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];
2133
2155
  a.push([S.index + 6, 0, L.length, Me]);
2134
2156
  }
2135
2157
  } else if (U === void 0 && F === void 0)
@@ -2140,7 +2162,7 @@ function Mi(e, t) {
2140
2162
  b(
2141
2163
  O,
2142
2164
  `Expected local import specifiers to use only named or side-effect import syntax. Found ${A} in a chunk:
2143
- ${D.code}`
2165
+ ${R.code}`
2144
2166
  )
2145
2167
  );
2146
2168
  r.add(F ?? U);
@@ -2148,13 +2170,13 @@ ${D.code}`
2148
2170
  }
2149
2171
  }
2150
2172
  e.isProcessing = !1;
2151
- const c = e.isAsync === !0;
2152
- if (e.isAsync = c || a.length > 0, !e.isAsync) {
2153
- e.code = xt(e.code, t);
2173
+ const l = e.isAsync === !0;
2174
+ if (e.isAsync = l || a.length > 0, !e.isAsync) {
2175
+ e.code = jt(e.code, t);
2154
2176
  return;
2155
2177
  }
2156
- const p = yn(r);
2157
- let m = e.code.slice(0, l);
2178
+ const p = kn(r);
2179
+ let m = e.code.slice(0, c);
2158
2180
  for (let S = a.length - 1; S >= 0; S--) {
2159
2181
  const [A, L, U, F] = a[S];
2160
2182
  let N = L, B = "";
@@ -2164,22 +2186,22 @@ ${D.code}`
2164
2186
  }
2165
2187
  m = m.slice(0, A) + B + m.slice(A + N);
2166
2188
  }
2167
- const [f, g] = It(e), h = i.findLastIndex((S) => S.length > 0), y = i.slice(0, h + 1).join(","), v = i.length === 0 ? "_" : `([${y}])`, w = `${Ji}${v}=>{`, C = s.join(","), E = `${g}},${C})`;
2168
- let P = e.code.slice(l, f);
2169
- P = `${n.join("")}${P}`, P = xt(P, t);
2189
+ const [f, g] = Nt(e), h = i.findLastIndex((S) => S.length > 0), y = i.slice(0, h + 1).join(","), v = i.length === 0 ? "_" : `([${y}])`, w = `${zi}${v}=>{`, C = s.join(","), E = `${g}},${C})`;
2190
+ let P = e.code.slice(c, f);
2191
+ P = `${n.join("")}${P}`, P = jt(P, t);
2170
2192
  const x = `${m}${w}${P}${E}`;
2171
2193
  e.code = x;
2172
2194
  }
2173
- const Ji = "export default $arcgis.t(";
2174
- function It(e) {
2175
- const t = gn.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;
2176
2198
  let s = "";
2177
2199
  if (t !== null) {
2178
2200
  const n = t[1].split(",");
2179
2201
  if (n.length > 1)
2180
2202
  s = `return{${n.map((r) => {
2181
- const [a, l = a] = r.split(" as ");
2182
- return `${l}:${a}`;
2203
+ const [a, c = a] = r.split(" as ");
2204
+ return `${c}:${a}`;
2183
2205
  }).join(",")}}`;
2184
2206
  else {
2185
2207
  const [r, a = r] = n[0].split(" as ");
@@ -2188,51 +2210,52 @@ function It(e) {
2188
2210
  }
2189
2211
  return [i, s];
2190
2212
  }
2191
- const fn = /import(?:(\{[^}]+\})from|\*as ([\w$]+) from| ([\w$]+) from)?"([^"]+)";/gu, gn = /export\{([^}]+)\};\n$/u, Le = "@arcgis/core/";
2192
- function Bi(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) {
2193
2215
  if (!e.startsWith("./"))
2194
2216
  return;
2195
2217
  const i = e.slice(2), s = t.get(i);
2196
2218
  if (s === void 0)
2197
2219
  throw Error(b(O, `Failed to find the ${e} module`));
2198
- if (s.isAsync === void 0 && Mi(s, t), s.isAsync === void 0)
2220
+ if (s.isAsync === void 0 && Ui(s, t), s.isAsync === void 0)
2199
2221
  throw Error(b(O, `Failed to infer whether the ${e} module has top-level await`));
2200
2222
  return s;
2201
2223
  }
2202
- function xt(e, t) {
2203
- return e.replaceAll(hn, (i, s) => {
2204
- if (s.startsWith(Le))
2205
- return `$arcgis.t(m=>m[0],"${_i(s.slice(Le.length))}")`;
2206
- if (s.startsWith("./")) {
2207
- const n = Bi(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);
2208
2231
  if (n?.isAsync === !0)
2209
2232
  return `${i}.then(m=>m.default${n.oldSingleExportName === void 0 ? "" : `.then(e=>({${n.oldSingleExportName}:e}))`})`;
2210
2233
  }
2211
2234
  return i;
2212
2235
  });
2213
2236
  }
2214
- const hn = /(?<![.\w\d])import\("([^"]+)"\)/gu, _i = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
2215
- function yn(e) {
2237
+ const Pn = /(?<![.\w\d])import\("([^"]+)"\)/gu, qi = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
2238
+ function kn(e) {
2216
2239
  const t = [it];
2217
2240
  return () => {
2218
2241
  for (; ; ) {
2219
- const i = wn(t);
2220
- if (Sn(t), !e.has(i))
2242
+ const i = An(t);
2243
+ if (Ln(t), !e.has(i))
2221
2244
  return e.add(i), i;
2222
2245
  }
2223
2246
  };
2224
2247
  }
2225
- const it = 0, mt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Ki = `${mt}0123456789`, vn = mt.length, bn = Ki.length;
2226
- function wn(e) {
2227
- let t = mt[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]];
2228
2251
  for (let i = 1; i < e.length; ++i)
2229
- t += Ki[e[i]];
2252
+ t += Vi[e[i]];
2230
2253
  return t;
2231
2254
  }
2232
- function Sn(e) {
2255
+ function Ln(e) {
2233
2256
  let t = e.length - 1;
2234
2257
  for (; t >= 0; ) {
2235
- const i = t === 0 ? vn : bn;
2258
+ const i = t === 0 ? In : xn;
2236
2259
  if (e[t] += 1, e[t] >= i)
2237
2260
  e[t] = it, t--;
2238
2261
  else
@@ -2240,39 +2263,39 @@ function Sn(e) {
2240
2263
  }
2241
2264
  e.push(it);
2242
2265
  }
2243
- function De(e = j(), t = !1) {
2244
- const i = e.version.includes("next"), s = e.name === "@esri/calcite-components";
2245
- if (s && i)
2246
- return `https://cdn.jsdelivr.net/npm/@esri/calcite-components@${e.version}/dist/${ce}/`;
2247
- const n = t || i ? "jsdev.arcgis.com" : "js.arcgis.com", r = Cn(e.name), a = En(e.version);
2248
- if (a === void 0)
2266
+ function Re(e = j(), t = !1) {
2267
+ const i = e.name === "@esri/calcite-components", s = mt(e) ?? e.version, n = s.includes("next");
2268
+ if (i && n)
2269
+ return `https://cdn.jsdelivr.net/npm/@esri/calcite-components@${s}/dist/${le}/`;
2270
+ const r = t || n ? "jsdev.arcgis.com" : "js.arcgis.com", a = Nn(e.name), c = jn(s);
2271
+ if (c === void 0)
2249
2272
  throw Error(
2250
2273
  b(
2251
2274
  "@arcgis/lumina:dependencies",
2252
2275
  `Failed to parse a semver version: ${e.name}. Ensure the version follows D.D.D format. Package version: ${e.version}`
2253
2276
  )
2254
2277
  );
2255
- return r.length === 0 ? `https://${n}/${a}/` : s ? `https://${n}/${r}/${a}/` : `https://${n}/${a}/${r}/`;
2278
+ return a === "core" ? `https://${r}/${c}/` : i ? `https://${r}/${a}/${c}/` : `https://${r}/${c}/${a}/`;
2256
2279
  }
2257
- const Cn = (e) => e.split("/").pop() ?? e;
2258
- function En(e) {
2280
+ const Nn = (e) => e.split("/").pop() ?? e;
2281
+ function jn(e) {
2259
2282
  const t = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)(?<prerelease>-.*)?$/u, i = e.match(t);
2260
2283
  if (i?.groups === void 0)
2261
2284
  return;
2262
- const { major: s, minor: n, patch: r, prerelease: a } = i.groups, l = `${s}.${n}.${r}`;
2263
- return a?.startsWith("-next") ? `${l}-next` : l;
2285
+ const { major: s, minor: n, patch: r, prerelease: a } = i.groups, c = `${s}.${n}.${r}`;
2286
+ return a?.startsWith("-next") ? `${c}-next` : c;
2264
2287
  }
2265
- async function Tn(e, t, i, s, n) {
2266
- const r = t.packageName, { hasCss: a, cdnName: l } = await Wi(t.packageLocation) ?? {};
2288
+ async function Fn(e, t, i, s, n) {
2289
+ const r = t.packageName, { hasCss: a, cdnName: c } = await Gi(t.packageLocation) ?? {};
2267
2290
  if (i === "cdn") {
2268
- const m = t.cdnUrl ?? De(t.packageJson, n);
2291
+ const m = t.cdnUrl ?? Re(t.packageJson, n);
2269
2292
  return [
2270
2293
  ...a ? [
2271
2294
  {
2272
2295
  tag: "link",
2273
2296
  attrs: {
2274
2297
  rel: "stylesheet",
2275
- src: `${m}${l}.css`
2298
+ src: `${m}${c}.css`
2276
2299
  }
2277
2300
  }
2278
2301
  ] : [],
@@ -2280,12 +2303,12 @@ async function Tn(e, t, i, s, n) {
2280
2303
  tag: "script",
2281
2304
  attrs: {
2282
2305
  type: "module",
2283
- src: `${m}${l}.esm.js`
2306
+ src: `${m}${c}.esm.js`
2284
2307
  }
2285
2308
  }
2286
2309
  ];
2287
2310
  }
2288
- const d = `${r}/dist/${l}/${l}.css${Q}`, c = a ? [
2311
+ const d = `${r}/dist/${c}/${c}.css${Q}`, l = a ? [
2289
2312
  `import styles$${s} from "${d}";`,
2290
2313
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${s}.styleSheet];`
2291
2314
  ] : [], p = `${r}/dist/esm/loader.js`;
@@ -2297,48 +2320,48 @@ async function Tn(e, t, i, s, n) {
2297
2320
  */
2298
2321
  optimizableImports: [p],
2299
2322
  javascriptCode: [
2300
- ...c,
2323
+ ...l,
2301
2324
  `import { defineCustomElements as defineCustomElements$${s} } from "${p}";`,
2302
2325
  `defineCustomElements$${s}(globalThis.window, {`,
2303
- ` resourcesUrl: "${dt(e, t.packageLocation)}/dist/${l}/",`,
2326
+ ` resourcesUrl: "${ut(e, t.packageLocation)}/dist/${c}/",`,
2304
2327
  "});"
2305
2328
  ]
2306
2329
  }
2307
2330
  ];
2308
2331
  }
2309
- async function Wi(e) {
2310
- const t = u.join(e, "dist"), i = u.basename(e), n = (await ot(t)).filter(
2311
- (a) => !Di.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(".")
2312
2335
  ), r = n.find(
2313
2336
  (a) => a.startsWith("arcgis-") || // This is the case for template-components and field-apps-custom-elements
2314
2337
  a === i
2315
2338
  );
2316
2339
  return r === void 0 ? await Promise.all(
2317
- n.map(async (a) => await At(t, a))
2318
- ).then((a) => a.find(R)) : await At(t, r);
2319
- }
2320
- async function At(e, t) {
2321
- const i = u.join(e, t, `${t}.css`), s = u.join(e, t, "assets"), n = u.join(e, t, `${t}.esm.js`), [r, a, l] = await Promise.all([
2322
- _(i),
2323
- _(s),
2324
- _(n)
2340
+ n.map(async (a) => await Ft(t, a))
2341
+ ).then((a) => a.find(D)) : await Ft(t, r);
2342
+ }
2343
+ async function Ft(e, t) {
2344
+ const i = u.join(e, t, `${t}.css`), s = u.join(e, t, "assets"), n = u.join(e, t, `${t}.esm.js`), [r, a, c] = await Promise.all([
2345
+ K(i),
2346
+ K(s),
2347
+ K(n)
2325
2348
  ]);
2326
- return r || a || l ? {
2349
+ return r || a || c ? {
2327
2350
  hasCss: r,
2328
2351
  cdnName: t
2329
2352
  } : void 0;
2330
2353
  }
2331
- async function $n(e, t, i, s, n) {
2332
- const a = t.packageJson.exports?.[`./${Z}.css`] === void 0 ? await Wi(t.packageLocation) : void 0, l = a?.cdnName ?? ce, d = a === void 0 ? `${Oi}.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`;
2333
2356
  if (i === "cdn")
2334
2357
  return {
2335
2358
  tag: "script",
2336
2359
  attrs: {
2337
2360
  type: "module",
2338
- src: `${t.cdnUrl ?? De(t.packageJson, n)}${d}`
2361
+ src: `${t.cdnUrl ?? Re(t.packageJson, n)}${d}`
2339
2362
  }
2340
2363
  };
2341
- const c = Pn(t.packageJson), p = `${t.packageName}/${u.normalize(c)}${Q}`, m = [
2364
+ const l = Rn(t.packageJson), p = `${t.packageName}/${u.normalize(l)}${Q}`, m = [
2342
2365
  `import styles$${s} from "${p}";`,
2343
2366
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${s}.styleSheet];`
2344
2367
  ], f = `${t.packageName}/loader`;
@@ -2352,12 +2375,12 @@ async function $n(e, t, i, s, n) {
2352
2375
  ...m,
2353
2376
  `import { defineCustomElements as defineCustomElements$${s} } from "${f}";`,
2354
2377
  `defineCustomElements$${s}({`,
2355
- ` resourcesUrl: "${dt(e, t.packageLocation)}/dist/${l}/",`,
2378
+ ` resourcesUrl: "${ut(e, t.packageLocation)}/dist/${c}/",`,
2356
2379
  "});"
2357
2380
  ]
2358
2381
  };
2359
2382
  }
2360
- function Pn(e) {
2383
+ function Rn(e) {
2361
2384
  const { exports: t } = e;
2362
2385
  if (t === void 0)
2363
2386
  throw new Error(
@@ -2366,25 +2389,25 @@ function Pn(e) {
2366
2389
  const i = Object.entries(t).filter(([n]) => u.extname(n) === ".css"), s = i.find(([, n]) => n === `./${Z}.css`);
2367
2390
  return s ? s[0] : i.length > 0 ? i[0][0] : `./${Z}.css`;
2368
2391
  }
2369
- async function ne(e, t) {
2370
- return t !== void 0 ? await Lt(e, t) : (e._loadersCache ??= Lt(e), await e._loadersCache);
2392
+ async function oe(e, t) {
2393
+ return t !== void 0 ? await Dt(e, t) : (e._loadersCache ??= Dt(e), await e._loadersCache);
2371
2394
  }
2372
- async function Lt(e, t) {
2395
+ async function Dt(e, t) {
2373
2396
  const i = e.viteCommand === "build" ? "cdn" : "lazyNpm", s = e.environment === "development", n = t ?? e.viteConfig.base;
2374
2397
  let r = 0;
2375
2398
  const a = async (m) => (await Promise.all(
2376
2399
  m.map(async (f) => {
2377
2400
  const g = r++;
2378
- return f.type === "stencil" ? await Tn(n, f, i, g, s) : f.type === "@arcgis/lumina" ? await $n(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;
2379
2402
  })
2380
- )).filter(R).flat(), l = await Promise.all([
2403
+ )).filter(D).flat(), c = await Promise.all([
2381
2404
  // This may contain an import map so must be first
2382
- Zr(e, n, i, s),
2383
- re.then(a),
2384
- Ui(e).then(a)
2385
- ]), d = u.join(e.dir.src, "loader.ts"), c = t ?? (i === "cdn" ? `./${e.options.build?.cdn?.namespace ?? ce}/` : void 0);
2405
+ cn(e, n, i, s),
2406
+ ne.then(a),
2407
+ Xi(e).then(a)
2408
+ ]), d = u.join(e.dir.src, "loader.ts"), l = t ?? (i === "cdn" ? `./${e.options.build?.cdn?.namespace ?? le}/` : void 0);
2386
2409
  return [
2387
- ...l.flat(),
2410
+ ...c.flat(),
2388
2411
  {
2389
2412
  optimizableImports: [
2390
2413
  /**
@@ -2395,16 +2418,16 @@ async function Lt(e, t) {
2395
2418
  javascriptCode: [
2396
2419
  `import { defineCustomElements } from "${d}";`,
2397
2420
  "globalThis.devOnly$ownTagNames = new Set();",
2398
- `defineCustomElements(${c === void 0 ? "" : `{resourcesUrl:${JSON.stringify(c)}}`});`
2421
+ `defineCustomElements(${l === void 0 ? "" : `{resourcesUrl:${JSON.stringify(l)}}`});`
2399
2422
  ]
2400
2423
  }
2401
2424
  ];
2402
2425
  }
2403
- async function Ui(e) {
2426
+ async function Xi(e) {
2404
2427
  const t = e.options?.serve?.extraDependencies ?? [];
2405
2428
  return t.length === 0 ? [] : (e._serveOnlyDependencies ??= Promise.all(
2406
2429
  t.map(async (i) => {
2407
- const s = typeof i == "string" ? void 0 : i, n = typeof i == "string" ? i : i.name, r = await Pi(n);
2430
+ const s = typeof i == "string" ? void 0 : i, n = typeof i == "string" ? i : i.name, r = await Ai(n);
2408
2431
  if (r === void 0)
2409
2432
  throw Error(
2410
2433
  b(
@@ -2417,57 +2440,48 @@ async function Ui(e) {
2417
2440
  cdnUrl: s?.getCdnUrl(e)
2418
2441
  };
2419
2442
  })
2420
- ).then((i) => i.filter(R)), await e._serveOnlyDependencies);
2443
+ ).then((i) => i.filter(D)), await e._serveOnlyDependencies);
2421
2444
  }
2422
- const kn = "/C:@arcgis/lumina-compiler/testSetupFile", In = /^\/C:@arcgis\/lumina-compiler\/testSetupFile/u, We = [kn];
2423
- async function xn(e) {
2424
- if (
2425
- /**
2426
- * Only import custom element dependencies if we are running in Vitest browser mode.
2427
- * This keeps node tests lightweight for unit tests that don't deal with web
2428
- * components.
2429
- *
2430
- * For puppeteer front-end, we run Vite rather than Vitest, so setup-file
2431
- * does not apply (instead we use transformIndexHtml() for dependency loading).
2432
- */
2433
- !e.apiJsonEnabled
2434
- )
2435
- return Nt(e);
2436
- const i = (await ne(e)).map((s, n) => {
2437
- if ("javascriptCode" in s)
2438
- return s.javascriptCode.join(`
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);
2449
+ }
2450
+ async function Mn(e) {
2451
+ return (await oe(e)).map((i, s) => {
2452
+ if ("javascriptCode" in i)
2453
+ return i.javascriptCode.join(`
2439
2454
  `);
2440
- if ("cssHref" in s)
2455
+ if ("cssHref" in i)
2441
2456
  return [
2442
2457
  /*
2443
2458
  * The $index naming is already used by makeLoaders(), so we use the
2444
2459
  * $t prefix to avoid collisions.
2445
2460
  */
2446
- `import styles$t${n} from "${s.cssHref}${Q}";`,
2447
- `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$t${n}.styleSheet];`
2461
+ `import styles$t${s} from "${i.cssHref}${Q}";`,
2462
+ `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$t${s}.styleSheet];`
2448
2463
  ].join(`
2449
2464
  `);
2450
2465
  throw Error(
2451
2466
  b(
2452
2467
  "@arcgis/lumina:buildTestSetupFile",
2453
- `Unexpected loader type for the browser test environment: ${JSON.stringify(s)}`
2468
+ `Unexpected loader type for the browser test environment: ${JSON.stringify(i)}`
2454
2469
  )
2455
2470
  );
2456
2471
  }).join(`
2457
2472
 
2458
2473
  `);
2459
- return [Nt(e), i].join("");
2460
2474
  }
2461
- const Nt = (e) => [e.isInPuppeteerTestBackEnd ? An : "", Ln].join(""), An = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
2475
+ const Ot = (e) => [e.isInPuppeteerTestBackEnd ? Jn : "", Bn].join(""), Jn = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
2462
2476
  setupPuppeteerTest();
2463
- `, Ln = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
2477
+ `, Bn = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
2464
2478
  setupLuminaTest();
2465
- `, Nn = "@arcgis/lumina:generateLoaderTs";
2479
+ `, Kn = "@arcgis/lumina:generateLoaderTs";
2466
2480
  let Ne;
2467
- function jn(e) {
2481
+ function _n(e) {
2468
2482
  const t = /[\\\/]src[\\\/]loader\.ts$/u;
2469
- return [_s(e.apiExtractorPluginConfig), {
2470
- name: Nn,
2483
+ return [qs(e.apiExtractorPluginConfig), {
2484
+ name: Kn,
2471
2485
  configResolved() {
2472
2486
  Ne = `${e.dir.root}src/loader.ts`;
2473
2487
  },
@@ -2482,7 +2496,7 @@ function jn(e) {
2482
2496
  id: t
2483
2497
  },
2484
2498
  async handler() {
2485
- return e.apiJsonDeferred !== void 0 && await e.apiJsonDeferred.promise, kr(e);
2499
+ return e.apiJsonDeferred !== void 0 && await e.apiJsonDeferred.promise, jr(e);
2486
2500
  }
2487
2501
  },
2488
2502
  async handleHotUpdate() {
@@ -2490,29 +2504,39 @@ function jn(e) {
2490
2504
  }
2491
2505
  }, {
2492
2506
  name: "@arcgis/lumina:generateTestSetupVirtualFile",
2507
+ resolveId: {
2508
+ filter: {
2509
+ id: Rt
2510
+ },
2511
+ // Vitest treats the configured setup-file ID as a filesystem path and
2512
+ // loads it without resolving it through Vite. The dependency module is
2513
+ // imported by that setup file, so it goes through Vite's module graph and
2514
+ // must be explicitly resolved to its virtual ID here.
2515
+ handler: (r) => r === st ? r : void 0
2516
+ },
2493
2517
  load: {
2494
2518
  filter: {
2495
- id: In
2519
+ id: Rt
2496
2520
  },
2497
- handler: async () => await xn(e)
2521
+ handler: async (r) => r.startsWith(st) ? await Mn(e) : On(e)
2498
2522
  }
2499
2523
  }];
2500
2524
  }
2501
- function jt(e) {
2525
+ function Mt(e) {
2502
2526
  const t = e.server.moduleGraph.getModuleById(Ne);
2503
2527
  t !== void 0 && e.server.moduleGraph.invalidateModule(t);
2504
2528
  }
2505
- const Ft = (e) => {
2529
+ const Jt = (e) => {
2506
2530
  e.server.ws.send({
2507
2531
  type: "full-reload",
2508
2532
  path: u.join("/", u.relative(e.dir.root, Ne))
2509
2533
  });
2510
2534
  };
2511
- function Fn(e) {
2535
+ function Wn(e) {
2512
2536
  let t;
2513
2537
  const i = () => [
2514
2538
  ...e.options.assets?.transformers ?? [],
2515
- ...pt
2539
+ ...ft
2516
2540
  ];
2517
2541
  return {
2518
2542
  name: "@arcgis/lumina:handleStaticAssets",
@@ -2531,38 +2555,38 @@ function Fn(e) {
2531
2555
  * `configureServer`.
2532
2556
  */
2533
2557
  configResolved() {
2534
- e.viteCommand === "serve" && (t = Rt(e));
2558
+ e.viteCommand === "serve" && (t = Bt(e));
2535
2559
  },
2536
2560
  options() {
2537
- e.viteCommand === "build" && (t = Rt(e));
2561
+ e.viteCommand === "build" && (t = Bt(e));
2538
2562
  },
2539
2563
  async configureServer(s) {
2540
- e.server = s, te(e, await t, i()), s.watcher.on("addDir", (n) => {
2564
+ e.server = s, ie(e, await t, i()), s.watcher.on("addDir", (n) => {
2541
2565
  if (n.endsWith("assets")) {
2542
2566
  const r = u.dirname(n);
2543
- u.join(r, "/") === e.dir.root ? te(e, [Hi], i()) : n.startsWith(e.dir.srcComponents) && te(e, [zi(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());
2544
2568
  }
2545
2569
  });
2546
2570
  },
2547
2571
  async writeBundle() {
2548
- await xi(e, await t, i());
2572
+ await Di(e, await t, i());
2549
2573
  }
2550
2574
  };
2551
2575
  }
2552
- async function Rt(e) {
2553
- const t = _("assets"), i = await e.componentFilesPromise, s = await Promise.all(
2576
+ async function Bt(e) {
2577
+ const t = K("assets"), i = await e.componentFilesPromise, s = await Promise.all(
2554
2578
  i.map(async (n) => {
2555
2579
  const r = u.dirname(n), a = u.join(r, "assets");
2556
- return await _(a) ? zi(a, r) : void 0;
2580
+ return await K(a) ? Qi(a, r) : void 0;
2557
2581
  })
2558
2582
  );
2559
- return await t && s.push(Hi), s.filter(R);
2583
+ return await t && s.push(Zi), s.filter(D);
2560
2584
  }
2561
- const zi = (e, t) => ({
2585
+ const Qi = (e, t) => ({
2562
2586
  type: "directory",
2563
2587
  source: e,
2564
2588
  destination: u.basename(t)
2565
- }), Hi = { type: "directory", source: "assets/", destination: "" }, Ue = "@arcgis/lumina:printTotalBuildSize", Rn = (e) => ({
2589
+ }), Zi = { type: "directory", source: "assets/", destination: "" }, Ue = "@arcgis/lumina:printTotalBuildSize", Un = (e) => ({
2566
2590
  name: Ue,
2567
2591
  apply: () => e.viteCommand === "build",
2568
2592
  configResolved(t) {
@@ -2577,16 +2601,16 @@ const zi = (e, t) => ({
2577
2601
  if (typeof s != "function")
2578
2602
  throw Error(b(Ue, "Expected vite:reporter to declare a writeBundle() function"));
2579
2603
  i.writeBundle = async function(r, a) {
2580
- let l = 0, d = 0, c = 0, p = 0;
2604
+ let c = 0, d = 0, l = 0, p = 0;
2581
2605
  const m = console.log;
2582
2606
  console.log = function(...g) {
2583
2607
  if (m.apply(console, g), g.length === 1 && typeof g[0] == "string") {
2584
- const [h, y] = g[0].match(On) ?? [];
2608
+ const [h, y] = g[0].match(Hn) ?? [];
2585
2609
  if (!h)
2586
2610
  return;
2587
- p || (p = g[0].slice(0, g[0].indexOf(h) + h.length).replaceAll(Mn, "").length);
2611
+ p || (p = g[0].slice(0, g[0].indexOf(h) + h.length).replaceAll(qn, "").length);
2588
2612
  const v = Number.parseFloat(h.replace(" kB", "").replaceAll(",", ""));
2589
- y ? (c += Number.parseFloat(y.replace(" kB", "").replaceAll(",", "")), d += v) : l += v;
2613
+ y ? (l += Number.parseFloat(y.replace(" kB", "").replaceAll(",", "")), d += v) : c += v;
2590
2614
  }
2591
2615
  };
2592
2616
  try {
@@ -2595,38 +2619,36 @@ const zi = (e, t) => ({
2595
2619
  console.log = m;
2596
2620
  }
2597
2621
  if (d > 0) {
2598
- const g = c > 0 ? d : l, h = Mt(g), y = e.dir.relativeDist;
2622
+ const g = l > 0 ? d : c, h = Wt(g), y = e.dir.relativeDist;
2599
2623
  console.log(
2600
2624
  [
2601
- Ot,
2625
+ _t,
2602
2626
  y,
2603
- Dn,
2627
+ zn,
2604
2628
  "*",
2605
2629
  " ".repeat(p - `${y}*`.length - h.length),
2606
2630
  h,
2607
- Dt,
2608
- c > 0 ? ` ${Ot}│ gzip: ${Mt(c)}${Dt}` : ""
2631
+ Kt,
2632
+ l > 0 ? ` ${_t}│ gzip: ${Wt(l)}${Kt}` : ""
2609
2633
  ].join("")
2610
2634
  );
2611
2635
  }
2612
2636
  };
2613
2637
  }
2614
- }), Dt = "\x1B[22m\x1B[1m\x1B[22m", Ot = "\x1B[2m", Dn = "\x1B[22m\x1B[36m", On = /\d+(?:,\d+)?\.\d{2} kB/gu, Mn = /\x1B\[\d+m/gu, Jn = 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", {
2615
2639
  maximumFractionDigits: 2,
2616
2640
  minimumFractionDigits: 2
2617
- }), Mt = (e) => `${Jn.format(e)} kB`, Bn = (e, t = u.resolve("src")) => u.relative(t, u.join(e, "..", ut.slice(0, -3))), qi = "packages/core-packages/core/src", _n = "packages/core-packages/core/output/npm/esm", de = !import.meta.url.includes("node_modules");
2618
- function Vi({ command: e }) {
2619
- return e === "serve" && process.argv.includes("--local-core");
2620
- }
2621
- const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2622
- name: Jt,
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,
2623
2645
  async config({
2624
2646
  server: t,
2625
2647
  publicDir: i,
2626
- build: { cssMinify: s, target: n, sourcemap: r, lib: a, rollupOptions: { output: l = [] } = {}, watch: d, emptyOutDir: c } = {},
2648
+ build: { cssMinify: s, target: n, sourcemap: r, lib: a, rollupOptions: { output: c = [] } = {}, watch: d, emptyOutDir: l } = {},
2627
2649
  test: p = {}
2628
2650
  }, m) {
2629
- const f = d != null, { include: g, browser: h, environment: y, forceRerunTriggers: v } = p, w = H && de && Vi(m) ? si(qi, 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 ? [] : [
2630
2652
  G(u.join(w, "**/*.{ts,tsx,mjs}")),
2631
2653
  `!${G(u.join(w, "**/*.d.ts"))}`
2632
2654
  ], E = {
@@ -2684,9 +2706,9 @@ const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2684
2706
  include: [
2685
2707
  // Used by controllers. Need to add manually because @arcgis/lumina is
2686
2708
  // excluded per comment below, so Vite will discover these usages too late.
2687
- ...H && !de ? ["@arcgis/core/applications/Components/reactiveUtils.js", "@arcgis/core/core/reactiveUtils.js"] : [],
2709
+ ...H && !te ? ["@arcgis/core/applications/Components/reactiveUtils.js", "@arcgis/core/core/reactiveUtils.js"] : [],
2688
2710
  // Used by core. Because we exclude core from scanning, these are discovered late, causing errors
2689
- ...H && de ? [
2711
+ ...H && te ? [
2690
2712
  "tslib",
2691
2713
  "@arcgis/core > luxon",
2692
2714
  "@arcgis/core > @esri/arcgis-html-sanitizer",
@@ -2708,22 +2730,8 @@ const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2708
2730
  * inside the package, and by Calcite outside the package).
2709
2731
  */
2710
2732
  exclude: [
2711
- ...de ? [
2712
- "@arcgis/lumina",
2713
- "@arcgis/core",
2714
- "@arcgis/toolkit",
2715
- "@arcgis-ba/data-browser/loader",
2716
- "@arcgis-ba/report-player/loader",
2717
- "@arcgis/ai-components/loader",
2718
- "@arcgis/ai-playground/loader",
2719
- "@arcgis/charts-components/loader",
2720
- "@arcgis/coding-components/loader",
2721
- "@arcgis/common-components/loader",
2722
- "@arcgis/imagery-components/loader",
2723
- "@arcgis/map-config-components/loader",
2724
- "@arcgis/embeddable-components/loader",
2725
- "@arcgis/map-components/loader",
2726
- "@arcgis/portal-components/loader",
2733
+ ...te ? [
2734
+ ...Xn,
2727
2735
  // This exact import is also supplied through optimizableImports in `dependencies/arcgisCore.ts`
2728
2736
  // Optimizing it in the monorepo creates a separate core config instance, so the app does not receive the
2729
2737
  // configured assetsPath.
@@ -2756,7 +2764,7 @@ const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2756
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) {
2757
2765
  if (h?.enabled === !0)
2758
2766
  throw Error(
2759
- b(Jt, "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")
2760
2768
  );
2761
2769
  return {
2762
2770
  test: {
@@ -2764,7 +2772,7 @@ const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2764
2772
  puppeteerWaitForChangesDelay: e.options.puppeteerTesting?.waitForChangesDelay,
2765
2773
  globalSetup: ["@arcgis/lumina-compiler/puppeteerTesting/globalSetup"],
2766
2774
  runner: "@arcgis/lumina-compiler/puppeteerTesting/runner",
2767
- // Run all test files that include *.e2e.* in the name.
2775
+ // Run all test files that include *.e2e.* or *.spec.* in the name.
2768
2776
  include: g ? void 0 : ["**/*.{e2e,spec}.?(c|m)[jt]s?(x)"],
2769
2777
  /**
2770
2778
  * Using happy-dom because:
@@ -2790,7 +2798,7 @@ const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2790
2798
  publicDir: i ?? !1,
2791
2799
  build: {
2792
2800
  cssMinify: s ?? (e.environment === "production" ? !0 : void 0),
2793
- target: n ?? Ii(e),
2801
+ target: n ?? Fi(e),
2794
2802
  sourcemap: r ?? (e.environment === "development" ? "inline" : e.options.build?.enableSourceMapsInProduction ?? !1),
2795
2803
  lib: {
2796
2804
  entry: E,
@@ -2798,7 +2806,7 @@ const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2798
2806
  },
2799
2807
  rollupOptions: {
2800
2808
  output: {
2801
- chunkFileNames: (Array.isArray(l) ? void 0 : l.chunkFileNames) || "chunks/[name].js",
2809
+ chunkFileNames: (Array.isArray(c) ? void 0 : c.chunkFileNames) || "chunks/[name].js",
2802
2810
  ...// Does not exist in Rolldown, and probably not needed
2803
2811
  // https://github.com/rolldown/rolldown/issues/206
2804
2812
  "rolldownVersion" in this.meta ? void 0 : {
@@ -2806,7 +2814,7 @@ const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2806
2814
  * 2015 is the newest option. Rollup's generated code does not use
2807
2815
  * newer features at the moment.
2808
2816
  */
2809
- generatedCode: (Array.isArray(l) ? void 0 : l.generatedCode) ?? "es2015"
2817
+ generatedCode: (Array.isArray(c) ? void 0 : c.generatedCode) ?? "es2015"
2810
2818
  }
2811
2819
  }
2812
2820
  },
@@ -2820,7 +2828,7 @@ const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2820
2828
  * - in API Extractor we can avoid writing unchanged files to disk if
2821
2829
  * the out dir is not emptied between watch rebuilds.
2822
2830
  */
2823
- emptyOutDir: c ?? !f
2831
+ emptyOutDir: l ?? !f
2824
2832
  },
2825
2833
  optimizeDeps: A,
2826
2834
  define: S,
@@ -2855,65 +2863,65 @@ const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2855
2863
  e._originalRollupInputOptions ??= t.input;
2856
2864
  const s = { ...e._originalRollupInputOptions };
2857
2865
  i.forEach((n) => {
2858
- const r = Bn(n);
2866
+ const r = Gn(n);
2859
2867
  s[r] = n;
2860
2868
  }), t.input = s;
2861
2869
  }
2862
- }), Se = "@arcgis/lumina:serveLocalCdn", Wn = /^\/?@arcgis\/core(?=\/|$)/u, Gi = "/index.js", Un = je(Gi), st = `\0${Se}:index`, zn = je(st), Hn = 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 = [
2863
2871
  /^https?:\/\/localhost(?::[0-9]+)?$/u,
2864
2872
  /^https?:\/\/(?:[a-z0-9-]+\.)*(?:arcgis|esri)\.com(?::[0-9]+)?$/iu
2865
2873
  ];
2866
- function Vn(e) {
2874
+ function so(e) {
2867
2875
  if (!H)
2868
2876
  return;
2869
2877
  const t = j().name, i = t.split("/").pop() ?? t, s = `/${i}/index.js`, n = je(s), r = `\0${Se}:${i}`, a = je(r);
2870
2878
  return {
2871
2879
  name: Se,
2872
2880
  enforce: "pre",
2873
- apply(l) {
2874
- const d = Yn(e, l);
2881
+ apply(c) {
2882
+ const d = oo(e, c);
2875
2883
  return d || (e._localCdnCore = void 0), d;
2876
2884
  },
2877
2885
  config: {
2878
2886
  order: "post",
2879
- handler(l, d) {
2880
- const c = l.server, p = Vi(d), m = p ? qi : _n, f = si(m, import.meta.dirname);
2887
+ handler(c, d) {
2888
+ const l = c.server, p = ji(d), m = p ? Ni : sn, f = at(m, import.meta.dirname);
2881
2889
  if (f === void 0)
2882
2890
  throw Error(b(Se, `Unable to find ${m}.`));
2883
2891
  return e._localCdnCore = p ? { packageLocation: u.dirname(f), sourceLocation: f } : { packageLocation: f }, {
2884
2892
  server: {
2885
- port: c?.port ?? Hn,
2886
- cors: c?.cors ?? { origin: qn }
2893
+ port: l?.port ?? to,
2894
+ cors: l?.cors ?? { origin: io }
2887
2895
  },
2888
2896
  resolve: {
2889
2897
  // The alias also matches CDN-rooted requests such as /@arcgis/core/WebMap.js. Vite resolves .js requests
2890
2898
  // to TypeScript in source mode and handles relative and bare imports from the resulting filesystem path.
2891
- alias: [{ find: Wn, replacement: f }]
2899
+ alias: [{ find: Qn, replacement: f }]
2892
2900
  }
2893
2901
  };
2894
2902
  }
2895
2903
  },
2896
2904
  resolveId: {
2897
- filter: { id: [Un, n] },
2898
- handler(l) {
2899
- if (l === Gi)
2900
- return st;
2901
- if (l === s)
2905
+ filter: { id: [Zn, n] },
2906
+ handler(c) {
2907
+ if (c === es)
2908
+ return rt;
2909
+ if (c === s)
2902
2910
  return r;
2903
2911
  }
2904
2912
  },
2905
2913
  load: {
2906
- filter: { id: [zn, a] },
2907
- async handler(l) {
2908
- if (l === st)
2914
+ filter: { id: [eo, a] },
2915
+ async handler(c) {
2916
+ if (c === rt)
2909
2917
  return `import ${JSON.stringify(s)};
2910
2918
  `;
2911
- if (l === r)
2912
- return await Xn(e);
2919
+ if (c === r)
2920
+ return await no(e);
2913
2921
  }
2914
2922
  },
2915
- handleHotUpdate({ file: l, server: d }) {
2916
- if (Gn(l, e._localCdnCore?.sourceLocation))
2923
+ handleHotUpdate({ file: c, server: d }) {
2924
+ if (ro(c, e._localCdnCore?.sourceLocation))
2917
2925
  return d.ws.send({ type: "full-reload" }), [];
2918
2926
  }
2919
2927
  };
@@ -2921,30 +2929,30 @@ function Vn(e) {
2921
2929
  function je(e) {
2922
2930
  return new RegExp(`^${RegExp.escape(e)}$`, "u");
2923
2931
  }
2924
- function Gn(e, t) {
2932
+ function ro(e, t) {
2925
2933
  return t !== void 0 && e.startsWith(u.join(t, u.sep));
2926
2934
  }
2927
- async function Xn(e) {
2935
+ async function no(e) {
2928
2936
  const t = e.viteConfig.server, i = t.origin?.replace(/\/$/u, "") ?? `${t.https ? "https" : "http"}://localhost:${String(t.port)}`;
2929
- return `${(await ne(e, `${i}/`)).flatMap((n) => "javascriptCode" in n ? n.javascriptCode : []).join(`
2937
+ return `${(await oe(e, `${i}/`)).flatMap((n) => "javascriptCode" in n ? n.javascriptCode : []).join(`
2930
2938
  `)}
2931
2939
  `;
2932
2940
  }
2933
- function Yn(e, t) {
2934
- return de && e.viteCommand === "serve" && !e.isInTest && t.resolve?.conditions?.includes("storybook") !== !0 && t.server?.middlewareMode !== !0;
2941
+ function oo(e, t) {
2942
+ return te && e.viteCommand === "serve" && !e.isInTest && t.resolve?.conditions?.includes("storybook") !== !0 && t.server?.middlewareMode !== !0;
2935
2943
  }
2936
- const Qn = (e) => ({
2944
+ const ao = (e) => ({
2937
2945
  name: "@arcgis/lumina:setAssetPath",
2938
2946
  apply: () => e.viteCommand === "build",
2939
2947
  config: (t) => ({
2940
- base: t.base ?? e.options.assets?.defaultPath ?? De()
2948
+ base: t.base ?? e.options.assets?.defaultPath ?? Re()
2941
2949
  })
2942
2950
  });
2943
- function Zn(e = j()) {
2944
- const t = e.version ?? "0.0.1";
2945
- return bs(t);
2951
+ function co(e = j()) {
2952
+ const t = mt(e) ?? "0.0.1";
2953
+ return Ts(t);
2946
2954
  }
2947
- const eo = (e) => `/* ${e} */`, k = (e) => (t, i) => {
2955
+ const lo = (e) => `/* ${e} */`, k = (e) => (t, i) => {
2948
2956
  Object.defineProperty(t, i, {
2949
2957
  get() {
2950
2958
  throw Error(
@@ -2982,9 +2990,9 @@ const ue = {
2982
2990
  webTypes: "docs/web-types.json",
2983
2991
  apiJson: "docs/api.json",
2984
2992
  stencilLikeDocsJson: "docs/docs.json"
2985
- }, rt = (e) => e.viteConfig.root.includes("/test-packages/") ? 2 : void 0;
2986
- async function Xi(e, t, i = j()) {
2987
- const s = to(e, i), n = u.join(t, "lumina.ts"), a = await _(n) ? await z(n, "utf8") : "";
2993
+ }, nt = (e) => e.viteConfig.root.includes("/test-packages/") ? 2 : void 0;
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") : "";
2988
2996
  if (a.trim().replaceAll(`\r
2989
2997
  `, `
2990
2998
  `) === s.trim())
@@ -3002,20 +3010,20 @@ Current content:
3002
3010
  ${a}`
3003
3011
  )
3004
3012
  );
3005
- return ni(n, s), !0;
3013
+ return li(n, s), !0;
3006
3014
  }
3007
- function to(e, t = j()) {
3015
+ function po(e, t = j()) {
3008
3016
  const i = e.filter((d) => d.type === "@arcgis/lumina").map((d) => `
3009
3017
  /// <reference types="${d.packageName}/types/lumina" />`), s = e.filter((d) => d.type === "stencil"), n = s.map(
3010
- (d, c) => `
3011
- import type { JSX as JSX$${c} } from "${d.packageName}/dist/types/components";`
3018
+ (d, l) => `
3019
+ import type { JSX as JSX$${l} } from "${d.packageName}/dist/types/components";`
3012
3020
  ), r = s.length === 0 ? "" : `
3013
3021
 
3014
3022
  declare module "@arcgis/lumina" {
3015
- interface ImportStencilElements extends ${s.map((d, c) => `JSX$${c}.IntrinsicElements`).join(", ")} {}
3023
+ interface ImportStencilElements extends ${s.map((d, l) => `JSX$${l}.IntrinsicElements`).join(", ")} {}
3016
3024
  }`, a = t.devDependencies ?? {};
3017
3025
  return [
3018
- io,
3026
+ uo,
3019
3027
  a.vitest ? `
3020
3028
  /// <reference types="vitest/config" />
3021
3029
  /// <reference types="vitest/browser" />` : "",
@@ -3026,7 +3034,7 @@ declare module "@arcgis/lumina" {
3026
3034
  `
3027
3035
  ].join("");
3028
3036
  }
3029
- const io = `/**
3037
+ const uo = `/**
3030
3038
  * This file is autogenerated by \`@arcgis/lumina-compiler\` - do not edit it manually.
3031
3039
  * Manual edits will be overwritten.
3032
3040
  *
@@ -3034,7 +3042,7 @@ const io = `/**
3034
3042
  *
3035
3043
  * If you need to provide additional types, create a separate file.
3036
3044
  */
3037
- /// <reference types="@arcgis/lumina/globalTypes" />`, Ce = "@arcgis/lumina:dependencySupport", Yi = (e, t) => e.viteCommand === "serve" && /**
3045
+ /// <reference types="@arcgis/lumina/globalTypes" />`, Ce = "@arcgis/lumina:dependencySupport", is = (e, t) => e.viteCommand === "serve" && /**
3038
3046
  * Vitest started calling transformIndexHtml in browser mode versions ^2.1.4
3039
3047
  * However, it is a bit buggy (see
3040
3048
  * https://github.com/vitejs/vite/issues/19213). Instead, we are using test
@@ -3045,13 +3053,13 @@ const io = `/**
3045
3053
  * is doing:
3046
3054
  * https://github.com/storybookjs/storybook/blob/a5c2cf1712f70b4e3ecf38d3c98e7db8e8d67849/code/builders/builder-vite/src/plugins/code-generator-plugin.ts#L110
3047
3055
  */
3048
- e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, so = (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) => ({
3049
3057
  name: Ce,
3050
3058
  async configureServer(t) {
3051
- H && (e.server = t, await tn(e));
3059
+ H && (e.server = t, await dn(e));
3052
3060
  },
3053
3061
  configResolved() {
3054
- !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = ro(e).catch(
3062
+ !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = fo(e).catch(
3055
3063
  (t) => T.error(Ce, `Failed to update package's src/lumina.ts: ${String(t)}`)
3056
3064
  ));
3057
3065
  },
@@ -3059,7 +3067,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
3059
3067
  // Add imports to index.html before Vite starts resolving imports
3060
3068
  order: "pre",
3061
3069
  async handler(t, i) {
3062
- return Yi(e, i) ? (await ne(e)).map(
3070
+ return is(e, i) ? (await oe(e)).map(
3063
3071
  (n) => "javascriptCode" in n ? {
3064
3072
  tag: "script",
3065
3073
  attrs: {
@@ -3086,7 +3094,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
3086
3094
  async buildStart() {
3087
3095
  if (e.viteCommand !== "serve")
3088
3096
  return;
3089
- const i = (await ne(e)).flatMap((s) => {
3097
+ const i = (await oe(e)).flatMap((s) => {
3090
3098
  if ("javascriptCode" in s)
3091
3099
  return s.optimizableImports;
3092
3100
  if ("cssHref" in s)
@@ -3101,34 +3109,34 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
3101
3109
  await e._updateLuminaTsPromise;
3102
3110
  }
3103
3111
  });
3104
- async function ro(e) {
3105
- const i = (await Promise.all([re, Ui(e)])).flat();
3106
- if (!await Xi(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))
3107
3115
  return;
3108
3116
  let n = !1;
3109
3117
  function r() {
3110
- n || T.warn(Ce, no), n = !0;
3118
+ n || T.warn(Ce, go), n = !0;
3111
3119
  }
3112
3120
  process.on("exit", () => {
3113
- r(), clearTimeout(l);
3121
+ r(), clearTimeout(c);
3114
3122
  });
3115
- const l = setTimeout(r, 2e3);
3123
+ const c = setTimeout(r, 2e3);
3116
3124
  }
3117
- const no = Ks(
3125
+ const go = Vs(
3118
3126
  "greenBright",
3119
3127
  `lumina.ts has been updated (potentially because your dependencies changed). Please commit the updated file.
3120
3128
  If build failed with TypeScript errors, try running the build again to check whether new lumina.ts resolves the errors.`
3121
3129
  );
3122
- async function oo(e) {
3123
- const t = e.options.apiExtractor?.configFilePath === "" ? void 0 : await Us(process.cwd()), i = e.apiExtractorPluginConfig.unsafeConfigOverride === void 0 || t === void 0 ? t ?? e.apiExtractorPluginConfig.unsafeConfigOverride : Et(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);
3124
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([
3125
3133
  {
3126
3134
  type: "dynamic",
3127
- source: () => JSON.stringify(e.apiJson, null, rt(e)),
3135
+ source: () => JSON.stringify(e.apiJson, null, nt(e)),
3128
3136
  destination: u.join("../..", e._documentationFileNames.apiJson)
3129
3137
  }
3130
3138
  ]);
3131
- const s = i?.types?.typeScriptConfig ?? zs(
3139
+ const s = i?.types?.typeScriptConfig ?? Ys(
3132
3140
  process.cwd(),
3133
3141
  e.options.types?.tsconfigPath ?? i?.types?.typeScriptConfigPath,
3134
3142
  !0
@@ -3153,7 +3161,7 @@ async function oo(e) {
3153
3161
  afterDiagnostic: e.options.types?.afterDiagnostic,
3154
3162
  typeScriptInstanceCreated: e.options.types?.typeScriptInstanceCreated,
3155
3163
  declarationTextTransformers: e.options.types?.declarationTextTransformers?.map(
3156
- (c) => (p) => c(p, e)
3164
+ (l) => (p) => l(p, e)
3157
3165
  ),
3158
3166
  typeScriptConfig: n,
3159
3167
  // Already merged, so pass empty object to avoid merging again
@@ -3166,15 +3174,15 @@ async function oo(e) {
3166
3174
  getComponentDemoUrl: e.options.documentation?.getComponentDemoUrl
3167
3175
  },
3168
3176
  watch: {
3169
- onUpdate: async (c) => {
3177
+ onUpdate: async (l) => {
3170
3178
  e.apiJsonDeferred = Promise.withResolvers();
3171
- const p = await c;
3179
+ const p = await l;
3172
3180
  if (e.apiJsonDeferred.resolve(), e.apiJsonDeferred = void 0, p !== void 0) {
3173
3181
  if (e.viteCommand === "serve")
3174
3182
  if ([...p.addedModules, ...p.removedModules].some(
3175
3183
  (f) => Pe(f.sourcePath, "src/components/")
3176
3184
  ))
3177
- jt(e), Ft(e);
3185
+ Mt(e), Jt(e);
3178
3186
  else {
3179
3187
  for (const f of p.changedModules) {
3180
3188
  if (!Pe(f.new.sourcePath, "src/components/"))
@@ -3187,57 +3195,57 @@ async function oo(e) {
3187
3195
  if (g === void 0 && h === void 0)
3188
3196
  continue;
3189
3197
  if (g !== void 0 && h === void 0 || g === void 0 && h !== void 0 || g.tagName !== h.tagName || g.formAssociated !== h.formAssociated) {
3190
- Ft(e);
3198
+ Jt(e);
3191
3199
  break;
3192
3200
  }
3193
- const y = Ci(h);
3201
+ const y = Pi(h);
3194
3202
  e.server.ws.send({ type: "custom", event: "component-meta-update", data: y });
3195
3203
  }
3196
- jt(e);
3204
+ Mt(e);
3197
3205
  }
3198
- Bt(e, p.apiJson);
3206
+ zt(e, p.apiJson);
3199
3207
  }
3200
3208
  }
3201
3209
  },
3202
- afterApiJsonCreate: (c) => {
3203
- e.options.apiJson?.afterCreate?.(c.apiJson, !r), r = !0, (e.viteCommand === "build" ? e.viteConfig.build.watch : e.viteConfig.server.watch) === null && (e.apiJsonDeferred.resolve(), Bt(e, c.apiJson));
3210
+ afterApiJsonCreate: (l) => {
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));
3204
3212
  }
3205
- }, l = i === void 0 ? a : Et(i, a);
3206
- e.apiExtractorPluginConfig.configFilePath = "", e.apiExtractorPluginConfig.unsafeConfigOverride = l;
3213
+ }, c = i === void 0 ? a : Pt(i, a);
3214
+ e.apiExtractorPluginConfig.configFilePath = "", e.apiExtractorPluginConfig.unsafeConfigOverride = c;
3207
3215
  const d = e.apiExtractorPluginConfig.afterExtractorCreated;
3208
- e.apiExtractorPluginConfig.afterExtractorCreated = (c) => {
3209
- e.apiExtractor = c, d?.(c);
3216
+ e.apiExtractorPluginConfig.afterExtractorCreated = (l) => {
3217
+ e.apiExtractor = l, d?.(l);
3210
3218
  };
3211
3219
  }
3212
- function Bt(e, t) {
3220
+ function zt(e, t) {
3213
3221
  const i = { ...t, modules: [] }, s = [], n = e.viteCommand === "build" ? [] : void 0;
3214
3222
  for (const r of t.modules) {
3215
3223
  const a = { ...r, declarations: [] };
3216
- let l = !1;
3224
+ let c = !1;
3217
3225
  for (const d of r.declarations) {
3218
3226
  if (d.customElement !== !0) {
3219
3227
  a.declarations.push(d);
3220
3228
  continue;
3221
3229
  }
3222
- const c = d;
3223
- if (n?.push(r.sourcePath), c.privacy !== void 0) {
3224
- l = !0;
3230
+ const l = d;
3231
+ if (n?.push(r.sourcePath), l.privacy !== void 0) {
3232
+ c = !0;
3225
3233
  continue;
3226
3234
  }
3227
3235
  const p = {
3228
- ...c,
3229
- members: c.members.filter((m) => m.privacy === void 0)
3236
+ ...l,
3237
+ members: l.members.filter((m) => m.privacy === void 0)
3230
3238
  };
3231
3239
  a.declarations.push(p), s.push(p);
3232
3240
  }
3233
- l || i.modules.push(a);
3241
+ c || i.modules.push(a);
3234
3242
  }
3235
3243
  e._localDefinedComponents = void 0, e.privateApiJson = t, e.apiJsonComponents = s, e.apiJson = i, n !== void 0 && (e.componentFilesPromise = Promise.resolve(n));
3236
3244
  }
3237
- var ao = Object.defineProperty, I = (e, t, i, s) => {
3245
+ var yo = Object.defineProperty, I = (e, t, i, s) => {
3238
3246
  for (var n = void 0, r = e.length - 1, a; r >= 0; r--)
3239
3247
  (a = e[r]) && (n = a(t, i, n) || n);
3240
- return n && ao(t, i, n), n;
3248
+ return n && yo(t, i, n), n;
3241
3249
  };
3242
3250
  const V = "@arcgis/lumina:context";
3243
3251
  class $ {
@@ -3253,24 +3261,24 @@ class $ {
3253
3261
  this.viteConfig = r;
3254
3262
  const a = r.build.minify !== !1;
3255
3263
  this.shouldMinify = a && this.viteCommand !== "serve", Object.hasOwn(this, "shouldMinifyJsx") || (this.shouldMinifyJsx = this.viteCommand !== "serve" || this.isInTest);
3256
- const l = u.join(r.root, u.sep), d = u.join(l, "src", u.sep), c = u.join(d, "components", u.sep), p = u.join(u.resolve(l, r.build.outDir), u.sep), m = u.join(u.relative(l, p), u.sep), f = u.join(p, "components", u.sep), g = u.join(p, this.options.build?.cdn?.namespace ?? ce, u.sep), h = u.join(g, "assets", u.sep);
3264
+ const c = u.join(r.root, u.sep), d = u.join(c, "src", u.sep), l = u.join(d, "components", u.sep), p = u.join(u.resolve(c, r.build.outDir), u.sep), m = u.join(u.relative(c, p), u.sep), f = u.join(p, "components", u.sep), g = u.join(p, this.options.build?.cdn?.namespace ?? le, u.sep), h = u.join(g, "assets", u.sep);
3257
3265
  if (this.dir = {
3258
- root: l,
3266
+ root: c,
3259
3267
  src: d,
3260
- srcComponents: c,
3268
+ srcComponents: l,
3261
3269
  relativeDist: m,
3262
3270
  dist: p,
3263
3271
  distComponents: f,
3264
3272
  distCdn: g,
3265
3273
  distCdnAssets: h
3266
- }, T.initialize(r.logger, l), r.root !== ii())
3274
+ }, T.initialize(r.logger, c), r.root !== ai())
3267
3275
  throw Error(
3268
3276
  b(
3269
3277
  V,
3270
3278
  "Vite's config.root is not equal process.cwd(). This is not officially supported by Lumina and may lead to unexpected behavior. If you need this to be supported, comment on https://devtopia.esri.com/WebGIS/webgis-sdk/issues/2126 or contact Lumina maintainers."
3271
3279
  )
3272
3280
  );
3273
- p === l ? T.warn(
3281
+ p === c ? T.warn(
3274
3282
  V,
3275
3283
  "Vite output directory is set to the root directory. This can produce unexpected behavior. Please set the output directory to a subdirectory of the root directory (i.e dist/)"
3276
3284
  ) : m.startsWith("..") && T.warn(
@@ -3282,11 +3290,11 @@ class $ {
3282
3290
  extract: !0
3283
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);
3284
3292
  const C = this.viteCommand === "serve" && !this.isInStorybook, E = this.apiExtractorPluginConfig.unsafeConfigOverride;
3285
- C && (E.context.isLuminaMinimalExtraction = !0, E.types.typeCheckedExtraction = !1, E.types.fullTypeCheck = !1), this.isInStorybook && (E.context.dtsEmitPath = ""), this._typeScriptPrinter = Ws({
3293
+ C && (E.context.isLuminaMinimalExtraction = !0, E.types.typeCheckedExtraction = !1, E.types.fullTypeCheck = !1), this.isInStorybook && (E.context.dtsEmitPath = ""), this._typeScriptPrinter = Gs({
3286
3294
  // Do not downlevel. ESBuild will do that if needed.
3287
3295
  target: o.ScriptTarget.ESNext,
3288
3296
  sourceMap: r.build.sourcemap !== !1
3289
- }), Yi(this) && ne(this);
3297
+ }), is(this) && oe(this);
3290
3298
  }
3291
3299
  },
3292
3300
  configureServer: {
@@ -3314,21 +3322,21 @@ class $ {
3314
3322
  webTypes: i.jetBrains === !1 ? void 0 : i.jetBrains?.webTypesFileName ? pe(i.jetBrains.webTypesFileName) : ue.webTypes,
3315
3323
  vsCodeHtml: i.vsCode === !1 ? void 0 : i.vsCode?.htmlFileName ? pe(i.vsCode.htmlFileName) : ue.vsCodeHtml,
3316
3324
  vsCodeCss: i.vsCode === !1 ? void 0 : i.vsCode?.cssFileName ? pe(i.vsCode.cssFileName) : ue.vsCodeCss
3317
- }, this.apiExtractorPluginConfig = this.options.apiExtractor ?? {}, this.configsPromise = oo(this);
3325
+ }, this.apiExtractorPluginConfig = this.options.apiExtractor ?? {}, this.configsPromise = ho(this);
3318
3326
  const s = process.cwd().length + 1;
3319
3327
  this.componentFilesPromise = this.configsPromise.then(() => {
3320
3328
  const r = this.apiExtractorPluginConfig.unsafeConfigOverride.types.typeScriptConfig.config.fileNames, a = [];
3321
- for (let l = 0; l < r.length; ++l) {
3322
- const c = r[l].slice(s);
3323
- Pe(c, "src/components") && a.push(c);
3329
+ for (let c = 0; c < r.length; ++c) {
3330
+ const l = r[c].slice(s);
3331
+ Pe(l, "src/components") && a.push(l);
3324
3332
  }
3325
3333
  return a;
3326
- }), Ti(void 0, t);
3327
- const n = t.build?.preamble ?? Zn();
3328
- this.banner = eo(n);
3334
+ }), Ii(void 0, t);
3335
+ const n = t.build?.preamble ?? co();
3336
+ this.banner = lo(n);
3329
3337
  }
3330
3338
  _inferBuildSetup({ command: t, mode: i }, s) {
3331
- 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(Ei.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;
3332
3340
  const n = s?.__IS_IN_PUPPETEER__ === !0, r = this.viteCommand === "serve" && this.isInTest && this.options.puppeteerTesting?.enabled === !0;
3333
3341
  this.isInPuppeteerTestBackEnd = r && !n, this.isInPuppeteerTestFrontEnd = r && n;
3334
3342
  }
@@ -3349,9 +3357,9 @@ class $ {
3349
3357
  )
3350
3358
  );
3351
3359
  if (r === void 0 && !n) {
3352
- const l = this._typeScriptSourceFiles.get(t);
3353
- if (l?.text === i)
3354
- return l;
3360
+ const c = this._typeScriptSourceFiles.get(t);
3361
+ if (c?.text === i)
3362
+ return c;
3355
3363
  }
3356
3364
  return i !== r?.text && ((this.viteCommand !== "serve" || this.isInStorybook) && T.warn(
3357
3365
  V,
@@ -3400,7 +3408,7 @@ class $ {
3400
3408
  if (Array.isArray(this.assetsToProvide))
3401
3409
  this.assetsToProvide.push({ assets: t, transformers: i, apply: s });
3402
3410
  else if (this.viteCommand === "serve")
3403
- s === "serve" && te(this, t, i);
3411
+ s === "serve" && ie(this, t, i);
3404
3412
  else
3405
3413
  throw Error(
3406
3414
  b(
@@ -3476,12 +3484,12 @@ I([
3476
3484
  I([
3477
3485
  k("configResolved()")
3478
3486
  ], $.prototype, "_typeScriptPrinter");
3479
- function co(e, t, i) {
3480
- const s = $i()[t] ?? Qi(e)[t];
3487
+ function vo(e, t, i) {
3488
+ const s = xi()[t] ?? ss(e)[t];
3481
3489
  if (s === void 0) {
3482
3490
  if (e.options?.build?.dependencies?.silenceUnknownJsxElementUsage?.(t, i, e) === !0)
3483
3491
  return;
3484
- const n = Re(i);
3492
+ const n = De(i);
3485
3493
  throw Error(
3486
3494
  b(
3487
3495
  "@arcgis/lumina:resolveTagName",
@@ -3491,11 +3499,11 @@ function co(e, t, i) {
3491
3499
  }
3492
3500
  return s;
3493
3501
  }
3494
- function lo(e, t) {
3502
+ function bo(e, t) {
3495
3503
  return e.packageName === void 0 ? he(t, e.modulePath) : u.join(e.packageName, e.modulePath);
3496
3504
  }
3497
- function Qi(e) {
3498
- return e._localDefinedComponents ??= ki(
3505
+ function ss(e) {
3506
+ return e._localDefinedComponents ??= Li(
3499
3507
  e.privateApiJson,
3500
3508
  {
3501
3509
  packageName: void 0,
@@ -3506,19 +3514,19 @@ function Qi(e) {
3506
3514
  e.viteCommand === "build"
3507
3515
  ), e._localDefinedComponents;
3508
3516
  }
3509
- const _t = "makeRuntime(", po = "@arcgis/core", uo = "@arcgis/lumina:injectRuntimeOptions", mo = (e) => ({
3510
- name: uo,
3517
+ const Ht = "makeRuntime(", wo = "@arcgis/core", So = "@arcgis/lumina:injectRuntimeOptions", Co = (e) => ({
3518
+ name: So,
3511
3519
  transform: {
3512
3520
  filter: {
3513
3521
  id: /\/src\/runtime\.ts$/u
3514
3522
  },
3515
3523
  handler(t, i) {
3516
- const s = t.indexOf(_t);
3524
+ const s = t.indexOf(Ht);
3517
3525
  if (s === -1)
3518
3526
  throw new Error(
3519
3527
  `Failed to find makeRuntime() function call in src/runtime.ts. Id: ${i}. Code: ${t}`
3520
3528
  );
3521
- const n = s + _t.length, r = e.options.css?.commonStylesPath;
3529
+ const n = s + Ht.length, r = e.options.css?.commonStylesPath;
3522
3530
  return {
3523
3531
  code: [
3524
3532
  r === void 0 ? "" : `import commonStyles from "${he(e.dir.src, r)}${Ie}";`,
@@ -3526,7 +3534,7 @@ const _t = "makeRuntime(", po = "@arcgis/core", uo = "@arcgis/lumina:injectRunti
3526
3534
  "{",
3527
3535
  "defaultAssetPath:import.meta.env.BASE_URL,",
3528
3536
  'hydratedAttribute:"',
3529
- e.options.css?.hydratedAttribute ?? wi,
3537
+ e.options.css?.hydratedAttribute ?? Ti,
3530
3538
  '",',
3531
3539
  r === void 0 ? "" : "commonStyles",
3532
3540
  "}",
@@ -3534,7 +3542,7 @@ const _t = "makeRuntime(", po = "@arcgis/core", uo = "@arcgis/lumina:injectRunti
3534
3542
  // Dependency injection. Lumina cannot directly import these to avoid
3535
3543
  // a cyclical dependency.
3536
3544
  H ? `
3537
- import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${po}/applications/Components/reactiveUtils.js";
3545
+ import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${wo}/applications/Components/reactiveUtils.js";
3538
3546
  createObservable,
3539
3547
  runtime.t = trackAccess;
3540
3548
  runtime.o = createObservable;
@@ -3546,23 +3554,23 @@ runtime.r = runTracked;` : ""
3546
3554
  }
3547
3555
  }
3548
3556
  });
3549
- function fo(e) {
3550
- return `import "../${e.options.build?.cdn?.namespace === void 0 ? `${ce}/${Z}.css` : `${e.options.build.cdn.namespace}/${e.options.build.cdn.namespace}.css`}";
3557
+ function Eo(e) {
3558
+ return `import "../${e.options.build?.cdn?.namespace === void 0 ? `${le}/${Z}.css` : `${e.options.build.cdn.namespace}/${e.options.build.cdn.namespace}.css`}";
3551
3559
  `;
3552
3560
  }
3553
- const we = "@arcgis/lumina:addNonLazyImports", go = (e) => ({
3561
+ const we = "@arcgis/lumina:addNonLazyImports", To = (e) => ({
3554
3562
  name: we,
3555
3563
  apply: () => e.viteCommand === "build",
3556
3564
  generateBundle(t, i) {
3557
3565
  const n = e.viteConfig.build.sourcemap !== !1 ? " " : `
3558
3566
  `;
3559
3567
  let r = !1;
3560
- if (Object.entries(i).forEach(([a, l]) => {
3568
+ if (Object.entries(i).forEach(([a, c]) => {
3561
3569
  const d = Ge(a, e.apiExtractor);
3562
- if (d !== a && (l.fileName = d), l.type === "chunk") {
3563
- const c = u.dirname(u.join(e.dir.dist, a)), p = d === a ? c : u.dirname(u.join(e.dir.dist, d));
3564
- let m = l.code;
3565
- m = an(m, e, p, c), !e.isInStorybook && d === "chunks/runtime.js" && (r = !0, m = fo(e) + m), m = `${e.banner}${n}${m}`, l.code = m;
3570
+ if (d !== a && (c.fileName = d), c.type === "chunk") {
3571
+ const l = u.dirname(u.join(e.dir.dist, a)), p = d === a ? l : u.dirname(u.join(e.dir.dist, d));
3572
+ let m = c.code;
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;
3566
3574
  }
3567
3575
  }), !r && !e.isInStorybook)
3568
3576
  throw Error(b(we, "Expected to find a chunks/runtime.js file in the Vite's build output."));
@@ -3573,18 +3581,18 @@ const we = "@arcgis/lumina:addNonLazyImports", go = (e) => ({
3573
3581
  const t = e._customElementDependencies, i = Object.entries(t), s = new Set(
3574
3582
  i.map(([r]) => r).filter((r) => Pe(r, e.dir.srcComponents))
3575
3583
  );
3576
- i.forEach(([r, { referencedTagNames: a, referencedDeferredTagNames: l, referencedBy: d }]) => {
3577
- if (s.has(r) || a.length === 0 && l.length === 0)
3584
+ i.forEach(([r, { referencedTagNames: a, referencedDeferredTagNames: c, referencedBy: d }]) => {
3585
+ if (s.has(r) || a.length === 0 && c.length === 0)
3578
3586
  return;
3579
- const c = Zi(t, d, s);
3580
- if (c.forEach((p) => {
3581
- t[p].referencedTagNames.splice(0, 0, ...a), t[p].referencedDeferredTagNames.splice(0, 0, ...l);
3582
- }), (a.length > 0 || l.length > 0) && c.length === 0) {
3583
- const p = Re(r);
3587
+ const l = rs(t, d, s);
3588
+ if (l.forEach((p) => {
3589
+ t[p].referencedTagNames.splice(0, 0, ...a), t[p].referencedDeferredTagNames.splice(0, 0, ...c);
3590
+ }), (a.length > 0 || c.length > 0) && l.length === 0) {
3591
+ const p = De(r);
3584
3592
  throw Error(
3585
3593
  b(
3586
3594
  we,
3587
- `Unable to determine what files imported ${p}. This is necessary because this file referenced other web components (${[...a, ...l].join(", ")}), and so the compiler needs to know what component entrypoints these imports should be added to. Please double check if you are referencing ${p} in the code dynamically in the way that Lumina cannot detect, and report this issue to the Lumina maintainers.
3595
+ `Unable to determine what files imported ${p}. This is necessary because this file referenced other web components (${[...a, ...c].join(", ")}), and so the compiler needs to know what component entrypoints these imports should be added to. Please double check if you are referencing ${p} in the code dynamically in the way that Lumina cannot detect, and report this issue to the Lumina maintainers.
3588
3596
 
3589
3597
  Possible causes:
3590
3598
  - You are re-exporting a functional component from a barrel file. Refactor such cases to import the functional component directly from the file that declares it.
@@ -3594,19 +3602,19 @@ Possible causes:
3594
3602
  );
3595
3603
  }
3596
3604
  });
3597
- const n = i.flatMap(async ([r, { referencedTagNames: a, referencedDeferredTagNames: l }]) => {
3605
+ const n = i.flatMap(async ([r, { referencedTagNames: a, referencedDeferredTagNames: c }]) => {
3598
3606
  if (!s.has(r))
3599
3607
  return [];
3600
- const d = u.dirname(r), c = e.dir.src + Ge(d.slice(e.dir.src.length), e.apiExtractor), p = u.relative(e.dir.src, c);
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);
3601
3609
  function m(P) {
3602
- const x = co(e, P, r);
3610
+ const x = vo(e, P, r);
3603
3611
  if (x === void 0)
3604
3612
  return;
3605
- const S = lo(x, p);
3613
+ const S = bo(x, p);
3606
3614
  if (S !== `./${p}`)
3607
- return S.startsWith(".") ? `${S}/${Kt}` : S;
3615
+ return S.startsWith(".") ? `${S}/${qt}` : S;
3608
3616
  }
3609
- const f = new Set(a), g = new Set(l), 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}";
3610
3618
  `, v = h.map(y).join(""), w = Array.from(g, (P) => {
3611
3619
  const x = m(P);
3612
3620
  if (x !== void 0) {
@@ -3620,15 +3628,15 @@ Possible causes:
3620
3628
  return `.set("${P}", () => import("${x}"))
3621
3629
  `;
3622
3630
  }
3623
- }).filter(R), C = `${v}export * from "./${ut}";`, 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";
3624
3632
  ${C}
3625
3633
  deferredLoaders${w.join("")};` : C;
3626
- return await K(u.join(e.dir.dist, p, Kt), E);
3634
+ return await _(u.join(e.dir.dist, p, qt), E);
3627
3635
  });
3628
3636
  await Promise.all(n);
3629
3637
  }
3630
- }), Kt = "index.js", Zi = (e, t, i, s = /* @__PURE__ */ new Set()) => t.flatMap((n) => i.has(n) ? [n] : s.has(n) ? [] : (s.add(n), Zi(e, e[n].referencedBy, i, s)));
3631
- function Wt(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) {
3632
3640
  if (ee(e))
3633
3641
  return e;
3634
3642
  {
@@ -3647,14 +3655,14 @@ function ee(e) {
3647
3655
  return (
3648
3656
  // Inlined string literal
3649
3657
  typeof e == "string" || // Syntax kinds that are never undefined
3650
- ho.has(e.kind) || // Ternary with both branches never undefined
3658
+ $o.has(e.kind) || // Ternary with both branches never undefined
3651
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
3652
- o.isBinaryExpression(e) && (yo.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
3653
3661
  (o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && ee(e.expression) || // JSX that got converted to html`<p>Something</p>`
3654
- o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && ar.has(e.tag.text)
3662
+ o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && mr.has(e.tag.text)
3655
3663
  );
3656
3664
  }
3657
- const ho = /* @__PURE__ */ new Set([
3665
+ const $o = /* @__PURE__ */ new Set([
3658
3666
  o.SyntaxKind.NumericLiteral,
3659
3667
  o.SyntaxKind.BigIntLiteral,
3660
3668
  o.SyntaxKind.StringLiteral,
@@ -3673,7 +3681,7 @@ const ho = /* @__PURE__ */ new Set([
3673
3681
  o.SyntaxKind.ClassExpression,
3674
3682
  // Trust? Trust.
3675
3683
  o.SyntaxKind.NonNullExpression
3676
- ]), yo = /* @__PURE__ */ new Set([
3684
+ ]), Po = /* @__PURE__ */ new Set([
3677
3685
  o.SyntaxKind.PlusEqualsToken,
3678
3686
  o.SyntaxKind.MinusEqualsToken,
3679
3687
  o.SyntaxKind.AsteriskAsteriskEqualsToken,
@@ -3708,9 +3716,9 @@ const ho = /* @__PURE__ */ new Set([
3708
3716
  o.SyntaxKind.SlashToken,
3709
3717
  o.SyntaxKind.PercentToken,
3710
3718
  o.SyntaxKind.AsteriskAsteriskToken
3711
- ]), vo = {
3719
+ ]), ko = {
3712
3720
  property(e, t, i, s) {
3713
- const n = bo(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;
3714
3722
  if (a) {
3715
3723
  const f = He(t);
3716
3724
  if (f === !0)
@@ -3718,20 +3726,20 @@ const ho = /* @__PURE__ */ new Set([
3718
3726
  if (f === !1)
3719
3727
  return [];
3720
3728
  }
3721
- const l = t === void 0 ? ["=", o.factory.createToken(o.SyntaxKind.TrueKeyword)] : Ee(e, t, a), d = l[0] !== "=";
3729
+ const c = t === void 0 ? ["=", o.factory.createToken(o.SyntaxKind.TrueKeyword)] : Ee(e, t, a), d = c[0] !== "=";
3722
3730
  if (a && d)
3723
- return [n.name, ...l];
3724
- const [c, p] = l, m = n?.type === "stringifiedNonReflected";
3731
+ return [n.name, ...c];
3732
+ const [l, p] = c, m = n?.type === "stringifiedNonReflected";
3725
3733
  if (r || m) {
3726
- const f = Wt(
3734
+ const f = Vt(
3727
3735
  p,
3728
3736
  e,
3729
3737
  m ? "" : void 0
3730
- ), h = i === "value" && (s === "input" || s === "textarea" || s === ke) ? So(f, e) : f;
3738
+ ), h = i === "value" && (s === "input" || s === "textarea" || s === ke) ? Ao(f, e) : f;
3731
3739
  if (h !== p)
3732
- return [m ? `.${i}` : n.name, c, h];
3740
+ return [m ? `.${i}` : n.name, l, h];
3733
3741
  }
3734
- return [`.${i}`, ...l];
3742
+ return [`.${i}`, ...c];
3735
3743
  },
3736
3744
  attribute(e, t, i) {
3737
3745
  const s = t === void 0 || He(t);
@@ -3739,7 +3747,7 @@ const ho = /* @__PURE__ */ new Set([
3739
3747
  return [i];
3740
3748
  if (s === !1)
3741
3749
  return [];
3742
- const n = Ee(e, t, !0), a = n[0] !== "=" ? n : [n[0], Wt(n[1], e)];
3750
+ const n = Ee(e, t, !0), a = n[0] !== "=" ? n : [n[0], Vt(n[1], e)];
3743
3751
  return [i, ...a];
3744
3752
  },
3745
3753
  booleanAttribute(e, t, i) {
@@ -3751,8 +3759,8 @@ const ho = /* @__PURE__ */ new Set([
3751
3759
  throw new Error(
3752
3760
  `Event prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3753
3761
  );
3754
- const s = i.slice(2), n = wt(s);
3755
- return [`@${ui.has(n) ? s.toLowerCase() : wt(s)}=`, ...ht(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)];
3756
3764
  },
3757
3765
  directives(e, t) {
3758
3766
  if (t === void 0 || !o.isJsxExpression(t))
@@ -3787,20 +3795,20 @@ const ho = /* @__PURE__ */ new Set([
3787
3795
  ])
3788
3796
  ];
3789
3797
  },
3790
- class: zt,
3791
- style: zt,
3792
- key: (e, t) => [ft(t, e.sourceFile)],
3798
+ class: Xt,
3799
+ style: Xt,
3800
+ key: (e, t) => [yt(t, e.sourceFile)],
3793
3801
  deferLoad(e, t, i, s) {
3794
3802
  if (typeof s != "string")
3795
3803
  throw Error("deferLoad prop is not currently supported on dynamic tag names.");
3796
- if (!lt(s))
3804
+ if (!pt(s))
3797
3805
  throw Error(`deferLoad prop is only supported on custom elements. Found ${String(s)}`);
3798
3806
  e.neededImports.add("deferLoad");
3799
3807
  const n = e.importRenames.deferLoad;
3800
3808
  return [o.factory.createIdentifier(n)];
3801
3809
  }
3802
3810
  };
3803
- function bo(e, t, i) {
3811
+ function Io(e, t, i) {
3804
3812
  if (typeof e == "string") {
3805
3813
  const r = (i.externalComponents[e] ?? i.localComponents[e])?.propToAttribute?.[t];
3806
3814
  if (r !== void 0)
@@ -3832,7 +3840,7 @@ function ze(e, t) {
3832
3840
  if (n !== void 0)
3833
3841
  return { name: n, type: "stringifiedNonReflected" };
3834
3842
  }
3835
- function ft(e, t) {
3843
+ function yt(e, t) {
3836
3844
  if (e !== void 0 && o.isJsxExpression(e) && e.expression !== void 0)
3837
3845
  return e.expression;
3838
3846
  if (e !== void 0 && o.isStringLiteral(e))
@@ -3855,10 +3863,10 @@ function Ee(e, t, i = !1) {
3855
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 { }`
3856
3864
  );
3857
3865
  if (o.isStringLiteral(t))
3858
- return Ut(t, i);
3866
+ return Gt(t, i);
3859
3867
  if (o.isJsxExpression(t) && t.expression) {
3860
3868
  if (o.isStringLiteral(t.expression))
3861
- return Ut(t.expression, i);
3869
+ return Gt(t.expression, i);
3862
3870
  if (i) {
3863
3871
  if (o.isNumericLiteral(t.expression))
3864
3872
  return [`=${t.expression.text}`];
@@ -3866,16 +3874,16 @@ function Ee(e, t, i = !1) {
3866
3874
  return [`=${t.expression.getText(e.sourceFile)}`];
3867
3875
  }
3868
3876
  }
3869
- return ["=", ...ht(e, t, void 0)];
3877
+ return ["=", ...bt(e, t, void 0)];
3870
3878
  }
3871
- function Ut(e, t) {
3879
+ function Gt(e, t) {
3872
3880
  if (!t)
3873
3881
  return ["=", e];
3874
3882
  const i = e.text;
3875
3883
  if (i.length === 0)
3876
3884
  return [];
3877
- const s = mi(i);
3878
- if (ir(s)) {
3885
+ const s = yi(i);
3886
+ if (cr(s)) {
3879
3887
  const n = s.replaceAll('"', "&#34;");
3880
3888
  if (n.length > s.length) {
3881
3889
  const r = s.replaceAll("'", "&#39;");
@@ -3886,7 +3894,7 @@ function Ut(e, t) {
3886
3894
  } else
3887
3895
  return [`=${s}`];
3888
3896
  }
3889
- function zt(e, t, i) {
3897
+ function Xt(e, t, i) {
3890
3898
  if (t !== void 0 && o.isStringLiteral(t))
3891
3899
  return [`${i}="${t.text}"`];
3892
3900
  if (t === void 0 || !o.isJsxExpression(t) || t.expression === void 0)
@@ -3894,28 +3902,28 @@ function zt(e, t, i) {
3894
3902
  `${i} prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3895
3903
  );
3896
3904
  const s = t.expression;
3897
- if (wo(s)) {
3905
+ if (xo(s)) {
3898
3906
  const r = i === "class" ? "safeClassMap" : "safeStyleMap";
3899
3907
  e.neededImports.add(r);
3900
- const a = e.importRenames[r], l = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
3908
+ const a = e.importRenames[r], c = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
3901
3909
  q(e, void 0, s)
3902
3910
  ]);
3903
- return [`${i}=`, l];
3911
+ return [`${i}=`, c];
3904
3912
  } else
3905
3913
  return [i, ...Ee(e, t, !0)];
3906
3914
  }
3907
- const wo = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3908
- function So(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) {
3909
3917
  t.neededImports.add("live");
3910
3918
  const i = t.importRenames.live;
3911
3919
  return o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [
3912
3920
  typeof e == "string" ? o.factory.createStringLiteral(e) : e
3913
3921
  ]);
3914
3922
  }
3915
- function Co(e) {
3916
- if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in Ht && 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)
3917
3925
  return {
3918
- propType: Ht[e.expression.expression.text],
3926
+ propType: Yt[e.expression.expression.text],
3919
3927
  // To simplify checking logic in convertProps, wrap expression in JSX expression
3920
3928
  initializer: o.factory.createJsxExpression(
3921
3929
  void 0,
@@ -3924,21 +3932,21 @@ function Co(e) {
3924
3932
  )
3925
3933
  };
3926
3934
  }
3927
- const Ht = {
3935
+ const Yt = {
3928
3936
  bindProperty: "property",
3929
3937
  bindAttribute: "attribute",
3930
3938
  bindBooleanAttribute: "booleanAttribute",
3931
3939
  bindEvent: "event"
3932
3940
  };
3933
- function Eo(e, t, i) {
3934
- return $o.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : li.has(e) || e.includes("-") ? "attribute" : !lt(i) && (di.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 ? (
3935
3943
  // When tag name is dynamic, we can't help but check if the prop name matches an "always attribute" in any html element
3936
3944
  Object.values(Qe).some((r) => r.has(e))
3937
- ) : Qe[i]?.has(e) === !0)) ? Tt.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === Ye || i !== ke && (at.has(i) || ct.has(i)) ? e in W.common.reflected || e in W.common.stringifiedReflected || e in W.common.stringifiedNonReflected ? "property" : Tt.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";
3938
3946
  }
3939
- const To = ["class", "style", "ref", "directives", "key", "deferLoad"], $o = new Set(To), Po = (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;
3940
3948
  function Oe({ key: e, parts: t, litTag: i }, s) {
3941
- const n = ko(t);
3949
+ const n = Ro(t);
3942
3950
  if (n.length % 2 === 0)
3943
3951
  throw new Error("Normalized template parts array length must be odd");
3944
3952
  const [r, ...a] = n;
@@ -3954,16 +3962,16 @@ function Oe({ key: e, parts: t, litTag: i }, s) {
3954
3962
  typeof a[0] == "string" ? o.factory.createStringLiteral(r) : a[0]
3955
3963
  );
3956
3964
  }
3957
- const l = typeof i == "string" ? i : ae;
3958
- s.neededImports.add(l);
3959
- const d = s.importRenames[l], c = o.factory.createTaggedTemplateExpression(
3965
+ const c = typeof i == "string" ? i : ce;
3966
+ s.neededImports.add(c);
3967
+ const d = s.importRenames[c], l = o.factory.createTaggedTemplateExpression(
3960
3968
  o.factory.createIdentifier(d),
3961
3969
  void 0,
3962
- a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), Io(a))
3970
+ a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), Oo(a))
3963
3971
  );
3964
- return qe(s, e, c);
3972
+ return qe(s, e, l);
3965
3973
  }
3966
- const ko = (e) => e.reduce(
3974
+ const Ro = (e) => e.reduce(
3967
3975
  (t, i, s) => {
3968
3976
  const n = t.at(-1), r = typeof n == "string", a = typeof i == "string";
3969
3977
  if (r && a)
@@ -3973,7 +3981,7 @@ const ko = (e) => e.reduce(
3973
3981
  },
3974
3982
  [""]
3975
3983
  );
3976
- function Io(e) {
3984
+ function Oo(e) {
3977
3985
  if (!(e.length % 2 === 0))
3978
3986
  throw new Error("templatePartsToSpans should be called with normalized parts array without the first item");
3979
3987
  const i = e.length / 2;
@@ -3981,13 +3989,13 @@ function Io(e) {
3981
3989
  const r = n * 2, a = e[r];
3982
3990
  if (typeof a == "string")
3983
3991
  throw new Error("Expected to receive a normalized array of parts");
3984
- const l = r + 1, d = e[l];
3992
+ const c = r + 1, d = e[c];
3985
3993
  if (typeof d != "string")
3986
3994
  throw new Error("Expected to receive a normalized array of parts");
3987
- const c = n === i - 1;
3995
+ const l = n === i - 1;
3988
3996
  return o.factory.createTemplateSpan(
3989
3997
  a,
3990
- c ? o.factory.createTemplateTail(d) : o.factory.createTemplateMiddle(d)
3998
+ l ? o.factory.createTemplateTail(d) : o.factory.createTemplateMiddle(d)
3991
3999
  );
3992
4000
  });
3993
4001
  }
@@ -3998,35 +4006,35 @@ function qe(e, t, i) {
3998
4006
  const s = e.importRenames.keyed;
3999
4007
  return o.factory.createCallExpression(o.factory.createIdentifier(s), void 0, [t, i]);
4000
4008
  }
4001
- const es = (e, t) => e.getFullText(t.sourceFile).slice(0, e.getLeadingTriviaWidth(t.sourceFile));
4002
- function ts(e, t) {
4003
- const i = gt(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);
4004
4012
  return i.length === 0 ? t : o.setSyntheticLeadingComments(
4005
4013
  t,
4006
4014
  i.map((s) => ({
4007
4015
  ...s,
4008
4016
  pos: -1,
4009
4017
  end: -1,
4010
- text: is(e.slice(s.pos, s.end))
4018
+ text: as(e.slice(s.pos, s.end))
4011
4019
  }))
4012
4020
  );
4013
4021
  }
4014
- const gt = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
4015
- function xo(e) {
4016
- const t = gt(e);
4022
+ const vt = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
4023
+ function Mo(e) {
4024
+ const t = vt(e);
4017
4025
  if (t.length === 0)
4018
4026
  return [e || " "];
4019
4027
  const i = t.reduceRight(
4020
4028
  ([n, ...r], a) => {
4021
- const l = Ao(n), d = is(l.slice(a.pos, a.end));
4029
+ const c = Jo(n), d = as(c.slice(a.pos, a.end));
4022
4030
  return [
4023
- l.slice(0, a.pos),
4031
+ c.slice(0, a.pos),
4024
4032
  /**
4025
4033
  * Literal values (like this) in place of directives are ignored by Lit:
4026
4034
  * https://github.com/lit/lit/blob/56cb2ca4a86f2c7f6af757c612f05e50d1966615/packages/lit-html/src/lit-html.ts#L1111
4027
4035
  */
4028
4036
  o.factory.createNoSubstitutionTemplateLiteral(d),
4029
- l.slice(a.end),
4037
+ c.slice(a.end),
4030
4038
  ...r
4031
4039
  ];
4032
4040
  },
@@ -4036,13 +4044,13 @@ function xo(e) {
4036
4044
  const s = i.at(-1);
4037
4045
  return (typeof s != "string" || s.trim() !== "") && i.push(" "), i;
4038
4046
  }
4039
- const is = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
4040
- function Ao(e) {
4047
+ const as = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
4048
+ function Jo(e) {
4041
4049
  if (typeof e == "string")
4042
4050
  return e;
4043
4051
  throw new Error(`Expected string, got ${typeof e}: ${String(e)}`);
4044
4052
  }
4045
- function Lo(e, t) {
4053
+ function Bo(e, t) {
4046
4054
  if (!(o.isPropertyAccessExpression(t.expression) && t.expression.name.text === "map"))
4047
4055
  return t;
4048
4056
  const s = t.arguments[0];
@@ -4052,31 +4060,31 @@ function Lo(e, t) {
4052
4060
  if (!(typeof r == "object" && // If .map() callback has 3rd argument, it's not supported
4053
4061
  s.parameters.length <= 2))
4054
4062
  return t;
4055
- const l = ge(s.body);
4056
- let d = !0, c;
4057
- if (qt(l))
4058
- c = l;
4063
+ const c = ge(s.body);
4064
+ let d = !0, l;
4065
+ if (Qt(c))
4066
+ l = c;
4059
4067
  else {
4060
- if (!o.isBlock(l))
4068
+ if (!o.isBlock(c))
4061
4069
  return t;
4062
- const v = l.statements.at(-1);
4070
+ const v = c.statements.at(-1);
4063
4071
  if (!(v && o.isReturnStatement(v) && v.expression))
4064
4072
  return t;
4065
4073
  const C = ge(v.expression);
4066
- if (!qt(C))
4074
+ if (!Qt(C))
4067
4075
  return t;
4068
- const E = l.statements.slice(0, -1);
4069
- if (E.some(ss))
4076
+ const E = c.statements.slice(0, -1);
4077
+ if (E.some(cs))
4070
4078
  return t;
4071
- d = E.length === 0, c = C;
4079
+ d = E.length === 0, l = C;
4072
4080
  }
4073
- const p = o.isJsxElement(c) ? c.openingElement : c, m = cs(p);
4081
+ const p = o.isJsxElement(l) ? l.openingElement : l, m = ms(p);
4074
4082
  if (m === -1)
4075
4083
  return t;
4076
4084
  const f = p.attributes.properties[m];
4077
4085
  if (f === void 0 || !o.isJsxAttribute(f))
4078
4086
  return t;
4079
- const g = ft(f.initializer, e.sourceFile), h = No(r, s, g, d, e);
4087
+ const g = yt(f.initializer, e.sourceFile), h = Ko(r, s, g, d, e);
4080
4088
  if (h === void 0)
4081
4089
  return t;
4082
4090
  e.liftedKeys.add(f.name), e.neededImports.add("repeat");
@@ -4094,29 +4102,29 @@ function Lo(e, t) {
4094
4102
  s.parameters,
4095
4103
  s.type,
4096
4104
  s.equalsGreaterThanToken,
4097
- l
4105
+ c
4098
4106
  )
4099
4107
  ]);
4100
4108
  }
4101
- const qt = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e);
4102
- function ss(e) {
4109
+ const Qt = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e);
4110
+ function cs(e) {
4103
4111
  if (o.isReturnStatement(e))
4104
4112
  return !0;
4105
4113
  let t = !1;
4106
4114
  return o.visitEachChild(
4107
4115
  e,
4108
- (i) => (t ||= ss(i), i),
4116
+ (i) => (t ||= cs(i), i),
4109
4117
  void 0
4110
4118
  ), t;
4111
4119
  }
4112
- function No(e, t, i, s, n) {
4120
+ function Ko(e, t, i, s, n) {
4113
4121
  const r = J(i);
4114
4122
  if (r === void 0)
4115
4123
  return;
4116
- let a = rs(e.name, r);
4117
- const l = t.parameters.at(1);
4118
- if (l !== void 0 && o.isIdentifier(l.name) && // A more basic check is also provided in lumina/no-unnecessary-key rule
4119
- r.every(Fe, l.name)) {
4124
+ let a = ls(e.name, r);
4125
+ const c = t.parameters.at(1);
4126
+ if (c !== void 0 && o.isIdentifier(c.name) && // A more basic check is also provided in lumina/no-unnecessary-key rule
4127
+ r.every(Fe, c.name)) {
4120
4128
  T.warn(
4121
4129
  "@arcgis/lumina:jsxToLitHtml",
4122
4130
  "It looks like you are trying to use .map() index as a key={} prop value. Doing so is potentially pointless and may cause performance degradation. In Lit it is safe to omit the key={} prop. If you really mean to use index as the key, then use the keyed() Lit directive directly, rather than the JSX key={} prop.",
@@ -4125,7 +4133,7 @@ function No(e, t, i, s, n) {
4125
4133
  return;
4126
4134
  }
4127
4135
  if (!s) {
4128
- const d = Fo(r, a, t);
4136
+ const d = Wo(r, a, t);
4129
4137
  if (d === void 0)
4130
4138
  return;
4131
4139
  a = d;
@@ -4164,7 +4172,7 @@ function J(e) {
4164
4172
  }
4165
4173
  return t;
4166
4174
  } else {
4167
- if (jo.has(e.kind))
4175
+ if (_o.has(e.kind))
4168
4176
  return [];
4169
4177
  {
4170
4178
  const t = ge(e);
@@ -4172,7 +4180,7 @@ function J(e) {
4172
4180
  }
4173
4181
  }
4174
4182
  }
4175
- const jo = /* @__PURE__ */ new Set([
4183
+ const _o = /* @__PURE__ */ new Set([
4176
4184
  o.SyntaxKind.NumericLiteral,
4177
4185
  o.SyntaxKind.BigIntLiteral,
4178
4186
  o.SyntaxKind.StringLiteral,
@@ -4181,20 +4189,20 @@ const jo = /* @__PURE__ */ new Set([
4181
4189
  o.SyntaxKind.FalseKeyword,
4182
4190
  o.SyntaxKind.NullKeyword,
4183
4191
  o.SyntaxKind.TrueKeyword
4184
- ]), ge = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? ge(e.expression) : e, rs = (e, t) => o.isObjectBindingPattern(e) ? Oo(e, t) : e;
4185
- function Fo(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) {
4186
4194
  if (e.every(Fe, t))
4187
4195
  return t;
4188
4196
  if (o.isIdentifier(t)) {
4189
- const s = o.isBlock(i.body) ? Xe(i.body.statements, (r) => Ro(r, t)) : void 0;
4197
+ const s = o.isBlock(i.body) ? Xe(i.body.statements, (r) => Uo(r, t)) : void 0;
4190
4198
  if (s === void 0)
4191
4199
  return;
4192
- const n = rs(s, e);
4200
+ const n = ls(s, e);
4193
4201
  if (e.every(Fe, n))
4194
4202
  return n;
4195
4203
  }
4196
4204
  }
4197
- function Ro(e, t) {
4205
+ function Uo(e, t) {
4198
4206
  if (!o.isVariableStatement(e) || !(e.declarationList.flags & o.NodeFlags.Const))
4199
4207
  return;
4200
4208
  const i = e.declarationList.declarations[0];
@@ -4202,52 +4210,52 @@ function Ro(e, t) {
4202
4210
  }
4203
4211
  function Fe(e) {
4204
4212
  const t = this;
4205
- return o.isIdentifier(t) ? t.text === e : t.elements.some(Do, e);
4213
+ return o.isIdentifier(t) ? t.text === e : t.elements.some(zo, e);
4206
4214
  }
4207
- function Do(e) {
4215
+ function zo(e) {
4208
4216
  const t = this;
4209
4217
  return o.isOmittedExpression(e) ? !1 : Fe.call(e.name, t);
4210
4218
  }
4211
- function Oo(e, t) {
4219
+ function Ho(e, t) {
4212
4220
  let i = !1;
4213
4221
  const s = e.elements.filter((n) => o.isIdentifier(n.name) ? t.includes(n.name.text) : (i = !0, !0));
4214
4222
  return i || s.length === 0 ? e : o.factory.updateObjectBindingPattern(e, s);
4215
4223
  }
4216
- const ns = (e, t) => t.liftedKeys.has(e);
4224
+ const ds = (e, t) => t.liftedKeys.has(e);
4217
4225
  function q(e, t, i) {
4218
4226
  if (fe(i))
4219
- return os(e, i);
4220
- const s = o.isCallExpression(i) ? Lo(e, i) : i, n = o.visitEachChild(
4227
+ return ps(e, i);
4228
+ const s = o.isCallExpression(i) ? Bo(e, i) : i, n = o.visitEachChild(
4221
4229
  s,
4222
4230
  // Do not add "" if parent is binary expression to not turn {(a && <b />) || c} into {(a && <b />) || "" || c}
4223
4231
  q.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
4224
4232
  e.transformationContext
4225
4233
  );
4226
- return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || fe(ge(i.right)) || pr(i.right)) ? Bo(n) : n;
4234
+ return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || fe(ge(i.right)) || yr(i.right)) ? Go(n) : n;
4227
4235
  }
4228
- function os(e, t) {
4229
- const i = as(e, t);
4236
+ function ps(e, t) {
4237
+ const i = us(e, t);
4230
4238
  return Oe(i, e);
4231
4239
  }
4232
- function as(e, t) {
4240
+ function us(e, t) {
4233
4241
  const i = "children" in t ? t.children : [];
4234
4242
  if (o.isJsxFragment(t))
4235
4243
  return { key: void 0, ...Te(i, e) };
4236
4244
  const n = o.isJsxElement(t) ? t.openingElement : t, r = n.tagName;
4237
4245
  if (o.isJsxNamespacedName(r))
4238
4246
  throw Error(`JSX namespaced elements are not supported. Found ${r.getText(e.sourceFile)} `);
4239
- if (!o.isIdentifier(r) || !r.text.startsWith(r.text[0].toLowerCase()) && r.text !== Be && r.text !== _e) {
4240
- const S = o.isIdentifier(r) && r.text === Gs ? Te(i, e) : {
4247
+ if (!o.isIdentifier(r) || !r.text.startsWith(r.text[0].toLowerCase()) && r.text !== Be && r.text !== Ke) {
4248
+ const S = o.isIdentifier(r) && r.text === tr ? Te(i, e) : {
4241
4249
  // No need to wrap the function call in a lit-html tag
4242
4250
  litTag: void 0,
4243
- parts: [Jo(e, t, r, i)]
4251
+ parts: [Vo(e, t, r, i)]
4244
4252
  };
4245
4253
  return {
4246
- key: Mo(n, e),
4254
+ key: qo(n, e),
4247
4255
  ...S
4248
4256
  };
4249
4257
  }
4250
- const l = r.text === Be ? ke : r.text === _e ? Ye : r.text, d = r.text === Be ? oe : r.text === _e ? Y : Ys.has(l) ? fi : at.has(l) ? ie : ae, c = lt(l), p = c ? e.localComponents[l]?.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);
4251
4259
  let f;
4252
4260
  const g = [];
4253
4261
  let h = !1;
@@ -4260,36 +4268,36 @@ Found ${x.getText(e.sourceFile)}`
4260
4268
  const { name: S, initializer: A } = x;
4261
4269
  if (o.isJsxNamespacedName(S))
4262
4270
  throw Error(`JSX namespaced attributes are not supported. Found ${S.getText(e.sourceFile)}`);
4263
- const L = S.text, U = Co(A), F = U?.propType ?? Eo(L, A, l);
4271
+ const L = S.text, U = Lo(A), F = U?.propType ?? No(L, A, c);
4264
4272
  m?.delete(L);
4265
- const N = vo[F](e, U?.initializer ?? A, L, l);
4273
+ const N = ko[F](e, U?.initializer ?? A, L, c);
4266
4274
  if (N.length === 0)
4267
4275
  return [];
4268
- const B = e.compiler.shouldMinifyJsx ? [" "] : xo(es(S, e));
4269
- return F === "key" ? (f = typeof N[0] == "object" && !ns(S, e) ? N[0] : void 0, B.some(Po) ? 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(
4270
4278
  ...B,
4271
4279
  ...N.flatMap(
4272
- (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]
4273
4281
  )
4274
4282
  ), []) : [...B, ...N];
4275
4283
  });
4276
4284
  if (m !== void 0 && m.size > 0 && e.compiler.logLintError(
4277
4285
  "mustIncludeAllRequiredProperties",
4278
4286
  e.sourceFile.fileName,
4279
- `Missing required properties for <${l}> }: ${Array.from(m).join(", ")}`
4280
- ), g.length > 0 && y.push(...g), typeof l == "string" && ct.has(l))
4287
+ `Missing required properties for <${c}> }: ${Array.from(m).join(", ")}`
4288
+ ), g.length > 0 && y.push(...g), typeof c == "string" && dt.has(c))
4281
4289
  throw Error(
4282
- `JSX syntax for MathML elements is not yet supported. If you need it, please request it. Otherwise, use the \`math\` function from Lit directly. Tried to use the "${l}" element`
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`
4283
4291
  );
4284
- c && (h ? e.customElementsToImportDeferred.add(l) : e.customElementsToImport.add(l));
4285
- const v = typeof l == "string" && Xs.has(l), w = Te(i, e);
4292
+ l && (h ? e.customElementsToImportDeferred.add(c) : e.customElementsToImport.add(c));
4293
+ const v = typeof c == "string" && ir.has(c), w = Te(i, e);
4286
4294
  if (v && w.parts.length > 0)
4287
4295
  throw Error(
4288
- `Void HTML elements like <${l}> cannot have children. Found ${t.getText(e.sourceFile)}`
4296
+ `Void HTML elements like <${c}> cannot have children. Found ${t.getText(e.sourceFile)}`
4289
4297
  );
4290
- const C = (d === ie || d === Y) && w.parts.length === 0, E = [
4298
+ const C = (d === se || d === Y) && w.parts.length === 0, E = [
4291
4299
  "<",
4292
- typeof l == "string" ? l : r,
4300
+ typeof c == "string" ? c : r,
4293
4301
  ...y,
4294
4302
  C ? `${y.length === 0 ? "" : " "}/>` : ">"
4295
4303
  ], P = v || C ? E : [
@@ -4301,48 +4309,48 @@ Found ${x.getText(e.sourceFile)}`
4301
4309
  */
4302
4310
  ...w.litTag !== void 0 && w.litTag !== d ? [Oe({ key: void 0, ...w }, e)] : w.parts,
4303
4311
  "</",
4304
- typeof l == "string" ? l : r,
4312
+ typeof c == "string" ? c : r,
4305
4313
  ">"
4306
4314
  ];
4307
4315
  return { key: f, parts: P, litTag: d };
4308
4316
  }
4309
- function Mo(e, t) {
4310
- const i = e.attributes.properties[cs(e)];
4311
- return i && o.isJsxAttribute(i) && !ns(i.name, t) ? ft(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;
4312
4320
  }
4313
- const cs = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
4314
- function Jo(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) {
4315
4323
  const r = (o.isJsxElement(t) ? t.openingElement : t).attributes.properties.map((d) => {
4316
4324
  if (o.isJsxSpreadAttribute(d))
4317
- return ts(es(d, e), o.factory.createSpreadAssignment(d.expression));
4318
- const { name: c, initializer: p } = d;
4319
- if (o.isJsxNamespacedName(c))
4320
- throw Error(`JSX namespaced attributes are not supported. Found ${c.getText(e.sourceFile)}`);
4321
- if (c.text === "key")
4325
+ return os(ns(d, e), o.factory.createSpreadAssignment(d.expression));
4326
+ const { name: l, initializer: p } = d;
4327
+ if (o.isJsxNamespacedName(l))
4328
+ throw Error(`JSX namespaced attributes are not supported. Found ${l.getText(e.sourceFile)}`);
4329
+ if (l.text === "key")
4322
4330
  return;
4323
- const m = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : fe(p) ? os(e, p) : q(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), f = oi(c.text) ? o.factory.createStringLiteral(c.text) : c;
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;
4324
4332
  return o.factory.createPropertyAssignment(f, m);
4325
- }), { parts: a, litTag: l } = Te(s, e);
4333
+ }), { parts: a, litTag: c } = Te(s, e);
4326
4334
  return a.length > 0 && r.push(
4327
4335
  o.factory.createPropertyAssignment(
4328
4336
  o.factory.createIdentifier("children"),
4329
- Oe({ key: void 0, parts: a, litTag: l }, e)
4337
+ Oe({ key: void 0, parts: a, litTag: c }, e)
4330
4338
  )
4331
4339
  ), o.factory.createCallExpression(i, void 0, [
4332
- o.factory.createObjectLiteralExpression(r.filter(R))
4340
+ o.factory.createObjectLiteralExpression(r.filter(D))
4333
4341
  ]);
4334
4342
  }
4335
4343
  function Te(e, t) {
4336
4344
  let i;
4337
4345
  const s = e.flatMap((n) => {
4338
4346
  if (o.isJsxText(n))
4339
- return [t.compiler.shouldMinifyJsx ? Zs(n.text) : n.text];
4347
+ return [t.compiler.shouldMinifyJsx ? nr(n.text) : n.text];
4340
4348
  if (o.isJsxExpression(n))
4341
- return ht(t, n, n);
4349
+ return bt(t, n, n);
4342
4350
  {
4343
- const r = as(t, n);
4344
- if (r.key === void 0 && r.litTag !== oe && r.litTag !== Y) {
4345
- if (r.litTag === fi)
4351
+ const r = us(t, n);
4352
+ if (r.key === void 0 && r.litTag !== ae && r.litTag !== Y) {
4353
+ if (r.litTag === vi)
4346
4354
  return r.parts;
4347
4355
  if (i !== void 0 && r.litTag !== void 0 && i !== r.litTag)
4348
4356
  throw new Error(
@@ -4355,21 +4363,21 @@ function Te(e, t) {
4355
4363
  });
4356
4364
  return { litTag: i, parts: s };
4357
4365
  }
4358
- function Bo(e) {
4366
+ function Go(e) {
4359
4367
  return e.operatorToken.kind === o.SyntaxKind.AmpersandAmpersandToken ? o.factory.createBinaryExpression(
4360
4368
  e,
4361
4369
  o.factory.createToken(o.SyntaxKind.BarBarToken),
4362
4370
  o.factory.createStringLiteral("")
4363
4371
  ) : e;
4364
4372
  }
4365
- function ht(e, t, i) {
4373
+ function bt(e, t, i) {
4366
4374
  if (t.expression === void 0) {
4367
4375
  if (e.compiler.shouldMinifyJsx)
4368
4376
  return [];
4369
4377
  const s = t.getText(e.sourceFile).slice(1, -1);
4370
- return gt(s).length === 0 ? [] : [ts(s, o.factory.createIdentifier("undefined"))];
4378
+ return vt(s).length === 0 ? [] : [os(s, o.factory.createIdentifier("undefined"))];
4371
4379
  }
4372
- return o.isStringLiteral(t.expression) ? [mi(t.expression.text)] : (
4380
+ return o.isStringLiteral(t.expression) ? [yi(t.expression.text)] : (
4373
4381
  /**
4374
4382
  * There is a bug in Chrome DevTools, where it won't let you set a
4375
4383
  * breakpoint inside a tagged template literal. It seems like they did
@@ -4406,26 +4414,26 @@ function ht(e, t, i) {
4406
4414
  ] : [q(e, i, t.expression)]
4407
4415
  );
4408
4416
  }
4409
- const ls = (e) => e.reduce((t, [i, s]) => (t[i] ??= [], t[i].push(s), t), {}), ds = ls(
4410
- Object.entries(se).flatMap(
4417
+ const fs = (e) => e.reduce((t, [i, s]) => (t[i] ??= [], t[i].push(s), t), {}), gs = fs(
4418
+ Object.entries(re).flatMap(
4411
4419
  ([e, t]) => t.map((i) => [i, e])
4412
4420
  )
4413
- ), ps = new Set(Object.keys(ds));
4414
- function _o(e, t) {
4421
+ ), hs = new Set(Object.keys(gs));
4422
+ function Xo(e, t) {
4415
4423
  const i = t.importClause, s = i === void 0, n = t.moduleSpecifier;
4416
4424
  if (!o.isStringLiteral(n))
4417
4425
  return t;
4418
- const r = Ko(e.sourceFile.fileName, n.text, ""), a = !i?.isTypeOnly;
4419
- if (a && e.existingImportedModules.add(r), mr.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
4420
4428
  !n.text.includes("?")) {
4421
4429
  if (s) {
4422
4430
  if (e.compiler.viteCommand !== "build" || e.compiler.isInStorybook || e.compiler.isInTest)
4423
4431
  return t;
4424
- const c = e.sourceFile.fileName, p = c.includes("/node_modules/") || c.includes("/dist/"), m = `import "${n.text}"`;
4432
+ const l = e.sourceFile.fileName, p = l.includes("/node_modules/") || l.includes("/dist/"), m = `import "${n.text}"`;
4425
4433
  throw Error(
4426
- p ? `Unexpected case: during build, all node_modules runtime dependencies should be externalized (unless explicitly configured otherwise). ${c} is not externalized, and it contains a side-effect CSS import \`${m}\`. How should such CSS import be handled? Options:
4427
- 1. (suggested) Externalize ${c}, which will make end-user's bundler treat this CSS import as global CSS.
4428
- 2. Write a transform() plugin to drop the CSS import from ${c}, and then manually import the CSS as needed inside your shadow root or your library's global CSS file.` : `${c}: Found a side-effect CSS import \`${m}\`. Such import is not allowed as it won't work with shadow DOM. Please use \`import { styles } from "${n.text}";\` instead and then add \`static override styles = styles;\` to your component. If this needs to be global CSS, @import it inside your global CSS file`
4434
+ p ? `Unexpected case: during build, all node_modules runtime dependencies should be externalized (unless explicitly configured otherwise). ${l} is not externalized, and it contains a side-effect CSS import \`${m}\`. How should such CSS import be handled? Options:
4435
+ 1. (suggested) Externalize ${l}, which will make end-user's bundler treat this CSS import as global CSS.
4436
+ 2. Write a transform() plugin to drop the CSS import from ${l}, and then manually import the CSS as needed inside your shadow root or your library's global CSS file.` : `${l}: Found a side-effect CSS import \`${m}\`. Such import is not allowed as it won't work with shadow DOM. Please use \`import { styles } from "${n.text}";\` instead and then add \`static override styles = styles;\` to your component. If this needs to be global CSS, @import it inside your global CSS file`
4429
4437
  );
4430
4438
  }
4431
4439
  return o.factory.updateImportDeclaration(
@@ -4443,33 +4451,33 @@ function _o(e, t) {
4443
4451
  if (s)
4444
4452
  return t;
4445
4453
  if (i.name !== void 0) {
4446
- const c = i.name.text, p = i.name.text.startsWith(c[0].toUpperCase()), m = u.isAbsolute(r);
4447
- a && !i.isTypeOnly && p && m && e.importedFunctionComponentsFromModules.add(r);
4454
+ const l = i.name.text, p = i.name.text.startsWith(l[0].toUpperCase()), m = u.isAbsolute(r);
4455
+ a && p && m && e.importedFunctionComponentsFromModules.add(r);
4448
4456
  }
4449
- const l = i.namedBindings;
4450
- if (l === void 0 || !o.isNamedImports(l))
4457
+ const c = i.namedBindings;
4458
+ if (c === void 0 || !o.isNamedImports(c))
4451
4459
  return t;
4452
- const d = ps.has(n.text);
4453
- if (l.elements.forEach((c) => {
4454
- const p = (c.propertyName ?? c.name).text, m = se[p];
4460
+ const d = hs.has(n.text);
4461
+ if (c.elements.forEach((l) => {
4462
+ const p = (l.propertyName ?? l.name).text, m = re[p];
4455
4463
  if (d) {
4456
4464
  if (m?.some((h) => h === n.text)) {
4457
- const h = us(p, r);
4458
- e.existingLitImports.add(h), e.importRenames[h] = c.name?.text ?? h;
4465
+ const h = ys(p, r);
4466
+ e.existingLitImports.add(h), e.importRenames[h] = l.name?.text ?? h;
4459
4467
  }
4460
- } else (c.name.text === "h" || c.name.text === "createElement") && j().name !== "@arcgis/lumina" && (e.hasNonLuminaJsxImport = !0);
4468
+ } else (l.name.text === "h" || l.name.text === "createElement") && j().name !== "@arcgis/lumina" && (e.hasNonLuminaJsxImport = !0);
4461
4469
  const f = p.startsWith(p[0].toUpperCase()), g = u.isAbsolute(r);
4462
- a && !c.isTypeOnly && f && g && e.importedFunctionComponentsFromModules.add(r);
4470
+ a && !l.isTypeOnly && f && g && e.importedFunctionComponentsFromModules.add(r);
4463
4471
  }), n.text === "@arcgis/lumina") {
4464
- let c = !1;
4465
- const p = l.elements.filter((f) => {
4472
+ let l = !1;
4473
+ const p = c.elements.filter((f) => {
4466
4474
  const g = (f.propertyName ?? f.name).text;
4467
- return ur.has(g) ? !1 : (c ||= !f.isTypeOnly, !0);
4475
+ return vr.has(g) ? !1 : (l ||= !f.isTypeOnly, !0);
4468
4476
  });
4469
4477
  if (p.length === 0)
4470
4478
  return;
4471
- if (p.length !== l.elements.length) {
4472
- const f = i.isTypeOnly || !c, g = c ? p : p.map(
4479
+ if (p.length !== c.elements.length) {
4480
+ const f = i.phaseModifier === o.SyntaxKind.TypeKeyword || !l, g = l ? p : p.map(
4473
4481
  (h) => o.factory.updateImportSpecifier(
4474
4482
  h,
4475
4483
  !1,
@@ -4482,9 +4490,9 @@ function _o(e, t) {
4482
4490
  t.modifiers,
4483
4491
  o.factory.updateImportClause(
4484
4492
  i,
4485
- f,
4493
+ f ? o.SyntaxKind.TypeKeyword : void 0,
4486
4494
  i.name,
4487
- o.factory.updateNamedImports(l, g)
4495
+ o.factory.updateNamedImports(c, g)
4488
4496
  ),
4489
4497
  t.moduleSpecifier,
4490
4498
  t.attributes
@@ -4493,76 +4501,76 @@ function _o(e, t) {
4493
4501
  }
4494
4502
  return t;
4495
4503
  }
4496
- const us = (e, t) => e === ae && se.staticHtml.includes(t) ? oe : e === ie && se.staticSvg.includes(t) ? Y : e, Ko = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
4497
- function Wo(e) {
4498
- return o.isImportDeclaration(e) ? Uo(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;
4499
4507
  }
4500
- function Uo(e, t) {
4508
+ function Zo(e, t) {
4501
4509
  const i = t.importClause, s = i?.namedBindings, n = t.moduleSpecifier;
4502
- if (!o.isStringLiteral(n) || !s || !o.isNamedImports(s) || !ps.has(n.text))
4510
+ if (!o.isStringLiteral(n) || !s || !o.isNamedImports(s) || !hs.has(n.text))
4503
4511
  return t;
4504
- const r = i.isTypeOnly;
4512
+ const r = i.phaseModifier === o.SyntaxKind.TypeKeyword;
4505
4513
  let a = !1;
4506
- const l = s.elements.map((d) => {
4507
- const c = (d.propertyName ?? d.name).text, p = us(c, n.text);
4514
+ const c = s.elements.map((d) => {
4515
+ const l = (d.propertyName ?? d.name).text, p = ys(l, n.text);
4508
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;
4509
4517
  });
4510
- return ds[n.text]?.forEach((d) => {
4511
- !e.neededImports.has(d) || e.existingLitImports.has(d) || (e.neededImports.delete(d), a = !0, l.push(ms(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)));
4512
4520
  }), a ? o.factory.updateImportDeclaration(
4513
4521
  t,
4514
4522
  t.modifiers,
4515
4523
  o.factory.updateImportClause(
4516
4524
  i,
4517
- !1,
4525
+ void 0,
4518
4526
  i.name,
4519
- o.factory.updateNamedImports(s, l)
4527
+ o.factory.updateNamedImports(s, c)
4520
4528
  ),
4521
4529
  t.moduleSpecifier,
4522
4530
  t.attributes
4523
4531
  ) : t;
4524
4532
  }
4525
- function zo(e) {
4526
- const t = ls(
4527
- Array.from(e.neededImports, (i) => [se[i][0], i])
4533
+ function ea(e) {
4534
+ const t = fs(
4535
+ Array.from(e.neededImports, (i) => [re[i][0], i])
4528
4536
  );
4529
4537
  return Object.entries(t).map(
4530
4538
  ([i, s]) => o.factory.createImportDeclaration(
4531
4539
  void 0,
4532
4540
  o.factory.createImportClause(
4533
- !1,
4541
+ void 0,
4534
4542
  void 0,
4535
4543
  o.factory.createNamedImports(
4536
- s.map((n) => (e.neededImports.delete(n), ms(n, e)))
4544
+ s.map((n) => (e.neededImports.delete(n), vs(n, e)))
4537
4545
  )
4538
4546
  ),
4539
4547
  o.factory.createStringLiteral(i)
4540
4548
  )
4541
4549
  );
4542
4550
  }
4543
- function ms(e, t) {
4544
- const i = e === oe ? ae : e === Y ? ie : e, s = t.importRenames[e];
4551
+ function vs(e, t) {
4552
+ const i = e === ae ? ce : e === Y ? se : e, s = t.importRenames[e];
4545
4553
  return s === i ? o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(i)) : o.factory.createImportSpecifier(
4546
4554
  !1,
4547
4555
  o.factory.createIdentifier(i),
4548
4556
  o.factory.createIdentifier(s)
4549
4557
  );
4550
4558
  }
4551
- function Ho(e) {
4552
- const t = jr().map(({ packageName: i }) => i);
4559
+ function ta(e) {
4560
+ const t = Br().map(({ packageName: i }) => i);
4553
4561
  return e.existingImportedModules.forEach((i) => {
4554
4562
  if (u.isAbsolute(i))
4555
4563
  return;
4556
- const s = qs(i), n = i.slice(s.length + 1);
4564
+ const s = Zs(i), n = i.slice(s.length + 1);
4557
4565
  if (t.includes(s ?? "") && (n.startsWith("dist/components") || n.startsWith("components"))) {
4558
- const r = Re(e.sourceFile.fileName);
4566
+ const r = De(e.sourceFile.fileName);
4559
4567
  throw new Error(
4560
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.`
4561
4569
  );
4562
4570
  }
4563
4571
  }), [];
4564
4572
  }
4565
- function qo(e) {
4573
+ function ia(e) {
4566
4574
  if (e.compiler.viteCommand === "serve")
4567
4575
  return e.customElementsToImport.clear(), e.customElementsToImportDeferred.clear(), [];
4568
4576
  const t = e.compiler._customElementDependencies;
@@ -4577,15 +4585,15 @@ function qo(e) {
4577
4585
  t[s] ??= { referencedBy: [], referencedTagNames: [], referencedDeferredTagNames: [] }, t[s].referencedBy.push(e.sourceFile.fileName);
4578
4586
  }), [];
4579
4587
  }
4580
- const Vo = (e, t) => {
4588
+ const sa = (e, t) => {
4581
4589
  const i = e.pragmas;
4582
4590
  if (i?.has("jsx") === !0 || i?.has("jsxImportSource") === !0)
4583
4591
  return e.statements;
4584
4592
  let s = !1, n;
4585
4593
  if (t.apiModule !== void 0) {
4586
4594
  const d = t.apiModule.declarations;
4587
- for (let c = 0; c < d.length; ++c) {
4588
- const p = d[c];
4595
+ for (let l = 0; l < d.length; ++l) {
4596
+ const p = d[l];
4589
4597
  if (p.customElement === !0) {
4590
4598
  const m = p;
4591
4599
  s = m.encapsulation !== void 0;
@@ -4597,11 +4605,11 @@ const Vo = (e, t) => {
4597
4605
  }
4598
4606
  const r = {
4599
4607
  compiler: t.compiler,
4600
- externalComponents: $i(),
4601
- localComponents: Qi(t.compiler),
4608
+ externalComponents: xi(),
4609
+ localComponents: ss(t.compiler),
4602
4610
  sourceFile: e,
4603
4611
  transformationContext: t.transformation,
4604
- importRenames: Go(e),
4612
+ importRenames: ra(e),
4605
4613
  existingImportedModules: /* @__PURE__ */ new Set(),
4606
4614
  importedFunctionComponentsFromModules: /* @__PURE__ */ new Set(),
4607
4615
  existingLitImports: /* @__PURE__ */ new Set(),
@@ -4615,47 +4623,47 @@ const Vo = (e, t) => {
4615
4623
  let a = [];
4616
4624
  if (e.statements.every((d) => {
4617
4625
  if (o.isImportDeclaration(d)) {
4618
- const c = _o(r, d);
4619
- if (c === void 0)
4626
+ const l = Xo(r, d);
4627
+ if (l === void 0)
4620
4628
  return !0;
4621
- if (a.push(c), r.hasNonLuminaJsxImport)
4629
+ if (a.push(l), r.hasNonLuminaJsxImport)
4622
4630
  return !1;
4623
4631
  } else
4624
4632
  a.push(q(r, void 0, d));
4625
4633
  return !0;
4626
4634
  }), r.hasNonLuminaJsxImport)
4627
4635
  return e.statements;
4628
- if (r.neededImports.size > 0 && (a = a.map(Wo, r), r.existingLitImports.size > 0))
4636
+ if (r.neededImports.size > 0 && (a = a.map(Qo, r), r.existingLitImports.size > 0))
4629
4637
  throw new Error(
4630
4638
  `Expected context.existingLitImports to be empty by now. Found: ${Array.from(r.existingLitImports).join(", ")}`
4631
4639
  );
4632
- const l = [zo, Ho, qo].flatMap(
4640
+ const c = [ea, ta, ia].flatMap(
4633
4641
  (d) => d(r)
4634
4642
  );
4635
4643
  if (r.neededImports.size > 0)
4636
4644
  throw new Error(
4637
4645
  `Expected context.neededLitImports to be empty by now. Found: ${Array.from(r.neededImports).join(", ")}`
4638
4646
  );
4639
- return [...l, ...a];
4647
+ return [...c, ...a];
4640
4648
  };
4641
- function Go(e) {
4642
- return Xo(e), Object.fromEntries(
4643
- dr.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])
4644
4652
  );
4645
4653
  }
4646
- function Xo(e) {
4654
+ function na(e) {
4647
4655
  if (!("identifiers" in e))
4648
4656
  throw new Error(
4649
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."
4650
4658
  );
4651
4659
  }
4652
- const Vt = "customElement", Yo = (e, t) => {
4660
+ const Zt = "customElement", oa = (e, t) => {
4653
4661
  const i = [];
4654
4662
  if (t.apiModule?.declarations.forEach((r) => {
4655
4663
  const a = r;
4656
4664
  a.customElement !== void 0 && i.push(
4657
4665
  o.factory.createExpressionStatement(
4658
- o.factory.createCallExpression(o.factory.createIdentifier(Vt), void 0, [
4666
+ o.factory.createCallExpression(o.factory.createIdentifier(Zt), void 0, [
4659
4667
  o.factory.createStringLiteral(a.tagName ?? ""),
4660
4668
  o.factory.createIdentifier(a.name)
4661
4669
  ])
@@ -4670,16 +4678,16 @@ const Vt = "customElement", Yo = (e, t) => {
4670
4678
  return [o.factory.createImportDeclaration(
4671
4679
  void 0,
4672
4680
  o.factory.createImportClause(
4673
- !1,
4681
+ void 0,
4674
4682
  void 0,
4675
4683
  o.factory.createNamedImports([
4676
- o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(Vt))
4684
+ o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(Zt))
4677
4685
  ])
4678
4686
  ),
4679
4687
  o.factory.createStringLiteral(s)
4680
4688
  ), ...e.statements, ...i];
4681
4689
  };
4682
- function Qo(e, t, i) {
4690
+ function aa(e, t, i) {
4683
4691
  return t.size === 0 ? e : [
4684
4692
  o.factory.createPropertyDeclaration(
4685
4693
  [
@@ -4693,8 +4701,8 @@ function Qo(e, t, i) {
4693
4701
  Array.from(
4694
4702
  t.entries(),
4695
4703
  ([s, n]) => o.factory.createPropertyAssignment(
4696
- oi(s) ? o.factory.createStringLiteral(s) : s,
4697
- Zo(n, i)
4704
+ di(s) ? o.factory.createStringLiteral(s) : s,
4705
+ ca(n, i)
4698
4706
  )
4699
4707
  )
4700
4708
  )
@@ -4702,7 +4710,7 @@ function Qo(e, t, i) {
4702
4710
  ...e
4703
4711
  ];
4704
4712
  }
4705
- function Zo(e, t) {
4713
+ function ca(e, t) {
4706
4714
  let i = 0, s = !0;
4707
4715
  const n = [], r = [];
4708
4716
  for (const d of e.properties)
@@ -4710,32 +4718,32 @@ function Zo(e, t) {
4710
4718
  function a(d) {
4711
4719
  if (!o.isPropertyAssignment(d) || !o.isIdentifier(d.name))
4712
4720
  return !0;
4713
- const c = d.name.text, p = d.initializer, m = p.kind === o.SyntaxKind.TrueKeyword, f = p.kind === o.SyntaxKind.FalseKeyword;
4714
- if (c === "attribute")
4715
- return s = !1, i |= m ? St : 0, !m && !f;
4716
- if (c === "reflect")
4717
- return i |= m ? Es : 0, !1;
4718
- if (c === "type" && o.isIdentifier(p)) {
4721
+ const l = d.name.text, p = d.initializer, m = p.kind === o.SyntaxKind.TrueKeyword, f = p.kind === o.SyntaxKind.FalseKeyword;
4722
+ if (l === "attribute")
4723
+ return s = !1, i |= m ? Tt : 0, !m && !f;
4724
+ if (l === "reflect")
4725
+ return i |= m ? Is : 0, !1;
4726
+ if (l === "type" && o.isIdentifier(p)) {
4719
4727
  if (p.text === "Boolean")
4720
- return i |= Ts, !1;
4728
+ return i |= xs, !1;
4721
4729
  if (p.text === "Number")
4722
- return i |= $s, !1;
4730
+ return i |= As, !1;
4723
4731
  } else {
4724
- if (c === "state")
4725
- return s = !1, i |= m ? Ps : 0, !1;
4726
- if (c === "readOnly")
4727
- return i |= m ? ks : 0, !1;
4728
- if (c === "noAccessor")
4729
- return i |= m ? Is : 0, !1;
4730
- if (c === "useDefault")
4731
- return i |= m ? xs : 0, !1;
4732
+ if (l === "state")
4733
+ return s = !1, i |= m ? Ls : 0, !1;
4734
+ if (l === "readOnly")
4735
+ return i |= m ? Ns : 0, !1;
4736
+ if (l === "noAccessor")
4737
+ return i |= m ? js : 0, !1;
4738
+ if (l === "useDefault")
4739
+ return i |= m ? Fs : 0, !1;
4732
4740
  }
4733
4741
  return !0;
4734
4742
  }
4735
- s && (i |= St);
4736
- const l = o.factory.createNumericLiteral(i);
4737
- return n.length === 0 && (t || r.length === 0) ? l : o.factory.createArrayLiteralExpression([
4738
- l,
4743
+ s && (i |= Tt);
4744
+ const c = o.factory.createNumericLiteral(i);
4745
+ return n.length === 0 && (t || r.length === 0) ? c : o.factory.createArrayLiteralExpression([
4746
+ c,
4739
4747
  o.factory.createObjectLiteralExpression(n),
4740
4748
  /**
4741
4749
  * In dev mode, to improve readability for non-source-map developers,
@@ -4747,7 +4755,7 @@ function Zo(e, t) {
4747
4755
  ...t ? [] : [o.factory.createObjectLiteralExpression(r)]
4748
4756
  ]);
4749
4757
  }
4750
- function ea(e, t, i) {
4758
+ function la(e, t, i) {
4751
4759
  let s = -1, n = -1, r = -1;
4752
4760
  e.options?.properties.forEach((p, m) => {
4753
4761
  if (o.isSpreadAssignment(p))
@@ -4759,23 +4767,23 @@ function ea(e, t, i) {
4759
4767
  f === "type" ? s = m : f === "attribute" ? n = m : f === "readOnly" && (r = m);
4760
4768
  }
4761
4769
  });
4762
- const a = i.attribute === void 0 && n === -1, l = i.readonly === !0 && i.docsOnlyReadonly !== !0 && r === -1, d = ta(e, i, s), c = [
4770
+ const a = i.attribute === void 0 && n === -1, c = i.readonly === !0 && i.docsOnlyReadonly !== !0 && r === -1, d = da(e, i, s), l = [
4763
4771
  ...a ? [o.factory.createPropertyAssignment("attribute", o.factory.createFalse())] : [],
4764
- ...l ? [o.factory.createPropertyAssignment("readOnly", o.factory.createTrue())] : [],
4772
+ ...c ? [o.factory.createPropertyAssignment("readOnly", o.factory.createTrue())] : [],
4765
4773
  ...d !== void 0 ? [d] : []
4766
4774
  ];
4767
- return c.length > 0 ? e.options === void 0 ? o.factory.createObjectLiteralExpression(c, !1) : o.factory.updateObjectLiteralExpression(e.options, [...e.options.properties, ...c]) : e.options;
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;
4768
4776
  }
4769
- function ta(e, t, i) {
4777
+ function da(e, t, i) {
4770
4778
  if (t.attribute === void 0)
4771
4779
  return;
4772
- const s = ia(t.type.values);
4780
+ const s = pa(t.type.values);
4773
4781
  return s === "Other" || t.readonly === !0 && (s !== "Boolean" || t.reflects === void 0) || e.options?.properties[i] !== void 0 ? void 0 : o.factory.createPropertyAssignment(
4774
4782
  o.factory.createIdentifier("type"),
4775
4783
  o.factory.createIdentifier(s)
4776
4784
  );
4777
4785
  }
4778
- function ia(e) {
4786
+ function pa(e) {
4779
4787
  let t = !1, i = !1, s = !1;
4780
4788
  if (e?.forEach((n) => {
4781
4789
  t ||= n.type === "number", i ||= n.type === "boolean", s ||= n.type === "string" || n.type === "any" || n.type === "unknown";
@@ -4787,52 +4795,52 @@ function ia(e) {
4787
4795
  }
4788
4796
  return "Other";
4789
4797
  }
4790
- function sa(e, t, i, s, n, r) {
4798
+ function ua(e, t, i, s, n, r) {
4791
4799
  if (i.modifiers === void 0)
4792
4800
  return i;
4793
- let a = -1, l = -1;
4794
- if (i.modifiers.forEach((d, c) => {
4801
+ let a = -1, c = -1;
4802
+ if (i.modifiers.forEach((d, l) => {
4795
4803
  if (o.isDecorator(d) && o.isCallExpression(d.expression) && o.isIdentifier(d.expression.expression)) {
4796
4804
  const p = d.expression.expression.text;
4797
- p === "property" && (a = c), p === "state" && (l = c);
4805
+ p === "property" && (a = l), p === "state" && (c = l);
4798
4806
  }
4799
4807
  }), a !== -1) {
4800
- const d = ra(e, t, i, s, n), c = Gt(i, a, n), p = ea(c, n, d);
4801
- return r.set(d.name, p ?? o.factory.createObjectLiteralExpression()), c.options = p, Xt(i, a);
4802
- } else if (l !== -1) {
4803
- const d = Gt(i, l, n), c = o.factory.createPropertyAssignment("state", o.factory.createTrue()), p = d.options === void 0 ? o.factory.createObjectLiteralExpression([c]) : o.factory.updateObjectLiteralExpression(d.options, [...d.options.properties, c]), m = ai(i.name);
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);
4810
+ } else if (c !== -1) {
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);
4804
4812
  if (m === void 0)
4805
4813
  throw new Error("Failed to statically determine the state property name");
4806
- return r.set(m, p), Xt(i, l);
4814
+ return r.set(m, p), ti(i, c);
4807
4815
  } else
4808
4816
  return i;
4809
4817
  }
4810
- function ra(e, t, i, s, n) {
4818
+ function ma(e, t, i, s, n) {
4811
4819
  const r = t ?? (e.compiler.isInTest ? {
4812
4820
  members: []
4813
4821
  } : void 0);
4814
4822
  if (r === void 0)
4815
4823
  throw Error(`Failed to find API component for ${s} in ${n.fileName}`);
4816
- const a = ai(i.name);
4817
- let l;
4824
+ const a = pi(i.name);
4825
+ let c;
4818
4826
  for (let d = 0; d < r.members.length; ++d) {
4819
- const c = r.members[d];
4820
- c.name === a && c.kind === "field" && (l = c);
4827
+ const l = r.members[d];
4828
+ l.name === a && l.kind === "field" && (c = l);
4821
4829
  }
4822
- if (l ??= e.compiler.isInTest ? { kind: "field", attribute: "", name: "", type: { text: "" } } : void 0, l === void 0)
4830
+ if (c ??= e.compiler.isInTest ? { kind: "field", attribute: "", name: "", type: { text: "" } } : void 0, c === void 0)
4823
4831
  throw Error(
4824
4832
  `Failed to find API property for ${i.getText(n)} in ${s} in ${n.fileName}`
4825
4833
  );
4826
- if (l.name === "") {
4834
+ if (c.name === "") {
4827
4835
  if (a === void 0)
4828
4836
  throw Error(
4829
4837
  `Failed to statically determine the property name: ${i.getText(n)} in ${s} in ${n.fileName}`
4830
4838
  );
4831
- l.name = a, l.attribute ??= ei(a);
4839
+ c.name = a, c.attribute ??= ni(a);
4832
4840
  }
4833
- return l;
4841
+ return c;
4834
4842
  }
4835
- function Gt(e, t, i) {
4843
+ function ei(e, t, i) {
4836
4844
  const s = e.modifiers[t], n = s.expression, r = n.arguments.at(0);
4837
4845
  if (r && !o.isObjectLiteralExpression(r))
4838
4846
  throw new Error(
@@ -4840,7 +4848,7 @@ function Gt(e, t, i) {
4840
4848
  );
4841
4849
  return { decorator: s, callExpression: n, options: r };
4842
4850
  }
4843
- function Xt(e, t) {
4851
+ function ti(e, t) {
4844
4852
  const i = [
4845
4853
  ...e.modifiers.slice(0, t),
4846
4854
  ...e.modifiers.slice(t + 1)
@@ -4867,13 +4875,13 @@ function Xt(e, t) {
4867
4875
  e.initializer
4868
4876
  );
4869
4877
  }
4870
- function na(e, t, i, s) {
4878
+ function fa(e, t, i, s) {
4871
4879
  let n;
4872
4880
  if (e.apiJsonEnabled)
4873
4881
  for (let d = 0; d < e.privateApiJson.modules.length; ++d) {
4874
- const c = e.privateApiJson.modules[d];
4875
- if (c.sourcePath === i.fileName.slice(e.dir.root.length)) {
4876
- n = c;
4882
+ const l = e.privateApiJson.modules[d];
4883
+ if (l.sourcePath === i.fileName.slice(e.dir.root.length)) {
4884
+ n = l;
4877
4885
  break;
4878
4886
  }
4879
4887
  }
@@ -4882,17 +4890,17 @@ function na(e, t, i, s) {
4882
4890
  apiModule: n,
4883
4891
  transformation: t
4884
4892
  }, a = i.statements;
4885
- let l = a;
4893
+ let c = a;
4886
4894
  try {
4887
4895
  s.forEach((d) => {
4888
4896
  i.statements = d(i, r);
4889
4897
  });
4890
4898
  } finally {
4891
- l = i.statements, i.statements = a;
4899
+ c = i.statements, i.statements = a;
4892
4900
  }
4893
- return oa(i, l);
4901
+ return ga(i, c);
4894
4902
  }
4895
- const oa = (e, t) => o.factory.updateSourceFile(
4903
+ const ga = (e, t) => o.factory.updateSourceFile(
4896
4904
  e,
4897
4905
  t,
4898
4906
  /*
@@ -4904,19 +4912,19 @@ const oa = (e, t) => o.factory.updateSourceFile(
4904
4912
  e.isDeclarationFile,
4905
4913
  e.referencedFiles,
4906
4914
  e.typeReferenceDirectives,
4907
- e.hasNoDefaultLib,
4915
+ !1,
4908
4916
  e.libReferenceDirectives
4909
4917
  );
4910
- function aa(e, t) {
4918
+ function ha(e, t) {
4911
4919
  t.compiler.viteCommand === "build" && ("emitNode" in e && (e.emitNode ??= {}), o.setEmitFlags(e, o.EmitFlags.NoComments));
4912
4920
  }
4913
- const ca = (e, t) => {
4921
+ const ya = (e, t) => {
4914
4922
  let i;
4915
4923
  if (t.apiModule !== void 0)
4916
4924
  for (let d = 0; d < t.apiModule.declarations.length; ++d) {
4917
- const c = t.apiModule.declarations[d];
4918
- if (c.customElement === !0) {
4919
- i = c;
4925
+ const l = t.apiModule.declarations[d];
4926
+ if (l.customElement === !0) {
4927
+ i = l;
4920
4928
  break;
4921
4929
  }
4922
4930
  }
@@ -4926,25 +4934,25 @@ const ca = (e, t) => {
4926
4934
  function n() {
4927
4935
  s = /* @__PURE__ */ new Map();
4928
4936
  }
4929
- const r = (d) => Qo(d, s, t.compiler.shouldMinify);
4930
- function a(d, c) {
4931
- const p = da(t, i, d, c, e, s);
4932
- return aa(p, t), p;
4937
+ const r = (d) => aa(d, s, t.compiler.shouldMinify);
4938
+ function a(d, l) {
4939
+ const p = ba(t, i, d, l, e, s);
4940
+ return ha(p, t), p;
4933
4941
  }
4934
4942
  return e.statements.map(
4935
- (d) => fs(a, d, t, n, r)
4943
+ (d) => bs(a, d, t, n, r)
4936
4944
  );
4937
4945
  };
4938
- function fs(e, t, i, s, n = ci) {
4946
+ function bs(e, t, i, s, n = ui) {
4939
4947
  if (o.isClassDeclaration(t) && // Ignore classes that don't extend anything - those are definitely not components
4940
4948
  t.heritageClauses?.some((r) => r.token === o.SyntaxKind.ExtendsKeyword)) {
4941
4949
  let r = !1;
4942
4950
  const a = t.name?.text;
4943
4951
  s?.();
4944
- const l = n(
4945
- t.members.map((c) => {
4946
- const p = e(c, a);
4947
- return r ||= p !== c, p;
4952
+ const c = n(
4953
+ t.members.map((l) => {
4954
+ const p = e(l, a);
4955
+ return r ||= p !== l, p;
4948
4956
  })
4949
4957
  );
4950
4958
  return r ? o.factory.updateClassDeclaration(
@@ -4953,20 +4961,20 @@ function fs(e, t, i, s, n = ci) {
4953
4961
  t.name,
4954
4962
  t.typeParameters,
4955
4963
  t.heritageClauses,
4956
- l
4964
+ c
4957
4965
  ) : t;
4958
4966
  } else
4959
4967
  return i.compiler.isInTest ? o.visitEachChild(
4960
4968
  t,
4961
- (a) => fs(e, a, i, s, n),
4969
+ (a) => bs(e, a, i, s, n),
4962
4970
  i.transformation
4963
4971
  ) : t;
4964
4972
  }
4965
- const la = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4966
- function da(e, t, i, s, n, r) {
4973
+ const va = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4974
+ function ba(e, t, i, s, n, r) {
4967
4975
  if (o.isMethodDeclaration(i)) {
4968
4976
  const a = i.modifiers?.filter(
4969
- (l) => !o.isDecorator(l) || !pa(l)
4977
+ (c) => !o.isDecorator(c) || !wa(c)
4970
4978
  );
4971
4979
  if (a?.length !== i.modifiers?.length)
4972
4980
  return o.factory.updateMethodDeclaration(
@@ -4980,10 +4988,10 @@ function da(e, t, i, s, n, r) {
4980
4988
  i.type,
4981
4989
  i.body
4982
4990
  );
4983
- if ("text" in i.name && la.has(i.name.text) && i.body) {
4984
- const l = i.name.text;
4991
+ if ("text" in i.name && va.has(i.name.text) && i.body) {
4992
+ const c = i.name.text;
4985
4993
  return i.body.statements.some(
4986
- (c) => o.isExpressionStatement(c) && o.isCallExpression(c.expression) && o.isPropertyAccessExpression(c.expression.expression) && c.expression.expression.expression.kind === o.SyntaxKind.SuperKeyword && c.expression.expression.name.text === l
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
4987
4995
  ) ? i : o.factory.updateMethodDeclaration(
4988
4996
  i,
4989
4997
  i.modifiers,
@@ -4996,7 +5004,7 @@ function da(e, t, i, s, n, r) {
4996
5004
  o.factory.updateBlock(i.body, [
4997
5005
  o.factory.createExpressionStatement(
4998
5006
  o.factory.createCallExpression(
4999
- o.factory.createPropertyAccessExpression(o.factory.createSuper(), l),
5007
+ o.factory.createPropertyAccessExpression(o.factory.createSuper(), c),
5000
5008
  void 0,
5001
5009
  []
5002
5010
  )
@@ -5006,14 +5014,14 @@ function da(e, t, i, s, n, r) {
5006
5014
  );
5007
5015
  }
5008
5016
  }
5009
- return o.isPropertyDeclaration(i) || o.isAccessor(i) ? sa(e, t, i, s, n, r) : i;
5010
- }
5011
- const pa = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", ua = [
5012
- Vo,
5013
- Yo,
5014
- ca
5015
- ], ma = "@arcgis/lumina:transformComponents", fa = (e) => ({
5016
- name: ma,
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,
5017
5025
  transform: {
5018
5026
  // Transform JSX to lit-html first so that vite:esbuild doesn't transform JSX to h().
5019
5027
  // Also, we need to run on the original fs file, before other transforms so
@@ -5030,112 +5038,112 @@ const pa = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expressio
5030
5038
  await Promise.all(
5031
5039
  // False alarm because of |undefined.
5032
5040
  // eslint-disable-next-line @typescript-eslint/await-thenable
5033
- e.apiJsonDeferred === void 0 ? [re] : [re, e.apiJsonDeferred.promise]
5041
+ e.apiJsonDeferred === void 0 ? [ne] : [ne, e.apiJsonDeferred.promise]
5034
5042
  );
5035
5043
  const n = e.getSourceFile(i, t), a = o.transform(n, [
5036
- (f) => () => na(e, f, n, [
5044
+ (f) => () => fa(e, f, n, [
5037
5045
  ...e.options.types?.sourceFileTransformers ?? [],
5038
- ...ua
5046
+ ...Sa
5039
5047
  ])
5040
- ]).transformed[0], l = e._typeScriptPrinter, d = e.viteConfig.build.sourcemap === !1 ? void 0 : Ct.createSourceMapGenerator(ga, u.basename(i), "", u.dirname(i), {}), c = Ct.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(`
5041
5049
  `);
5042
- l.writeFile(a, c, d);
5043
- const p = c.getText(), m = d?.toJSON();
5050
+ c.writeFile(a, l, d);
5051
+ const p = l.getText(), m = d?.toJSON();
5044
5052
  return {
5045
5053
  code: p,
5046
5054
  map: m ?? null
5047
5055
  };
5048
5056
  }
5049
5057
  }
5050
- }), ga = {
5058
+ }), Ta = {
5051
5059
  getCurrentDirectory: o.sys.getCurrentDirectory,
5052
- getCanonicalFileName: o.sys.useCaseSensitiveFileNames ? ci : (e) => e.toLowerCase()
5053
- }, ha = (e) => ({
5060
+ getCanonicalFileName: o.sys.useCaseSensitiveFileNames ? ui : (e) => e.toLowerCase()
5061
+ }, $a = (e) => ({
5054
5062
  name: "@arcgis/lumina:handleDynamicAssets",
5055
5063
  configureServer(t) {
5056
- e.server = t, Yt(e).forEach(({ assets: i, transformers: s }) => te(e, i, s));
5064
+ e.server = t, ii(e).forEach(({ assets: i, transformers: s }) => ie(e, i, s));
5057
5065
  },
5058
5066
  async writeBundle() {
5059
5067
  await Promise.all(
5060
- Yt(e).map(
5061
- async ({ assets: t, transformers: i }) => await xi(e, t, i)
5068
+ ii(e).map(
5069
+ async ({ assets: t, transformers: i }) => await Di(e, t, i)
5062
5070
  )
5063
5071
  );
5064
5072
  }
5065
5073
  });
5066
- function Yt(e) {
5074
+ function ii(e) {
5067
5075
  const t = [], i = e.assetsToProvide?.filter((s) => s.apply === void 0 || s.apply === e.viteCommand) ?? [];
5068
5076
  return e.options.assets?.extra?.forEach((s) => {
5069
5077
  "type" in s ? t.push(s) : "assets" in s && t.push(...s.assets);
5070
5078
  }), t.length > 0 && i.push({ assets: t }), e.isInBuildWatch || (e.assetsToProvide = void 0), i;
5071
5079
  }
5072
- const nt = "@arcgis/lumina:updatePackageJson", ya = (e) => ({
5073
- name: nt,
5080
+ const ot = "@arcgis/lumina:updatePackageJson", Pa = (e) => ({
5081
+ name: ot,
5074
5082
  apply: () => e.viteCommand === "serve" && e.environment === "development" && !e.isInTest && !e.isInCi,
5075
5083
  configResolved() {
5076
- va(e).catch(
5077
- (t) => T.error(nt, `Failed to update package's package.json:${String(t)}`)
5084
+ ka(e).catch(
5085
+ (t) => T.error(ot, `Failed to update package's package.json:${String(t)}`)
5078
5086
  );
5079
5087
  }
5080
5088
  });
5081
- async function va(e) {
5082
- const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await z(t, "utf-8")), s = ba(i, e);
5083
- s && ni(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));
5084
5092
  }
5085
- function ba(e, t) {
5093
+ function Ia(e, t) {
5086
5094
  const i = e?.devDependencies ?? {};
5087
- Object.keys(e?.peerDependencies ?? {}).forEach((c) => {
5088
- c in i || T.warn(
5089
- nt,
5090
- `Every peerDependency should also be a devDependency, or else some tools will get confused (like Turbo Build). Found "${c}" that is not a devDependency. Please edit your package.json`
5095
+ Object.keys(e?.peerDependencies ?? {}).forEach((l) => {
5096
+ l in i || T.warn(
5097
+ ot,
5098
+ `Every peerDependency should also be a devDependency, or else some tools will get confused (like Turbo Build). Found "${l}" that is not a devDependency. Please edit your package.json`
5091
5099
  );
5092
5100
  });
5093
5101
  let s = !1;
5094
- const n = (c) => u.relative(t.dir.root, u.join(t.dir.dist, c)), r = t._documentationFileNames;
5102
+ const n = (l) => u.relative(t.dir.root, u.join(t.dir.dist, l)), r = t._documentationFileNames;
5095
5103
  if (r.vsCodeCss !== void 0) {
5096
- const c = e["css.customData"] ?? [], p = n(r.vsCodeCss);
5097
- c.includes(p) || (e["css.customData"] = [...c, p], s = !0);
5104
+ const l = e["css.customData"] ?? [], p = n(r.vsCodeCss);
5105
+ l.includes(p) || (e["css.customData"] = [...l, p], s = !0);
5098
5106
  }
5099
5107
  if (r.apiJson !== void 0) {
5100
- const c = n(r.apiJson);
5101
- e.customElements !== c && (e.customElements = c, s = !0);
5108
+ const l = n(r.apiJson);
5109
+ e.customElements !== l && (e.customElements = l, s = !0);
5102
5110
  }
5103
5111
  if (r.vsCodeHtml !== void 0) {
5104
- const c = e["html.customData"] ?? [], p = n(r.vsCodeHtml);
5105
- c.includes(p) || (e["html.customData"] = [...c, p], s = !0);
5112
+ const l = e["html.customData"] ?? [], p = n(r.vsCodeHtml);
5113
+ l.includes(p) || (e["html.customData"] = [...l, p], s = !0);
5106
5114
  }
5107
5115
  if (r.webTypes !== void 0) {
5108
- const c = n(r.webTypes);
5109
- e["web-types"] !== c && (s = !0, e["web-types"] = c);
5116
+ const l = n(r.webTypes);
5117
+ e["web-types"] !== l && (s = !0, e["web-types"] = l);
5110
5118
  }
5111
- const a = `./${Z}.css`, l = t.options.build?.cdn?.namespace !== void 0, d = he(
5119
+ const a = `./${Z}.css`, c = t.options.build?.cdn?.namespace !== void 0, d = he(
5112
5120
  t.dir.root,
5113
5121
  u.join(t.dir.distCdn, a)
5114
5122
  );
5115
- if (!l) {
5123
+ if (!c) {
5116
5124
  e.exports?.[a] !== d && (e.exports ??= {}, e.exports[a] = d, s = !0);
5117
- const c = e.name.split("/").length > 1 ? e.name.split("/")[1] : e.name;
5125
+ const l = e.name.split("/").length > 1 ? e.name.split("/")[1] : e.name;
5118
5126
  for (const p of Object.keys(e.exports))
5119
- p.endsWith(`${c}.css`) && e.exports[p] !== d && (e.exports[p] = d, s = !0);
5127
+ p.endsWith(`${l}.css`) && e.exports[p] !== d && (e.exports[p] = d, s = !0);
5120
5128
  }
5121
5129
  if (s)
5122
5130
  return e;
5123
5131
  }
5124
- const wa = (e) => ({
5132
+ const xa = (e) => ({
5125
5133
  deprecation: "docs.json is deprecated and will be removed in a future release. Use api.json instead",
5126
5134
  timestamp: e.apiJson.timestamp,
5127
5135
  compiler: e.apiJson.compiler,
5128
- components: Sa(e),
5136
+ components: Aa(e),
5129
5137
  typeLibrary: {}
5130
5138
  });
5131
- function Sa(e) {
5139
+ function Aa(e) {
5132
5140
  const t = [];
5133
5141
  for (const i of e.apiJson.modules)
5134
5142
  for (const s of i.declarations)
5135
- s.customElement === !0 && t.push(Ca(s, i.sourcePath));
5143
+ s.customElement === !0 && t.push(La(s, i.sourcePath));
5136
5144
  return t;
5137
5145
  }
5138
- function Ca(e, t) {
5146
+ function La(e, t) {
5139
5147
  const i = e.superclass ? [{ name: "superclass", text: JSON.stringify(e.superclass) }] : [];
5140
5148
  return {
5141
5149
  filePath: t,
@@ -5150,9 +5158,9 @@ function Ca(e, t) {
5150
5158
  dependencies: [],
5151
5159
  dependencyGraph: {},
5152
5160
  deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated,
5153
- props: e.members.map(Ea).filter(R),
5154
- methods: e.members.map(Ta).filter(R),
5155
- events: e.events?.map($a) ?? [],
5161
+ props: e.members.map(Na).filter(D),
5162
+ methods: e.members.map(ja).filter(D),
5163
+ events: e.events?.map(Fa) ?? [],
5156
5164
  styles: e.cssProperties?.map(({ name: s, description: n, deprecated: r }) => ({
5157
5165
  name: s,
5158
5166
  annotation: "prop",
@@ -5177,7 +5185,7 @@ function Ve(e, t = "") {
5177
5185
  }
5178
5186
  return t;
5179
5187
  }
5180
- function Ea(e) {
5188
+ function Na(e) {
5181
5189
  if (e.kind !== "field")
5182
5190
  return;
5183
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;
@@ -5187,7 +5195,7 @@ function Ea(e) {
5187
5195
  complexType: t.type === void 0 ? void 0 : {
5188
5196
  original: t.type.text,
5189
5197
  resolved: t.type.text,
5190
- references: yt(t.type.references)
5198
+ references: wt(t.type.references)
5191
5199
  },
5192
5200
  mutable: !0,
5193
5201
  attr: "attribute" in t && typeof t.attribute == "string" ? t.attribute : void 0,
@@ -5206,19 +5214,19 @@ function Ea(e) {
5206
5214
  required: n
5207
5215
  };
5208
5216
  }
5209
- const yt = (e) => Object.fromEntries(
5217
+ const wt = (e) => Object.fromEntries(
5210
5218
  e?.map(
5211
5219
  (t) => [
5212
5220
  t.name,
5213
5221
  {
5214
- location: t.package === Ls ? "global" : t.package === void 0 ? "local" : "import",
5222
+ location: t.package === Rs ? "global" : t.package === void 0 ? "local" : "import",
5215
5223
  path: typeof t.module == "string" && typeof t.package == "string" ? u.join(t.package, t.module) : t.module ?? t.package,
5216
5224
  id: "notImplemented"
5217
5225
  }
5218
5226
  ]
5219
5227
  ) ?? []
5220
5228
  );
5221
- function Ta(e) {
5229
+ function ja(e) {
5222
5230
  if (e.kind !== "method")
5223
5231
  return;
5224
5232
  const t = e, i = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [], s = t.parameters?.map(({ name: n, type: r, description: a }) => ({
@@ -5237,7 +5245,7 @@ function Ta(e) {
5237
5245
  signature: t.signature ?? "()=>unknown",
5238
5246
  parameters: s,
5239
5247
  return: t.return?.type?.text ?? "void",
5240
- references: yt([
5248
+ references: wt([
5241
5249
  ...t.return?.type?.references ?? [],
5242
5250
  ...t.parameters?.flatMap((n) => n.type.references ?? []) ?? []
5243
5251
  ])
@@ -5249,7 +5257,7 @@ function Ta(e) {
5249
5257
  deprecation: typeof t.deprecated == "boolean" ? t.deprecated ? "" : void 0 : t.deprecated
5250
5258
  };
5251
5259
  }
5252
- function $a(e) {
5260
+ function Fa(e) {
5253
5261
  const t = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [];
5254
5262
  return {
5255
5263
  event: e.name,
@@ -5258,7 +5266,7 @@ function $a(e) {
5258
5266
  complexType: {
5259
5267
  original: e.type.text,
5260
5268
  resolved: e.type.text,
5261
- references: yt(e.type.references)
5269
+ references: wt(e.type.references)
5262
5270
  },
5263
5271
  cancelable: e.cancelable ?? !0,
5264
5272
  composed: e.composed ?? !0,
@@ -5274,8 +5282,8 @@ const ye = {
5274
5282
  cssParts: "CSS Parts",
5275
5283
  methods: "Methods"
5276
5284
  };
5277
- function gs(e) {
5278
- const t = Pa(e.slots), i = ka(e.events), s = Ia(e.cssProperties), n = xa(e.cssParts), r = Aa(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();
5279
5287
  return [...a ? [`${a}
5280
5288
  --`] : [], i, r, t, s, n].filter(Boolean).join(`
5281
5289
 
@@ -5283,28 +5291,28 @@ function gs(e) {
5283
5291
  }
5284
5292
  const ve = (e, t) => t === void 0 || t.length === 0 ? "" : `### ${e}
5285
5293
  ${t.join(`
5286
- `)}`, Pa = (e) => ve(
5294
+ `)}`, Da = (e) => ve(
5287
5295
  ye.slots,
5288
5296
  e?.filter((t) => t.deprecated === void 0).map(
5289
5297
  (t) => `- ${t.name ? `**${t.name}**` : "_default_"}${t.description === void 0 ? "" : ` - ${t.description}`}`
5290
5298
  )
5291
- ), ka = (e) => ve(
5299
+ ), Ra = (e) => ve(
5292
5300
  ye.events,
5293
5301
  e?.filter((t) => t.deprecated === void 0).map((t) => `- **${t.name}**${t.description === void 0 ? "" : ` - ${t.description}`}`)
5294
- ), Ia = (e = []) => ve(
5302
+ ), Oa = (e = []) => ve(
5295
5303
  ye.cssProperties,
5296
5304
  e?.filter((t) => t.deprecated === void 0).map(
5297
5305
  (t) => `- **${t.name}**${t.description === void 0 ? "" : ` - ${t.description}`} ${t.default ? `_(default: ${t.default})_}` : ""}`
5298
5306
  )
5299
- ), xa = (e) => ve(
5307
+ ), Ma = (e) => ve(
5300
5308
  ye.cssParts,
5301
5309
  e?.filter((t) => t.deprecated === void 0).map((t) => `- **${t.name}**${t.description === void 0 ? "" : ` - ${t.description}`}`)
5302
- ), Aa = (e) => ve(
5310
+ ), Ja = (e) => ve(
5303
5311
  ye.methods,
5304
- e.filter(Ns).filter((t) => t.deprecated === void 0).map(
5312
+ e.filter(Os).filter((t) => t.deprecated === void 0).map(
5305
5313
  (t) => `- \`${t.name}${t.signature}\`${t.description ? ` - ${t.description}` : ""}`
5306
5314
  )
5307
- ), hs = (e) => {
5315
+ ), Ss = (e) => {
5308
5316
  const t = [], i = /* @__PURE__ */ new Set();
5309
5317
  for (let s = 0; s < e.length; ++s) {
5310
5318
  const n = e[s].cssProperties;
@@ -5318,13 +5326,13 @@ ${t.join(`
5318
5326
  }
5319
5327
  }
5320
5328
  return t;
5321
- }, ys = (e) => e.flatMap(
5329
+ }, Cs = (e) => e.flatMap(
5322
5330
  (t) => t.cssParts?.filter((i) => i.deprecated === void 0).map((i) => ({
5323
5331
  name: `::part(${i.name})`,
5324
5332
  description: t.tagName + (i.description === void 0 ? "" : `: ${i.description}`)
5325
5333
  })) ?? []
5326
5334
  );
5327
- function La(e) {
5335
+ function Ba(e) {
5328
5336
  if (e.attributes === void 0)
5329
5337
  return [];
5330
5338
  const t = [];
@@ -5335,7 +5343,7 @@ function La(e) {
5335
5343
  description: s.description || void 0,
5336
5344
  default: s.default,
5337
5345
  value: {
5338
- type: Na(
5346
+ type: Ka(
5339
5347
  s.type.values?.map(
5340
5348
  (n) => n.type === "string" && n.value !== void 0 ? `"${n.value}"` : n.value ?? n.type
5341
5349
  )
@@ -5345,13 +5353,13 @@ function La(e) {
5345
5353
  }
5346
5354
  return t;
5347
5355
  }
5348
- const Na = (e) => e?.length === 1 ? e[0] : e;
5349
- function ja(e, t) {
5350
- const i = Fa(e), s = hs(e), n = ys(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();
5351
5359
  return {
5352
5360
  $schema: "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
5353
5361
  name: r.name,
5354
- version: r.version,
5362
+ version: mt(r) ?? r.version,
5355
5363
  "description-markup": "markdown",
5356
5364
  "default-icon": t.defaultIcon,
5357
5365
  contributions: {
@@ -5365,113 +5373,116 @@ function ja(e, t) {
5365
5373
  }
5366
5374
  };
5367
5375
  }
5368
- const Fa = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5376
+ const Wa = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5369
5377
  name: t.tagName,
5370
- description: gs(t),
5378
+ description: ws(t),
5371
5379
  "doc-url": t.demos?.[0]?.url,
5372
- attributes: La(t),
5380
+ attributes: Ba(t),
5373
5381
  slots: t.slots?.map((i) => ({
5374
5382
  name: i.name,
5375
5383
  description: i.description
5376
5384
  })),
5377
5385
  // REFACTOR: this was deprecated in the spec: https://github.com/JetBrains/web-types/blob/11e46e47cb65edc1930dc1fae854005ad45ac08f/schema/web-types.json#L866
5378
- events: Qt(t),
5386
+ events: si(t),
5379
5387
  js: {
5380
- properties: Ra(t),
5381
- events: Qt(t)
5388
+ properties: Ua(t),
5389
+ events: si(t)
5382
5390
  }
5383
- })), Ra = (e) => e.members.filter(js).filter((t) => t.deprecated === void 0).map((t) => ({
5391
+ })), Ua = (e) => e.members.filter(Ms).filter((t) => t.deprecated === void 0).map((t) => ({
5384
5392
  name: t.name,
5385
5393
  description: t.description,
5386
5394
  type: t.type?.text
5387
- })) ?? [], Qt = (e) => e.events?.filter((t) => t.deprecated === void 0).map((t) => ({
5395
+ })) ?? [], si = (e) => e.events?.filter((t) => t.deprecated === void 0).map((t) => ({
5388
5396
  name: t.name,
5389
5397
  type: t.type?.text,
5390
5398
  description: t.description
5391
- })) ?? [], Da = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5399
+ })) ?? [], za = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5392
5400
  name: t.tagName,
5393
- description: gs(t),
5394
- attributes: Oa(t),
5401
+ description: ws(t),
5402
+ attributes: Ha(t),
5395
5403
  references: t.demos?.map((i) => ({ name: i.description, url: i.url })) ?? []
5396
- })), Oa = (e) => e.attributes?.filter((t) => t.deprecated === void 0).map((t) => ({
5404
+ })), Ha = (e) => e.attributes?.filter((t) => t.deprecated === void 0).map((t) => ({
5397
5405
  name: t.name,
5398
5406
  description: t.description || void 0,
5399
- values: Ma(t)
5400
- })) ?? [], Ma = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], Ja = (e) => ({
5407
+ values: qa(t)
5408
+ })) ?? [], qa = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], Va = (e) => ({
5401
5409
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
5402
5410
  version: 1.1,
5403
- tags: Da(e)
5404
- }), Ba = (e) => ({
5411
+ tags: za(e)
5412
+ }), Ga = (e) => ({
5405
5413
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
5406
5414
  version: 1.1,
5407
- properties: hs(e),
5408
- pseudoElements: ys(e)
5409
- }), _a = "@arcgis/lumina:generateDocs";
5410
- function Ka(e) {
5415
+ properties: Ss(e),
5416
+ pseudoElements: Cs(e)
5417
+ }), Xa = "@arcgis/lumina:generateDocs";
5418
+ function Ya(e) {
5411
5419
  return e._documentationFileNames.stencilLikeDocsJson !== void 0 && e.provideAssets([
5412
5420
  {
5413
5421
  type: "dynamic",
5414
- source: () => JSON.stringify(wa(e), null, rt(e)),
5422
+ source: () => JSON.stringify(xa(e), null, nt(e)),
5415
5423
  destination: u.join("../..", e._documentationFileNames.stencilLikeDocsJson)
5416
5424
  }
5417
5425
  ]), {
5418
- name: _a,
5426
+ name: Xa,
5419
5427
  async writeBundle() {
5420
5428
  if (e.isInStorybook)
5421
5429
  return;
5422
- const t = rt(e), { jetBrains: i } = e.options.documentation ?? {}, s = e._documentationFileNames, n = s.vsCodeHtml === void 0 ? void 0 : u.join(e.dir.dist, s.vsCodeHtml), r = s.vsCodeCss === void 0 ? void 0 : u.join(e.dir.dist, s.vsCodeCss), a = s.webTypes === void 0 ? void 0 : u.join(e.dir.dist, s.webTypes), l = [n, r, a].filter(R);
5423
- if (l.length === 0)
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);
5431
+ if (c.length === 0)
5424
5432
  return;
5425
- await Fi(l);
5433
+ await Bi(c);
5426
5434
  const d = [];
5427
5435
  if (n !== void 0) {
5428
- const c = JSON.stringify(Ja(e.apiJsonComponents), null, t);
5429
- d.push(K(n, c));
5436
+ const l = JSON.stringify(Va(e.apiJsonComponents), null, t);
5437
+ d.push(_(n, l));
5430
5438
  }
5431
5439
  if (r !== void 0) {
5432
- const c = JSON.stringify(Ba(e.apiJsonComponents), null, t);
5433
- d.push(K(r, c));
5440
+ const l = JSON.stringify(Ga(e.apiJsonComponents), null, t);
5441
+ d.push(_(r, l));
5434
5442
  }
5435
5443
  if (a !== void 0) {
5436
- const c = ja(e.apiJsonComponents, typeof i == "object" ? i : {});
5437
- d.push(K(a, JSON.stringify(c, null, t)));
5444
+ const l = _a(e.apiJsonComponents, typeof i == "object" ? i : {});
5445
+ d.push(_(a, JSON.stringify(l, null, t)));
5438
5446
  }
5439
5447
  await Promise.all(d);
5440
5448
  }
5441
5449
  };
5442
5450
  }
5443
- function Wa(e) {
5451
+ function Qa(e) {
5444
5452
  return {
5445
5453
  name: "@arcgis/lumina:buildWrappers",
5446
5454
  apply: () => e.viteCommand === "build" && !!e.options.build?.wrappers?.length,
5447
5455
  async writeBundle() {
5448
5456
  e.isInStorybook || await Promise.all(
5449
5457
  e.options.build?.wrappers?.map(async (t) => {
5450
- t.type === "react18" && await Ha(e, t);
5458
+ t.type === "react18" && await tc(e, t);
5451
5459
  }) ?? []
5452
5460
  );
5453
5461
  }
5454
5462
  };
5455
5463
  }
5456
- const Ua = "react", Zt = "@lit/react", za = `
5457
- import React from "${Ua}";
5458
- import { createComponent } from "${Zt}";
5459
- import type { EventName } from "${Zt}";
5464
+ const Za = "react", ri = "@lit/react", ec = `
5465
+ import React from "${Za}";
5466
+ import { createComponent } from "${ri}";
5467
+ import type { EventName } from "${ri}";
5460
5468
  import { makeReactWrapperFactory, getReactWrapperOptions } from "@arcgis/lumina";
5461
5469
 
5462
5470
  const createWrapper = /*@__PURE__*/ makeReactWrapperFactory(React, createComponent) as typeof createComponent;
5463
5471
  `;
5464
- async function Ha(e, t) {
5472
+ async function tc(e, t) {
5465
5473
  const { name: i } = j(), s = [];
5466
5474
  for (const a of e.apiJson.modules)
5467
- for (const l of a.declarations)
5468
- l.customElement === !0 && s.push(qa(l));
5469
- const n = [`/// <reference types="${i}" preserve="true" />`, za, ...s].join(""), r = u.resolve(t.proxiesFile);
5470
- await X(u.dirname(r), { recursive: !0 }), await K(r, n);
5475
+ for (const c of a.declarations)
5476
+ ic(c) && s.push(sc(c));
5477
+ const n = [`/// <reference types="${i}" preserve="true" />`, ec, ...s].join(""), r = u.resolve(t.proxiesFile);
5478
+ await X(u.dirname(r), { recursive: !0 }), await _(r, n);
5471
5479
  }
5472
- function qa(e) {
5480
+ function ic(e) {
5481
+ return e.customElement === !0 && e.abstract !== !0;
5482
+ }
5483
+ function sc(e) {
5473
5484
  const t = e.events?.map(
5474
- (i) => ` ${Hs(`on${ws(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}"]>,`
5475
5486
  ).join(`
5476
5487
  `);
5477
5488
  return `
@@ -5486,42 +5497,42 @@ ${t}
5486
5497
  );
5487
5498
  `;
5488
5499
  }
5489
- function Sc(e = {}) {
5500
+ function Lc(e = {}) {
5490
5501
  const t = new $(e), s = [
5491
5502
  t._plugin,
5492
- Kn(t),
5493
- Vn(t),
5494
- Qn(t),
5495
- ya(t),
5496
- jn(t),
5497
- Ka(t),
5498
- fa(t),
5499
- mo(t),
5500
- fr(t),
5501
- Fn(t),
5502
- ha(t),
5503
- go(t),
5503
+ Yn(t),
5504
5504
  so(t),
5505
- Vs(t),
5506
- ln(t),
5507
- Wa(t),
5508
- Rn(t)
5509
- ].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);
5510
5521
  return s.context = t, s;
5511
5522
  }
5512
- const Cc = {
5513
- initializeComponentDependencies: Ti,
5514
- updateLuminaTs: Xi,
5523
+ const Nc = {
5524
+ initializeComponentDependencies: Ii,
5525
+ updateLuminaTs: ts,
5515
5526
  propertyToAttributeMappings: W,
5516
- nativeEvents: ui,
5517
- svgElements: at,
5518
- mathMlElements: ct,
5519
- alwaysAttributes: li,
5520
- nativeAlwaysAttributes: di,
5527
+ nativeEvents: hi,
5528
+ svgElements: lt,
5529
+ mathMlElements: dt,
5530
+ alwaysAttributes: mi,
5531
+ nativeAlwaysAttributes: fi,
5521
5532
  htmlAlwaysAttributes: Qe
5522
5533
  };
5523
5534
  export {
5524
- Cc as exportsForCodemod,
5525
- De as inferCdnUrl,
5526
- Sc as useLumina
5535
+ Nc as exportsForCodemod,
5536
+ Re as inferCdnUrl,
5537
+ Lc as useLumina
5527
5538
  };