@arcgis/lumina-compiler 5.0.0-next.89 → 5.0.0-next.90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +233 -233
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import { isNotUndefined as j } from "@arcgis/toolkit/predicate";
7
7
  import { camelToKebab as $t, kebabToPascal as hs, uncapitalize as ft, getPreamble as vs, capitalize as bs } from "@arcgis/toolkit/string";
8
8
  import { lazyMetaSubItemJoiner as Ss, lazyMetaItemJoiner as it, lazyMetaGroupJoiner as ws, propertyFlagAttribute as Ht, propertyFlagReflect as Ts, propertyFlagBoolean as Es, propertyFlagNumber as Cs, propertyFlagState as $s, propertyFlagReadOnly as Ps, propertyFlagNoAccessor as xs } from "@arcgis/lumina/config";
9
9
  import { readdir as Ge, readFile as B, rm as Is, mkdir as ee, cp as ks, writeFile as F, copyFile as As } from "node:fs/promises";
10
- import { mappedFind as ve } from "@arcgis/toolkit/array";
10
+ import { mappedFind as be } from "@arcgis/toolkit/array";
11
11
  import { build as Ns } from "esbuild";
12
12
  import { identity as Di } from "@arcgis/toolkit/function";
13
13
  import { Deferred as Ri } from "@arcgis/toolkit/promise";
@@ -41,7 +41,7 @@ function Os(e, t, i) {
41
41
  c === s.length - 1 ? r[""] ??= e : (r[a] ??= /* @__PURE__ */ Object.create(null), r = r[a]);
42
42
  }), r[""];
43
43
  }
44
- function be(e, t, i) {
44
+ function Se(e, t, i) {
45
45
  if (!e.startsWith(t))
46
46
  return e;
47
47
  const n = e.slice(t.length), s = Ms(n, i);
@@ -60,7 +60,7 @@ function Ms(e, t) {
60
60
  return e;
61
61
  }
62
62
  const Js = ({ filePath: e, content: t }, i) => {
63
- const n = e.startsWith(i.dir.distComponents) ? be(
63
+ const n = e.startsWith(i.dir.distComponents) ? Se(
64
64
  Ji(i.dir.distComponents, e),
65
65
  i.dir.distComponents,
66
66
  i
@@ -88,12 +88,12 @@ const Ks = -1, Bs = -2, _s = /["']\.\.?\/[^'"]+/gu, Ki = (e, t, i, n) => e.repla
88
88
  const r = s.slice(1);
89
89
  if (!r.startsWith("./") && !r.startsWith("../"))
90
90
  return s;
91
- const a = u.join(n, r), c = !r.endsWith(".js") && !r.split("/").at(-1).includes(".") ? Ji(t.dir.distComponents, a, "") : a, d = be(c, t.dir.distComponents, t);
91
+ const a = u.join(n, r), c = !r.endsWith(".js") && !r.split("/").at(-1).includes(".") ? Ji(t.dir.distComponents, a, "") : a, d = Se(c, t.dir.distComponents, t);
92
92
  if (i === n && a === d)
93
93
  return s;
94
- const l = Ce(i, d), p = s.endsWith("/") ? `${l}/` : l;
94
+ const l = $e(i, d), p = s.endsWith("/") ? `${l}/` : l;
95
95
  return `${s[0]}${p}`;
96
- }), Ce = (e, t) => {
96
+ }), $e = (e, t) => {
97
97
  const i = u.relative(e, t);
98
98
  return i.startsWith(".") ? i : `.${u.sep}${i}`;
99
99
  };
@@ -1810,7 +1810,7 @@ function Or(e) {
1810
1810
  }
1811
1811
  return t.length === 0 ? void 0 : t;
1812
1812
  }
1813
- const Mr = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Jr = /\n\s+\*? ?/gu, Kr = ["keyed", "ref", "repeat", "live"], pe = "staticHtml", te = "staticSvg", me = "html", ae = "svg", Yi = Symbol("maybe HTML namespace or maybe SVG"), en = "css", tn = "mathml", nn = [en, me, tn, pe, te, ae], Br = new Set(nn), _r = ["safeClassMap", "safeStyleMap", "deferLoad", "stabilizedRef"], Wr = "nothing", Hr = [...Kr, ...nn, ..._r, Wr], Ur = (e) => o.isArrayLiteralExpression(e) && e.elements.every((t) => Se(t)), Se = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e), ce = {
1813
+ const Mr = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Jr = /\n\s+\*? ?/gu, Kr = ["keyed", "ref", "repeat", "live"], pe = "staticHtml", te = "staticSvg", me = "html", ae = "svg", Yi = Symbol("maybe HTML namespace or maybe SVG"), en = "css", tn = "mathml", nn = [en, me, tn, pe, te, ae], Br = new Set(nn), _r = ["safeClassMap", "safeStyleMap", "deferLoad", "stabilizedRef"], Wr = "nothing", Hr = [...Kr, ...nn, ..._r, Wr], Ur = (e) => o.isArrayLiteralExpression(e) && e.elements.every((t) => we(t)), we = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e), ce = {
1814
1814
  [me]: ["lit", "lit/html.js", "lit-html"],
1815
1815
  /**
1816
1816
  * Sadly, Lit called these "html" and "svg", rather than "staticHtml" and
@@ -1842,15 +1842,15 @@ const Mr = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Jr = /\n\s+\
1842
1842
  "bindProperty",
1843
1843
  "bindEvent",
1844
1844
  "bindAttribute"
1845
- ]), sn = /\.(?:css|s[ac]ss|less|styl(?:us)?|postcss|pcss|sss)(\\?|$)/u, fe = "@arcgis/lumina:loadLitCss", _e = "?litCss", ie = "?layeredLitCss", vt = "?globalFileLitCss", qr = (e) => ({
1846
- name: fe,
1845
+ ]), sn = /\.(?:css|s[ac]ss|less|styl(?:us)?|postcss|pcss|sss)(\\?|$)/u, ge = "@arcgis/lumina:loadLitCss", _e = "?litCss", ie = "?layeredLitCss", vt = "?globalFileLitCss", qr = (e) => ({
1846
+ name: ge,
1847
1847
  enforce: "pre",
1848
1848
  configResolved(t) {
1849
1849
  const i = t.plugins.find(({ name: r }) => r === "vite:css-post");
1850
1850
  if (i === void 0)
1851
1851
  throw Error(
1852
1852
  E(
1853
- fe,
1853
+ ge,
1854
1854
  "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 `npm list vite`/`yarn why vite` to check the Vite version you are using."
1855
1855
  )
1856
1856
  );
@@ -1858,7 +1858,7 @@ const Mr = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Jr = /\n\s+\
1858
1858
  if (typeof n != "object" || typeof n.handler != "function")
1859
1859
  throw Error(
1860
1860
  E(
1861
- fe,
1861
+ ge,
1862
1862
  "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 `npm list vite`/`yarn why vite` to check the Vite version you are using."
1863
1863
  )
1864
1864
  );
@@ -1866,7 +1866,7 @@ const Mr = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Jr = /\n\s+\
1866
1866
  if (s.length !== 1)
1867
1867
  throw Error(
1868
1868
  E(
1869
- fe,
1869
+ ge,
1870
1870
  `Expected vite:css-post's transform handler to have only a single property: handler. Found: ${s.join(",")}. This may indicate you are trying to use Lumina with a different Vite version than it was designed for. Use \`npm list vite\`/\`yarn why vite\` to check the Vite version you are using.`
1871
1871
  )
1872
1872
  );
@@ -1884,7 +1884,7 @@ const Mr = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Jr = /\n\s+\
1884
1884
  const p = `${a}?inline`, f = await n.handler.call(this, r, p), { code: m, ...g } = typeof f == "string" ? { code: f } : f ?? {};
1885
1885
  if (typeof m != "string" || !m.startsWith(rn) || !m.endsWith(Vr))
1886
1886
  return T.warn(
1887
- fe,
1887
+ ge,
1888
1888
  `Expected vite:css-post to return a JS module with a string literal. Received: ${JSON.stringify(
1889
1889
  m
1890
1890
  )}`
@@ -2051,13 +2051,13 @@ ${e.map((t) => ` "/${t}",`).join(`
2051
2051
  if (!a.endsWith(".tsx"))
2052
2052
  return;
2053
2053
  const c = u.join(i, a);
2054
- if (we(c, t))
2054
+ if (Te(c, t))
2055
2055
  return c;
2056
2056
  a.endsWith(".stories.tsx") && c.startsWith(t) && s.push(c);
2057
2057
  }).filter(j);
2058
2058
  return e.componentFiles = r, e.componentStoryFiles = s, r;
2059
2059
  });
2060
- function we(e, t) {
2060
+ function Te(e, t) {
2061
2061
  if (!e.startsWith(t) || !e.endsWith(".tsx"))
2062
2062
  return !1;
2063
2063
  const [i, n] = e.slice(0, -4).split(u.sep).slice(uo);
@@ -2232,7 +2232,7 @@ function Co(e, t) {
2232
2232
  };
2233
2233
  }
2234
2234
  function $o(e, t) {
2235
- return we(e, t.srcComponents) ? u.join(t.dist, dn(e, t.src)) : e.startsWith(t.src) ? u.join(t.dist, e.slice(t.src.length)) : e;
2235
+ return Te(e, t.srcComponents) ? u.join(t.dist, dn(e, t.src)) : e.startsWith(t.src) ? u.join(t.dist, e.slice(t.src.length)) : e;
2236
2236
  }
2237
2237
  const Po = (e) => e.endsWith(".js") || e.endsWith(".d.ts") ? e : `${e.endsWith(".ts") ? e.slice(0, -3) : e.endsWith(".tsx") ? e.slice(0, -4) : e}.d.ts`;
2238
2238
  function fn(e) {
@@ -2276,7 +2276,7 @@ function gn(e, t, i) {
2276
2276
  function ii(e, t, i) {
2277
2277
  const n = e.jsDoc?.[0];
2278
2278
  if (n !== void 0)
2279
- return ve([n, ...n.tags ?? []], ({ comment: s }) => {
2279
+ return be([n, ...n.tags ?? []], ({ comment: s }) => {
2280
2280
  if (i === "typescript" && typeof s == "string") {
2281
2281
  const r = s.indexOf("[MDN Reference](");
2282
2282
  if (r === -1)
@@ -2284,7 +2284,7 @@ function ii(e, t, i) {
2284
2284
  const a = r + 16, c = s.indexOf(")", a);
2285
2285
  return c === -1 ? void 0 : s.slice(a, c);
2286
2286
  } else if (i === "core" && Array.isArray(s))
2287
- return ve(s, (r) => {
2287
+ return be(s, (r) => {
2288
2288
  if (!o.isJSDocLinkLike(r))
2289
2289
  return;
2290
2290
  const a = r.getText(t);
@@ -2873,7 +2873,7 @@ function Wo(e, t, i) {
2873
2873
  )), i > 0 && (e.start !== void 0 && (e.start += i), e.end !== void 0 && (e.end += i)), e.package !== void 0)
2874
2874
  return i;
2875
2875
  if (e.module?.startsWith("dist/components/") === !0)
2876
- e.module = be(e.module, "dist/components/", t.context);
2876
+ e.module = Se(e.module, "dist/components/", t.context);
2877
2877
  else if (e.module === "index.js" && e.name) {
2878
2878
  const n = t.indexedComponents.get(e.name);
2879
2879
  if (n !== void 0) {
@@ -3090,28 +3090,6 @@ const ea = (e) => e.compiler?.name === At.name, ta = (e, t) => Object.fromEntrie
3090
3090
  ];
3091
3091
  })
3092
3092
  ), la = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, da = (e) => e.startsWith("/") ? e : `/${e}`, Lt = (e, t) => `${e}@fs${da(t)}`;
3093
- function Xe(e = R(), t = !1) {
3094
- const i = e.version.includes("next"), n = e.name === "@esri/calcite-components";
3095
- if (n && i)
3096
- return `https://cdn.jsdelivr.net/npm/@esri/calcite-components@${e.version}/dist/calcite/`;
3097
- const s = t || i ? "jsdev.arcgis.com" : "js.arcgis.com", r = pa(e.name), a = ma(e.version);
3098
- if (a === void 0)
3099
- throw Error(
3100
- E(
3101
- "@arcgis/lumina:dependencies",
3102
- `Failed to parse a semver version: ${e.name}. Ensure the version follows D.D.D format. Package version: ${e.version}`
3103
- )
3104
- );
3105
- return r.length === 0 ? `https://${s}/${a}/` : n ? `https://${s}/${r}/${a}/` : `https://${s}/${a}/${r}/`;
3106
- }
3107
- const pa = (e) => e.split("/").pop() ?? e;
3108
- function ma(e) {
3109
- const t = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)(?<prerelease>-.*)?$/u, i = e.match(t);
3110
- if (i?.groups === void 0)
3111
- return;
3112
- const { major: n, minor: s, patch: r, prerelease: a } = i.groups, c = `${n}.${s}.${r}`;
3113
- return a?.startsWith("-next") ? `${c}-next` : c;
3114
- }
3115
3093
  function ri(e, t, i) {
3116
3094
  if (se(e))
3117
3095
  return e;
@@ -3131,14 +3109,14 @@ function se(e) {
3131
3109
  return (
3132
3110
  // Inlined string literal
3133
3111
  typeof e == "string" || // Syntax kinds that are never undefined
3134
- ua.has(e.kind) || // Ternary with both branches never undefined
3112
+ pa.has(e.kind) || // Ternary with both branches never undefined
3135
3113
  o.isConditionalExpression(e) && se(e.whenTrue) && se(e.whenFalse) || // Binary expression with operator that never results in undefined Or both sides are definitely not undefined
3136
- o.isBinaryExpression(e) && (fa.has(e.operatorToken.kind) || se(e.left) && se(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3114
+ o.isBinaryExpression(e) && (ma.has(e.operatorToken.kind) || se(e.left) && se(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3137
3115
  (o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && se(e.expression) || // JSX that got converted to html`<p>Something</p>`
3138
3116
  o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && Br.has(e.tag.text)
3139
3117
  );
3140
3118
  }
3141
- const ua = /* @__PURE__ */ new Set([
3119
+ const pa = /* @__PURE__ */ new Set([
3142
3120
  o.SyntaxKind.NumericLiteral,
3143
3121
  o.SyntaxKind.BigIntLiteral,
3144
3122
  o.SyntaxKind.StringLiteral,
@@ -3157,7 +3135,7 @@ const ua = /* @__PURE__ */ new Set([
3157
3135
  o.SyntaxKind.ClassExpression,
3158
3136
  // Trust? Trust.
3159
3137
  o.SyntaxKind.NonNullExpression
3160
- ]), fa = /* @__PURE__ */ new Set([
3138
+ ]), ma = /* @__PURE__ */ new Set([
3161
3139
  o.SyntaxKind.PlusEqualsToken,
3162
3140
  o.SyntaxKind.MinusEqualsToken,
3163
3141
  o.SyntaxKind.AsteriskAsteriskEqualsToken,
@@ -3192,9 +3170,9 @@ const ua = /* @__PURE__ */ new Set([
3192
3170
  o.SyntaxKind.SlashToken,
3193
3171
  o.SyntaxKind.PercentToken,
3194
3172
  o.SyntaxKind.AsteriskAsteriskToken
3195
- ]), ga = {
3173
+ ]), ua = {
3196
3174
  property(e, t, i, n) {
3197
- const s = ya(n, i, e), r = s?.type === "stringifiedReflected", a = s?.type === "reflected" || r;
3175
+ const s = fa(n, i, e), r = s?.type === "stringifiedReflected", a = s?.type === "reflected" || r;
3198
3176
  if (a) {
3199
3177
  const m = ct(t);
3200
3178
  if (m === !0)
@@ -3211,7 +3189,7 @@ const ua = /* @__PURE__ */ new Set([
3211
3189
  p,
3212
3190
  e,
3213
3191
  f ? "" : void 0
3214
- ), y = i === "value" && (n === "input" || n === "textarea" || n === Be) ? va(m, e) : m;
3192
+ ), y = i === "value" && (n === "input" || n === "textarea" || n === Be) ? ya(m, e) : m;
3215
3193
  if (y !== p)
3216
3194
  return [f ? `.${i}` : s.name, l, y];
3217
3195
  }
@@ -3284,7 +3262,7 @@ const ua = /* @__PURE__ */ new Set([
3284
3262
  return [o.factory.createIdentifier(s)];
3285
3263
  }
3286
3264
  };
3287
- function ya(e, t, i) {
3265
+ function fa(e, t, i) {
3288
3266
  if (typeof e == "string") {
3289
3267
  const r = (i.externalComponents[e] ?? i.localComponents[e])?.propToAttribute?.[t];
3290
3268
  if (r !== void 0)
@@ -3300,7 +3278,7 @@ function ya(e, t, i) {
3300
3278
  } else {
3301
3279
  const s = Object.values(z.perElement).map(
3302
3280
  (a) => at(a, t)
3303
- ), r = ve(s, (a) => a?.type === "stringifiedNonReflected" ? a : void 0) ?? ve(s, (a) => a?.type === "stringifiedReflected" ? a : void 0);
3281
+ ), r = be(s, (a) => a?.type === "stringifiedNonReflected" ? a : void 0) ?? be(s, (a) => a?.type === "stringifiedReflected" ? a : void 0);
3304
3282
  if (r !== void 0)
3305
3283
  return r;
3306
3284
  }
@@ -3334,7 +3312,7 @@ function ct(e) {
3334
3312
  }
3335
3313
  }
3336
3314
  function Oe(e, t, i = !1) {
3337
- if (Se(t))
3315
+ if (we(t))
3338
3316
  throw new Error(
3339
3317
  `Invalid JSX syntax detected or there is a bug in Lumina. Found ${t.getText(e.sourceFile)}. Expected JSX attribute value to be wrapped in { }`
3340
3318
  );
@@ -3378,7 +3356,7 @@ function ai(e, t, i) {
3378
3356
  `${i} prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3379
3357
  );
3380
3358
  const n = t.expression;
3381
- if (ha(n)) {
3359
+ if (ga(n)) {
3382
3360
  const r = i === "class" ? "safeClassMap" : "safeStyleMap";
3383
3361
  e.neededImports.add(r);
3384
3362
  const a = e.importRenames[r], c = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
@@ -3388,15 +3366,15 @@ function ai(e, t, i) {
3388
3366
  } else
3389
3367
  return [i, ...Oe(e, t, !0)];
3390
3368
  }
3391
- const ha = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3392
- function va(e, t) {
3369
+ const ga = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3370
+ function ya(e, t) {
3393
3371
  t.neededImports.add("live");
3394
3372
  const i = t.importRenames.live;
3395
3373
  return o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [
3396
3374
  typeof e == "string" ? o.factory.createStringLiteral(e) : e
3397
3375
  ]);
3398
3376
  }
3399
- function ba(e) {
3377
+ function ha(e) {
3400
3378
  if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in ci && e.expression.arguments.length <= 1)
3401
3379
  return {
3402
3380
  propType: ci[e.expression.expression.text],
@@ -3414,15 +3392,15 @@ const ci = {
3414
3392
  bindBooleanAttribute: "booleanAttribute",
3415
3393
  bindEvent: "event"
3416
3394
  };
3417
- function Sa(e, t, i) {
3418
- return Ta.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : Vi.has(e) || e.includes("-") ? "attribute" : !kt(i) && (Gi.has(e) || (i === yt ? !1 : i === Be ? (
3395
+ function va(e, t, i) {
3396
+ return Sa.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : Vi.has(e) || e.includes("-") ? "attribute" : !kt(i) && (Gi.has(e) || (i === yt ? !1 : i === Be ? (
3419
3397
  // When tag name is dynamic, we can't help but check if the prop name matches an "always attribute" in any html element
3420
3398
  Object.values(ht).some((r) => r.has(e))
3421
3399
  ) : ht[i]?.has(e) === !0)) ? Qt.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === yt || i !== Be && (xt.has(i) || It.has(i)) ? e in z.common.reflected || e in z.common.stringifiedReflected || e in z.common.stringifiedNonReflected ? "property" : Qt.has(e) ? "booleanAttribute" : "attribute" : "property";
3422
3400
  }
3423
- const wa = ["class", "style", "ref", "directives", "key", "deferLoad"], Ta = new Set(wa), Ea = (e) => typeof e != "string" || e.trim().length > 0;
3424
- function Qe({ key: e, parts: t, litTag: i }, n) {
3425
- const s = Ca(t);
3401
+ const ba = ["class", "style", "ref", "directives", "key", "deferLoad"], Sa = new Set(ba), wa = (e) => typeof e != "string" || e.trim().length > 0;
3402
+ function Xe({ key: e, parts: t, litTag: i }, n) {
3403
+ const s = Ta(t);
3426
3404
  if (s.length % 2 === 0)
3427
3405
  throw new Error("Normalized template parts array length must be odd");
3428
3406
  const [r, ...a] = s;
@@ -3443,11 +3421,11 @@ function Qe({ key: e, parts: t, litTag: i }, n) {
3443
3421
  const d = n.importRenames[c], l = o.factory.createTaggedTemplateExpression(
3444
3422
  o.factory.createIdentifier(d),
3445
3423
  void 0,
3446
- a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), $a(a))
3424
+ a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), Ea(a))
3447
3425
  );
3448
3426
  return lt(n, e, l);
3449
3427
  }
3450
- const Ca = (e) => e.reduce(
3428
+ const Ta = (e) => e.reduce(
3451
3429
  (t, i, n) => {
3452
3430
  const s = t.at(-1), r = typeof s == "string", a = typeof i == "string";
3453
3431
  if (r && a)
@@ -3457,7 +3435,7 @@ const Ca = (e) => e.reduce(
3457
3435
  },
3458
3436
  [""]
3459
3437
  );
3460
- function $a(e) {
3438
+ function Ea(e) {
3461
3439
  if (!(e.length % 2 === 0))
3462
3440
  throw new Error("templatePartsToSpans should be called with normalized parts array without the first item");
3463
3441
  const i = e.length / 2;
@@ -3496,13 +3474,13 @@ function En(e, t) {
3496
3474
  );
3497
3475
  }
3498
3476
  const jt = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
3499
- function Pa(e) {
3477
+ function Ca(e) {
3500
3478
  const t = jt(e);
3501
3479
  if (t.length === 0)
3502
3480
  return [e || " "];
3503
3481
  const i = t.reduceRight(
3504
3482
  ([s, ...r], a) => {
3505
- const c = xa(s), d = Cn(c.slice(a.pos, a.end));
3483
+ const c = $a(s), d = Cn(c.slice(a.pos, a.end));
3506
3484
  return [
3507
3485
  c.slice(0, a.pos),
3508
3486
  /**
@@ -3521,12 +3499,12 @@ function Pa(e) {
3521
3499
  return (typeof n != "string" || n.trim() !== "") && i.push(" "), i;
3522
3500
  }
3523
3501
  const Cn = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
3524
- function xa(e) {
3502
+ function $a(e) {
3525
3503
  if (typeof e == "string")
3526
3504
  return e;
3527
3505
  throw new Error(`Expected string, got ${typeof e}: ${String(e)}`);
3528
3506
  }
3529
- function Ia(e, t) {
3507
+ function Pa(e, t) {
3530
3508
  if (!(o.isPropertyAccessExpression(t.expression) && t.expression.name.text === "map"))
3531
3509
  return t;
3532
3510
  const n = t.arguments[0];
@@ -3536,7 +3514,7 @@ function Ia(e, t) {
3536
3514
  if (!(typeof r == "object" && // If .map() callback has 3rd argument, it's not supported
3537
3515
  n.parameters.length <= 2))
3538
3516
  return t;
3539
- const c = Te(n.body);
3517
+ const c = Ee(n.body);
3540
3518
  let d = !0, l;
3541
3519
  if (li(c))
3542
3520
  l = c;
@@ -3546,7 +3524,7 @@ function Ia(e, t) {
3546
3524
  const v = c.statements.at(-1);
3547
3525
  if (!(v && o.isReturnStatement(v) && v.expression))
3548
3526
  return t;
3549
- const w = Te(v.expression);
3527
+ const w = Ee(v.expression);
3550
3528
  if (!li(w))
3551
3529
  return t;
3552
3530
  const P = c.statements.slice(0, -1);
@@ -3560,7 +3538,7 @@ function Ia(e, t) {
3560
3538
  const m = p.attributes.properties[f];
3561
3539
  if (m === void 0 || !o.isJsxAttribute(m))
3562
3540
  return t;
3563
- const g = Ft(m.initializer, e.sourceFile), y = ka(r, n, g, d, e);
3541
+ const g = Ft(m.initializer, e.sourceFile), y = xa(r, n, g, d, e);
3564
3542
  if (y === void 0)
3565
3543
  return t;
3566
3544
  e.liftedKeys.add(m.name), e.neededImports.add("repeat");
@@ -3593,7 +3571,7 @@ function $n(e) {
3593
3571
  void 0
3594
3572
  ), t;
3595
3573
  }
3596
- function ka(e, t, i, n, s) {
3574
+ function xa(e, t, i, n, s) {
3597
3575
  const r = K(i);
3598
3576
  if (r === void 0)
3599
3577
  return;
@@ -3609,7 +3587,7 @@ function ka(e, t, i, n, s) {
3609
3587
  return;
3610
3588
  }
3611
3589
  if (!n) {
3612
- const d = Na(r, a, t);
3590
+ const d = ka(r, a, t);
3613
3591
  if (d === void 0)
3614
3592
  return;
3615
3593
  a = d;
@@ -3648,15 +3626,15 @@ function K(e) {
3648
3626
  }
3649
3627
  return t;
3650
3628
  } else {
3651
- if (Aa.has(e.kind))
3629
+ if (Ia.has(e.kind))
3652
3630
  return [];
3653
3631
  {
3654
- const t = Te(e);
3632
+ const t = Ee(e);
3655
3633
  return t !== e ? K(t) : void 0;
3656
3634
  }
3657
3635
  }
3658
3636
  }
3659
- const Aa = /* @__PURE__ */ new Set([
3637
+ const Ia = /* @__PURE__ */ new Set([
3660
3638
  o.SyntaxKind.NumericLiteral,
3661
3639
  o.SyntaxKind.BigIntLiteral,
3662
3640
  o.SyntaxKind.StringLiteral,
@@ -3665,12 +3643,12 @@ const Aa = /* @__PURE__ */ new Set([
3665
3643
  o.SyntaxKind.FalseKeyword,
3666
3644
  o.SyntaxKind.NullKeyword,
3667
3645
  o.SyntaxKind.TrueKeyword
3668
- ]), Te = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? Te(e.expression) : e, Pn = (e, t) => o.isObjectBindingPattern(e) ? ja(e, t) : e;
3669
- function Na(e, t, i) {
3646
+ ]), Ee = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? Ee(e.expression) : e, Pn = (e, t) => o.isObjectBindingPattern(e) ? La(e, t) : e;
3647
+ function ka(e, t, i) {
3670
3648
  if (e.every(qe, t))
3671
3649
  return t;
3672
3650
  if (o.isIdentifier(t)) {
3673
- const n = o.isBlock(i.body) ? ve(i.body.statements, (r) => La(r, t)) : void 0;
3651
+ const n = o.isBlock(i.body) ? be(i.body.statements, (r) => Aa(r, t)) : void 0;
3674
3652
  if (n === void 0)
3675
3653
  return;
3676
3654
  const s = Pn(n, e);
@@ -3678,7 +3656,7 @@ function Na(e, t, i) {
3678
3656
  return s;
3679
3657
  }
3680
3658
  }
3681
- function La(e, t) {
3659
+ function Aa(e, t) {
3682
3660
  if (!o.isVariableStatement(e) || !(e.declarationList.flags & o.NodeFlags.Const))
3683
3661
  return;
3684
3662
  const i = e.declarationList.declarations[0];
@@ -3686,20 +3664,20 @@ function La(e, t) {
3686
3664
  }
3687
3665
  function qe(e) {
3688
3666
  const t = this;
3689
- return o.isIdentifier(t) ? t.text === e : t.elements.some(Fa, e);
3667
+ return o.isIdentifier(t) ? t.text === e : t.elements.some(Na, e);
3690
3668
  }
3691
- function Fa(e) {
3669
+ function Na(e) {
3692
3670
  const t = this;
3693
3671
  return o.isOmittedExpression(e) ? !1 : qe.call(e.name, t);
3694
3672
  }
3695
- function ja(e, t) {
3673
+ function La(e, t) {
3696
3674
  let i = !1;
3697
3675
  const n = e.elements.filter((s) => o.isIdentifier(s.name) ? t.includes(s.name.text) : (i = !0, !0));
3698
3676
  return i || n.length === 0 ? e : o.factory.updateObjectBindingPattern(e, n);
3699
3677
  }
3700
- const xn = (e, t) => t.liftedKeys.has(e), Da = (e) => e.apiJsonComponents.map(({ name: t, importPath: i }) => `import type { ${t} } from "./${i}/index.js";`).join(`
3701
- `), Ra = /^[a-zA-Z_$][a-zA-Z\d_$]*$/u, Ze = (e) => !Ra.test(e), ue = (e) => Ze(e) ? `"${e}"` : e;
3702
- function $e(e, t) {
3678
+ const xn = (e, t) => t.liftedKeys.has(e), Fa = (e) => e.apiJsonComponents.map(({ name: t, importPath: i }) => `import type { ${t} } from "./${i}/index.js";`).join(`
3679
+ `), ja = /^[a-zA-Z_$][a-zA-Z\d_$]*$/u, Qe = (e) => !ja.test(e), ue = (e) => Qe(e) ? `"${e}"` : e;
3680
+ function Pe(e, t) {
3703
3681
  const i = [], n = [];
3704
3682
  let s = !1;
3705
3683
  t?.forEach((p) => {
@@ -3722,19 +3700,19 @@ type ${e}SetterTypes = ${e}["${qi}"]` : "", l = c.filter(Boolean).join(", ");
3722
3700
  }
3723
3701
  const di = (e) => e.map((t) => `'${t}'`).join(" | ");
3724
3702
  function V(e, t, i) {
3725
- if (Se(i))
3703
+ if (we(i))
3726
3704
  return In(e, i);
3727
- const n = o.isCallExpression(i) ? Ia(e, i) : i, s = o.visitEachChild(
3705
+ const n = o.isCallExpression(i) ? Pa(e, i) : i, s = o.visitEachChild(
3728
3706
  n,
3729
3707
  // Do not add "" if parent is binary expression to not turn {(a && <b />) || c} into {(a && <b />) || "" || c}
3730
3708
  V.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
3731
3709
  e.transformationContext
3732
3710
  );
3733
- return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || Se(Te(i.right)) || Ur(i.right)) ? Ja(s) : s;
3711
+ return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || we(Ee(i.right)) || Ur(i.right)) ? Oa(s) : s;
3734
3712
  }
3735
3713
  function In(e, t) {
3736
3714
  const i = kn(e, t);
3737
- return Qe(i, e);
3715
+ return Xe(i, e);
3738
3716
  }
3739
3717
  function kn(e, t) {
3740
3718
  const i = "children" in t ? t.children : [];
@@ -3747,10 +3725,10 @@ function kn(e, t) {
3747
3725
  const S = o.isIdentifier(r) && r.text === Pr ? Me(i, e) : {
3748
3726
  // No need to wrap the function call in a lit-html tag
3749
3727
  litTag: void 0,
3750
- parts: [Ma(e, t, r, i)]
3728
+ parts: [Ra(e, t, r, i)]
3751
3729
  };
3752
3730
  return {
3753
- key: Oa(s, e),
3731
+ key: Da(s, e),
3754
3732
  ...S
3755
3733
  };
3756
3734
  }
@@ -3767,13 +3745,13 @@ Found ${C.getText(e.sourceFile)}`
3767
3745
  const { name: S, initializer: k } = C;
3768
3746
  if (o.isJsxNamespacedName(S))
3769
3747
  throw Error(`JSX namespaced attributes are not supported. Found ${S.getText(e.sourceFile)}`);
3770
- const N = S.text, q = ba(k), D = q?.propType ?? Sa(N, k, c);
3748
+ const N = S.text, q = ha(k), D = q?.propType ?? va(N, k, c);
3771
3749
  f?.delete(N);
3772
- const L = ga[D](e, q?.initializer ?? k, N, c);
3750
+ const L = ua[D](e, q?.initializer ?? k, N, c);
3773
3751
  if (L.length === 0)
3774
3752
  return [];
3775
- const W = e.compiler.shouldMinifyJsx ? [" "] : Pa(Tn(S, e));
3776
- return D === "key" ? (m = typeof L[0] == "object" && !xn(S, e) ? L[0] : void 0, W.some(Ea) ? W : []) : D === "directives" || D === "ref" || N === "deferLoad" ? (y ||= D === "deferLoad", g.push(
3753
+ const W = e.compiler.shouldMinifyJsx ? [" "] : Ca(Tn(S, e));
3754
+ return D === "key" ? (m = typeof L[0] == "object" && !xn(S, e) ? L[0] : void 0, W.some(wa) ? W : []) : D === "directives" || D === "ref" || N === "deferLoad" ? (y ||= D === "deferLoad", g.push(
3777
3755
  ...W,
3778
3756
  ...L.flatMap(
3779
3757
  (O, J) => typeof O == "string" || J === 0 || typeof L[J - 1] == "string" ? O : [" ", O]
@@ -3806,19 +3784,19 @@ Found ${C.getText(e.sourceFile)}`
3806
3784
  * fragments (e.g. `<circle />`, then wrap the children in their own
3807
3785
  * tagged template literal (e.g. svg``)
3808
3786
  */
3809
- ...b.litTag !== void 0 && b.litTag !== d ? [Qe({ key: void 0, ...b }, e)] : b.parts,
3787
+ ...b.litTag !== void 0 && b.litTag !== d ? [Xe({ key: void 0, ...b }, e)] : b.parts,
3810
3788
  "</",
3811
3789
  typeof c == "string" ? c : r,
3812
3790
  ">"
3813
3791
  ];
3814
3792
  return { key: m, parts: A, litTag: d };
3815
3793
  }
3816
- function Oa(e, t) {
3794
+ function Da(e, t) {
3817
3795
  const i = e.attributes.properties[An(e)];
3818
3796
  return i && o.isJsxAttribute(i) && !xn(i.name, t) ? Ft(i.initializer, t.sourceFile) : void 0;
3819
3797
  }
3820
3798
  const An = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
3821
- function Ma(e, t, i, n) {
3799
+ function Ra(e, t, i, n) {
3822
3800
  const r = (o.isJsxElement(t) ? t.openingElement : t).attributes.properties.map((d) => {
3823
3801
  if (o.isJsxSpreadAttribute(d))
3824
3802
  return En(Tn(d, e), o.factory.createSpreadAssignment(d.expression));
@@ -3827,13 +3805,13 @@ function Ma(e, t, i, n) {
3827
3805
  throw Error(`JSX namespaced attributes are not supported. Found ${l.getText(e.sourceFile)}`);
3828
3806
  if (l.text === "key")
3829
3807
  return;
3830
- const f = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : Se(p) ? In(e, p) : V(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), m = Ze(l.text) ? o.factory.createStringLiteral(l.text) : l;
3808
+ const f = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : we(p) ? In(e, p) : V(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), m = Qe(l.text) ? o.factory.createStringLiteral(l.text) : l;
3831
3809
  return o.factory.createPropertyAssignment(m, f);
3832
3810
  }), { parts: a, litTag: c } = Me(n, e);
3833
3811
  return a.length > 0 && r.push(
3834
3812
  o.factory.createPropertyAssignment(
3835
3813
  o.factory.createIdentifier("children"),
3836
- Qe({ key: void 0, parts: a, litTag: c }, e)
3814
+ Xe({ key: void 0, parts: a, litTag: c }, e)
3837
3815
  )
3838
3816
  ), o.factory.createCallExpression(i, void 0, [
3839
3817
  o.factory.createObjectLiteralExpression(r.filter(j))
@@ -3857,12 +3835,12 @@ function Me(e, t) {
3857
3835
  );
3858
3836
  return i = r.litTag, r.parts;
3859
3837
  } else
3860
- return [Qe(r, t)];
3838
+ return [Xe(r, t)];
3861
3839
  }
3862
3840
  });
3863
3841
  return { litTag: i, parts: n };
3864
3842
  }
3865
- function Ja(e) {
3843
+ function Oa(e) {
3866
3844
  return e.operatorToken.kind === o.SyntaxKind.AmpersandAmpersandToken ? o.factory.createBinaryExpression(
3867
3845
  e,
3868
3846
  o.factory.createToken(o.SyntaxKind.BarBarToken),
@@ -3918,11 +3896,11 @@ const Nn = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), L
3918
3896
  ([e, t]) => t.map((i) => [i, e])
3919
3897
  )
3920
3898
  ), Fn = new Set(Object.keys(Ln));
3921
- function Ka(e, t) {
3899
+ function Ma(e, t) {
3922
3900
  const i = t.importClause, n = i === void 0, s = t.moduleSpecifier;
3923
3901
  if (!o.isStringLiteral(s))
3924
3902
  return t;
3925
- const r = Ba(e.sourceFile.fileName, s.text, ""), a = !i?.isTypeOnly;
3903
+ const r = Ja(e.sourceFile.fileName, s.text, ""), a = !i?.isTypeOnly;
3926
3904
  if (a && e.existingImportedModules.add(r), sn.test(s.text) && // If id already includes ?, bypass our custom behavior
3927
3905
  !s.text.includes("?")) {
3928
3906
  if (n) {
@@ -4000,11 +3978,11 @@ function Ka(e, t) {
4000
3978
  }
4001
3979
  return t;
4002
3980
  }
4003
- const jn = (e, t) => e === me && ce.staticHtml.includes(t) ? pe : e === ae && ce.staticSvg.includes(t) ? te : e, Ba = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
4004
- function _a(e) {
4005
- return o.isImportDeclaration(e) ? Wa(this, e) : e;
3981
+ const jn = (e, t) => e === me && ce.staticHtml.includes(t) ? pe : e === ae && ce.staticSvg.includes(t) ? te : e, Ja = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
3982
+ function Ka(e) {
3983
+ return o.isImportDeclaration(e) ? Ba(this, e) : e;
4006
3984
  }
4007
- function Wa(e, t) {
3985
+ function Ba(e, t) {
4008
3986
  const i = t.importClause, n = i?.namedBindings, s = t.moduleSpecifier;
4009
3987
  if (!o.isStringLiteral(s) || !n || !o.isNamedImports(n) || !Fn.has(s.text))
4010
3988
  return t;
@@ -4029,7 +4007,7 @@ function Wa(e, t) {
4029
4007
  t.attributes
4030
4008
  ) : t;
4031
4009
  }
4032
- function Ha(e) {
4010
+ function _a(e) {
4033
4011
  const t = Nn(
4034
4012
  Array.from(e.neededImports, (i) => [ce[i][0], i])
4035
4013
  );
@@ -4055,7 +4033,7 @@ function Dn(e, t) {
4055
4033
  o.factory.createIdentifier(n)
4056
4034
  );
4057
4035
  }
4058
- function Ua(e) {
4036
+ function Wa(e) {
4059
4037
  const t = Xo().map(({ packageName: i }) => i);
4060
4038
  return e.existingImportedModules.forEach((i) => {
4061
4039
  if (u.isAbsolute(i))
@@ -4069,7 +4047,7 @@ function Ua(e) {
4069
4047
  }
4070
4048
  }), [];
4071
4049
  }
4072
- function za(e) {
4050
+ function Ha(e) {
4073
4051
  if (e.compiler.viteCommand === "serve")
4074
4052
  return e.customElementsToImport.clear(), e.customElementsToImportDeferred.clear(), [];
4075
4053
  const t = e.compiler._customElementDependencies;
@@ -4084,7 +4062,7 @@ function za(e) {
4084
4062
  t[n] ??= { referencedBy: [], referencedTagNames: [], referencedDeferredTagNames: [] }, t[n].referencedBy.push(e.sourceFile.fileName);
4085
4063
  }), [];
4086
4064
  }
4087
- function qa(e, t, i) {
4065
+ function Ua(e, t, i) {
4088
4066
  const n = bn()[t] ?? Rn(e)[t];
4089
4067
  if (n === void 0) {
4090
4068
  if (e.options?.build?.dependencies?.silenceUnknownJsxElementUsage?.(t, i, e) === !0)
@@ -4099,8 +4077,8 @@ function qa(e, t, i) {
4099
4077
  }
4100
4078
  return n;
4101
4079
  }
4102
- function Va(e, t) {
4103
- return e.packageName === void 0 ? Ce(t, e.moduleName) : u.join(e.packageName, e.moduleName);
4080
+ function za(e, t) {
4081
+ return e.packageName === void 0 ? $e(t, e.moduleName) : u.join(e.packageName, e.moduleName);
4104
4082
  }
4105
4083
  function Rn(e) {
4106
4084
  return e._localDefinedComponents ??= wn(
@@ -4114,7 +4092,7 @@ function Rn(e) {
4114
4092
  e.viteCommand === "build"
4115
4093
  ), e._localDefinedComponents;
4116
4094
  }
4117
- const Ga = (e, t) => {
4095
+ const qa = (e, t) => {
4118
4096
  const i = e.pragmas;
4119
4097
  if (i?.has("jsx") === !0 || i?.has("jsxImportSource") === !0)
4120
4098
  return e.statements;
@@ -4124,7 +4102,7 @@ const Ga = (e, t) => {
4124
4102
  localComponents: Rn(t.compiler),
4125
4103
  sourceFile: e,
4126
4104
  transformationContext: t.transformation,
4127
- importRenames: Xa(e),
4105
+ importRenames: Va(e),
4128
4106
  existingImportedModules: /* @__PURE__ */ new Set(),
4129
4107
  importedFunctionComponentsFromModules: /* @__PURE__ */ new Set(),
4130
4108
  existingLitImports: /* @__PURE__ */ new Set(),
@@ -4140,7 +4118,7 @@ const Ga = (e, t) => {
4140
4118
  let s = [];
4141
4119
  if (e.statements.every((a) => {
4142
4120
  if (o.isImportDeclaration(a)) {
4143
- const c = Ka(n, a);
4121
+ const c = Ma(n, a);
4144
4122
  if (c === void 0)
4145
4123
  return !0;
4146
4124
  if (s.push(c), n.hasNonLuminaJsxImport)
@@ -4150,11 +4128,11 @@ const Ga = (e, t) => {
4150
4128
  return !0;
4151
4129
  }), n.hasNonLuminaJsxImport)
4152
4130
  return e.statements;
4153
- if (n.neededImports.size > 0 && (s = s.map(_a, n), n.existingLitImports.size > 0))
4131
+ if (n.neededImports.size > 0 && (s = s.map(Ka, n), n.existingLitImports.size > 0))
4154
4132
  throw new Error(
4155
4133
  `Expected context.existingLitImports to be empty by now. Found: ${Array.from(n.existingLitImports).join(", ")}`
4156
4134
  );
4157
- const r = [Ha, Ua, za].flatMap(
4135
+ const r = [_a, Wa, Ha].flatMap(
4158
4136
  (a) => a(n)
4159
4137
  );
4160
4138
  if (n.neededImports.size > 0)
@@ -4163,18 +4141,18 @@ const Ga = (e, t) => {
4163
4141
  );
4164
4142
  return [...r, ...s];
4165
4143
  };
4166
- function Xa(e) {
4167
- return Qa(e), Object.fromEntries(
4144
+ function Va(e) {
4145
+ return Ga(e), Object.fromEntries(
4168
4146
  Hr.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4169
4147
  );
4170
4148
  }
4171
- function Qa(e) {
4149
+ function Ga(e) {
4172
4150
  if (!("identifiers" in e))
4173
4151
  throw new Error(
4174
4152
  "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."
4175
4153
  );
4176
4154
  }
4177
- function Za(e, t, i) {
4155
+ function Xa(e, t, i) {
4178
4156
  return t.size === 0 ? e : [
4179
4157
  o.factory.createPropertyDeclaration(
4180
4158
  [
@@ -4187,8 +4165,8 @@ function Za(e, t, i) {
4187
4165
  o.factory.createObjectLiteralExpression(
4188
4166
  Array.from(t.entries()).map(
4189
4167
  ([n, s]) => o.factory.createPropertyAssignment(
4190
- Ze(n) ? o.factory.createStringLiteral(n) : n,
4191
- Ya(s, i)
4168
+ Qe(n) ? o.factory.createStringLiteral(n) : n,
4169
+ Qa(s, i)
4192
4170
  )
4193
4171
  )
4194
4172
  )
@@ -4196,7 +4174,7 @@ function Za(e, t, i) {
4196
4174
  ...e
4197
4175
  ];
4198
4176
  }
4199
- function Ya(e, t) {
4177
+ function Qa(e, t) {
4200
4178
  let i = 0, n = !0;
4201
4179
  const s = [], r = [];
4202
4180
  for (const d of e.properties)
@@ -4238,7 +4216,7 @@ function Ya(e, t) {
4238
4216
  ...t ? [] : [o.factory.createObjectLiteralExpression(r)]
4239
4217
  ]);
4240
4218
  }
4241
- function ec(e, t, i, n, s) {
4219
+ function Za(e, t, i, n, s) {
4242
4220
  let r = -1, a = -1, c = -1;
4243
4221
  t.options?.properties.forEach((m, g) => {
4244
4222
  if (o.isSpreadAssignment(m))
@@ -4250,23 +4228,23 @@ function ec(e, t, i, n, s) {
4250
4228
  y === "type" ? r = g : y === "attribute" ? a = g : y === "readOnly" && (c = g);
4251
4229
  }
4252
4230
  });
4253
- const d = s.attribute === void 0 && a === -1, l = s.readonly === !0 && s.docsOnlyReadonly !== !0 && c === -1, p = tc(e, t, i, s, r), f = [
4231
+ const d = s.attribute === void 0 && a === -1, l = s.readonly === !0 && s.docsOnlyReadonly !== !0 && c === -1, p = Ya(e, t, i, s, r), f = [
4254
4232
  ...d ? [o.factory.createPropertyAssignment("attribute", o.factory.createFalse())] : [],
4255
4233
  ...l ? [o.factory.createPropertyAssignment("readOnly", o.factory.createTrue())] : [],
4256
4234
  ...p !== void 0 ? [p] : []
4257
4235
  ];
4258
4236
  return f.length > 0 ? t.options === void 0 ? o.factory.createObjectLiteralExpression(f, !1) : o.factory.updateObjectLiteralExpression(t.options, [...t.options.properties, ...f]) : t.options;
4259
4237
  }
4260
- function tc(e, t, i, n, s) {
4238
+ function Ya(e, t, i, n, s) {
4261
4239
  if (n.attribute === void 0)
4262
4240
  return;
4263
- const r = nc(e), a = i.compiler.viteCommand === "serve" || r !== "Other" ? r : ic(n.type.values);
4241
+ const r = tc(e), a = i.compiler.viteCommand === "serve" || r !== "Other" ? r : ec(n.type.values);
4264
4242
  return a === "Other" || n.readonly && (a !== "Boolean" || !n.reflects) || t.options?.properties[s] !== void 0 ? void 0 : o.factory.createPropertyAssignment(
4265
4243
  o.factory.createIdentifier("type"),
4266
4244
  o.factory.createIdentifier(a)
4267
4245
  );
4268
4246
  }
4269
- function ic(e) {
4247
+ function ec(e) {
4270
4248
  let t = !1, i = !1, n = !1;
4271
4249
  if (e?.forEach((s) => {
4272
4250
  t ||= s.type === "number", i ||= s.type === "boolean", n ||= s.type === "string" || s.type === "any" || s.type === "unknown";
@@ -4278,7 +4256,7 @@ function ic(e) {
4278
4256
  }
4279
4257
  return "Other";
4280
4258
  }
4281
- function nc(e) {
4259
+ function tc(e) {
4282
4260
  const t = e.type ?? (o.isSetAccessor(e) ? e.parameters[0].type : void 0);
4283
4261
  if (t === void 0) {
4284
4262
  if ("initializer" in e && e.initializer !== void 0) {
@@ -4295,7 +4273,7 @@ function nc(e) {
4295
4273
  }
4296
4274
  return "Other";
4297
4275
  }
4298
- function sc(e, t, i, n, s) {
4276
+ function ic(e, t, i, n, s) {
4299
4277
  if (t.modifiers === void 0)
4300
4278
  return t;
4301
4279
  let r = -1, a = -1;
@@ -4305,7 +4283,7 @@ function sc(e, t, i, n, s) {
4305
4283
  l === "property" && (r = d), l === "state" && (a = d);
4306
4284
  }
4307
4285
  }), r !== -1) {
4308
- const c = rc(e, t, i, n), d = pi(t, r, n), l = ec(t, d, e, n, c);
4286
+ const c = nc(e, t, i, n), d = pi(t, r, n), l = Za(t, d, e, n, c);
4309
4287
  let p = !1;
4310
4288
  return s.set(c.name, l ?? o.factory.createObjectLiteralExpression()), p = !0, d.options = l, mi(t, d, r, p);
4311
4289
  } else if (a !== -1) {
@@ -4316,7 +4294,7 @@ function sc(e, t, i, n, s) {
4316
4294
  } else
4317
4295
  return t;
4318
4296
  }
4319
- function rc(e, t, i, n) {
4297
+ function nc(e, t, i, n) {
4320
4298
  const s = e.apiModule?.declarations.find(
4321
4299
  (a) => a.name === i
4322
4300
  ) ?? (e.compiler.isInTest ? {
@@ -4383,16 +4361,16 @@ function mi(e, t, i, n) {
4383
4361
  e.initializer
4384
4362
  );
4385
4363
  }
4386
- const oc = (e, t) => {
4364
+ const sc = (e, t) => {
4387
4365
  if (t.apiModule === void 0 && !t.compiler.isInTest)
4388
4366
  return e.statements;
4389
4367
  let i;
4390
4368
  function n() {
4391
4369
  i = /* @__PURE__ */ new Map();
4392
4370
  }
4393
- const s = (c) => Za(c, i, t.compiler.shouldMinify);
4371
+ const s = (c) => Xa(c, i, t.compiler.shouldMinify);
4394
4372
  function r(c, d) {
4395
- const l = cc(t, c, d, e, i);
4373
+ const l = oc(t, c, d, e, i);
4396
4374
  return Ke(l, t), l;
4397
4375
  }
4398
4376
  return e.statements.map(
@@ -4426,11 +4404,11 @@ function On(e, t, i, n, s = Di) {
4426
4404
  i.transformation
4427
4405
  ) : t;
4428
4406
  }
4429
- const ac = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4430
- function cc(e, t, i, n, s) {
4407
+ const rc = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4408
+ function oc(e, t, i, n, s) {
4431
4409
  if (o.isMethodDeclaration(t)) {
4432
4410
  const r = t.modifiers?.filter(
4433
- (a) => !o.isDecorator(a) || !lc(a)
4411
+ (a) => !o.isDecorator(a) || !ac(a)
4434
4412
  );
4435
4413
  if (r?.length !== t.modifiers?.length)
4436
4414
  return o.factory.updateMethodDeclaration(
@@ -4444,7 +4422,7 @@ function cc(e, t, i, n, s) {
4444
4422
  t.type,
4445
4423
  t.body
4446
4424
  );
4447
- if ("text" in t.name && ac.has(t.name.text) && t.body) {
4425
+ if ("text" in t.name && rc.has(t.name.text) && t.body) {
4448
4426
  const a = t.name.text;
4449
4427
  return t.body.statements.some(
4450
4428
  (d) => o.isExpressionStatement(d) && o.isCallExpression(d.expression) && o.isPropertyAccessExpression(d.expression.expression) && d.expression.expression.expression.kind === o.SyntaxKind.SuperKeyword && d.expression.expression.name.text === a
@@ -4470,14 +4448,14 @@ function cc(e, t, i, n, s) {
4470
4448
  );
4471
4449
  }
4472
4450
  }
4473
- return o.isPropertyDeclaration(t) || o.isAccessor(t) ? sc(e, t, i, n, s) : t;
4451
+ return o.isPropertyDeclaration(t) || o.isAccessor(t) ? ic(e, t, i, n, s) : t;
4474
4452
  }
4475
- const lc = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", dc = [
4476
- Ga,
4453
+ const ac = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", cc = [
4454
+ qa,
4477
4455
  Us,
4478
- oc
4479
- ], pc = "@arcgis/lumina:transformComponents", mc = (e) => ({
4480
- name: pc,
4456
+ sc
4457
+ ], lc = "@arcgis/lumina:transformComponents", dc = (e) => ({
4458
+ name: lc,
4481
4459
  transform: {
4482
4460
  // Transform JSX to lit-html first so that vite:esbuild doesn't transform JSX to h().
4483
4461
  order: "pre",
@@ -4495,7 +4473,7 @@ const lc = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expressio
4495
4473
  const r = o.transform(n, [
4496
4474
  (m) => () => Ui(e, m, n, [
4497
4475
  ...e.options.types?.sourceFileTransformers ?? [],
4498
- ...dc
4476
+ ...cc
4499
4477
  ])
4500
4478
  ]).transformed[0], a = e._compilerOptionsForPrinter, c = e._typeScriptPrinter, d = a.sourceMap ? Re.createSourceMapGenerator(
4501
4479
  e.typeScriptHost,
@@ -4513,7 +4491,7 @@ const lc = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expressio
4513
4491
  }
4514
4492
  }
4515
4493
  });
4516
- function uc(e) {
4494
+ function pc(e) {
4517
4495
  const t = e.typeScriptConfig;
4518
4496
  return {
4519
4497
  ...t,
@@ -4545,7 +4523,7 @@ function uc(e) {
4545
4523
  skipLibCheck: !0
4546
4524
  };
4547
4525
  }
4548
- function fc(e) {
4526
+ function mc(e) {
4549
4527
  const t = e.options.types?.tsconfigPath, i = t && u.isAbsolute(t) ? t : cs(t ?? "tsconfig.json");
4550
4528
  if (i === void 0)
4551
4529
  throw Error(
@@ -4584,7 +4562,7 @@ function Mn(e) {
4584
4562
  const i = o.ScriptTarget[t].toLowerCase();
4585
4563
  return i === "latest" ? "esnext" : i;
4586
4564
  }
4587
- function gc(e, t) {
4565
+ function uc(e, t) {
4588
4566
  if (e.isInStorybook && e.viteCommand === "serve") {
4589
4567
  const i = (a, c, d, ...l) => {
4590
4568
  const p = a.filter(
@@ -4606,16 +4584,16 @@ function gc(e, t) {
4606
4584
  e.typeScriptProgram = a.getProgram(), e.typeScriptTypeChecker = e.typeScriptProgram.getTypeChecker(), e._typeScriptReload?.resolve(), e._typeScriptReload = new Ri();
4607
4585
  }, e.typeScriptWatchProgram = o.createWatchProgram(n), e.typeScriptConfig = e.typeScriptProgram.getCompilerOptions();
4608
4586
  }
4609
- e.typeScriptConfig.sourceMap = t, e._compilerOptionsForPrinter = uc(e), e._typeScriptPrinter = Fi(e._compilerOptionsForPrinter);
4587
+ e.typeScriptConfig.sourceMap = t, e._compilerOptionsForPrinter = pc(e), e._typeScriptPrinter = Fi(e._compilerOptionsForPrinter);
4610
4588
  }
4611
- const St = "@arcgis/core", dt = R(), Pe = St in (dt.dependencies ?? {}) || St in (dt.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
4589
+ const St = "@arcgis/core", dt = R(), xe = St in (dt.dependencies ?? {}) || St in (dt.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
4612
4590
  dt.name === "@arcgis/lumina";
4613
- async function yc(e, t, i) {
4614
- if (!Pe)
4591
+ async function fc(e, t, i) {
4592
+ if (!xe)
4615
4593
  return [];
4616
4594
  const n = await ki(St);
4617
4595
  if (t === "cdn") {
4618
- const s = await Ai(n), r = Xe({ name: "", version: s.version }, i);
4596
+ const s = await Ai(n), r = Ze({ name: "", version: s.version }, i);
4619
4597
  return [
4620
4598
  // Use the ESM CDN
4621
4599
  // <script src="https://jsdev.arcgis.com/VERSION/"><\/script>
@@ -4642,7 +4620,7 @@ const ui = (e) => ({
4642
4620
  // This is used be the theme switcher in `@arcgis/storybook-utils`
4643
4621
  id: "arcgisCoreStylesheet"
4644
4622
  });
4645
- async function hc(e, t, i) {
4623
+ async function gc(e, t, i) {
4646
4624
  const n = u.resolve(e.dir.root, t);
4647
4625
  e.viteConfig.build.emptyOutDir !== !1 && await U(n) && await Is(n, { recursive: !0, force: !0 }), await ee(n, { recursive: !0 }), await ks(e.dir.distCdn, u.join(n, "build"), { recursive: !0 });
4648
4626
  const s = [
@@ -4652,7 +4630,7 @@ async function hc(e, t, i) {
4652
4630
  nodir: !0,
4653
4631
  posix: !0
4654
4632
  })
4655
- ], r = u.relative(e.dir.root, e.dir.src), a = await Ee(e), c = u.join(e.dir.src, "loader.ts"), d = a.map((l) => {
4633
+ ], r = u.relative(e.dir.root, e.dir.src), a = await Ce(e), c = u.join(e.dir.src, "loader.ts"), d = a.map((l) => {
4656
4634
  if ("cssHref" in l)
4657
4635
  return `<link rel="stylesheet" href="${l.cssHref}">`;
4658
4636
  if ("javascriptCode" in l && l.javascriptCode.at(0)?.includes(c) === !0)
@@ -4669,7 +4647,7 @@ async function hc(e, t, i) {
4669
4647
  s.map(async (l, p) => {
4670
4648
  const m = p === 0 ? l : u.join(r, l), g = u.join(e.dir.root, m), y = u.join(n, m);
4671
4649
  await ee(u.dirname(y), { recursive: !0 });
4672
- const h = await B(g, "utf-8"), v = Ce(u.dirname(m), `build/${i}`), b = `${d}<script type="module" src="${v}"><\/script>
4650
+ const h = await B(g, "utf-8"), v = $e(u.dirname(m), `build/${i}`), b = `${d}<script type="module" src="${v}"><\/script>
4673
4651
  `, w = Math.min(
4674
4652
  ...[h.indexOf("<style>"), h.indexOf("<script"), h.indexOf("</head>")].filter(
4675
4653
  (C) => C !== -1
@@ -4695,8 +4673,8 @@ const Jn = /* @__PURE__ */ new Set([
4695
4673
  "collection",
4696
4674
  "extras",
4697
4675
  "support"
4698
- ]), _ = "@arcgis/lumina:buildCdn", xe = "cdn", Kn = "index", ne = "main";
4699
- function vc(e) {
4676
+ ]), _ = "@arcgis/lumina:buildCdn", fe = "cdn", Kn = "index", ne = "main";
4677
+ function yc(e) {
4700
4678
  const { skip: t = !1, namespace: i, esbuildOptions: n = {}, entrypointTransformer: s } = e.options.build?.cdn ?? {}, r = e.options.build?.webApp?.destination, a = i !== void 0;
4701
4679
  if (a) {
4702
4680
  if (i.toLowerCase() !== i)
@@ -4729,7 +4707,7 @@ function vc(e) {
4729
4707
  );
4730
4708
  return;
4731
4709
  }
4732
- const d = Pe && R().name !== "@arcgis/embeddable-components", l = Date.now(), p = Array.isArray(n.entryPoints) ? n.entryPoints.map((g) => typeof g == "string" ? { in: g, out: "" } : g) : typeof n.entryPoints == "object" ? Object.entries(n.entryPoints).map(([g, y]) => ({ in: y, out: g })) : [], f = await bc(
4710
+ const d = xe && R().name !== "@arcgis/embeddable-components", l = Date.now(), p = Array.isArray(n.entryPoints) ? n.entryPoints.map((g) => typeof g == "string" ? { in: g, out: "" } : g) : typeof n.entryPoints == "object" ? Object.entries(n.entryPoints).map(([g, y]) => ({ in: y, out: g })) : [], f = await hc(
4733
4711
  e,
4734
4712
  c,
4735
4713
  n,
@@ -4737,7 +4715,7 @@ function vc(e) {
4737
4715
  s,
4738
4716
  d
4739
4717
  );
4740
- await Sc(
4718
+ await vc(
4741
4719
  f,
4742
4720
  e,
4743
4721
  a ? `${c}.esm` : c,
@@ -4745,11 +4723,11 @@ function vc(e) {
4745
4723
  d
4746
4724
  );
4747
4725
  const m = Date.now();
4748
- T.info(_, `CDN was built in ${m - l}ms`), r && await hc(e, r, `${a ? `${c}.esm` : c}.js`);
4726
+ T.info(_, `CDN was built in ${m - l}ms`), r && await gc(e, r, `${a ? `${c}.esm` : c}.js`);
4749
4727
  }
4750
4728
  };
4751
4729
  }
4752
- async function bc(e, t, i, n, s, r) {
4730
+ async function hc(e, t, i, n, s, r) {
4753
4731
  const a = e.environment;
4754
4732
  if (i.minify && r)
4755
4733
  throw Error(
@@ -4825,7 +4803,7 @@ ${cn(e._globalCssString, e)}`, d = s?.(c, e) ?? c;
4825
4803
  setup(l) {
4826
4804
  const p = e.options.build?.cdn?.namespace === void 0 ? (
4827
4805
  // eslint-disable-next-line require-unicode-regexp
4828
- new RegExp(`\\/${xe}\\/${ne}\\.css$`)
4806
+ new RegExp(`\\/${fe}\\/${ne}\\.css$`)
4829
4807
  ) : (
4830
4808
  // eslint-disable-next-line require-unicode-regexp
4831
4809
  new RegExp(`\\/${e.options.build.cdn.namespace}\\/${e.options.build.cdn.namespace}\\.css$`)
@@ -4857,7 +4835,7 @@ ${cn(e._globalCssString, e)}`, d = s?.(c, e) ?? c;
4857
4835
  }
4858
4836
  });
4859
4837
  }
4860
- async function Sc(e, t, i, n, s) {
4838
+ async function vc(e, t, i, n, s) {
4861
4839
  const r = t.dir.distCdn, a = `${i}.js`, c = new Map(
4862
4840
  e.outputFiles.map((d) => {
4863
4841
  const l = {
@@ -4868,13 +4846,13 @@ async function Sc(e, t, i, n, s) {
4868
4846
  }, p = d.path.slice(r.length);
4869
4847
  if (p === "stdin.js") {
4870
4848
  if (s) {
4871
- const m = d.text.match(wc)?.[0];
4849
+ const m = d.text.match(bc)?.[0];
4872
4850
  if (m === void 0)
4873
4851
  throw Error(
4874
4852
  `Failed to find the runtime variable name in the CDN entrypoint file. This likely indicates a bug in Lumina. stdin.js contents:
4875
4853
  ${d.text}`
4876
4854
  );
4877
- l.code = `${l.code.trimEnd()}${Tc(m, n)}`, l.isAsync = !1;
4855
+ l.code = `${l.code.trimEnd()}${Sc(m, n)}`, l.isAsync = !1;
4878
4856
  }
4879
4857
  return [a, l];
4880
4858
  }
@@ -4885,8 +4863,8 @@ ${d.text}`
4885
4863
  d.isAsync === void 0 && (l.endsWith(".js") ? Bn(d, c) : d.isAsync = !1);
4886
4864
  }), t.options.build?.cdn?.transformer?.(c, t), await Promise.all(Array.from(c.entries(), async ([d, { code: l }]) => await F(r + d, l)));
4887
4865
  }
4888
- const wc = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
4889
- function Tc(e, t) {
4866
+ const bc = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
4867
+ function Sc(e, t) {
4890
4868
  let i = [
4891
4869
  "window.$arcgis",
4892
4870
  "||",
@@ -4935,7 +4913,7 @@ function Bn(e, t) {
4935
4913
  e.isProcessing = !0;
4936
4914
  const i = [], n = [], s = [], r = /* @__PURE__ */ new Set(), a = [];
4937
4915
  let c = 0;
4938
- const d = e.code.matchAll(Ec);
4916
+ const d = e.code.matchAll(wc);
4939
4917
  for (const S of d) {
4940
4918
  const [k, N, q, D, L] = S, W = L.startsWith(Ve);
4941
4919
  if (c !== 0 && c !== S.index) {
@@ -4977,7 +4955,7 @@ ${O.code}`
4977
4955
  e.code = gi(e.code, t);
4978
4956
  return;
4979
4957
  }
4980
- const p = Pc(r);
4958
+ const p = Cc(r);
4981
4959
  let f = e.code.slice(0, c);
4982
4960
  for (let S = a.length - 1; S >= 0; S--) {
4983
4961
  const [k, N, q, D] = a[S];
@@ -4995,7 +4973,7 @@ ${O.code}`
4995
4973
  e.code = C;
4996
4974
  }
4997
4975
  function fi(e) {
4998
- const t = Cc.exec(e.code), i = t?.index ?? e.code.length;
4976
+ const t = Tc.exec(e.code), i = t?.index ?? e.code.length;
4999
4977
  let n = "";
5000
4978
  if (t !== null) {
5001
4979
  const s = t[1].split(",");
@@ -5011,7 +4989,7 @@ function fi(e) {
5011
4989
  }
5012
4990
  return [i, n];
5013
4991
  }
5014
- const Ec = /import(?:(\{[^}]+\})from|\*as ([\w$]+) from| ([\w$]+) from)?"([^"]+)";/gu, Cc = /export\{([^}]+)\};\n$/u, Ve = "@arcgis/core/";
4992
+ const wc = /import(?:(\{[^}]+\})from|\*as ([\w$]+) from| ([\w$]+) from)?"([^"]+)";/gu, Tc = /export\{([^}]+)\};\n$/u, Ve = "@arcgis/core/";
5015
4993
  function _n(e, t) {
5016
4994
  if (!e.startsWith("./"))
5017
4995
  return;
@@ -5023,7 +5001,7 @@ function _n(e, t) {
5023
5001
  return n;
5024
5002
  }
5025
5003
  function gi(e, t) {
5026
- return e.replaceAll($c, (i, n) => {
5004
+ return e.replaceAll(Ec, (i, n) => {
5027
5005
  if (n.startsWith(Ve))
5028
5006
  return `$arcgis.t(m=>m[0],"${Wn(n.slice(Ve.length))}")`;
5029
5007
  if (n.startsWith("./")) {
@@ -5034,28 +5012,28 @@ function gi(e, t) {
5034
5012
  return i;
5035
5013
  });
5036
5014
  }
5037
- const $c = /(?<![.\w\d])import\("([^"]+)"\)/gu, Wn = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
5038
- function Pc(e) {
5015
+ const Ec = /(?<![.\w\d])import\("([^"]+)"\)/gu, Wn = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
5016
+ function Cc(e) {
5039
5017
  const t = [wt];
5040
5018
  return () => {
5041
5019
  for (; ; ) {
5042
- const i = kc(t);
5043
- if (Ac(t), !e.has(i))
5020
+ const i = xc(t);
5021
+ if (Ic(t), !e.has(i))
5044
5022
  return e.add(i), i;
5045
5023
  }
5046
5024
  };
5047
5025
  }
5048
- const wt = 0, Rt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Hn = `${Rt}0123456789`, xc = Rt.length, Ic = Hn.length;
5049
- function kc(e) {
5026
+ const wt = 0, Rt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Hn = `${Rt}0123456789`, $c = Rt.length, Pc = Hn.length;
5027
+ function xc(e) {
5050
5028
  let t = Rt[e[0]];
5051
5029
  for (let i = 1; i < e.length; i++)
5052
5030
  t += Hn[e[i]];
5053
5031
  return t;
5054
5032
  }
5055
- function Ac(e) {
5033
+ function Ic(e) {
5056
5034
  let t = e.length - 1;
5057
5035
  for (; t >= 0; ) {
5058
- const i = t === 0 ? xc : Ic;
5036
+ const i = t === 0 ? $c : Pc;
5059
5037
  if (e[t] += 1, e[t] >= i)
5060
5038
  e[t] = wt, t--;
5061
5039
  else
@@ -5063,10 +5041,32 @@ function Ac(e) {
5063
5041
  }
5064
5042
  e.push(wt);
5065
5043
  }
5044
+ function Ze(e = R(), t = !1) {
5045
+ const i = e.version.includes("next"), n = e.name === "@esri/calcite-components";
5046
+ if (n && i)
5047
+ return `https://cdn.jsdelivr.net/npm/@esri/calcite-components@${e.version}/dist/${fe}/`;
5048
+ const s = t || i ? "jsdev.arcgis.com" : "js.arcgis.com", r = kc(e.name), a = Ac(e.version);
5049
+ if (a === void 0)
5050
+ throw Error(
5051
+ E(
5052
+ "@arcgis/lumina:dependencies",
5053
+ `Failed to parse a semver version: ${e.name}. Ensure the version follows D.D.D format. Package version: ${e.version}`
5054
+ )
5055
+ );
5056
+ return r.length === 0 ? `https://${s}/${a}/` : n ? `https://${s}/${r}/${a}/` : `https://${s}/${a}/${r}/`;
5057
+ }
5058
+ const kc = (e) => e.split("/").pop() ?? e;
5059
+ function Ac(e) {
5060
+ const t = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)(?<prerelease>-.*)?$/u, i = e.match(t);
5061
+ if (i?.groups === void 0)
5062
+ return;
5063
+ const { major: n, minor: s, patch: r, prerelease: a } = i.groups, c = `${n}.${s}.${r}`;
5064
+ return a?.startsWith("-next") ? `${c}-next` : c;
5065
+ }
5066
5066
  async function Nc(e, t, i, n, s) {
5067
5067
  const r = t.packageName, { hasCss: a, cdnName: c } = await Un(t.packageLocation) ?? {};
5068
5068
  if (i === "cdn") {
5069
- const f = t.cdnUrl ?? Xe(t.packageJson, s);
5069
+ const f = t.cdnUrl ?? Ze(t.packageJson, s);
5070
5070
  return [
5071
5071
  ...a ? [
5072
5072
  {
@@ -5130,13 +5130,13 @@ async function yi(e, t) {
5130
5130
  } : void 0;
5131
5131
  }
5132
5132
  async function Lc(e, t, i, n, s) {
5133
- const a = t.packageJson.exports?.[`./${ne}.css`] === void 0 ? await Un(t.packageLocation) : void 0, c = a?.cdnName ?? xe, d = a === void 0 ? `${Kn}.js` : `${a.cdnName}.esm.js`;
5133
+ const a = t.packageJson.exports?.[`./${ne}.css`] === void 0 ? await Un(t.packageLocation) : void 0, c = a?.cdnName ?? fe, d = a === void 0 ? `${Kn}.js` : `${a.cdnName}.esm.js`;
5134
5134
  if (i === "cdn")
5135
5135
  return {
5136
5136
  tag: "script",
5137
5137
  attrs: {
5138
5138
  type: "module",
5139
- src: `${t.cdnUrl ?? Xe(t.packageJson, s)}${d}`
5139
+ src: `${t.cdnUrl ?? Ze(t.packageJson, s)}${d}`
5140
5140
  }
5141
5141
  };
5142
5142
  const l = Fc(t.packageJson), p = `${t.packageName}/${u.normalize(l)}${ie}`, f = [
@@ -5167,7 +5167,7 @@ function Fc(e) {
5167
5167
  const i = Object.entries(t).filter(([s]) => u.extname(s) === ".css"), n = i.find(([, s]) => s === `./${ne}.css`);
5168
5168
  return n ? n[0] : i.length > 0 ? i[0][0] : `./${ne}.css`;
5169
5169
  }
5170
- async function Ee(e) {
5170
+ async function Ce(e) {
5171
5171
  return e._loadersCache ??= jc(e), await e._loadersCache;
5172
5172
  }
5173
5173
  async function jc(e) {
@@ -5180,7 +5180,7 @@ async function jc(e) {
5180
5180
  })
5181
5181
  )).filter(j).flat(), a = await Promise.all([
5182
5182
  // This may contain an import map so must be first
5183
- yc(n, t, i),
5183
+ fc(n, t, i),
5184
5184
  le.then(r),
5185
5185
  zn(e).then(r)
5186
5186
  ]), c = u.join(e.dir.src, "loader.ts");
@@ -5196,7 +5196,7 @@ async function jc(e) {
5196
5196
  javascriptCode: [
5197
5197
  `import { defineCustomElements } from "${c}";`,
5198
5198
  "globalThis.devOnly$ownTagNames = new Set();",
5199
- `defineCustomElements(${t === "cdn" ? `{resourcesUrl:"./${e.options.build?.cdn?.namespace ?? xe}/"}` : ""});`
5199
+ `defineCustomElements(${t === "cdn" ? `{resourcesUrl:"./${e.options.build?.cdn?.namespace ?? fe}/"}` : ""});`
5200
5200
  ]
5201
5201
  }
5202
5202
  ];
@@ -5234,7 +5234,7 @@ async function Oc(e) {
5234
5234
  !e.apiJsonEnabled
5235
5235
  )
5236
5236
  return hi(e);
5237
- const i = (await Ee(e)).map((n, s) => {
5237
+ const i = (await Ce(e)).map((n, s) => {
5238
5238
  if ("javascriptCode" in n)
5239
5239
  return n.javascriptCode.join(`
5240
5240
  `);
@@ -5316,7 +5316,7 @@ function Kc(e) {
5316
5316
  e.componentFiles.some((v) => v.startsWith(y)) && d();
5317
5317
  });
5318
5318
  function g(y) {
5319
- we(y, e.dir.srcComponents) && d();
5319
+ Te(y, e.dir.srcComponents) && d();
5320
5320
  }
5321
5321
  },
5322
5322
  buildEnd() {
@@ -5347,7 +5347,7 @@ function Kc(e) {
5347
5347
  ]), clearTimeout(C);
5348
5348
  }
5349
5349
  }
5350
- if (!we(m, e.dir.srcComponents))
5350
+ if (!Te(m, e.dir.srcComponents))
5351
5351
  return;
5352
5352
  y ??= await g();
5353
5353
  const v = Ko(e, m, y);
@@ -5381,7 +5381,7 @@ function Kc(e) {
5381
5381
  }];
5382
5382
  }
5383
5383
  const Tt = "@arcgis/lumina:provideAssets";
5384
- function he(e, t, i = Ot) {
5384
+ function ve(e, t, i = Ot) {
5385
5385
  if (e.viteCommand !== "serve")
5386
5386
  throw Error(E(Tt, "serveAssets() is only available when Vite is running in serve mode"));
5387
5387
  const n = e._serverConfigured, s = e.server.middlewares.stack.length;
@@ -5516,10 +5516,10 @@ function Uc(e) {
5516
5516
  e.viteCommand === "build" && (t = bi(e));
5517
5517
  },
5518
5518
  async configureServer(n) {
5519
- e.server = n, he(e, await t, i()), n.watcher.on("addDir", (s) => {
5519
+ e.server = n, ve(e, await t, i()), n.watcher.on("addDir", (s) => {
5520
5520
  if (s.endsWith("assets")) {
5521
5521
  const r = u.dirname(s);
5522
- u.join(r, "/") === e.dir.root ? he(e, [es], i()) : s.startsWith(e.dir.srcComponents) && he(e, [Yn(s, r)], i());
5522
+ u.join(r, "/") === e.dir.root ? ve(e, [es], i()) : s.startsWith(e.dir.srcComponents) && ve(e, [Yn(s, r)], i());
5523
5523
  }
5524
5524
  });
5525
5525
  },
@@ -5649,7 +5649,7 @@ const Yn = (e, t) => ({
5649
5649
  ...e.isInTest ? ["js-beautify"] : [],
5650
5650
  // Used by controllers. Need to add manually because @arcgis/lumina is
5651
5651
  // excluded per comment below, so Vite will discover these usages too late.
5652
- ...Pe ? ["@arcgis/core/applications/Components/reactiveUtils.js", "@arcgis/core/core/reactiveUtils.js"] : []
5652
+ ...xe ? ["@arcgis/core/applications/Components/reactiveUtils.js", "@arcgis/core/core/reactiveUtils.js"] : []
5653
5653
  ],
5654
5654
  /**
5655
5655
  * Workaround for https://github.com/vitejs/vite/issues/18947. Affects all
@@ -5799,7 +5799,7 @@ const Yn = (e, t) => ({
5799
5799
  name: "@arcgis/lumina:setAssetPath",
5800
5800
  apply: () => e.viteCommand === "build",
5801
5801
  config: (t) => ({
5802
- base: t.base ?? e.options.assets?.defaultPath ?? Xe()
5802
+ base: t.base ?? e.options.assets?.defaultPath ?? Ze()
5803
5803
  })
5804
5804
  });
5805
5805
  function Yc(e = R()) {
@@ -5828,7 +5828,7 @@ const el = (e) => `/*! ${e} */`, x = (e) => (t, i) => {
5828
5828
  enumerable: !0
5829
5829
  });
5830
5830
  };
5831
- function ge(e) {
5831
+ function ye(e) {
5832
5832
  if (u.isAbsolute(e))
5833
5833
  throw Error(
5834
5834
  E(
@@ -5838,7 +5838,7 @@ function ge(e) {
5838
5838
  );
5839
5839
  return De(e);
5840
5840
  }
5841
- const ye = {
5841
+ const he = {
5842
5842
  vsCodeHtml: "docs/vscode.html-custom-data.json",
5843
5843
  vsCodeCss: "docs/vscode.css-custom-data.json",
5844
5844
  webTypes: "docs/web-types.json",
@@ -5921,7 +5921,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
5921
5921
  // Add imports to index.html before Vite starts resolving imports
5922
5922
  order: "pre",
5923
5923
  async handler(t, i) {
5924
- return is(e, i) ? (await Ee(e)).map(
5924
+ return is(e, i) ? (await Ce(e)).map(
5925
5925
  (s) => "javascriptCode" in s ? {
5926
5926
  tag: "script",
5927
5927
  attrs: {
@@ -5948,7 +5948,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
5948
5948
  async buildStart() {
5949
5949
  if (e.viteCommand !== "serve")
5950
5950
  return;
5951
- const i = (await Ee(e)).flatMap((n) => {
5951
+ const i = (await Ce(e)).flatMap((n) => {
5952
5952
  if ("javascriptCode" in n)
5953
5953
  return n.optimizableImports;
5954
5954
  if ("cssHref" in n)
@@ -5965,7 +5965,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
5965
5965
  });
5966
5966
  async function rl(e) {
5967
5967
  const i = (await Promise.all([le, zn(e)])).flat();
5968
- if (!await ts(i, e.dir.src, Pe))
5968
+ if (!await ts(i, e.dir.src, xe))
5969
5969
  return;
5970
5970
  let s = !1;
5971
5971
  function r() {
@@ -6050,7 +6050,7 @@ class $ {
6050
6050
  this.viteConfig = l;
6051
6051
  const p = l.build.minify !== !1;
6052
6052
  this.shouldMinify = p && this.viteCommand !== "serve", Object.hasOwn(this, "shouldMinifyJsx") || (this.shouldMinifyJsx = this.viteCommand !== "serve" || this.isInTest);
6053
- const f = u.join(l.root, u.sep), m = u.join(f, "src", u.sep), g = u.join(m, "components", u.sep), y = u.join(u.resolve(f, l.build.outDir), u.sep), h = u.join(u.relative(f, y), u.sep), v = u.join(y, "components", u.sep), b = u.join(y, this.options.build?.cdn?.namespace ?? xe, u.sep), w = u.join(b, "assets", u.sep);
6053
+ const f = u.join(l.root, u.sep), m = u.join(f, "src", u.sep), g = u.join(m, "components", u.sep), y = u.join(u.resolve(f, l.build.outDir), u.sep), h = u.join(u.relative(f, y), u.sep), v = u.join(y, "components", u.sep), b = u.join(y, this.options.build?.cdn?.namespace ?? fe, u.sep), w = u.join(b, "assets", u.sep);
6054
6054
  if (this.dir = {
6055
6055
  root: f,
6056
6056
  src: m,
@@ -6075,7 +6075,7 @@ class $ {
6075
6075
  "Vite output directory is outside the root directory. This is not officially supported by Lumina and may lead to unexpected behavior. Contact Lumina maintainers if you need this to be supported."
6076
6076
  ), this.isInStorybook = l.resolve.conditions.includes("storybook"), this.isFullApiExtraction = this.viteCommand === "build" || this.isInStorybook, this.hmrEnabled = this.viteCommand === "serve" && !this.isInTest && !!(l.server?.hmr ?? !0), this.isInBuildWatch = l.command === "build" && l.build.watch != null;
6077
6077
  const P = this.isInTest && l.test?.browser?.enabled === !0 && l.resolve.conditions.includes("node"), A = this.isInTest && l.test?.browser?.enabled !== !0 && l.resolve.conditions.includes("node");
6078
- this.apiJsonEnabled = !P && !this.isInPuppeteerTestBackEnd && !A, this.apiJsonEnabled || (this._localDefinedComponents = {}, this.options.build ??= {}, this.options.build.dependencies ??= {}, this.options.build.dependencies.silenceUnknownJsxElementUsage = () => !0, this.typeScriptHost = o.createCompilerHost({}, !1)), this._startCollectingComponentStories(), gc(this, l.build.sourcemap !== !1), is(this) && Ee(this);
6078
+ this.apiJsonEnabled = !P && !this.isInPuppeteerTestBackEnd && !A, this.apiJsonEnabled || (this._localDefinedComponents = {}, this.options.build ??= {}, this.options.build.dependencies ??= {}, this.options.build.dependencies.silenceUnknownJsxElementUsage = () => !0, this.typeScriptHost = o.createCompilerHost({}, !1)), this._startCollectingComponentStories(), uc(this, l.build.sourcemap !== !1), is(this) && Ce(this);
6079
6079
  }
6080
6080
  },
6081
6081
  configureServer: {
@@ -6112,12 +6112,12 @@ class $ {
6112
6112
  );
6113
6113
  const c = t.documentation ?? {};
6114
6114
  this._documentationFileNames = {
6115
- apiJson: c.apiJsonFileName === !1 ? void 0 : c.apiJsonFileName ? ge(c.apiJsonFileName) : ye.apiJson,
6116
- stencilLikeDocsJson: c.stencilLikeDocsJsonFileName === !1 ? void 0 : c.stencilLikeDocsJsonFileName ? ge(c.stencilLikeDocsJsonFileName) : ye.stencilLikeDocsJson,
6117
- webTypes: c.jetBrains === !1 ? void 0 : c.jetBrains?.webTypesFileName ? ge(c.jetBrains.webTypesFileName) : ye.webTypes,
6118
- vsCodeHtml: c.vsCode === !1 ? void 0 : c.vsCode?.htmlFileName ? ge(c.vsCode.htmlFileName) : ye.vsCodeHtml,
6119
- vsCodeCss: c.vsCode === !1 ? void 0 : c.vsCode?.cssFileName ? ge(c.vsCode.cssFileName) : ye.vsCodeCss
6120
- }, vn(void 0, t), this.componentFilesPromise = We(this, u.resolve("src/components")), fc(this);
6115
+ apiJson: c.apiJsonFileName === !1 ? void 0 : c.apiJsonFileName ? ye(c.apiJsonFileName) : he.apiJson,
6116
+ stencilLikeDocsJson: c.stencilLikeDocsJsonFileName === !1 ? void 0 : c.stencilLikeDocsJsonFileName ? ye(c.stencilLikeDocsJsonFileName) : he.stencilLikeDocsJson,
6117
+ webTypes: c.jetBrains === !1 ? void 0 : c.jetBrains?.webTypesFileName ? ye(c.jetBrains.webTypesFileName) : he.webTypes,
6118
+ vsCodeHtml: c.vsCode === !1 ? void 0 : c.vsCode?.htmlFileName ? ye(c.vsCode.htmlFileName) : he.vsCodeHtml,
6119
+ vsCodeCss: c.vsCode === !1 ? void 0 : c.vsCode?.cssFileName ? ye(c.vsCode.cssFileName) : he.vsCodeCss
6120
+ }, vn(void 0, t), this.componentFilesPromise = We(this, u.resolve("src/components")), mc(this);
6121
6121
  const d = t.build?.preamble ?? Yc();
6122
6122
  this.banner = el(d);
6123
6123
  }
@@ -6195,7 +6195,7 @@ class $ {
6195
6195
  if (Array.isArray(this.assetsToProvide))
6196
6196
  this.assetsToProvide.push({ assets: t, transformers: i, apply: n });
6197
6197
  else if (this.viteCommand === "serve")
6198
- n === "serve" && he(this, t, i);
6198
+ n === "serve" && ve(this, t, i);
6199
6199
  else
6200
6200
  throw Error(
6201
6201
  E(
@@ -6307,7 +6307,7 @@ const Ci = "makeRuntime(", yl = "@arcgis/core", hl = "@arcgis/lumina:injectRunti
6307
6307
  const s = n + Ci.length, r = e.options.css?.commonStylesPath;
6308
6308
  return {
6309
6309
  code: [
6310
- r === void 0 ? "" : `import commonStyles from "${Ce(e.dir.src, r)}${_e}";`,
6310
+ r === void 0 ? "" : `import commonStyles from "${$e(e.dir.src, r)}${_e}";`,
6311
6311
  t.slice(0, s),
6312
6312
  "{",
6313
6313
  "defaultAssetPath:import.meta.env.BASE_URL,",
@@ -6317,7 +6317,7 @@ const Ci = "makeRuntime(", yl = "@arcgis/core", hl = "@arcgis/lumina:injectRunti
6317
6317
  r === void 0 ? "" : "commonStyles",
6318
6318
  "}",
6319
6319
  t.slice(s),
6320
- Pe ? `
6320
+ xe ? `
6321
6321
  import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${yl}/applications/Components/reactiveUtils.js";
6322
6322
  createObservable,
6323
6323
  runtime.t = trackAccess;
@@ -6331,7 +6331,7 @@ runtime.r = runTracked;` : ""
6331
6331
  }
6332
6332
  });
6333
6333
  function bl(e) {
6334
- return `import "../${e.options.build?.cdn?.namespace === void 0 ? `${xe}/${ne}.css` : `${e.options.build.cdn.namespace}/${e.options.build.cdn.namespace}.css`}";
6334
+ return `import "../${e.options.build?.cdn?.namespace === void 0 ? `${fe}/${ne}.css` : `${e.options.build.cdn.namespace}/${e.options.build.cdn.namespace}.css`}";
6335
6335
  `;
6336
6336
  }
6337
6337
  const je = "@arcgis/lumina:addNonLazyImports", Sl = (e) => ({
@@ -6340,7 +6340,7 @@ const je = "@arcgis/lumina:addNonLazyImports", Sl = (e) => ({
6340
6340
  generateBundle(t, i) {
6341
6341
  let n = !1;
6342
6342
  if (Object.entries(i).forEach(([s, r]) => {
6343
- const a = be(s, "components/", e);
6343
+ const a = Se(s, "components/", e);
6344
6344
  if (a !== s && (r.fileName = a), r.type === "chunk") {
6345
6345
  const c = u.dirname(u.join(e.dir.dist, s)), d = a === s ? c : u.dirname(u.join(e.dir.dist, a));
6346
6346
  let l = r.code;
@@ -6353,7 +6353,7 @@ const je = "@arcgis/lumina:addNonLazyImports", Sl = (e) => ({
6353
6353
  if (e.isInStorybook)
6354
6354
  return;
6355
6355
  const t = e._customElementDependencies, i = Object.entries(t), n = new Set(
6356
- i.map(([r]) => r).filter((r) => we(r, e.dir.srcComponents))
6356
+ i.map(([r]) => r).filter((r) => Te(r, e.dir.srcComponents))
6357
6357
  );
6358
6358
  i.forEach(([r, { referencedTagNames: a, referencedDeferredTagNames: c, referencedBy: d }]) => {
6359
6359
  if (n.has(r) || a.length === 0 && c.length === 0)
@@ -6379,12 +6379,12 @@ Possible causes:
6379
6379
  const s = i.flatMap(([r, { referencedTagNames: a, referencedDeferredTagNames: c }]) => {
6380
6380
  if (!n.has(r))
6381
6381
  return [];
6382
- const d = u.dirname(r), l = be(d, e.dir.srcComponents, e), p = u.relative(e.dir.src, l);
6382
+ const d = u.dirname(r), l = Se(d, e.dir.srcComponents, e), p = u.relative(e.dir.src, l);
6383
6383
  function f(S) {
6384
- const k = qa(e, S, r);
6384
+ const k = Ua(e, S, r);
6385
6385
  if (k === void 0)
6386
6386
  return;
6387
- const N = Va(k, p);
6387
+ const N = za(k, p);
6388
6388
  if (N !== `./${p}`)
6389
6389
  return N.startsWith(".") ? `${N}/${$i}` : N;
6390
6390
  }
@@ -6415,7 +6415,7 @@ deferredLoaders${w.join("")};` : P;
6415
6415
  }), $i = "index.js", wl = "index.d.ts", ns = (e, t, i, n = /* @__PURE__ */ new Set()) => t.flatMap((s) => i.has(s) ? [s] : n.has(s) ? [] : (n.add(s), ns(e, e[s].referencedBy, i, n))), Tl = (e) => ({
6416
6416
  name: "@arcgis/lumina:handleDynamicAssets",
6417
6417
  configureServer(t) {
6418
- e.server = t, Pi(e).forEach(({ assets: i, transformers: n }) => he(e, i, n));
6418
+ e.server = t, Pi(e).forEach(({ assets: i, transformers: n }) => ve(e, i, n));
6419
6419
  },
6420
6420
  async writeBundle() {
6421
6421
  await Promise.all(
@@ -6470,7 +6470,7 @@ function $l(e, t) {
6470
6470
  const l = s(r.webTypes);
6471
6471
  e["web-types"] !== l && (n = !0, e["web-types"] = l);
6472
6472
  }
6473
- const a = `./${ne}.css`, c = t.options.build?.cdn?.namespace !== void 0, d = Ce(
6473
+ const a = `./${ne}.css`, c = t.options.build?.cdn?.namespace !== void 0, d = $e(
6474
6474
  t.dir.root,
6475
6475
  u.join(t.dir.distCdn, a)
6476
6476
  );
@@ -6782,7 +6782,7 @@ ${e.map(({ tagName: t, pascalCaseName: i }) => ` "${t}": Lumina${i};`).join
6782
6782
  }
6783
6783
  }`;
6784
6784
  function Xl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6785
- const [s, r] = $e(e, i);
6785
+ const [s, r] = Pe(e, i);
6786
6786
  return [
6787
6787
  `interface Lumina${t} extends ${s}h.JSX.HTMLAttributes<HTML${t}Element> {
6788
6788
  `,
@@ -6816,7 +6816,7 @@ ${t}
6816
6816
  }`;
6817
6817
  }
6818
6818
  function Zl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6819
- const [s, r] = $e(e, i);
6819
+ const [s, r] = Pe(e, i);
6820
6820
  return [
6821
6821
  `interface Preact${t} extends ${s}HTMLAttributes<HTML${t}Element> {
6822
6822
  `,
@@ -6861,7 +6861,7 @@ ${t}
6861
6861
  }`;
6862
6862
  }
6863
6863
  function ed({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6864
- const [s, r] = $e(e, i);
6864
+ const [s, r] = Pe(e, i);
6865
6865
  return [
6866
6866
  `interface React${t} extends ${s}HTMLProps<HTML${t}Element> {
6867
6867
  `,
@@ -6895,7 +6895,7 @@ declare module "@stencil/core/internal/stencil-public-runtime" {
6895
6895
  }
6896
6896
  }`;
6897
6897
  function id({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6898
- const [s, r] = $e(e, i);
6898
+ const [s, r] = Pe(e, i);
6899
6899
  return [
6900
6900
  `interface Stencil${t} extends ${s}StencilJsx.HTMLAttributes<HTML${t}Element> {
6901
6901
  `,
@@ -6970,7 +6970,7 @@ ${t}
6970
6970
  }`;
6971
6971
  }
6972
6972
  function cd({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6973
- const [s, r] = $e(e, i);
6973
+ const [s, r] = Pe(e, i);
6974
6974
  return [
6975
6975
  `/** @deprecated Update to Preact 10.27.2+ or 11+ and consume types/preact file over types/preact10 */
6976
6976
  `,
@@ -6992,7 +6992,7 @@ function ld(e) {
6992
6992
  generateBundle() {
6993
6993
  if (e.isInStorybook)
6994
6994
  return;
6995
- t = Da(e);
6995
+ t = Fa(e);
6996
6996
  const i = u.join(e.dir.dist, "index.d.ts");
6997
6997
  e._declarationTextTransformers.push((n) => {
6998
6998
  const { filePath: s, content: r } = n;
@@ -7074,7 +7074,7 @@ function Fd(e = {}) {
7074
7074
  Kc(t),
7075
7075
  ld(t),
7076
7076
  Vl(t),
7077
- mc(t),
7077
+ dc(t),
7078
7078
  vl(t),
7079
7079
  qr(t),
7080
7080
  Uc(t),
@@ -7082,7 +7082,7 @@ function Fd(e = {}) {
7082
7082
  Sl(t),
7083
7083
  sl(t),
7084
7084
  Rs(t),
7085
- vc(t),
7085
+ yc(t),
7086
7086
  dd(t),
7087
7087
  zc(t)
7088
7088
  ].filter(j);
@@ -7099,11 +7099,11 @@ const jd = {
7099
7099
  alwaysAttributes: Vi,
7100
7100
  nativeAlwaysAttributes: Gi,
7101
7101
  htmlAlwaysAttributes: ht,
7102
- isPropertyEscapeNeeded: Ze
7102
+ isPropertyEscapeNeeded: Qe
7103
7103
  };
7104
7104
  export {
7105
7105
  Ue as LuminaApiExtractor,
7106
7106
  jd as exportsForCodemod,
7107
- Xe as inferCdnUrl,
7107
+ Ze as inferCdnUrl,
7108
7108
  Fd as useLumina
7109
7109
  };