@everymatrix/general-tutorial-slider 1.52.6 → 1.53.10

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.
@@ -1,17 +1,25 @@
1
1
  const NAMESPACE = 'general-tutorial-slider';
2
- const BUILD = /* general-tutorial-slider */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, 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: true, 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: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
2
+ const BUILD = /* general-tutorial-slider */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, 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: true, 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: false, 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.22.3 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Platform v4.25.1 | 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
12
18
  var hostRefs = /* @__PURE__ */ new WeakMap();
13
19
  var getHostRef = (ref) => hostRefs.get(ref);
14
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
20
+ var registerInstance = (lazyInstance, hostRef) => {
21
+ hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
22
+ };
15
23
  var registerHost = (hostElement, cmpMeta) => {
16
24
  const hostRef = {
17
25
  $flags$: 0,
@@ -24,7 +32,8 @@ var registerHost = (hostElement, cmpMeta) => {
24
32
  hostElement["s-p"] = [];
25
33
  hostElement["s-rc"] = [];
26
34
  }
27
- return hostRefs.set(hostElement, hostRef);
35
+ const ref = hostRefs.set(hostElement, hostRef);
36
+ return ref;
28
37
  };
29
38
  var isMemberInElement = (elm, memberName) => memberName in elm;
30
39
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -61,16 +70,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
61
70
  /* webpackExclude: /\.system\.entry\.js$/ */
62
71
  /* webpackMode: "lazy" */
63
72
  `./${bundleId}.entry.js${""}`
64
- ).then((importedModule) => {
65
- {
66
- cmpModules.set(bundleId, importedModule);
73
+ ).then(
74
+ (importedModule) => {
75
+ {
76
+ cmpModules.set(bundleId, importedModule);
77
+ }
78
+ return importedModule[exportName];
79
+ },
80
+ (e) => {
81
+ consoleError(e, hostRef.$hostElement$);
67
82
  }
68
- return importedModule[exportName];
69
- }, consoleError);
83
+ );
70
84
  };
71
85
 
72
86
  // src/client/client-style.ts
73
87
  var styles = /* @__PURE__ */ new Map();
88
+ var HYDRATED_STYLE_ID = "sty-id";
74
89
  var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
75
90
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
76
91
  var win = typeof window !== "undefined" ? window : {};
@@ -128,14 +143,6 @@ var flush = () => {
128
143
  };
129
144
  var nextTick = (cb) => promiseResolve().then(cb);
130
145
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
131
-
132
- // src/utils/constants.ts
133
- var EMPTY_OBJ = {};
134
- var SVG_NS = "http://www.w3.org/2000/svg";
135
- var HTML_NS = "http://www.w3.org/1999/xhtml";
136
-
137
- // src/utils/helpers.ts
138
- var isDef = (v) => v != null;
139
146
  var isComplexType = (o) => {
140
147
  o = typeof o;
141
148
  return o === "object" || o === "function";
@@ -314,7 +321,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
314
321
  }
315
322
  if (!appliedStyles.has(scopeId2)) {
316
323
  {
317
- styleElm = doc.createElement("style");
324
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
318
325
  styleElm.innerHTML = style;
319
326
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
320
327
  if (nonce != null) {
@@ -324,7 +331,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
324
331
  if (styleContainerNode.nodeName === "HEAD") {
325
332
  const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
326
333
  const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
327
- styleContainerNode.insertBefore(styleElm, referenceNode2);
334
+ styleContainerNode.insertBefore(
335
+ styleElm,
336
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
337
+ );
328
338
  } else if ("host" in styleContainerNode) {
329
339
  if (supportsConstructableStylesheets) {
330
340
  const stylesheet = new CSSStyleSheet();
@@ -374,16 +384,18 @@ var attachStyles = (hostRef) => {
374
384
  endAttachStyles();
375
385
  };
376
386
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
377
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
387
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
378
388
  if (oldValue !== newValue) {
379
389
  let isProp = isMemberInElement(elm, memberName);
380
390
  let ln = memberName.toLowerCase();
381
391
  if (memberName === "class") {
382
392
  const classList = elm.classList;
383
393
  const oldClasses = parseClassList(oldValue);
384
- const newClasses = parseClassList(newValue);
385
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
386
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
394
+ let newClasses = parseClassList(newValue);
395
+ {
396
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
397
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
398
+ }
387
399
  } else if (memberName === "style") {
388
400
  {
389
401
  for (const prop in oldValue) {
@@ -442,7 +454,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
442
454
  elm.setAttribute(memberName, n);
443
455
  }
444
456
  }
445
- } else {
457
+ } else if (elm[memberName] !== newValue) {
446
458
  elm[memberName] = newValue;
447
459
  }
448
460
  } catch (e) {
@@ -464,24 +476,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
464
476
  }
465
477
  };
466
478
  var parseClassListRegex = /\s/;
467
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
479
+ var parseClassList = (value) => {
480
+ if (typeof value === "object" && value && "baseVal" in value) {
481
+ value = value.baseVal;
482
+ }
483
+ if (!value || typeof value !== "string") {
484
+ return [];
485
+ }
486
+ return value.split(parseClassListRegex);
487
+ };
468
488
  var CAPTURE_EVENT_SUFFIX = "Capture";
469
489
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
470
490
 
471
491
  // src/runtime/vdom/update-element.ts
472
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
492
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
473
493
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
474
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
475
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
494
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
495
+ const newVnodeAttrs = newVnode.$attrs$ || {};
476
496
  {
477
497
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
478
498
  if (!(memberName in newVnodeAttrs)) {
479
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
499
+ setAccessor(
500
+ elm,
501
+ memberName,
502
+ oldVnodeAttrs[memberName],
503
+ void 0,
504
+ isSvgMode2,
505
+ newVnode.$flags$);
480
506
  }
481
507
  }
482
508
  }
483
509
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
484
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
510
+ setAccessor(
511
+ elm,
512
+ memberName,
513
+ oldVnodeAttrs[memberName],
514
+ newVnodeAttrs[memberName],
515
+ isSvgMode2,
516
+ newVnode.$flags$);
485
517
  }
486
518
  };
487
519
  function sortedAttrNames(attrNames) {
@@ -493,13 +525,10 @@ function sortedAttrNames(attrNames) {
493
525
  attrNames
494
526
  );
495
527
  }
496
-
497
- // src/runtime/vdom/vdom-render.ts
498
- var scopeId;
499
528
  var hostTagName;
500
529
  var useNativeShadowDom = false;
501
530
  var isSvgMode = false;
502
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
531
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
503
532
  const newVNode2 = newParentVNode.$children$[childIndex];
504
533
  let i2 = 0;
505
534
  let elm;
@@ -520,11 +549,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
520
549
  {
521
550
  updateElement(null, newVNode2, isSvgMode);
522
551
  }
523
- const rootNode = elm.getRootNode();
524
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
525
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
526
- elm.classList.add(elm["s-si"] = scopeId);
527
- }
528
552
  if (newVNode2.$children$) {
529
553
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
530
554
  childNode = createElm(oldParentVNode, newVNode2, i2);
@@ -636,6 +660,9 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
636
660
  };
637
661
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
638
662
  if (leftVNode.$tag$ === rightVNode.$tag$) {
663
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
664
+ leftVNode.$key$ = rightVNode.$key$;
665
+ }
639
666
  return true;
640
667
  }
641
668
  return false;
@@ -682,8 +709,9 @@ var nullifyVNodeRefs = (vNode) => {
682
709
  }
683
710
  };
684
711
  var insertBefore = (parent, newNode, reference) => {
685
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
686
- return inserted;
712
+ {
713
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
714
+ }
687
715
  };
688
716
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
689
717
  const hostElm = hostRef.$hostElement$;
@@ -708,9 +736,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
708
736
  rootVnode.$flags$ |= 4 /* isHost */;
709
737
  hostRef.$vnode$ = rootVnode;
710
738
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
711
- {
712
- scopeId = hostElm["s-sc"];
713
- }
714
739
  useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
715
740
  patch(oldVNode, rootVnode, isInitialLoad);
716
741
  };
@@ -718,7 +743,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
718
743
  // src/runtime/update-component.ts
719
744
  var attachToAncestor = (hostRef, ancestorComponent) => {
720
745
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
721
- ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
746
+ const index = ancestorComponent["s-p"].push(
747
+ new Promise(
748
+ (r) => hostRef.$onRenderResolve$ = () => {
749
+ ancestorComponent["s-p"].splice(index - 1, 1);
750
+ r();
751
+ }
752
+ )
753
+ );
722
754
  }
723
755
  };
724
756
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -745,7 +777,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
745
777
  let maybePromise;
746
778
  if (isInitialLoad) {
747
779
  {
748
- maybePromise = safeCall(instance, "componentWillLoad");
780
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
749
781
  }
750
782
  }
751
783
  endSchedule();
@@ -814,7 +846,7 @@ var postUpdateComponent = (hostRef) => {
814
846
  const instance = hostRef.$lazyInstance$ ;
815
847
  const ancestorComponent = hostRef.$ancestorComponent$;
816
848
  {
817
- safeCall(instance, "componentDidRender");
849
+ safeCall(instance, "componentDidRender", void 0, elm);
818
850
  }
819
851
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
820
852
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
@@ -822,7 +854,7 @@ var postUpdateComponent = (hostRef) => {
822
854
  addHydratedFlag(elm);
823
855
  }
824
856
  {
825
- safeCall(instance, "componentDidLoad");
857
+ safeCall(instance, "componentDidLoad", void 0, elm);
826
858
  }
827
859
  endPostUpdate();
828
860
  {
@@ -833,7 +865,7 @@ var postUpdateComponent = (hostRef) => {
833
865
  }
834
866
  } else {
835
867
  {
836
- safeCall(instance, "componentDidUpdate");
868
+ safeCall(instance, "componentDidUpdate", void 0, elm);
837
869
  }
838
870
  endPostUpdate();
839
871
  }
@@ -854,12 +886,12 @@ var appDidLoad = (who) => {
854
886
  }
855
887
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
856
888
  };
857
- var safeCall = (instance, method, arg) => {
889
+ var safeCall = (instance, method, arg, elm) => {
858
890
  if (instance && instance[method]) {
859
891
  try {
860
892
  return instance[method](arg);
861
893
  } catch (e) {
862
- consoleError(e);
894
+ consoleError(e, elm);
863
895
  }
864
896
  }
865
897
  return void 0;
@@ -918,15 +950,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
918
950
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
919
951
  members.map(([memberName, [memberFlags]]) => {
920
952
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
953
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
954
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
955
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
956
+ if (flags & 1 /* isElementConstructor */ || !origGetter) {
957
+ Object.defineProperty(prototype, memberName, {
958
+ get() {
959
+ {
960
+ if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
961
+ return getValue(this, memberName);
962
+ }
963
+ const ref = getHostRef(this);
964
+ const instance = ref ? ref.$lazyInstance$ : prototype;
965
+ if (!instance) return;
966
+ return instance[memberName];
967
+ }
968
+ },
969
+ configurable: true,
970
+ enumerable: true
971
+ });
972
+ }
921
973
  Object.defineProperty(prototype, memberName, {
922
- get() {
923
- return getValue(this, memberName);
924
- },
925
974
  set(newValue) {
926
- setValue(this, memberName, newValue, cmpMeta);
927
- },
928
- configurable: true,
929
- enumerable: true
975
+ const ref = getHostRef(this);
976
+ if (origSetter) {
977
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
978
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
979
+ newValue = ref.$instanceValues$.get(memberName);
980
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
981
+ ref.$instanceValues$.set(memberName, currentValue);
982
+ }
983
+ origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
984
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
985
+ setValue(this, memberName, newValue, cmpMeta);
986
+ return;
987
+ }
988
+ {
989
+ if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
990
+ setValue(this, memberName, newValue, cmpMeta);
991
+ if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
992
+ ref.$onReadyPromise$.then(() => {
993
+ if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
994
+ ref.$lazyInstance$[memberName] = newValue;
995
+ }
996
+ });
997
+ }
998
+ return;
999
+ }
1000
+ const setterSetVal = () => {
1001
+ const currentValue = ref.$lazyInstance$[memberName];
1002
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
1003
+ ref.$instanceValues$.set(memberName, currentValue);
1004
+ }
1005
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
1006
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1007
+ };
1008
+ if (ref.$lazyInstance$) {
1009
+ setterSetVal();
1010
+ } else {
1011
+ ref.$onReadyPromise$.then(() => setterSetVal());
1012
+ }
1013
+ }
1014
+ }
930
1015
  });
931
1016
  }
932
1017
  });
@@ -936,7 +1021,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
936
1021
  plt.jmp(() => {
937
1022
  var _a2;
938
1023
  const propName = attrNameToPropName.get(attrName);
939
- if (this.hasOwnProperty(propName)) {
1024
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
940
1025
  newValue = this[propName];
941
1026
  delete this[propName];
942
1027
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -956,7 +1041,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
956
1041
  }
957
1042
  return;
958
1043
  }
959
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1044
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1045
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1046
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
1047
+ this[propName] = newValue;
1048
+ }
960
1049
  });
961
1050
  };
962
1051
  Cstr.observedAttributes = Array.from(
@@ -983,9 +1072,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
983
1072
  let Cstr;
984
1073
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
985
1074
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
986
- const bundleId = cmpMeta.$lazyBundleId$;
987
- if (bundleId) {
988
- const CstrImport = loadModule(cmpMeta);
1075
+ {
1076
+ const CstrImport = loadModule(cmpMeta, hostRef);
989
1077
  if (CstrImport && "then" in CstrImport) {
990
1078
  const endLoad = uniqueTime();
991
1079
  Cstr = await CstrImport;
@@ -1010,7 +1098,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1010
1098
  try {
1011
1099
  new Cstr(hostRef);
1012
1100
  } catch (e) {
1013
- consoleError(e);
1101
+ consoleError(e, elm);
1014
1102
  }
1015
1103
  {
1016
1104
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
@@ -1019,11 +1107,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1019
1107
  hostRef.$flags$ |= 128 /* isWatchReady */;
1020
1108
  }
1021
1109
  endNewInstance();
1022
- fireConnectedCallback(hostRef.$lazyInstance$);
1023
- } else {
1024
- Cstr = elm.constructor;
1025
- const cmpTag = elm.localName;
1026
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1110
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1027
1111
  }
1028
1112
  if (Cstr && Cstr.style) {
1029
1113
  let style;
@@ -1046,9 +1130,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1046
1130
  schedule();
1047
1131
  }
1048
1132
  };
1049
- var fireConnectedCallback = (instance) => {
1133
+ var fireConnectedCallback = (instance, elm) => {
1050
1134
  {
1051
- safeCall(instance, "connectedCallback");
1135
+ safeCall(instance, "connectedCallback", void 0, elm);
1052
1136
  }
1053
1137
  };
1054
1138
 
@@ -1083,28 +1167,34 @@ var connectedCallback = (elm) => {
1083
1167
  }
1084
1168
  } else {
1085
1169
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1086
- fireConnectedCallback(hostRef.$lazyInstance$);
1170
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1087
1171
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1088
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
1172
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1089
1173
  }
1090
1174
  }
1091
1175
  endConnected();
1092
1176
  }
1093
1177
  };
1094
- var disconnectInstance = (instance) => {
1178
+ var disconnectInstance = (instance, elm) => {
1095
1179
  {
1096
- safeCall(instance, "disconnectedCallback");
1180
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1097
1181
  }
1098
1182
  };
1099
1183
  var disconnectedCallback = async (elm) => {
1100
1184
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1101
1185
  const hostRef = getHostRef(elm);
1102
1186
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1103
- disconnectInstance(hostRef.$lazyInstance$);
1187
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1104
1188
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1105
- hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1189
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1106
1190
  }
1107
1191
  }
1192
+ if (rootAppliedStyles.has(elm)) {
1193
+ rootAppliedStyles.delete(elm);
1194
+ }
1195
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1196
+ rootAppliedStyles.delete(elm.shadowRoot);
1197
+ }
1108
1198
  };
1109
1199
 
1110
1200
  // src/runtime/bootstrap-lazy.ts
@@ -1185,6 +1275,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1185
1275
  }
1186
1276
  disconnectedCallback() {
1187
1277
  plt.jmp(() => disconnectedCallback(this));
1278
+ plt.raf(() => {
1279
+ var _a3;
1280
+ const hostRef = getHostRef(this);
1281
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1282
+ delete hostRef.$vnode$.$elm$;
1283
+ }
1284
+ });
1188
1285
  }
1189
1286
  componentOnReady() {
1190
1287
  return getHostRef(this).$onReadyPromise$;
@@ -1,5 +1,5 @@
1
- import { b as bootstrapLazy } from './index-8f6f886a.js';
2
- export { s as setNonce } from './index-8f6f886a.js';
1
+ import { b as bootstrapLazy } from './index-00ddeeaf.js';
2
+ export { s as setNonce } from './index-00ddeeaf.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 e,b as r}from"./p-f4302c55.js";export{s as setNonce}from"./p-f4302c55.js";import{g as l}from"./p-e1255160.js";(()=>{const s=import.meta.url,r={};return""!==s&&(r.resourcesUrl=new URL(".",s).href),e(r)})().then((async e=>(await l(),r([["p-61e877f0",[[1,"general-tutorial-slider",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[513],cmsEndpoint:[513,"cms-endpoint"],userRoles:[513,"user-roles"],cmsEnv:[513,"cms-env"],showSliderDots:[516,"show-slider-dots"],showSliderArrows:[516,"show-slider-arrows"],showSliderArrowsMobile:[516,"show-slider-arrows-mobile"],enableAutoScroll:[516,"enable-auto-scroll"],intervalPeriod:[514,"interval-period"],scrollItems:[520,"scroll-items"],itemsPerPage:[514,"items-per-page"],hasErrors:[32],limitStylingAppends:[32],isLoading:[32],activeIndex:[32],tutorialElementWidth:[32]},null,{cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"]}]]]],e))));
1
+ import{p as e,b as r}from"./p-918875e2.js";export{s as setNonce}from"./p-918875e2.js";import{g as l}from"./p-e1255160.js";(()=>{const s=import.meta.url,r={};return""!==s&&(r.resourcesUrl=new URL(".",s).href),e(r)})().then((async e=>(await l(),r([["p-598d4c9d",[[1,"general-tutorial-slider",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[513],cmsEndpoint:[513,"cms-endpoint"],userRoles:[513,"user-roles"],cmsEnv:[513,"cms-env"],showSliderDots:[516,"show-slider-dots"],showSliderArrows:[516,"show-slider-arrows"],showSliderArrowsMobile:[516,"show-slider-arrows-mobile"],enableAutoScroll:[516,"enable-auto-scroll"],intervalPeriod:[514,"interval-period"],scrollItems:[520,"scroll-items"],itemsPerPage:[514,"items-per-page"],hasErrors:[32],limitStylingAppends:[32],isLoading:[32],activeIndex:[32],tutorialElementWidth:[32]},null,{cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"]}]]]],e))));
@@ -0,0 +1 @@
1
+ import{r as t,h as i,g as n}from"./p-918875e2.js";const e={en:{error:"Error",noResults:"Loading, please wait ..."},hu:{error:"Error",noResults:"Loading, please wait ..."},ro:{error:"Eroare",noResults:"Loading, please wait ..."},fr:{error:"Error",noResults:"Loading, please wait ..."},ar:{error:"خطأ",noResults:"Loading, please wait ..."},hr:{error:"Greška",noResults:"Učitavanje, molimo pričekajte ..."},"es-mx":{error:"Error",noResults:"Cargando, espere por favor…"},"pt-br":{error:"Erro",noResults:"Carregando, espere por favor…"}},o=class{constructor(i){var n;t(this,i),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.userRoles="everyone",this.cmsEnv="stage",this.showSliderDots=!0,this.showSliderArrows=!0,this.showSliderArrowsMobile=!1,this.enableAutoScroll=!1,this.intervalPeriod=5e3,this.scrollItems=1,this.itemsPerPage=1,this.hasErrors=!1,this.limitStylingAppends=!1,this.isLoading=!0,this.activeIndex=0,this.tutorialElementWidth=0,this.userAgent=window.navigator.userAgent,this.isMobile=!!((n=this.userAgent).toLowerCase().match(/android/i)||n.toLowerCase().match(/blackberry|bb/i)||n.toLowerCase().match(/iphone|ipad|ipod/i)||n.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.allElementsWidth=0,this.xDown=null,this.yDown=null,this.resizeHandler=()=>{this.recalculateItemsPerPage()},this.orientationChangeHandler=()=>{setTimeout((()=>{this.recalculateItemsPerPage()}),10)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{i.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(i)}),1)})).catch((t=>{console.log("error ",t)}))}}watchEndpoint(t,i){t&&t!=i&&this.cmsEndpoint&&this.getGeneralTutorialSlider().then((t=>{this.tutorialData=t}))}connectedCallback(){window.screen.orientation.addEventListener("change",this.orientationChangeHandler)}componentWillLoad(){if(this.cmsEndpoint&&this.language)return this.getGeneralTutorialSlider().then((t=>{this.tutorialData=t}))}componentDidLoad(){window.addEventListener("resize",this.resizeHandler)}componentDidRender(){this.el.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!0}),this.el.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!0}),this.recalculateItemsPerPage(),!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}componentDidUpdate(){this.recalculateItemsPerPage()}disconnectedCallback(){this.el.removeEventListener("touchstart",this.handleTouchStart),this.el.removeEventListener("touchmove",this.handleTouchMove),window.screen.orientation.removeEventListener("change",this.orientationChangeHandler),window.removeEventListener("resize",this.resizeHandler)}getGeneralTutorialSlider(){let t=new URL(`${this.cmsEndpoint}/${this.language}/slider-onboarding`);return t.searchParams.append("env",this.cmsEnv),t.searchParams.append("userRoles",this.userRoles),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":"iPad"===t||"iPhone"===t?"ios":"mtWeb"})()),new Promise(((i,n)=>{this.isLoading=!0,fetch(t.href).then((t=>t.json())).then((t=>{i(t)})).catch((t=>{console.error(t),this.hasErrors=!0,n(t)})).finally((()=>{this.isLoading=!1}))}))}move(t){this.setActive(this.activeIndex+t)}recalculateItemsPerPage(){this.tutorialsElement&&(this.tutorialElementWidth=this.tutorialsElement.clientWidth,this.allElementsWidth=(this.tutorialData.length-1)*this.tutorialElementWidth)}goTo(t){let i=this.activeIndex-t;if(i>0)for(let t=0;t<i;t++)this.move(-1);else for(let t=0;t>i;t--)this.move(1)}handleTouchStart(t){const i=this.getTouches(t)[0];this.xDown=i.clientX,this.yDown=i.clientY}getTouches(t){return t.touches||t.originalEvent.touches}handleTouchMove(t){if(!this.xDown||!this.yDown)return;let i=this.xDown-t.touches[0].clientX,n=this.yDown-t.touches[0].clientY;Math.abs(i)>Math.abs(n)&&this.move(i>0?1:-1),this.xDown=null,this.yDown=null}setActive(t){const i=this.tutorialData.length;this.activeIndex=t>=0?t>=i-1?i-1:t:0}renderDots(){const t=[];for(let n=0;n<this.tutorialData.length/this.itemsPerPage;n++)t.push(i("li",{class:n==this.activeIndex?"active":"default",onClick:()=>{this.goTo(n),this.setActive(n)}}));return t}render(){const t={transform:`translate(${this.allElementsWidth/(this.tutorialData.length-1)*this.activeIndex*-1}px, 0px)`},n={width:this.tutorialElementWidth/this.itemsPerPage+"px"};return this.hasErrors?i("div",{class:"GeneralTutorialSliderError"},i("div",{class:"TitleError"},e[void 0!==(o=this.language)&&o in e?o:"en"].error)):this.isLoading?void 0:i("div",{ref:t=>this.stylingContainer=t},i("div",{class:"TutorialWrapper"},i("div",{class:"TutorialContent",ref:t=>this.slider=t},(this.showSliderArrows&&!this.isMobile||this.showSliderArrowsMobile&&this.isMobile)&&i("div",{class:0===this.activeIndex?"SliderNavButton DisabledArrow":"SliderNavButton",onClick:()=>this.move(-1)},i("svg",{fill:"none",stroke:"var(--emw--color-secondary, #FD2839)",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"}))),i("main",null,i("div",{style:t,ref:t=>this.tutorialsElement=t,class:"TutorialItems"},this.tutorialData.map((t=>{var e,o,s,r,l,a,d,h,u,c,p,v,m,w,g,f,x,I;return i("div",{class:"TutorialItem",style:n},i("div",{class:"ItemTitle",innerHTML:null==t?void 0:t.title}),(null===(e=null==t?void 0:t.media)||void 0===e?void 0:e.images)?i("div",{class:"ItemImage"},i("img",this.isMobile?{src:null===(l=null===(r=null===(s=null===(o=null==t?void 0:t.media)||void 0===o?void 0:o.images[0])||void 0===s?void 0:s.sources)||void 0===r?void 0:r.find((t=>"mobile"===t.media)))||void 0===l?void 0:l.src,alt:null==t?void 0:t.slug}:{src:null===(u=null===(h=null===(d=null===(a=null==t?void 0:t.media)||void 0===a?void 0:a.images[0])||void 0===d?void 0:d.sources)||void 0===h?void 0:h.find((t=>"desktop"===t.media)))||void 0===u?void 0:u.src,alt:null==t?void 0:t.slug})):(null===(c=null==t?void 0:t.media)||void 0===c?void 0:c.video)?i("div",{class:"ItemImage"},i("video",{controls:!0,loop:!0,autoplay:!0},i("source",this.isMobile?{src:null===(w=null===(m=null===(v=null===(p=null==t?void 0:t.media)||void 0===p?void 0:p.video[0])||void 0===v?void 0:v.sources)||void 0===m?void 0:m.find((t=>"mobile"===t.media)))||void 0===w?void 0:w.src,type:"video/mp4"}:{src:null===(I=null===(x=null===(f=null===(g=null==t?void 0:t.media)||void 0===g?void 0:g.video[0])||void 0===f?void 0:f.sources)||void 0===x?void 0:x.find((t=>"desktop"===t.media)))||void 0===I?void 0:I.src,type:"video/mp4"}))):null,i("div",{class:"ItemDescription",innerHTML:null==t?void 0:t.content}))})))),(this.showSliderArrows&&!this.isMobile||this.showSliderArrowsMobile&&this.isMobile)&&i("div",{class:this.activeIndex===this.tutorialData.length-1?" SliderNavButton DisabledArrow disabled":"SliderNavButton",onClick:()=>this.move(1)},i("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"}))),i("div",null)),this.showSliderDots&&i("div",{class:"DotsWrapper"},i("ul",{class:"Dots"},this.renderDots()))));var o}get el(){return n(this)}static get watchers(){return{cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"]}}};o.style=":host {\n display: block;\n}\n\n.GeneralTutorialSliderError {\n display: flex;\n justify-content: center;\n flex-direction: column;\n}\n.GeneralTutorialSliderError.TitleError {\n color: red;\n}\n\nmain {\n width: 100%;\n overflow: hidden;\n}\n\n.TutorialWrapper {\n width: 100%;\n display: flex;\n flex: 0 0 auto;\n justify-content: center;\n flex-direction: column;\n overflow: auto;\n}\n\n.TutorialContent {\n display: flex;\n justify-content: center;\n flex-direction: row;\n}\n\n.TutorialItems {\n display: flex;\n transition: transform 0.4s ease-in-out;\n transform: translateX(0px);\n}\n\n.TutorialItem {\n flex: 0 0 auto;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n color: #000;\n background-color: #f5f5f5;\n border-radius: 5px;\n user-select: none;\n}\n.TutorialItem .ItemTitle {\n padding: 25px 15px;\n font-size: 18px;\n font-weight: 600;\n color: var(--emw--color-secondary, #FD2839);\n}\n.TutorialItem .ItemImage {\n overflow: hidden;\n}\n.TutorialItem .ItemImage img, .TutorialItem .ItemImage video {\n height: auto;\n width: 450px;\n}\n.TutorialItem .ItemDescription {\n font-size: 14px;\n padding: 25px 15px;\n font-weight: 400;\n color: #000;\n}\n\n.SliderNavButton {\n border: 0px;\n width: 25px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.SliderNavButton svg {\n width: 20px;\n stroke: var(--emw--color-secondary, #FD2839);\n}\n\n.DisabledArrow svg {\n opacity: 0.2;\n stroke: var(--emw--color-secondary, #FD2839);\n pointer-events: none;\n}\n\n.DotsWrapper {\n width: 100%;\n margin: 0 auto;\n margin-top: 20px;\n height: 30px;\n}\n.DotsWrapper ul.Dots {\n display: flex;\n justify-content: center;\n padding: 0;\n}\n.DotsWrapper ul.Dots li {\n height: 10px;\n width: 10px;\n background: #ccc;\n border-radius: 50%;\n margin-left: 3px;\n margin-right: 3px;\n list-style: none;\n cursor: pointer;\n}\n.DotsWrapper ul.Dots li:hover {\n background: #bbb;\n}\n.DotsWrapper ul.Dots li.active {\n border: solid 1px var(--emw--color-secondary, #FD2839);\n background: var(--emw--color-secondary, #FD2839);\n}\n.DotsWrapper ul.Dots li.default {\n border: solid 1px var(--emw--color-secondary, #FD2839);\n background-color: #FFF;\n}\n\n@container (max-width: 475px) {\n @media screen and (orientation: landscape) {\n .TutorialItem {\n width: 100%;\n }\n }\n main {\n height: 90cqh;\n }\n .TutorialItems {\n height: inherit;\n }\n .TutorialItem {\n min-width: 100%;\n max-height: 800px;\n overflow: auto;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n color: #000;\n background-color: #f5f5f5;\n border-radius: 5px;\n user-select: none;\n }\n .TutorialItem .ItemTitle {\n padding: 25px 15px;\n font-size: 18px;\n font-weight: 600;\n color: var(--emw--color-secondary, #FD2839);\n }\n .TutorialItem .ItemImage {\n min-height: 200px;\n }\n .TutorialItem .ItemImage img, .TutorialItem .ItemImage video {\n height: auto;\n width: 100%;\n }\n .TutorialItem .ItemDescription {\n font-size: 14px;\n padding: 25px 15px;\n font-weight: 400;\n color: #000;\n }\n}";export{o as general_tutorial_slider}
@@ -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,s=(t,e)=>(0,console.error)(t,e),i=new Map,r=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),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),p=!1,m=[],v=[],y=(t,e)=>n=>{t.push(n),p||(p=!0,e&&4&f.o?$(b):f.raf(b))},w=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},b=()=>{w(m),w(v),(p=m.length>0)&&f.raf(b)},$=t=>h().then(t),g=y(v,!0),S=t=>"object"==(t=typeof t)||"function"===t;function j(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:()=>k,map:()=>C,ok:()=>O,unwrap:()=>M,unwrapErr:()=>x});var O=t=>({isOk:!0,isErr:!1,value:t}),k=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=>O(t))):O(n)}if(t.isErr)return k(t.value);throw"should never get here"}var E,M=t=>{if(t.isOk)return t.value;throw t.value},x=t=>{if(t.isErr)return t.value;throw t.value},P=(t,e,...n)=>{let o=null,l=!1,s=!1;const i=[],r=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?r(o):null!=o&&"boolean"!=typeof o&&((l="function"!=typeof t&&!S(o))&&(o+=""),l&&s?i[i.length-1].i+=o:i.push(l?D(null,o):o),s=l)};if(r(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}const c=D(t,null);return c.u=e,i.length>0&&(c.h=i),c},D=(t,e)=>({o:0,p:t,i:e,m:null,h:null,u:null}),A={},R=(t,e)=>null==t||S(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?parseFloat(t):1&e?t+"":t,H=t=>n(t).$hostElement$,L=new WeakMap,N=t=>"sc-"+t.v,T=(t,e,n,o,s,i)=>{if(n!==o){let r=l(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,l=F(n);let s=F(o);e.remove(...l.filter((t=>t&&!s.includes(t)))),e.add(...s.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(r||"o"!==e[0]||"n"!==e[1]){const l=S(o);if((r||l&&null!==o)&&!s)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?r=!1:null!=n&&t[e]==l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&i||s)&&!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(W);e=e.replace(V,""),n&&f.rel(t,e,n,l),o&&f.ael(t,e,o,l)}}},U=/\s/,F=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(U):[]),W="Capture",V=RegExp(W+"$"),q=(t,e,n)=>{const o=11===e.m.nodeType&&e.m.host?e.m.host:e.m,l=t&&t.u||{},s=e.u||{};for(const t of G(Object.keys(l)))t in s||T(o,t,l[t],void 0,n,e.o);for(const t of G(Object.keys(s)))T(o,t,l[t],s[t],n,e.o)};function G(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var _=!1,z=(t,e,n)=>{const o=e.h[n];let l,s,i=0;if(null!==o.i)l=o.m=a.createTextNode(o.i);else{if(_||(_="svg"===o.p),l=o.m=a.createElementNS(_?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.p),_&&"foreignObject"===o.p&&(_=!1),q(null,o,_),o.h)for(i=0;i<o.h.length;++i)s=z(t,o,i),s&&l.appendChild(s);"svg"===o.p?_=!1:"foreignObject"===l.tagName&&(_=!0)}return l["s-hn"]=E,l},B=(t,e,n,o,l,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===E&&(r=r.shadowRoot);l<=s;++l)o[l]&&(i=z(null,n,l),i&&(o[l].m=i,X(r,i,e)))},I=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.m;Q(e),t&&t.remove()}}},J=(t,e,n=!1)=>t.p===e.p&&(n&&!t.$&&e.$&&(t.$=e.$),!0),K=(t,e,n=!1)=>{const o=e.m=t.m,l=t.h,s=e.h,i=e.p,r=e.i;null===r?(q(t,e,_="svg"===i||"foreignObject"!==i&&_),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i=0,r=0,c=e.length-1,u=e[0],a=e[c],f=o.length-1,h=o[0],d=o[f];for(;i<=c&&r<=f;)null==u?u=e[++i]:null==a?a=e[--c]:null==h?h=o[++r]:null==d?d=o[--f]:J(u,h,l)?(K(u,h,l),u=e[++i],h=o[++r]):J(a,d,l)?(K(a,d,l),a=e[--c],d=o[--f]):J(u,d,l)?(K(u,d,l),X(t,u.m,a.m.nextSibling),u=e[++i],d=o[--f]):J(a,h,l)?(K(a,h,l),X(t,a.m,u.m),a=e[--c],h=o[++r]):(s=z(e&&e[r],n,r),h=o[++r],s&&X(u.m.parentNode,s,u.m));i>c?B(t,null==o[f+1]?null:o[f+1].m,n,o,r,f):r>f&&I(e,i,c)})(o,l,e,s,n):null!==s?(null!==t.i&&(o.textContent=""),B(o,null,e,s,0,s.length-1)):!n&&null!==l&&I(l,0,l.length-1),_&&"svg"===i&&(_=!1)):t.i!==r&&(o.data=r)},Q=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(Q)},X=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),Y=(t,e)=>{if(e&&!t.S&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.S=()=>{e["s-p"].splice(n-1,1),o()})))}},Z=(t,e)=>{if(t.o|=16,!(4&t.o))return Y(t,t.j),g((()=>tt(t,e)));t.o|=512},tt=(t,e)=>{const n=t.$hostElement$,o=t.t;if(!o)throw Error(`Can't render component <${n.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 l;return e&&(l=rt(o,"componentWillLoad",void 0,n)),et(l,(()=>ot(t,o,e)))},et=(t,e)=>nt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),nt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,ot=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.O,n=t.$hostElement$,o=e.o,l=((t,e)=>{var n;const o=N(e),l=r.get(o);if(t=11===t.nodeType?t:a,l)if("string"==typeof l){let s,i=L.get(t=t.head||t);if(i||L.set(t,i=new Set),!i.has(o)){{s=document.querySelector(`[sty-id="${o}"]`)||a.createElement("style"),s.innerHTML=l;const i=null!=(n=f.k)?n:j(a);if(null!=i&&s.setAttribute("nonce",i),!(1&e.o))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(s,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(d){const e=new CSSStyleSheet;e.replaceSync(l),t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=l+e.innerHTML:t.prepend(s)}else t.append(s);1&e.o&&"HEAD"!==t.nodeName&&t.insertBefore(s,null)}4&e.o&&(s.innerHTML+=c),i&&i.add(o)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&2&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);lt(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>st(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},lt=(t,e,n,o)=>{try{e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.O,s=t.C||D(null,null),i=(t=>t&&t.p===A)(e)?e:P(null,null,e);if(E=o.tagName,l.M&&(i.u=i.u||{},l.M.map((([t,e])=>i.u[e]=o[t]))),n&&i.u)for(const t of Object.keys(i.u))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.u[t]=o[t]);i.p=null,i.o|=4,t.C=i,i.m=s.m=o.shadowRoot||o,K(s,i,n)})(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},st=t=>{const e=t.$hostElement$,n=t.t,o=t.j;rt(n,"componentDidRender",void 0,e),64&t.o?rt(n,"componentDidUpdate",void 0,e):(t.o|=64,ct(e),rt(n,"componentDidLoad",void 0,e),t.P(e),o||it()),t.S&&(t.S(),t.S=void 0),512&t.o&&$((()=>Z(t,!1))),t.o&=-517},it=()=>{ct(a.documentElement),$((()=>(t=>{const e=f.ce("appload",{detail:{namespace:"general-tutorial-slider"}});return t.dispatchEvent(e),e})(u)))},rt=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,o)}},ct=t=>t.classList.add("hydrated"),ut=(t,e,o,l)=>{const i=n(t);if(!i)throw Error(`Couldn't find host element for "${l.v}" 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 r=i.$hostElement$,c=i.D.get(e),u=i.o,a=i.t;if(o=R(o,l.A[e][0]),(!(8&u)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(i.D.set(e,o),a)){if(l.R&&128&u){const t=l.R[e];t&&t.map((t=>{try{a[t](o,c,e)}catch(t){s(t,r)}}))}2==(18&u)&&Z(i,!1)}},at=(t,e,o)=>{var l,s;const i=t.prototype;if(e.A||e.R||t.watchers){t.watchers&&!e.R&&(e.R=t.watchers);const r=Object.entries(null!=(l=e.A)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,t)||{};s&&(e.A[t][0]|=2048),r&&(e.A[t][0]|=4096),(1&o||!s)&&Object.defineProperty(i,t,{get(){{if(!(2048&e.A[t][0]))return((t,e)=>n(this).D.get(e))(0,t);const o=n(this),l=o?o.t:i;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(s){const i=n(this);if(r){const n=32&l?this[t]:i.$hostElement$[t];return void 0===n&&i.D.get(t)?s=i.D.get(t):!i.D.get(t)&&n&&i.D.set(t,n),r.call(this,R(s,l)),void ut(this,t,s=32&l?this[t]:i.$hostElement$[t],e)}{if(!(1&o&&4096&e.A[t][0]))return ut(this,t,s,e),void(1&o&&!i.t&&i.H.then((()=>{4096&e.A[t][0]&&i.t[t]!==i.D.get(t)&&(i.t[t]=s)})));const n=()=>{const n=i.t[t];!i.D.get(t)&&n&&i.D.set(t,n),i.t[t]=R(s,l),ut(this,t,i.t[t],e)};i.t?n():i.H.then((()=>n()))}}})}})),1&o){const o=new Map;i.attributeChangedCallback=function(t,l,s){f.jmp((()=>{var r;const c=o.get(t);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&s!==l){const n=o.t,i=null==(r=e.R)?void 0:r[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,s,l,t)}))}return}}const u=Object.getOwnPropertyDescriptor(i,c);(s=(null!==s||"boolean"!=typeof this[c])&&s)===this[c]||u.get&&!u.set||(this[c]=s)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.R)?s:{}),...r.filter((([t,e])=>15&e[0])).map((([t,n])=>{var l;const s=n[1]||t;return o.set(s,t),512&n[0]&&(null==(l=e.M)||l.push([t,s])),s}))]))}}return t},ft=(t,e)=>{rt(t,"connectedCallback",void 0,e)},ht=(t,e)=>{rt(t,"disconnectedCallback",void 0,e||t)},dt=(t,o={})=>{var l;const h=[],p=o.exclude||[],m=u.customElements,v=a.head,y=v.querySelector("meta[charset]"),w=a.createElement("style"),b=[];let $,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],v:o[1],A:o[2],L:o[3]};4&c.o&&(S=!0),c.A=o[2],c.M=[],c.R=null!=(l=o[4])?l:{};const u=c.v,a=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const o={o:0,$hostElement$:t,O:n,D:new Map};o.H=new Promise((t=>o.P=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.v}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),$&&(clearTimeout($),$=null),g?b.push(this):f.jmp((()=>(t=>{if(!(1&f.o)){const e=n(t),o=e.O,l=()=>{};if(1&e.o)(null==e?void 0:e.t)?ft(e.t,t):(null==e?void 0:e.H)&&e.H.then((()=>ft(e.t,t)));else{e.o|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){Y(e,e.j=n);break}}o.A&&Object.entries(o.A).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)){e.o|=32;{const l=((t,e)=>{const n=t.v.replace(/-/g,"_"),o=t.N;if(!o)return;const l=i.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(i.set(o,t),t[n])),(t=>{s(t,e.$hostElement$)}))
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.v}#${e.T}" was not found`);o.isProxied||(n.R=o.watchers,at(o,n,2),o.isProxied=!0);const r=()=>{};e.o|=8;try{new o(e)}catch(e){s(e,t)}e.o&=-9,e.o|=128,r(),ft(e.t,t)}if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=N(n);if(!r.has(e)){const o=()=>{};((t,e,n)=>{let o=r.get(t);d&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,r.set(t,o)})(e,t,!!(1&n.o)),o()}}}const l=e.j,c=()=>Z(e,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(t,e,o)}l()}})(this)))}disconnectedCallback(){f.jmp((()=>(async t=>{if(!(1&f.o)){const e=n(t);(null==e?void 0:e.t)?ht(e.t,t):(null==e?void 0:e.H)&&e.H.then((()=>ht(e.t,t)))}L.has(t)&&L.delete(t),t.shadowRoot&&L.has(t.shadowRoot)&&L.delete(t.shadowRoot)})(this))),f.raf((()=>{var t;const e=n(this);(null==(t=null==e?void 0:e.C)?void 0:t.m)instanceof Node&&!e.C.m.isConnected&&delete e.C.m}))}componentOnReady(){return n(this).H}};c.N=t[0],p.includes(u)||m.get(u)||(h.push(u),m.define(u,at(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.k)?l:j(a);null!=t&&w.setAttribute("nonce",t),v.insertBefore(w,y?y.nextSibling:v.firstChild)}g=!1,b.length?b.map((t=>t.connectedCallback())):f.jmp((()=>$=setTimeout(it,30)))},pt=t=>f.k=t;export{dt as b,H as g,P as h,h as p,o as r,pt as s}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/general-tutorial-slider",
3
- "version": "1.52.6",
3
+ "version": "1.53.10",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as t,h as i,g as n}from"./p-f4302c55.js";const e={en:{error:"Error",noResults:"Loading, please wait ..."},hu:{error:"Error",noResults:"Loading, please wait ..."},ro:{error:"Eroare",noResults:"Loading, please wait ..."},fr:{error:"Error",noResults:"Loading, please wait ..."},ar:{error:"خطأ",noResults:"Loading, please wait ..."},hr:{error:"Greška",noResults:"Učitavanje, molimo pričekajte ..."},"es-mx":{error:"Error",noResults:"Cargando, espere por favor…"},"pt-br":{error:"Erro",noResults:"Carregando, espere por favor…"}},o=class{constructor(i){var n;t(this,i),this.userAgent=window.navigator.userAgent,this.isMobile=!!((n=this.userAgent).toLowerCase().match(/android/i)||n.toLowerCase().match(/blackberry|bb/i)||n.toLowerCase().match(/iphone|ipad|ipod/i)||n.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.allElementsWidth=0,this.xDown=null,this.yDown=null,this.resizeHandler=()=>{this.recalculateItemsPerPage()},this.orientationChangeHandler=()=>{setTimeout((()=>{this.recalculateItemsPerPage()}),10)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{i.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(i)}),1)})).catch((t=>{console.log("error ",t)}))},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.cmsEndpoint=void 0,this.userRoles="everyone",this.cmsEnv="stage",this.showSliderDots=!0,this.showSliderArrows=!0,this.showSliderArrowsMobile=!1,this.enableAutoScroll=!1,this.intervalPeriod=5e3,this.scrollItems=1,this.itemsPerPage=1,this.hasErrors=!1,this.limitStylingAppends=!1,this.isLoading=!0,this.activeIndex=0,this.tutorialElementWidth=0}watchEndpoint(t,i){t&&t!=i&&this.cmsEndpoint&&this.getGeneralTutorialSlider().then((t=>{this.tutorialData=t}))}connectedCallback(){window.screen.orientation.addEventListener("change",this.orientationChangeHandler)}componentWillLoad(){if(this.cmsEndpoint&&this.language)return this.getGeneralTutorialSlider().then((t=>{this.tutorialData=t}))}componentDidLoad(){window.addEventListener("resize",this.resizeHandler)}componentDidRender(){this.el.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!0}),this.el.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!0}),this.recalculateItemsPerPage(),!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}componentDidUpdate(){this.recalculateItemsPerPage()}disconnectedCallback(){this.el.removeEventListener("touchstart",this.handleTouchStart),this.el.removeEventListener("touchmove",this.handleTouchMove),window.screen.orientation.removeEventListener("change",this.orientationChangeHandler),window.removeEventListener("resize",this.resizeHandler)}getGeneralTutorialSlider(){let t=new URL(`${this.cmsEndpoint}/${this.language}/slider-onboarding`);return t.searchParams.append("env",this.cmsEnv),t.searchParams.append("userRoles",this.userRoles),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":"iPad"===t||"iPhone"===t?"ios":"mtWeb"})()),new Promise(((i,n)=>{this.isLoading=!0,fetch(t.href).then((t=>t.json())).then((t=>{i(t)})).catch((t=>{console.error(t),this.hasErrors=!0,n(t)})).finally((()=>{this.isLoading=!1}))}))}move(t){this.setActive(this.activeIndex+t)}recalculateItemsPerPage(){this.tutorialsElement&&(this.tutorialElementWidth=this.tutorialsElement.clientWidth,this.allElementsWidth=(this.tutorialData.length-1)*this.tutorialElementWidth)}goTo(t){let i=this.activeIndex-t;if(i>0)for(let t=0;t<i;t++)this.move(-1);else for(let t=0;t>i;t--)this.move(1)}handleTouchStart(t){const i=this.getTouches(t)[0];this.xDown=i.clientX,this.yDown=i.clientY}getTouches(t){return t.touches||t.originalEvent.touches}handleTouchMove(t){if(!this.xDown||!this.yDown)return;let i=this.xDown-t.touches[0].clientX,n=this.yDown-t.touches[0].clientY;Math.abs(i)>Math.abs(n)&&this.move(i>0?1:-1),this.xDown=null,this.yDown=null}setActive(t){const i=this.tutorialData.length;this.activeIndex=t>=0?t>=i-1?i-1:t:0}renderDots(){const t=[];for(let n=0;n<this.tutorialData.length/this.itemsPerPage;n++)t.push(i("li",{class:n==this.activeIndex?"active":"default",onClick:()=>{this.goTo(n),this.setActive(n)}}));return t}render(){const t={transform:`translate(${this.allElementsWidth/(this.tutorialData.length-1)*this.activeIndex*-1}px, 0px)`},n={width:this.tutorialElementWidth/this.itemsPerPage+"px"};return this.hasErrors?i("div",{class:"GeneralTutorialSliderError"},i("div",{class:"TitleError"},e[void 0!==(o=this.language)&&o in e?o:"en"].error)):this.isLoading?void 0:i("div",{ref:t=>this.stylingContainer=t},i("div",{class:"TutorialWrapper"},i("div",{class:"TutorialContent",ref:t=>this.slider=t},(this.showSliderArrows&&!this.isMobile||this.showSliderArrowsMobile&&this.isMobile)&&i("div",{class:0===this.activeIndex?"SliderNavButton DisabledArrow":"SliderNavButton",onClick:()=>this.move(-1)},i("svg",{fill:"none",stroke:"var(--emw--color-secondary, #FD2839)",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"}))),i("main",null,i("div",{style:t,ref:t=>this.tutorialsElement=t,class:"TutorialItems"},this.tutorialData.map((t=>{var e,o,s,r,l,a,d,h,u,c,p,v,m,w,g,f,x,I;return i("div",{class:"TutorialItem",style:n},i("div",{class:"ItemTitle",innerHTML:null==t?void 0:t.title}),(null===(e=null==t?void 0:t.media)||void 0===e?void 0:e.images)?i("div",{class:"ItemImage"},i("img",this.isMobile?{src:null===(l=null===(r=null===(s=null===(o=null==t?void 0:t.media)||void 0===o?void 0:o.images[0])||void 0===s?void 0:s.sources)||void 0===r?void 0:r.find((t=>"mobile"===t.media)))||void 0===l?void 0:l.src,alt:null==t?void 0:t.slug}:{src:null===(u=null===(h=null===(d=null===(a=null==t?void 0:t.media)||void 0===a?void 0:a.images[0])||void 0===d?void 0:d.sources)||void 0===h?void 0:h.find((t=>"desktop"===t.media)))||void 0===u?void 0:u.src,alt:null==t?void 0:t.slug})):(null===(c=null==t?void 0:t.media)||void 0===c?void 0:c.video)?i("div",{class:"ItemImage"},i("video",{controls:!0,loop:!0,autoplay:!0},i("source",this.isMobile?{src:null===(w=null===(m=null===(v=null===(p=null==t?void 0:t.media)||void 0===p?void 0:p.video[0])||void 0===v?void 0:v.sources)||void 0===m?void 0:m.find((t=>"mobile"===t.media)))||void 0===w?void 0:w.src,type:"video/mp4"}:{src:null===(I=null===(x=null===(f=null===(g=null==t?void 0:t.media)||void 0===g?void 0:g.video[0])||void 0===f?void 0:f.sources)||void 0===x?void 0:x.find((t=>"desktop"===t.media)))||void 0===I?void 0:I.src,type:"video/mp4"}))):null,i("div",{class:"ItemDescription",innerHTML:null==t?void 0:t.content}))})))),(this.showSliderArrows&&!this.isMobile||this.showSliderArrowsMobile&&this.isMobile)&&i("div",{class:this.activeIndex===this.tutorialData.length-1?" SliderNavButton DisabledArrow disabled":"SliderNavButton",onClick:()=>this.move(1)},i("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"}))),i("div",null)),this.showSliderDots&&i("div",{class:"DotsWrapper"},i("ul",{class:"Dots"},this.renderDots()))));var o}get el(){return n(this)}static get watchers(){return{cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"]}}};o.style=":host {\n display: block;\n}\n\n.GeneralTutorialSliderError {\n display: flex;\n justify-content: center;\n flex-direction: column;\n}\n.GeneralTutorialSliderError.TitleError {\n color: red;\n}\n\nmain {\n width: 100%;\n overflow: hidden;\n}\n\n.TutorialWrapper {\n width: 100%;\n display: flex;\n flex: 0 0 auto;\n justify-content: center;\n flex-direction: column;\n overflow: auto;\n}\n\n.TutorialContent {\n display: flex;\n justify-content: center;\n flex-direction: row;\n}\n\n.TutorialItems {\n display: flex;\n transition: transform 0.4s ease-in-out;\n transform: translateX(0px);\n}\n\n.TutorialItem {\n flex: 0 0 auto;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n color: #000;\n background-color: #f5f5f5;\n border-radius: 5px;\n user-select: none;\n}\n.TutorialItem .ItemTitle {\n padding: 25px 15px;\n font-size: 18px;\n font-weight: 600;\n color: var(--emw--color-secondary, #FD2839);\n}\n.TutorialItem .ItemImage {\n overflow: hidden;\n}\n.TutorialItem .ItemImage img, .TutorialItem .ItemImage video {\n height: auto;\n width: 450px;\n}\n.TutorialItem .ItemDescription {\n font-size: 14px;\n padding: 25px 15px;\n font-weight: 400;\n color: #000;\n}\n\n.SliderNavButton {\n border: 0px;\n width: 25px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.SliderNavButton svg {\n width: 20px;\n stroke: var(--emw--color-secondary, #FD2839);\n}\n\n.DisabledArrow svg {\n opacity: 0.2;\n stroke: var(--emw--color-secondary, #FD2839);\n pointer-events: none;\n}\n\n.DotsWrapper {\n width: 100%;\n margin: 0 auto;\n margin-top: 20px;\n height: 30px;\n}\n.DotsWrapper ul.Dots {\n display: flex;\n justify-content: center;\n padding: 0;\n}\n.DotsWrapper ul.Dots li {\n height: 10px;\n width: 10px;\n background: #ccc;\n border-radius: 50%;\n margin-left: 3px;\n margin-right: 3px;\n list-style: none;\n cursor: pointer;\n}\n.DotsWrapper ul.Dots li:hover {\n background: #bbb;\n}\n.DotsWrapper ul.Dots li.active {\n border: solid 1px var(--emw--color-secondary, #FD2839);\n background: var(--emw--color-secondary, #FD2839);\n}\n.DotsWrapper ul.Dots li.default {\n border: solid 1px var(--emw--color-secondary, #FD2839);\n background-color: #FFF;\n}\n\n@container (max-width: 475px) {\n @media screen and (orientation: landscape) {\n .TutorialItem {\n width: 100%;\n }\n }\n main {\n height: 90cqh;\n }\n .TutorialItems {\n height: inherit;\n }\n .TutorialItem {\n min-width: 100%;\n max-height: 800px;\n overflow: auto;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n color: #000;\n background-color: #f5f5f5;\n border-radius: 5px;\n user-select: none;\n }\n .TutorialItem .ItemTitle {\n padding: 25px 15px;\n font-size: 18px;\n font-weight: 600;\n color: var(--emw--color-secondary, #FD2839);\n }\n .TutorialItem .ItemImage {\n min-height: 200px;\n }\n .TutorialItem .ItemImage img, .TutorialItem .ItemImage video {\n height: auto;\n width: 100%;\n }\n .TutorialItem .ItemDescription {\n font-size: 14px;\n padding: 25px 15px;\n font-weight: 400;\n color: #000;\n }\n}";export{o as general_tutorial_slider}