@maggioli-design-system/mds-accordion-timer 3.4.0 → 3.4.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 (49) hide show
  1. package/dist/cjs/{index-0863c401.js → index-ab2aee76.js} +112 -18
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mds-accordion-timer.cjs.entry.js +1 -1
  4. package/dist/cjs/mds-accordion-timer.cjs.js +2 -2
  5. package/dist/collection/collection-manifest.json +2 -2
  6. package/dist/collection/common/aria.js +9 -1
  7. package/dist/collection/common/keyboard-manager.js +2 -2
  8. package/dist/documentation.json +3 -3
  9. package/dist/esm/{index-3fd8fd3d.js → index-1e1d02d3.js} +112 -18
  10. package/dist/esm/loader.js +2 -2
  11. package/dist/esm/mds-accordion-timer.entry.js +1 -1
  12. package/dist/esm/mds-accordion-timer.js +3 -3
  13. package/dist/esm-es5/index-1e1d02d3.js +1 -0
  14. package/dist/esm-es5/loader.js +1 -1
  15. package/dist/esm-es5/mds-accordion-timer.entry.js +1 -1
  16. package/dist/esm-es5/mds-accordion-timer.js +1 -1
  17. package/dist/mds-accordion-timer/mds-accordion-timer.esm.js +1 -1
  18. package/dist/mds-accordion-timer/mds-accordion-timer.js +1 -1
  19. package/dist/mds-accordion-timer/p-3ba9d29a.system.js +1 -0
  20. package/dist/mds-accordion-timer/{p-5046d553.entry.js → p-57415df8.entry.js} +1 -1
  21. package/dist/mds-accordion-timer/p-6584787f.system.js +2 -0
  22. package/dist/mds-accordion-timer/p-70e86e8e.js +2 -0
  23. package/dist/mds-accordion-timer/p-b86c017a.system.entry.js +1 -0
  24. package/dist/stats.json +27 -25
  25. package/dist/types/common/aria.d.ts +2 -1
  26. package/dist/types/stencil-public-runtime.d.ts +19 -0
  27. package/documentation.json +15 -5
  28. package/package.json +4 -4
  29. package/readme.md +3 -1
  30. package/src/common/aria.ts +12 -0
  31. package/src/common/keyboard-manager.ts +2 -2
  32. package/src/components/mds-accordion-timer/readme.md +1 -1
  33. package/src/fixtures/icons.json +2 -0
  34. package/www/build/mds-accordion-timer.esm.js +1 -1
  35. package/www/build/mds-accordion-timer.js +1 -1
  36. package/www/build/p-3ba9d29a.system.js +1 -0
  37. package/www/build/{p-5046d553.entry.js → p-57415df8.entry.js} +1 -1
  38. package/www/build/p-6584787f.system.js +2 -0
  39. package/www/build/p-70e86e8e.js +2 -0
  40. package/www/build/p-b86c017a.system.entry.js +1 -0
  41. package/dist/esm-es5/index-3fd8fd3d.js +0 -2
  42. package/dist/mds-accordion-timer/p-0cc9df19.system.js +0 -2
  43. package/dist/mds-accordion-timer/p-1bc788d2.system.js +0 -1
  44. package/dist/mds-accordion-timer/p-65172843.system.entry.js +0 -1
  45. package/dist/mds-accordion-timer/p-d1be03fa.js +0 -2
  46. package/www/build/p-0cc9df19.system.js +0 -2
  47. package/www/build/p-1bc788d2.system.js +0 -1
  48. package/www/build/p-65172843.system.entry.js +0 -1
  49. package/www/build/p-d1be03fa.js +0 -2
@@ -798,6 +798,10 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
798
798
  */
799
799
  const callRender = (hostRef, instance, elm, isInitialLoad) => {
800
800
  try {
801
+ /**
802
+ * minification optimization: `allRenderFn` is `true` if all components have a `render`
803
+ * method, so we can call the method immediately. If not, check before calling it.
804
+ */
801
805
  instance = instance.render() ;
802
806
  {
803
807
  hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
@@ -871,6 +875,16 @@ const appDidLoad = (who) => {
871
875
  }
872
876
  nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
873
877
  };
878
+ /**
879
+ * Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
880
+ * e.g. custom element node. If a build figures out that e.g. no component
881
+ * has a `componentDidLoad` method, the instance method gets removed from the
882
+ * output bundle and this function returns `undefined`.
883
+ * @param instance any object that may or may not contain methods
884
+ * @param method method name
885
+ * @param arg single arbitrary argument
886
+ * @returns result of method call if it exists, otherwise `undefined`
887
+ */
874
888
  const safeCall = (instance, method, arg) => {
875
889
  if (instance && instance[method]) {
876
890
  try {
@@ -921,6 +935,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
921
935
  * @returns a reference to the same constructor passed in (but now mutated)
922
936
  */
923
937
  const proxyComponent = (Cstr, cmpMeta, flags) => {
938
+ var _a;
924
939
  if (cmpMeta.$members$) {
925
940
  // It's better to have a const than two Object.entries()
926
941
  const members = Object.entries(cmpMeta.$members$);
@@ -945,7 +960,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
945
960
  });
946
961
  if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
947
962
  const attrNameToPropName = new Map();
948
- prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
963
+ prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
949
964
  plt.jmp(() => {
950
965
  const propName = attrNameToPropName.get(attrName);
951
966
  // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
@@ -993,23 +1008,62 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
993
1008
  // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
994
1009
  return;
995
1010
  }
1011
+ else if (propName == null) {
1012
+ // At this point we should know this is not a "member", so we can treat it like watching an attribute
1013
+ // on a vanilla web component
1014
+ const hostRef = getHostRef(this);
1015
+ const flags = hostRef === null || hostRef === void 0 ? void 0 : hostRef.$flags$;
1016
+ // We only want to trigger the callback(s) if:
1017
+ // 1. The instance is ready
1018
+ // 2. The watchers are ready
1019
+ // 3. The value has changed
1020
+ if (!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
1021
+ flags & 128 /* HOST_FLAGS.isWatchReady */ &&
1022
+ newValue !== oldValue) {
1023
+ const instance = hostRef.$lazyInstance$ ;
1024
+ const entry = cmpMeta.$watchers$[attrName];
1025
+ entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
1026
+ if (instance[callbackName] != null) {
1027
+ instance[callbackName].call(instance, newValue, oldValue, attrName);
1028
+ }
1029
+ });
1030
+ }
1031
+ return;
1032
+ }
996
1033
  this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
997
1034
  });
998
1035
  };
999
- // create an array of attributes to observe
1000
- // and also create a map of html attribute name to js property name
1001
- Cstr.observedAttributes = members
1002
- .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes
1003
- .map(([propName, m]) => {
1004
- const attrName = m[1] || propName;
1005
- attrNameToPropName.set(attrName, propName);
1006
- return attrName;
1007
- });
1036
+ // Create an array of attributes to observe
1037
+ // This list in comprised of all strings used within a `@Watch()` decorator
1038
+ // on a component as well as any Stencil-specific "members" (`@Prop()`s and `@State()`s).
1039
+ // As such, there is no way to guarantee type-safety here that a user hasn't entered
1040
+ // an invalid attribute.
1041
+ Cstr.observedAttributes = Array.from(new Set([
1042
+ ...Object.keys((_a = cmpMeta.$watchers$) !== null && _a !== void 0 ? _a : {}),
1043
+ ...members
1044
+ .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
1045
+ .map(([propName, m]) => {
1046
+ const attrName = m[1] || propName;
1047
+ attrNameToPropName.set(attrName, propName);
1048
+ return attrName;
1049
+ }),
1050
+ ]));
1008
1051
  }
1009
1052
  }
1010
1053
  return Cstr;
1011
1054
  };
1012
- const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1055
+ /**
1056
+ * Initialize a Stencil component given a reference to its host element, its
1057
+ * runtime bookkeeping data structure, runtime metadata about the component,
1058
+ * and (optionally) an HMR version ID.
1059
+ *
1060
+ * @param elm a host element
1061
+ * @param hostRef the element's runtime bookkeeping object
1062
+ * @param cmpMeta runtime metadata for the Stencil component
1063
+ * @param hmrVersionId an (optional) HMR version ID
1064
+ */
1065
+ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1066
+ let Cstr;
1013
1067
  // initializeComponent
1014
1068
  if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
1015
1069
  // Let the runtime know that the component has been initialized
@@ -1288,23 +1342,50 @@ const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !==
1288
1342
  * @returns void
1289
1343
  */
1290
1344
  const setNonce = (nonce) => (plt.$nonce$ = nonce);
1345
+ /**
1346
+ * A WeakMap mapping runtime component references to their corresponding host reference
1347
+ * instances.
1348
+ */
1291
1349
  const hostRefs = /*@__PURE__*/ new WeakMap();
1350
+ /**
1351
+ * Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
1352
+ *
1353
+ * @param ref the runtime ref of interest
1354
+ * @returns the Host reference (if found) or undefined
1355
+ */
1292
1356
  const getHostRef = (ref) => hostRefs.get(ref);
1357
+ /**
1358
+ * Register a lazy instance with the {@link hostRefs} object so it's
1359
+ * corresponding {@link d.HostRef} can be retrieved later.
1360
+ *
1361
+ * @param lazyInstance the lazy instance of interest
1362
+ * @param hostRef that instances `HostRef` object
1363
+ * @returns a reference to the host ref WeakMap
1364
+ */
1293
1365
  const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
1294
- const registerHost = (elm, cmpMeta) => {
1366
+ /**
1367
+ * Register a host element for a Stencil component, setting up various metadata
1368
+ * and callbacks based on {@link BUILD} flags as well as the component's runtime
1369
+ * metadata.
1370
+ *
1371
+ * @param hostElement the host element to register
1372
+ * @param cmpMeta runtime metadata for that component
1373
+ * @returns a reference to the host ref WeakMap
1374
+ */
1375
+ const registerHost = (hostElement, cmpMeta) => {
1295
1376
  const hostRef = {
1296
1377
  $flags$: 0,
1297
- $hostElement$: elm,
1378
+ $hostElement$: hostElement,
1298
1379
  $cmpMeta$: cmpMeta,
1299
1380
  $instanceValues$: new Map(),
1300
1381
  };
1301
1382
  {
1302
1383
  hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
1303
- elm['s-p'] = [];
1304
- elm['s-rc'] = [];
1384
+ hostElement['s-p'] = [];
1385
+ hostElement['s-rc'] = [];
1305
1386
  }
1306
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1307
- return hostRefs.set(elm, hostRef);
1387
+ addHostEventListeners(hostElement, hostRef, cmpMeta.$listeners$);
1388
+ return hostRefs.set(hostElement, hostRef);
1308
1389
  };
1309
1390
  const consoleError = (e, el) => (0, console.error)(e, el);
1310
1391
  const cmpModules = /*@__PURE__*/ new Map();
@@ -1316,7 +1397,20 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1316
1397
  if (module) {
1317
1398
  return module[exportName];
1318
1399
  }
1319
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
1400
+
1401
+ if (!hmrVersionId || !BUILD.hotModuleReplacement) {
1402
+ const processMod = importedModule => {
1403
+ cmpModules.set(bundleId, importedModule);
1404
+ return importedModule[exportName];
1405
+ }
1406
+ switch(bundleId) {
1407
+
1408
+ case 'mds-accordion-timer.cjs':
1409
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1410
+ /* webpackMode: "lazy" */
1411
+ './mds-accordion-timer.cjs.entry.js')); }).then(processMod, consoleError);
1412
+ }
1413
+ }
1320
1414
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1321
1415
  /* @vite-ignore */
1322
1416
  /* webpackInclude: /\.entry\.js$/ */
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0863c401.js');
5
+ const index = require('./index-ab2aee76.js');
6
6
 
7
7
  const defineCustomElements = (win, options) => {
8
8
  if (typeof window === 'undefined') return undefined;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0863c401.js');
5
+ const index = require('./index-ab2aee76.js');
6
6
 
7
7
  const mdsAccordionTimerCss = ":host{--mds-accordion-timer-progress-bar-color:rgb(var(--tone-neutral-03));--mds-accordion-timer-progress-bar-background:rgb(var(--tone-neutral-08));--mds-accordion-timer-progress-bar-thickness:0.25rem;--mds-accordion-timer-duration:500ms;display:block}";
8
8
 
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0863c401.js');
5
+ const index = require('./index-ab2aee76.js');
6
6
 
7
7
  /*
8
- Stencil Client Patch Browser v4.2.1 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Browser v4.5.0 | MIT Licensed | https://stenciljs.com
9
9
  */
10
10
  const patchBrowser = () => {
11
11
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('mds-accordion-timer.cjs.js', document.baseURI).href));
@@ -4,8 +4,8 @@
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
7
- "version": "4.2.1",
8
- "typescriptVersion": "5.1.6"
7
+ "version": "4.5.0",
8
+ "typescriptVersion": "5.2.2"
9
9
  },
10
10
  "collections": [],
11
11
  "bundles": []
@@ -5,6 +5,7 @@ const hash = (s) => {
5
5
  }
6
6
  return h.toString();
7
7
  };
8
+ const randomInt = (max) => Math.floor(Math.random() * max);
8
9
  const unslugName = (name) => {
9
10
  var _a, _b, _c;
10
11
  return (_c = (_b = (_a = name.split('/')) === null || _a === void 0 ? void 0 : _a.slice(-1).pop()) === null || _b === void 0 ? void 0 : _b.replace(/-/g, ' ')) !== null && _c !== void 0 ? _c : name;
@@ -18,4 +19,11 @@ const setAttributeIfEmpty = (element, attribute, value) => {
18
19
  return value;
19
20
  };
20
21
  const hashValue = (value) => `${value}-${hash(value)}`;
21
- export { unslugName, setAttributeIfEmpty, hashValue, };
22
+ const hashRandomValue = (value) => {
23
+ const randomValue = randomInt(1000000);
24
+ if (value) {
25
+ return `${value}-${hash(randomValue.toString())}`;
26
+ }
27
+ return hash(randomValue.toString());
28
+ };
29
+ export { unslugName, setAttributeIfEmpty, hashRandomValue, hashValue, };
@@ -26,13 +26,13 @@ export class KeyboardManager {
26
26
  };
27
27
  this.attachEscapeBehavior = (callBack) => {
28
28
  this.escapeCallback = callBack;
29
- if (typeof window !== undefined) {
29
+ if (window !== undefined) {
30
30
  window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
31
31
  }
32
32
  };
33
33
  this.detachEscapeBehavior = () => {
34
34
  this.escapeCallback = () => { return; };
35
- if (typeof window !== undefined) {
35
+ if (window !== undefined) {
36
36
  window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
37
37
  }
38
38
  };
@@ -1,9 +1,9 @@
1
1
  {
2
- "timestamp": "2023-09-18T09:10:20",
2
+ "timestamp": "2023-10-19T09:48:42",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
- "version": "4.2.1",
6
- "typescriptVersion": "5.1.6"
5
+ "version": "4.5.0",
6
+ "typescriptVersion": "5.2.2"
7
7
  },
8
8
  "components": [
9
9
  {
@@ -776,6 +776,10 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
776
776
  */
777
777
  const callRender = (hostRef, instance, elm, isInitialLoad) => {
778
778
  try {
779
+ /**
780
+ * minification optimization: `allRenderFn` is `true` if all components have a `render`
781
+ * method, so we can call the method immediately. If not, check before calling it.
782
+ */
779
783
  instance = instance.render() ;
780
784
  {
781
785
  hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
@@ -849,6 +853,16 @@ const appDidLoad = (who) => {
849
853
  }
850
854
  nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
851
855
  };
856
+ /**
857
+ * Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
858
+ * e.g. custom element node. If a build figures out that e.g. no component
859
+ * has a `componentDidLoad` method, the instance method gets removed from the
860
+ * output bundle and this function returns `undefined`.
861
+ * @param instance any object that may or may not contain methods
862
+ * @param method method name
863
+ * @param arg single arbitrary argument
864
+ * @returns result of method call if it exists, otherwise `undefined`
865
+ */
852
866
  const safeCall = (instance, method, arg) => {
853
867
  if (instance && instance[method]) {
854
868
  try {
@@ -899,6 +913,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
899
913
  * @returns a reference to the same constructor passed in (but now mutated)
900
914
  */
901
915
  const proxyComponent = (Cstr, cmpMeta, flags) => {
916
+ var _a;
902
917
  if (cmpMeta.$members$) {
903
918
  // It's better to have a const than two Object.entries()
904
919
  const members = Object.entries(cmpMeta.$members$);
@@ -923,7 +938,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
923
938
  });
924
939
  if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
925
940
  const attrNameToPropName = new Map();
926
- prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
941
+ prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
927
942
  plt.jmp(() => {
928
943
  const propName = attrNameToPropName.get(attrName);
929
944
  // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
@@ -971,23 +986,62 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
971
986
  // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
972
987
  return;
973
988
  }
989
+ else if (propName == null) {
990
+ // At this point we should know this is not a "member", so we can treat it like watching an attribute
991
+ // on a vanilla web component
992
+ const hostRef = getHostRef(this);
993
+ const flags = hostRef === null || hostRef === void 0 ? void 0 : hostRef.$flags$;
994
+ // We only want to trigger the callback(s) if:
995
+ // 1. The instance is ready
996
+ // 2. The watchers are ready
997
+ // 3. The value has changed
998
+ if (!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
999
+ flags & 128 /* HOST_FLAGS.isWatchReady */ &&
1000
+ newValue !== oldValue) {
1001
+ const instance = hostRef.$lazyInstance$ ;
1002
+ const entry = cmpMeta.$watchers$[attrName];
1003
+ entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
1004
+ if (instance[callbackName] != null) {
1005
+ instance[callbackName].call(instance, newValue, oldValue, attrName);
1006
+ }
1007
+ });
1008
+ }
1009
+ return;
1010
+ }
974
1011
  this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
975
1012
  });
976
1013
  };
977
- // create an array of attributes to observe
978
- // and also create a map of html attribute name to js property name
979
- Cstr.observedAttributes = members
980
- .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes
981
- .map(([propName, m]) => {
982
- const attrName = m[1] || propName;
983
- attrNameToPropName.set(attrName, propName);
984
- return attrName;
985
- });
1014
+ // Create an array of attributes to observe
1015
+ // This list in comprised of all strings used within a `@Watch()` decorator
1016
+ // on a component as well as any Stencil-specific "members" (`@Prop()`s and `@State()`s).
1017
+ // As such, there is no way to guarantee type-safety here that a user hasn't entered
1018
+ // an invalid attribute.
1019
+ Cstr.observedAttributes = Array.from(new Set([
1020
+ ...Object.keys((_a = cmpMeta.$watchers$) !== null && _a !== void 0 ? _a : {}),
1021
+ ...members
1022
+ .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
1023
+ .map(([propName, m]) => {
1024
+ const attrName = m[1] || propName;
1025
+ attrNameToPropName.set(attrName, propName);
1026
+ return attrName;
1027
+ }),
1028
+ ]));
986
1029
  }
987
1030
  }
988
1031
  return Cstr;
989
1032
  };
990
- const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1033
+ /**
1034
+ * Initialize a Stencil component given a reference to its host element, its
1035
+ * runtime bookkeeping data structure, runtime metadata about the component,
1036
+ * and (optionally) an HMR version ID.
1037
+ *
1038
+ * @param elm a host element
1039
+ * @param hostRef the element's runtime bookkeeping object
1040
+ * @param cmpMeta runtime metadata for the Stencil component
1041
+ * @param hmrVersionId an (optional) HMR version ID
1042
+ */
1043
+ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1044
+ let Cstr;
991
1045
  // initializeComponent
992
1046
  if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
993
1047
  // Let the runtime know that the component has been initialized
@@ -1266,23 +1320,50 @@ const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !==
1266
1320
  * @returns void
1267
1321
  */
1268
1322
  const setNonce = (nonce) => (plt.$nonce$ = nonce);
1323
+ /**
1324
+ * A WeakMap mapping runtime component references to their corresponding host reference
1325
+ * instances.
1326
+ */
1269
1327
  const hostRefs = /*@__PURE__*/ new WeakMap();
1328
+ /**
1329
+ * Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
1330
+ *
1331
+ * @param ref the runtime ref of interest
1332
+ * @returns the Host reference (if found) or undefined
1333
+ */
1270
1334
  const getHostRef = (ref) => hostRefs.get(ref);
1335
+ /**
1336
+ * Register a lazy instance with the {@link hostRefs} object so it's
1337
+ * corresponding {@link d.HostRef} can be retrieved later.
1338
+ *
1339
+ * @param lazyInstance the lazy instance of interest
1340
+ * @param hostRef that instances `HostRef` object
1341
+ * @returns a reference to the host ref WeakMap
1342
+ */
1271
1343
  const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
1272
- const registerHost = (elm, cmpMeta) => {
1344
+ /**
1345
+ * Register a host element for a Stencil component, setting up various metadata
1346
+ * and callbacks based on {@link BUILD} flags as well as the component's runtime
1347
+ * metadata.
1348
+ *
1349
+ * @param hostElement the host element to register
1350
+ * @param cmpMeta runtime metadata for that component
1351
+ * @returns a reference to the host ref WeakMap
1352
+ */
1353
+ const registerHost = (hostElement, cmpMeta) => {
1273
1354
  const hostRef = {
1274
1355
  $flags$: 0,
1275
- $hostElement$: elm,
1356
+ $hostElement$: hostElement,
1276
1357
  $cmpMeta$: cmpMeta,
1277
1358
  $instanceValues$: new Map(),
1278
1359
  };
1279
1360
  {
1280
1361
  hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
1281
- elm['s-p'] = [];
1282
- elm['s-rc'] = [];
1362
+ hostElement['s-p'] = [];
1363
+ hostElement['s-rc'] = [];
1283
1364
  }
1284
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1285
- return hostRefs.set(elm, hostRef);
1365
+ addHostEventListeners(hostElement, hostRef, cmpMeta.$listeners$);
1366
+ return hostRefs.set(hostElement, hostRef);
1286
1367
  };
1287
1368
  const consoleError = (e, el) => (0, console.error)(e, el);
1288
1369
  const cmpModules = /*@__PURE__*/ new Map();
@@ -1294,7 +1375,20 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1294
1375
  if (module) {
1295
1376
  return module[exportName];
1296
1377
  }
1297
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
1378
+
1379
+ if (!hmrVersionId || !BUILD.hotModuleReplacement) {
1380
+ const processMod = importedModule => {
1381
+ cmpModules.set(bundleId, importedModule);
1382
+ return importedModule[exportName];
1383
+ }
1384
+ switch(bundleId) {
1385
+
1386
+ case 'mds-accordion-timer':
1387
+ return import(
1388
+ /* webpackMode: "lazy" */
1389
+ './mds-accordion-timer.entry.js').then(processMod, consoleError);
1390
+ }
1391
+ }
1298
1392
  return import(
1299
1393
  /* @vite-ignore */
1300
1394
  /* webpackInclude: /\.entry\.js$/ */
@@ -1,5 +1,5 @@
1
- import { b as bootstrapLazy } from './index-3fd8fd3d.js';
2
- export { s as setNonce } from './index-3fd8fd3d.js';
1
+ import { b as bootstrapLazy } from './index-1e1d02d3.js';
2
+ export { s as setNonce } from './index-1e1d02d3.js';
3
3
 
4
4
  const defineCustomElements = (win, options) => {
5
5
  if (typeof window === 'undefined') return undefined;
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-3fd8fd3d.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-1e1d02d3.js';
2
2
 
3
3
  const mdsAccordionTimerCss = ":host{--mds-accordion-timer-progress-bar-color:rgb(var(--tone-neutral-03));--mds-accordion-timer-progress-bar-background:rgb(var(--tone-neutral-08));--mds-accordion-timer-progress-bar-thickness:0.25rem;--mds-accordion-timer-duration:500ms;display:block}";
4
4
 
@@ -1,8 +1,8 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-3fd8fd3d.js';
2
- export { s as setNonce } from './index-3fd8fd3d.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-1e1d02d3.js';
2
+ export { s as setNonce } from './index-1e1d02d3.js';
3
3
 
4
4
  /*
5
- Stencil Client Patch Browser v4.2.1 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Patch Browser v4.5.0 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
  const patchBrowser = () => {
8
8
  const importMeta = import.meta.url;
@@ -0,0 +1 @@
1
+ var __extends=this&&this.__extends||function(){var e=function(n,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r))e[r]=n[r]};return e(n,r)};return function(n,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(n,r);function t(){this.constructor=n}n.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();var __awaiter=this&&this.__awaiter||function(e,n,r,t){function a(e){return e instanceof r?e:new r((function(n){n(e)}))}return new(r||(r=Promise))((function(r,i){function o(e){try{c(t.next(e))}catch(e){i(e)}}function u(e){try{c(t["throw"](e))}catch(e){i(e)}}function c(e){e.done?r(e.value):a(e.value).then(o,u)}c((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,a,i,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(e){return function(n){return c([e,n])}}function c(u){if(t)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(r=0)),r)try{if(t=1,a&&(i=u[0]&2?a["return"]:u[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;if(a=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:r.label++;return{value:u[1],done:false};case 5:r.label++;a=u[1];u=[0];continue;case 7:u=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1];i=u;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(u);break}if(i[2])r.ops.pop();r.trys.pop();continue}u=n.call(e,r)}catch(e){u=[6,e];a=0}finally{t=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,n,r){if(r||arguments.length===2)for(var t=0,a=n.length,i;t<a;t++){if(i||!(t in n)){if(!i)i=Array.prototype.slice.call(n,0,t);i[t]=n[t]}}return e.concat(i||Array.prototype.slice.call(n))};var NAMESPACE="mds-accordion-timer";var scopeId;var hostTagName;var queuePending=false;var createTime=function(e,n){if(n===void 0){n=""}{return function(){return}}};var uniqueTime=function(e,n){{return function(){return}}};var HYDRATED_CSS="{visibility:hidden}[hydrated]{visibility:inherit}";var isDef=function(e){return e!=null};var isComplexType=function(e){e=typeof e;return e==="object"||e==="function"};function queryNonceMetaTagContent(e){var n,r,t;return(t=(r=(n=e.head)===null||n===void 0?void 0:n.querySelector('meta[name="csp-nonce"]'))===null||r===void 0?void 0:r.getAttribute("content"))!==null&&t!==void 0?t:undefined}var h=function(e,n){var r=[];for(var t=2;t<arguments.length;t++){r[t-2]=arguments[t]}var a=null;var i=false;var o=false;var u=[];var c=function(n){for(var r=0;r<n.length;r++){a=n[r];if(Array.isArray(a)){c(a)}else if(a!=null&&typeof a!=="boolean"){if(i=typeof e!=="function"&&!isComplexType(a)){a=String(a)}if(i&&o){u[u.length-1].t+=a}else{u.push(i?newVNode(null,a):a)}o=i}}};c(r);var f=newVNode(e,null);f.i=n;if(u.length>0){f.o=u}return f};var newVNode=function(e,n){var r={u:0,l:e,t:n,v:null,o:null};return r};var Host={};var isHost=function(e){return e&&e.l===Host};var parsePropertyValue=function(e,n){if(e!=null&&!isComplexType(e)){if(n&2){return parseFloat(e)}return e}return e};var getElement=function(e){return getHostRef(e).$hostElement$};var createEvent=function(e,n,r){var t=getElement(e);return{emit:function(e){return emitEvent(t,n,{bubbles:!!(r&4),composed:!!(r&2),cancelable:!!(r&1),detail:e})}}};var emitEvent=function(e,n,r){var t=plt.ce(n,r);e.dispatchEvent(t);return t};var rootAppliedStyles=new WeakMap;var registerStyle=function(e,n,r){var t=styles.get(e);if(supportsConstructableStylesheets&&r){t=t||new CSSStyleSheet;if(typeof t==="string"){t=n}else{t.replaceSync(n)}}else{t=n}styles.set(e,t)};var addStyle=function(e,n,r){var t;var a=getScopeId(n);var i=styles.get(a);e=e.nodeType===11?e:doc;if(i){if(typeof i==="string"){e=e.head||e;var o=rootAppliedStyles.get(e);var u=void 0;if(!o){rootAppliedStyles.set(e,o=new Set)}if(!o.has(a)){{u=doc.createElement("style");u.innerHTML=i;var c=(t=plt.p)!==null&&t!==void 0?t:queryNonceMetaTagContent(doc);if(c!=null){u.setAttribute("nonce",c)}e.insertBefore(u,e.querySelector("link"))}if(o){o.add(a)}}}else if(!e.adoptedStyleSheets.includes(i)){e.adoptedStyleSheets=__spreadArray(__spreadArray([],e.adoptedStyleSheets,true),[i],false)}}return a};var attachStyles=function(e){var n=e.m;var r=e.$hostElement$;var t=n.u;var a=createTime("attachStyles",n.h);var i=addStyle(r.shadowRoot?r.shadowRoot:r.getRootNode(),n);if(t&10){r["s-sc"]=i;r.classList.add(i+"-h")}a()};var getScopeId=function(e,n){return"sc-"+e.h};var createElm=function(e,n,r,t){var a=n.o[r];var i=0;var o;var u;{o=a.v=doc.createElement(a.l);if(isDef(scopeId)&&o["s-si"]!==scopeId){o.classList.add(o["s-si"]=scopeId)}if(a.o){for(i=0;i<a.o.length;++i){u=createElm(e,a,i);if(u){o.appendChild(u)}}}}return o};var addVnodes=function(e,n,r,t,a,i){var o=e;var u;if(o.shadowRoot&&o.tagName===hostTagName){o=o.shadowRoot}for(;a<=i;++a){if(t[a]){u=createElm(null,r,a);if(u){t[a].v=u;o.insertBefore(u,n)}}}};var removeVnodes=function(e,n,r){for(var t=n;t<=r;++t){var a=e[t];if(a){var i=a.v;if(i){i.remove()}}}};var updateChildren=function(e,n,r,t){var a=0;var i=0;var o=n.length-1;var u=n[0];var c=n[o];var f=t.length-1;var s=t[0];var l=t[f];var v;while(a<=o&&i<=f){if(u==null){u=n[++a]}else if(c==null){c=n[--o]}else if(s==null){s=t[++i]}else if(l==null){l=t[--f]}else if(isSameVnode(u,s)){patch(u,s);u=n[++a];s=t[++i]}else if(isSameVnode(c,l)){patch(c,l);c=n[--o];l=t[--f]}else if(isSameVnode(u,l)){patch(u,l);e.insertBefore(u.v,c.v.nextSibling);u=n[++a];l=t[--f]}else if(isSameVnode(c,s)){patch(c,s);e.insertBefore(c.v,u.v);c=n[--o];s=t[++i]}else{{v=createElm(n&&n[i],r,i);s=t[++i]}if(v){{u.v.parentNode.insertBefore(v,u.v)}}}}if(a>o){addVnodes(e,t[f+1]==null?null:t[f+1].v,r,t,i,f)}else if(i>f){removeVnodes(n,a,o)}};var isSameVnode=function(e,n){if(e.l===n.l){return true}return false};var patch=function(e,n){var r=n.v=e.v;var t=e.o;var a=n.o;{if(t!==null&&a!==null){updateChildren(r,t,n,a)}else if(a!==null){addVnodes(r,null,n,a,0,a.length-1)}else if(t!==null){removeVnodes(t,0,t.length-1)}}};var renderVdom=function(e,n,r){if(r===void 0){r=false}var t=e.$hostElement$;var a=e.S||newVNode(null,null);var i=isHost(n)?n:h(null,null,n);hostTagName=t.tagName;if(r&&i.i){for(var o=0,u=Object.keys(i.i);o<u.length;o++){var c=u[o];if(t.hasAttribute(c)&&!["key","ref","style","class"].includes(c)){i.i[c]=t[c]}}}i.l=null;i.u|=4;e.S=i;i.v=a.v=t.shadowRoot||t;{scopeId=t["s-sc"]}patch(a,i)};var attachToAncestor=function(e,n){if(n&&!e.C&&n["s-p"]){n["s-p"].push(new Promise((function(n){return e.C=n})))}};var scheduleUpdate=function(e,n){{e.u|=16}if(e.u&4){e.u|=512;return}attachToAncestor(e,e.T);var r=function(){return dispatchHooks(e,n)};return writeTask(r)};var dispatchHooks=function(e,n){var r=createTime("scheduleUpdate",e.m.h);var t=e._;var a;if(n){{e.u|=256;if(e.$){e.$.map((function(e){var n=e[0],r=e[1];return safeCall(t,n,r)}));e.$=undefined}}}r();return enqueue(a,(function(){return updateComponent(e,t,n)}))};var enqueue=function(e,n){return isPromisey(e)?e.then(n):n()};var isPromisey=function(e){return e instanceof Promise||e&&e.then&&typeof e.then==="function"};var updateComponent=function(e,n,r){return __awaiter(void 0,void 0,void 0,(function(){var t,a,i,o,u,c,f;return __generator(this,(function(s){a=e.$hostElement$;i=createTime("update",e.m.h);o=a["s-rc"];if(r){attachStyles(e)}u=createTime("render",e.m.h);{callRender(e,n,a,r)}if(o){o.map((function(e){return e()}));a["s-rc"]=undefined}u();i();{c=(t=a["s-p"])!==null&&t!==void 0?t:[];f=function(){return postUpdateComponent(e)};if(c.length===0){f()}else{Promise.all(c).then(f);e.u|=4;c.length=0}}return[2]}))}))};var callRender=function(e,n,r,t){try{n=n.render();{e.u&=~16}{e.u|=2}{{{renderVdom(e,n,t)}}}}catch(n){consoleError(n,e.$hostElement$)}return null};var postUpdateComponent=function(e){var n=e.m.h;var r=e.$hostElement$;var t=createTime("postUpdate",n);var a=e._;var i=e.T;if(!(e.u&64)){e.u|=64;{addHydratedFlag(r)}{safeCall(a,"componentDidLoad")}t();{e.k(r);if(!i){appDidLoad()}}}else{t()}{if(e.C){e.C();e.C=undefined}if(e.u&512){nextTick((function(){return scheduleUpdate(e,false)}))}e.u&=~(4|512)}};var appDidLoad=function(e){{addHydratedFlag(doc.documentElement)}nextTick((function(){return emitEvent(win,"appload",{detail:{namespace:NAMESPACE}})}))};var safeCall=function(e,n,r){if(e&&e[n]){try{return e[n](r)}catch(e){consoleError(e)}}return undefined};var addHydratedFlag=function(e){return e.setAttribute("hydrated","")};var getValue=function(e,n){return getHostRef(e).H.get(n)};var setValue=function(e,n,r,t){var a=getHostRef(e);var i=a.H.get(n);var o=a.u;var u=a._;r=parsePropertyValue(r,t.V[n][0]);var c=Number.isNaN(i)&&Number.isNaN(r);var f=r!==i&&!c;if((!(o&8)||i===undefined)&&f){a.H.set(n,r);if(u){if((o&(2|16))===2){scheduleUpdate(a,false)}}}};var proxyComponent=function(e,n,r){var t;if(n.V){var a=Object.entries(n.V);var i=e.prototype;a.map((function(e){var t=e[0],a=e[1][0];if(a&31||r&2&&a&32){Object.defineProperty(i,t,{get:function(){return getValue(this,t)},set:function(e){setValue(this,t,e,n)},configurable:true,enumerable:true})}}));if(r&1){var o=new Map;i.attributeChangedCallback=function(e,r,t){var a=this;plt.jmp((function(){var u=o.get(e);if(a.hasOwnProperty(u)){t=a[u];delete a[u]}else if(i.hasOwnProperty(u)&&typeof a[u]==="number"&&a[u]==t){return}else if(u==null){var c=getHostRef(a);var f=c===null||c===void 0?void 0:c.u;if(!(f&8)&&f&128&&t!==r){var s=c._;var l=n.A[e];l===null||l===void 0?void 0:l.forEach((function(n){if(s[n]!=null){s[n].call(s,t,r,e)}}))}return}a[u]=t===null&&typeof a[u]==="boolean"?false:t}))};e.observedAttributes=Array.from(new Set(__spreadArray(__spreadArray([],Object.keys((t=n.A)!==null&&t!==void 0?t:{}),true),a.filter((function(e){var n=e[0],r=e[1];return r[0]&15})).map((function(e){var n=e[0],r=e[1];var t=r[1]||n;o.set(t,n);return t})),true)))}}return e};var initializeComponent=function(e,n,r,t){return __awaiter(void 0,void 0,void 0,(function(){var e,t,a,i,o,u,c,f;return __generator(this,(function(s){switch(s.label){case 0:if(!((n.u&32)===0))return[3,3];n.u|=32;e=loadModule(r);if(!e.then)return[3,2];t=uniqueTime();return[4,e];case 1:e=s.sent();t();s.label=2;case 2:if(!e.isProxied){proxyComponent(e,r,2);e.isProxied=true}a=createTime("createInstance",r.h);{n.u|=8}try{new e(n)}catch(e){consoleError(e)}{n.u&=~8}a();if(e.style){i=e.style;o=getScopeId(r);if(!styles.has(o)){u=createTime("registerStyles",r.h);registerStyle(o,i,!!(r.u&1));u()}}s.label=3;case 3:c=n.T;f=function(){return scheduleUpdate(n,true)};if(c&&c["s-rc"]){c["s-rc"].push(f)}else{f()}return[2]}}))}))};var fireConnectedCallback=function(e){};var connectedCallback=function(e){if((plt.u&1)===0){var n=getHostRef(e);var r=n.m;var t=createTime("connectedCallback",r.h);if(!(n.u&1)){n.u|=1;{var a=e;while(a=a.parentNode||a.host){if(a["s-p"]){attachToAncestor(n,n.T=a);break}}}if(r.V){Object.entries(r.V).map((function(n){var r=n[0],t=n[1][0];if(t&31&&e.hasOwnProperty(r)){var a=e[r];delete e[r];e[r]=a}}))}{initializeComponent(e,n,r)}}else{addHostEventListeners(e,n,r.R);if(n===null||n===void 0?void 0:n._);else if(n===null||n===void 0?void 0:n.q){n.q.then((function(){return fireConnectedCallback()}))}}t()}};var disconnectInstance=function(e){{safeCall(e,"disconnectedCallback")}};var disconnectedCallback=function(e){return __awaiter(void 0,void 0,void 0,(function(){var n;return __generator(this,(function(r){if((plt.u&1)===0){n=getHostRef(e);{if(n.M){n.M.map((function(e){return e()}));n.M=undefined}}if(n===null||n===void 0?void 0:n._){disconnectInstance(n._)}else if(n===null||n===void 0?void 0:n.q){n.q.then((function(){return disconnectInstance(n._)}))}}return[2]}))}))};var bootstrapLazy=function(e,n){if(n===void 0){n={}}var r;var t=createTime();var a=[];var i=n.exclude||[];var o=win.customElements;var u=doc.head;var c=u.querySelector("meta[charset]");var f=doc.createElement("style");var s=[];var l;var v=true;Object.assign(plt,n);plt.P=new URL(n.resourcesUrl||"./",doc.baseURI).href;e.map((function(e){e[1].map((function(n){var r={u:n[0],h:n[1],V:n[2],R:n[3]};{r.V=n[2]}{r.R=n[3]}var t=r.h;var u=function(e){__extends(n,e);function n(n){var t=e.call(this,n)||this;n=t;registerHost(n,r);if(r.u&1){{{n.attachShadow({mode:"open"})}}}return t}n.prototype.connectedCallback=function(){var e=this;if(l){clearTimeout(l);l=null}if(v){s.push(this)}else{plt.jmp((function(){return connectedCallback(e)}))}};n.prototype.disconnectedCallback=function(){var e=this;plt.jmp((function(){return disconnectedCallback(e)}))};n.prototype.componentOnReady=function(){return getHostRef(this).q};return n}(HTMLElement);r.D=e[0];if(!i.includes(t)&&!o.get(t)){a.push(t);o.define(t,proxyComponent(u,r,1))}}))}));{f.innerHTML=a+HYDRATED_CSS;f.setAttribute("data-styles","");var d=(r=plt.p)!==null&&r!==void 0?r:queryNonceMetaTagContent(doc);if(d!=null){f.setAttribute("nonce",d)}u.insertBefore(f,c?c.nextSibling:u.firstChild)}v=false;if(s.length){s.map((function(e){return e.connectedCallback()}))}else{{plt.jmp((function(){return l=setTimeout(appDidLoad,30)}))}}t()};var addHostEventListeners=function(e,n,r,t){if(r){r.map((function(r){var t=r[0],a=r[1],i=r[2];var o=e;var u=hostListenerProxy(n,i);var c=hostListenerOpts(t);plt.ael(o,a,u,c);(n.M=n.M||[]).push((function(){return plt.rel(o,a,u,c)}))}))}};var hostListenerProxy=function(e,n){return function(r){try{{if(e.u&256){e._[n](r)}else{(e.$=e.$||[]).push([n,r])}}}catch(e){consoleError(e)}}};var hostListenerOpts=function(e){return(e&2)!==0};var setNonce=function(e){return plt.p=e};var hostRefs=new WeakMap;var getHostRef=function(e){return hostRefs.get(e)};var registerInstance=function(e,n){return hostRefs.set(n._=e,n)};var registerHost=function(e,n){var r={u:0,$hostElement$:e,m:n,H:new Map};{r.q=new Promise((function(e){return r.k=e}));e["s-p"]=[];e["s-rc"]=[]}addHostEventListeners(e,r,n.R);return hostRefs.set(e,r)};var consoleError=function(e,n){return(0,console.error)(e,n)};var cmpModules=new Map;var loadModule=function(e,n,r){var t=e.h.replace(/-/g,"_");var a=e.D;var i=cmpModules.get(a);if(i){return i[t]}if(!r||!BUILD.hotModuleReplacement){var o=function(e){cmpModules.set(a,e);return e[t]};switch(a){case"mds-accordion-timer":return import("./mds-accordion-timer.entry.js").then(o,consoleError)}}return import("./".concat(a,".entry.js").concat("")).then((function(e){{cmpModules.set(a,e)}return e[t]}),consoleError)};var styles=new Map;var win=typeof window!=="undefined"?window:{};var doc=win.document||{head:{}};var plt={u:0,P:"",jmp:function(e){return e()},raf:function(e){return requestAnimationFrame(e)},ael:function(e,n,r,t){return e.addEventListener(n,r,t)},rel:function(e,n,r,t){return e.removeEventListener(n,r,t)},ce:function(e,n){return new CustomEvent(e,n)}};var promiseResolve=function(e){return Promise.resolve(e)};var supportsConstructableStylesheets=function(){try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(e){}return false}();var queueDomReads=[];var queueDomWrites=[];var queueTask=function(e,n){return function(r){e.push(r);if(!queuePending){queuePending=true;if(n&&plt.u&4){nextTick(flush)}else{plt.raf(flush)}}}};var consume=function(e){for(var n=0;n<e.length;n++){try{e[n](performance.now())}catch(e){consoleError(e)}}e.length=0};var flush=function(){consume(queueDomReads);{consume(queueDomWrites);if(queuePending=queueDomReads.length>0){plt.raf(flush)}}};var nextTick=function(e){return promiseResolve().then(e)};var writeTask=queueTask(queueDomWrites,true);export{Host as H,bootstrapLazy as b,createEvent as c,getElement as g,h,promiseResolve as p,registerInstance as r,setNonce as s};
@@ -1 +1 @@
1
- import{b as bootstrapLazy}from"./index-3fd8fd3d.js";export{s as setNonce}from"./index-3fd8fd3d.js";var defineCustomElements=function(e,o){if(typeof window==="undefined")return undefined;return bootstrapLazy([["mds-accordion-timer",[[1,"mds-accordion-timer",{duration:[2],time:[32]},[[0,"mdsAccordionTimerItemClickSelect","onClickActive"],[0,"mdsAccordionTimerItemMouseEnterSelect","onMouseEnterSelect"],[0,"mdsAccordionTimerItemMouseLeaveSelect","onMouseLeaveSelect"]]]]]],o)};export{defineCustomElements};
1
+ import{b as bootstrapLazy}from"./index-1e1d02d3.js";export{s as setNonce}from"./index-1e1d02d3.js";var defineCustomElements=function(e,o){if(typeof window==="undefined")return undefined;return bootstrapLazy([["mds-accordion-timer",[[1,"mds-accordion-timer",{duration:[2],time:[32]},[[0,"mdsAccordionTimerItemClickSelect","onClickActive"],[0,"mdsAccordionTimerItemMouseEnterSelect","onMouseEnterSelect"],[0,"mdsAccordionTimerItemMouseLeaveSelect","onMouseLeaveSelect"]]]]]],o)};export{defineCustomElements};
@@ -1 +1 @@
1
- import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-3fd8fd3d.js";var mdsAccordionTimerCss=":host{--mds-accordion-timer-progress-bar-color:rgb(var(--tone-neutral-03));--mds-accordion-timer-progress-bar-background:rgb(var(--tone-neutral-08));--mds-accordion-timer-progress-bar-thickness:0.25rem;--mds-accordion-timer-duration:500ms;display:block}";var MdsAccordionTimer=function(){function e(e){var t=this;registerInstance(this,e);this.changeEvent=createEvent(this,"mdsAccordionTimerChange",7);this.clearIntervals=function(){window.clearInterval(t.timer);window.clearInterval(t.timeChecker);t.timeChecker=0};this.progress=function(){return Math.abs(t.remainingTime()/t.duration-1)};this.addTimeListener=function(){t.timeChecker=window.setInterval((function(){var e=t.progress();if(t.selectedItem!==undefined){t.selectedItem.progress=e}if(e===1){t.selectedItem.progress=0;t.startNext()}}),100)};this.beginningTime=function(){t.timeStarted=(new Date).getTime();return t.timeStarted};this.remainingTime=function(){var e=t.selectedItemDurationTime-((new Date).getTime()-t.timeStarted);return e>=0?e:0};this.setSelectedItem=function(e){t.children.forEach((function(i,r){if(r===e){i.selected=true;t.selectedItem=i;t.changeEvent.emit()}else{i.selected=false}}))};this.startNext=function(){var e=t.selectedItem.uuid+1>t.children.length-1?0:t.selectedItem.uuid+1;t.setSelectedItem(e);t.startTimer()};this.startTimer=function(){t.clearIntervals();t.time=t.beginningTime();t.selectedItemDurationTime=t.duration;t.addTimeListener()};this.playTimer=function(){t.beginningTime();t.addTimeListener()};this.pauseTimer=function(){t.clearIntervals();t.selectedItemDurationTime=t.remainingTime()};this.stopTimer=function(){t.clearIntervals()};this.time=0;this.duration=1e4}e.prototype.componentDidLoad=function(){var e=this;this.children=this.element.querySelectorAll("mds-accordion-timer-item");this.children.forEach((function(t,i){t.uuid=i;if(t.selected){e.selectedItem=t}}));if(this.selectedItem!==undefined){this.startTimer()}};e.prototype.disconnectedCallback=function(){this.stopTimer();this.clearIntervals()};e.prototype.onClickActive=function(e){if(this.selectedItem){this.selectedItem.progress=0}this.setSelectedItem(e.detail.uuid);this.startTimer();this.pauseTimer()};e.prototype.onMouseEnterSelect=function(){this.pauseTimer()};e.prototype.onMouseLeaveSelect=function(){if(this.timeChecker===0){this.playTimer()}};e.prototype.render=function(){return h(Host,null,h("slot",null))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();MdsAccordionTimer.style=mdsAccordionTimerCss;export{MdsAccordionTimer as mds_accordion_timer};
1
+ import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-1e1d02d3.js";var mdsAccordionTimerCss=":host{--mds-accordion-timer-progress-bar-color:rgb(var(--tone-neutral-03));--mds-accordion-timer-progress-bar-background:rgb(var(--tone-neutral-08));--mds-accordion-timer-progress-bar-thickness:0.25rem;--mds-accordion-timer-duration:500ms;display:block}";var MdsAccordionTimer=function(){function i(i){var t=this;registerInstance(this,i);this.changeEvent=createEvent(this,"mdsAccordionTimerChange",7);this.clearIntervals=function(){window.clearInterval(t.timer);window.clearInterval(t.timeChecker);t.timeChecker=0};this.progress=function(){return Math.abs(t.remainingTime()/t.duration-1)};this.addTimeListener=function(){t.timeChecker=window.setInterval((function(){var i=t.progress();if(t.selectedItem!==undefined){t.selectedItem.progress=i}if(i===1){t.selectedItem.progress=0;t.startNext()}}),100)};this.beginningTime=function(){t.timeStarted=(new Date).getTime();return t.timeStarted};this.remainingTime=function(){var i=t.selectedItemDurationTime-((new Date).getTime()-t.timeStarted);return i>=0?i:0};this.setSelectedItem=function(i){t.children.forEach((function(n,s){if(s===i){n.selected=true;t.selectedItem=n;t.changeEvent.emit()}else{n.selected=false}}))};this.startNext=function(){var i=t.selectedItem.uuid+1>t.children.length-1?0:t.selectedItem.uuid+1;t.setSelectedItem(i);t.startTimer()};this.startTimer=function(){t.clearIntervals();t.time=t.beginningTime();t.selectedItemDurationTime=t.duration;t.addTimeListener()};this.playTimer=function(){t.beginningTime();t.addTimeListener()};this.pauseTimer=function(){t.clearIntervals();t.selectedItemDurationTime=t.remainingTime()};this.stopTimer=function(){t.clearIntervals()};this.time=0;this.duration=1e4}i.prototype.componentDidLoad=function(){var i=this;this.children=this.element.querySelectorAll("mds-accordion-timer-item");this.children.forEach((function(t,n){t.uuid=n;if(t.selected){i.selectedItem=t}}));if(this.selectedItem!==undefined){this.startTimer()}};i.prototype.disconnectedCallback=function(){this.stopTimer();this.clearIntervals()};i.prototype.onClickActive=function(i){if(this.selectedItem){this.selectedItem.progress=0}this.setSelectedItem(i.detail.uuid);this.startTimer();this.pauseTimer()};i.prototype.onMouseEnterSelect=function(){this.pauseTimer()};i.prototype.onMouseLeaveSelect=function(){if(this.timeChecker===0){this.playTimer()}};i.prototype.render=function(){return h(Host,null,h("slot",null))};Object.defineProperty(i.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return i}();MdsAccordionTimer.style=mdsAccordionTimerCss;export{MdsAccordionTimer as mds_accordion_timer};
@@ -1 +1 @@
1
- import{p as promiseResolve,b as bootstrapLazy}from"./index-3fd8fd3d.js";export{s as setNonce}from"./index-3fd8fd3d.js";var patchBrowser=function(){var e=import.meta.url;var r={};if(e!==""){r.resourcesUrl=new URL(".",e).href}return promiseResolve(r)};patchBrowser().then((function(e){return bootstrapLazy([["mds-accordion-timer",[[1,"mds-accordion-timer",{duration:[2],time:[32]},[[0,"mdsAccordionTimerItemClickSelect","onClickActive"],[0,"mdsAccordionTimerItemMouseEnterSelect","onMouseEnterSelect"],[0,"mdsAccordionTimerItemMouseLeaveSelect","onMouseLeaveSelect"]]]]]],e)}));
1
+ import{p as promiseResolve,b as bootstrapLazy}from"./index-1e1d02d3.js";export{s as setNonce}from"./index-1e1d02d3.js";var patchBrowser=function(){var e=import.meta.url;var o={};if(e!==""){o.resourcesUrl=new URL(".",e).href}return promiseResolve(o)};patchBrowser().then((function(e){return bootstrapLazy([["mds-accordion-timer",[[1,"mds-accordion-timer",{duration:[2],time:[32]},[[0,"mdsAccordionTimerItemClickSelect","onClickActive"],[0,"mdsAccordionTimerItemMouseEnterSelect","onMouseEnterSelect"],[0,"mdsAccordionTimerItemMouseLeaveSelect","onMouseLeaveSelect"]]]]]],e)}));
@@ -1 +1 @@
1
- import{p as e,b as o}from"./p-d1be03fa.js";export{s as setNonce}from"./p-d1be03fa.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>o([["p-5046d553",[[1,"mds-accordion-timer",{duration:[2],time:[32]},[[0,"mdsAccordionTimerItemClickSelect","onClickActive"],[0,"mdsAccordionTimerItemMouseEnterSelect","onMouseEnterSelect"],[0,"mdsAccordionTimerItemMouseLeaveSelect","onMouseLeaveSelect"]]]]]],e)));
1
+ import{p as e,b as o}from"./p-70e86e8e.js";export{s as setNonce}from"./p-70e86e8e.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>o([["p-57415df8",[[1,"mds-accordion-timer",{duration:[2],time:[32]},[[0,"mdsAccordionTimerItemClickSelect","onClickActive"],[0,"mdsAccordionTimerItemMouseEnterSelect","onMouseEnterSelect"],[0,"mdsAccordionTimerItemMouseLeaveSelect","onMouseLeaveSelect"]]]]]],e)));
@@ -115,7 +115,7 @@ DOMTokenList
115
115
  var resourcesUrl = scriptElm ? scriptElm.getAttribute('data-resources-url') || scriptElm.src : '';
116
116
  var start = function() {
117
117
  // if src is not present then origin is "null", and new URL() throws TypeError: Failed to construct 'URL': Invalid base URL
118
- var url = new URL('./p-1bc788d2.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
118
+ var url = new URL('./p-3ba9d29a.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
119
119
  System.import(url.href);
120
120
  };
121
121
 
@@ -0,0 +1 @@
1
+ System.register(["./p-6584787f.system.js"],(function(e,t){"use strict";var c,n;return{setters:[function(t){c=t.p;n=t.b;e("setNonce",t.s)}],execute:function(){var e=function(){var e=t.meta.url;var n={};if(e!==""){n.resourcesUrl=new URL(".",e).href}return c(n)};e().then((function(e){return n([["p-b86c017a.system",[[1,"mds-accordion-timer",{duration:[2],time:[32]},[[0,"mdsAccordionTimerItemClickSelect","onClickActive"],[0,"mdsAccordionTimerItemMouseEnterSelect","onMouseEnterSelect"],[0,"mdsAccordionTimerItemMouseLeaveSelect","onMouseLeaveSelect"]]]]]],e)}))}}}));
@@ -1 +1 @@
1
- import{r as t,c as s,h as i,H as h,g as o}from"./p-d1be03fa.js";const r=class{constructor(i){t(this,i),this.changeEvent=s(this,"mdsAccordionTimerChange",7),this.clearIntervals=()=>{window.clearInterval(this.timer),window.clearInterval(this.timeChecker),this.timeChecker=0},this.progress=()=>Math.abs(this.remainingTime()/this.duration-1),this.addTimeListener=()=>{this.timeChecker=window.setInterval((()=>{const t=this.progress();void 0!==this.selectedItem&&(this.selectedItem.progress=t),1===t&&(this.selectedItem.progress=0,this.startNext())}),100)},this.beginningTime=()=>(this.timeStarted=(new Date).getTime(),this.timeStarted),this.remainingTime=()=>{const t=this.selectedItemDurationTime-((new Date).getTime()-this.timeStarted);return t>=0?t:0},this.setSelectedItem=t=>{this.children.forEach(((s,i)=>{i===t?(s.selected=!0,this.selectedItem=s,this.changeEvent.emit()):s.selected=!1}))},this.startNext=()=>{this.setSelectedItem(this.selectedItem.uuid+1>this.children.length-1?0:this.selectedItem.uuid+1),this.startTimer()},this.startTimer=()=>{this.clearIntervals(),this.time=this.beginningTime(),this.selectedItemDurationTime=this.duration,this.addTimeListener()},this.playTimer=()=>{this.beginningTime(),this.addTimeListener()},this.pauseTimer=()=>{this.clearIntervals(),this.selectedItemDurationTime=this.remainingTime()},this.stopTimer=()=>{this.clearIntervals()},this.time=0,this.duration=1e4}componentDidLoad(){this.children=this.element.querySelectorAll("mds-accordion-timer-item"),this.children.forEach(((t,s)=>{t.uuid=s,t.selected&&(this.selectedItem=t)})),void 0!==this.selectedItem&&this.startTimer()}disconnectedCallback(){this.stopTimer(),this.clearIntervals()}onClickActive(t){this.selectedItem&&(this.selectedItem.progress=0),this.setSelectedItem(t.detail.uuid),this.startTimer(),this.pauseTimer()}onMouseEnterSelect(){this.pauseTimer()}onMouseLeaveSelect(){0===this.timeChecker&&this.playTimer()}render(){return i(h,null,i("slot",null))}get element(){return o(this)}};r.style=":host{--mds-accordion-timer-progress-bar-color:rgb(var(--tone-neutral-03));--mds-accordion-timer-progress-bar-background:rgb(var(--tone-neutral-08));--mds-accordion-timer-progress-bar-thickness:0.25rem;--mds-accordion-timer-duration:500ms;display:block}";export{r as mds_accordion_timer}
1
+ import{r as t,c as s,h as i,H as h,g as e}from"./p-70e86e8e.js";const o=class{constructor(i){t(this,i),this.changeEvent=s(this,"mdsAccordionTimerChange",7),this.clearIntervals=()=>{window.clearInterval(this.timer),window.clearInterval(this.timeChecker),this.timeChecker=0},this.progress=()=>Math.abs(this.remainingTime()/this.duration-1),this.addTimeListener=()=>{this.timeChecker=window.setInterval((()=>{const t=this.progress();void 0!==this.selectedItem&&(this.selectedItem.progress=t),1===t&&(this.selectedItem.progress=0,this.startNext())}),100)},this.beginningTime=()=>(this.timeStarted=(new Date).getTime(),this.timeStarted),this.remainingTime=()=>{const t=this.selectedItemDurationTime-((new Date).getTime()-this.timeStarted);return t>=0?t:0},this.setSelectedItem=t=>{this.children.forEach(((s,i)=>{i===t?(s.selected=!0,this.selectedItem=s,this.changeEvent.emit()):s.selected=!1}))},this.startNext=()=>{this.setSelectedItem(this.selectedItem.uuid+1>this.children.length-1?0:this.selectedItem.uuid+1),this.startTimer()},this.startTimer=()=>{this.clearIntervals(),this.time=this.beginningTime(),this.selectedItemDurationTime=this.duration,this.addTimeListener()},this.playTimer=()=>{this.beginningTime(),this.addTimeListener()},this.pauseTimer=()=>{this.clearIntervals(),this.selectedItemDurationTime=this.remainingTime()},this.stopTimer=()=>{this.clearIntervals()},this.time=0,this.duration=1e4}componentDidLoad(){this.children=this.element.querySelectorAll("mds-accordion-timer-item"),this.children.forEach(((t,s)=>{t.uuid=s,t.selected&&(this.selectedItem=t)})),void 0!==this.selectedItem&&this.startTimer()}disconnectedCallback(){this.stopTimer(),this.clearIntervals()}onClickActive(t){this.selectedItem&&(this.selectedItem.progress=0),this.setSelectedItem(t.detail.uuid),this.startTimer(),this.pauseTimer()}onMouseEnterSelect(){this.pauseTimer()}onMouseLeaveSelect(){0===this.timeChecker&&this.playTimer()}render(){return i(h,null,i("slot",null))}get element(){return e(this)}};o.style=":host{--mds-accordion-timer-progress-bar-color:rgb(var(--tone-neutral-03));--mds-accordion-timer-progress-bar-background:rgb(var(--tone-neutral-08));--mds-accordion-timer-progress-bar-thickness:0.25rem;--mds-accordion-timer-duration:500ms;display:block}";export{o as mds_accordion_timer}