@luzmo/embed 7.3.0 → 7.4.0-es2021

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.
@@ -2074,6 +2074,7 @@ var processModuleAlias = (name, subPath) => {
2074
2074
  };
2075
2075
 
2076
2076
  // node_modules/@module-federation/runtime-core/dist/global.js
2077
+ var MAX_PRELOADED_ASSETS = 2e3;
2077
2078
  var CurrentGlobal = typeof globalThis === "object" ? globalThis : window;
2078
2079
  var nativeGlobal = (() => {
2079
2080
  try {
@@ -2104,7 +2105,8 @@ function setGlobalDefaultVal(target) {
2104
2105
  moduleInfo: {},
2105
2106
  __SHARE__: {},
2106
2107
  __MANIFEST_LOADING__: {},
2107
- __PRELOADED_MAP__: /* @__PURE__ */ new Map()
2108
+ __PRELOADED_MAP__: /* @__PURE__ */ new Map(),
2109
+ __PRELOADED_ASSETS__: /* @__PURE__ */ new Set()
2108
2110
  });
2109
2111
  definePropertyGlobalVal(target, "__VMOK__", target.__FEDERATION__);
2110
2112
  }
@@ -2114,6 +2116,7 @@ function setGlobalDefaultVal(target) {
2114
2116
  target.__FEDERATION__.__SHARE__ ??= {};
2115
2117
  target.__FEDERATION__.__MANIFEST_LOADING__ ??= {};
2116
2118
  target.__FEDERATION__.__PRELOADED_MAP__ ??= /* @__PURE__ */ new Map();
2119
+ target.__FEDERATION__.__PRELOADED_ASSETS__ ??= /* @__PURE__ */ new Set();
2117
2120
  }
2118
2121
  setGlobalDefaultVal(CurrentGlobal);
2119
2122
  setGlobalDefaultVal(nativeGlobal);
@@ -2126,7 +2129,7 @@ function getGlobalFederationConstructor() {
2126
2129
  function setGlobalFederationConstructor(FederationConstructor, isDebug = isDebugMode()) {
2127
2130
  if (isDebug) {
2128
2131
  CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = FederationConstructor;
2129
- CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "2.8.2";
2132
+ CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "2.9.0";
2130
2133
  }
2131
2134
  }
2132
2135
  function getInfoWithoutType(target, key) {
@@ -2190,6 +2193,15 @@ var getRemoteEntryExports = (name, globalName) => {
2190
2193
  var getGlobalHostPlugins = () => nativeGlobal.__FEDERATION__.__GLOBAL_PLUGIN__;
2191
2194
  var getPreloaded = (id) => CurrentGlobal.__FEDERATION__.__PRELOADED_MAP__.get(id);
2192
2195
  var setPreloaded = (id) => CurrentGlobal.__FEDERATION__.__PRELOADED_MAP__.set(id, true);
2196
+ var getPreloadedAsset = (url) => CurrentGlobal.__FEDERATION__.__PRELOADED_ASSETS__.has(url);
2197
+ var setPreloadedAsset = (url) => {
2198
+ const preloadedAssets = CurrentGlobal.__FEDERATION__.__PRELOADED_ASSETS__;
2199
+ preloadedAssets.add(url);
2200
+ if (preloadedAssets.size > MAX_PRELOADED_ASSETS) {
2201
+ const oldestUrl = preloadedAssets.values().next().value;
2202
+ if (oldestUrl !== void 0) preloadedAssets.delete(oldestUrl);
2203
+ }
2204
+ };
2193
2205
 
2194
2206
  // node_modules/@module-federation/runtime-core/dist/utils/semver/constants.js
2195
2207
  var buildIdentifier = "[0-9A-Za-z-]+";
@@ -2612,7 +2624,7 @@ function getFindShareFunction(strategy) {
2612
2624
  if (strategy === "loaded-first") return findSingletonVersionOrderByLoaded;
2613
2625
  return findSingletonVersionOrderByVersion;
2614
2626
  }
2615
- function getRegisteredShare(localShareScopeMap, pkgName, shareInfo, resolveShare) {
2627
+ function getRegisteredShare(localShareScopeMap, pkgName, shareInfo, resolveShare, loadContext) {
2616
2628
  if (!localShareScopeMap) return;
2617
2629
  const { shareConfig, scope = DEFAULT_SCOPE, strategy, treeShaking } = shareInfo;
2618
2630
  const scopes = Array.isArray(scope) ? scope : [scope];
@@ -2661,7 +2673,8 @@ function getRegisteredShare(localShareScopeMap, pkgName, shareInfo, resolveShare
2661
2673
  version: maxOrSingletonVersion,
2662
2674
  GlobalFederation: Global.__FEDERATION__,
2663
2675
  shareInfo,
2664
- resolver: defaultResolver
2676
+ resolver: defaultResolver,
2677
+ loadContext
2665
2678
  };
2666
2679
  return (resolveShare.emit(params) || params).resolver();
2667
2680
  }
@@ -2810,6 +2823,7 @@ var errorDescMap = {
2810
2823
 
2811
2824
  // node_modules/@module-federation/runtime-core/dist/utils/load.js
2812
2825
  var importCallback = ".then(callbacks[0]).catch(callbacks[1])";
2826
+ var remoteEntryLoadingOrigins = /* @__PURE__ */ new WeakMap();
2813
2827
  var esmRemoteEntryLoadErrorMessages = [
2814
2828
  "Failed to fetch dynamically imported module",
2815
2829
  "Importing a module script failed",
@@ -2961,7 +2975,16 @@ function getRemoteEntryUniqueKey(remoteInfo) {
2961
2975
  async function getRemoteEntry(params) {
2962
2976
  const { origin, remoteEntryExports, remoteInfo, getEntryUrl, resourceContext, _inErrorHandling = false } = params;
2963
2977
  const uniqueKey = getRemoteEntryUniqueKey(remoteInfo);
2964
- if (remoteEntryExports) return remoteEntryExports;
2978
+ if (remoteEntryExports) {
2979
+ await origin.loaderHook.lifecycle.afterLoadEntry.emit({
2980
+ origin,
2981
+ remoteInfo,
2982
+ remoteEntryExports,
2983
+ resourceContext,
2984
+ cached: true
2985
+ });
2986
+ return remoteEntryExports;
2987
+ }
2965
2988
  if (!globalLoading[uniqueKey]) {
2966
2989
  const loadEntryHook = origin.remoteHandler.hooks.lifecycle.loadEntry;
2967
2990
  const loaderHook = origin.loaderHook;
@@ -2969,7 +2992,8 @@ async function getRemoteEntry(params) {
2969
2992
  origin,
2970
2993
  loaderHook,
2971
2994
  remoteInfo,
2972
- remoteEntryExports
2995
+ remoteEntryExports,
2996
+ resourceContext
2973
2997
  }).then((res) => {
2974
2998
  if (res) return res;
2975
2999
  return (typeof ENV_TARGET !== "undefined" ? ENV_TARGET === "web" : isBrowserEnvValue) ? loadEntryDom({
@@ -2987,46 +3011,69 @@ async function getRemoteEntry(params) {
2987
3011
  await origin.loaderHook.lifecycle.afterLoadEntry.emit({
2988
3012
  origin,
2989
3013
  remoteInfo,
2990
- remoteEntryExports: res
3014
+ remoteEntryExports: res,
3015
+ resourceContext
2991
3016
  });
2992
3017
  return res;
2993
- }).catch(async (err) => {
2994
- const uniqueKey2 = getRemoteEntryUniqueKey(remoteInfo);
2995
- const isScriptExecutionError = err instanceof Error && err.message.includes("ScriptExecutionError");
2996
- if (err instanceof Error && err.message.includes(RUNTIME_008) && !isScriptExecutionError && !_inErrorHandling) {
3018
+ }).catch(async (loadError) => {
3019
+ const isScriptExecutionError = loadError instanceof Error && loadError.message.includes("ScriptExecutionError");
3020
+ if (loadError instanceof Error && loadError.message.includes(RUNTIME_008) && !isScriptExecutionError && !_inErrorHandling) {
2997
3021
  const wrappedGetRemoteEntry = (params2) => {
2998
3022
  return getRemoteEntry({
2999
3023
  ...params2,
3000
3024
  _inErrorHandling: true
3001
3025
  });
3002
3026
  };
3003
- const RemoteEntryExports = await origin.loaderHook.lifecycle.loadEntryError.emit({
3027
+ const recoveredRemoteEntryExports = await origin.loaderHook.lifecycle.loadEntryError.emit({
3004
3028
  getRemoteEntry: wrappedGetRemoteEntry,
3005
3029
  origin,
3006
3030
  remoteInfo,
3007
3031
  remoteEntryExports,
3008
3032
  globalLoading,
3009
- uniqueKey: uniqueKey2
3033
+ uniqueKey
3010
3034
  });
3011
- if (RemoteEntryExports) {
3035
+ if (recoveredRemoteEntryExports) {
3012
3036
  await origin.loaderHook.lifecycle.afterLoadEntry.emit({
3013
3037
  origin,
3014
3038
  remoteInfo,
3015
- remoteEntryExports: RemoteEntryExports,
3039
+ remoteEntryExports: recoveredRemoteEntryExports,
3040
+ resourceContext,
3041
+ error: loadError,
3016
3042
  recovered: true
3017
3043
  });
3018
- return RemoteEntryExports;
3044
+ return recoveredRemoteEntryExports;
3019
3045
  }
3020
3046
  }
3021
3047
  await origin.loaderHook.lifecycle.afterLoadEntry.emit({
3022
3048
  origin,
3023
3049
  remoteInfo,
3024
- error: err
3050
+ resourceContext,
3051
+ error: loadError
3025
3052
  });
3026
- throw err;
3053
+ throw loadError;
3027
3054
  });
3055
+ remoteEntryLoadingOrigins.set(globalLoading[uniqueKey], origin);
3028
3056
  }
3029
- return globalLoading[uniqueKey];
3057
+ const remoteEntryLoading = globalLoading[uniqueKey];
3058
+ if (remoteEntryLoadingOrigins.get(remoteEntryLoading) !== origin) try {
3059
+ const result = await remoteEntryLoading;
3060
+ await origin.loaderHook.lifecycle.afterLoadEntry.emit({
3061
+ origin,
3062
+ remoteInfo,
3063
+ remoteEntryExports: result,
3064
+ resourceContext
3065
+ });
3066
+ return result;
3067
+ } catch (loadError) {
3068
+ await origin.loaderHook.lifecycle.afterLoadEntry.emit({
3069
+ origin,
3070
+ remoteInfo,
3071
+ resourceContext,
3072
+ error: loadError
3073
+ });
3074
+ throw loadError;
3075
+ }
3076
+ return remoteEntryLoading;
3030
3077
  }
3031
3078
  function getRemoteInfo(remote) {
3032
3079
  return {
@@ -3044,8 +3091,29 @@ function getBuilderId() {
3044
3091
  }
3045
3092
 
3046
3093
  // node_modules/@module-federation/runtime-core/dist/utils/plugin.js
3094
+ function getPluginsToRegister(plugins) {
3095
+ const pluginsByName = /* @__PURE__ */ new Map();
3096
+ [...plugins || [], ...getGlobalHostPlugins()].forEach((plugin) => {
3097
+ if (!plugin) return;
3098
+ assert2(isPlainObject(plugin), "Plugin configuration is invalid.");
3099
+ assert2(plugin.name, "A name must be provided by the plugin.");
3100
+ if (!pluginsByName.has(plugin.name)) pluginsByName.set(plugin.name, plugin);
3101
+ });
3102
+ return Array.from(pluginsByName.values());
3103
+ }
3104
+ function getInstancePlugin(plugin, instanceHooks) {
3105
+ if (instanceHooks === void 0) return plugin;
3106
+ return {
3107
+ ...instanceHooks,
3108
+ name: plugin.name,
3109
+ version: plugin.version
3110
+ };
3111
+ }
3047
3112
  function registerPlugins(plugins, instance) {
3048
- const globalPlugins = getGlobalHostPlugins();
3113
+ const registeredPlugins = /* @__PURE__ */ new Map();
3114
+ instance.options.plugins.forEach((plugin) => {
3115
+ if (plugin) registeredPlugins.set(plugin.name, plugin);
3116
+ });
3049
3117
  const hookInstances = [
3050
3118
  instance.hooks,
3051
3119
  instance.remoteHandler.hooks,
@@ -3054,15 +3122,15 @@ function registerPlugins(plugins, instance) {
3054
3122
  instance.loaderHook,
3055
3123
  instance.bridgeHook
3056
3124
  ];
3057
- if (globalPlugins.length > 0) globalPlugins.forEach((plugin) => {
3058
- if (plugins?.find((item) => item.name !== plugin.name)) plugins.push(plugin);
3059
- });
3060
- if (plugins && plugins.length > 0) plugins.forEach((plugin) => {
3125
+ getPluginsToRegister(plugins).forEach((plugin) => {
3126
+ registeredPlugins.set(plugin.name, plugin);
3127
+ if (instance.hooks.registerPlugins[plugin.name]) return;
3128
+ const instancePlugin = getInstancePlugin(plugin, plugin.apply?.(instance));
3061
3129
  hookInstances.forEach((hookInstance) => {
3062
- hookInstance.applyPlugin(plugin, instance);
3130
+ hookInstance.applyPlugin(instancePlugin);
3063
3131
  });
3064
3132
  });
3065
- return plugins;
3133
+ return Array.from(registeredPlugins.values());
3066
3134
  }
3067
3135
 
3068
3136
  // node_modules/@module-federation/runtime-core/dist/utils/context.js
@@ -3108,6 +3176,7 @@ function defaultPreloadArgs(preloadConfig) {
3108
3176
  resourceCategory: "sync",
3109
3177
  share: true,
3110
3178
  depsRemote: true,
3179
+ recordPreloadedAssets: true,
3111
3180
  ...preloadConfig
3112
3181
  };
3113
3182
  }
@@ -3146,6 +3215,12 @@ function createAssetResult(context, url, status, error3) {
3146
3215
  error: error3
3147
3216
  };
3148
3217
  }
3218
+ function preloadAssetOnce(context, url, recordPreloadedAssets, preload) {
3219
+ if (!recordPreloadedAssets) return preload();
3220
+ if (getPreloadedAsset(url)) return Promise.resolve(createAssetResult(context, url, "cached"));
3221
+ setPreloadedAsset(url);
3222
+ return preload();
3223
+ }
3149
3224
  async function waitForRemoteEntryPreload(host, remoteInfo, entryRemoteInfo, context) {
3150
3225
  const cachedRemote = host.moduleCache.get(entryRemoteInfo.name);
3151
3226
  const url = entryRemoteInfo.entry;
@@ -3232,7 +3307,7 @@ function createResourceContext(baseContext, resourceType) {
3232
3307
  function preloadAssets(remoteInfo, host, assets, useLinkPreload = true, baseContext = {
3233
3308
  initiator: "preloadRemote",
3234
3309
  id: remoteInfo.name
3235
- }) {
3310
+ }, recordPreloadedAssets = true) {
3236
3311
  const { cssAssets, jsAssetsWithoutEntry, entryAssets } = assets;
3237
3312
  const results = [];
3238
3313
  if (host.options.inBrowser) {
@@ -3246,13 +3321,14 @@ function preloadAssets(remoteInfo, host, assets, useLinkPreload = true, baseCont
3246
3321
  as: "style"
3247
3322
  };
3248
3323
  cssAssets.forEach((cssUrl) => {
3249
- results.push(waitForLinkPreload({
3324
+ const context = createResourceContext(baseContext, "css");
3325
+ results.push(preloadAssetOnce(context, cssUrl, recordPreloadedAssets, () => waitForLinkPreload({
3250
3326
  host,
3251
3327
  remoteInfo,
3252
3328
  url: cssUrl,
3253
3329
  attrs: defaultAttrs2,
3254
- context: createResourceContext(baseContext, "css")
3255
- }));
3330
+ context
3331
+ })));
3256
3332
  });
3257
3333
  } else {
3258
3334
  const defaultAttrs2 = {
@@ -3260,14 +3336,15 @@ function preloadAssets(remoteInfo, host, assets, useLinkPreload = true, baseCont
3260
3336
  type: "text/css"
3261
3337
  };
3262
3338
  cssAssets.forEach((cssUrl) => {
3263
- results.push(waitForLinkPreload({
3339
+ const context = createResourceContext(baseContext, "css");
3340
+ results.push(preloadAssetOnce(context, cssUrl, recordPreloadedAssets, () => waitForLinkPreload({
3264
3341
  host,
3265
3342
  remoteInfo,
3266
3343
  url: cssUrl,
3267
3344
  attrs: defaultAttrs2,
3268
3345
  needDeleteLink: false,
3269
- context: createResourceContext(baseContext, "css")
3270
- }));
3346
+ context
3347
+ })));
3271
3348
  });
3272
3349
  }
3273
3350
  let preloadJsAsset = waitForScriptPreload;
@@ -3289,13 +3366,14 @@ function preloadAssets(remoteInfo, host, assets, useLinkPreload = true, baseCont
3289
3366
  };
3290
3367
  }
3291
3368
  jsAssetsWithoutEntry.forEach((jsUrl) => {
3292
- results.push(preloadJsAsset({
3369
+ const context = createResourceContext(baseContext, "js");
3370
+ results.push(preloadAssetOnce(context, jsUrl, recordPreloadedAssets, () => preloadJsAsset({
3293
3371
  host,
3294
3372
  remoteInfo,
3295
3373
  url: jsUrl,
3296
3374
  attrs: defaultAttrs,
3297
- context: createResourceContext(baseContext, "js")
3298
- }));
3375
+ context
3376
+ })));
3299
3377
  });
3300
3378
  }
3301
3379
  return Promise.all(results);
@@ -3336,25 +3414,27 @@ var Module$1 = class {
3336
3414
  this.remoteInfo = remoteInfo;
3337
3415
  this.host = host;
3338
3416
  }
3339
- async getEntry(expose) {
3340
- if (this.remoteEntryExports) return this.remoteEntryExports;
3417
+ async getEntry(expose, resourceContext) {
3418
+ const effectiveResourceContext = resourceContext || {
3419
+ initiator: "loadRemote",
3420
+ id: composeRemoteRequestId(this.remoteInfo.name, expose),
3421
+ resourceType: "remoteEntry",
3422
+ url: this.remoteInfo.entry,
3423
+ expose
3424
+ };
3341
3425
  const remoteEntryExports = await getRemoteEntry({
3342
3426
  origin: this.host,
3343
3427
  remoteInfo: this.remoteInfo,
3344
3428
  remoteEntryExports: this.remoteEntryExports,
3345
- resourceContext: {
3346
- initiator: "loadRemote",
3347
- id: composeRemoteRequestId(this.remoteInfo.name, expose),
3348
- resourceType: "remoteEntry"
3349
- }
3429
+ resourceContext: effectiveResourceContext
3350
3430
  });
3351
3431
  assert2(remoteEntryExports, `remoteEntryExports is undefined
3352
3432
  ${safeToString(this.remoteInfo)}`);
3353
3433
  this.remoteEntryExports = remoteEntryExports;
3354
3434
  return this.remoteEntryExports;
3355
3435
  }
3356
- async init(id, remoteSnapshot, rawInitScope, expose) {
3357
- const remoteEntryExports = await this.getEntry(expose);
3436
+ async init(id, remoteSnapshot, rawInitScope, expose, resourceContext) {
3437
+ const remoteEntryExports = await this.getEntry(expose, resourceContext);
3358
3438
  if (this.inited) {
3359
3439
  await this.host.loaderHook.lifecycle.afterInitRemote.emit({
3360
3440
  id,
@@ -3563,14 +3643,13 @@ var PluginSystem = class {
3563
3643
  this.lifecycle = lifecycle;
3564
3644
  this.lifecycleKeys = Object.keys(lifecycle);
3565
3645
  }
3566
- applyPlugin(plugin, instance) {
3646
+ applyPlugin(plugin) {
3567
3647
  assert2(isPlainObject(plugin), "Plugin configuration is invalid.");
3568
3648
  const pluginName = plugin.name;
3569
3649
  assert2(pluginName, "A name must be provided by the plugin.");
3570
3650
  if (!this.registerPlugins[pluginName]) {
3571
3651
  this.registerPlugins[pluginName] = plugin;
3572
- plugin.apply?.(instance);
3573
- Object.keys(this.lifecycle).forEach((key) => {
3652
+ this.lifecycleKeys.forEach((key) => {
3574
3653
  const pluginLife = plugin[key];
3575
3654
  if (pluginLife) this.lifecycle[key].on(pluginLife);
3576
3655
  });
@@ -3580,9 +3659,11 @@ var PluginSystem = class {
3580
3659
  assert2(pluginName, "A name is required.");
3581
3660
  const plugin = this.registerPlugins[pluginName];
3582
3661
  assert2(plugin, `The plugin "${pluginName}" is not registered.`);
3583
- Object.keys(plugin).forEach((key) => {
3584
- if (key !== "name") this.lifecycle[key].remove(plugin[key]);
3662
+ this.lifecycleKeys.forEach((key) => {
3663
+ const pluginLife = plugin[key];
3664
+ if (pluginLife) this.lifecycle[key].remove(pluginLife);
3585
3665
  });
3666
+ delete this.registerPlugins[pluginName];
3586
3667
  }
3587
3668
  };
3588
3669
 
@@ -3757,28 +3838,38 @@ function snapshotPlugin() {
3757
3838
  id: composeRemoteRequestId(remote.name, expose)
3758
3839
  });
3759
3840
  assignRemoteInfo(remoteInfo, remoteSnapshot);
3760
- const preloadOptions = {
3761
- remote,
3762
- preloadConfig: {
3763
- nameOrAlias: pkgNameOrAlias,
3764
- exposes: [expose],
3765
- resourceCategory: "sync",
3766
- share: false,
3767
- depsRemote: false
3768
- }
3769
- };
3770
- const assets = await origin.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({
3771
- origin,
3772
- preloadOptions,
3773
- remoteInfo,
3774
- remote,
3775
- remoteSnapshot,
3776
- globalSnapshot
3841
+ const preloadOps = [{
3842
+ nameOrAlias: pkgNameOrAlias,
3843
+ exposes: [expose],
3844
+ resourceCategory: "sync",
3845
+ share: false,
3846
+ depsRemote: false,
3847
+ recordPreloadedAssets: true
3848
+ }];
3849
+ await origin.remoteHandler.hooks.lifecycle.beforePreloadRemote.emit({
3850
+ preloadOps,
3851
+ options: origin.options,
3852
+ origin
3777
3853
  });
3778
- if (assets) preloadAssets(remoteInfo, origin, assets, false, {
3779
- initiator: "loadRemote",
3780
- id
3781
- }).catch(() => void 0);
3854
+ const [preloadConfig] = preloadOps;
3855
+ if (preloadConfig) {
3856
+ const preloadOptions = {
3857
+ remote,
3858
+ preloadConfig
3859
+ };
3860
+ const assets = await origin.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({
3861
+ origin,
3862
+ preloadOptions,
3863
+ remoteInfo,
3864
+ remote,
3865
+ remoteSnapshot,
3866
+ globalSnapshot
3867
+ });
3868
+ if (assets) preloadAssets(remoteInfo, origin, assets, false, {
3869
+ initiator: "loadRemote",
3870
+ id
3871
+ }, preloadConfig.recordPreloadedAssets).catch(() => void 0);
3872
+ }
3782
3873
  return {
3783
3874
  ...args,
3784
3875
  remoteSnapshot
@@ -3992,7 +4083,9 @@ var SnapshotHandler = class {
3992
4083
  beforeLoadRemoteSnapshot: new AsyncHook("beforeLoadRemoteSnapshot"),
3993
4084
  loadSnapshot: new AsyncWaterfallHook("loadGlobalSnapshot"),
3994
4085
  loadRemoteSnapshot: new AsyncWaterfallHook("loadRemoteSnapshot"),
3995
- afterLoadSnapshot: new AsyncWaterfallHook("afterLoadSnapshot")
4086
+ afterLoadSnapshot: new AsyncWaterfallHook("afterLoadSnapshot"),
4087
+ beforeLoadManifest: new AsyncHook("beforeLoadManifest"),
4088
+ afterLoadManifest: new AsyncHook("afterLoadManifest")
3996
4089
  });
3997
4090
  this.manifestLoading = Global.__FEDERATION__.__MANIFEST_LOADING__;
3998
4091
  this.HostInstance = HostInstance;
@@ -4088,7 +4181,26 @@ var SnapshotHandler = class {
4088
4181
  const getManifest = async () => {
4089
4182
  const remoteInfo = getRemoteInfo(moduleInfo);
4090
4183
  let manifestJson = this.manifestCache.get(manifestUrl);
4091
- if (manifestJson) return manifestJson;
4184
+ if (manifestJson) {
4185
+ await this.hooks.lifecycle.afterLoadManifest.emit({
4186
+ manifestUrl,
4187
+ moduleInfo,
4188
+ resourceOptions,
4189
+ manifestJson,
4190
+ cached: true,
4191
+ origin: this.HostInstance
4192
+ });
4193
+ return manifestJson;
4194
+ }
4195
+ await this.hooks.lifecycle.beforeLoadManifest.emit({
4196
+ manifestUrl,
4197
+ moduleInfo,
4198
+ resourceOptions,
4199
+ origin: this.HostInstance
4200
+ });
4201
+ let response;
4202
+ let loadError;
4203
+ let recovered = false;
4092
4204
  try {
4093
4205
  let res = await this.loaderHook.lifecycle.fetch.emit(manifestUrl, {}, remoteInfo, resourceOptions ? {
4094
4206
  ...resourceOptions,
@@ -4096,8 +4208,10 @@ var SnapshotHandler = class {
4096
4208
  resourceType: "manifest"
4097
4209
  } : void 0);
4098
4210
  if (!res || !(res instanceof Response)) res = await fetch(manifestUrl, {});
4211
+ response = res;
4099
4212
  manifestJson = await res.json();
4100
4213
  } catch (err) {
4214
+ loadError = err;
4101
4215
  manifestJson = await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({
4102
4216
  id: manifestUrl,
4103
4217
  error: err,
@@ -4108,27 +4222,47 @@ var SnapshotHandler = class {
4108
4222
  });
4109
4223
  if (!manifestJson) {
4110
4224
  delete this.manifestLoading[manifestUrl];
4225
+ await this.hooks.lifecycle.afterLoadManifest.emit({
4226
+ manifestUrl,
4227
+ moduleInfo,
4228
+ resourceOptions,
4229
+ response,
4230
+ error: err,
4231
+ origin: this.HostInstance
4232
+ });
4111
4233
  error2(RUNTIME_003, runtimeDescMap, {
4112
4234
  manifestUrl,
4113
4235
  moduleName: moduleInfo.name,
4114
4236
  hostName: this.HostInstance.options.name
4115
4237
  }, `${err}`, optionsToMFContext(this.HostInstance.options));
4116
4238
  }
4239
+ recovered = true;
4117
4240
  }
4118
4241
  const missingRequiredFields = [
4119
4242
  !manifestJson.metaData && "metaData",
4120
4243
  !manifestJson.exposes && "exposes",
4121
4244
  !manifestJson.shared && "shared"
4122
4245
  ].filter(Boolean);
4123
- if (missingRequiredFields.length > 0) await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({
4246
+ const validationError = missingRequiredFields.length > 0 ? /* @__PURE__ */ new Error(`"${manifestUrl}" is not a valid federation manifest for remote "${moduleInfo.name}". Missing required fields: ${missingRequiredFields.join(", ")}.`) : void 0;
4247
+ if (validationError) await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({
4124
4248
  id: manifestUrl,
4125
- error: /* @__PURE__ */ new Error(`"${manifestUrl}" is not a valid federation manifest for remote "${moduleInfo.name}". Missing required fields: ${missingRequiredFields.join(", ")}.`),
4249
+ error: validationError,
4126
4250
  from: "runtime",
4127
4251
  lifecycle: "afterResolve",
4128
4252
  remote: remoteInfo,
4129
4253
  origin: this.HostInstance
4130
4254
  });
4131
- if (missingRequiredFields.length > 0) error2(RUNTIME_013, runtimeDescMap, {
4255
+ await this.hooks.lifecycle.afterLoadManifest.emit({
4256
+ manifestUrl,
4257
+ moduleInfo,
4258
+ resourceOptions,
4259
+ manifestJson,
4260
+ response,
4261
+ error: validationError || loadError,
4262
+ recovered: validationError ? void 0 : recovered || void 0,
4263
+ origin: this.HostInstance
4264
+ });
4265
+ if (validationError) error2(RUNTIME_013, runtimeDescMap, {
4132
4266
  manifestUrl,
4133
4267
  moduleName: moduleInfo.name,
4134
4268
  hostName: this.HostInstance.options.name,
@@ -4170,6 +4304,7 @@ var SharedHandler = class {
4170
4304
  constructor(host) {
4171
4305
  this.hooks = new PluginSystem({
4172
4306
  beforeRegisterShare: new SyncWaterfallHook("beforeRegisterShare"),
4307
+ afterRegisterShare: new SyncHook("afterRegisterShare"),
4173
4308
  afterResolve: new AsyncWaterfallHook("afterResolve"),
4174
4309
  beforeLoadShare: new AsyncWaterfallHook("beforeLoadShare"),
4175
4310
  loadShare: new AsyncHook(),
@@ -4183,7 +4318,15 @@ var SharedHandler = class {
4183
4318
  this.initTokens = {};
4184
4319
  this._setGlobalShareScopeMap(host.options);
4185
4320
  }
4186
- emitAfterLoadShare({ lifecycle, pkgName, shareInfo, selectedShared }) {
4321
+ emitAfterRegisterShare(pkgName, input) {
4322
+ this.hooks.lifecycle.afterRegisterShare.emit({
4323
+ pkgName,
4324
+ ...input,
4325
+ shareScopeMap: this.shareScopeMap,
4326
+ origin: this.host
4327
+ });
4328
+ }
4329
+ emitAfterLoadShare({ lifecycle, pkgName, shareInfo, selectedShared, loadContext }) {
4187
4330
  try {
4188
4331
  this.hooks.lifecycle.afterLoadShare.emit({
4189
4332
  pkgName,
@@ -4192,13 +4335,14 @@ var SharedHandler = class {
4192
4335
  shared: this.host.options.shared,
4193
4336
  shareScopeMap: this.shareScopeMap,
4194
4337
  lifecycle,
4338
+ loadContext,
4195
4339
  origin: this.host
4196
4340
  });
4197
4341
  } catch (error3) {
4198
4342
  warn$1(error3);
4199
4343
  }
4200
4344
  }
4201
- emitErrorLoadShare({ lifecycle, pkgName, shareInfo, error: error3, recovered }) {
4345
+ emitErrorLoadShare({ lifecycle, pkgName, shareInfo, error: error3, recovered, loadContext }) {
4202
4346
  try {
4203
4347
  this.hooks.lifecycle.errorLoadShare.emit({
4204
4348
  pkgName,
@@ -4208,7 +4352,8 @@ var SharedHandler = class {
4208
4352
  lifecycle,
4209
4353
  origin: this.host,
4210
4354
  error: error3,
4211
- recovered
4355
+ recovered,
4356
+ loadContext
4212
4357
  });
4213
4358
  } catch (hookError) {
4214
4359
  warn$1(hookError);
@@ -4224,7 +4369,9 @@ var SharedHandler = class {
4224
4369
  pkgName: sharedKey,
4225
4370
  shared: sharedVal
4226
4371
  });
4227
- if (!this.shareScopeMap[sc]?.[sharedKey]) this.setShared({
4372
+ const registeredShared = this.shareScopeMap[sc]?.[sharedKey];
4373
+ const previousAtVersion = registeredShared?.[sharedVal.version];
4374
+ if (!registeredShared) this.setShared({
4228
4375
  pkgName: sharedKey,
4229
4376
  lib: sharedVal.lib,
4230
4377
  get: sharedVal.get,
@@ -4232,6 +4379,13 @@ var SharedHandler = class {
4232
4379
  shared: sharedVal,
4233
4380
  from: userOptions.name
4234
4381
  });
4382
+ this.emitAfterRegisterShare(sharedKey, {
4383
+ scope: sc,
4384
+ shared: sharedVal,
4385
+ previousShared: previousAtVersion,
4386
+ registeredShared: this.shareScopeMap[sc]?.[sharedKey]?.[sharedVal.version],
4387
+ trigger: "runtime"
4388
+ });
4235
4389
  });
4236
4390
  });
4237
4391
  });
@@ -4242,6 +4396,7 @@ var SharedHandler = class {
4242
4396
  }
4243
4397
  async loadShare(pkgName, extraOptions) {
4244
4398
  const { host } = this;
4399
+ let loadContext = extraOptions?.context;
4245
4400
  const shareOptions = getTargetSharedOptions({
4246
4401
  pkgName,
4247
4402
  extraOptions,
@@ -4250,17 +4405,23 @@ var SharedHandler = class {
4250
4405
  let shareOptionsRes = shareOptions;
4251
4406
  try {
4252
4407
  if (shareOptions?.scope) await Promise.all(shareOptions.scope.map(async (shareScope) => {
4253
- await Promise.all(this.initializeSharing(shareScope, { strategy: shareOptions.strategy }));
4408
+ await Promise.all(this.initializeSharing(shareScope, {
4409
+ strategy: shareOptions.strategy,
4410
+ context: loadContext
4411
+ }));
4254
4412
  }));
4255
- shareOptionsRes = (await this.hooks.lifecycle.beforeLoadShare.emit({
4413
+ const loadShareRes = await this.hooks.lifecycle.beforeLoadShare.emit({
4256
4414
  pkgName,
4257
4415
  shareInfo: shareOptions,
4258
4416
  shared: host.options.shared,
4259
- origin: host
4260
- })).shareInfo;
4417
+ origin: host,
4418
+ loadContext
4419
+ });
4420
+ shareOptionsRes = loadShareRes.shareInfo;
4421
+ loadContext = loadShareRes.loadContext || loadContext;
4261
4422
  assert2(shareOptionsRes, `Cannot find shared "${pkgName}" in host "${host.options.name}". Ensure the shared config for "${pkgName}" is declared in the federation plugin options and the host has been initialized before loading shares.`);
4262
4423
  const resolvedShareOptions = shareOptionsRes;
4263
- const { shared: registeredShared, useTreesShaking } = getRegisteredShare(this.shareScopeMap, pkgName, shareOptionsRes, this.hooks.lifecycle.resolveShare) || {};
4424
+ const { shared: registeredShared, useTreesShaking } = getRegisteredShare(this.shareScopeMap, pkgName, shareOptionsRes, this.hooks.lifecycle.resolveShare, loadContext) || {};
4264
4425
  if (registeredShared) {
4265
4426
  const targetShared = directShare(registeredShared, useTreesShaking);
4266
4427
  if (targetShared.lib) {
@@ -4269,7 +4430,8 @@ var SharedHandler = class {
4269
4430
  lifecycle: "loadShare",
4270
4431
  pkgName,
4271
4432
  shareInfo: resolvedShareOptions,
4272
- selectedShared: registeredShared
4433
+ selectedShared: registeredShared,
4434
+ loadContext
4273
4435
  });
4274
4436
  return targetShared.lib;
4275
4437
  } else if (targetShared.loading && !targetShared.loaded) {
@@ -4281,7 +4443,8 @@ var SharedHandler = class {
4281
4443
  lifecycle: "loadShare",
4282
4444
  pkgName,
4283
4445
  shareInfo: resolvedShareOptions,
4284
- selectedShared: registeredShared
4446
+ selectedShared: registeredShared,
4447
+ loadContext
4285
4448
  });
4286
4449
  return factory;
4287
4450
  } else {
@@ -4307,7 +4470,8 @@ var SharedHandler = class {
4307
4470
  lifecycle: "loadShare",
4308
4471
  pkgName,
4309
4472
  shareInfo: resolvedShareOptions,
4310
- selectedShared: registeredShared
4473
+ selectedShared: registeredShared,
4474
+ loadContext
4311
4475
  });
4312
4476
  return factory;
4313
4477
  }
@@ -4317,7 +4481,8 @@ var SharedHandler = class {
4317
4481
  lifecycle: "loadShare",
4318
4482
  pkgName,
4319
4483
  shareInfo: resolvedShareOptions,
4320
- recovered: true
4484
+ recovered: true,
4485
+ loadContext
4321
4486
  });
4322
4487
  return false;
4323
4488
  }
@@ -4328,7 +4493,7 @@ var SharedHandler = class {
4328
4493
  targetShared.lib = factory2;
4329
4494
  targetShared.loaded = true;
4330
4495
  addUseIn(targetShared, host.options.name);
4331
- const { shared: gShared, useTreesShaking: gUseTreeShaking } = getRegisteredShare(this.shareScopeMap, pkgName, resolvedShareOptions, this.hooks.lifecycle.resolveShare) || {};
4496
+ const { shared: gShared, useTreesShaking: gUseTreeShaking } = getRegisteredShare(this.shareScopeMap, pkgName, resolvedShareOptions, this.hooks.lifecycle.resolveShare, loadContext) || {};
4332
4497
  if (gShared) {
4333
4498
  const targetGShared = directShare(gShared, gUseTreeShaking);
4334
4499
  targetGShared.lib = factory2;
@@ -4352,7 +4517,8 @@ var SharedHandler = class {
4352
4517
  lifecycle: "loadShare",
4353
4518
  pkgName,
4354
4519
  shareInfo: resolvedShareOptions,
4355
- selectedShared: resolvedShareOptions
4520
+ selectedShared: resolvedShareOptions,
4521
+ loadContext
4356
4522
  });
4357
4523
  return factory;
4358
4524
  }
@@ -4361,7 +4527,8 @@ var SharedHandler = class {
4361
4527
  lifecycle: "loadShare",
4362
4528
  pkgName,
4363
4529
  shareInfo: shareOptionsRes,
4364
- error: shareError
4530
+ error: shareError,
4531
+ loadContext
4365
4532
  });
4366
4533
  throw shareError;
4367
4534
  }
@@ -4375,6 +4542,7 @@ var SharedHandler = class {
4375
4542
  const { host } = this;
4376
4543
  const from = extraOptions?.from;
4377
4544
  const strategy = extraOptions?.strategy;
4545
+ const trigger = extraOptions?.context?.trigger || from || "runtime";
4378
4546
  let initScope = extraOptions?.initScope;
4379
4547
  const promises = [];
4380
4548
  if (from !== "build") {
@@ -4393,15 +4561,29 @@ var SharedHandler = class {
4393
4561
  const { version: version2, eager } = shared;
4394
4562
  scope[name] = scope[name] || {};
4395
4563
  const versions = scope[name];
4396
- const activeVersion = versions[version2] && directShare(versions[version2]);
4564
+ const existingShared = versions[version2];
4565
+ const activeVersion = existingShared && directShare(existingShared);
4397
4566
  const activeVersionEager = Boolean(activeVersion && ("eager" in activeVersion && activeVersion.eager || "shareConfig" in activeVersion && activeVersion.shareConfig?.eager));
4398
- if (!activeVersion || activeVersion.strategy !== "loaded-first" && !activeVersion.loaded && (Boolean(!eager) !== !activeVersionEager ? eager : hostName > versions[version2].from)) versions[version2] = shared;
4567
+ if (Boolean(!activeVersion || activeVersion.strategy !== "loaded-first" && !activeVersion.loaded && (Boolean(!eager) !== !activeVersionEager ? eager : hostName > versions[version2].from))) versions[version2] = shared;
4568
+ this.emitAfterRegisterShare(name, {
4569
+ scope: shareScopeName,
4570
+ shared,
4571
+ previousShared: existingShared,
4572
+ registeredShared: versions[version2],
4573
+ trigger
4574
+ });
4399
4575
  };
4400
4576
  const initRemoteModule = async (key) => {
4401
4577
  const { module: module2 } = await host.remoteHandler.getRemoteModuleAndOptions({ id: key });
4402
4578
  let remoteEntryExports = void 0;
4579
+ const resourceContext = {
4580
+ initiator: "loadShare",
4581
+ id: key,
4582
+ resourceType: "remoteEntry",
4583
+ url: module2.remoteInfo.entry
4584
+ };
4403
4585
  try {
4404
- remoteEntryExports = await module2.getEntry();
4586
+ remoteEntryExports = await module2.getEntry(void 0, resourceContext);
4405
4587
  } catch (error3) {
4406
4588
  remoteEntryExports = await host.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({
4407
4589
  id: key,
@@ -4415,7 +4597,7 @@ var SharedHandler = class {
4415
4597
  } finally {
4416
4598
  if (remoteEntryExports?.init && !module2.initing) {
4417
4599
  module2.remoteEntryExports = remoteEntryExports;
4418
- await module2.init(void 0, void 0, initScope);
4600
+ await module2.init(void 0, void 0, initScope, void 0, resourceContext);
4419
4601
  }
4420
4602
  }
4421
4603
  };
@@ -4431,6 +4613,7 @@ var SharedHandler = class {
4431
4613
  }
4432
4614
  loadShareSync(pkgName, extraOptions) {
4433
4615
  const { host } = this;
4616
+ const loadContext = extraOptions?.context;
4434
4617
  const shareOptions = getTargetSharedOptions({
4435
4618
  pkgName,
4436
4619
  extraOptions,
@@ -4438,9 +4621,13 @@ var SharedHandler = class {
4438
4621
  });
4439
4622
  try {
4440
4623
  if (shareOptions?.scope) shareOptions.scope.forEach((shareScope) => {
4441
- this.initializeSharing(shareScope, { strategy: shareOptions.strategy });
4624
+ this.initializeSharing(shareScope, {
4625
+ strategy: shareOptions.strategy,
4626
+ from: extraOptions?.from,
4627
+ context: loadContext
4628
+ });
4442
4629
  });
4443
- const { shared: registeredShared } = getRegisteredShare(this.shareScopeMap, pkgName, shareOptions, this.hooks.lifecycle.resolveShare) || {};
4630
+ const { shared: registeredShared } = getRegisteredShare(this.shareScopeMap, pkgName, shareOptions, this.hooks.lifecycle.resolveShare, loadContext) || {};
4444
4631
  if (registeredShared) {
4445
4632
  if (typeof registeredShared.lib === "function") {
4446
4633
  addUseIn(registeredShared, host.options.name);
@@ -4452,7 +4639,8 @@ var SharedHandler = class {
4452
4639
  lifecycle: "loadShareSync",
4453
4640
  pkgName,
4454
4641
  shareInfo: shareOptions,
4455
- selectedShared: registeredShared
4642
+ selectedShared: registeredShared,
4643
+ loadContext
4456
4644
  });
4457
4645
  return registeredShared.lib;
4458
4646
  }
@@ -4471,7 +4659,8 @@ var SharedHandler = class {
4471
4659
  lifecycle: "loadShareSync",
4472
4660
  pkgName,
4473
4661
  shareInfo: shareOptions,
4474
- selectedShared: registeredShared
4662
+ selectedShared: registeredShared,
4663
+ loadContext
4475
4664
  });
4476
4665
  return module2;
4477
4666
  }
@@ -4483,7 +4672,8 @@ var SharedHandler = class {
4483
4672
  lifecycle: "loadShareSync",
4484
4673
  pkgName,
4485
4674
  shareInfo: shareOptions,
4486
- selectedShared: shareOptions
4675
+ selectedShared: shareOptions,
4676
+ loadContext
4487
4677
  });
4488
4678
  return shareOptions.lib;
4489
4679
  }
@@ -4505,7 +4695,8 @@ var SharedHandler = class {
4505
4695
  lifecycle: "loadShareSync",
4506
4696
  pkgName,
4507
4697
  shareInfo: shareOptions,
4508
- selectedShared: shareOptions
4698
+ selectedShared: shareOptions,
4699
+ loadContext
4509
4700
  });
4510
4701
  return shareOptions.lib;
4511
4702
  }
@@ -4518,7 +4709,8 @@ var SharedHandler = class {
4518
4709
  lifecycle: "loadShareSync",
4519
4710
  pkgName,
4520
4711
  shareInfo: shareOptions,
4521
- error: shareError
4712
+ error: shareError,
4713
+ loadContext
4522
4714
  });
4523
4715
  throw shareError;
4524
4716
  }
@@ -4545,6 +4737,7 @@ var SharedHandler = class {
4545
4737
  merge(targetShared, "loaded", loaded);
4546
4738
  merge(targetShared, "loading", loading);
4547
4739
  merge(targetShared, "get", get);
4740
+ merge(targetShared, "lib", lib);
4548
4741
  };
4549
4742
  scopes.forEach((sc) => {
4550
4743
  if (!this.shareScopeMap[sc]) this.shareScopeMap[sc] = {};
@@ -4777,7 +4970,7 @@ var RemoteHandler = class {
4777
4970
  const results = await preloadAssets(remoteInfo, host, assets, true, {
4778
4971
  initiator: "preloadRemote",
4779
4972
  id: preloadId
4780
- });
4973
+ }, preloadConfig.recordPreloadedAssets);
4781
4974
  preloadResults.push({
4782
4975
  remote,
4783
4976
  remoteInfo,
@@ -5039,7 +5232,7 @@ var ModuleFederation = class {
5039
5232
  beforeInitContainer: new AsyncWaterfallHook("beforeInitContainer"),
5040
5233
  initContainer: new AsyncWaterfallHook("initContainer")
5041
5234
  });
5042
- this.version = "2.8.2";
5235
+ this.version = "2.9.0";
5043
5236
  this.moduleCache = /* @__PURE__ */ new Map();
5044
5237
  this.loaderHook = new PluginSystem({
5045
5238
  getModuleInfo: new SyncHook(),
@@ -5060,7 +5253,8 @@ var ModuleFederation = class {
5060
5253
  beforeBridgeRender: new SyncHook(),
5061
5254
  afterBridgeRender: new SyncHook(),
5062
5255
  beforeBridgeDestroy: new SyncHook(),
5063
- afterBridgeDestroy: new SyncHook()
5256
+ afterBridgeDestroy: new SyncHook(),
5257
+ afterBridgeRouteSync: new SyncHook()
5064
5258
  });
5065
5259
  const plugins = USE_REMOTE && USE_SNAPSHOT ? [snapshotPlugin(), generatePreloadAssetsPlugin()] : [];
5066
5260
  const defaultOptions = {
@@ -5137,12 +5331,7 @@ var ModuleFederation = class {
5137
5331
  return optionsRes;
5138
5332
  }
5139
5333
  registerPlugins(plugins) {
5140
- const pluginRes = registerPlugins(plugins, this);
5141
- this.options.plugins = this.options.plugins.reduce((res, plugin) => {
5142
- if (!plugin) return res;
5143
- if (res && !res.find((item) => item.name === plugin.name)) res.push(plugin);
5144
- return res;
5145
- }, pluginRes || []);
5334
+ this.options.plugins = registerPlugins(plugins, this);
5146
5335
  }
5147
5336
  registerRemotes(remotes, options) {
5148
5337
  return this.remoteHandler.registerRemotes(remotes, options);
@@ -5930,7 +6119,7 @@ var o6 = e6(class extends i5 {
5930
6119
  });
5931
6120
 
5932
6121
  // libs/embed-libs/embed/package.json
5933
- var version = "7.3.0";
6122
+ var version = "7.4.0";
5934
6123
 
5935
6124
  // libs/embed-libs/embed/src/lib/helper/embed-error.utils.ts
5936
6125
  function buildEmbedErrorDetail(errorMsg) {
@@ -7173,22 +7362,6 @@ var LuzmoBaseVizItem = class extends i4 {
7173
7362
  this.libVersion = version + "-wc-luzmo";
7174
7363
  this.postInitCallQueue = [];
7175
7364
  }
7176
- static {
7177
- // Static styles to set host display to block, else it is not shown at all for some reason.
7178
- this.styles = i`
7179
- :host {
7180
- display: block;
7181
- width: 100%;
7182
- height: 100%;
7183
- }
7184
-
7185
- luzmo-embed-viz-item {
7186
- width: 100%;
7187
- height: 1000%;
7188
- display: block;
7189
- }
7190
- `;
7191
- }
7192
7365
  createRenderRoot() {
7193
7366
  if (!this.style.display) {
7194
7367
  this.style.display = "block";
@@ -7219,7 +7392,7 @@ var LuzmoBaseVizItem = class extends i4 {
7219
7392
  type: this.type,
7220
7393
  slots,
7221
7394
  options: this.options,
7222
- filters: typeof this.chartElement?.getFilters === "function" ? this.getFilters() : this.filters ?? [],
7395
+ filters: typeof this.chartElement?.getContextFilters === "function" ? this.chartElement.getContextFilters() : typeof this.chartElement?.getFilters === "function" ? this.getFilters() : [],
7223
7396
  datasetIds: collectVizItemDatasetIds(slots)
7224
7397
  };
7225
7398
  }
@@ -7328,6 +7501,20 @@ var LuzmoBaseVizItem = class extends i4 {
7328
7501
  return b2` `;
7329
7502
  }
7330
7503
  };
7504
+ // Static styles to set host display to block, else it is not shown at all for some reason.
7505
+ LuzmoBaseVizItem.styles = i`
7506
+ :host {
7507
+ display: block;
7508
+ width: 100%;
7509
+ height: 100%;
7510
+ }
7511
+
7512
+ luzmo-embed-viz-item {
7513
+ width: 100%;
7514
+ height: 1000%;
7515
+ display: block;
7516
+ }
7517
+ `;
7331
7518
  __decorateClass([
7332
7519
  n4()
7333
7520
  ], LuzmoBaseVizItem.prototype, "appServer", 2);
@@ -7425,16 +7612,6 @@ var LuzmoIQEmbedChatComponent = class extends i4 {
7425
7612
  this.remoteEntryServer = "http://localhost:4202/";
7426
7613
  this.aydHost = "https://ayd.luzmo.com/";
7427
7614
  }
7428
- static {
7429
- // Static styles to set host display to block, else it is not shown at all for some reason.
7430
- this.styles = i`
7431
- :host {
7432
- display: block;
7433
- width: 100%;
7434
- height: 100%;
7435
- }
7436
- `;
7437
- }
7438
7615
  createRenderRoot() {
7439
7616
  return this;
7440
7617
  }
@@ -7512,6 +7689,14 @@ var LuzmoIQEmbedChatComponent = class extends i4 {
7512
7689
  observer.observe(embedChat, { childList: true, subtree: true });
7513
7690
  }
7514
7691
  };
7692
+ // Static styles to set host display to block, else it is not shown at all for some reason.
7693
+ LuzmoIQEmbedChatComponent.styles = i`
7694
+ :host {
7695
+ display: block;
7696
+ width: 100%;
7697
+ height: 100%;
7698
+ }
7699
+ `;
7515
7700
  __decorateClass([
7516
7701
  n4()
7517
7702
  ], LuzmoIQEmbedChatComponent.prototype, "appServer", 2);
@@ -7586,16 +7771,6 @@ var LuzmoIQEmbedAnswerComponent = class extends i4 {
7586
7771
  this.libVersion = version + "-wc-luzmo";
7587
7772
  this.remoteEntryServer = "http://localhost:4202";
7588
7773
  }
7589
- static {
7590
- // Static styles to set host display to block, else it is not shown at all for some reason.
7591
- this.styles = i`
7592
- :host {
7593
- display: block;
7594
- width: 100%;
7595
- height: 100%;
7596
- }
7597
- `;
7598
- }
7599
7774
  createRenderRoot() {
7600
7775
  return this;
7601
7776
  }
@@ -7646,6 +7821,14 @@ var LuzmoIQEmbedAnswerComponent = class extends i4 {
7646
7821
  return b2` `;
7647
7822
  }
7648
7823
  };
7824
+ // Static styles to set host display to block, else it is not shown at all for some reason.
7825
+ LuzmoIQEmbedAnswerComponent.styles = i`
7826
+ :host {
7827
+ display: block;
7828
+ width: 100%;
7829
+ height: 100%;
7830
+ }
7831
+ `;
7649
7832
  __decorateClass([
7650
7833
  n4()
7651
7834
  ], LuzmoIQEmbedAnswerComponent.prototype, "appServer", 2);