@everymatrix/general-stories 1.56.0 → 1.56.2

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 (32) hide show
  1. package/dist/cjs/{general-stories-f3bf4099.js → general-stories-bbb81cca.js} +14 -27
  2. package/dist/cjs/general-stories.cjs.entry.js +2 -2
  3. package/dist/cjs/general-stories.cjs.js +2 -2
  4. package/dist/cjs/{index-4176da89.js → index-5b8c1770.js} +73 -210
  5. package/dist/cjs/index.cjs.js +2 -2
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/collection-manifest.json +2 -2
  8. package/dist/collection/components/general-stories/general-stories.js +13 -42
  9. package/dist/esm/{general-stories-8ada9aa4.js → general-stories-09d4f95e.js} +14 -27
  10. package/dist/esm/general-stories.entry.js +2 -2
  11. package/dist/esm/general-stories.js +3 -3
  12. package/dist/esm/{index-95b2d607.js → index-b4964764.js} +73 -210
  13. package/dist/esm/index.js +2 -2
  14. package/dist/esm/loader.js +2 -2
  15. package/dist/general-stories/general-stories.esm.js +1 -1
  16. package/dist/general-stories/index.esm.js +1 -1
  17. package/dist/general-stories/p-34426db6.js +1 -0
  18. package/dist/general-stories/p-c85b316a.js +2 -0
  19. package/dist/general-stories/p-e1076ee3.entry.js +1 -0
  20. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-stories/.stencil/packages/stencil/general-stories/stencil.config.d.ts +2 -0
  21. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-stories/.stencil/packages/stencil/general-stories/stencil.config.dev.d.ts +2 -0
  22. package/dist/types/stencil-public-runtime.d.ts +0 -6
  23. package/package.json +1 -1
  24. package/dist/general-stories/p-004038c9.js +0 -1
  25. package/dist/general-stories/p-3e7fe480.entry.js +0 -1
  26. package/dist/general-stories/p-56d326ea.js +0 -2
  27. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-stories/.stencil/packages/stencil/general-stories/stencil.config.d.ts +0 -2
  28. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-stories/.stencil/packages/stencil/general-stories/stencil.config.dev.d.ts +0 -2
  29. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-stories/.stencil/tools/plugins/index.d.ts +0 -0
  30. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-stories/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  31. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-stories/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  32. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-stories/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -1,25 +1,17 @@
1
1
  const NAMESPACE = 'general-stories';
2
- const BUILD = /* general-stories */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: false, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
2
+ const BUILD = /* general-stories */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: false, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
3
3
 
4
4
  /*
5
- Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
  var __defProp = Object.defineProperty;
8
8
  var __export = (target, all) => {
9
9
  for (var name in all)
10
10
  __defProp(target, name, { get: all[name], enumerable: true });
11
11
  };
12
-
13
- // src/utils/constants.ts
14
- var SVG_NS = "http://www.w3.org/2000/svg";
15
- var HTML_NS = "http://www.w3.org/1999/xhtml";
16
-
17
- // src/client/client-host-ref.ts
18
12
  var hostRefs = /* @__PURE__ */ new WeakMap();
19
13
  var getHostRef = (ref) => hostRefs.get(ref);
20
- var registerInstance = (lazyInstance, hostRef) => {
21
- hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
22
- };
14
+ var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
23
15
  var registerHost = (hostElement, cmpMeta) => {
24
16
  const hostRef = {
25
17
  $flags$: 0,
@@ -32,8 +24,7 @@ var registerHost = (hostElement, cmpMeta) => {
32
24
  hostElement["s-p"] = [];
33
25
  hostElement["s-rc"] = [];
34
26
  }
35
- const ref = hostRefs.set(hostElement, hostRef);
36
- return ref;
27
+ return hostRefs.set(hostElement, hostRef);
37
28
  };
38
29
  var isMemberInElement = (elm, memberName) => memberName in elm;
39
30
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -70,22 +61,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
70
61
  /* webpackExclude: /\.system\.entry\.js$/ */
71
62
  /* webpackMode: "lazy" */
72
63
  `./${bundleId}.entry.js${""}`
73
- ).then(
74
- (importedModule) => {
75
- {
76
- cmpModules.set(bundleId, importedModule);
77
- }
78
- return importedModule[exportName];
79
- },
80
- (e) => {
81
- consoleError(e, hostRef.$hostElement$);
64
+ ).then((importedModule) => {
65
+ {
66
+ cmpModules.set(bundleId, importedModule);
82
67
  }
83
- );
68
+ return importedModule[exportName];
69
+ }, consoleError);
84
70
  };
85
71
 
86
72
  // src/client/client-style.ts
87
73
  var styles = /* @__PURE__ */ new Map();
88
- var HYDRATED_STYLE_ID = "sty-id";
89
74
  var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
90
75
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
91
76
  var win = typeof window !== "undefined" ? window : {};
@@ -159,6 +144,14 @@ var flush = () => {
159
144
  };
160
145
  var nextTick = (cb) => promiseResolve().then(cb);
161
146
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
147
+
148
+ // src/utils/constants.ts
149
+ var EMPTY_OBJ = {};
150
+ var SVG_NS = "http://www.w3.org/2000/svg";
151
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
152
+
153
+ // src/utils/helpers.ts
154
+ var isDef = (v) => v != null;
162
155
  var isComplexType = (o) => {
163
156
  o = typeof o;
164
157
  return o === "object" || o === "function";
@@ -370,40 +363,13 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
370
363
  }
371
364
  if (!appliedStyles.has(scopeId2)) {
372
365
  {
373
- styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
366
+ styleElm = doc.createElement("style");
374
367
  styleElm.innerHTML = style;
375
368
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
376
369
  if (nonce != null) {
377
370
  styleElm.setAttribute("nonce", nonce);
378
371
  }
379
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
380
- if (styleContainerNode.nodeName === "HEAD") {
381
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
382
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
383
- styleContainerNode.insertBefore(
384
- styleElm,
385
- (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
386
- );
387
- } else if ("host" in styleContainerNode) {
388
- if (supportsConstructableStylesheets) {
389
- const stylesheet = new CSSStyleSheet();
390
- stylesheet.replaceSync(style);
391
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
392
- } else {
393
- const existingStyleContainer = styleContainerNode.querySelector("style");
394
- if (existingStyleContainer) {
395
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
396
- } else {
397
- styleContainerNode.prepend(styleElm);
398
- }
399
- }
400
- } else {
401
- styleContainerNode.append(styleElm);
402
- }
403
- }
404
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
405
- styleContainerNode.insertBefore(styleElm, null);
406
- }
372
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
407
373
  }
408
374
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
409
375
  styleElm.innerHTML += SLOT_FB_CSS;
@@ -426,25 +392,23 @@ var attachStyles = (hostRef) => {
426
392
  const scopeId2 = addStyle(
427
393
  elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
428
394
  cmpMeta);
429
- if ((flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
395
+ if (flags & 10 /* needsScopedEncapsulation */) {
430
396
  elm["s-sc"] = scopeId2;
431
397
  elm.classList.add(scopeId2 + "-h");
432
398
  }
433
399
  endAttachStyles();
434
400
  };
435
401
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
436
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
402
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
437
403
  if (oldValue !== newValue) {
438
404
  let isProp = isMemberInElement(elm, memberName);
439
405
  let ln = memberName.toLowerCase();
440
406
  if (memberName === "class") {
441
407
  const classList = elm.classList;
442
408
  const oldClasses = parseClassList(oldValue);
443
- let newClasses = parseClassList(newValue);
444
- {
445
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
446
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
447
- }
409
+ const newClasses = parseClassList(newValue);
410
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
411
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
448
412
  } else if (memberName === "style") {
449
413
  {
450
414
  for (const prop in oldValue) {
@@ -497,13 +461,9 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
497
461
  if (memberName === "list") {
498
462
  isProp = false;
499
463
  } else if (oldValue == null || elm[memberName] != n) {
500
- if (typeof elm.__lookupSetter__(memberName) === "function") {
501
- elm[memberName] = n;
502
- } else {
503
- elm.setAttribute(memberName, n);
504
- }
464
+ elm[memberName] = n;
505
465
  }
506
- } else if (elm[memberName] !== newValue) {
466
+ } else {
507
467
  elm[memberName] = newValue;
508
468
  }
509
469
  } catch (e) {
@@ -525,44 +485,24 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
525
485
  }
526
486
  };
527
487
  var parseClassListRegex = /\s/;
528
- var parseClassList = (value) => {
529
- if (typeof value === "object" && value && "baseVal" in value) {
530
- value = value.baseVal;
531
- }
532
- if (!value || typeof value !== "string") {
533
- return [];
534
- }
535
- return value.split(parseClassListRegex);
536
- };
488
+ var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
537
489
  var CAPTURE_EVENT_SUFFIX = "Capture";
538
490
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
539
491
 
540
492
  // src/runtime/vdom/update-element.ts
541
- var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
493
+ var updateElement = (oldVnode, newVnode, isSvgMode2) => {
542
494
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
543
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
544
- const newVnodeAttrs = newVnode.$attrs$ || {};
495
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
496
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
545
497
  {
546
498
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
547
499
  if (!(memberName in newVnodeAttrs)) {
548
- setAccessor(
549
- elm,
550
- memberName,
551
- oldVnodeAttrs[memberName],
552
- void 0,
553
- isSvgMode2,
554
- newVnode.$flags$);
500
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
555
501
  }
556
502
  }
557
503
  }
558
504
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
559
- setAccessor(
560
- elm,
561
- memberName,
562
- oldVnodeAttrs[memberName],
563
- newVnodeAttrs[memberName],
564
- isSvgMode2,
565
- newVnode.$flags$);
505
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
566
506
  }
567
507
  };
568
508
  function sortedAttrNames(attrNames) {
@@ -574,10 +514,13 @@ function sortedAttrNames(attrNames) {
574
514
  attrNames
575
515
  );
576
516
  }
517
+
518
+ // src/runtime/vdom/vdom-render.ts
519
+ var scopeId;
577
520
  var hostTagName;
578
521
  var useNativeShadowDom = false;
579
522
  var isSvgMode = false;
580
- var createElm = (oldParentVNode, newParentVNode, childIndex) => {
523
+ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
581
524
  const newVNode2 = newParentVNode.$children$[childIndex];
582
525
  let i2 = 0;
583
526
  let elm;
@@ -598,6 +541,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
598
541
  {
599
542
  updateElement(null, newVNode2, isSvgMode);
600
543
  }
544
+ if (isDef(scopeId) && elm["s-si"] !== scopeId) {
545
+ elm.classList.add(elm["s-si"] = scopeId);
546
+ }
601
547
  if (newVNode2.$children$) {
602
548
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
603
549
  childNode = createElm(oldParentVNode, newVNode2, i2);
@@ -709,9 +655,6 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
709
655
  };
710
656
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
711
657
  if (leftVNode.$tag$ === rightVNode.$tag$) {
712
- if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
713
- leftVNode.$key$ = rightVNode.$key$;
714
- }
715
658
  return true;
716
659
  }
717
660
  return false;
@@ -738,10 +681,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
738
681
  elm.textContent = "";
739
682
  }
740
683
  addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
741
- } else if (
742
- // don't do this on initial render as it can cause non-hydrated content to be removed
743
- !isInitialRender && BUILD.updatable && oldChildren !== null
744
- ) {
684
+ } else if (oldChildren !== null) {
745
685
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
746
686
  }
747
687
  if (isSvgMode && tag === "svg") {
@@ -758,9 +698,8 @@ var nullifyVNodeRefs = (vNode) => {
758
698
  }
759
699
  };
760
700
  var insertBefore = (parent, newNode, reference) => {
761
- {
762
- return parent == null ? void 0 : parent.insertBefore(newNode, reference);
763
- }
701
+ const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
702
+ return inserted;
764
703
  };
765
704
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
766
705
  const hostElm = hostRef.$hostElement$;
@@ -785,21 +724,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
785
724
  rootVnode.$flags$ |= 4 /* isHost */;
786
725
  hostRef.$vnode$ = rootVnode;
787
726
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
788
- useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
727
+ {
728
+ scopeId = hostElm["s-sc"];
729
+ }
730
+ useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
789
731
  patch(oldVNode, rootVnode, isInitialLoad);
790
732
  };
791
733
 
792
734
  // src/runtime/update-component.ts
793
735
  var attachToAncestor = (hostRef, ancestorComponent) => {
794
736
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
795
- const index = ancestorComponent["s-p"].push(
796
- new Promise(
797
- (r) => hostRef.$onRenderResolve$ = () => {
798
- ancestorComponent["s-p"].splice(index - 1, 1);
799
- r();
800
- }
801
- )
802
- );
737
+ ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
803
738
  }
804
739
  };
805
740
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -828,12 +763,12 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
828
763
  {
829
764
  hostRef.$flags$ |= 256 /* isListenReady */;
830
765
  if (hostRef.$queuedListeners$) {
831
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
766
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
832
767
  hostRef.$queuedListeners$ = void 0;
833
768
  }
834
769
  }
835
770
  {
836
- maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
771
+ maybePromise = safeCall(instance, "componentWillLoad");
837
772
  }
838
773
  }
839
774
  endSchedule();
@@ -907,7 +842,7 @@ var postUpdateComponent = (hostRef) => {
907
842
  addHydratedFlag(elm);
908
843
  }
909
844
  {
910
- safeCall(instance, "componentDidLoad", void 0, elm);
845
+ safeCall(instance, "componentDidLoad");
911
846
  }
912
847
  endPostUpdate();
913
848
  {
@@ -931,14 +866,17 @@ var postUpdateComponent = (hostRef) => {
931
866
  }
932
867
  };
933
868
  var appDidLoad = (who) => {
869
+ {
870
+ addHydratedFlag(doc.documentElement);
871
+ }
934
872
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
935
873
  };
936
- var safeCall = (instance, method, arg, elm) => {
874
+ var safeCall = (instance, method, arg) => {
937
875
  if (instance && instance[method]) {
938
876
  try {
939
877
  return instance[method](arg);
940
878
  } catch (e) {
941
- consoleError(e, elm);
879
+ consoleError(e);
942
880
  }
943
881
  }
944
882
  return void 0;
@@ -997,68 +935,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
997
935
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
998
936
  members.map(([memberName, [memberFlags]]) => {
999
937
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1000
- const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
1001
- if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
1002
- if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
1003
- if (flags & 1 /* isElementConstructor */ || !origGetter) {
1004
- Object.defineProperty(prototype, memberName, {
1005
- get() {
1006
- {
1007
- if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
1008
- return getValue(this, memberName);
1009
- }
1010
- const ref = getHostRef(this);
1011
- const instance = ref ? ref.$lazyInstance$ : prototype;
1012
- if (!instance) return;
1013
- return instance[memberName];
1014
- }
1015
- },
1016
- configurable: true,
1017
- enumerable: true
1018
- });
1019
- }
1020
938
  Object.defineProperty(prototype, memberName, {
939
+ get() {
940
+ return getValue(this, memberName);
941
+ },
1021
942
  set(newValue) {
1022
- const ref = getHostRef(this);
1023
- if (origSetter) {
1024
- const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1025
- if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
1026
- newValue = ref.$instanceValues$.get(memberName);
1027
- } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
1028
- ref.$instanceValues$.set(memberName, currentValue);
1029
- }
1030
- origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
1031
- newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1032
- setValue(this, memberName, newValue, cmpMeta);
1033
- return;
1034
- }
1035
- {
1036
- if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
1037
- setValue(this, memberName, newValue, cmpMeta);
1038
- if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
1039
- ref.$onReadyPromise$.then(() => {
1040
- if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
1041
- ref.$lazyInstance$[memberName] = newValue;
1042
- }
1043
- });
1044
- }
1045
- return;
1046
- }
1047
- const setterSetVal = () => {
1048
- const currentValue = ref.$lazyInstance$[memberName];
1049
- if (!ref.$instanceValues$.get(memberName) && currentValue) {
1050
- ref.$instanceValues$.set(memberName, currentValue);
1051
- }
1052
- ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
1053
- setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1054
- };
1055
- if (ref.$lazyInstance$) {
1056
- setterSetVal();
1057
- } else {
1058
- ref.$onReadyPromise$.then(() => setterSetVal());
1059
- }
1060
- }
1061
- }
943
+ setValue(this, memberName, newValue, cmpMeta);
944
+ },
945
+ configurable: true,
946
+ enumerable: true
1062
947
  });
1063
948
  }
1064
949
  });
@@ -1068,11 +953,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1068
953
  plt.jmp(() => {
1069
954
  var _a2;
1070
955
  const propName = attrNameToPropName.get(attrName);
1071
- if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
956
+ if (this.hasOwnProperty(propName)) {
1072
957
  newValue = this[propName];
1073
958
  delete this[propName];
1074
- } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
1075
- this[propName] == newValue) {
959
+ } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
1076
960
  return;
1077
961
  } else if (propName == null) {
1078
962
  const hostRef = getHostRef(this);
@@ -1088,11 +972,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1088
972
  }
1089
973
  return;
1090
974
  }
1091
- const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1092
- newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1093
- if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
1094
- this[propName] = newValue;
1095
- }
975
+ this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1096
976
  });
1097
977
  };
1098
978
  Cstr.observedAttributes = Array.from(
@@ -1121,7 +1001,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1121
1001
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1122
1002
  const bundleId = cmpMeta.$lazyBundleId$;
1123
1003
  if (bundleId) {
1124
- const CstrImport = loadModule(cmpMeta, hostRef);
1004
+ const CstrImport = loadModule(cmpMeta);
1125
1005
  if (CstrImport && "then" in CstrImport) {
1126
1006
  const endLoad = uniqueTime();
1127
1007
  Cstr = await CstrImport;
@@ -1146,7 +1026,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1146
1026
  try {
1147
1027
  new Cstr(hostRef);
1148
1028
  } catch (e) {
1149
- consoleError(e, elm);
1029
+ consoleError(e);
1150
1030
  }
1151
1031
  {
1152
1032
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
@@ -1181,7 +1061,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1181
1061
  schedule();
1182
1062
  }
1183
1063
  };
1184
- var fireConnectedCallback = (instance, elm) => {
1064
+ var fireConnectedCallback = (instance) => {
1185
1065
  };
1186
1066
 
1187
1067
  // src/runtime/connected-callback.ts
@@ -1222,9 +1102,9 @@ var connectedCallback = (elm) => {
1222
1102
  endConnected();
1223
1103
  }
1224
1104
  };
1225
- var disconnectInstance = (instance, elm) => {
1105
+ var disconnectInstance = (instance) => {
1226
1106
  {
1227
- safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1107
+ safeCall(instance, "disconnectedCallback");
1228
1108
  }
1229
1109
  };
1230
1110
  var disconnectedCallback = async (elm) => {
@@ -1237,17 +1117,11 @@ var disconnectedCallback = async (elm) => {
1237
1117
  }
1238
1118
  }
1239
1119
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1240
- disconnectInstance(hostRef.$lazyInstance$, elm);
1120
+ disconnectInstance(hostRef.$lazyInstance$);
1241
1121
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1242
- hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1122
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1243
1123
  }
1244
1124
  }
1245
- if (rootAppliedStyles.has(elm)) {
1246
- rootAppliedStyles.delete(elm);
1247
- }
1248
- if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1249
- rootAppliedStyles.delete(elm.shadowRoot);
1250
- }
1251
1125
  };
1252
1126
 
1253
1127
  // src/runtime/bootstrap-lazy.ts
@@ -1332,17 +1206,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1332
1206
  }
1333
1207
  disconnectedCallback() {
1334
1208
  plt.jmp(() => disconnectedCallback(this));
1335
- plt.raf(() => {
1336
- var _a3;
1337
- const hostRef = getHostRef(this);
1338
- const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
1339
- if (i2 > -1) {
1340
- deferredConnectedCallbacks.splice(i2, 1);
1341
- }
1342
- if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1343
- delete hostRef.$vnode$.$elm$;
1344
- }
1345
- });
1346
1209
  }
1347
1210
  componentOnReady() {
1348
1211
  return getHostRef(this).$onReadyPromise$;
@@ -1406,7 +1269,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
1406
1269
  }
1407
1270
  }
1408
1271
  } catch (e) {
1409
- consoleError(e, hostRef.$hostElement$);
1272
+ consoleError(e);
1410
1273
  }
1411
1274
  };
1412
1275
  var hostListenerOpts = (flags) => supportsListenerOptions ? {
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { G as GeneralStories } from './general-stories-8ada9aa4.js';
2
- import './index-95b2d607.js';
1
+ export { G as GeneralStories } from './general-stories-09d4f95e.js';
2
+ import './index-b4964764.js';
@@ -1,5 +1,5 @@
1
- import { b as bootstrapLazy } from './index-95b2d607.js';
2
- export { s as setNonce } from './index-95b2d607.js';
1
+ import { b as bootstrapLazy } from './index-b4964764.js';
2
+ export { s as setNonce } from './index-b4964764.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
@@ -1 +1 @@
1
- import{p as n,b as t}from"./p-56d326ea.js";export{s as setNonce}from"./p-56d326ea.js";import{g as e}from"./p-e1255160.js";(()=>{const t=import.meta.url,e={};return""!==t&&(e.resourcesUrl=new URL(".",t).href),n(e)})().then((async n=>(await e(),t([["p-3e7fe480",[[1,"general-stories",{cmsEndpoint:[513,"cms-endpoint"],language:[513],cmsEnv:[513,"cms-env"],mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],progressBarDuration:[514,"progress-bar-duration"],currentStory:[32],currentStoryId:[32],progress:[32],touchPosStart:[32],touchPosEnd:[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]],{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"],translationUrl:["handleNewTranslations"],progress:["handleTimeEnds"]}]]]],n))));
1
+ import{p as n,b as t}from"./p-c85b316a.js";export{s as setNonce}from"./p-c85b316a.js";import{g as r}from"./p-e1255160.js";(()=>{const t=import.meta.url,r={};return""!==t&&(r.resourcesUrl=new URL(".",t).href),n(r)})().then((async n=>(await r(),t([["p-e1076ee3",[[1,"general-stories",{cmsEndpoint:[513,"cms-endpoint"],language:[513],cmsEnv:[513,"cms-env"],mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],progressBarDuration:[514,"progress-bar-duration"],currentStory:[32],currentStoryId:[32],progress:[32],touchPosStart:[32],touchPosEnd:[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]],{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"],translationUrl:["handleNewTranslations"],progress:["handleTimeEnds"]}]]]],n))));
@@ -1 +1 @@
1
- export{G as GeneralStories}from"./p-004038c9.js";import"./p-56d326ea.js";
1
+ export{G as GeneralStories}from"./p-34426db6.js";import"./p-c85b316a.js";
@@ -0,0 +1 @@
1
+ import{r as t,h as i}from"./p-c85b316a.js";const e={en:{error:"Error",generalStoriesLoading:"Loading, please wait ...",loadMore:"Load More"},hu:{error:"Hiba",generalStoriesLoading:"Betöltés, kérjük várjon ...",loadMore:"Továbbiak betöltése"},ro:{error:"Eroare",generalStoriesLoading:"Se încarcă, vă rugăm așteptați ...",loadMore:"Încarcă mai multe"},fr:{error:"Erreur",generalStoriesLoading:"Chargement, veuillez patienter ...",loadMore:"Charger plus"},ar:{error:"خطأ",generalStoriesLoading:"جار التحميل، يرجى الانتظار ...",loadMore:"تحميل المزيد"},hr:{error:"Greška",generalStoriesLoading:"Učitavanje, molimo pričekajte ...",loadMore:"Učitaj više"}},o=t=>new Promise((i=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((i=>{e[i]||(e[i]={});for(let o in t[i])e[i][o]=t[i][o]})),i(!0)}))})),r=(t,i)=>e[void 0!==i&&i in e?i:"en"][t];function s(t,i){if(t){const e=document.createElement("style");e.innerHTML=i,t.appendChild(e)}}function n(t,i){const e=new URL(i);fetch(e.href).then((t=>t.text())).then((i=>{const e=document.createElement("style");e.innerHTML=i,t&&t.appendChild(e)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}const a=class{constructor(e){t(this,e),this.hasErrors=!1,this.isLoading=!0,this.isSwipe=!1,this.getStories=()=>{let t=new URL(`${this.cmsEndpoint}/${this.language}/stories`);return t.searchParams.append("env",this.cmsEnv),t.searchParams.append("device",(()=>{const t=(()=>{let t=window.navigator.userAgent;return t.toLowerCase().match(/android/i)?"Android":t.toLowerCase().match(/iphone/i)?"iPhone":t.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(t)return"PC"===t?"dk":"mtWeb"})()),t.searchParams.append("language",this.language),new Promise(((i,e)=>{this.isLoading=!0,fetch(t.href).then((t=>t.json())).then((t=>{this.stories=t,this.stories.forEach((t=>{t.viewed=!1})),this.isLoading=!1,i(!0)})).catch((t=>{console.log(t),this.isLoading=!1,this.hasErrors=!0,e(t)}))}))},this.navigateToExternalStoryLink=()=>{window.postMessage({type:"OpenStoryLink",url:this.currentStory.storyUrl},window.location.href)},this.openFullScreenStory=t=>{this.currentStoryId=t,this.currentStory=this.stories.find((i=>i.id===t)),this.markStoryAsViewed(t),this.startProgress()},this.closeFullScreenView=()=>{this.markStoryAsViewed(this.currentStoryId.toString()),this.currentStoryId=null,this.progress=0,clearInterval(this.intervalId)},this.markStoryAsViewed=t=>{const i=this.stories.findIndex((i=>i.id===t));if(i>-1){const[t]=this.stories.splice(i,1);t.viewed=!0,this.stories=[...this.stories,t]}},this.changeStory=(t,i)=>{const e="next"===i?Number(t.index)+1:Number(t.index)-1;if(e>this.stories.length-1||e<0)this.markStoryAsViewed(t.index),this.closeFullScreenView();else{const t=this.stories.find((t=>t.index===e));this.currentStory=t,this.currentStoryId=t.id,this.progress=0,this.markStoryAsViewed(t.id)}},this.startProgress=()=>{const t=100/(1e3*this.progressBarDuration)*100;this.intervalId=setInterval((()=>{this.progress>=100?clearInterval(this.intervalId):this.progress+=t}),100)},this.Thumbnail=({props:t})=>i("div",{class:"StoryThumbnailContainer "+(t.viewed?"Viewed":"Highlighted"),onTouchStart:()=>this.openFullScreenStory(t.id)},i("img",{class:"StoryThumbnailImage "+(t.viewed?"Viewed":"Highlighted"),src:t.icon,alt:"story-icon"})),this.cmsEndpoint=void 0,this.language="en",this.cmsEnv="stage",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.progressBarDuration=10,this.currentStory=void 0,this.currentStoryId=null,this.progress=0,this.touchPosStart=void 0,this.touchPosEnd=void 0}handleClientStylingChange(t,i){t!=i&&s(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,i){t!=i&&this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl)}handleNewTranslations(){this.isLoading=!0,o(this.translationUrl).then((()=>{this.isLoading=!1}))}handleTimeEnds(t){t>=100&&this.changeStory(this.currentStory,"next")}async componentWillLoad(){this.cmsEndpoint&&this.language&&await this.getStories(),this.translationUrl.length>2&&await o(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?function(t,i){if(window.emMessageBus){const e=document.createElement("style");window.emMessageBus.subscribe(i,(i=>{e.innerHTML=i,t&&t.appendChild(e)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&s(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}onTouchStart(t){this.touchPosStart={clientX:t.touches[0].clientX,clientY:t.touches[0].clientY}}onTouchMove(t){this.touchPosEnd={clientX:t.touches[0].clientX,clientY:t.touches[0].clientY},Math.abs(this.touchPosEnd.clientX-this.touchPosStart.clientX)>50&&(this.isSwipe=!0)}onTouchEnd(t){if(this.isSwipe)this.touchPosEnd={clientX:t.changedTouches[0].clientX,clientY:t.changedTouches[0].clientY},this.changeStory(this.currentStory,this.touchPosEnd.clientX-this.touchPosStart.clientX>0?"previous":"next");else{const i=window.innerWidth;this.changeStory(this.currentStory,t.changedTouches[0].clientX>i/2?"next":"previous")}}render(){return this.hasErrors?i("div",{class:"GeneralStoriesError"},i("div",{class:"Title"},r("error",this.language))):this.isLoading?i("div",{class:"GeneralStoriesLoading"},i("div",{class:"Title"},r("generalStoriesLoading",this.language))):this.isLoading?void 0:i("div",{ref:t=>this.stylingContainer=t},this.currentStoryId?i("div",{class:"FullScreenStory"},i("div",{class:"FullScreenHeader"},i("div",{class:"ProgressBarContainer"},i("div",{class:"ProgressBar",style:{width:`${this.progress}%`}})),i("div",{id:"close",class:"CloseStoryButton",onTouchStart:this.closeFullScreenView},i("svg",{fill:"none",stroke:"#ffffff",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})))),"video"===this.currentStory.type?i("video",{autoPlay:!0},i("source",{src:this.currentStory.url,type:"video/mp4"})):i("img",{src:this.currentStory.url,alt:"story-image"}),this.currentStory.storyUrl&&i("div",{class:"LoadMoreButtonBackground"},i("button",{onTouchStart:this.navigateToExternalStoryLink,class:"LoadMoreButton"},r("loadMore",this.language)))):i("div",{class:"ImageContainer"},this.stories.map((t=>i(this.Thumbnail,{props:t})))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"],translationUrl:["handleNewTranslations"],progress:["handleTimeEnds"]}}};a.style='.ImageContainer{display:flex;flex-direction:row;background-color:var(--emw--color-background, #0E1511);overflow:auto}.StoryThumbnailContainer{margin:5px;position:relative;display:inline-block;border-radius:50%}.StoryThumbnailContainer.Highlighted::before{content:"";position:absolute;border-radius:50%;background:linear-gradient(to bottom, var(--emw--color-primary, #22B04E), var(--emw--color-secondary, #E1A749));top:-3px;left:-3px;width:111%;height:103%}.StoryThumbnailContainer.Viewed::before{content:"";position:absolute;border-radius:50%;height:50px;width:50px;background:var(--emw--color-grey-150, #828282);top:-3px;left:-3px;width:111%;height:103%}.StoryThumbnailImage{height:50px;width:50px;border-radius:50%;position:relative;z-index:1}.StoryThumbnailImage.Highlighted,.StoryThumbnailImage.Viewed{border:2px solid var(--emw--color-white, #ffffff)}.FullScreenHeader{position:fixed;top:0;background:linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));top:0px;width:100%;display:flex;flex-direction:column;padding:10px 0;z-index:5;height:30px}.FullScreenHeader .CloseStoryButton{position:absolute;right:0;width:20px;margin-right:20px;margin-top:8px;z-index:50}.FullScreenHeader .ProgressBarContainer{width:90%;height:2px;position:relative;top:0;background-color:var(--emw--color-grey-150, #828282);border-radius:10px;overflow:hidden;margin:0 auto}.FullScreenHeader .ProgressBarContainer .ProgressBar{height:100%;background:var(--emw--color-white, #ffffff);width:0%;transition:width 0.1s linear}.FullScreenStory{position:fixed;top:0;width:100%;height:100%;background-color:var(--emw--color-grey-400, #24211f);display:flex;align-items:center;justify-content:center;overflow:hidden;z-index:300}.FullScreenStory video{height:100vh;width:100vw}.FullScreenStory img{width:100%;height:100%;object-fit:contain}.FullScreenStory .LoadMoreButtonBackground{width:100%;height:15%;background:linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));position:absolute;bottom:0;display:flex;justify-content:center}.FullScreenStory .LoadMoreButtonBackground .LoadMoreButton{width:auto;font-size:var(--emw--font-size-small, 14px);font-family:inherit;background-color:var(--emw--color-grey-50, #F9F8F8);box-shadow:0px 0px 7px 1px var(--emw--color-grey-400, #24211f);color:var(--emw--color-black, #000000);border-radius:50px;position:absolute;bottom:15px;padding:10px 20px}';export{a as G}
@@ -0,0 +1,2 @@
1
+ var t=Object.defineProperty,e=new WeakMap,n=t=>e.get(t),o=(t,n)=>e.set(n.t=t,n),l=(t,e)=>e in t,r=(t,e)=>(0,console.error)(t,e),s=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={o:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},h=t=>Promise.resolve(t),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),d=!1,m=[],v=[],y=(t,e)=>n=>{t.push(n),d||(d=!0,e&&4&f.o?b($):f.raf($))},w=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){r(t)}t.length=0},$=()=>{w(m),w(v),(d=m.length>0)&&f.raf($)},b=t=>h().then(t),g=y(v,!0),S={},j=t=>"object"==(t=typeof t)||"function"===t;function O(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{err:()=>E,map:()=>C,ok:()=>k,unwrap:()=>P,unwrapErr:()=>L});var k=t=>({isOk:!0,isErr:!1,value:t}),E=t=>({isOk:!1,isErr:!0,value:t});function C(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>k(t))):k(n)}if(t.isErr)return E(t.value);throw"should never get here"}var M,x,P=t=>{if(t.isOk)return t.value;throw t.value},L=t=>{if(t.isErr)return t.value;throw t.value},R=(t,e,...n)=>{let o=null,l=!1,r=!1;const s=[],i=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?i(o):null!=o&&"boolean"!=typeof o&&((l="function"!=typeof t&&!j(o))&&(o+=""),l&&r?s[s.length-1].i+=o:s.push(l?T(null,o):o),r=l)};if(i(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}if("function"==typeof t)return t(null===e?{}:e,s,F);const c=T(t,null);return c.u=e,s.length>0&&(c.h=s),c},T=(t,e)=>({o:0,p:t,i:e,m:null,h:null,u:null}),A={},F={forEach:(t,e)=>t.map(N).forEach(e),map:(t,e)=>t.map(N).map(e).map(U)},N=t=>({vattrs:t.u,vchildren:t.h,vkey:t.v,vname:t.$,vtag:t.p,vtext:t.i}),U=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),R(t.vtag,e,...t.vchildren||[])}const e=T(t.vtag,t.vtext);return e.u=t.vattrs,e.h=t.vchildren,e.v=t.vkey,e.$=t.vname,e},W=new WeakMap,D=t=>"sc-"+t.S,H=(t,e,n,o,r,s)=>{if(n!==o){let i=l(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,l=G(n),r=G(o);e.remove(...l.filter((t=>t&&!r.includes(t)))),e.add(...r.filter((t=>t&&!l.includes(t))))}else if("style"===e){for(const e in n)o&&null!=o[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in o)n&&o[e]===n[e]||(e.includes("-")?t.style.setProperty(e,o[e]):t.style[e]=o[e])}else if("ref"===e)o&&o(t);else if(i||"o"!==e[0]||"n"!==e[1]){const l=j(o);if((i||l&&null!==o)&&!r)try{if(t.tagName.includes("-"))t[e]=o;else{const l=null==o?"":o;"list"===e?i=!1:null!=n&&t[e]==l||(t[e]=l)}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!i||4&s||r)&&!l&&t.setAttribute(e,o=!0===o?"":o)}else if(e="-"===e[2]?e.slice(3):l(u,c)?c.slice(2):c[2]+e.slice(3),n||o){const l=e.endsWith(V);e=e.replace(_,""),n&&f.rel(t,e,n,l),o&&f.ael(t,e,o,l)}}},q=/\s/,G=t=>t?t.split(q):[],V="Capture",_=RegExp(V+"$"),z=(t,e,n)=>{const o=11===e.m.nodeType&&e.m.host?e.m.host:e.m,l=t&&t.u||S,r=e.u||S;for(const t of B(Object.keys(l)))t in r||H(o,t,l[t],void 0,n,e.o);for(const t of B(Object.keys(r)))H(o,t,l[t],r[t],n,e.o)};function B(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var I=!1,J=(t,e,n)=>{const o=e.h[n];let l,r,s=0;if(null!==o.i)l=o.m=a.createTextNode(o.i);else{if(I||(I="svg"===o.p),l=o.m=a.createElementNS(I?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.p),I&&"foreignObject"===o.p&&(I=!1),z(null,o,I),null!=M&&l["s-si"]!==M&&l.classList.add(l["s-si"]=M),o.h)for(s=0;s<o.h.length;++s)r=J(t,o,s),r&&l.appendChild(r);"svg"===o.p?I=!1:"foreignObject"===l.tagName&&(I=!0)}return l["s-hn"]=x,l},K=(t,e,n,o,l,r)=>{let s,i=t;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);l<=r;++l)o[l]&&(s=J(null,n,l),s&&(o[l].m=s,tt(i,s,e)))},Q=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.m;Z(e),t&&t.remove()}}},X=(t,e)=>t.p===e.p,Y=(t,e,n=!1)=>{const o=e.m=t.m,l=t.h,r=e.h,s=e.p,i=e.i;null===i?(z(t,e,I="svg"===s||"foreignObject"!==s&&I),null!==l&&null!==r?((t,e,n,o,l=!1)=>{let r,s=0,i=0,c=e.length-1,u=e[0],a=e[c],f=o.length-1,h=o[0],p=o[f];for(;s<=c&&i<=f;)null==u?u=e[++s]:null==a?a=e[--c]:null==h?h=o[++i]:null==p?p=o[--f]:X(u,h)?(Y(u,h,l),u=e[++s],h=o[++i]):X(a,p)?(Y(a,p,l),a=e[--c],p=o[--f]):X(u,p)?(Y(u,p,l),tt(t,u.m,a.m.nextSibling),u=e[++s],p=o[--f]):X(a,h)?(Y(a,h,l),tt(t,a.m,u.m),a=e[--c],h=o[++i]):(r=J(e&&e[i],n,i),h=o[++i],r&&tt(u.m.parentNode,r,u.m));s>c?K(t,null==o[f+1]?null:o[f+1].m,n,o,i,f):i>f&&Q(e,s,c)})(o,l,e,r,n):null!==r?(null!==t.i&&(o.textContent=""),K(o,null,e,r,0,r.length-1)):null!==l&&Q(l,0,l.length-1),I&&"svg"===s&&(I=!1)):t.i!==i&&(o.data=i)},Z=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(Z)},tt=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),et=(t,e)=>{e&&!t.j&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.j=e)))},nt=(t,e)=>{if(t.o|=16,!(4&t.o))return et(t,t.O),g((()=>ot(t,e)));t.o|=512},ot=(t,e)=>{const n=t.t;if(!n)throw Error(`Can't render component <${t.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return e&&(t.o|=256,t.k&&(t.k.map((([t,e])=>at(n,t,e))),t.k=void 0),o=at(n,"componentWillLoad")),lt(o,(()=>st(t,n,e)))},lt=(t,e)=>rt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),rt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,st=async(t,e,n)=>{var o;const l=t.$hostElement$,r=l["s-rc"];n&&(t=>{const e=t.C,n=t.$hostElement$,o=e.o,l=((t,e)=>{var n;const o=D(e),l=i.get(o);if(t=11===t.nodeType?t:a,l)if("string"==typeof l){let r,s=W.get(t=t.head||t);if(s||W.set(t,s=new Set),!s.has(o)){{r=a.createElement("style"),r.innerHTML=l;const e=null!=(n=f.M)?n:O(a);null!=e&&r.setAttribute("nonce",e),t.insertBefore(r,t.querySelector("link"))}4&e.o&&(r.innerHTML+=c),s&&s.add(o)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);it(t,e,l,n),r&&(r.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>ct(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},it=(t,e,n,o)=>{try{e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.C,r=t.P||T(null,null),s=(t=>t&&t.p===A)(e)?e:R(null,null,e);if(x=o.tagName,l.L&&(s.u=s.u||{},l.L.map((([t,e])=>s.u[e]=o[t]))),n&&s.u)for(const t of Object.keys(s.u))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.u[t]=o[t]);s.p=null,s.o|=4,t.P=s,s.m=r.m=o.shadowRoot||o,M=o["s-sc"],Y(r,s,n)})(t,e,o)}catch(e){r(e,t.$hostElement$)}return null},ct=t=>{const e=t.$hostElement$,n=t.t,o=t.O;64&t.o||(t.o|=64,ft(e),at(n,"componentDidLoad"),t.R(e),o||ut()),t.j&&(t.j(),t.j=void 0),512&t.o&&b((()=>nt(t,!1))),t.o&=-517},ut=()=>{ft(a.documentElement),b((()=>(t=>{const e=f.ce("appload",{detail:{namespace:"general-stories"}});return t.dispatchEvent(e),e})(u)))},at=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){r(t)}},ft=t=>t.classList.add("hydrated"),ht=(t,e,o)=>{var l,s;const i=t.prototype;if(e.T||e.A||t.watchers){t.watchers&&!e.A&&(e.A=t.watchers);const c=Object.entries(null!=(l=e.T)?l:{});if(c.map((([t,[l]])=>{(31&l||2&o&&32&l)&&Object.defineProperty(i,t,{get(){return((t,e)=>n(this).F.get(e))(0,t)},set(o){((t,e,o,l)=>{const s=n(t);if(!s)throw Error(`Couldn't find host element for "${l.S}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=s.$hostElement$,c=s.F.get(e),u=s.o,a=s.t;if(o=((t,e)=>null==t||j(t)?t:2&e?parseFloat(t):1&e?t+"":t)(o,l.T[e][0]),(!(8&u)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(s.F.set(e,o),a)){if(l.A&&128&u){const t=l.A[e];t&&t.map((t=>{try{a[t](o,c,e)}catch(t){r(t,i)}}))}2==(18&u)&&nt(s,!1)}})(this,t,o,e)},configurable:!0,enumerable:!0})})),1&o){const o=new Map;i.attributeChangedCallback=function(t,l,r){f.jmp((()=>{var s;const c=o.get(t);if(this.hasOwnProperty(c))r=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==r)return;if(null==c){const o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&r!==l){const n=o.t,i=null==(s=e.A)?void 0:s[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,r,l,t)}))}return}}this[c]=(null!==r||"boolean"!=typeof this[c])&&r}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.A)?s:{}),...c.filter((([t,e])=>15&e[0])).map((([t,n])=>{var l;const r=n[1]||t;return o.set(r,t),512&n[0]&&(null==(l=e.L)||l.push([t,r])),r}))]))}}return t},pt=t=>{at(t,"disconnectedCallback")},dt=(t,o={})=>{var l;const h=[],d=o.exclude||[],m=u.customElements,v=a.head,y=v.querySelector("meta[charset]"),w=a.createElement("style"),$=[];let b,g=!0;Object.assign(f,o),f.l=new URL(o.resourcesUrl||"./",a.baseURI).href;let S=!1;if(t.map((t=>{t[1].map((o=>{var l;const c={o:o[0],S:o[1],T:o[2],N:o[3]};4&c.o&&(S=!0),c.T=o[2],c.N=o[3],c.L=[],c.A=null!=(l=o[4])?l:{};const u=c.S,a=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const o={o:0,$hostElement$:t,C:n,F:new Map};o.U=new Promise((t=>o.R=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,o)})(t=this,c),1&c.o)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.S}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){const t=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,mt(this,t,c.N)),b&&(clearTimeout(b),b=null),g?$.push(this):f.jmp((()=>(t=>{if(!(1&f.o)){const e=n(t),o=e.C,l=()=>{};if(1&e.o)mt(t,e,o.N),(null==e?void 0:e.t)||(null==e?void 0:e.U)&&e.U.then((()=>{}));else{e.o|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){et(e,e.O=n);break}}o.T&&Object.entries(o.T).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.o)){if(e.o|=32,n.W){const t=(t=>{const e=t.S.replace(/-/g,"_"),n=t.W;if(!n)return;const o=s.get(n);return o?o[e]:import(`./${n}.entry.js`).then((t=>(s.set(n,t),t[e])),r)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(t&&"then"in t){const e=()=>{};o=await t,e()}else o=t;if(!o)throw Error(`Constructor for "${n.S}#${e.D}" was not found`);o.isProxied||(n.A=o.watchers,ht(o,n,2),o.isProxied=!0);const l=()=>{};e.o|=8;try{new o(e)}catch(t){r(t)}e.o&=-9,e.o|=128,l()}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.o|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=D(n);if(!i.has(e)){const o=()=>{};((t,e,n)=>{let o=i.get(t);p&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,i.set(t,o)})(e,t,!!(1&n.o)),o()}}}const l=e.O,c=()=>nt(e,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(t,e,o)}l()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.o)){const t=n(this);t.H&&(t.H.map((t=>t())),t.H=void 0),(null==t?void 0:t.t)?pt(t.t):(null==t?void 0:t.U)&&t.U.then((()=>pt(t.t)))}})()))}componentOnReady(){return n(this).U}};c.W=t[0],d.includes(u)||m.get(u)||(h.push(u),m.define(u,ht(a,c,1)))}))})),h.length>0&&(S&&(w.textContent+=c),w.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",w.innerHTML.length)){w.setAttribute("data-styles","");const t=null!=(l=f.M)?l:O(a);null!=t&&w.setAttribute("nonce",t),v.insertBefore(w,y?y.nextSibling:v.firstChild)}g=!1,$.length?$.map((t=>t.connectedCallback())):f.jmp((()=>b=setTimeout(ut,30)))},mt=(t,e,n)=>{n&&n.map((([n,o,l])=>{const r=t,s=vt(e,l),i=yt(n);f.ael(r,o,s,i),(e.H=e.H||[]).push((()=>f.rel(r,o,s,i)))}))},vt=(t,e)=>n=>{var o;try{256&t.o?null==(o=t.t)||o[e](n):(t.k=t.k||[]).push([e,n])}catch(t){r(t)}},yt=t=>({passive:!!(1&t),capture:!!(2&t)}),wt=t=>f.M=t;export{dt as b,R as h,h as p,o as r,wt as s}
@@ -0,0 +1 @@
1
+ export{G as general_stories}from"./p-34426db6.js";import"./p-c85b316a.js";
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;