@stencil/core 4.36.3 → 4.37.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.
Files changed (38) hide show
  1. package/cli/index.cjs +6 -1
  2. package/cli/index.js +6 -1
  3. package/cli/package.json +1 -1
  4. package/compiler/package.json +1 -1
  5. package/compiler/stencil.js +1153 -858
  6. package/dev-server/client/index.js +1 -1
  7. package/dev-server/client/package.json +1 -1
  8. package/dev-server/connector.html +2 -2
  9. package/dev-server/index.js +1 -1
  10. package/dev-server/package.json +1 -1
  11. package/dev-server/server-process.js +7 -2
  12. package/internal/app-data/package.json +1 -1
  13. package/internal/app-globals/package.json +1 -1
  14. package/internal/client/index.js +41 -15
  15. package/internal/client/package.json +1 -1
  16. package/internal/client/patch-browser.js +1 -1
  17. package/internal/hydrate/index.js +45 -19
  18. package/internal/hydrate/package.json +1 -1
  19. package/internal/hydrate/runner.js +8 -2
  20. package/internal/package.json +1 -1
  21. package/internal/stencil-core/index.d.ts +1 -0
  22. package/internal/stencil-core/index.js +1 -0
  23. package/internal/stencil-private.d.ts +3 -0
  24. package/internal/stencil-public-runtime.d.ts +21 -0
  25. package/internal/testing/index.js +19 -3
  26. package/internal/testing/package.json +1 -1
  27. package/mock-doc/index.cjs +1 -1
  28. package/mock-doc/index.js +1 -1
  29. package/mock-doc/package.json +1 -1
  30. package/package.json +2 -2
  31. package/screenshot/index.js +6 -1
  32. package/screenshot/package.json +1 -1
  33. package/screenshot/pixel-match.js +1 -1
  34. package/sys/node/index.js +25 -25
  35. package/sys/node/package.json +1 -1
  36. package/sys/node/worker.js +1 -1
  37. package/testing/index.js +3 -1
  38. package/testing/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Compiler v4.36.3 | MIT Licensed | https://stenciljs.com
2
+ Stencil Compiler v4.37.0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;
@@ -77616,10 +77616,10 @@ ${lanes.join("\n")}
77616
77616
  const baseClassType = classType && getBaseTypes(classType)[0];
77617
77617
  return baseClassType && getTypeOfPropertyOfType(baseClassType, property3.escapedName);
77618
77618
  }
77619
- function isPropertyInClassDerivedFrom(prop, baseClass) {
77619
+ function isPropertyInClassDerivedFrom(prop, baseClass2) {
77620
77620
  return forEachProperty2(prop, (sp) => {
77621
77621
  const sourceClass = getDeclaringClass(sp);
77622
- return sourceClass ? hasBaseType(sourceClass, baseClass) : false;
77622
+ return sourceClass ? hasBaseType(sourceClass, baseClass2) : false;
77623
77623
  });
77624
77624
  }
77625
77625
  function isValidOverrideOf(sourceProp, targetProp) {
@@ -232674,7 +232674,7 @@ module.exports = __toCommonJS(index_exports);
232674
232674
  var import_typescript70 = __toESM(require_typescript_5_5_4_bundle_cache_min());
232675
232675
 
232676
232676
  // src/version.ts
232677
- var buildId = "1755687753";
232677
+ var buildId = "1757722623";
232678
232678
  var minfyJsId = "terser5.37.0_7";
232679
232679
  var optimizeCssId = "autoprefixer10.4.19_postcss8.5.3_7";
232680
232680
  var parse5Version = "7.2.1";
@@ -232682,8 +232682,8 @@ var rollupVersion = "4.34.9";
232682
232682
  var jqueryVersion = "4.0.0-pre";
232683
232683
  var terserVersion = "5.37.0";
232684
232684
  var typescriptVersion = "5.5.4";
232685
- var vermoji = "\u{1F408}";
232686
- var version = "4.36.3";
232685
+ var vermoji = "\u26F4";
232686
+ var version = "4.37.0";
232687
232687
  var versions = {
232688
232688
  stencil: version,
232689
232689
  parse5: parse5Version,
@@ -234255,6 +234255,11 @@ var scopeCss = (cssText, scopeId, commentOriginalSelector) => {
234255
234255
  var CAPTURE_EVENT_SUFFIX = "Capture";
234256
234256
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
234257
234257
 
234258
+ // src/runtime/mixin.ts
234259
+ var baseClass = BUILD.lazyLoad ? class {
234260
+ } : globalThis.HTMLElement || class {
234261
+ };
234262
+
234258
234263
  // src/utils/sourcemaps.ts
234259
234264
  function rollupToStencilSourceMap(rollupSourceMap) {
234260
234265
  if (!rollupSourceMap || !rollupSourceMap.file) {
@@ -234585,6 +234590,8 @@ var getModuleLegacy = (compilerCtx, sourceFilePath) => {
234585
234590
  sourceFilePath,
234586
234591
  jsFilePath,
234587
234592
  cmps: [],
234593
+ isExtended: false,
234594
+ isMixin: false,
234588
234595
  coreRuntimeApis: [],
234589
234596
  outputTargetCoreRuntimeApis: {},
234590
234597
  collectionName: null,
@@ -236260,17 +236267,261 @@ var transformToAbs = (copyTask, dest) => {
236260
236267
  };
236261
236268
 
236262
236269
  // src/compiler/output-targets/dist-collection/index.ts
236263
- var import_typescript6 = __toESM(require_typescript_5_5_4_bundle_cache_min());
236270
+ var import_typescript11 = __toESM(require_typescript_5_5_4_bundle_cache_min());
236264
236271
 
236265
236272
  // src/compiler/transformers/map-imports-to-path-aliases.ts
236266
236273
  var import_path7 = require("path");
236267
- var import_typescript5 = __toESM(require_typescript_5_5_4_bundle_cache_min());
236274
+ var import_typescript10 = __toESM(require_typescript_5_5_4_bundle_cache_min());
236268
236275
 
236269
236276
  // src/compiler/transformers/transform-utils.ts
236277
+ var import_typescript9 = __toESM(require_typescript_5_5_4_bundle_cache_min());
236278
+
236279
+ // src/compiler/transformers/component-lazy/lazy-constructor.ts
236280
+ var import_typescript5 = __toESM(require_typescript_5_5_4_bundle_cache_min());
236281
+
236282
+ // src/compiler/transformers/core-runtime-apis.ts
236283
+ var CREATE_EVENT = "__stencil_createEvent";
236284
+ var DEFINE_CUSTOM_ELEMENT = "__stencil_defineCustomElement";
236285
+ var GET_ELEMENT = "__stencil_getElement";
236286
+ var HOST = "__stencil_Host";
236287
+ var HTML_ELEMENT = "HTMLElement";
236288
+ var PROXY_CUSTOM_ELEMENT = "__stencil_proxyCustomElement";
236289
+ var REGISTER_INSTANCE = "__stencil_registerInstance";
236290
+ var REGISTER_HOST = "__stencil_registerHost";
236291
+ var H2 = "__stencil_h";
236292
+ var RUNTIME_APIS = {
236293
+ createEvent: `createEvent as ${CREATE_EVENT}`,
236294
+ defineCustomElement: `defineCustomElement as ${DEFINE_CUSTOM_ELEMENT}`,
236295
+ getElement: `getElement as ${GET_ELEMENT}`,
236296
+ h: `h as ${H2}`,
236297
+ legacyH: `h`,
236298
+ Host: `Host as ${HOST}`,
236299
+ HTMLElement: HTML_ELEMENT,
236300
+ proxyCustomElement: `proxyCustomElement as ${PROXY_CUSTOM_ELEMENT}`,
236301
+ registerHost: `registerHost as ${REGISTER_HOST}`,
236302
+ registerInstance: `registerInstance as ${REGISTER_INSTANCE}`
236303
+ };
236304
+ var addCoreRuntimeApi = (moduleFile, coreRuntimeApi) => {
236305
+ if (!moduleFile.coreRuntimeApis.includes(coreRuntimeApi)) {
236306
+ moduleFile.coreRuntimeApis.push(coreRuntimeApi);
236307
+ }
236308
+ };
236309
+ var addOutputTargetCoreRuntimeApi = (moduleFile, outputTarget, coreRuntimeApi) => {
236310
+ if (!moduleFile.outputTargetCoreRuntimeApis[outputTarget]) {
236311
+ moduleFile.outputTargetCoreRuntimeApis[outputTarget] = [];
236312
+ }
236313
+ if (!moduleFile.outputTargetCoreRuntimeApis[outputTarget].includes(coreRuntimeApi)) {
236314
+ moduleFile.outputTargetCoreRuntimeApis[outputTarget].push(coreRuntimeApi);
236315
+ }
236316
+ };
236317
+ var addLegacyApis = (moduleFile) => {
236318
+ addCoreRuntimeApi(moduleFile, RUNTIME_APIS.legacyH);
236319
+ };
236320
+
236321
+ // src/compiler/transformers/create-event.ts
236322
+ var import_typescript3 = __toESM(require_typescript_5_5_4_bundle_cache_min());
236323
+ var addCreateEvents = (moduleFile, cmp) => {
236324
+ var _a2;
236325
+ if (!((_a2 = cmp == null ? void 0 : cmp.events) == null ? void 0 : _a2.length)) {
236326
+ return [];
236327
+ }
236328
+ return cmp.events.map((ev) => {
236329
+ addCoreRuntimeApi(moduleFile, RUNTIME_APIS.createEvent);
236330
+ return import_typescript3.default.factory.createExpressionStatement(
236331
+ import_typescript3.default.factory.createAssignment(
236332
+ import_typescript3.default.factory.createPropertyAccessExpression(import_typescript3.default.factory.createThis(), import_typescript3.default.factory.createIdentifier(ev.method)),
236333
+ import_typescript3.default.factory.createCallExpression(import_typescript3.default.factory.createIdentifier(CREATE_EVENT), void 0, [
236334
+ import_typescript3.default.factory.createThis(),
236335
+ import_typescript3.default.factory.createStringLiteral(ev.name),
236336
+ import_typescript3.default.factory.createNumericLiteral(computeFlags(ev))
236337
+ ])
236338
+ )
236339
+ );
236340
+ });
236341
+ };
236342
+ var computeFlags = (eventMeta) => {
236343
+ let flags = 0;
236344
+ if (eventMeta.bubbles) {
236345
+ flags |= 4 /* Bubbles */;
236346
+ }
236347
+ if (eventMeta.composed) {
236348
+ flags |= 2 /* Composed */;
236349
+ }
236350
+ if (eventMeta.cancelable) {
236351
+ flags |= 1 /* Cancellable */;
236352
+ }
236353
+ return flags;
236354
+ };
236355
+
236356
+ // src/compiler/transformers/component-lazy/attach-internals.ts
236270
236357
  var import_typescript4 = __toESM(require_typescript_5_5_4_bundle_cache_min());
236271
236358
 
236359
+ // src/compiler/transformers/component-lazy/constants.ts
236360
+ var HOST_REF_ARG = "hostRef";
236361
+
236362
+ // src/compiler/transformers/component-lazy/attach-internals.ts
236363
+ function createLazyAttachInternalsBinding(cmp) {
236364
+ if (!(cmp == null ? void 0 : cmp.attachInternalsMemberName)) {
236365
+ return [];
236366
+ }
236367
+ if (cmp.attachInternalsMemberName) {
236368
+ return [
236369
+ import_typescript4.default.factory.createIfStatement(
236370
+ // the condition for the `if` statement here is just whether the
236371
+ // following is defined:
236372
+ //
236373
+ // ```ts
236374
+ // hostRef.$hostElement$["s-ei"]
236375
+ // ```
236376
+ hostRefElementInternalsPropAccess(),
236377
+ import_typescript4.default.factory.createBlock(
236378
+ [
236379
+ // this `ts.factory` call creates the following statement:
236380
+ //
236381
+ // ```ts
236382
+ // this.${ cmp.formInternalsMemberName } = hostRef.$hostElement$['s-ei'];
236383
+ // ```
236384
+ import_typescript4.default.factory.createExpressionStatement(
236385
+ import_typescript4.default.factory.createBinaryExpression(
236386
+ import_typescript4.default.factory.createPropertyAccessExpression(
236387
+ import_typescript4.default.factory.createThis(),
236388
+ // use the name set on the {@link d.ComponentCompilerMeta}
236389
+ import_typescript4.default.factory.createIdentifier(cmp.attachInternalsMemberName)
236390
+ ),
236391
+ import_typescript4.default.factory.createToken(import_typescript4.default.SyntaxKind.EqualsToken),
236392
+ hostRefElementInternalsPropAccess()
236393
+ )
236394
+ )
236395
+ ],
236396
+ true
236397
+ ),
236398
+ import_typescript4.default.factory.createBlock(
236399
+ [
236400
+ // this `ts.factory` call creates the following statement:
236401
+ //
236402
+ // ```ts
236403
+ // this.${ cmp.attachInternalsMemberName } = hostRef.$hostElement$.attachInternals();
236404
+ // ```
236405
+ import_typescript4.default.factory.createExpressionStatement(
236406
+ import_typescript4.default.factory.createBinaryExpression(
236407
+ import_typescript4.default.factory.createPropertyAccessExpression(
236408
+ import_typescript4.default.factory.createThis(),
236409
+ // use the name set on the {@link d.ComponentCompilerMeta}
236410
+ import_typescript4.default.factory.createIdentifier(cmp.attachInternalsMemberName)
236411
+ ),
236412
+ import_typescript4.default.factory.createToken(import_typescript4.default.SyntaxKind.EqualsToken),
236413
+ import_typescript4.default.factory.createCallExpression(
236414
+ import_typescript4.default.factory.createPropertyAccessExpression(
236415
+ import_typescript4.default.factory.createPropertyAccessExpression(
236416
+ import_typescript4.default.factory.createIdentifier(HOST_REF_ARG),
236417
+ import_typescript4.default.factory.createIdentifier("$hostElement$")
236418
+ ),
236419
+ import_typescript4.default.factory.createIdentifier("attachInternals")
236420
+ ),
236421
+ void 0,
236422
+ []
236423
+ )
236424
+ )
236425
+ ),
236426
+ // this `ts.factory` call produces the following:
236427
+ //
236428
+ // ```ts
236429
+ // hostRef.$hostElement$['s-ei'] = this.${ cmp.attachInternalsMemberName };
236430
+ // ```
236431
+ import_typescript4.default.factory.createExpressionStatement(
236432
+ import_typescript4.default.factory.createBinaryExpression(
236433
+ hostRefElementInternalsPropAccess(),
236434
+ import_typescript4.default.factory.createToken(import_typescript4.default.SyntaxKind.EqualsToken),
236435
+ import_typescript4.default.factory.createPropertyAccessExpression(
236436
+ import_typescript4.default.factory.createThis(),
236437
+ // use the name set on the {@link d.ComponentCompilerMeta}
236438
+ import_typescript4.default.factory.createIdentifier(cmp.attachInternalsMemberName)
236439
+ )
236440
+ )
236441
+ )
236442
+ ],
236443
+ true
236444
+ )
236445
+ )
236446
+ ];
236447
+ } else {
236448
+ return [];
236449
+ }
236450
+ }
236451
+ function hostRefElementInternalsPropAccess() {
236452
+ return import_typescript4.default.factory.createElementAccessExpression(
236453
+ import_typescript4.default.factory.createPropertyAccessExpression(
236454
+ import_typescript4.default.factory.createIdentifier(HOST_REF_ARG),
236455
+ import_typescript4.default.factory.createIdentifier("$hostElement$")
236456
+ ),
236457
+ import_typescript4.default.factory.createStringLiteral("s-ei")
236458
+ );
236459
+ }
236460
+
236461
+ // src/compiler/transformers/component-lazy/lazy-constructor.ts
236462
+ var updateLazyComponentConstructor = (classMembers, classNode, moduleFile, cmp) => {
236463
+ const cstrMethodArgs = [
236464
+ import_typescript5.default.factory.createParameterDeclaration(void 0, void 0, import_typescript5.default.factory.createIdentifier(HOST_REF_ARG))
236465
+ ];
236466
+ const cstrStatements = [
236467
+ registerInstanceStatement(moduleFile),
236468
+ ...addCreateEvents(moduleFile, cmp),
236469
+ ...createLazyAttachInternalsBinding(cmp)
236470
+ ];
236471
+ updateConstructor(classNode, classMembers, cstrStatements, cstrMethodArgs);
236472
+ };
236473
+ var registerInstanceStatement = (moduleFile) => {
236474
+ addCoreRuntimeApi(moduleFile, RUNTIME_APIS.registerInstance);
236475
+ return import_typescript5.default.factory.createExpressionStatement(
236476
+ import_typescript5.default.factory.createCallExpression(import_typescript5.default.factory.createIdentifier(REGISTER_INSTANCE), void 0, [
236477
+ import_typescript5.default.factory.createThis(),
236478
+ import_typescript5.default.factory.createIdentifier(HOST_REF_ARG)
236479
+ ])
236480
+ );
236481
+ };
236482
+
236483
+ // src/compiler/transformers/remove-static-meta-properties.ts
236484
+ var import_typescript6 = __toESM(require_typescript_5_5_4_bundle_cache_min());
236485
+ var removeStaticMetaProperties = (classNode) => {
236486
+ if (classNode.members == null) {
236487
+ return [];
236488
+ }
236489
+ return classNode.members.filter((classMember) => {
236490
+ var _a2;
236491
+ if ((_a2 = retrieveTsModifiers(classMember)) == null ? void 0 : _a2.some((m) => m.kind === import_typescript6.default.SyntaxKind.StaticKeyword)) {
236492
+ const memberName = classMember.name.escapedText;
236493
+ if (readOnlyArrayHasStringMember(STATIC_GETTERS_TO_REMOVE, memberName)) {
236494
+ return false;
236495
+ }
236496
+ }
236497
+ return true;
236498
+ });
236499
+ };
236500
+ var STATIC_GETTERS_TO_REMOVE = [
236501
+ // we want to remove `attachInternalsMemberName`, which is an 'internal' static
236502
+ // property used to pass a string value along from the 'decorators-to-static'
236503
+ // step through to the `ComponentCompilerMeta` phase, but we want to keep the
236504
+ // `formAssociated` prop that we also set at the same time.
236505
+ "attachInternalsMemberName",
236506
+ "elementRef",
236507
+ "encapsulation",
236508
+ "events",
236509
+ "is",
236510
+ "listeners",
236511
+ "methods",
236512
+ "originalStyleUrls",
236513
+ "properties",
236514
+ "states",
236515
+ "style",
236516
+ "styleMode",
236517
+ "styleUrl",
236518
+ "styleUrls",
236519
+ "styles",
236520
+ "watchers"
236521
+ ];
236522
+
236272
236523
  // src/compiler/transformers/type-library.ts
236273
- var import_typescript3 = __toESM(require_typescript_5_5_4_bundle_cache_min());
236524
+ var import_typescript7 = __toESM(require_typescript_5_5_4_bundle_cache_min());
236274
236525
  var TYPE_LIBRARY = {};
236275
236526
  function addToLibrary(type, typeName, checker, pathToTypeModule) {
236276
236527
  pathToTypeModule = relative(process.cwd(), pathToTypeModule);
@@ -236295,13 +236546,13 @@ function getTypeLibrary() {
236295
236546
  }
236296
236547
  function addFileToLibrary(config, filePath) {
236297
236548
  const options = {
236298
- ...import_typescript3.default.getDefaultCompilerOptions(),
236299
- module: import_typescript3.default.ModuleKind.ESNext,
236300
- moduleResolution: import_typescript3.default.ModuleResolutionKind.Node10
236549
+ ...import_typescript7.default.getDefaultCompilerOptions(),
236550
+ module: import_typescript7.default.ModuleKind.ESNext,
236551
+ moduleResolution: import_typescript7.default.ModuleResolutionKind.Node10
236301
236552
  };
236302
- const program3 = import_typescript3.default.createProgram([filePath], options);
236553
+ const program3 = import_typescript7.default.createProgram([filePath], options);
236303
236554
  const checker = program3.getTypeChecker();
236304
- const compilerHost = import_typescript3.default.createCompilerHost(options);
236555
+ const compilerHost = import_typescript7.default.createCompilerHost(options);
236305
236556
  const sourceFile = program3.getSourceFile(filePath);
236306
236557
  if (!sourceFile) {
236307
236558
  config.logger.warn(
@@ -236310,25 +236561,25 @@ function addFileToLibrary(config, filePath) {
236310
236561
  return;
236311
236562
  }
236312
236563
  function exportedTypesInSourceFile(sourceFile2, exportedTypeNodes = []) {
236313
- import_typescript3.default.forEachChild(sourceFile2, (node) => {
236564
+ import_typescript7.default.forEachChild(sourceFile2, (node) => {
236314
236565
  if (isTypeDeclLike(node) && isExported(node) && isNotPrivate(node)) {
236315
236566
  exportedTypeNodes.push(node);
236316
- } else if (import_typescript3.default.isExportDeclaration(node)) {
236317
- if (!node.moduleSpecifier || !import_typescript3.default.isStringLiteral(node.moduleSpecifier)) {
236567
+ } else if (import_typescript7.default.isExportDeclaration(node)) {
236568
+ if (!node.moduleSpecifier || !import_typescript7.default.isStringLiteral(node.moduleSpecifier)) {
236318
236569
  return;
236319
236570
  }
236320
236571
  const exportHomeModule = getHomeModule(sourceFile2, node.moduleSpecifier.text, options, compilerHost, program3);
236321
236572
  if (!exportHomeModule) {
236322
236573
  return;
236323
236574
  }
236324
- if (node.exportClause && import_typescript3.default.isNamedExports(node.exportClause)) {
236575
+ if (node.exportClause && import_typescript7.default.isNamedExports(node.exportClause)) {
236325
236576
  for (const exportSpecifier3 of node.exportClause.elements) {
236326
236577
  const identifier3 = exportSpecifier3.getChildAt(0);
236327
236578
  if (!identifier3) {
236328
236579
  return;
236329
236580
  }
236330
236581
  const name = getOriginalTypeName(identifier3, checker);
236331
- import_typescript3.default.forEachChild(exportHomeModule, (child) => {
236582
+ import_typescript7.default.forEachChild(exportHomeModule, (child) => {
236332
236583
  if (isTypeDeclLike(child) && child.name.getText() === name) {
236333
236584
  exportedTypeNodes.push(child);
236334
236585
  }
@@ -236349,7 +236600,7 @@ function addFileToLibrary(config, filePath) {
236349
236600
  }
236350
236601
  function getHomeModule(importer, importPath, options, compilerHost, program3) {
236351
236602
  var _a2;
236352
- const module2 = import_typescript3.default.resolveModuleName(importPath, importer.fileName, options, compilerHost);
236603
+ const module2 = import_typescript7.default.resolveModuleName(importPath, importer.fileName, options, compilerHost);
236353
236604
  const resolvedFileName = (_a2 = module2 == null ? void 0 : module2.resolvedModule) == null ? void 0 : _a2.resolvedFileName;
236354
236605
  if (!resolvedFileName) {
236355
236606
  return void 0;
@@ -236359,7 +236610,7 @@ function getHomeModule(importer, importPath, options, compilerHost, program3) {
236359
236610
  }
236360
236611
  function findTypeWithName(module2, typeName) {
236361
236612
  let typeWithName;
236362
- import_typescript3.default.forEachChild(module2, (child) => {
236613
+ import_typescript7.default.forEachChild(module2, (child) => {
236363
236614
  if (isTypeDeclLike(child) && child.name.getText() === typeName) {
236364
236615
  typeWithName = child;
236365
236616
  }
@@ -236376,16 +236627,16 @@ function getOriginalTypeName(identifier3, checker) {
236376
236627
  return name;
236377
236628
  }
236378
236629
  function unalias(symbol, checker) {
236379
- return symbol.flags & import_typescript3.default.SymbolFlags.Alias ? checker.getAliasedSymbol(symbol) : symbol;
236630
+ return symbol.flags & import_typescript7.default.SymbolFlags.Alias ? checker.getAliasedSymbol(symbol) : symbol;
236380
236631
  }
236381
236632
  function isTypeDeclLike(node) {
236382
- return import_typescript3.default.isInterfaceDeclaration(node) || import_typescript3.default.isTypeAliasDeclaration(node) || import_typescript3.default.isEnumDeclaration(node);
236633
+ return import_typescript7.default.isInterfaceDeclaration(node) || import_typescript7.default.isTypeAliasDeclaration(node) || import_typescript7.default.isEnumDeclaration(node);
236383
236634
  }
236384
236635
  function isExported(node) {
236385
- return (import_typescript3.default.getCombinedModifierFlags(node) & import_typescript3.default.ModifierFlags.Export) !== 0;
236636
+ return (import_typescript7.default.getCombinedModifierFlags(node) & import_typescript7.default.ModifierFlags.Export) !== 0;
236386
236637
  }
236387
236638
  function isNotPrivate(node) {
236388
- const jsDocTags = import_typescript3.default.getJSDocTags(node);
236639
+ const jsDocTags = import_typescript7.default.getJSDocTags(node);
236389
236640
  return !jsDocTags.some((tag) => tag.tagName.text === "private");
236390
236641
  }
236391
236642
  function getTypeDeclaration(checker, type) {
@@ -236400,7 +236651,7 @@ function getTypeDeclaration(checker, type) {
236400
236651
  }
236401
236652
  function getTypeDocstring(type, checker) {
236402
236653
  const symbol = type == null ? void 0 : type.symbol;
236403
- return symbol ? import_typescript3.default.displayPartsToString(symbol.getDocumentationComment(checker)) : "";
236654
+ return symbol ? import_typescript7.default.displayPartsToString(symbol.getDocumentationComment(checker)) : "";
236404
236655
  }
236405
236656
  var getTypeId = (pathToTypeModule, typeName) => {
236406
236657
  return `${normalizePath(pathToTypeModule, false)}::${typeName}`;
@@ -236415,11 +236666,67 @@ function getSymbolForType(type) {
236415
236666
  return null;
236416
236667
  }
236417
236668
 
236669
+ // src/compiler/transformers/update-component-class.ts
236670
+ var import_typescript8 = __toESM(require_typescript_5_5_4_bundle_cache_min());
236671
+ var updateComponentClass = (transformOpts, classNode, heritageClauses, members) => {
236672
+ var _a2, _b, _c;
236673
+ let classModifiers = (_b = (_a2 = retrieveTsModifiers(classNode)) == null ? void 0 : _a2.slice()) != null ? _b : [];
236674
+ if (transformOpts.module === "cjs") {
236675
+ if (transformOpts.componentExport === "customelement") {
236676
+ classModifiers = classModifiers.filter((m) => {
236677
+ return m.kind !== import_typescript8.default.SyntaxKind.ExportKeyword;
236678
+ });
236679
+ }
236680
+ return import_typescript8.default.factory.updateClassDeclaration(
236681
+ classNode,
236682
+ [...(_c = retrieveTsDecorators(classNode)) != null ? _c : [], ...classModifiers],
236683
+ classNode.name,
236684
+ classNode.typeParameters,
236685
+ heritageClauses,
236686
+ members
236687
+ );
236688
+ }
236689
+ return createConstClass(transformOpts, classNode, heritageClauses, members);
236690
+ };
236691
+ var createConstClass = (transformOpts, classNode, heritageClauses, members) => {
236692
+ var _a2;
236693
+ const className = classNode.name;
236694
+ const tsModifiers = (_a2 = retrieveTsModifiers(classNode)) != null ? _a2 : [];
236695
+ const classHasExportKeyword = tsModifiers.some((m) => m.kind === import_typescript8.default.SyntaxKind.ExportKeyword);
236696
+ const classModifiers = tsModifiers.filter((m) => {
236697
+ return m.kind !== import_typescript8.default.SyntaxKind.ExportKeyword;
236698
+ });
236699
+ const constModifiers = [];
236700
+ if (transformOpts.componentExport !== "customelement" && classHasExportKeyword) {
236701
+ constModifiers.push(import_typescript8.default.factory.createModifier(import_typescript8.default.SyntaxKind.ExportKeyword));
236702
+ }
236703
+ return import_typescript8.default.factory.createVariableStatement(
236704
+ constModifiers,
236705
+ import_typescript8.default.factory.createVariableDeclarationList(
236706
+ [
236707
+ import_typescript8.default.factory.createVariableDeclaration(
236708
+ className,
236709
+ void 0,
236710
+ void 0,
236711
+ import_typescript8.default.factory.createClassExpression(
236712
+ classModifiers,
236713
+ void 0,
236714
+ classNode.typeParameters,
236715
+ heritageClauses,
236716
+ members
236717
+ )
236718
+ )
236719
+ ],
236720
+ import_typescript8.default.NodeFlags.Const
236721
+ )
236722
+ );
236723
+ };
236724
+
236418
236725
  // src/compiler/transformers/transform-utils.ts
236419
236726
  var isMemberPrivate = (member2) => {
236420
236727
  var _a2;
236421
236728
  return !!((_a2 = retrieveTsModifiers(member2)) == null ? void 0 : _a2.some(
236422
- (m) => m.kind === import_typescript4.default.SyntaxKind.PrivateKeyword || m.kind === import_typescript4.default.SyntaxKind.ProtectedKeyword
236729
+ (m) => m.kind === import_typescript9.default.SyntaxKind.PrivateKeyword || m.kind === import_typescript9.default.SyntaxKind.ProtectedKeyword
236423
236730
  ));
236424
236731
  };
236425
236732
  var convertValueToLiteral = (val, refs = null) => {
@@ -236427,70 +236734,70 @@ var convertValueToLiteral = (val, refs = null) => {
236427
236734
  refs = /* @__PURE__ */ new WeakSet();
236428
236735
  }
236429
236736
  if (val === String) {
236430
- return import_typescript4.default.factory.createIdentifier("String");
236737
+ return import_typescript9.default.factory.createIdentifier("String");
236431
236738
  }
236432
236739
  if (val === Number) {
236433
- return import_typescript4.default.factory.createIdentifier("Number");
236740
+ return import_typescript9.default.factory.createIdentifier("Number");
236434
236741
  }
236435
236742
  if (val === Boolean) {
236436
- return import_typescript4.default.factory.createIdentifier("Boolean");
236743
+ return import_typescript9.default.factory.createIdentifier("Boolean");
236437
236744
  }
236438
236745
  if (val === void 0) {
236439
- return import_typescript4.default.factory.createIdentifier("undefined");
236746
+ return import_typescript9.default.factory.createIdentifier("undefined");
236440
236747
  }
236441
236748
  if (val === null) {
236442
- return import_typescript4.default.factory.createIdentifier("null");
236749
+ return import_typescript9.default.factory.createIdentifier("null");
236443
236750
  }
236444
236751
  if (Array.isArray(val)) {
236445
236752
  return arrayToArrayLiteral(val, refs);
236446
236753
  }
236447
236754
  if (typeof val === "object") {
236448
236755
  if (val.__identifier && val.__escapedText) {
236449
- return import_typescript4.default.factory.createIdentifier(val.__escapedText);
236756
+ return import_typescript9.default.factory.createIdentifier(val.__escapedText);
236450
236757
  }
236451
236758
  return objectToObjectLiteral(val, refs);
236452
236759
  }
236453
236760
  if (typeof val === "number") {
236454
- return import_typescript4.default.factory.createNumericLiteral(val);
236761
+ return import_typescript9.default.factory.createNumericLiteral(val);
236455
236762
  }
236456
236763
  if (typeof val === "object" && "base10Value" in val) {
236457
- return import_typescript4.default.factory.createBigIntLiteral(val);
236764
+ return import_typescript9.default.factory.createBigIntLiteral(val);
236458
236765
  }
236459
236766
  if (typeof val === "boolean") {
236460
- return val ? import_typescript4.default.factory.createTrue() : import_typescript4.default.factory.createFalse();
236767
+ return val ? import_typescript9.default.factory.createTrue() : import_typescript9.default.factory.createFalse();
236461
236768
  }
236462
236769
  if (typeof val === "string") {
236463
- return import_typescript4.default.factory.createStringLiteral(val, void 0);
236770
+ return import_typescript9.default.factory.createStringLiteral(val, void 0);
236464
236771
  }
236465
- return import_typescript4.default.factory.createStringLiteralFromNode(val);
236772
+ return import_typescript9.default.factory.createStringLiteralFromNode(val);
236466
236773
  };
236467
236774
  var arrayToArrayLiteral = (list, refs) => {
236468
236775
  const newList = list.map((l) => {
236469
236776
  return convertValueToLiteral(l, refs);
236470
236777
  });
236471
- return import_typescript4.default.factory.createArrayLiteralExpression(newList);
236778
+ return import_typescript9.default.factory.createArrayLiteralExpression(newList);
236472
236779
  };
236473
236780
  var objectToObjectLiteral = (obj, refs) => {
236474
236781
  if (refs.has(obj)) {
236475
- return import_typescript4.default.factory.createIdentifier("undefined");
236782
+ return import_typescript9.default.factory.createIdentifier("undefined");
236476
236783
  }
236477
236784
  refs.add(obj);
236478
236785
  const newProperties = Object.keys(obj).map((key) => {
236479
- const prop = import_typescript4.default.factory.createPropertyAssignment(
236480
- import_typescript4.default.factory.createStringLiteral(key),
236786
+ const prop = import_typescript9.default.factory.createPropertyAssignment(
236787
+ import_typescript9.default.factory.createStringLiteral(key),
236481
236788
  convertValueToLiteral(obj[key], refs)
236482
236789
  );
236483
236790
  return prop;
236484
236791
  });
236485
- return import_typescript4.default.factory.createObjectLiteralExpression(newProperties, true);
236792
+ return import_typescript9.default.factory.createObjectLiteralExpression(newProperties, true);
236486
236793
  };
236487
236794
  var createStaticGetter = (propName, returnExpression) => {
236488
- return import_typescript4.default.factory.createGetAccessorDeclaration(
236489
- [import_typescript4.default.factory.createToken(import_typescript4.default.SyntaxKind.StaticKeyword)],
236795
+ return import_typescript9.default.factory.createGetAccessorDeclaration(
236796
+ [import_typescript9.default.factory.createToken(import_typescript9.default.SyntaxKind.StaticKeyword)],
236490
236797
  propName,
236491
236798
  [],
236492
236799
  void 0,
236493
- import_typescript4.default.factory.createBlock([import_typescript4.default.factory.createReturnStatement(returnExpression)])
236800
+ import_typescript9.default.factory.createBlock([import_typescript9.default.factory.createReturnStatement(returnExpression)])
236494
236801
  );
236495
236802
  };
236496
236803
  var getStaticValue = (staticMembers, staticName) => {
@@ -236504,31 +236811,31 @@ var getStaticValue = (staticMembers, staticName) => {
236504
236811
  return null;
236505
236812
  }
236506
236813
  const rtnStatement = staticMember.body.statements.find(
236507
- (s) => s.kind === import_typescript4.default.SyntaxKind.ReturnStatement
236814
+ (s) => s.kind === import_typescript9.default.SyntaxKind.ReturnStatement
236508
236815
  );
236509
236816
  if (!rtnStatement || !rtnStatement.expression) {
236510
236817
  return null;
236511
236818
  }
236512
236819
  const expKind = rtnStatement.expression.kind;
236513
- if (expKind === import_typescript4.default.SyntaxKind.StringLiteral) {
236820
+ if (expKind === import_typescript9.default.SyntaxKind.StringLiteral) {
236514
236821
  return rtnStatement.expression.text;
236515
236822
  }
236516
- if (expKind === import_typescript4.default.SyntaxKind.NoSubstitutionTemplateLiteral) {
236823
+ if (expKind === import_typescript9.default.SyntaxKind.NoSubstitutionTemplateLiteral) {
236517
236824
  return rtnStatement.expression.text;
236518
236825
  }
236519
- if (expKind === import_typescript4.default.SyntaxKind.TrueKeyword) {
236826
+ if (expKind === import_typescript9.default.SyntaxKind.TrueKeyword) {
236520
236827
  return true;
236521
236828
  }
236522
- if (expKind === import_typescript4.default.SyntaxKind.FalseKeyword) {
236829
+ if (expKind === import_typescript9.default.SyntaxKind.FalseKeyword) {
236523
236830
  return false;
236524
236831
  }
236525
- if (expKind === import_typescript4.default.SyntaxKind.ObjectLiteralExpression) {
236832
+ if (expKind === import_typescript9.default.SyntaxKind.ObjectLiteralExpression) {
236526
236833
  return objectLiteralToObjectMap(rtnStatement.expression);
236527
236834
  }
236528
- if (expKind === import_typescript4.default.SyntaxKind.ArrayLiteralExpression && rtnStatement.expression.elements) {
236835
+ if (expKind === import_typescript9.default.SyntaxKind.ArrayLiteralExpression && rtnStatement.expression.elements) {
236529
236836
  return arrayLiteralToArray(rtnStatement.expression);
236530
236837
  }
236531
- if (expKind === import_typescript4.default.SyntaxKind.Identifier) {
236838
+ if (expKind === import_typescript9.default.SyntaxKind.Identifier) {
236532
236839
  const identifier3 = rtnStatement.expression;
236533
236840
  if (typeof identifier3.escapedText === "string") {
236534
236841
  return getIdentifierValue(identifier3.escapedText);
@@ -236547,19 +236854,19 @@ var arrayLiteralToArray = (arr) => {
236547
236854
  return arr.elements.map((element) => {
236548
236855
  let val;
236549
236856
  switch (element.kind) {
236550
- case import_typescript4.default.SyntaxKind.ObjectLiteralExpression:
236857
+ case import_typescript9.default.SyntaxKind.ObjectLiteralExpression:
236551
236858
  val = objectLiteralToObjectMap(element);
236552
236859
  break;
236553
- case import_typescript4.default.SyntaxKind.StringLiteral:
236860
+ case import_typescript9.default.SyntaxKind.StringLiteral:
236554
236861
  val = element.text;
236555
236862
  break;
236556
- case import_typescript4.default.SyntaxKind.TrueKeyword:
236863
+ case import_typescript9.default.SyntaxKind.TrueKeyword:
236557
236864
  val = true;
236558
236865
  break;
236559
- case import_typescript4.default.SyntaxKind.FalseKeyword:
236866
+ case import_typescript9.default.SyntaxKind.FalseKeyword:
236560
236867
  val = false;
236561
236868
  break;
236562
- case import_typescript4.default.SyntaxKind.Identifier:
236869
+ case import_typescript9.default.SyntaxKind.Identifier:
236563
236870
  const escapedText = element.escapedText;
236564
236871
  if (escapedText === "String") {
236565
236872
  val = String;
@@ -236569,7 +236876,7 @@ var arrayLiteralToArray = (arr) => {
236569
236876
  val = Boolean;
236570
236877
  }
236571
236878
  break;
236572
- case import_typescript4.default.SyntaxKind.PropertyAccessExpression:
236879
+ case import_typescript9.default.SyntaxKind.PropertyAccessExpression:
236573
236880
  default:
236574
236881
  val = element;
236575
236882
  }
@@ -236582,29 +236889,29 @@ var objectLiteralToObjectMap = (objectLiteral) => {
236582
236889
  for (const propAssignment of properties) {
236583
236890
  const propName = getTextOfPropertyName(propAssignment.name);
236584
236891
  let val;
236585
- if (import_typescript4.default.isShorthandPropertyAssignment(propAssignment)) {
236892
+ if (import_typescript9.default.isShorthandPropertyAssignment(propAssignment)) {
236586
236893
  val = getIdentifierValue(propName);
236587
- } else if (import_typescript4.default.isPropertyAssignment(propAssignment)) {
236894
+ } else if (import_typescript9.default.isPropertyAssignment(propAssignment)) {
236588
236895
  switch (propAssignment.initializer.kind) {
236589
- case import_typescript4.default.SyntaxKind.ArrayLiteralExpression:
236896
+ case import_typescript9.default.SyntaxKind.ArrayLiteralExpression:
236590
236897
  val = arrayLiteralToArray(propAssignment.initializer);
236591
236898
  break;
236592
- case import_typescript4.default.SyntaxKind.ObjectLiteralExpression:
236899
+ case import_typescript9.default.SyntaxKind.ObjectLiteralExpression:
236593
236900
  val = objectLiteralToObjectMap(propAssignment.initializer);
236594
236901
  break;
236595
- case import_typescript4.default.SyntaxKind.StringLiteral:
236902
+ case import_typescript9.default.SyntaxKind.StringLiteral:
236596
236903
  val = propAssignment.initializer.text;
236597
236904
  break;
236598
- case import_typescript4.default.SyntaxKind.NoSubstitutionTemplateLiteral:
236905
+ case import_typescript9.default.SyntaxKind.NoSubstitutionTemplateLiteral:
236599
236906
  val = propAssignment.initializer.text;
236600
236907
  break;
236601
- case import_typescript4.default.SyntaxKind.TrueKeyword:
236908
+ case import_typescript9.default.SyntaxKind.TrueKeyword:
236602
236909
  val = true;
236603
236910
  break;
236604
- case import_typescript4.default.SyntaxKind.FalseKeyword:
236911
+ case import_typescript9.default.SyntaxKind.FalseKeyword:
236605
236912
  val = false;
236606
236913
  break;
236607
- case import_typescript4.default.SyntaxKind.Identifier:
236914
+ case import_typescript9.default.SyntaxKind.Identifier:
236608
236915
  const escapedText = propAssignment.initializer.escapedText;
236609
236916
  if (escapedText === "String") {
236610
236917
  val = String;
@@ -236620,7 +236927,7 @@ var objectLiteralToObjectMap = (objectLiteral) => {
236620
236927
  val = getIdentifierValue(propAssignment.initializer.escapedText);
236621
236928
  }
236622
236929
  break;
236623
- case import_typescript4.default.SyntaxKind.PropertyAccessExpression:
236930
+ case import_typescript9.default.SyntaxKind.PropertyAccessExpression:
236624
236931
  default:
236625
236932
  val = propAssignment.initializer;
236626
236933
  }
@@ -236638,14 +236945,14 @@ var getIdentifierValue = (escapedText) => {
236638
236945
  };
236639
236946
  var getTextOfPropertyName = (propName) => {
236640
236947
  switch (propName.kind) {
236641
- case import_typescript4.default.SyntaxKind.Identifier:
236948
+ case import_typescript9.default.SyntaxKind.Identifier:
236642
236949
  return propName.text;
236643
- case import_typescript4.default.SyntaxKind.StringLiteral:
236644
- case import_typescript4.default.SyntaxKind.NumericLiteral:
236950
+ case import_typescript9.default.SyntaxKind.StringLiteral:
236951
+ case import_typescript9.default.SyntaxKind.NumericLiteral:
236645
236952
  return propName.text;
236646
- case import_typescript4.default.SyntaxKind.ComputedPropertyName:
236953
+ case import_typescript9.default.SyntaxKind.ComputedPropertyName:
236647
236954
  const expression = propName.expression;
236648
- if (import_typescript4.default.isStringLiteral(expression) || import_typescript4.default.isNumericLiteral(expression)) {
236955
+ if (import_typescript9.default.isStringLiteral(expression) || import_typescript9.default.isNumericLiteral(expression)) {
236649
236956
  return propName.expression.text;
236650
236957
  }
236651
236958
  }
@@ -236660,7 +236967,7 @@ var getAttributeTypeInfo = (baseNode, sourceFile, checker, program3) => {
236660
236967
  return allReferences;
236661
236968
  };
236662
236969
  var getEntityName = (entity) => {
236663
- if (import_typescript4.default.isIdentifier(entity)) {
236970
+ if (import_typescript9.default.isIdentifier(entity)) {
236664
236971
  return entity.escapedText.toString();
236665
236972
  } else {
236666
236973
  return getEntityName(entity.left);
@@ -236669,13 +236976,13 @@ var getEntityName = (entity) => {
236669
236976
  var getAllTypeReferences = (checker, node) => {
236670
236977
  const referencedTypes = [];
236671
236978
  const visit2 = (node2) => {
236672
- if (import_typescript4.default.isTypeReferenceNode(node2)) {
236979
+ if (import_typescript9.default.isTypeReferenceNode(node2)) {
236673
236980
  referencedTypes.push({
236674
236981
  name: getEntityName(node2.typeName),
236675
236982
  type: checker.getTypeFromTypeNode(node2)
236676
236983
  });
236677
236984
  if (node2.typeArguments) {
236678
- node2.typeArguments.filter((typeArg) => import_typescript4.default.isTypeReferenceNode(typeArg)).forEach((typeRef) => {
236985
+ node2.typeArguments.filter((typeArg) => import_typescript9.default.isTypeReferenceNode(typeArg)).forEach((typeRef) => {
236679
236986
  const typeName = typeRef.typeName;
236680
236987
  if (typeName && typeName.escapedText) {
236681
236988
  referencedTypes.push({
@@ -236686,7 +236993,7 @@ var getAllTypeReferences = (checker, node) => {
236686
236993
  });
236687
236994
  }
236688
236995
  }
236689
- return import_typescript4.default.forEachChild(node2, visit2);
236996
+ return import_typescript9.default.forEachChild(node2, visit2);
236690
236997
  };
236691
236998
  visit2(node);
236692
236999
  return referencedTypes;
@@ -236694,17 +237001,17 @@ var getAllTypeReferences = (checker, node) => {
236694
237001
  var getTypeReferenceLocation = (typeName, type, sourceFile, checker, program3) => {
236695
237002
  var _a2;
236696
237003
  const importTypeDeclaration = sourceFile.statements.find((st) => {
236697
- const statement = import_typescript4.default.isImportDeclaration(st) && st.importClause && import_typescript4.default.isImportClause(st.importClause) && st.importClause.namedBindings && import_typescript4.default.isNamedImports(st.importClause.namedBindings) && Array.isArray(st.importClause.namedBindings.elements) && st.importClause.namedBindings.elements.find((nbe) => nbe.name.getText() === typeName);
237004
+ const statement = import_typescript9.default.isImportDeclaration(st) && st.importClause && import_typescript9.default.isImportClause(st.importClause) && st.importClause.namedBindings && import_typescript9.default.isNamedImports(st.importClause.namedBindings) && Array.isArray(st.importClause.namedBindings.elements) && st.importClause.namedBindings.elements.find((nbe) => nbe.name.getText() === typeName);
236698
237005
  if (!statement) {
236699
237006
  return false;
236700
237007
  }
236701
237008
  return true;
236702
237009
  });
236703
237010
  const namedImportBindings = (_a2 = importTypeDeclaration == null ? void 0 : importTypeDeclaration.importClause) == null ? void 0 : _a2.namedBindings;
236704
- if (importTypeDeclaration && import_typescript4.default.isNamedImports(namedImportBindings)) {
237011
+ if (importTypeDeclaration && import_typescript9.default.isNamedImports(namedImportBindings)) {
236705
237012
  const localImportPath = importTypeDeclaration.moduleSpecifier.text;
236706
237013
  const options = program3.getCompilerOptions();
236707
- const compilerHost = import_typescript4.default.createCompilerHost(options);
237014
+ const compilerHost = import_typescript9.default.createCompilerHost(options);
236708
237015
  const importHomeModule = getHomeModule(sourceFile, localImportPath, options, compilerHost, program3);
236709
237016
  if (importHomeModule) {
236710
237017
  const importName = namedImportBindings.elements.find((nbe) => nbe.name.getText() === typeName).name;
@@ -236721,11 +237028,11 @@ var getTypeReferenceLocation = (typeName, type, sourceFile, checker, program3) =
236721
237028
  }
236722
237029
  const isExported2 = sourceFile.statements.some((st) => {
236723
237030
  const statementModifiers = retrieveTsModifiers(st);
236724
- const isDeclarationExported = (statement) => statement.name.getText() === typeName && Array.isArray(statementModifiers) && statementModifiers.some((mod) => mod.kind === import_typescript4.default.SyntaxKind.ExportKeyword);
236725
- const isInterfaceDeclarationExported = import_typescript4.default.isInterfaceDeclaration(st) && isDeclarationExported(st);
236726
- const isTypeAliasDeclarationExported = import_typescript4.default.isTypeAliasDeclaration(st) && isDeclarationExported(st);
236727
- const isEnumDeclarationExported = import_typescript4.default.isEnumDeclaration(st) && isDeclarationExported(st);
236728
- const isTypeInExportDeclaration = import_typescript4.default.isExportDeclaration(st) && import_typescript4.default.isNamedExports(st.exportClause) && st.exportClause.elements.some((nee) => nee.name.getText() === typeName);
237031
+ const isDeclarationExported = (statement) => statement.name.getText() === typeName && Array.isArray(statementModifiers) && statementModifiers.some((mod) => mod.kind === import_typescript9.default.SyntaxKind.ExportKeyword);
237032
+ const isInterfaceDeclarationExported = import_typescript9.default.isInterfaceDeclaration(st) && isDeclarationExported(st);
237033
+ const isTypeAliasDeclarationExported = import_typescript9.default.isTypeAliasDeclaration(st) && isDeclarationExported(st);
237034
+ const isEnumDeclarationExported = import_typescript9.default.isEnumDeclaration(st) && isDeclarationExported(st);
237035
+ const isTypeInExportDeclaration = import_typescript9.default.isExportDeclaration(st) && import_typescript9.default.isNamedExports(st.exportClause) && st.exportClause.elements.some((nee) => nee.name.getText() === typeName);
236729
237036
  return isInterfaceDeclarationExported || isTypeAliasDeclarationExported || isEnumDeclarationExported || isTypeInExportDeclaration;
236730
237037
  });
236731
237038
  if (isExported2) {
@@ -236768,7 +237075,7 @@ var resolveType = (checker, type) => {
236768
237075
  }
236769
237076
  };
236770
237077
  var typeToString = (checker, type) => {
236771
- const TYPE_FORMAT_FLAGS = import_typescript4.default.TypeFormatFlags.NoTruncation | import_typescript4.default.TypeFormatFlags.InTypeAlias | import_typescript4.default.TypeFormatFlags.InElementType;
237078
+ const TYPE_FORMAT_FLAGS = import_typescript9.default.TypeFormatFlags.NoTruncation | import_typescript9.default.TypeFormatFlags.InTypeAlias | import_typescript9.default.TypeFormatFlags.InElementType;
236772
237079
  return checker.typeToString(type, void 0, TYPE_FORMAT_FLAGS);
236773
237080
  };
236774
237081
  var parseDocsType = (checker, type, parts) => {
@@ -236805,6 +237112,11 @@ var getComponentMeta = (compilerCtx, tsSourceFile, node) => {
236805
237112
  }
236806
237113
  return void 0;
236807
237114
  };
237115
+ var updateMixin = (classNode, moduleFile, cmp, transformOpts) => {
237116
+ const classMembers = removeStaticMetaProperties(classNode);
237117
+ updateLazyComponentConstructor(classMembers, classNode, moduleFile, cmp);
237118
+ return updateComponentClass(transformOpts, classNode, classNode.heritageClauses, classMembers);
237119
+ };
236808
237120
  var getComponentTagName = (staticMembers) => {
236809
237121
  if (staticMembers.length > 0) {
236810
237122
  const tagName = getStaticValue(staticMembers, "is");
@@ -236817,7 +237129,7 @@ var getComponentTagName = (staticMembers) => {
236817
237129
  var isStaticGetter = (member2) => {
236818
237130
  var _a2;
236819
237131
  const modifiers = retrieveTsModifiers(member2);
236820
- return (_a2 = member2.kind === import_typescript4.default.SyntaxKind.GetAccessor && Array.isArray(modifiers) && modifiers.some(({ kind }) => kind === import_typescript4.default.SyntaxKind.StaticKeyword)) != null ? _a2 : false;
237132
+ return (_a2 = member2.kind === import_typescript9.default.SyntaxKind.GetAccessor && Array.isArray(modifiers) && modifiers.some(({ kind }) => kind === import_typescript9.default.SyntaxKind.StaticKeyword)) != null ? _a2 : false;
236821
237133
  };
236822
237134
  var serializeSymbol = (checker, symbol) => {
236823
237135
  if (!checker || !symbol) {
@@ -236828,7 +237140,7 @@ var serializeSymbol = (checker, symbol) => {
236828
237140
  }
236829
237141
  return {
236830
237142
  tags: mapJSDocTagInfo(symbol.getJsDocTags()),
236831
- text: import_typescript4.default.displayPartsToString(symbol.getDocumentationComment(checker))
237143
+ text: import_typescript9.default.displayPartsToString(symbol.getDocumentationComment(checker))
236832
237144
  };
236833
237145
  };
236834
237146
  var mapJSDocTagInfo = (tags) => {
@@ -236841,7 +237153,7 @@ var isInternal = (jsDocs) => {
236841
237153
  return !!(jsDocs && jsDocs.tags.some((s) => s.name === "internal"));
236842
237154
  };
236843
237155
  var isMethod = (member2, methodName) => {
236844
- return import_typescript4.default.isMethodDeclaration(member2) && member2.name && member2.name.escapedText === methodName;
237156
+ return import_typescript9.default.isMethodDeclaration(member2) && member2.name && member2.name.escapedText === methodName;
236845
237157
  };
236846
237158
  var createImportStatement = (importFnNames, importPath) => {
236847
237159
  const importSpecifiers = importFnNames.map((importKey) => {
@@ -236852,20 +237164,20 @@ var createImportStatement = (importFnNames, importPath) => {
236852
237164
  importAs = splt[1];
236853
237165
  importFnName = splt[0];
236854
237166
  }
236855
- return import_typescript4.default.factory.createImportSpecifier(
237167
+ return import_typescript9.default.factory.createImportSpecifier(
236856
237168
  false,
236857
- typeof importFnName === "string" && importFnName !== importAs ? import_typescript4.default.factory.createIdentifier(importFnName) : void 0,
236858
- import_typescript4.default.factory.createIdentifier(importAs)
237169
+ typeof importFnName === "string" && importFnName !== importAs ? import_typescript9.default.factory.createIdentifier(importFnName) : void 0,
237170
+ import_typescript9.default.factory.createIdentifier(importAs)
236859
237171
  );
236860
237172
  });
236861
- return import_typescript4.default.factory.createImportDeclaration(
237173
+ return import_typescript9.default.factory.createImportDeclaration(
236862
237174
  void 0,
236863
- import_typescript4.default.factory.createImportClause(false, void 0, import_typescript4.default.factory.createNamedImports(importSpecifiers)),
236864
- import_typescript4.default.factory.createStringLiteral(importPath)
237175
+ import_typescript9.default.factory.createImportClause(false, void 0, import_typescript9.default.factory.createNamedImports(importSpecifiers)),
237176
+ import_typescript9.default.factory.createStringLiteral(importPath)
236865
237177
  );
236866
237178
  };
236867
237179
  var createRequireStatement = (importFnNames, importPath) => {
236868
- const importBinding = import_typescript4.default.factory.createObjectBindingPattern(
237180
+ const importBinding = import_typescript9.default.factory.createObjectBindingPattern(
236869
237181
  importFnNames.map((importKey) => {
236870
237182
  const splt = importKey.split(" as ");
236871
237183
  let importAs = importKey;
@@ -236874,25 +237186,25 @@ var createRequireStatement = (importFnNames, importPath) => {
236874
237186
  importAs = splt[1];
236875
237187
  importFnName = splt[0];
236876
237188
  }
236877
- return import_typescript4.default.factory.createBindingElement(void 0, importFnName, importAs);
237189
+ return import_typescript9.default.factory.createBindingElement(void 0, importFnName, importAs);
236878
237190
  })
236879
237191
  );
236880
- return import_typescript4.default.factory.createVariableStatement(
237192
+ return import_typescript9.default.factory.createVariableStatement(
236881
237193
  void 0,
236882
- import_typescript4.default.factory.createVariableDeclarationList(
237194
+ import_typescript9.default.factory.createVariableDeclarationList(
236883
237195
  [
236884
- import_typescript4.default.factory.createVariableDeclaration(
237196
+ import_typescript9.default.factory.createVariableDeclaration(
236885
237197
  importBinding,
236886
237198
  void 0,
236887
237199
  void 0,
236888
- import_typescript4.default.factory.createCallExpression(
236889
- import_typescript4.default.factory.createIdentifier("require"),
237200
+ import_typescript9.default.factory.createCallExpression(
237201
+ import_typescript9.default.factory.createIdentifier("require"),
236890
237202
  [],
236891
- [import_typescript4.default.factory.createStringLiteral(importPath)]
237203
+ [import_typescript9.default.factory.createStringLiteral(importPath)]
236892
237204
  )
236893
237205
  )
236894
237206
  ],
236895
- import_typescript4.default.NodeFlags.Const
237207
+ import_typescript9.default.NodeFlags.Const
236896
237208
  )
236897
237209
  );
236898
237210
  };
@@ -236901,36 +237213,49 @@ var retrieveModifierLike = (node) => {
236901
237213
  return [...(_a2 = retrieveTsDecorators(node)) != null ? _a2 : [], ...(_b = retrieveTsModifiers(node)) != null ? _b : []];
236902
237214
  };
236903
237215
  var retrieveTsDecorators = (node) => {
236904
- return import_typescript4.default.canHaveDecorators(node) ? import_typescript4.default.getDecorators(node) : void 0;
237216
+ return import_typescript9.default.canHaveDecorators(node) ? import_typescript9.default.getDecorators(node) : void 0;
236905
237217
  };
236906
237218
  var retrieveTsModifiers = (node) => {
236907
- return import_typescript4.default.canHaveModifiers(node) ? import_typescript4.default.getModifiers(node) : void 0;
237219
+ return import_typescript9.default.canHaveModifiers(node) ? import_typescript9.default.getModifiers(node) : void 0;
236908
237220
  };
236909
- var updateConstructor = (classNode, classMembers, statements, parameters) => {
236910
- var _a2, _b, _c;
236911
- const constructorIndex = classMembers.findIndex((m) => m.kind === import_typescript4.default.SyntaxKind.Constructor);
237221
+ function foundSuper(constructorBodyStatements) {
237222
+ return constructorBodyStatements == null ? void 0 : constructorBodyStatements.find(
237223
+ (s) => import_typescript9.default.isExpressionStatement(s) && import_typescript9.default.isCallExpression(s.expression) && s.expression.expression.kind === import_typescript9.default.SyntaxKind.SuperKeyword
237224
+ );
237225
+ }
237226
+ var updateConstructor = (classNode, classMembers, statements, parameters, includeFalseArg) => {
237227
+ var _a2, _b;
237228
+ const constructorIndex = classMembers.findIndex((m) => m.kind === import_typescript9.default.SyntaxKind.Constructor);
236912
237229
  const constructorMethod = classMembers[constructorIndex];
236913
237230
  if (constructorIndex < 0 && !(statements == null ? void 0 : statements.length) && !needsSuper(classNode)) return classMembers;
236914
- if (constructorIndex >= 0 && import_typescript4.default.isConstructorDeclaration(constructorMethod)) {
236915
- const constructorBodyStatements = (_b = (_a2 = constructorMethod.body) == null ? void 0 : _a2.statements) != null ? _b : import_typescript4.default.factory.createNodeArray();
236916
- const hasSuper = constructorBodyStatements.some((s) => s.kind === import_typescript4.default.SyntaxKind.SuperKeyword);
236917
- if (!hasSuper && needsSuper(classNode)) {
236918
- statements = [createConstructorBodyWithSuper(), ...statements, ...constructorBodyStatements];
237231
+ if (constructorIndex >= 0 && import_typescript9.default.isConstructorDeclaration(constructorMethod)) {
237232
+ const constructorBodyStatements = (_a2 = constructorMethod.body) == null ? void 0 : _a2.statements;
237233
+ let foundSuperCall = foundSuper(constructorBodyStatements);
237234
+ if (!foundSuperCall && needsSuper(classNode)) {
237235
+ statements = [createConstructorBodyWithSuper(includeFalseArg), ...statements, ...constructorBodyStatements];
236919
237236
  } else {
236920
- statements = [...statements, ...constructorBodyStatements];
237237
+ const updatedStatements = constructorBodyStatements.filter((s) => s !== foundSuperCall);
237238
+ if (foundSuperCall) {
237239
+ if (includeFalseArg) {
237240
+ foundSuperCall = createConstructorBodyWithSuper(includeFalseArg);
237241
+ }
237242
+ statements = [foundSuperCall, ...statements, ...updatedStatements];
237243
+ } else {
237244
+ statements = [...statements, ...updatedStatements];
237245
+ }
236921
237246
  }
236922
- classMembers[constructorIndex] = import_typescript4.default.factory.updateConstructorDeclaration(
237247
+ classMembers[constructorIndex] = import_typescript9.default.factory.updateConstructorDeclaration(
236923
237248
  constructorMethod,
236924
237249
  retrieveTsModifiers(constructorMethod),
236925
237250
  constructorMethod.parameters.concat(parameters != null ? parameters : []),
236926
- import_typescript4.default.factory.updateBlock((_c = constructorMethod == null ? void 0 : constructorMethod.body) != null ? _c : import_typescript4.default.factory.createBlock([]), statements)
237251
+ import_typescript9.default.factory.updateBlock((_b = constructorMethod == null ? void 0 : constructorMethod.body) != null ? _b : import_typescript9.default.factory.createBlock([]), statements)
236927
237252
  );
236928
237253
  } else {
236929
237254
  if (needsSuper(classNode)) {
236930
- statements = [createConstructorBodyWithSuper(), ...statements];
237255
+ statements = [createConstructorBodyWithSuper(includeFalseArg), ...statements];
236931
237256
  }
236932
237257
  classMembers.unshift(
236933
- import_typescript4.default.factory.createConstructorDeclaration(void 0, parameters != null ? parameters : [], import_typescript4.default.factory.createBlock(statements, true))
237258
+ import_typescript9.default.factory.createConstructorDeclaration(void 0, parameters != null ? parameters : [], import_typescript9.default.factory.createBlock(statements, true))
236934
237259
  );
236935
237260
  }
236936
237261
  return classMembers;
@@ -236938,20 +237263,24 @@ var updateConstructor = (classNode, classMembers, statements, parameters) => {
236938
237263
  var needsSuper = (classDeclaration3) => {
236939
237264
  const hasHeritageClauses = classDeclaration3.heritageClauses && classDeclaration3.heritageClauses.length > 0;
236940
237265
  if (hasHeritageClauses) {
236941
- return classDeclaration3.heritageClauses.some((clause) => clause.token === import_typescript4.default.SyntaxKind.ExtendsKeyword);
237266
+ return classDeclaration3.heritageClauses.some((clause) => clause.token === import_typescript9.default.SyntaxKind.ExtendsKeyword);
236942
237267
  }
236943
237268
  return false;
236944
237269
  };
236945
- var createConstructorBodyWithSuper = () => {
236946
- return import_typescript4.default.factory.createExpressionStatement(
236947
- import_typescript4.default.factory.createCallExpression(import_typescript4.default.factory.createIdentifier("super"), void 0, void 0)
237270
+ var createConstructorBodyWithSuper = (includeFalseArg) => {
237271
+ return import_typescript9.default.factory.createExpressionStatement(
237272
+ import_typescript9.default.factory.createCallExpression(
237273
+ import_typescript9.default.factory.createIdentifier("super"),
237274
+ void 0,
237275
+ includeFalseArg ? [import_typescript9.default.factory.createFalse()] : void 0
237276
+ )
236948
237277
  );
236949
237278
  };
236950
237279
  var tsPropDeclName = (node, typeChecker) => {
236951
- const declarationName = import_typescript4.default.getNameOfDeclaration(node);
237280
+ const declarationName = import_typescript9.default.getNameOfDeclaration(node);
236952
237281
  let staticName = declarationName.getText();
236953
237282
  let dynamicName;
236954
- if (import_typescript4.default.isComputedPropertyName(declarationName)) {
237283
+ if (import_typescript9.default.isComputedPropertyName(declarationName)) {
236955
237284
  dynamicName = declarationName.expression.getText();
236956
237285
  const type = typeChecker.getTypeAtLocation(declarationName.expression);
236957
237286
  if (type != null && type.isLiteral()) {
@@ -236972,19 +237301,19 @@ function getExternalStyles(style) {
236972
237301
  // src/compiler/transformers/map-imports-to-path-aliases.ts
236973
237302
  var mapImportsToPathAliases = (config, destinationFilePath, outputTarget) => {
236974
237303
  return (transformCtx) => {
236975
- const compilerHost = import_typescript5.default.createCompilerHost(config.tsCompilerOptions);
237304
+ const compilerHost = import_typescript10.default.createCompilerHost(config.tsCompilerOptions);
236976
237305
  const visit2 = (sourceFile) => (node) => {
236977
237306
  var _a2, _b;
236978
- if (outputTarget.transformAliasedImportPaths && import_typescript5.default.isImportDeclaration(node) && import_typescript5.default.isStringLiteral(node.moduleSpecifier)) {
237307
+ if (outputTarget.transformAliasedImportPaths && import_typescript10.default.isImportDeclaration(node) && import_typescript10.default.isStringLiteral(node.moduleSpecifier)) {
236979
237308
  let importPath = node.moduleSpecifier.text;
236980
237309
  if (!importPath.startsWith(".")) {
236981
- const module2 = import_typescript5.default.resolveModuleName(importPath, sourceFile, config.tsCompilerOptions, compilerHost);
237310
+ const module2 = import_typescript10.default.resolveModuleName(importPath, sourceFile, config.tsCompilerOptions, compilerHost);
236982
237311
  const hasResolvedFileName = ((_a2 = module2.resolvedModule) == null ? void 0 : _a2.resolvedFileName) != null;
236983
237312
  const isModuleFromNodeModules = ((_b = module2.resolvedModule) == null ? void 0 : _b.isExternalLibraryImport) === true;
236984
237313
  const shouldTranspileImportPath = hasResolvedFileName && !isModuleFromNodeModules;
236985
237314
  if (shouldTranspileImportPath) {
236986
237315
  const extensionRegex = new RegExp(
236987
- Object.values(import_typescript5.default.Extension).map((extension) => `${extension}$`).join("|")
237316
+ Object.values(import_typescript10.default.Extension).map((extension) => `${extension}$`).join("|")
236988
237317
  );
236989
237318
  const resolvePathInDestination = module2.resolvedModule.resolvedFileName.replace(
236990
237319
  config.srcDir,
@@ -237004,10 +237333,10 @@ var mapImportsToPathAliases = (config, destinationFilePath, outputTarget) => {
237004
237333
  node.assertClause
237005
237334
  );
237006
237335
  }
237007
- return import_typescript5.default.visitEachChild(node, visit2(sourceFile), transformCtx);
237336
+ return import_typescript10.default.visitEachChild(node, visit2(sourceFile), transformCtx);
237008
237337
  };
237009
237338
  return (tsSourceFile) => {
237010
- return import_typescript5.default.visitEachChild(tsSourceFile, visit2(tsSourceFile.fileName), transformCtx);
237339
+ return import_typescript10.default.visitEachChild(tsSourceFile, visit2(tsSourceFile.fileName), transformCtx);
237011
237340
  };
237012
237341
  };
237013
237342
  };
@@ -237033,10 +237362,10 @@ ${code}`;
237033
237362
  outputTargets.map(async (target) => {
237034
237363
  const relPath = relative(config.srcDir, mod.jsFilePath);
237035
237364
  const filePath = join(target.collectionDir, relPath);
237036
- const { outputText } = import_typescript6.default.transpileModule(code, {
237365
+ const { outputText } = import_typescript11.default.transpileModule(code, {
237037
237366
  fileName: mod.sourceFilePath,
237038
237367
  compilerOptions: {
237039
- target: import_typescript6.default.ScriptTarget.Latest
237368
+ target: import_typescript11.default.ScriptTarget.Latest
237040
237369
  },
237041
237370
  transformers: {
237042
237371
  after: [mapImportsToPathAliases(config, filePath, target)]
@@ -241683,10 +242012,10 @@ var createComponentExport = (cmp) => {
241683
242012
 
241684
242013
  // src/compiler/bundle/app-data-plugin.ts
241685
242014
  var import_path12 = require("path");
241686
- var import_typescript8 = __toESM(require_typescript_5_5_4_bundle_cache_min());
242015
+ var import_typescript13 = __toESM(require_typescript_5_5_4_bundle_cache_min());
241687
242016
 
241688
242017
  // src/compiler/transformers/remove-collection-imports.ts
241689
- var import_typescript7 = __toESM(require_typescript_5_5_4_bundle_cache_min());
242018
+ var import_typescript12 = __toESM(require_typescript_5_5_4_bundle_cache_min());
241690
242019
  var removeCollectionImports = (compilerCtx) => {
241691
242020
  return () => {
241692
242021
  return (tsSourceFile) => {
@@ -241694,8 +242023,8 @@ var removeCollectionImports = (compilerCtx) => {
241694
242023
  const statements = tsSourceFile.statements.slice();
241695
242024
  for (let i = statements.length - 1; i >= 0; i--) {
241696
242025
  const n3 = statements[i];
241697
- if (import_typescript7.default.isImportDeclaration(n3)) {
241698
- if (!n3.importClause && n3.moduleSpecifier && import_typescript7.default.isStringLiteral(n3.moduleSpecifier)) {
242026
+ if (import_typescript12.default.isImportDeclaration(n3)) {
242027
+ if (!n3.importClause && n3.moduleSpecifier && import_typescript12.default.isStringLiteral(n3.moduleSpecifier)) {
241699
242028
  const importPath = n3.moduleSpecifier.text;
241700
242029
  const isCollectionImport = compilerCtx.collections.some((c) => {
241701
242030
  return c.collectionName === importPath || c.moduleId === importPath;
@@ -241708,7 +242037,7 @@ var removeCollectionImports = (compilerCtx) => {
241708
242037
  }
241709
242038
  }
241710
242039
  if (madeUpdates) {
241711
- return import_typescript7.default.factory.updateSourceFile(tsSourceFile, statements);
242040
+ return import_typescript12.default.factory.updateSourceFile(tsSourceFile, statements);
241712
242041
  }
241713
242042
  return tsSourceFile;
241714
242043
  };
@@ -241791,8 +242120,8 @@ var appDataPlugin = (config, compilerCtx, buildCtx, buildConditionals, platform)
241791
242120
  const defaultExport = needsDefault ? "\nexport const globalFn = () => {};\nexport default globalFn;" : "";
241792
242121
  code = code + defaultExport;
241793
242122
  const compilerOptions = { ...config.tsCompilerOptions };
241794
- compilerOptions.module = import_typescript8.default.ModuleKind.ESNext;
241795
- const results = import_typescript8.default.transpileModule(code, {
242123
+ compilerOptions.module = import_typescript13.default.ModuleKind.ESNext;
242124
+ const results = import_typescript13.default.transpileModule(code, {
241796
242125
  compilerOptions,
241797
242126
  fileName: id,
241798
242127
  transformers: {
@@ -243215,15 +243544,15 @@ var serverPlugin = (config, platform) => {
243215
243544
 
243216
243545
  // src/compiler/bundle/typescript-plugin.ts
243217
243546
  var import_path24 = require("path");
243218
- var import_typescript11 = __toESM(require_typescript_5_5_4_bundle_cache_min());
243547
+ var import_typescript16 = __toESM(require_typescript_5_5_4_bundle_cache_min());
243219
243548
 
243220
243549
  // src/compiler/sys/typescript/typescript-resolve-module.ts
243221
243550
  var import_path23 = require("path");
243222
- var import_typescript10 = __toESM(require_typescript_5_5_4_bundle_cache_min());
243551
+ var import_typescript15 = __toESM(require_typescript_5_5_4_bundle_cache_min());
243223
243552
 
243224
243553
  // src/compiler/sys/typescript/typescript-sys.ts
243225
243554
  var import_path22 = require("path");
243226
- var import_typescript9 = __toESM(require_typescript_5_5_4_bundle_cache_min());
243555
+ var import_typescript14 = __toESM(require_typescript_5_5_4_bundle_cache_min());
243227
243556
 
243228
243557
  // src/compiler/sys/environment.ts
243229
243558
  var IS_WINDOWS_ENV = process.platform === "win32";
@@ -243302,7 +243631,7 @@ var patchTsSystemFileSystem = (config, compilerSys, inMemoryFs, tsSys) => {
243302
243631
  };
243303
243632
  tsSys.readDirectory = (path7, extensions, exclude, include, depth) => {
243304
243633
  const cwd = compilerSys.getCurrentDirectory();
243305
- return import_typescript9.default.matchFiles(
243634
+ return import_typescript14.default.matchFiles(
243306
243635
  path7,
243307
243636
  extensions,
243308
243637
  exclude,
@@ -243338,11 +243667,11 @@ var patchTsSystemWatch = (compilerSystem, tsSys) => {
243338
243667
  tsSys.watchFile = (p, cb) => {
243339
243668
  const watcher = compilerSystem.watchFile(p, (filePath, eventKind) => {
243340
243669
  if (eventKind === "fileAdd") {
243341
- cb(filePath, import_typescript9.default.FileWatcherEventKind.Created);
243670
+ cb(filePath, import_typescript14.default.FileWatcherEventKind.Created);
243342
243671
  } else if (eventKind === "fileUpdate") {
243343
- cb(filePath, import_typescript9.default.FileWatcherEventKind.Changed);
243672
+ cb(filePath, import_typescript14.default.FileWatcherEventKind.Changed);
243344
243673
  } else if (eventKind === "fileDelete") {
243345
- cb(filePath, import_typescript9.default.FileWatcherEventKind.Deleted);
243674
+ cb(filePath, import_typescript14.default.FileWatcherEventKind.Deleted);
243346
243675
  }
243347
243676
  });
243348
243677
  return {
@@ -243353,15 +243682,15 @@ var patchTsSystemWatch = (compilerSystem, tsSys) => {
243353
243682
  };
243354
243683
  };
243355
243684
  var patchTypescript = (config, inMemoryFs) => {
243356
- if (!import_typescript9.default.__patched) {
243357
- patchTsSystemFileSystem(config, config.sys, inMemoryFs, import_typescript9.default.sys);
243358
- patchTsSystemWatch(config.sys, import_typescript9.default.sys);
243359
- import_typescript9.default.__patched = true;
243685
+ if (!import_typescript14.default.__patched) {
243686
+ patchTsSystemFileSystem(config, config.sys, inMemoryFs, import_typescript14.default.sys);
243687
+ patchTsSystemWatch(config.sys, import_typescript14.default.sys);
243688
+ import_typescript14.default.__patched = true;
243360
243689
  }
243361
243690
  };
243362
243691
  var patchTypeScriptSysMinimum = () => {
243363
- if (!import_typescript9.default.sys) {
243364
- import_typescript9.default.sys = {
243692
+ if (!import_typescript14.default.sys) {
243693
+ import_typescript14.default.sys = {
243365
243694
  args: [],
243366
243695
  createDirectory: noop,
243367
243696
  directoryExists: () => false,
@@ -243397,9 +243726,9 @@ var getTypescriptPathFromUrl = (config, tsExecutingUrl, url) => {
243397
243726
 
243398
243727
  // src/compiler/sys/typescript/typescript-resolve-module.ts
243399
243728
  var tsResolveModuleName = (config, compilerCtx, moduleName, containingFile) => {
243400
- const resolveModuleName = import_typescript10.default.__resolveModuleName || import_typescript10.default.resolveModuleName;
243729
+ const resolveModuleName = import_typescript15.default.__resolveModuleName || import_typescript15.default.resolveModuleName;
243401
243730
  if (moduleName && resolveModuleName && config.tsCompilerOptions) {
243402
- const host = patchTsSystemFileSystem(config, config.sys, compilerCtx.fs, import_typescript10.default.sys);
243731
+ const host = patchTsSystemFileSystem(config, config.sys, compilerCtx.fs, import_typescript15.default.sys);
243403
243732
  const compilerOptions = { ...config.tsCompilerOptions };
243404
243733
  compilerOptions.resolveJsonModule = true;
243405
243734
  return resolveModuleName(moduleName, containingFile, compilerOptions, host);
@@ -243438,6 +243767,8 @@ var createModule = (staticSourceFile, staticSourceFileText, emitFilepath) => ({
243438
243767
  staticSourceFile,
243439
243768
  staticSourceFileText,
243440
243769
  cmps: [],
243770
+ isExtended: false,
243771
+ isMixin: false,
243441
243772
  coreRuntimeApis: [],
243442
243773
  outputTargetCoreRuntimeApis: {},
243443
243774
  collectionName: null,
@@ -243505,8 +243836,8 @@ var typescriptPlugin = (compilerCtx, bundleOpts, config) => {
243505
243836
  if ((0, import_path24.isAbsolute)(id)) {
243506
243837
  const fsFilePath = normalizeFsPath(id);
243507
243838
  const mod = getModule(compilerCtx, fsFilePath);
243508
- if (mod && mod.cmps.length > 0) {
243509
- const tsResult = import_typescript11.default.transpileModule(mod.staticSourceFileText, {
243839
+ if (mod == null ? void 0 : mod.cmps) {
243840
+ const tsResult = import_typescript16.default.transpileModule(mod.staticSourceFileText, {
243510
243841
  compilerOptions: config.tsCompilerOptions,
243511
243842
  fileName: mod.sourceFilePath,
243512
243843
  transformers: {
@@ -243566,7 +243897,7 @@ var userIndexPlugin = (config, compilerCtx) => {
243566
243897
 
243567
243898
  // src/compiler/optimize/optimize-module.ts
243568
243899
  var import_merge_source_map = __toESM(require_merge_source_map());
243569
- var import_typescript12 = __toESM(require_typescript_5_5_4_bundle_cache_min());
243900
+ var import_typescript17 = __toESM(require_typescript_5_5_4_bundle_cache_min());
243570
243901
 
243571
243902
  // node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs
243572
243903
  var schemeRegex = /^[\w+.-]+:\/\//;
@@ -252186,13 +252517,13 @@ var prepareModule = async (input, minifyOpts, transpileToEs5, inlineHelpers) =>
252186
252517
  sourceMap: null
252187
252518
  };
252188
252519
  if (transpileToEs5) {
252189
- const tsResults = import_typescript12.default.transpileModule(input, {
252520
+ const tsResults = import_typescript17.default.transpileModule(input, {
252190
252521
  fileName: "module.ts",
252191
252522
  compilerOptions: {
252192
252523
  sourceMap: !!minifyOpts.sourceMap,
252193
252524
  allowJs: true,
252194
- target: import_typescript12.default.ScriptTarget.ES5,
252195
- module: import_typescript12.default.ModuleKind.ESNext,
252525
+ target: import_typescript17.default.ScriptTarget.ES5,
252526
+ module: import_typescript17.default.ModuleKind.ESNext,
252196
252527
  removeComments: false,
252197
252528
  isolatedModules: true,
252198
252529
  skipLibCheck: true,
@@ -252768,7 +253099,7 @@ function assertIsObjectHook(hook) {
252768
253099
  }
252769
253100
 
252770
253101
  // src/compiler/transformers/component-native/add-define-custom-element-function.ts
252771
- var import_typescript13 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253102
+ var import_typescript18 = __toESM(require_typescript_5_5_4_bundle_cache_min());
252772
253103
  var addDefineCustomElementFunctions = (compilerCtx, components, outputTarget) => {
252773
253104
  return () => {
252774
253105
  return (tsSourceFile) => {
@@ -252779,10 +253110,10 @@ var addDefineCustomElementFunctions = (compilerCtx, components, outputTarget) =>
252779
253110
  if (moduleFile.cmps.length) {
252780
253111
  const principalComponent = moduleFile.cmps[0];
252781
253112
  tagNames.push(principalComponent.tagName);
252782
- const customElementsDefineCallExpression = import_typescript13.default.factory.createCallExpression(
252783
- import_typescript13.default.factory.createPropertyAccessExpression(import_typescript13.default.factory.createIdentifier("customElements"), "define"),
253113
+ const customElementsDefineCallExpression = import_typescript18.default.factory.createCallExpression(
253114
+ import_typescript18.default.factory.createPropertyAccessExpression(import_typescript18.default.factory.createIdentifier("customElements"), "define"),
252784
253115
  void 0,
252785
- [import_typescript13.default.factory.createIdentifier("tagName"), import_typescript13.default.factory.createIdentifier(principalComponent.componentClassName)]
253116
+ [import_typescript18.default.factory.createIdentifier("tagName"), import_typescript18.default.factory.createIdentifier(principalComponent.componentClassName)]
252786
253117
  );
252787
253118
  caseStatements.push(
252788
253119
  createCustomElementsDefineCase(principalComponent.tagName, customElementsDefineCallExpression)
@@ -252796,7 +253127,7 @@ var addDefineCustomElementFunctions = (compilerCtx, components, outputTarget) =>
252796
253127
  newStatements.push(conditionalDefineCustomElementCall);
252797
253128
  }
252798
253129
  }
252799
- tsSourceFile = import_typescript13.default.factory.updateSourceFile(tsSourceFile, [...tsSourceFile.statements, ...newStatements]);
253130
+ tsSourceFile = import_typescript18.default.factory.updateSourceFile(tsSourceFile, [...tsSourceFile.statements, ...newStatements]);
252800
253131
  return tsSourceFile;
252801
253132
  };
252802
253133
  };
@@ -252809,83 +253140,83 @@ var setupComponentDependencies = (moduleFile, components, newStatements, caseSta
252809
253140
  const importAs = `$${exportName}DefineCustomElement`;
252810
253141
  tagNames.push(foundDep.tagName);
252811
253142
  newStatements.push(createImportStatement([`defineCustomElement as ${importAs}`], foundDep.sourceFilePath));
252812
- const callExpression3 = import_typescript13.default.factory.createCallExpression(import_typescript13.default.factory.createIdentifier(importAs), void 0, []);
253143
+ const callExpression3 = import_typescript18.default.factory.createCallExpression(import_typescript18.default.factory.createIdentifier(importAs), void 0, []);
252813
253144
  caseStatements.push(createCustomElementsDefineCase(foundDep.tagName, callExpression3));
252814
253145
  });
252815
253146
  });
252816
253147
  };
252817
253148
  var createCustomElementsDefineCase = (tagName, actionExpression) => {
252818
- return import_typescript13.default.factory.createCaseClause(import_typescript13.default.factory.createStringLiteral(tagName), [
252819
- import_typescript13.default.factory.createIfStatement(
252820
- import_typescript13.default.factory.createPrefixUnaryExpression(
252821
- import_typescript13.default.SyntaxKind.ExclamationToken,
252822
- import_typescript13.default.factory.createCallExpression(
252823
- import_typescript13.default.factory.createPropertyAccessExpression(import_typescript13.default.factory.createIdentifier("customElements"), "get"),
253149
+ return import_typescript18.default.factory.createCaseClause(import_typescript18.default.factory.createStringLiteral(tagName), [
253150
+ import_typescript18.default.factory.createIfStatement(
253151
+ import_typescript18.default.factory.createPrefixUnaryExpression(
253152
+ import_typescript18.default.SyntaxKind.ExclamationToken,
253153
+ import_typescript18.default.factory.createCallExpression(
253154
+ import_typescript18.default.factory.createPropertyAccessExpression(import_typescript18.default.factory.createIdentifier("customElements"), "get"),
252824
253155
  void 0,
252825
- [import_typescript13.default.factory.createIdentifier("tagName")]
253156
+ [import_typescript18.default.factory.createIdentifier("tagName")]
252826
253157
  )
252827
253158
  ),
252828
- import_typescript13.default.factory.createBlock([import_typescript13.default.factory.createExpressionStatement(actionExpression)])
253159
+ import_typescript18.default.factory.createBlock([import_typescript18.default.factory.createExpressionStatement(actionExpression)])
252829
253160
  ),
252830
- import_typescript13.default.factory.createBreakStatement()
253161
+ import_typescript18.default.factory.createBreakStatement()
252831
253162
  ]);
252832
253163
  };
252833
253164
  var addDefineCustomElementFunction = (tagNames, newStatements, caseStatements) => {
252834
- const newExpression3 = import_typescript13.default.factory.createFunctionDeclaration(
252835
- [import_typescript13.default.factory.createModifier(import_typescript13.default.SyntaxKind.ExportKeyword)],
253165
+ const newExpression3 = import_typescript18.default.factory.createFunctionDeclaration(
253166
+ [import_typescript18.default.factory.createModifier(import_typescript18.default.SyntaxKind.ExportKeyword)],
252836
253167
  void 0,
252837
- import_typescript13.default.factory.createIdentifier("defineCustomElement"),
253168
+ import_typescript18.default.factory.createIdentifier("defineCustomElement"),
252838
253169
  void 0,
252839
253170
  [],
252840
253171
  void 0,
252841
- import_typescript13.default.factory.createBlock(
253172
+ import_typescript18.default.factory.createBlock(
252842
253173
  [
252843
- import_typescript13.default.factory.createIfStatement(
252844
- import_typescript13.default.factory.createStrictEquality(
252845
- import_typescript13.default.factory.createTypeOfExpression(import_typescript13.default.factory.createIdentifier("customElements")),
252846
- import_typescript13.default.factory.createStringLiteral("undefined")
253174
+ import_typescript18.default.factory.createIfStatement(
253175
+ import_typescript18.default.factory.createStrictEquality(
253176
+ import_typescript18.default.factory.createTypeOfExpression(import_typescript18.default.factory.createIdentifier("customElements")),
253177
+ import_typescript18.default.factory.createStringLiteral("undefined")
252847
253178
  ),
252848
- import_typescript13.default.factory.createBlock([import_typescript13.default.factory.createReturnStatement()])
253179
+ import_typescript18.default.factory.createBlock([import_typescript18.default.factory.createReturnStatement()])
252849
253180
  ),
252850
- import_typescript13.default.factory.createVariableStatement(
253181
+ import_typescript18.default.factory.createVariableStatement(
252851
253182
  void 0,
252852
- import_typescript13.default.factory.createVariableDeclarationList(
253183
+ import_typescript18.default.factory.createVariableDeclarationList(
252853
253184
  [
252854
- import_typescript13.default.factory.createVariableDeclaration(
253185
+ import_typescript18.default.factory.createVariableDeclaration(
252855
253186
  "components",
252856
253187
  void 0,
252857
253188
  void 0,
252858
- import_typescript13.default.factory.createArrayLiteralExpression(
252859
- tagNames.map((tagName) => import_typescript13.default.factory.createStringLiteral(tagName))
253189
+ import_typescript18.default.factory.createArrayLiteralExpression(
253190
+ tagNames.map((tagName) => import_typescript18.default.factory.createStringLiteral(tagName))
252860
253191
  )
252861
253192
  )
252862
253193
  ],
252863
- import_typescript13.default.NodeFlags.Const
253194
+ import_typescript18.default.NodeFlags.Const
252864
253195
  )
252865
253196
  ),
252866
- import_typescript13.default.factory.createExpressionStatement(
252867
- import_typescript13.default.factory.createCallExpression(
252868
- import_typescript13.default.factory.createPropertyAccessExpression(import_typescript13.default.factory.createIdentifier("components"), "forEach"),
253197
+ import_typescript18.default.factory.createExpressionStatement(
253198
+ import_typescript18.default.factory.createCallExpression(
253199
+ import_typescript18.default.factory.createPropertyAccessExpression(import_typescript18.default.factory.createIdentifier("components"), "forEach"),
252869
253200
  void 0,
252870
253201
  [
252871
- import_typescript13.default.factory.createArrowFunction(
253202
+ import_typescript18.default.factory.createArrowFunction(
252872
253203
  void 0,
252873
253204
  void 0,
252874
253205
  [
252875
- import_typescript13.default.factory.createParameterDeclaration(
253206
+ import_typescript18.default.factory.createParameterDeclaration(
252876
253207
  void 0,
252877
253208
  void 0,
252878
- import_typescript13.default.factory.createIdentifier("tagName"),
253209
+ import_typescript18.default.factory.createIdentifier("tagName"),
252879
253210
  void 0,
252880
253211
  void 0
252881
253212
  )
252882
253213
  ],
252883
253214
  void 0,
252884
- import_typescript13.default.factory.createToken(import_typescript13.default.SyntaxKind.EqualsGreaterThanToken),
252885
- import_typescript13.default.factory.createBlock([
252886
- import_typescript13.default.factory.createSwitchStatement(
252887
- import_typescript13.default.factory.createIdentifier("tagName"),
252888
- import_typescript13.default.factory.createCaseBlock(caseStatements)
253215
+ import_typescript18.default.factory.createToken(import_typescript18.default.SyntaxKind.EqualsGreaterThanToken),
253216
+ import_typescript18.default.factory.createBlock([
253217
+ import_typescript18.default.factory.createSwitchStatement(
253218
+ import_typescript18.default.factory.createIdentifier("tagName"),
253219
+ import_typescript18.default.factory.createCaseBlock(caseStatements)
252889
253220
  )
252890
253221
  ])
252891
253222
  )
@@ -252899,72 +253230,31 @@ var addDefineCustomElementFunction = (tagNames, newStatements, caseStatements) =
252899
253230
  newStatements.push(newExpression3);
252900
253231
  };
252901
253232
  function createAutoDefinitionExpression(componentName) {
252902
- return import_typescript13.default.factory.createExpressionStatement(
252903
- import_typescript13.default.factory.createCallExpression(import_typescript13.default.factory.createIdentifier("defineCustomElement"), void 0, [
252904
- import_typescript13.default.factory.createIdentifier(componentName)
253233
+ return import_typescript18.default.factory.createExpressionStatement(
253234
+ import_typescript18.default.factory.createCallExpression(import_typescript18.default.factory.createIdentifier("defineCustomElement"), void 0, [
253235
+ import_typescript18.default.factory.createIdentifier(componentName)
252905
253236
  ])
252906
253237
  );
252907
253238
  }
252908
253239
 
252909
253240
  // src/compiler/transformers/component-native/proxy-custom-element-function.ts
252910
- var import_typescript16 = __toESM(require_typescript_5_5_4_bundle_cache_min());
252911
-
252912
- // src/compiler/transformers/add-component-meta-proxy.ts
252913
- var import_typescript14 = __toESM(require_typescript_5_5_4_bundle_cache_min());
252914
-
252915
- // src/compiler/transformers/core-runtime-apis.ts
252916
- var CREATE_EVENT = "__stencil_createEvent";
252917
- var DEFINE_CUSTOM_ELEMENT = "__stencil_defineCustomElement";
252918
- var GET_ELEMENT = "__stencil_getElement";
252919
- var HOST = "__stencil_Host";
252920
- var HTML_ELEMENT = "HTMLElement";
252921
- var PROXY_CUSTOM_ELEMENT = "__stencil_proxyCustomElement";
252922
- var REGISTER_INSTANCE = "__stencil_registerInstance";
252923
- var REGISTER_HOST = "__stencil_registerHost";
252924
- var H2 = "__stencil_h";
252925
- var RUNTIME_APIS = {
252926
- createEvent: `createEvent as ${CREATE_EVENT}`,
252927
- defineCustomElement: `defineCustomElement as ${DEFINE_CUSTOM_ELEMENT}`,
252928
- getElement: `getElement as ${GET_ELEMENT}`,
252929
- h: `h as ${H2}`,
252930
- legacyH: `h`,
252931
- Host: `Host as ${HOST}`,
252932
- HTMLElement: HTML_ELEMENT,
252933
- proxyCustomElement: `proxyCustomElement as ${PROXY_CUSTOM_ELEMENT}`,
252934
- registerHost: `registerHost as ${REGISTER_HOST}`,
252935
- registerInstance: `registerInstance as ${REGISTER_INSTANCE}`
252936
- };
252937
- var addCoreRuntimeApi = (moduleFile, coreRuntimeApi) => {
252938
- if (!moduleFile.coreRuntimeApis.includes(coreRuntimeApi)) {
252939
- moduleFile.coreRuntimeApis.push(coreRuntimeApi);
252940
- }
252941
- };
252942
- var addOutputTargetCoreRuntimeApi = (moduleFile, outputTarget, coreRuntimeApi) => {
252943
- if (!moduleFile.outputTargetCoreRuntimeApis[outputTarget]) {
252944
- moduleFile.outputTargetCoreRuntimeApis[outputTarget] = [];
252945
- }
252946
- if (!moduleFile.outputTargetCoreRuntimeApis[outputTarget].includes(coreRuntimeApi)) {
252947
- moduleFile.outputTargetCoreRuntimeApis[outputTarget].push(coreRuntimeApi);
252948
- }
252949
- };
252950
- var addLegacyApis = (moduleFile) => {
252951
- addCoreRuntimeApi(moduleFile, RUNTIME_APIS.legacyH);
252952
- };
253241
+ var import_typescript21 = __toESM(require_typescript_5_5_4_bundle_cache_min());
252953
253242
 
252954
253243
  // src/compiler/transformers/add-component-meta-proxy.ts
253244
+ var import_typescript19 = __toESM(require_typescript_5_5_4_bundle_cache_min());
252955
253245
  var addModuleMetadataProxies = (tsSourceFile, moduleFile) => {
252956
253246
  const statements = tsSourceFile.statements.slice();
252957
253247
  addCoreRuntimeApi(moduleFile, RUNTIME_APIS.proxyCustomElement);
252958
253248
  statements.push(...moduleFile.cmps.map(createComponentMetadataProxy));
252959
- return import_typescript14.default.factory.updateSourceFile(tsSourceFile, statements);
253249
+ return import_typescript19.default.factory.updateSourceFile(tsSourceFile, statements);
252960
253250
  };
252961
253251
  var createComponentMetadataProxy = (compilerMeta) => {
252962
253252
  const compactMeta = formatComponentRuntimeMeta(compilerMeta, true);
252963
- const literalCmpClassName = import_typescript14.default.factory.createIdentifier(compilerMeta.componentClassName);
253253
+ const literalCmpClassName = import_typescript19.default.factory.createIdentifier(compilerMeta.componentClassName);
252964
253254
  const literalMeta = convertValueToLiteral(compactMeta);
252965
- return import_typescript14.default.factory.createExpressionStatement(
252966
- import_typescript14.default.factory.createCallExpression(
252967
- import_typescript14.default.factory.createIdentifier(PROXY_CUSTOM_ELEMENT),
253255
+ return import_typescript19.default.factory.createExpressionStatement(
253256
+ import_typescript19.default.factory.createCallExpression(
253257
+ import_typescript19.default.factory.createIdentifier(PROXY_CUSTOM_ELEMENT),
252968
253258
  [],
252969
253259
  [literalCmpClassName, literalMeta]
252970
253260
  )
@@ -252973,11 +253263,11 @@ var createComponentMetadataProxy = (compilerMeta) => {
252973
253263
  var createClassMetadataProxy = (compilerMeta, clazz) => {
252974
253264
  const compactMeta = formatComponentRuntimeMeta(compilerMeta, true);
252975
253265
  const literalMeta = convertValueToLiteral(compactMeta);
252976
- return import_typescript14.default.factory.createCallExpression(import_typescript14.default.factory.createIdentifier(PROXY_CUSTOM_ELEMENT), [], [clazz, literalMeta]);
253266
+ return import_typescript19.default.factory.createCallExpression(import_typescript19.default.factory.createIdentifier(PROXY_CUSTOM_ELEMENT), [], [clazz, literalMeta]);
252977
253267
  };
252978
253268
 
252979
253269
  // src/compiler/transformers/add-imports.ts
252980
- var import_typescript15 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253270
+ var import_typescript20 = __toESM(require_typescript_5_5_4_bundle_cache_min());
252981
253271
  var addImports = (transformOpts, tsSourceFile, importFnNames, importPath) => {
252982
253272
  if (importFnNames.length === 0) {
252983
253273
  return tsSourceFile;
@@ -252986,12 +253276,12 @@ var addImports = (transformOpts, tsSourceFile, importFnNames, importPath) => {
252986
253276
  const newRequire = createRequireStatement(importFnNames, importPath);
252987
253277
  const statements2 = tsSourceFile.statements.slice();
252988
253278
  statements2.splice(2, 0, newRequire);
252989
- return import_typescript15.default.factory.updateSourceFile(tsSourceFile, statements2);
253279
+ return import_typescript20.default.factory.updateSourceFile(tsSourceFile, statements2);
252990
253280
  }
252991
253281
  const newImport = createImportStatement(importFnNames, importPath);
252992
253282
  const statements = tsSourceFile.statements.slice();
252993
253283
  statements.unshift(newImport);
252994
- return import_typescript15.default.factory.updateSourceFile(tsSourceFile, statements);
253284
+ return import_typescript20.default.factory.updateSourceFile(tsSourceFile, statements);
252995
253285
  };
252996
253286
 
252997
253287
  // src/compiler/transformers/component-native/proxy-custom-element-function.ts
@@ -253004,42 +253294,42 @@ var proxyCustomElement2 = (compilerCtx, transformOpts) => {
253004
253294
  }
253005
253295
  const principalComponent = moduleFile.cmps[0];
253006
253296
  for (const [stmtIndex, stmt] of tsSourceFile.statements.entries()) {
253007
- if (import_typescript16.default.isVariableStatement(stmt)) {
253297
+ if (import_typescript21.default.isVariableStatement(stmt)) {
253008
253298
  for (const [declarationIndex, declaration] of stmt.declarationList.declarations.entries()) {
253009
253299
  if (declaration.name.getText() !== principalComponent.componentClassName) {
253010
253300
  continue;
253011
253301
  }
253012
- if (!import_typescript16.default.isClassExpression(declaration.initializer)) {
253302
+ if (!import_typescript21.default.isClassExpression(declaration.initializer)) {
253013
253303
  continue;
253014
253304
  }
253015
- const renamedClassExpression = import_typescript16.default.factory.updateClassExpression(
253305
+ const renamedClassExpression = import_typescript21.default.factory.updateClassExpression(
253016
253306
  declaration.initializer,
253017
- import_typescript16.default.getModifiers(declaration.initializer),
253018
- import_typescript16.default.factory.createIdentifier(principalComponent.componentClassName),
253307
+ import_typescript21.default.getModifiers(declaration.initializer),
253308
+ import_typescript21.default.factory.createIdentifier(principalComponent.componentClassName),
253019
253309
  declaration.initializer.typeParameters,
253020
253310
  declaration.initializer.heritageClauses,
253021
253311
  declaration.initializer.members
253022
253312
  );
253023
253313
  const proxyCreationCall = createClassMetadataProxy(principalComponent, renamedClassExpression);
253024
- import_typescript16.default.addSyntheticLeadingComment(proxyCreationCall, import_typescript16.default.SyntaxKind.MultiLineCommentTrivia, "@__PURE__", false);
253025
- const proxiedComponentDeclaration = import_typescript16.default.factory.updateVariableDeclaration(
253314
+ import_typescript21.default.addSyntheticLeadingComment(proxyCreationCall, import_typescript21.default.SyntaxKind.MultiLineCommentTrivia, "@__PURE__", false);
253315
+ const proxiedComponentDeclaration = import_typescript21.default.factory.updateVariableDeclaration(
253026
253316
  declaration,
253027
253317
  declaration.name,
253028
253318
  declaration.exclamationToken,
253029
253319
  declaration.type,
253030
253320
  proxyCreationCall
253031
253321
  );
253032
- const updatedDeclarationList = import_typescript16.default.factory.updateVariableDeclarationList(stmt.declarationList, [
253322
+ const updatedDeclarationList = import_typescript21.default.factory.updateVariableDeclarationList(stmt.declarationList, [
253033
253323
  ...stmt.declarationList.declarations.slice(0, declarationIndex),
253034
253324
  proxiedComponentDeclaration,
253035
253325
  ...stmt.declarationList.declarations.slice(declarationIndex + 1)
253036
253326
  ]);
253037
- const updatedVariableStatement = import_typescript16.default.factory.updateVariableStatement(
253327
+ const updatedVariableStatement = import_typescript21.default.factory.updateVariableStatement(
253038
253328
  stmt,
253039
253329
  stmt.modifiers,
253040
253330
  updatedDeclarationList
253041
253331
  );
253042
- tsSourceFile = import_typescript16.default.factory.updateSourceFile(tsSourceFile, [
253332
+ tsSourceFile = import_typescript21.default.factory.updateSourceFile(tsSourceFile, [
253043
253333
  ...tsSourceFile.statements.slice(0, stmtIndex),
253044
253334
  updatedVariableStatement,
253045
253335
  ...tsSourceFile.statements.slice(stmtIndex + 1)
@@ -253060,10 +253350,10 @@ var proxyCustomElement2 = (compilerCtx, transformOpts) => {
253060
253350
  };
253061
253351
 
253062
253352
  // src/compiler/transformers/component-native/tranform-to-native-component.ts
253063
- var import_typescript30 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253353
+ var import_typescript32 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253064
253354
 
253065
253355
  // src/compiler/transformers/define-custom-element.ts
253066
- var import_typescript17 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253356
+ var import_typescript22 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253067
253357
  var defineCustomElement2 = (tsSourceFile, moduleFile, transformOpts) => {
253068
253358
  let statements = tsSourceFile.statements.slice();
253069
253359
  statements.push(
@@ -253074,31 +253364,31 @@ var defineCustomElement2 = (tsSourceFile, moduleFile, transformOpts) => {
253074
253364
  if (transformOpts.module === "cjs") {
253075
253365
  statements = removeComponentCjsExport(statements, moduleFile);
253076
253366
  }
253077
- return import_typescript17.default.factory.updateSourceFile(tsSourceFile, statements);
253367
+ return import_typescript22.default.factory.updateSourceFile(tsSourceFile, statements);
253078
253368
  };
253079
253369
  var addDefineCustomElement = (moduleFile, compilerMeta) => {
253080
253370
  if (compilerMeta.isPlain) {
253081
- return import_typescript17.default.factory.createExpressionStatement(
253082
- import_typescript17.default.factory.createCallExpression(
253083
- import_typescript17.default.factory.createPropertyAccessExpression(
253084
- import_typescript17.default.factory.createIdentifier("customElements"),
253085
- import_typescript17.default.factory.createIdentifier("define")
253371
+ return import_typescript22.default.factory.createExpressionStatement(
253372
+ import_typescript22.default.factory.createCallExpression(
253373
+ import_typescript22.default.factory.createPropertyAccessExpression(
253374
+ import_typescript22.default.factory.createIdentifier("customElements"),
253375
+ import_typescript22.default.factory.createIdentifier("define")
253086
253376
  ),
253087
253377
  [],
253088
253378
  [
253089
- import_typescript17.default.factory.createStringLiteral(compilerMeta.tagName),
253090
- import_typescript17.default.factory.createIdentifier(compilerMeta.componentClassName)
253379
+ import_typescript22.default.factory.createStringLiteral(compilerMeta.tagName),
253380
+ import_typescript22.default.factory.createIdentifier(compilerMeta.componentClassName)
253091
253381
  ]
253092
253382
  )
253093
253383
  );
253094
253384
  }
253095
253385
  addCoreRuntimeApi(moduleFile, RUNTIME_APIS.defineCustomElement);
253096
253386
  const compactMeta = formatComponentRuntimeMeta(compilerMeta, true);
253097
- const liternalCmpClassName = import_typescript17.default.factory.createIdentifier(compilerMeta.componentClassName);
253387
+ const liternalCmpClassName = import_typescript22.default.factory.createIdentifier(compilerMeta.componentClassName);
253098
253388
  const liternalMeta = convertValueToLiteral(compactMeta);
253099
- return import_typescript17.default.factory.createExpressionStatement(
253100
- import_typescript17.default.factory.createCallExpression(
253101
- import_typescript17.default.factory.createIdentifier(DEFINE_CUSTOM_ELEMENT),
253389
+ return import_typescript22.default.factory.createExpressionStatement(
253390
+ import_typescript22.default.factory.createCallExpression(
253391
+ import_typescript22.default.factory.createIdentifier(DEFINE_CUSTOM_ELEMENT),
253102
253392
  [],
253103
253393
  [liternalCmpClassName, liternalMeta]
253104
253394
  )
@@ -253107,12 +253397,12 @@ var addDefineCustomElement = (moduleFile, compilerMeta) => {
253107
253397
  var removeComponentCjsExport = (statements, moduleFile) => {
253108
253398
  const cmpClassNames = new Set(moduleFile.cmps.map((cmp) => cmp.componentClassName));
253109
253399
  return statements.filter((s) => {
253110
- if (s.kind === import_typescript17.default.SyntaxKind.ExpressionStatement) {
253400
+ if (s.kind === import_typescript22.default.SyntaxKind.ExpressionStatement) {
253111
253401
  const exp = s.expression;
253112
- if (exp && exp.kind === import_typescript17.default.SyntaxKind.BinaryExpression) {
253402
+ if (exp && exp.kind === import_typescript22.default.SyntaxKind.BinaryExpression) {
253113
253403
  const left = exp.left;
253114
- if (left && left.kind === import_typescript17.default.SyntaxKind.PropertyAccessExpression) {
253115
- if (left.expression && left.expression.kind === import_typescript17.default.SyntaxKind.Identifier) {
253404
+ if (left && left.kind === import_typescript22.default.SyntaxKind.PropertyAccessExpression) {
253405
+ if (left.expression && left.expression.kind === import_typescript22.default.SyntaxKind.Identifier) {
253116
253406
  const leftText = left.expression;
253117
253407
  if (leftText.text === "exports") {
253118
253408
  const right = exp.right;
@@ -253129,7 +253419,7 @@ var removeComponentCjsExport = (statements, moduleFile) => {
253129
253419
  };
253130
253420
 
253131
253421
  // src/compiler/transformers/style-imports.ts
253132
- var import_typescript18 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253422
+ var import_typescript23 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253133
253423
  var updateStyleImports = (transformOpts, tsSourceFile, moduleFile) => {
253134
253424
  if (transformOpts.module === "cjs") {
253135
253425
  return updateCjsStyleRequires(transformOpts, tsSourceFile, moduleFile);
@@ -253155,27 +253445,27 @@ var updateEsmStyleImports = (transformOpts, tsSourceFile, moduleFile) => {
253155
253445
  if (updateSourceFile) {
253156
253446
  let lastImportIndex = -1;
253157
253447
  for (let i = 0; i < statements.length; i++) {
253158
- if (import_typescript18.default.isImportDeclaration(statements[i])) {
253448
+ if (import_typescript23.default.isImportDeclaration(statements[i])) {
253159
253449
  lastImportIndex = i;
253160
253450
  }
253161
253451
  }
253162
253452
  statements.splice(lastImportIndex + 1, 0, ...styleImports);
253163
- return import_typescript18.default.factory.updateSourceFile(tsSourceFile, statements);
253453
+ return import_typescript23.default.factory.updateSourceFile(tsSourceFile, statements);
253164
253454
  }
253165
253455
  return tsSourceFile;
253166
253456
  };
253167
253457
  var updateEsmStyleImportPath = (transformOpts, tsSourceFile, statements, cmp, style) => {
253168
253458
  for (let i = 0; i < statements.length; i++) {
253169
253459
  const n3 = statements[i];
253170
- if (import_typescript18.default.isImportDeclaration(n3) && n3.importClause && n3.moduleSpecifier && import_typescript18.default.isStringLiteral(n3.moduleSpecifier)) {
253460
+ if (import_typescript23.default.isImportDeclaration(n3) && n3.importClause && n3.moduleSpecifier && import_typescript23.default.isStringLiteral(n3.moduleSpecifier)) {
253171
253461
  if (n3.importClause.name && n3.importClause.name.escapedText === style.styleIdentifier) {
253172
253462
  const orgImportPath = n3.moduleSpecifier.text;
253173
253463
  const importPath = getStyleImportPath(transformOpts, tsSourceFile, cmp, style, orgImportPath);
253174
- statements[i] = import_typescript18.default.factory.updateImportDeclaration(
253464
+ statements[i] = import_typescript23.default.factory.updateImportDeclaration(
253175
253465
  n3,
253176
253466
  retrieveTsModifiers(n3),
253177
253467
  n3.importClause,
253178
- import_typescript18.default.factory.createStringLiteral(importPath),
253468
+ import_typescript23.default.factory.createStringLiteral(importPath),
253179
253469
  void 0
253180
253470
  );
253181
253471
  break;
@@ -253188,34 +253478,34 @@ var createStyleImport = (transformOpts, tsSourceFile, cmp, style, moduleType = "
253188
253478
  const imports = [];
253189
253479
  for (const [i, externalStyle] of Object.entries(getExternalStyles(style))) {
253190
253480
  const styleIdentifier = `${style.styleIdentifier}${i}`;
253191
- const importIdentifier = import_typescript18.default.factory.createIdentifier(styleIdentifier);
253481
+ const importIdentifier = import_typescript23.default.factory.createIdentifier(styleIdentifier);
253192
253482
  const importPath = getStyleImportPath(transformOpts, tsSourceFile, cmp, style, externalStyle);
253193
253483
  if (moduleType === "esm") {
253194
253484
  imports.push(
253195
- import_typescript18.default.factory.createImportDeclaration(
253485
+ import_typescript23.default.factory.createImportDeclaration(
253196
253486
  void 0,
253197
- import_typescript18.default.factory.createImportClause(false, importIdentifier, void 0),
253198
- import_typescript18.default.factory.createStringLiteral(importPath)
253487
+ import_typescript23.default.factory.createImportClause(false, importIdentifier, void 0),
253488
+ import_typescript23.default.factory.createStringLiteral(importPath)
253199
253489
  )
253200
253490
  );
253201
253491
  } else if (moduleType === "cjs") {
253202
253492
  imports.push(
253203
- import_typescript18.default.factory.createVariableStatement(
253493
+ import_typescript23.default.factory.createVariableStatement(
253204
253494
  void 0,
253205
- import_typescript18.default.factory.createVariableDeclarationList(
253495
+ import_typescript23.default.factory.createVariableDeclarationList(
253206
253496
  [
253207
- import_typescript18.default.factory.createVariableDeclaration(
253497
+ import_typescript23.default.factory.createVariableDeclaration(
253208
253498
  importIdentifier,
253209
253499
  void 0,
253210
253500
  void 0,
253211
- import_typescript18.default.factory.createCallExpression(
253212
- import_typescript18.default.factory.createIdentifier("require"),
253501
+ import_typescript23.default.factory.createCallExpression(
253502
+ import_typescript23.default.factory.createIdentifier("require"),
253213
253503
  [],
253214
- [import_typescript18.default.factory.createStringLiteral(importPath)]
253504
+ [import_typescript23.default.factory.createStringLiteral(importPath)]
253215
253505
  )
253216
253506
  )
253217
253507
  ],
253218
- import_typescript18.default.NodeFlags.Const
253508
+ import_typescript23.default.NodeFlags.Const
253219
253509
  )
253220
253510
  )
253221
253511
  );
@@ -253235,7 +253525,7 @@ var updateCjsStyleRequires = (transformOpts, tsSourceFile, moduleFile) => {
253235
253525
  });
253236
253526
  });
253237
253527
  if (styleRequires.length > 0) {
253238
- return import_typescript18.default.factory.updateSourceFile(tsSourceFile, [...styleRequires, ...tsSourceFile.statements]);
253528
+ return import_typescript23.default.factory.updateSourceFile(tsSourceFile, [...styleRequires, ...tsSourceFile.statements]);
253239
253529
  }
253240
253530
  return tsSourceFile;
253241
253531
  };
@@ -253251,25 +253541,25 @@ var getStyleImportPath = (transformOpts, tsSourceFile, cmp, style, importPath) =
253251
253541
  };
253252
253542
 
253253
253543
  // src/compiler/transformers/component-native/native-component.ts
253254
- var import_typescript29 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253544
+ var import_typescript31 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253255
253545
 
253256
253546
  // src/compiler/transformers/host-data-transform.ts
253257
- var import_typescript19 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253547
+ var import_typescript24 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253258
253548
  var transformHostData = (classElements, moduleFile) => {
253259
253549
  const hasHostData = classElements.some(
253260
- (e) => import_typescript19.default.isMethodDeclaration(e) && e.name.escapedText === "hostData"
253550
+ (e) => import_typescript24.default.isMethodDeclaration(e) && e.name.escapedText === "hostData"
253261
253551
  );
253262
253552
  if (hasHostData) {
253263
253553
  const renderIndex = classElements.findIndex(
253264
- (e) => import_typescript19.default.isMethodDeclaration(e) && e.name.escapedText === "render"
253554
+ (e) => import_typescript24.default.isMethodDeclaration(e) && e.name.escapedText === "render"
253265
253555
  );
253266
253556
  if (renderIndex >= 0) {
253267
253557
  const renderMethod = classElements[renderIndex];
253268
- classElements[renderIndex] = import_typescript19.default.factory.updateMethodDeclaration(
253558
+ classElements[renderIndex] = import_typescript24.default.factory.updateMethodDeclaration(
253269
253559
  renderMethod,
253270
253560
  retrieveModifierLike(renderMethod),
253271
253561
  renderMethod.asteriskToken,
253272
- import_typescript19.default.factory.createIdentifier(INTERNAL_RENDER),
253562
+ import_typescript24.default.factory.createIdentifier(INTERNAL_RENDER),
253273
253563
  renderMethod.questionToken,
253274
253564
  renderMethod.typeParameters,
253275
253565
  renderMethod.parameters,
@@ -253285,10 +253575,10 @@ var syntheticRender = (moduleFile, hasRender) => {
253285
253575
  addCoreRuntimeApi(moduleFile, RUNTIME_APIS.h);
253286
253576
  const hArguments = [
253287
253577
  // __stencil_Host
253288
- import_typescript19.default.factory.createIdentifier(HOST),
253578
+ import_typescript24.default.factory.createIdentifier(HOST),
253289
253579
  // this.hostData()
253290
- import_typescript19.default.factory.createCallExpression(
253291
- import_typescript19.default.factory.createPropertyAccessExpression(import_typescript19.default.factory.createThis(), "hostData"),
253580
+ import_typescript24.default.factory.createCallExpression(
253581
+ import_typescript24.default.factory.createPropertyAccessExpression(import_typescript24.default.factory.createThis(), "hostData"),
253292
253582
  void 0,
253293
253583
  void 0
253294
253584
  )
@@ -253296,14 +253586,14 @@ var syntheticRender = (moduleFile, hasRender) => {
253296
253586
  if (hasRender) {
253297
253587
  hArguments.push(
253298
253588
  // this.render()
253299
- import_typescript19.default.factory.createCallExpression(
253300
- import_typescript19.default.factory.createPropertyAccessExpression(import_typescript19.default.factory.createThis(), INTERNAL_RENDER),
253589
+ import_typescript24.default.factory.createCallExpression(
253590
+ import_typescript24.default.factory.createPropertyAccessExpression(import_typescript24.default.factory.createThis(), INTERNAL_RENDER),
253301
253591
  void 0,
253302
253592
  void 0
253303
253593
  )
253304
253594
  );
253305
253595
  }
253306
- return import_typescript19.default.factory.createMethodDeclaration(
253596
+ return import_typescript24.default.factory.createMethodDeclaration(
253307
253597
  void 0,
253308
253598
  void 0,
253309
253599
  "render",
@@ -253311,111 +253601,15 @@ var syntheticRender = (moduleFile, hasRender) => {
253311
253601
  void 0,
253312
253602
  [],
253313
253603
  void 0,
253314
- import_typescript19.default.factory.createBlock([
253315
- import_typescript19.default.factory.createReturnStatement(
253316
- import_typescript19.default.factory.createCallExpression(import_typescript19.default.factory.createIdentifier(H2), void 0, hArguments)
253604
+ import_typescript24.default.factory.createBlock([
253605
+ import_typescript24.default.factory.createReturnStatement(
253606
+ import_typescript24.default.factory.createCallExpression(import_typescript24.default.factory.createIdentifier(H2), void 0, hArguments)
253317
253607
  )
253318
253608
  ])
253319
253609
  );
253320
253610
  };
253321
253611
  var INTERNAL_RENDER = "__stencil_render";
253322
253612
 
253323
- // src/compiler/transformers/remove-static-meta-properties.ts
253324
- var import_typescript20 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253325
- var removeStaticMetaProperties = (classNode) => {
253326
- if (classNode.members == null) {
253327
- return [];
253328
- }
253329
- return classNode.members.filter((classMember) => {
253330
- var _a2;
253331
- if ((_a2 = retrieveTsModifiers(classMember)) == null ? void 0 : _a2.some((m) => m.kind === import_typescript20.default.SyntaxKind.StaticKeyword)) {
253332
- const memberName = classMember.name.escapedText;
253333
- if (readOnlyArrayHasStringMember(STATIC_GETTERS_TO_REMOVE, memberName)) {
253334
- return false;
253335
- }
253336
- }
253337
- return true;
253338
- });
253339
- };
253340
- var STATIC_GETTERS_TO_REMOVE = [
253341
- // we want to remove `attachInternalsMemberName`, which is an 'internal' static
253342
- // property used to pass a string value along from the 'decorators-to-static'
253343
- // step through to the `ComponentCompilerMeta` phase, but we want to keep the
253344
- // `formAssociated` prop that we also set at the same time.
253345
- "attachInternalsMemberName",
253346
- "elementRef",
253347
- "encapsulation",
253348
- "events",
253349
- "is",
253350
- "listeners",
253351
- "methods",
253352
- "originalStyleUrls",
253353
- "properties",
253354
- "states",
253355
- "style",
253356
- "styleMode",
253357
- "styleUrl",
253358
- "styleUrls",
253359
- "styles",
253360
- "watchers"
253361
- ];
253362
-
253363
- // src/compiler/transformers/update-component-class.ts
253364
- var import_typescript21 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253365
- var updateComponentClass = (transformOpts, classNode, heritageClauses, members) => {
253366
- var _a2, _b, _c;
253367
- let classModifiers = (_b = (_a2 = retrieveTsModifiers(classNode)) == null ? void 0 : _a2.slice()) != null ? _b : [];
253368
- if (transformOpts.module === "cjs") {
253369
- if (transformOpts.componentExport === "customelement") {
253370
- classModifiers = classModifiers.filter((m) => {
253371
- return m.kind !== import_typescript21.default.SyntaxKind.ExportKeyword;
253372
- });
253373
- }
253374
- return import_typescript21.default.factory.updateClassDeclaration(
253375
- classNode,
253376
- [...(_c = retrieveTsDecorators(classNode)) != null ? _c : [], ...classModifiers],
253377
- classNode.name,
253378
- classNode.typeParameters,
253379
- heritageClauses,
253380
- members
253381
- );
253382
- }
253383
- return createConstClass(transformOpts, classNode, heritageClauses, members);
253384
- };
253385
- var createConstClass = (transformOpts, classNode, heritageClauses, members) => {
253386
- var _a2;
253387
- const className = classNode.name;
253388
- const tsModifiers = (_a2 = retrieveTsModifiers(classNode)) != null ? _a2 : [];
253389
- const classHasExportKeyword = tsModifiers.some((m) => m.kind === import_typescript21.default.SyntaxKind.ExportKeyword);
253390
- const classModifiers = tsModifiers.filter((m) => {
253391
- return m.kind !== import_typescript21.default.SyntaxKind.ExportKeyword;
253392
- });
253393
- const constModifiers = [];
253394
- if (transformOpts.componentExport !== "customelement" && classHasExportKeyword) {
253395
- constModifiers.push(import_typescript21.default.factory.createModifier(import_typescript21.default.SyntaxKind.ExportKeyword));
253396
- }
253397
- return import_typescript21.default.factory.createVariableStatement(
253398
- constModifiers,
253399
- import_typescript21.default.factory.createVariableDeclarationList(
253400
- [
253401
- import_typescript21.default.factory.createVariableDeclaration(
253402
- className,
253403
- void 0,
253404
- void 0,
253405
- import_typescript21.default.factory.createClassExpression(
253406
- classModifiers,
253407
- void 0,
253408
- classNode.typeParameters,
253409
- heritageClauses,
253410
- members
253411
- )
253412
- )
253413
- ],
253414
- import_typescript21.default.NodeFlags.Const
253415
- )
253416
- );
253417
- };
253418
-
253419
253613
  // src/compiler/transformers/watcher-meta-transform.ts
253420
253614
  var addWatchers = (classMembers, cmp) => {
253421
253615
  if (cmp.watchers.length > 0) {
@@ -253429,24 +253623,24 @@ var addWatchers = (classMembers, cmp) => {
253429
253623
  };
253430
253624
 
253431
253625
  // src/compiler/transformers/component-native/native-connected-callback.ts
253432
- var import_typescript22 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253626
+ var import_typescript25 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253433
253627
  var addNativeConnectedCallback = (classMembers, cmp) => {
253434
253628
  if (cmp.isPlain && cmp.hasRenderFn) {
253435
- const fnCall = import_typescript22.default.factory.createExpressionStatement(
253436
- import_typescript22.default.factory.createAssignment(
253437
- import_typescript22.default.factory.createPropertyAccessExpression(import_typescript22.default.factory.createThis(), "textContent"),
253438
- import_typescript22.default.factory.createCallExpression(
253439
- import_typescript22.default.factory.createPropertyAccessExpression(import_typescript22.default.factory.createThis(), "render"),
253629
+ const fnCall = import_typescript25.default.factory.createExpressionStatement(
253630
+ import_typescript25.default.factory.createAssignment(
253631
+ import_typescript25.default.factory.createPropertyAccessExpression(import_typescript25.default.factory.createThis(), "textContent"),
253632
+ import_typescript25.default.factory.createCallExpression(
253633
+ import_typescript25.default.factory.createPropertyAccessExpression(import_typescript25.default.factory.createThis(), "render"),
253440
253634
  void 0,
253441
253635
  void 0
253442
253636
  )
253443
253637
  )
253444
253638
  );
253445
253639
  const connectedCallback2 = classMembers.find((classMember) => {
253446
- return import_typescript22.default.isMethodDeclaration(classMember) && classMember.name.escapedText === CONNECTED_CALLBACK;
253640
+ return import_typescript25.default.isMethodDeclaration(classMember) && classMember.name.escapedText === CONNECTED_CALLBACK;
253447
253641
  });
253448
253642
  if (connectedCallback2 != null) {
253449
- const callbackMethod = import_typescript22.default.factory.createMethodDeclaration(
253643
+ const callbackMethod = import_typescript25.default.factory.createMethodDeclaration(
253450
253644
  void 0,
253451
253645
  void 0,
253452
253646
  CONNECTED_CALLBACK,
@@ -253454,12 +253648,12 @@ var addNativeConnectedCallback = (classMembers, cmp) => {
253454
253648
  void 0,
253455
253649
  [],
253456
253650
  void 0,
253457
- import_typescript22.default.factory.createBlock([fnCall, ...connectedCallback2.body.statements], true)
253651
+ import_typescript25.default.factory.createBlock([fnCall, ...connectedCallback2.body.statements], true)
253458
253652
  );
253459
253653
  const index2 = classMembers.indexOf(connectedCallback2);
253460
253654
  classMembers[index2] = callbackMethod;
253461
253655
  } else {
253462
- const callbackMethod = import_typescript22.default.factory.createMethodDeclaration(
253656
+ const callbackMethod = import_typescript25.default.factory.createMethodDeclaration(
253463
253657
  void 0,
253464
253658
  void 0,
253465
253659
  CONNECTED_CALLBACK,
@@ -253467,7 +253661,7 @@ var addNativeConnectedCallback = (classMembers, cmp) => {
253467
253661
  void 0,
253468
253662
  [],
253469
253663
  void 0,
253470
- import_typescript22.default.factory.createBlock([fnCall], true)
253664
+ import_typescript25.default.factory.createBlock([fnCall], true)
253471
253665
  );
253472
253666
  classMembers.push(callbackMethod);
253473
253667
  }
@@ -253476,56 +253670,25 @@ var addNativeConnectedCallback = (classMembers, cmp) => {
253476
253670
  var CONNECTED_CALLBACK = "connectedCallback";
253477
253671
 
253478
253672
  // src/compiler/transformers/component-native/native-constructor.ts
253479
- var import_typescript25 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253480
-
253481
- // src/compiler/transformers/create-event.ts
253482
- var import_typescript23 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253483
- var addCreateEvents = (moduleFile, cmp) => {
253484
- return cmp.events.map((ev) => {
253485
- addCoreRuntimeApi(moduleFile, RUNTIME_APIS.createEvent);
253486
- return import_typescript23.default.factory.createExpressionStatement(
253487
- import_typescript23.default.factory.createAssignment(
253488
- import_typescript23.default.factory.createPropertyAccessExpression(import_typescript23.default.factory.createThis(), import_typescript23.default.factory.createIdentifier(ev.method)),
253489
- import_typescript23.default.factory.createCallExpression(import_typescript23.default.factory.createIdentifier(CREATE_EVENT), void 0, [
253490
- import_typescript23.default.factory.createThis(),
253491
- import_typescript23.default.factory.createStringLiteral(ev.name),
253492
- import_typescript23.default.factory.createNumericLiteral(computeFlags(ev))
253493
- ])
253494
- )
253495
- );
253496
- });
253497
- };
253498
- var computeFlags = (eventMeta) => {
253499
- let flags = 0;
253500
- if (eventMeta.bubbles) {
253501
- flags |= 4 /* Bubbles */;
253502
- }
253503
- if (eventMeta.composed) {
253504
- flags |= 2 /* Composed */;
253505
- }
253506
- if (eventMeta.cancelable) {
253507
- flags |= 1 /* Cancellable */;
253508
- }
253509
- return flags;
253510
- };
253673
+ var import_typescript27 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253511
253674
 
253512
253675
  // src/compiler/transformers/component-native/attach-internals.ts
253513
- var import_typescript24 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253676
+ var import_typescript26 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253514
253677
  function createNativeAttachInternalsBinding(cmp) {
253515
253678
  if (cmp.attachInternalsMemberName) {
253516
253679
  return [
253517
- import_typescript24.default.factory.createExpressionStatement(
253518
- import_typescript24.default.factory.createBinaryExpression(
253519
- import_typescript24.default.factory.createPropertyAccessExpression(
253520
- import_typescript24.default.factory.createThis(),
253680
+ import_typescript26.default.factory.createExpressionStatement(
253681
+ import_typescript26.default.factory.createBinaryExpression(
253682
+ import_typescript26.default.factory.createPropertyAccessExpression(
253683
+ import_typescript26.default.factory.createThis(),
253521
253684
  // use the name set on the {@link d.ComponentCompilerMeta}
253522
- import_typescript24.default.factory.createIdentifier(cmp.attachInternalsMemberName)
253685
+ import_typescript26.default.factory.createIdentifier(cmp.attachInternalsMemberName)
253523
253686
  ),
253524
- import_typescript24.default.factory.createToken(import_typescript24.default.SyntaxKind.EqualsToken),
253525
- import_typescript24.default.factory.createCallExpression(
253526
- import_typescript24.default.factory.createPropertyAccessExpression(
253527
- import_typescript24.default.factory.createThis(),
253528
- import_typescript24.default.factory.createIdentifier("attachInternals")
253687
+ import_typescript26.default.factory.createToken(import_typescript26.default.SyntaxKind.EqualsToken),
253688
+ import_typescript26.default.factory.createCallExpression(
253689
+ import_typescript26.default.factory.createPropertyAccessExpression(
253690
+ import_typescript26.default.factory.createThis(),
253691
+ import_typescript26.default.factory.createIdentifier("attachInternals")
253529
253692
  ),
253530
253693
  void 0,
253531
253694
  []
@@ -253543,12 +253706,15 @@ var updateNativeConstructor = (classMembers, moduleFile, cmp, classNode) => {
253543
253706
  if (cmp.isPlain) {
253544
253707
  return;
253545
253708
  }
253709
+ const cstrMethodArgs = [
253710
+ import_typescript27.default.factory.createParameterDeclaration(void 0, void 0, import_typescript27.default.factory.createIdentifier("registerHost"))
253711
+ ];
253546
253712
  const nativeCstrStatements = [
253547
253713
  ...nativeInit(cmp),
253548
253714
  ...addCreateEvents(moduleFile, cmp),
253549
253715
  ...createNativeAttachInternalsBinding(cmp)
253550
253716
  ];
253551
- updateConstructor(classNode, classMembers, nativeCstrStatements);
253717
+ updateConstructor(classNode, classMembers, nativeCstrStatements, cstrMethodArgs, cmp.doesExtend);
253552
253718
  };
253553
253719
  var nativeInit = (cmp) => {
253554
253720
  const initStatements = [nativeRegisterHostStatement()];
@@ -253558,18 +253724,30 @@ var nativeInit = (cmp) => {
253558
253724
  return initStatements;
253559
253725
  };
253560
253726
  var nativeRegisterHostStatement = () => {
253561
- return import_typescript25.default.factory.createExpressionStatement(
253562
- import_typescript25.default.factory.createCallExpression(
253563
- import_typescript25.default.factory.createPropertyAccessExpression(import_typescript25.default.factory.createThis(), import_typescript25.default.factory.createIdentifier("__registerHost")),
253564
- void 0,
253565
- void 0
253566
- )
253727
+ return import_typescript27.default.factory.createIfStatement(
253728
+ import_typescript27.default.factory.createBinaryExpression(
253729
+ import_typescript27.default.factory.createIdentifier("registerHost"),
253730
+ import_typescript27.default.SyntaxKind.ExclamationEqualsEqualsToken,
253731
+ import_typescript27.default.factory.createFalse()
253732
+ ),
253733
+ import_typescript27.default.factory.createBlock([
253734
+ import_typescript27.default.factory.createExpressionStatement(
253735
+ import_typescript27.default.factory.createCallExpression(
253736
+ import_typescript27.default.factory.createPropertyAccessExpression(
253737
+ import_typescript27.default.factory.createThis(),
253738
+ import_typescript27.default.factory.createIdentifier("__registerHost")
253739
+ ),
253740
+ void 0,
253741
+ void 0
253742
+ )
253743
+ )
253744
+ ])
253567
253745
  );
253568
253746
  };
253569
253747
  var nativeAttachShadowStatement = () => {
253570
- return import_typescript25.default.factory.createExpressionStatement(
253571
- import_typescript25.default.factory.createCallExpression(
253572
- import_typescript25.default.factory.createPropertyAccessExpression(import_typescript25.default.factory.createThis(), import_typescript25.default.factory.createIdentifier("__attachShadow")),
253748
+ return import_typescript27.default.factory.createExpressionStatement(
253749
+ import_typescript27.default.factory.createCallExpression(
253750
+ import_typescript27.default.factory.createPropertyAccessExpression(import_typescript27.default.factory.createThis(), import_typescript27.default.factory.createIdentifier("__attachShadow")),
253573
253751
  void 0,
253574
253752
  void 0
253575
253753
  )
@@ -253577,21 +253755,21 @@ var nativeAttachShadowStatement = () => {
253577
253755
  };
253578
253756
 
253579
253757
  // src/compiler/transformers/component-native/native-element-getter.ts
253580
- var import_typescript26 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253758
+ var import_typescript28 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253581
253759
  var addNativeElementGetter = (classMembers, cmp) => {
253582
253760
  if (cmp.elementRef) {
253583
- const getter = import_typescript26.default.factory.createGetAccessorDeclaration(
253761
+ const getter = import_typescript28.default.factory.createGetAccessorDeclaration(
253584
253762
  void 0,
253585
253763
  cmp.elementRef,
253586
253764
  [],
253587
253765
  void 0,
253588
- import_typescript26.default.factory.createBlock([import_typescript26.default.factory.createReturnStatement(import_typescript26.default.factory.createThis())])
253766
+ import_typescript28.default.factory.createBlock([import_typescript28.default.factory.createReturnStatement(import_typescript28.default.factory.createThis())])
253589
253767
  );
253590
- import_typescript26.default.SyntaxKind.AmpersandToken;
253768
+ import_typescript28.default.SyntaxKind.AmpersandToken;
253591
253769
  const index2 = classMembers.findIndex(
253592
253770
  (member2) => {
253593
253771
  var _a2;
253594
- return member2.kind === import_typescript26.default.SyntaxKind.PropertyDeclaration && ((_a2 = member2.name) == null ? void 0 : _a2.escapedText) === cmp.elementRef;
253772
+ return member2.kind === import_typescript28.default.SyntaxKind.PropertyDeclaration && ((_a2 = member2.name) == null ? void 0 : _a2.escapedText) === cmp.elementRef;
253595
253773
  }
253596
253774
  );
253597
253775
  if (index2 >= 0) {
@@ -253608,10 +253786,10 @@ var addNativeComponentMeta = (classMembers, cmp) => {
253608
253786
  };
253609
253787
 
253610
253788
  // src/compiler/transformers/component-native/native-static-style.ts
253611
- var import_typescript28 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253789
+ var import_typescript30 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253612
253790
 
253613
253791
  // src/compiler/transformers/add-static-style.ts
253614
- var import_typescript27 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253792
+ var import_typescript29 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253615
253793
  var addStaticStyleGetterWithinClass = (classMembers, cmp) => {
253616
253794
  const styleLiteral = getStyleLiteral(cmp);
253617
253795
  if (styleLiteral) {
@@ -253621,9 +253799,9 @@ var addStaticStyleGetterWithinClass = (classMembers, cmp) => {
253621
253799
  var addStaticStylePropertyToClass = (styleStatements, cmp) => {
253622
253800
  const styleLiteral = getStyleLiteral(cmp);
253623
253801
  if (styleLiteral) {
253624
- const statement = import_typescript27.default.factory.createExpressionStatement(
253625
- import_typescript27.default.factory.createAssignment(
253626
- import_typescript27.default.factory.createPropertyAccessExpression(import_typescript27.default.factory.createIdentifier(cmp.componentClassName), "style"),
253802
+ const statement = import_typescript29.default.factory.createExpressionStatement(
253803
+ import_typescript29.default.factory.createAssignment(
253804
+ import_typescript29.default.factory.createPropertyAccessExpression(import_typescript29.default.factory.createIdentifier(cmp.componentClassName), "style"),
253627
253805
  styleLiteral
253628
253806
  )
253629
253807
  );
@@ -253645,19 +253823,19 @@ var getMultipleModeStyle = (cmp, styles2) => {
253645
253823
  styles2.forEach((style) => {
253646
253824
  if (typeof style.styleStr === "string") {
253647
253825
  const styleLiteral = createStyleLiteral(cmp, style);
253648
- const propStr = import_typescript27.default.factory.createPropertyAssignment(style.modeName, styleLiteral);
253826
+ const propStr = import_typescript29.default.factory.createPropertyAssignment(style.modeName, styleLiteral);
253649
253827
  styleModes.push(propStr);
253650
253828
  } else if (Array.isArray(style.externalStyles) && style.externalStyles.length > 0) {
253651
253829
  const styleUrlIdentifier = createStyleIdentifier(cmp, style);
253652
- const propUrlIdentifier = import_typescript27.default.factory.createPropertyAssignment(style.modeName, styleUrlIdentifier);
253830
+ const propUrlIdentifier = import_typescript29.default.factory.createPropertyAssignment(style.modeName, styleUrlIdentifier);
253653
253831
  styleModes.push(propUrlIdentifier);
253654
253832
  } else if (typeof style.styleIdentifier === "string") {
253655
- const styleIdentifier = import_typescript27.default.factory.createIdentifier(style.styleIdentifier);
253656
- const propIdentifier = import_typescript27.default.factory.createPropertyAssignment(style.modeName, styleIdentifier);
253833
+ const styleIdentifier = import_typescript29.default.factory.createIdentifier(style.styleIdentifier);
253834
+ const propIdentifier = import_typescript29.default.factory.createPropertyAssignment(style.modeName, styleIdentifier);
253657
253835
  styleModes.push(propIdentifier);
253658
253836
  }
253659
253837
  });
253660
- return import_typescript27.default.factory.createObjectLiteralExpression(styleModes, true);
253838
+ return import_typescript29.default.factory.createObjectLiteralExpression(styleModes, true);
253661
253839
  };
253662
253840
  var getSingleStyle = (cmp, style) => {
253663
253841
  if (typeof style.styleStr === "string") {
@@ -253667,16 +253845,16 @@ var getSingleStyle = (cmp, style) => {
253667
253845
  return createStyleIdentifier(cmp, style);
253668
253846
  }
253669
253847
  if (typeof style.styleIdentifier === "string") {
253670
- return import_typescript27.default.factory.createIdentifier(style.styleIdentifier);
253848
+ return import_typescript29.default.factory.createIdentifier(style.styleIdentifier);
253671
253849
  }
253672
253850
  return null;
253673
253851
  };
253674
253852
  var createStyleLiteral = (cmp, style) => {
253675
253853
  if (cmp.encapsulation === "scoped") {
253676
253854
  const scopeId = getScopeId2(cmp.tagName, style.modeName);
253677
- return import_typescript27.default.factory.createStringLiteral(scopeCss(style.styleStr, scopeId, false));
253855
+ return import_typescript29.default.factory.createStringLiteral(scopeCss(style.styleStr, scopeId, false));
253678
253856
  }
253679
- return import_typescript27.default.factory.createStringLiteral(style.styleStr);
253857
+ return import_typescript29.default.factory.createStringLiteral(style.styleStr);
253680
253858
  };
253681
253859
  var createStyleIdentifier = (cmp, style) => {
253682
253860
  const externalStyles = getExternalStyles(style);
@@ -253690,11 +253868,11 @@ var createStyleIdentifier = (cmp, style) => {
253690
253868
  var createIdentifierFromStyleIdentifier = (styleIdentifier, externalStyleIds) => {
253691
253869
  const id = externalStyleIds[0];
253692
253870
  if (externalStyleIds.length === 1) {
253693
- return import_typescript27.default.factory.createIdentifier(styleIdentifier + id);
253871
+ return import_typescript29.default.factory.createIdentifier(styleIdentifier + id);
253694
253872
  }
253695
- return import_typescript27.default.factory.createBinaryExpression(
253873
+ return import_typescript29.default.factory.createBinaryExpression(
253696
253874
  createIdentifierFromStyleIdentifier(styleIdentifier, [id]),
253697
- import_typescript27.default.SyntaxKind.PlusToken,
253875
+ import_typescript29.default.SyntaxKind.PlusToken,
253698
253876
  createIdentifierFromStyleIdentifier(styleIdentifier, externalStyleIds.slice(1))
253699
253877
  );
253700
253878
  };
@@ -253714,19 +253892,19 @@ var addMultipleModeStyleGetter = (classMembers, cmp, styles2) => {
253714
253892
  styles2.forEach((style) => {
253715
253893
  if (typeof style.styleStr === "string") {
253716
253894
  const styleLiteral = createStyleLiteral2(cmp, style);
253717
- const propStr = import_typescript28.default.factory.createPropertyAssignment(style.modeName, styleLiteral);
253895
+ const propStr = import_typescript30.default.factory.createPropertyAssignment(style.modeName, styleLiteral);
253718
253896
  styleModes.push(propStr);
253719
253897
  } else if (Array.isArray(style.externalStyles) && style.externalStyles.length > 0) {
253720
253898
  const styleUrlIdentifier = createStyleIdentifier(cmp, style);
253721
- const propUrlIdentifier = import_typescript28.default.factory.createPropertyAssignment(style.modeName, styleUrlIdentifier);
253899
+ const propUrlIdentifier = import_typescript30.default.factory.createPropertyAssignment(style.modeName, styleUrlIdentifier);
253722
253900
  styleModes.push(propUrlIdentifier);
253723
253901
  } else if (typeof style.styleIdentifier === "string") {
253724
- const styleIdentifier = import_typescript28.default.factory.createIdentifier(style.styleIdentifier);
253725
- const propIdentifier = import_typescript28.default.factory.createPropertyAssignment(style.modeName, styleIdentifier);
253902
+ const styleIdentifier = import_typescript30.default.factory.createIdentifier(style.styleIdentifier);
253903
+ const propIdentifier = import_typescript30.default.factory.createPropertyAssignment(style.modeName, styleIdentifier);
253726
253904
  styleModes.push(propIdentifier);
253727
253905
  }
253728
253906
  });
253729
- const styleObj = import_typescript28.default.factory.createObjectLiteralExpression(styleModes, true);
253907
+ const styleObj = import_typescript30.default.factory.createObjectLiteralExpression(styleModes, true);
253730
253908
  classMembers.push(createStaticGetter("style", styleObj));
253731
253909
  };
253732
253910
  var addSingleStyleGetter = (classMembers, cmp, style) => {
@@ -253737,16 +253915,16 @@ var addSingleStyleGetter = (classMembers, cmp, style) => {
253737
253915
  const styleUrlIdentifier = createStyleIdentifier(cmp, style);
253738
253916
  classMembers.push(createStaticGetter("style", styleUrlIdentifier));
253739
253917
  } else if (typeof style.styleIdentifier === "string") {
253740
- const styleIdentifier = import_typescript28.default.factory.createIdentifier(style.styleIdentifier);
253918
+ const styleIdentifier = import_typescript30.default.factory.createIdentifier(style.styleIdentifier);
253741
253919
  classMembers.push(createStaticGetter("style", styleIdentifier));
253742
253920
  }
253743
253921
  };
253744
253922
  var createStyleLiteral2 = (cmp, style) => {
253745
253923
  if (cmp.encapsulation === "scoped") {
253746
253924
  const scopeId = getScopeId2(cmp.tagName, style.modeName);
253747
- return import_typescript28.default.factory.createStringLiteral(scopeCss(style.styleStr, scopeId, false));
253925
+ return import_typescript30.default.factory.createStringLiteral(scopeCss(style.styleStr, scopeId, false));
253748
253926
  }
253749
- return import_typescript28.default.factory.createStringLiteral(style.styleStr);
253927
+ return import_typescript30.default.factory.createStringLiteral(style.styleStr);
253750
253928
  };
253751
253929
 
253752
253930
  // src/compiler/transformers/component-native/native-component.ts
@@ -253755,17 +253933,37 @@ var updateNativeComponentClass = (transformOpts, classNode, moduleFile, cmp) =>
253755
253933
  const members = updateNativeHostComponentMembers(transformOpts, withHeritageClauses, moduleFile, cmp);
253756
253934
  return updateComponentClass(transformOpts, withHeritageClauses, withHeritageClauses.heritageClauses, members);
253757
253935
  };
253936
+ var updateNativeExtendedClass = (node, moduleFile, transformOpts) => {
253937
+ var _a2, _b;
253938
+ let withHeritageClauses = updateNativeHostComponentHeritageClauses(node, moduleFile);
253939
+ const ctor = withHeritageClauses.members.find(import_typescript31.default.isConstructorDeclaration);
253940
+ if (!foundSuper((_a2 = ctor == null ? void 0 : ctor.body) == null ? void 0 : _a2.statements)) {
253941
+ const params = Array.from((_b = ctor == null ? void 0 : ctor.parameters) != null ? _b : []);
253942
+ withHeritageClauses = import_typescript31.default.factory.updateClassDeclaration(
253943
+ withHeritageClauses,
253944
+ withHeritageClauses.modifiers,
253945
+ withHeritageClauses.name,
253946
+ withHeritageClauses.typeParameters,
253947
+ withHeritageClauses.heritageClauses,
253948
+ updateConstructor(withHeritageClauses, Array.from(withHeritageClauses.members), [], params, true)
253949
+ );
253950
+ }
253951
+ return updateComponentClass(
253952
+ transformOpts,
253953
+ withHeritageClauses,
253954
+ withHeritageClauses.heritageClauses,
253955
+ removeStaticMetaProperties(withHeritageClauses)
253956
+ );
253957
+ };
253758
253958
  var updateNativeHostComponentHeritageClauses = (classNode, moduleFile) => {
253759
253959
  if (classNode.heritageClauses != null && classNode.heritageClauses.length > 0) {
253760
253960
  return classNode;
253761
253961
  }
253762
- if (moduleFile.cmps.length >= 1) {
253763
- addOutputTargetCoreRuntimeApi(moduleFile, DIST_CUSTOM_ELEMENTS, RUNTIME_APIS.HTMLElement);
253764
- }
253765
- const heritageClause = import_typescript29.default.factory.createHeritageClause(import_typescript29.default.SyntaxKind.ExtendsKeyword, [
253766
- import_typescript29.default.factory.createExpressionWithTypeArguments(import_typescript29.default.factory.createIdentifier(HTML_ELEMENT), [])
253962
+ addOutputTargetCoreRuntimeApi(moduleFile, DIST_CUSTOM_ELEMENTS, RUNTIME_APIS.HTMLElement);
253963
+ const heritageClause = import_typescript31.default.factory.createHeritageClause(import_typescript31.default.SyntaxKind.ExtendsKeyword, [
253964
+ import_typescript31.default.factory.createExpressionWithTypeArguments(import_typescript31.default.factory.createIdentifier(HTML_ELEMENT), [])
253767
253965
  ]);
253768
- return import_typescript29.default.factory.updateClassDeclaration(
253966
+ return import_typescript31.default.factory.updateClassDeclaration(
253769
253967
  classNode,
253770
253968
  classNode.modifiers,
253771
253969
  classNode.name,
@@ -253797,15 +253995,18 @@ var nativeComponentTransform = (compilerCtx, transformOpts) => {
253797
253995
  var _a2, _b;
253798
253996
  const moduleFile = getModuleFromSourceFile(compilerCtx, tsSourceFile);
253799
253997
  const visitNode = (node) => {
253800
- if (import_typescript30.default.isClassDeclaration(node)) {
253998
+ var _a3;
253999
+ if (import_typescript32.default.isClassDeclaration(node)) {
253801
254000
  const cmp = getComponentMeta(compilerCtx, tsSourceFile, node);
253802
254001
  if (cmp != null) {
253803
254002
  return updateNativeComponentClass(transformOpts, node, moduleFile, cmp);
254003
+ } else if ((_a3 = compilerCtx.moduleMap.get(tsSourceFile.fileName)) == null ? void 0 : _a3.isExtended) {
254004
+ return updateNativeExtendedClass(node, moduleFile, transformOpts);
253804
254005
  }
253805
254006
  }
253806
- return import_typescript30.default.visitEachChild(node, visitNode, transformCtx);
254007
+ return import_typescript32.default.visitEachChild(node, visitNode, transformCtx);
253807
254008
  };
253808
- tsSourceFile = import_typescript30.default.visitEachChild(tsSourceFile, visitNode, transformCtx);
254009
+ tsSourceFile = import_typescript32.default.visitEachChild(tsSourceFile, visitNode, transformCtx);
253809
254010
  if (moduleFile.cmps.length > 0) {
253810
254011
  if (transformOpts.componentExport === "customelement") {
253811
254012
  tsSourceFile = defineCustomElement2(tsSourceFile, moduleFile, transformOpts);
@@ -253829,23 +254030,23 @@ var nativeComponentTransform = (compilerCtx, transformOpts) => {
253829
254030
 
253830
254031
  // src/compiler/transformers/rewrite-aliased-paths.ts
253831
254032
  var import_path25 = require("path");
253832
- var import_typescript31 = __toESM(require_typescript_5_5_4_bundle_cache_min());
254033
+ var import_typescript33 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253833
254034
  function rewriteAliasedDTSImportPaths(transformCtx) {
253834
- const compilerHost = import_typescript31.default.createCompilerHost(transformCtx.getCompilerOptions());
254035
+ const compilerHost = import_typescript33.default.createCompilerHost(transformCtx.getCompilerOptions());
253835
254036
  return (tsBundleOrSourceFile) => {
253836
- const fileName = import_typescript31.default.isBundle(tsBundleOrSourceFile) ? tsBundleOrSourceFile.getSourceFile().fileName : tsBundleOrSourceFile.fileName;
253837
- return import_typescript31.default.visitEachChild(tsBundleOrSourceFile, visit(compilerHost, transformCtx, fileName), transformCtx);
254037
+ const fileName = import_typescript33.default.isBundle(tsBundleOrSourceFile) ? tsBundleOrSourceFile.getSourceFile().fileName : tsBundleOrSourceFile.fileName;
254038
+ return import_typescript33.default.visitEachChild(tsBundleOrSourceFile, visit(compilerHost, transformCtx, fileName), transformCtx);
253838
254039
  };
253839
254040
  }
253840
254041
  function rewriteAliasedSourceFileImportPaths(transformCtx) {
253841
- const compilerHost = import_typescript31.default.createCompilerHost(transformCtx.getCompilerOptions());
254042
+ const compilerHost = import_typescript33.default.createCompilerHost(transformCtx.getCompilerOptions());
253842
254043
  return (tsSourceFile) => {
253843
- return import_typescript31.default.visitEachChild(tsSourceFile, visit(compilerHost, transformCtx, tsSourceFile.fileName), transformCtx);
254044
+ return import_typescript33.default.visitEachChild(tsSourceFile, visit(compilerHost, transformCtx, tsSourceFile.fileName), transformCtx);
253844
254045
  };
253845
254046
  }
253846
254047
  function visit(compilerHost, transformCtx, sourceFilePath) {
253847
254048
  return (node) => {
253848
- if (!import_typescript31.default.isImportDeclaration(node)) {
254049
+ if (!import_typescript33.default.isImportDeclaration(node)) {
253849
254050
  return node;
253850
254051
  }
253851
254052
  return rewriteAliasedImport(compilerHost, transformCtx, sourceFilePath, node);
@@ -253853,14 +254054,14 @@ function visit(compilerHost, transformCtx, sourceFilePath) {
253853
254054
  }
253854
254055
  function rewriteAliasedImport(compilerHost, transformCtx, sourceFilePath, node) {
253855
254056
  var _a2, _b;
253856
- if (!import_typescript31.default.isStringLiteral(node.moduleSpecifier)) {
254057
+ if (!import_typescript33.default.isStringLiteral(node.moduleSpecifier)) {
253857
254058
  return node;
253858
254059
  }
253859
254060
  let importPath = node.moduleSpecifier.text;
253860
254061
  if (importPath.startsWith(".")) {
253861
254062
  return node;
253862
254063
  }
253863
- const module2 = import_typescript31.default.resolveModuleName(importPath, sourceFilePath, transformCtx.getCompilerOptions(), compilerHost);
254064
+ const module2 = import_typescript33.default.resolveModuleName(importPath, sourceFilePath, transformCtx.getCompilerOptions(), compilerHost);
253864
254065
  const hasResolvedFileName = ((_a2 = module2.resolvedModule) == null ? void 0 : _a2.resolvedFileName) != null;
253865
254066
  const isModuleFromNodeModules = ((_b = module2.resolvedModule) == null ? void 0 : _b.isExternalLibraryImport) === true;
253866
254067
  const shouldTranspileImportPath = hasResolvedFileName && !isModuleFromNodeModules;
@@ -253868,7 +254069,7 @@ function rewriteAliasedImport(compilerHost, transformCtx, sourceFilePath, node)
253868
254069
  return node;
253869
254070
  }
253870
254071
  const extensionRegex = new RegExp(
253871
- Object.values(import_typescript31.default.Extension).map((extension) => `${extension}$`.replace(".", "\\.")).join("|")
254072
+ Object.values(import_typescript33.default.Extension).map((extension) => `${extension}$`.replace(".", "\\.")).join("|")
253872
254073
  );
253873
254074
  const resolvePathInDestination = module2.resolvedModule.resolvedFileName;
253874
254075
  importPath = normalizePath(relative((0, import_path25.dirname)(sourceFilePath), resolvePathInDestination).replace(extensionRegex, ""));
@@ -253916,7 +254117,7 @@ function rewriteAliasedImport(compilerHost, transformCtx, sourceFilePath, node)
253916
254117
  }
253917
254118
 
253918
254119
  // src/compiler/transformers/update-stencil-core-import.ts
253919
- var import_typescript32 = __toESM(require_typescript_5_5_4_bundle_cache_min());
254120
+ var import_typescript34 = __toESM(require_typescript_5_5_4_bundle_cache_min());
253920
254121
  var updateStencilCoreImports = (updatedCoreImportPath) => {
253921
254122
  return () => {
253922
254123
  return (tsSourceFile) => {
@@ -253926,26 +254127,26 @@ var updateStencilCoreImports = (updatedCoreImportPath) => {
253926
254127
  let madeChanges = false;
253927
254128
  const newStatements = [];
253928
254129
  tsSourceFile.statements.forEach((s) => {
253929
- if (import_typescript32.default.isImportDeclaration(s)) {
253930
- if (s.moduleSpecifier != null && import_typescript32.default.isStringLiteral(s.moduleSpecifier)) {
254130
+ if (import_typescript34.default.isImportDeclaration(s)) {
254131
+ if (s.moduleSpecifier != null && import_typescript34.default.isStringLiteral(s.moduleSpecifier)) {
253931
254132
  if (s.moduleSpecifier.text === STENCIL_CORE_ID) {
253932
- if (s.importClause && s.importClause.namedBindings && s.importClause.namedBindings.kind === import_typescript32.default.SyntaxKind.NamedImports) {
254133
+ if (s.importClause && s.importClause.namedBindings && s.importClause.namedBindings.kind === import_typescript34.default.SyntaxKind.NamedImports) {
253933
254134
  const origImports = s.importClause.namedBindings.elements;
253934
254135
  const keepImports = origImports.map((e) => e.getText()).filter((name) => KEEP_IMPORTS.has(name));
253935
254136
  if (keepImports.length > 0) {
253936
- const newImport = import_typescript32.default.factory.updateImportDeclaration(
254137
+ const newImport = import_typescript34.default.factory.updateImportDeclaration(
253937
254138
  s,
253938
254139
  void 0,
253939
- import_typescript32.default.factory.createImportClause(
254140
+ import_typescript34.default.factory.createImportClause(
253940
254141
  false,
253941
254142
  void 0,
253942
- import_typescript32.default.factory.createNamedImports(
254143
+ import_typescript34.default.factory.createNamedImports(
253943
254144
  keepImports.map(
253944
- (name) => import_typescript32.default.factory.createImportSpecifier(false, void 0, import_typescript32.default.factory.createIdentifier(name))
254145
+ (name) => import_typescript34.default.factory.createImportSpecifier(false, void 0, import_typescript34.default.factory.createIdentifier(name))
253945
254146
  )
253946
254147
  )
253947
254148
  ),
253948
- import_typescript32.default.factory.createStringLiteral(updatedCoreImportPath),
254149
+ import_typescript34.default.factory.createStringLiteral(updatedCoreImportPath),
253949
254150
  void 0
253950
254151
  );
253951
254152
  newStatements.push(newImport);
@@ -253959,7 +254160,7 @@ var updateStencilCoreImports = (updatedCoreImportPath) => {
253959
254160
  newStatements.push(s);
253960
254161
  });
253961
254162
  if (madeChanges) {
253962
- return import_typescript32.default.factory.updateSourceFile(
254163
+ return import_typescript34.default.factory.updateSourceFile(
253963
254164
  tsSourceFile,
253964
254165
  newStatements,
253965
254166
  tsSourceFile.isDeclarationFile,
@@ -253989,7 +254190,8 @@ var KEEP_IMPORTS = /* @__PURE__ */ new Set([
253989
254190
  "forceUpdate",
253990
254191
  "getRenderingRef",
253991
254192
  "forceModeUpdate",
253992
- "setErrorHandler"
254193
+ "setErrorHandler",
254194
+ "Mixin"
253993
254195
  ]);
253994
254196
 
253995
254197
  // src/compiler/app-core/app-data.ts
@@ -254136,6 +254338,7 @@ var getCustomElementsBuildConditionals = (config, cmps) => {
254136
254338
  build2.hydrateServerSide = false;
254137
254339
  build2.asyncQueue = config.taskQueue === "congestionAsync";
254138
254340
  build2.taskQueue = config.taskQueue !== "immediate";
254341
+ build2.initializeNextTick = config.extras.initializeNextTick;
254139
254342
  updateBuildConditionals(config, build2);
254140
254343
  build2.devTools = false;
254141
254344
  return build2;
@@ -254330,133 +254533,6 @@ var import_typescript37 = __toESM(require_typescript_5_5_4_bundle_cache_min());
254330
254533
  // src/compiler/transformers/component-hydrate/hydrate-component.ts
254331
254534
  var import_typescript36 = __toESM(require_typescript_5_5_4_bundle_cache_min());
254332
254535
 
254333
- // src/compiler/transformers/component-lazy/lazy-constructor.ts
254334
- var import_typescript34 = __toESM(require_typescript_5_5_4_bundle_cache_min());
254335
-
254336
- // src/compiler/transformers/component-lazy/attach-internals.ts
254337
- var import_typescript33 = __toESM(require_typescript_5_5_4_bundle_cache_min());
254338
-
254339
- // src/compiler/transformers/component-lazy/constants.ts
254340
- var HOST_REF_ARG = "hostRef";
254341
-
254342
- // src/compiler/transformers/component-lazy/attach-internals.ts
254343
- function createLazyAttachInternalsBinding(cmp) {
254344
- if (cmp.attachInternalsMemberName) {
254345
- return [
254346
- import_typescript33.default.factory.createIfStatement(
254347
- // the condition for the `if` statement here is just whether the
254348
- // following is defined:
254349
- //
254350
- // ```ts
254351
- // hostRef.$hostElement$["s-ei"]
254352
- // ```
254353
- hostRefElementInternalsPropAccess(),
254354
- import_typescript33.default.factory.createBlock(
254355
- [
254356
- // this `ts.factory` call creates the following statement:
254357
- //
254358
- // ```ts
254359
- // this.${ cmp.formInternalsMemberName } = hostRef.$hostElement$['s-ei'];
254360
- // ```
254361
- import_typescript33.default.factory.createExpressionStatement(
254362
- import_typescript33.default.factory.createBinaryExpression(
254363
- import_typescript33.default.factory.createPropertyAccessExpression(
254364
- import_typescript33.default.factory.createThis(),
254365
- // use the name set on the {@link d.ComponentCompilerMeta}
254366
- import_typescript33.default.factory.createIdentifier(cmp.attachInternalsMemberName)
254367
- ),
254368
- import_typescript33.default.factory.createToken(import_typescript33.default.SyntaxKind.EqualsToken),
254369
- hostRefElementInternalsPropAccess()
254370
- )
254371
- )
254372
- ],
254373
- true
254374
- ),
254375
- import_typescript33.default.factory.createBlock(
254376
- [
254377
- // this `ts.factory` call creates the following statement:
254378
- //
254379
- // ```ts
254380
- // this.${ cmp.attachInternalsMemberName } = hostRef.$hostElement$.attachInternals();
254381
- // ```
254382
- import_typescript33.default.factory.createExpressionStatement(
254383
- import_typescript33.default.factory.createBinaryExpression(
254384
- import_typescript33.default.factory.createPropertyAccessExpression(
254385
- import_typescript33.default.factory.createThis(),
254386
- // use the name set on the {@link d.ComponentCompilerMeta}
254387
- import_typescript33.default.factory.createIdentifier(cmp.attachInternalsMemberName)
254388
- ),
254389
- import_typescript33.default.factory.createToken(import_typescript33.default.SyntaxKind.EqualsToken),
254390
- import_typescript33.default.factory.createCallExpression(
254391
- import_typescript33.default.factory.createPropertyAccessExpression(
254392
- import_typescript33.default.factory.createPropertyAccessExpression(
254393
- import_typescript33.default.factory.createIdentifier(HOST_REF_ARG),
254394
- import_typescript33.default.factory.createIdentifier("$hostElement$")
254395
- ),
254396
- import_typescript33.default.factory.createIdentifier("attachInternals")
254397
- ),
254398
- void 0,
254399
- []
254400
- )
254401
- )
254402
- ),
254403
- // this `ts.factory` call produces the following:
254404
- //
254405
- // ```ts
254406
- // hostRef.$hostElement$['s-ei'] = this.${ cmp.attachInternalsMemberName };
254407
- // ```
254408
- import_typescript33.default.factory.createExpressionStatement(
254409
- import_typescript33.default.factory.createBinaryExpression(
254410
- hostRefElementInternalsPropAccess(),
254411
- import_typescript33.default.factory.createToken(import_typescript33.default.SyntaxKind.EqualsToken),
254412
- import_typescript33.default.factory.createPropertyAccessExpression(
254413
- import_typescript33.default.factory.createThis(),
254414
- // use the name set on the {@link d.ComponentCompilerMeta}
254415
- import_typescript33.default.factory.createIdentifier(cmp.attachInternalsMemberName)
254416
- )
254417
- )
254418
- )
254419
- ],
254420
- true
254421
- )
254422
- )
254423
- ];
254424
- } else {
254425
- return [];
254426
- }
254427
- }
254428
- function hostRefElementInternalsPropAccess() {
254429
- return import_typescript33.default.factory.createElementAccessExpression(
254430
- import_typescript33.default.factory.createPropertyAccessExpression(
254431
- import_typescript33.default.factory.createIdentifier(HOST_REF_ARG),
254432
- import_typescript33.default.factory.createIdentifier("$hostElement$")
254433
- ),
254434
- import_typescript33.default.factory.createStringLiteral("s-ei")
254435
- );
254436
- }
254437
-
254438
- // src/compiler/transformers/component-lazy/lazy-constructor.ts
254439
- var updateLazyComponentConstructor = (classMembers, classNode, moduleFile, cmp) => {
254440
- const cstrMethodArgs = [
254441
- import_typescript34.default.factory.createParameterDeclaration(void 0, void 0, import_typescript34.default.factory.createIdentifier(HOST_REF_ARG))
254442
- ];
254443
- const cstrStatements = [
254444
- registerInstanceStatement(moduleFile),
254445
- ...addCreateEvents(moduleFile, cmp),
254446
- ...createLazyAttachInternalsBinding(cmp)
254447
- ];
254448
- updateConstructor(classNode, classMembers, cstrStatements, cstrMethodArgs);
254449
- };
254450
- var registerInstanceStatement = (moduleFile) => {
254451
- addCoreRuntimeApi(moduleFile, RUNTIME_APIS.registerInstance);
254452
- return import_typescript34.default.factory.createExpressionStatement(
254453
- import_typescript34.default.factory.createCallExpression(import_typescript34.default.factory.createIdentifier(REGISTER_INSTANCE), void 0, [
254454
- import_typescript34.default.factory.createThis(),
254455
- import_typescript34.default.factory.createIdentifier(HOST_REF_ARG)
254456
- ])
254457
- );
254458
- };
254459
-
254460
254536
  // src/compiler/transformers/component-lazy/lazy-element-getter.ts
254461
254537
  var import_typescript35 = __toESM(require_typescript_5_5_4_bundle_cache_min());
254462
254538
  var addLazyElementGetter = (classMembers, moduleFile, cmp) => {
@@ -254546,10 +254622,13 @@ var hydrateComponentTransform = (compilerCtx, transformOpts) => {
254546
254622
  return (tsSourceFile) => {
254547
254623
  const moduleFile = getModuleFromSourceFile(compilerCtx, tsSourceFile);
254548
254624
  const visitNode = (node) => {
254625
+ var _a2;
254549
254626
  if (import_typescript37.default.isClassDeclaration(node)) {
254550
254627
  const cmp = getComponentMeta(compilerCtx, tsSourceFile, node);
254551
254628
  if (cmp != null) {
254552
254629
  return updateHydrateComponentClass(node, moduleFile, cmp);
254630
+ } else if ((_a2 = compilerCtx.moduleMap.get(tsSourceFile.fileName)) == null ? void 0 : _a2.isMixin) {
254631
+ return updateMixin(node, moduleFile, cmp, transformOpts);
254553
254632
  }
254554
254633
  }
254555
254634
  return import_typescript37.default.visitEachChild(node, visitNode, transformCtx);
@@ -255216,8 +255295,11 @@ var lazyComponentTransform = (compilerCtx, transformOpts) => {
255216
255295
  const visitNode = (node) => {
255217
255296
  if (import_typescript38.default.isClassDeclaration(node)) {
255218
255297
  const cmp = getComponentMeta(compilerCtx, tsSourceFile, node);
255298
+ const module2 = compilerCtx.moduleMap.get(tsSourceFile.fileName);
255219
255299
  if (cmp != null) {
255220
255300
  return updateLazyComponentClass(transformOpts, styleStatements, node, moduleFile, cmp);
255301
+ } else if (module2 == null ? void 0 : module2.isMixin) {
255302
+ return updateMixin(node, moduleFile, cmp, transformOpts);
255221
255303
  }
255222
255304
  }
255223
255305
  return import_typescript38.default.visitEachChild(node, visitNode, transformCtx);
@@ -255276,9 +255358,9 @@ var generateRollupOutput = async (build2, options, config, entryModules) => {
255276
255358
  };
255277
255359
 
255278
255360
  // src/compiler/output-targets/dist-lazy/write-lazy-entry-module.ts
255279
- var writeLazyModule = async (config, compilerCtx, outputTargetType, destinations, entryModule, shouldHash, code, sourceMap, sufix) => {
255280
- const bundleId = await getBundleId(config, entryModule.entryKey, shouldHash, code, sufix);
255281
- const fileName = `${bundleId}.entry.js`;
255361
+ var writeLazyModule = async (compilerCtx, outputTargetType, destinations, code, sourceMap, rollupResult) => {
255362
+ const fileName = rollupResult.fileName;
255363
+ const bundleId = fileName.replace(".entry.js", "");
255282
255364
  if (sourceMap) {
255283
255365
  code = code + getSourceMappingUrlForEndOfFile(fileName);
255284
255366
  }
@@ -255296,21 +255378,9 @@ var writeLazyModule = async (config, compilerCtx, outputTargetType, destinations
255296
255378
  code
255297
255379
  };
255298
255380
  };
255299
- var getBundleId = async (config, entryKey, shouldHash, code, sufix) => {
255300
- if (shouldHash) {
255301
- const hash = await config.sys.generateContentHash(code, config.hashedFileNameLength);
255302
- return `p-${hash}${sufix}`;
255303
- }
255304
- const components = entryKey.split(".");
255305
- let bundleId = components[0];
255306
- if (components.length > 2) {
255307
- bundleId = `${bundleId}_${components.length - 1}`;
255308
- }
255309
- return bundleId + sufix;
255310
- };
255311
255381
 
255312
255382
  // src/compiler/output-targets/dist-lazy/generate-lazy-module.ts
255313
- var generateLazyModules = async (config, compilerCtx, buildCtx, outputTargetType, destinations, results, sourceTarget, isBrowserBuild, sufix) => {
255383
+ var generateLazyModules = async (config, compilerCtx, buildCtx, outputTargetType, destinations, results, sourceTarget, isBrowserBuild) => {
255314
255384
  if (!Array.isArray(destinations) || destinations.length === 0) {
255315
255385
  return [];
255316
255386
  }
@@ -255329,8 +255399,7 @@ var generateLazyModules = async (config, compilerCtx, buildCtx, outputTargetType
255329
255399
  destinations,
255330
255400
  sourceTarget,
255331
255401
  shouldMinify,
255332
- isBrowserBuild,
255333
- sufix
255402
+ isBrowserBuild
255334
255403
  );
255335
255404
  })
255336
255405
  );
@@ -255419,9 +255488,8 @@ var generateCaseClauseCjs = (bundleId) => {
255419
255488
  /* webpackMode: "lazy" */
255420
255489
  './${bundleId}.entry.js')); }).then(processMod, consoleError);`;
255421
255490
  };
255422
- var generateLazyEntryModule = async (config, compilerCtx, buildCtx, rollupResult, outputTargetType, destinations, sourceTarget, shouldMinify, isBrowserBuild, sufix) => {
255491
+ var generateLazyEntryModule = async (config, compilerCtx, buildCtx, rollupResult, outputTargetType, destinations, sourceTarget, shouldMinify, isBrowserBuild) => {
255423
255492
  const entryModule = buildCtx.entryModules.find((entryModule2) => entryModule2.entryKey === rollupResult.entryKey);
255424
- const shouldHash = config.hashFileNames && isBrowserBuild;
255425
255493
  const { code, sourceMap } = await convertChunk(
255426
255494
  config,
255427
255495
  compilerCtx,
@@ -255433,17 +255501,7 @@ var generateLazyEntryModule = async (config, compilerCtx, buildCtx, rollupResult
255433
255501
  rollupResult.code,
255434
255502
  rollupResult.map
255435
255503
  );
255436
- const output = await writeLazyModule(
255437
- config,
255438
- compilerCtx,
255439
- outputTargetType,
255440
- destinations,
255441
- entryModule,
255442
- shouldHash,
255443
- code,
255444
- sourceMap,
255445
- sufix
255446
- );
255504
+ const output = await writeLazyModule(compilerCtx, outputTargetType, destinations, code, sourceMap, rollupResult);
255447
255505
  return {
255448
255506
  rollupResult,
255449
255507
  entryKey: rollupResult.entryKey,
@@ -255586,6 +255644,54 @@ var convertChunk = async (config, compilerCtx, buildCtx, sourceTarget, shouldMin
255586
255644
  return { code, sourceMap };
255587
255645
  };
255588
255646
 
255647
+ // src/compiler/output-targets/dist-lazy/lazy-bundleid-plugin.ts
255648
+ var lazyBundleIdPlugin = (buildCtx, config, shouldHash, suffix) => {
255649
+ const getBundleId = async (entryKey, code, suffix2) => {
255650
+ var _a2;
255651
+ if (shouldHash && ((_a2 = config.sys) == null ? void 0 : _a2.generateContentHash)) {
255652
+ const hash = await config.sys.generateContentHash(code, config.hashedFileNameLength);
255653
+ return `p-${hash}${suffix2}`;
255654
+ }
255655
+ const components = entryKey.split(".");
255656
+ let bundleId = components[0];
255657
+ if (components.length > 2) {
255658
+ bundleId = `${bundleId}_${components.length - 1}`;
255659
+ }
255660
+ return bundleId + suffix2;
255661
+ };
255662
+ return {
255663
+ name: "lazyBundleIdPlugin",
255664
+ async generateBundle(_, bundle) {
255665
+ const files = Object.entries(bundle);
255666
+ const map2 = /* @__PURE__ */ new Map();
255667
+ for (const [_key, file] of files) {
255668
+ if (!file.isEntry) continue;
255669
+ const entryModule = buildCtx.entryModules.find((em) => em.entryKey === file.name);
255670
+ if (!entryModule) continue;
255671
+ map2.set(file.fileName, await getBundleId(file.name, file.code, suffix) + ".entry.js");
255672
+ }
255673
+ if (!map2.size) return;
255674
+ for (const [_key, file] of files) {
255675
+ if (!file.isEntry) continue;
255676
+ file.facadeModuleId = map2.get(file.fileName) || file.facadeModuleId;
255677
+ file.fileName = map2.get(file.fileName) || file.fileName;
255678
+ const magicString = new MagicString(file.code);
255679
+ file.imports.forEach((imported, i) => {
255680
+ const replaced = map2.get(imported);
255681
+ if (replaced) {
255682
+ magicString.replaceAll(imported, replaced);
255683
+ file.imports[i] = replaced;
255684
+ }
255685
+ });
255686
+ file.code = magicString.toString();
255687
+ if (config.sourceMap) {
255688
+ file.map = magicString.generateMap();
255689
+ }
255690
+ }
255691
+ }
255692
+ };
255693
+ };
255694
+
255589
255695
  // src/compiler/output-targets/dist-lazy/generate-cjs.ts
255590
255696
  var generateCjs = async (config, compilerCtx, buildCtx, rollupBuild, outputTargets) => {
255591
255697
  const cjsOutputs = outputTargets.filter((o) => !!o.cjsDir);
@@ -255596,7 +255702,8 @@ var generateCjs = async (config, compilerCtx, buildCtx, rollupBuild, outputTarge
255596
255702
  format: "cjs",
255597
255703
  entryFileNames: "[name].cjs.js",
255598
255704
  assetFileNames: "[name]-[hash][extname]",
255599
- sourcemap: config.sourceMap
255705
+ sourcemap: config.sourceMap,
255706
+ plugins: [lazyBundleIdPlugin(buildCtx, config, false, ".cjs")]
255600
255707
  };
255601
255708
  if (!!config.extras.experimentalImportInjection || !!config.extras.enableImportInjection) {
255602
255709
  esmOpts.interop = "auto";
@@ -255613,8 +255720,7 @@ var generateCjs = async (config, compilerCtx, buildCtx, rollupBuild, outputTarge
255613
255720
  destinations,
255614
255721
  results,
255615
255722
  "es2017",
255616
- false,
255617
- ".cjs"
255723
+ false
255618
255724
  );
255619
255725
  await generateShortcuts(compilerCtx, results, cjsOutputs);
255620
255726
  }
@@ -255646,7 +255752,8 @@ var generateEsm = async (config, compilerCtx, buildCtx, rollupBuild, outputTarge
255646
255752
  format: "es",
255647
255753
  entryFileNames: "[name].js",
255648
255754
  assetFileNames: "[name]-[hash][extname]",
255649
- sourcemap: config.sourceMap
255755
+ sourcemap: config.sourceMap,
255756
+ plugins: [lazyBundleIdPlugin(buildCtx, config, false, "")]
255650
255757
  };
255651
255758
  const outputTargetType = esmOutputs[0].type;
255652
255759
  const output = await generateRollupOutput(rollupBuild, esmOpts, config, buildCtx.entryModules);
@@ -255660,8 +255767,7 @@ var generateEsm = async (config, compilerCtx, buildCtx, rollupBuild, outputTarge
255660
255767
  es2017destinations,
255661
255768
  output,
255662
255769
  "es2017",
255663
- false,
255664
- ""
255770
+ false
255665
255771
  );
255666
255772
  const es5destinations = esmEs5Outputs.map((o) => o.esmEs5Dir).filter((esmEs5Dir) => typeof esmEs5Dir === "string");
255667
255773
  buildCtx.es5ComponentBundle = await generateLazyModules(
@@ -255672,8 +255778,7 @@ var generateEsm = async (config, compilerCtx, buildCtx, rollupBuild, outputTarge
255672
255778
  es5destinations,
255673
255779
  output,
255674
255780
  "es5",
255675
- false,
255676
- ""
255781
+ false
255677
255782
  );
255678
255783
  if (config.buildEs5) {
255679
255784
  await copyPolyfills(config, compilerCtx, esmOutputs);
@@ -255725,7 +255830,8 @@ var generateEsmBrowser = async (config, compilerCtx, buildCtx, rollupBuild, outp
255725
255830
  entryFileNames: "[name].esm.js",
255726
255831
  chunkFileNames: config.hashFileNames ? "p-[hash].js" : "[name]-[hash].js",
255727
255832
  assetFileNames: config.hashFileNames ? "p-[hash][extname]" : "[name]-[hash][extname]",
255728
- sourcemap: config.sourceMap
255833
+ sourcemap: config.sourceMap,
255834
+ plugins: [lazyBundleIdPlugin(buildCtx, config, config.hashFileNames, "")]
255729
255835
  };
255730
255836
  const output = await generateRollupOutput(rollupBuild, esmOpts, config, buildCtx.entryModules);
255731
255837
  if (output != null) {
@@ -255738,8 +255844,7 @@ var generateEsmBrowser = async (config, compilerCtx, buildCtx, rollupBuild, outp
255738
255844
  es2017destinations,
255739
255845
  output,
255740
255846
  "es2017",
255741
- true,
255742
- ""
255847
+ true
255743
255848
  );
255744
255849
  }
255745
255850
  }
@@ -255778,7 +255883,8 @@ var generateSystem = async (config, compilerCtx, buildCtx, rollupBuild, outputTa
255778
255883
  entryFileNames: config.hashFileNames ? "p-[hash].system.js" : "[name].system.js",
255779
255884
  chunkFileNames: config.hashFileNames ? "p-[hash].system.js" : "[name]-[hash].system.js",
255780
255885
  assetFileNames: config.hashFileNames ? "p-[hash][extname]" : "[name]-[hash][extname]",
255781
- sourcemap: config.sourceMap
255886
+ sourcemap: config.sourceMap,
255887
+ plugins: [lazyBundleIdPlugin(buildCtx, config, config.hashFileNames, ".system")]
255782
255888
  };
255783
255889
  const results = await generateRollupOutput(rollupBuild, esmOpts, config, buildCtx.entryModules);
255784
255890
  if (results != null) {
@@ -255791,8 +255897,7 @@ var generateSystem = async (config, compilerCtx, buildCtx, rollupBuild, outputTa
255791
255897
  destinations,
255792
255898
  results,
255793
255899
  "es5",
255794
- true,
255795
- ".system"
255900
+ true
255796
255901
  );
255797
255902
  await generateSystemLoaders(config, compilerCtx, results, systemOutputs);
255798
255903
  }
@@ -260435,14 +260540,6 @@ var componentDecoratorToStatic = (config, typeChecker, diagnostics, cmpNode, new
260435
260540
  };
260436
260541
  var validateComponent = (config, diagnostics, typeChecker, componentOptions, cmpNode, componentDecorator) => {
260437
260542
  var _a2;
260438
- const extendNode = cmpNode.heritageClauses && cmpNode.heritageClauses.find((c) => c.token === import_typescript45.default.SyntaxKind.ExtendsKeyword);
260439
- if (extendNode) {
260440
- const err2 = buildError(diagnostics);
260441
- err2.messageText = `Classes decorated with @Component can not extend from a base class.
260442
- Stencil needs to be able to switch between different base classes in order to implement the different output targets such as: lazy and raw web components.`;
260443
- augmentDiagnosticWithNode(err2, extendNode);
260444
- return false;
260445
- }
260446
260543
  if (componentOptions.shadow && componentOptions.scoped) {
260447
260544
  const err2 = buildError(diagnostics);
260448
260545
  err2.messageText = `Components cannot be "scoped" and "shadow" at the same time, they are mutually exclusive configurations.`;
@@ -261621,16 +261718,25 @@ var visitClassDeclaration = (config, diagnostics, typeChecker, program3, classNo
261621
261718
  var _a2, _b, _c;
261622
261719
  const importAliasMap = new ImportAliasMap(sourceFile);
261623
261720
  const componentDecorator = (_a2 = retrieveTsDecorators(classNode)) == null ? void 0 : _a2.find(isDecoratorNamed(importAliasMap.get("Component")));
261624
- if (!componentDecorator) {
261625
- return classNode;
261626
- }
261627
261721
  const classMembers = classNode.members;
261628
261722
  const decoratedMembers = classMembers.filter((member2) => {
261629
261723
  var _a3, _b2;
261630
261724
  return ((_b2 = (_a3 = retrieveTsDecorators(member2)) == null ? void 0 : _a3.length) != null ? _b2 : 0) > 0;
261631
261725
  });
261726
+ if (!decoratedMembers.length && !componentDecorator) {
261727
+ return classNode;
261728
+ }
261632
261729
  const filteredMethodsAndFields = removeStencilMethodDecorators(Array.from(classMembers), diagnostics, importAliasMap);
261633
- componentDecoratorToStatic(config, typeChecker, diagnostics, classNode, filteredMethodsAndFields, componentDecorator);
261730
+ if (componentDecorator) {
261731
+ componentDecoratorToStatic(
261732
+ config,
261733
+ typeChecker,
261734
+ diagnostics,
261735
+ classNode,
261736
+ filteredMethodsAndFields,
261737
+ componentDecorator
261738
+ );
261739
+ }
261634
261740
  if (decoratedMembers.length > 0) {
261635
261741
  propDecoratorsToStatic(
261636
261742
  diagnostics,
@@ -261959,23 +262065,24 @@ var setComponentBuildConditionals = (cmpMeta) => {
261959
262065
 
261960
262066
  // src/compiler/transformers/detect-modern-prop-decls.ts
261961
262067
  var import_typescript58 = __toESM(require_typescript_5_5_4_bundle_cache_min());
261962
- var detectModernPropDeclarations = (classNode, cmp) => {
262068
+ var detectModernPropDeclarations = (classNode) => {
261963
262069
  const parsedProps = getStaticValue(classNode.members, "properties");
261964
262070
  const parsedStates = getStaticValue(classNode.members, "states");
261965
262071
  if (!parsedProps && !parsedStates) {
261966
- cmp.hasModernPropertyDecls = false;
261967
- return;
262072
+ return false;
261968
262073
  }
261969
262074
  const members = [...Object.entries(parsedProps || {}), ...Object.entries(parsedStates || {})];
262075
+ let hasModernPropertyDecls = false;
261970
262076
  for (const [propName, meta] of members) {
261971
262077
  const dynamicPropName = meta.ogPropName || "";
261972
262078
  const prop = classNode.members.find((m) => {
261973
262079
  return import_typescript58.default.isPropertyDeclaration(m) && (import_typescript58.default.isComputedPropertyName(m.name) && m.name.expression.getText() === dynamicPropName || m.name.getText() === propName);
261974
262080
  });
261975
262081
  if (!prop) continue;
261976
- cmp.hasModernPropertyDecls = true;
262082
+ hasModernPropertyDecls = true;
261977
262083
  break;
261978
262084
  }
262085
+ return hasModernPropertyDecls;
261979
262086
  };
261980
262087
 
261981
262088
  // src/compiler/transformers/static-to-meta/attach-internals.ts
@@ -261989,14 +262096,8 @@ var parseAttachInternals = (staticMembers) => {
261989
262096
  };
261990
262097
 
261991
262098
  // src/compiler/transformers/static-to-meta/class-methods.ts
261992
- var import_typescript59 = __toESM(require_typescript_5_5_4_bundle_cache_min());
261993
- var parseClassMethods = (cmpNode, cmpMeta) => {
261994
- const classMembers = cmpNode.members;
261995
- if (!classMembers || classMembers.length === 0) {
261996
- return;
261997
- }
261998
- const classMethods = classMembers.filter((m) => import_typescript59.default.isMethodDeclaration(m));
261999
- if (classMethods.length === 0) {
262099
+ var parseClassMethods = (classMethods, cmpMeta) => {
262100
+ if (!(classMethods == null ? void 0 : classMethods.length)) {
262000
262101
  return;
262001
262102
  }
262002
262103
  const hasHostData = classMethods.some((m) => isMethod(m, "hostData"));
@@ -262043,116 +262144,12 @@ var parseStaticShadowDelegatesFocus = (encapsulation, staticMembers) => {
262043
262144
  return null;
262044
262145
  };
262045
262146
 
262046
- // src/compiler/transformers/static-to-meta/events.ts
262047
- var parseStaticEvents = (staticMembers) => {
262048
- const parsedEvents = getStaticValue(staticMembers, "events");
262049
- if (!parsedEvents || parsedEvents.length === 0) {
262050
- return [];
262051
- }
262052
- return parsedEvents.map((parsedEvent) => {
262053
- return {
262054
- name: parsedEvent.name,
262055
- method: parsedEvent.method,
262056
- bubbles: parsedEvent.bubbles,
262057
- cancelable: parsedEvent.cancelable,
262058
- composed: parsedEvent.composed,
262059
- docs: parsedEvent.docs,
262060
- complexType: parsedEvent.complexType,
262061
- internal: isInternal(parsedEvent.docs)
262062
- };
262063
- });
262064
- };
262065
-
262066
262147
  // src/compiler/transformers/static-to-meta/form-associated.ts
262067
262148
  var parseFormAssociated = (staticMembers) => {
262068
262149
  const isFormAssociated = getStaticValue(staticMembers, "formAssociated");
262069
262150
  return typeof isFormAssociated === "boolean" && isFormAssociated;
262070
262151
  };
262071
262152
 
262072
- // src/compiler/transformers/static-to-meta/listeners.ts
262073
- var parseStaticListeners = (staticMembers) => {
262074
- const parsedListeners = getStaticValue(staticMembers, "listeners");
262075
- if (!parsedListeners || parsedListeners.length === 0) {
262076
- return [];
262077
- }
262078
- return parsedListeners.map((parsedListener) => {
262079
- return {
262080
- name: parsedListener.name,
262081
- method: parsedListener.method,
262082
- capture: !!parsedListener.capture,
262083
- passive: !!parsedListener.passive,
262084
- target: parsedListener.target
262085
- };
262086
- });
262087
- };
262088
-
262089
- // src/compiler/transformers/static-to-meta/methods.ts
262090
- var parseStaticMethods = (staticMembers) => {
262091
- const parsedMethods = getStaticValue(staticMembers, "methods");
262092
- if (!parsedMethods) {
262093
- return [];
262094
- }
262095
- const methodNames = Object.keys(parsedMethods);
262096
- if (methodNames.length === 0) {
262097
- return [];
262098
- }
262099
- return methodNames.map((methodName) => {
262100
- return {
262101
- name: methodName,
262102
- docs: parsedMethods[methodName].docs,
262103
- complexType: parsedMethods[methodName].complexType,
262104
- internal: isInternal(parsedMethods[methodName].docs)
262105
- };
262106
- });
262107
- };
262108
-
262109
- // src/compiler/transformers/static-to-meta/props.ts
262110
- var parseStaticProps = (staticMembers) => {
262111
- const parsedProps = getStaticValue(staticMembers, "properties");
262112
- if (!parsedProps) {
262113
- return [];
262114
- }
262115
- const propNames = Object.keys(parsedProps);
262116
- if (propNames.length === 0) {
262117
- return [];
262118
- }
262119
- return propNames.map((propName) => {
262120
- const val = parsedProps[propName];
262121
- return {
262122
- name: propName,
262123
- type: val.type,
262124
- attribute: val.attribute ? val.attribute.toLowerCase() : void 0,
262125
- reflect: typeof val.reflect === "boolean" ? val.reflect : false,
262126
- mutable: !!val.mutable,
262127
- required: !!val.required,
262128
- optional: !!val.optional,
262129
- defaultValue: val.defaultValue,
262130
- complexType: val.complexType,
262131
- docs: val.docs,
262132
- internal: isInternal(val.docs),
262133
- getter: !!val.getter,
262134
- setter: !!val.setter
262135
- };
262136
- });
262137
- };
262138
-
262139
- // src/compiler/transformers/static-to-meta/states.ts
262140
- var parseStaticStates = (staticMembers) => {
262141
- const parsedStates = getStaticValue(staticMembers, "states");
262142
- if (!parsedStates) {
262143
- return [];
262144
- }
262145
- const stateNames = Object.keys(parsedStates);
262146
- if (stateNames.length === 0) {
262147
- return [];
262148
- }
262149
- return stateNames.map((stateName) => {
262150
- return {
262151
- name: stateName
262152
- };
262153
- });
262154
- };
262155
-
262156
262153
  // src/compiler/transformers/static-to-meta/string-literal.ts
262157
262154
  var parseStringLiteral = (m, node) => {
262158
262155
  if (typeof node.text === "string" && node.text.includes("</")) {
@@ -262275,6 +262272,113 @@ var parseStyleIdentifier = (parsedStyle, modeName) => {
262275
262272
  return style;
262276
262273
  };
262277
262274
 
262275
+ // src/compiler/transformers/static-to-meta/class-extension.ts
262276
+ var import_typescript59 = __toESM(require_typescript_5_5_4_bundle_cache_min());
262277
+
262278
+ // src/compiler/transformers/static-to-meta/events.ts
262279
+ var parseStaticEvents = (staticMembers) => {
262280
+ const parsedEvents = getStaticValue(staticMembers, "events");
262281
+ if (!parsedEvents || parsedEvents.length === 0) {
262282
+ return [];
262283
+ }
262284
+ return parsedEvents.map((parsedEvent) => {
262285
+ return {
262286
+ name: parsedEvent.name,
262287
+ method: parsedEvent.method,
262288
+ bubbles: parsedEvent.bubbles,
262289
+ cancelable: parsedEvent.cancelable,
262290
+ composed: parsedEvent.composed,
262291
+ docs: parsedEvent.docs,
262292
+ complexType: parsedEvent.complexType,
262293
+ internal: isInternal(parsedEvent.docs)
262294
+ };
262295
+ });
262296
+ };
262297
+
262298
+ // src/compiler/transformers/static-to-meta/listeners.ts
262299
+ var parseStaticListeners = (staticMembers) => {
262300
+ const parsedListeners = getStaticValue(staticMembers, "listeners");
262301
+ if (!parsedListeners || parsedListeners.length === 0) {
262302
+ return [];
262303
+ }
262304
+ return parsedListeners.map((parsedListener) => {
262305
+ return {
262306
+ name: parsedListener.name,
262307
+ method: parsedListener.method,
262308
+ capture: !!parsedListener.capture,
262309
+ passive: !!parsedListener.passive,
262310
+ target: parsedListener.target
262311
+ };
262312
+ });
262313
+ };
262314
+
262315
+ // src/compiler/transformers/static-to-meta/methods.ts
262316
+ var parseStaticMethods = (staticMembers) => {
262317
+ const parsedMethods = getStaticValue(staticMembers, "methods");
262318
+ if (!parsedMethods) {
262319
+ return [];
262320
+ }
262321
+ const methodNames = Object.keys(parsedMethods);
262322
+ if (methodNames.length === 0) {
262323
+ return [];
262324
+ }
262325
+ return methodNames.map((methodName) => {
262326
+ return {
262327
+ name: methodName,
262328
+ docs: parsedMethods[methodName].docs,
262329
+ complexType: parsedMethods[methodName].complexType,
262330
+ internal: isInternal(parsedMethods[methodName].docs)
262331
+ };
262332
+ });
262333
+ };
262334
+
262335
+ // src/compiler/transformers/static-to-meta/props.ts
262336
+ var parseStaticProps = (staticMembers) => {
262337
+ const parsedProps = getStaticValue(staticMembers, "properties");
262338
+ if (!parsedProps) {
262339
+ return [];
262340
+ }
262341
+ const propNames = Object.keys(parsedProps);
262342
+ if (propNames.length === 0) {
262343
+ return [];
262344
+ }
262345
+ return propNames.map((propName) => {
262346
+ const val = parsedProps[propName];
262347
+ return {
262348
+ name: propName,
262349
+ type: val.type,
262350
+ attribute: val.attribute ? val.attribute.toLowerCase() : void 0,
262351
+ reflect: typeof val.reflect === "boolean" ? val.reflect : false,
262352
+ mutable: !!val.mutable,
262353
+ required: !!val.required,
262354
+ optional: !!val.optional,
262355
+ defaultValue: val.defaultValue,
262356
+ complexType: val.complexType,
262357
+ docs: val.docs,
262358
+ internal: isInternal(val.docs),
262359
+ getter: !!val.getter,
262360
+ setter: !!val.setter
262361
+ };
262362
+ });
262363
+ };
262364
+
262365
+ // src/compiler/transformers/static-to-meta/states.ts
262366
+ var parseStaticStates = (staticMembers) => {
262367
+ const parsedStates = getStaticValue(staticMembers, "states");
262368
+ if (!parsedStates) {
262369
+ return [];
262370
+ }
262371
+ const stateNames = Object.keys(parsedStates);
262372
+ if (stateNames.length === 0) {
262373
+ return [];
262374
+ }
262375
+ return stateNames.map((stateName) => {
262376
+ return {
262377
+ name: stateName
262378
+ };
262379
+ });
262380
+ };
262381
+
262278
262382
  // src/compiler/transformers/static-to-meta/watchers.ts
262279
262383
  var parseStaticWatchers = (staticMembers) => {
262280
262384
  const parsedWatchers = getStaticValue(staticMembers, "watchers");
@@ -262289,6 +262393,188 @@ var parseStaticWatchers = (staticMembers) => {
262289
262393
  });
262290
262394
  };
262291
262395
 
262396
+ // src/compiler/transformers/static-to-meta/class-extension.ts
262397
+ var deDupeMembers = (dedupeMembers, staticMembers) => {
262398
+ return dedupeMembers.filter(
262399
+ (s) => !staticMembers.some((d) => {
262400
+ if (d.methodName) {
262401
+ return d.methodName === s.methodName;
262402
+ }
262403
+ return d.name === s.name;
262404
+ })
262405
+ );
262406
+ };
262407
+ function findClassWalk(node, name) {
262408
+ var _a2;
262409
+ if (!node) return void 0;
262410
+ if (node && import_typescript59.default.isClassDeclaration(node) && (!name || ((_a2 = node.name) == null ? void 0 : _a2.text) === name)) {
262411
+ return node;
262412
+ }
262413
+ let found2;
262414
+ import_typescript59.default.forEachChild(node, (child) => {
262415
+ if (found2) return;
262416
+ const result2 = findClassWalk(child, name);
262417
+ if (result2) found2 = result2;
262418
+ });
262419
+ return found2;
262420
+ }
262421
+ function matchesNamedDeclaration(name) {
262422
+ return function(stmt) {
262423
+ var _a2, _b;
262424
+ if (import_typescript59.default.isClassDeclaration(stmt) && ((_a2 = stmt.name) == null ? void 0 : _a2.text) === name) {
262425
+ return true;
262426
+ }
262427
+ if (import_typescript59.default.isFunctionDeclaration(stmt) && ((_b = stmt.name) == null ? void 0 : _b.text) === name) {
262428
+ return true;
262429
+ }
262430
+ if (import_typescript59.default.isVariableStatement(stmt)) {
262431
+ for (const decl of stmt.declarationList.declarations) {
262432
+ if (import_typescript59.default.isIdentifier(decl.name) && decl.name.text === name) {
262433
+ return true;
262434
+ }
262435
+ }
262436
+ }
262437
+ return false;
262438
+ };
262439
+ }
262440
+ function buildExtendsTree(compilerCtx, classDeclaration3, dependentClasses, typeChecker, buildCtx) {
262441
+ const hasHeritageClauses = classDeclaration3.heritageClauses;
262442
+ if (!(hasHeritageClauses == null ? void 0 : hasHeritageClauses.length)) return dependentClasses;
262443
+ const extendsClause = hasHeritageClauses.find((clause) => clause.token === import_typescript59.default.SyntaxKind.ExtendsKeyword);
262444
+ if (!extendsClause) return dependentClasses;
262445
+ let classIdentifiers = [];
262446
+ let foundClassDeclaration;
262447
+ let keepLooking = true;
262448
+ extendsClause.types.forEach((type) => {
262449
+ if (import_typescript59.default.isExpressionWithTypeArguments(type) && import_typescript59.default.isCallExpression(type.expression) && type.expression.expression.getText() === "Mixin") {
262450
+ classIdentifiers = type.expression.arguments.filter(import_typescript59.default.isIdentifier);
262451
+ } else if (import_typescript59.default.isIdentifier(type.expression)) {
262452
+ classIdentifiers = [type.expression];
262453
+ }
262454
+ });
262455
+ classIdentifiers.forEach((extendee) => {
262456
+ var _a2, _b, _c;
262457
+ try {
262458
+ const symbol = typeChecker.getSymbolAtLocation(extendee);
262459
+ const aliasedSymbol = symbol ? typeChecker.getAliasedSymbol(symbol) : void 0;
262460
+ foundClassDeclaration = (_a2 = aliasedSymbol == null ? void 0 : aliasedSymbol.declarations) == null ? void 0 : _a2.find(import_typescript59.default.isClassDeclaration);
262461
+ if (!foundClassDeclaration) {
262462
+ const node = (_b = aliasedSymbol == null ? void 0 : aliasedSymbol.declarations) == null ? void 0 : _b[0];
262463
+ foundClassDeclaration = findClassWalk(node);
262464
+ keepLooking = false;
262465
+ }
262466
+ if (foundClassDeclaration && !dependentClasses.some((dc) => dc.classNode === foundClassDeclaration)) {
262467
+ const foundModule = compilerCtx.moduleMap.get(foundClassDeclaration.getSourceFile().fileName);
262468
+ if (foundModule) {
262469
+ const source = foundModule.staticSourceFile;
262470
+ const sourceClass = findClassWalk(source, (_c = foundClassDeclaration.name) == null ? void 0 : _c.getText());
262471
+ if (sourceClass) {
262472
+ dependentClasses.push({ classNode: sourceClass, fileName: source.fileName });
262473
+ if (keepLooking) {
262474
+ buildExtendsTree(compilerCtx, foundClassDeclaration, dependentClasses, typeChecker, buildCtx);
262475
+ }
262476
+ }
262477
+ }
262478
+ }
262479
+ } catch (_e) {
262480
+ const currentSource = classDeclaration3.getSourceFile();
262481
+ if (!currentSource) return;
262482
+ const matchedStatement = currentSource.statements.find(matchesNamedDeclaration(extendee.getText()));
262483
+ if (matchedStatement && import_typescript59.default.isClassDeclaration(matchedStatement)) {
262484
+ foundClassDeclaration = matchedStatement;
262485
+ } else if (matchedStatement) {
262486
+ foundClassDeclaration = findClassWalk(matchedStatement);
262487
+ keepLooking = false;
262488
+ }
262489
+ if (foundClassDeclaration && !dependentClasses.some((dc) => dc.classNode === foundClassDeclaration)) {
262490
+ dependentClasses.push({ classNode: foundClassDeclaration, fileName: currentSource.fileName });
262491
+ if (keepLooking) {
262492
+ buildExtendsTree(compilerCtx, foundClassDeclaration, dependentClasses, typeChecker, buildCtx);
262493
+ }
262494
+ return;
262495
+ }
262496
+ const importStatements = currentSource.statements.filter(import_typescript59.default.isImportDeclaration);
262497
+ importStatements.forEach((statement) => {
262498
+ var _a3, _b2, _c2;
262499
+ if (((_a3 = statement.importClause) == null ? void 0 : _a3.namedBindings) && import_typescript59.default.isNamedImports((_b2 = statement.importClause) == null ? void 0 : _b2.namedBindings)) {
262500
+ (_c2 = statement.importClause) == null ? void 0 : _c2.namedBindings.elements.forEach((element) => {
262501
+ var _a4;
262502
+ if (element.name.getText() === extendee.getText()) {
262503
+ const className = ((_a4 = element.propertyName) == null ? void 0 : _a4.getText()) || element.name.getText();
262504
+ const foundFile = tsResolveModuleName(
262505
+ buildCtx.config,
262506
+ compilerCtx,
262507
+ statement.moduleSpecifier.getText().replaceAll(/['"]/g, ""),
262508
+ currentSource.fileName
262509
+ );
262510
+ if ((foundFile == null ? void 0 : foundFile.resolvedModule) && className) {
262511
+ const foundModule = compilerCtx.moduleMap.get(foundFile.resolvedModule.resolvedFileName);
262512
+ const matchedStatement2 = (foundModule == null ? void 0 : foundModule.staticSourceFile).statements.find(
262513
+ matchesNamedDeclaration(className)
262514
+ );
262515
+ foundClassDeclaration = matchedStatement2 ? import_typescript59.default.isClassDeclaration(matchedStatement2) ? matchedStatement2 : void 0 : void 0;
262516
+ if (!foundClassDeclaration && matchedStatement2) {
262517
+ foundClassDeclaration = findClassWalk(matchedStatement2);
262518
+ keepLooking = false;
262519
+ }
262520
+ if (foundClassDeclaration && !dependentClasses.some((dc) => dc.classNode === foundClassDeclaration)) {
262521
+ dependentClasses.push({ classNode: foundClassDeclaration, fileName: currentSource.fileName });
262522
+ if (keepLooking) {
262523
+ buildExtendsTree(compilerCtx, foundClassDeclaration, dependentClasses, typeChecker, buildCtx);
262524
+ }
262525
+ return;
262526
+ }
262527
+ }
262528
+ }
262529
+ });
262530
+ }
262531
+ });
262532
+ }
262533
+ });
262534
+ return dependentClasses;
262535
+ }
262536
+ function mergeExtendedClassMeta(compilerCtx, typeChecker, buildCtx, cmpNode, staticMembers) {
262537
+ const tree = buildExtendsTree(compilerCtx, cmpNode, [], typeChecker, buildCtx);
262538
+ let hasMixin = false;
262539
+ let doesExtend = false;
262540
+ let properties = parseStaticProps(staticMembers);
262541
+ let states = parseStaticStates(staticMembers);
262542
+ let methods = parseStaticMethods(staticMembers);
262543
+ let listeners = parseStaticListeners(staticMembers);
262544
+ let events = parseStaticEvents(staticMembers);
262545
+ let watchers = parseStaticWatchers(staticMembers);
262546
+ let classMethods = cmpNode.members.filter(import_typescript59.default.isMethodDeclaration);
262547
+ tree.forEach((extendedClass) => {
262548
+ var _a2, _b, _c, _d, _e, _f, _g, _h;
262549
+ const extendedStaticMembers = extendedClass.classNode.members.filter(isStaticGetter);
262550
+ const mixinProps = (_a2 = parseStaticProps(extendedStaticMembers)) != null ? _a2 : [];
262551
+ const mixinStates = (_b = parseStaticStates(extendedStaticMembers)) != null ? _b : [];
262552
+ const mixinMethods = (_c = parseStaticMethods(extendedStaticMembers)) != null ? _c : [];
262553
+ const isMixin = mixinProps.length > 0 || mixinStates.length > 0;
262554
+ const module2 = compilerCtx.moduleMap.get(extendedClass.fileName);
262555
+ if (!module2) return;
262556
+ module2.isMixin = isMixin;
262557
+ module2.isExtended = true;
262558
+ doesExtend = true;
262559
+ if (isMixin && !detectModernPropDeclarations(extendedClass.classNode)) {
262560
+ const err2 = buildWarn(buildCtx.diagnostics);
262561
+ const target = (_d = buildCtx.config.tsCompilerOptions) == null ? void 0 : _d.target;
262562
+ err2.messageText = `Component classes can only extend from other Stencil decorated base classes when targetting more modern JavaScript (ES2022 and above).
262563
+ ${target ? `Your current TypeScript configuration is set to target \`${import_typescript59.default.ScriptTarget[target]}\`.` : ""} Please amend your tsconfig.json.`;
262564
+ if (!buildCtx.config._isTesting) augmentDiagnosticWithNode(err2, extendedClass.classNode);
262565
+ }
262566
+ properties = [...deDupeMembers(mixinProps, properties), ...properties];
262567
+ states = [...deDupeMembers(mixinStates, states), ...states];
262568
+ methods = [...deDupeMembers(mixinMethods, methods), ...methods];
262569
+ listeners = [...deDupeMembers((_e = parseStaticListeners(extendedStaticMembers)) != null ? _e : [], listeners), ...listeners];
262570
+ events = [...deDupeMembers((_f = parseStaticEvents(extendedStaticMembers)) != null ? _f : [], events), ...events];
262571
+ watchers = [...deDupeMembers((_g = parseStaticWatchers(extendedStaticMembers)) != null ? _g : [], watchers), ...watchers];
262572
+ classMethods = [...classMethods, ...(_h = extendedClass.classNode.members.filter(import_typescript59.default.isMethodDeclaration)) != null ? _h : []];
262573
+ if (isMixin) hasMixin = true;
262574
+ });
262575
+ return { hasMixin, doesExtend, properties, states, methods, listeners, events, watchers, classMethods };
262576
+ }
262577
+
262292
262578
  // src/compiler/transformers/static-to-meta/component.ts
262293
262579
  var BLACKLISTED_COMPONENT_METHODS = [
262294
262580
  /**
@@ -262297,7 +262583,7 @@ var BLACKLISTED_COMPONENT_METHODS = [
262297
262583
  */
262298
262584
  "shadowRoot"
262299
262585
  ];
262300
- var parseStaticComponentMeta = (compilerCtx, typeChecker, cmpNode, moduleFile, transformOpts) => {
262586
+ var parseStaticComponentMeta = (compilerCtx, typeChecker, cmpNode, moduleFile, buildCtx, transformOpts) => {
262301
262587
  if (cmpNode.members == null) {
262302
262588
  return cmpNode;
262303
262589
  }
@@ -262306,6 +262592,13 @@ var parseStaticComponentMeta = (compilerCtx, typeChecker, cmpNode, moduleFile, t
262306
262592
  if (tagName == null) {
262307
262593
  return cmpNode;
262308
262594
  }
262595
+ const { doesExtend, properties, states, methods, listeners, events, watchers, classMethods } = mergeExtendedClassMeta(
262596
+ compilerCtx,
262597
+ typeChecker,
262598
+ buildCtx,
262599
+ cmpNode,
262600
+ staticMembers
262601
+ );
262309
262602
  const symbol = typeChecker ? typeChecker.getSymbolAtLocation(cmpNode.name) : void 0;
262310
262603
  const docs = serializeSymbol(typeChecker, symbol);
262311
262604
  const isCollectionDependency = moduleFile.isCollectionDependency;
@@ -262320,13 +262613,14 @@ var parseStaticComponentMeta = (compilerCtx, typeChecker, cmpNode, moduleFile, t
262320
262613
  elementRef: parseStaticElementRef(staticMembers),
262321
262614
  encapsulation,
262322
262615
  shadowDelegatesFocus: !!parseStaticShadowDelegatesFocus(encapsulation, staticMembers),
262323
- properties: parseStaticProps(staticMembers),
262616
+ properties,
262324
262617
  virtualProperties: parseVirtualProps(docs),
262325
- states: parseStaticStates(staticMembers),
262326
- methods: parseStaticMethods(staticMembers),
262327
- listeners: parseStaticListeners(staticMembers),
262328
- events: parseStaticEvents(staticMembers),
262329
- watchers: parseStaticWatchers(staticMembers),
262618
+ states,
262619
+ methods,
262620
+ listeners,
262621
+ events,
262622
+ watchers,
262623
+ doesExtend,
262330
262624
  styles: parseStaticStyles(compilerCtx, tagName, moduleFile.sourceFilePath, isCollectionDependency, staticMembers),
262331
262625
  internal: isInternal(docs),
262332
262626
  assetsDirs: parseAssetsDirs(staticMembers, moduleFile.jsFilePath),
@@ -262391,18 +262685,19 @@ var parseStaticComponentMeta = (compilerCtx, typeChecker, cmpNode, moduleFile, t
262391
262685
  directDependents: [],
262392
262686
  directDependencies: []
262393
262687
  };
262394
- const visitComponentChildNode = (node) => {
262395
- validateComponentMembers(node);
262688
+ const visitComponentChildNode = (node, buildCtx2) => {
262689
+ validateComponentMembers(node, buildCtx2);
262396
262690
  if (import_typescript60.default.isCallExpression(node)) {
262397
262691
  parseCallExpression(cmp, node);
262398
262692
  } else if (import_typescript60.default.isStringLiteral(node)) {
262399
262693
  parseStringLiteral(cmp, node);
262400
262694
  }
262401
- node.forEachChild(visitComponentChildNode);
262695
+ node.forEachChild((child) => visitComponentChildNode(child, buildCtx2));
262402
262696
  };
262403
- visitComponentChildNode(cmpNode);
262404
- parseClassMethods(cmpNode, cmp);
262405
- detectModernPropDeclarations(cmpNode, cmp);
262697
+ visitComponentChildNode(cmpNode, buildCtx);
262698
+ parseClassMethods(classMethods, cmp);
262699
+ const hasModernPropertyDecls = detectModernPropDeclarations(cmpNode);
262700
+ cmp.hasModernPropertyDecls = hasModernPropertyDecls;
262406
262701
  cmp.htmlAttrNames = unique(cmp.htmlAttrNames);
262407
262702
  cmp.htmlTagNames = unique(cmp.htmlTagNames);
262408
262703
  cmp.potentialCmpRefs = unique(cmp.potentialCmpRefs);
@@ -262418,7 +262713,7 @@ var parseStaticComponentMeta = (compilerCtx, typeChecker, cmpNode, moduleFile, t
262418
262713
  compilerCtx.nodeMap.set(cmpNode, cmp);
262419
262714
  return cmpNode;
262420
262715
  };
262421
- var validateComponentMembers = (node) => {
262716
+ var validateComponentMembers = (node, buildCtx) => {
262422
262717
  if (
262423
262718
  /**
262424
262719
  * the component has a getter called "shadowRoot"
@@ -262434,9 +262729,9 @@ var validateComponentMembers = (node) => {
262434
262729
  (prop) => import_typescript60.default.isPropertyAssignment(prop) && prop.name.getText() === "tag"
262435
262730
  )) {
262436
262731
  const componentName = node.parent.name.getText();
262437
- throw new Error(
262438
- `The component "${componentName}" has a getter called "${propName}". This getter is reserved for use by Stencil components and should not be defined by the user.`
262439
- );
262732
+ const err2 = buildWarn(buildCtx.diagnostics);
262733
+ err2.messageText = `The component "${componentName}" has a getter called "${propName}". This getter is reserved for use by Stencil components and should not be defined by the user.`;
262734
+ augmentDiagnosticWithNode(err2, node);
262440
262735
  }
262441
262736
  }
262442
262737
  };
@@ -262694,7 +262989,7 @@ var updateModule = (config, compilerCtx, buildCtx, tsSourceFile, sourceFileText,
262694
262989
  compilerCtx.changedModules.add(moduleFile.sourceFilePath);
262695
262990
  const visitNode = (node) => {
262696
262991
  if (import_typescript63.default.isClassDeclaration(node)) {
262697
- parseStaticComponentMeta(compilerCtx, typeChecker, node, moduleFile);
262992
+ parseStaticComponentMeta(compilerCtx, typeChecker, node, moduleFile, buildCtx, void 0);
262698
262993
  return;
262699
262994
  } else if (import_typescript63.default.isImportDeclaration(node)) {
262700
262995
  parseModuleImport(config, compilerCtx, buildCtx, moduleFile, srcDirPath, node, true);
@@ -268436,7 +268731,7 @@ var convertStaticToMeta = (config, compilerCtx, buildCtx, typeChecker, collectio
268436
268731
  let moduleFile;
268437
268732
  const visitNode = (node) => {
268438
268733
  if (import_typescript68.default.isClassDeclaration(node)) {
268439
- return parseStaticComponentMeta(compilerCtx, typeChecker, node, moduleFile, transformOpts);
268734
+ return parseStaticComponentMeta(compilerCtx, typeChecker, node, moduleFile, buildCtx, transformOpts);
268440
268735
  } else if (import_typescript68.default.isImportDeclaration(node)) {
268441
268736
  parseModuleImport(config, compilerCtx, buildCtx, moduleFile, dirPath, node, !transformOpts.isolatedModules);
268442
268737
  } else if (import_typescript68.default.isCallExpression(node)) {