@devschile/chucao 1.6.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/README.md +5 -3
  2. package/dist/chucao/chucao.css +1 -1
  3. package/dist/chucao/chucao.esm.js +1 -1
  4. package/dist/chucao/chucao.esm.js.map +1 -1
  5. package/dist/chucao/index.esm.js +1 -1
  6. package/dist/chucao/index.esm.js.map +1 -1
  7. package/dist/chucao/p-0305f2eb.entry.js +2 -0
  8. package/dist/chucao/{p-af2c57b5.entry.js.map → p-0305f2eb.entry.js.map} +1 -1
  9. package/dist/chucao/{p-dde82d7d.entry.js → p-053d58a4.entry.js} +2 -2
  10. package/dist/chucao/{p-fcc70c8d.entry.js → p-20492b73.entry.js} +2 -2
  11. package/dist/chucao/p-488c7838.entry.js +2 -0
  12. package/dist/chucao/{p-175aee94.entry.js → p-9a614e82.entry.js} +2 -2
  13. package/dist/chucao/{p-d75eeeea.entry.js → p-ad3206a2.entry.js} +2 -2
  14. package/dist/chucao/p-c598f978.entry.js +2 -0
  15. package/dist/chucao/p-c598f978.entry.js.map +1 -0
  16. package/dist/chucao/{p-85a49fd7.entry.js → p-fe8e9537.entry.js} +2 -2
  17. package/dist/chucao/p-pfWAsOzE.js +3 -0
  18. package/dist/chucao/p-pfWAsOzE.js.map +1 -0
  19. package/dist/cjs/ch-accordion.cjs.entry.js +1 -1
  20. package/dist/cjs/{ch-badge_6.cjs.entry.js → ch-alert_8.cjs.entry.js} +73 -9
  21. package/dist/cjs/ch-alert_8.cjs.entry.js.map +1 -0
  22. package/dist/cjs/ch-checkbox.cjs.entry.js +2 -2
  23. package/dist/cjs/ch-divider.cjs.entry.js +2 -2
  24. package/dist/cjs/ch-link.cjs.entry.js +1 -1
  25. package/dist/cjs/ch-radio.cjs.entry.js +2 -2
  26. package/dist/cjs/ch-tabs.cjs.entry.js +2 -2
  27. package/dist/cjs/ch-textarea.cjs.entry.js +2 -2
  28. package/dist/cjs/chucao.cjs.js +3 -3
  29. package/dist/cjs/chucao.cjs.js.map +1 -1
  30. package/dist/cjs/{index-CiYvuUBV.js → index-ls4U227d.js} +38 -9
  31. package/dist/cjs/index-ls4U227d.js.map +1 -0
  32. package/dist/cjs/index.cjs.js +7 -1
  33. package/dist/cjs/index.cjs.js.map +1 -1
  34. package/dist/cjs/loader.cjs.js +2 -2
  35. package/dist/collection/collection-manifest.json +3 -1
  36. package/dist/collection/components/ch-alert/ch-alert.css +77 -0
  37. package/dist/collection/components/ch-alert/ch-alert.js +118 -0
  38. package/dist/collection/components/ch-alert/ch-alert.js.map +1 -0
  39. package/dist/collection/components/ch-badge/ch-badge.js +1 -1
  40. package/dist/collection/components/ch-button/ch-button.js +1 -1
  41. package/dist/collection/components/ch-button/ch-button.js.map +1 -1
  42. package/dist/collection/components/ch-card/ch-card.js +1 -1
  43. package/dist/collection/components/ch-checkbox/ch-checkbox.js +1 -1
  44. package/dist/collection/components/ch-divider/ch-divider.js +1 -1
  45. package/dist/collection/components/ch-input/ch-input.js +1 -1
  46. package/dist/collection/components/ch-radio/ch-radio.js +1 -1
  47. package/dist/collection/components/ch-select/ch-select.js +1 -1
  48. package/dist/collection/components/ch-spinner/ch-spinner.css +39 -0
  49. package/dist/collection/components/ch-spinner/ch-spinner.js +90 -0
  50. package/dist/collection/components/ch-spinner/ch-spinner.js.map +1 -0
  51. package/dist/collection/components/ch-switch/ch-switch.js +1 -1
  52. package/dist/collection/components/ch-tabs/ch-tabs.js +1 -1
  53. package/dist/collection/components/ch-textarea/ch-textarea.js +1 -1
  54. package/dist/collection/tokens/tokens.js +5 -1
  55. package/dist/collection/tokens/tokens.js.map +1 -1
  56. package/dist/collection/tokens/types.js.map +1 -1
  57. package/dist/components/ch-accordion.js +1 -1
  58. package/dist/components/ch-alert.d.ts +11 -0
  59. package/dist/components/ch-alert.js +2 -0
  60. package/dist/components/ch-alert.js.map +1 -0
  61. package/dist/components/ch-badge.js +1 -1
  62. package/dist/components/ch-button.js +1 -1
  63. package/dist/components/ch-button.js.map +1 -1
  64. package/dist/components/ch-card.js +1 -1
  65. package/dist/components/ch-card.js.map +1 -1
  66. package/dist/components/ch-checkbox.js +1 -1
  67. package/dist/components/ch-divider.js +1 -1
  68. package/dist/components/ch-input.js +1 -1
  69. package/dist/components/ch-link.js +1 -1
  70. package/dist/components/ch-radio.js +1 -1
  71. package/dist/components/ch-select.js +1 -1
  72. package/dist/components/ch-spinner.d.ts +11 -0
  73. package/dist/components/ch-spinner.js +2 -0
  74. package/dist/components/ch-spinner.js.map +1 -0
  75. package/dist/components/ch-switch.js +1 -1
  76. package/dist/components/ch-tabs.js +1 -1
  77. package/dist/components/ch-textarea.js +1 -1
  78. package/dist/components/index.js +1 -1
  79. package/dist/components/index.js.map +1 -1
  80. package/dist/components/p-ONE3uKkF.js +2 -0
  81. package/dist/components/p-ONE3uKkF.js.map +1 -0
  82. package/dist/esm/ch-accordion.entry.js +1 -1
  83. package/dist/esm/{ch-badge_6.entry.js → ch-alert_8.entry.js} +72 -10
  84. package/dist/esm/ch-alert_8.entry.js.map +1 -0
  85. package/dist/esm/ch-checkbox.entry.js +2 -2
  86. package/dist/esm/ch-divider.entry.js +2 -2
  87. package/dist/esm/ch-link.entry.js +1 -1
  88. package/dist/esm/ch-radio.entry.js +2 -2
  89. package/dist/esm/ch-tabs.entry.js +2 -2
  90. package/dist/esm/ch-textarea.entry.js +2 -2
  91. package/dist/esm/chucao.js +4 -4
  92. package/dist/esm/chucao.js.map +1 -1
  93. package/dist/esm/{index-ImsAHlk9.js → index-pfWAsOzE.js} +38 -9
  94. package/dist/esm/index-pfWAsOzE.js.map +1 -0
  95. package/dist/esm/index.js +6 -2
  96. package/dist/esm/index.js.map +1 -1
  97. package/dist/esm/loader.js +3 -3
  98. package/dist/types/components/ch-alert/ch-alert.d.ts +34 -0
  99. package/dist/types/components/ch-spinner/ch-spinner.d.ts +25 -0
  100. package/dist/types/components.d.ts +153 -0
  101. package/dist/types/stencil-public-runtime.d.ts +11 -0
  102. package/dist/types/tokens/tokens.d.ts +4 -0
  103. package/dist/types/tokens/types.d.ts +2 -2
  104. package/dist-react/components.d.ts +9 -1
  105. package/dist-react/components.js +18 -0
  106. package/dist-react/components.ts +25 -1
  107. package/dist-vue/index.d.ts +2 -0
  108. package/dist-vue/index.js +13 -0
  109. package/dist-vue/index.ts +17 -0
  110. package/hydrate/index.js +138 -16
  111. package/hydrate/index.mjs +138 -16
  112. package/package.json +6 -2
  113. package/dist/chucao/p-ImsAHlk9.js +0 -3
  114. package/dist/chucao/p-ImsAHlk9.js.map +0 -1
  115. package/dist/chucao/p-af2c57b5.entry.js +0 -2
  116. package/dist/chucao/p-b4520f1c.entry.js +0 -2
  117. package/dist/chucao/p-b4520f1c.entry.js.map +0 -1
  118. package/dist/chucao/p-fe0c9320.entry.js +0 -2
  119. package/dist/cjs/ch-badge_6.cjs.entry.js.map +0 -1
  120. package/dist/cjs/index-CiYvuUBV.js.map +0 -1
  121. package/dist/components/p-x4aZoujY.js +0 -2
  122. package/dist/components/p-x4aZoujY.js.map +0 -1
  123. package/dist/esm/ch-badge_6.entry.js.map +0 -1
  124. package/dist/esm/index-ImsAHlk9.js.map +0 -1
  125. /package/dist/chucao/{p-dde82d7d.entry.js.map → p-053d58a4.entry.js.map} +0 -0
  126. /package/dist/chucao/{p-fcc70c8d.entry.js.map → p-20492b73.entry.js.map} +0 -0
  127. /package/dist/chucao/{p-fe0c9320.entry.js.map → p-488c7838.entry.js.map} +0 -0
  128. /package/dist/chucao/{p-175aee94.entry.js.map → p-9a614e82.entry.js.map} +0 -0
  129. /package/dist/chucao/{p-d75eeeea.entry.js.map → p-ad3206a2.entry.js.map} +0 -0
  130. /package/dist/chucao/{p-85a49fd7.entry.js.map → p-fe8e9537.entry.js.map} +0 -0
package/hydrate/index.mjs CHANGED
@@ -133,7 +133,7 @@ const NAMESPACE = 'chucao';
133
133
  const BUILD = /* chucao */ { hotModuleReplacement: false, prop: true, propChangeCallback: false, slotRelocation: true, updatable: true};
134
134
 
135
135
  /*
136
- Stencil Hydrate Platform v4.43.5 | MIT Licensed | https://stenciljs.com
136
+ Stencil Hydrate Platform v4.44.0 | MIT Licensed | https://stenciljs.com
137
137
  */
138
138
  var __create = Object.create;
139
139
  var __defProp = Object.defineProperty;
@@ -463,6 +463,8 @@ var DEFAULT_DOC_DATA = {
463
463
  staticComponents: /* @__PURE__ */ new Set()
464
464
  };
465
465
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
466
+ var MAX_LAZY_LOAD_RETRIES = 3;
467
+ var LAZY_LOAD_RETRY_INTERVAL_MS = 1e3;
466
468
 
467
469
  // src/utils/style.ts
468
470
  function createStyleSheetIfNeededAndSupported(styles2) {
@@ -523,7 +525,7 @@ function getHostSlotNodes(childNodes, hostName, slotName) {
523
525
  slottedNodes.push(childNode);
524
526
  if (typeof slotName !== "undefined") return slottedNodes;
525
527
  }
526
- slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
528
+ slottedNodes = [...slottedNodes, ...getHostSlotNodes(internalCall(childNode, "childNodes"), hostName, slotName)];
527
529
  }
528
530
  return slottedNodes;
529
531
  }
@@ -765,6 +767,11 @@ var h = (nodeName, vnodeData, ...children) => {
765
767
  } else if (child != null && typeof child !== "boolean") {
766
768
  if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
767
769
  child = String(child);
770
+ } else if (typeof nodeName !== "function" && child.$flags$ === void 0) {
771
+ {
772
+ consoleError("Invalid vNode child");
773
+ }
774
+ continue;
768
775
  }
769
776
  if (simple && lastSimple) {
770
777
  vNodeChildren[vNodeChildren.length - 1].$text$ += child;
@@ -2276,7 +2283,10 @@ var markSlotContentForRelocation = (elm) => {
2276
2283
  const slotName = childNode["s-sn"];
2277
2284
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
2278
2285
  node = hostContentNodes[j];
2279
- if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
2286
+ if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && // let an exact named-slot match override a stale default-slot claim. Skip this for
2287
+ // `slotName === ''` itself - a matched default node's cached `s-sn` is `''` too, which
2288
+ // would trivially "match" on every re-render and force pointless re-insertion.
2289
+ (!node["s-sh"] || node["s-sh"] !== childNode["s-hn"] || slotName !== "" && getSlotName(node) === slotName)) {
2280
2290
  if (isNodeLocatedInSlot(node, slotName)) {
2281
2291
  let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
2282
2292
  checkSlotFallbackVisibility = true;
@@ -2788,10 +2798,12 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
2788
2798
 
2789
2799
  // src/runtime/initialize-component.ts
2790
2800
  var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2801
+ var _a2;
2791
2802
  let Cstr;
2792
2803
  try {
2793
2804
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
2794
2805
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
2806
+ hostRef.$flags$ &= -1025 /* hasFailedLoad */;
2795
2807
  const bundleId = cmpMeta.$lazyBundleId$;
2796
2808
  if (bundleId) {
2797
2809
  const CstrImport = loadModule(cmpMeta);
@@ -2803,6 +2815,11 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2803
2815
  Cstr = CstrImport;
2804
2816
  }
2805
2817
  if (!Cstr) {
2818
+ hostRef.$flags$ &= -33 /* hasInitializedComponent */;
2819
+ hostRef.$loadRetryCount$ = ((_a2 = hostRef.$loadRetryCount$) != null ? _a2 : 0) + 1;
2820
+ if (hostRef.$loadRetryCount$ < MAX_LAZY_LOAD_RETRIES) {
2821
+ hostRef.$flags$ |= 1024 /* hasFailedLoad */;
2822
+ }
2806
2823
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
2807
2824
  }
2808
2825
  if (!Cstr.isProxied) {
@@ -2866,7 +2883,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2866
2883
  hostRef.$onRenderResolve$();
2867
2884
  hostRef.$onRenderResolve$ = void 0;
2868
2885
  }
2869
- if (hostRef.$onReadyResolve$) {
2886
+ if (hostRef.$onReadyResolve$ && !(hostRef.$flags$ & 1024 /* hasFailedLoad */)) {
2870
2887
  hostRef.$onReadyResolve$(elm);
2871
2888
  }
2872
2889
  }
@@ -2921,6 +2938,8 @@ var connectedCallback = (elm) => {
2921
2938
  } else {
2922
2939
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
2923
2940
  fireConnectedCallback(hostRef.$lazyInstance$, elm);
2941
+ } else if (hostRef.$flags$ & 1024 /* hasFailedLoad */) {
2942
+ setTimeout(() => initializeComponent(elm, hostRef, cmpMeta), LAZY_LOAD_RETRY_INTERVAL_MS);
2924
2943
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
2925
2944
  hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
2926
2945
  }
@@ -5237,6 +5256,62 @@ class ChAccordion {
5237
5256
  }; }
5238
5257
  }
5239
5258
 
5259
+ const chAlertCss = () => `:host{display:block}.alert{display:flex;align-items:flex-start;gap:var(--spacing-2xl);padding:var(--spacing-2xl) var(--spacing-3xl);border:var(--border-width) solid transparent;border-radius:var(--radius);font-size:var(--typography-size-sm);line-height:1.5}.alert-content{flex:1;min-width:0;overflow-wrap:anywhere}.alert--default{color:var(--text);background:var(--surface);border-color:var(--border)}.alert--positive{color:var(--color-status-positive);background:var(--color-status-positive-background);border-color:var(--color-status-positive)}.alert--warning{color:var(--color-status-warning);background:var(--color-status-warning-background);border-color:var(--color-status-warning)}.alert-dismiss{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:var(--spacing-2xs) var(--spacing-md);border:0;border-radius:var(--radius);background:none;color:inherit;cursor:pointer;font-family:var(--font-heading);font-size:var(--typography-size-lg);line-height:1;transition:background-color var(--duration-normal) var(--easing-default)}.alert-dismiss:hover{background:var(--surface-hover)}.alert-dismiss:focus-visible{outline:var(--focus-outline-width) solid currentColor;outline-offset:var(--focus-outline-offset)}@media (pointer: coarse){.alert-dismiss{min-width:44px;min-height:44px}}@media (prefers-reduced-motion: reduce){.alert-dismiss{transition:none}}`;
5260
+
5261
+ /**
5262
+ * Block-level status message.
5263
+ *
5264
+ * `warning` carries `role="alert"` and is announced assertively; `default` and
5265
+ * `positive` use `role="status"`, since a confirmation is not urgent enough to
5266
+ * interrupt. Both announce reliably when the alert is added to the page in
5267
+ * response to something — an alert already present at load may not be read out,
5268
+ * which is how live regions work rather than something this component controls.
5269
+ */
5270
+ class ChAlert {
5271
+ constructor(hostRef) {
5272
+ registerInstance(this, hostRef);
5273
+ this.chDismiss = createEvent(this, "chDismiss");
5274
+ }
5275
+ /**
5276
+ * The kind of message. `default` is neutral, `positive` confirms, and
5277
+ * `warning` covers both warnings and errors — the token scale has a single
5278
+ * status colour for the two of them.
5279
+ */
5280
+ variant = 'default';
5281
+ /**
5282
+ * Accessible label for the dismiss button, set as `aria-label`. Setting it
5283
+ * is what adds the button: the button's only content is a decorative glyph,
5284
+ * so without a label it would have no accessible name at all.
5285
+ */
5286
+ dismissLabel;
5287
+ /**
5288
+ * Emitted when the dismiss button is clicked. The alert stays in the DOM —
5289
+ * whether to remove it is the consumer's decision. If you do remove it, move
5290
+ * focus somewhere sensible first: removing the focused button drops focus to
5291
+ * `<body>`.
5292
+ */
5293
+ chDismiss;
5294
+ handleDismiss = () => {
5295
+ this.chDismiss.emit();
5296
+ };
5297
+ render() {
5298
+ const role = this.variant === 'warning' ? 'alert' : 'status';
5299
+ return (hAsync(Host, { key: '7d96602ad2c2b3824588f01d5b94d73098da6ce4' }, hAsync("div", { key: role, class: { alert: true, [`alert--${this.variant}`]: true }, role: role }, hAsync("div", { key: '64d7af5aad0e4b103b35cc2ba3756b1a1601b148', class: "alert-content" }, hAsync("slot", { key: '44573092407161bbeafe5117bddb54168b183d90' })), this.dismissLabel && (hAsync("button", { key: '018858ac292c0fb7f26c788f629638f533d0dfd6', class: "alert-dismiss", type: "button", "aria-label": this.dismissLabel, onClick: this.handleDismiss }, hAsync("span", { key: 'f6454d5285ed9c7c414d839d2d35d2ce0c271dd4', "aria-hidden": "true" }, "\u00D7"))))));
5300
+ }
5301
+ static get style() { return chAlertCss(); }
5302
+ static get cmpMeta() { return {
5303
+ "$flags$": 777,
5304
+ "$tagName$": "ch-alert",
5305
+ "$members$": {
5306
+ "variant": [1],
5307
+ "dismissLabel": [1, "dismiss-label"]
5308
+ },
5309
+ "$listeners$": undefined,
5310
+ "$lazyBundleId$": "-",
5311
+ "$attrsToReflect$": []
5312
+ }; }
5313
+ }
5314
+
5240
5315
  const chBadgeCss = () => `:host{display:inline-block}.badge{display:inline-block;padding:var(--spacing-2xs) var(--spacing-lg);border-radius:var(--radius-pill);font-size:var(--typography-size-xs);font-weight:var(--typography-weight-semibold);text-transform:uppercase;letter-spacing:var(--typography-tracking-badge)}.badge--default{background:var(--color-surface-hover);color:var(--accent)}.badge--positive{background:var(--color-status-positive-background);color:var(--color-status-positive)}.badge--warning{background:var(--color-status-warning-background);color:var(--color-status-warning)}`;
5241
5316
 
5242
5317
  class ChBadge {
@@ -5248,7 +5323,7 @@ class ChBadge {
5248
5323
  */
5249
5324
  variant = 'default';
5250
5325
  render() {
5251
- return (hAsync(Host, { key: 'c0acd8486b8265884b3c4a2a5a68bf10098a09cd' }, hAsync("span", { key: '2ae6af3f7ac4c6967dc6eefe607b3910ba341741', class: { badge: true, [`badge--${this.variant}`]: true } }, hAsync("slot", { key: '2aab4bb7e25492dc01cb94cf055efde3897f736b' }))));
5326
+ return (hAsync(Host, { key: 'ca1fb0c9d678b6ea5b68ca131ba153116bbd577d' }, hAsync("span", { key: '929e2268094bdad7df6e3c8371896e364ebf79c3', class: { badge: true, [`badge--${this.variant}`]: true } }, hAsync("slot", { key: '64422988ad046244722755d39e564295f79a6ce1' }))));
5252
5327
  }
5253
5328
  static get style() { return chBadgeCss(); }
5254
5329
  static get cmpMeta() { return {
@@ -5292,7 +5367,7 @@ class ChButton {
5292
5367
  this.chClick.emit(ev);
5293
5368
  };
5294
5369
  render() {
5295
- return (hAsync(Host, { key: '1fc74b55b6d69be97fba63f0fb2d72ffd217eafb' }, hAsync("button", { key: 'af6721f9eb066f7e0cb7a23031d43eb46fbbdf9e', class: { btn: true, [`btn--${this.variant}`]: true }, type: "button", disabled: this.disabled, "aria-label": this.label, onClick: this.handleClick }, hAsync("slot", { key: '2c42b74352aa7a79ac6bc231cdd828b7a62f5083' }))));
5370
+ return (hAsync(Host, { key: '9363b49e8d38c0fab49ed10356380ded20a8cf5e' }, hAsync("button", { key: '3c98506ae1418c4bc88f5aa72dfe058948556ed5', class: { btn: true, [`btn--${this.variant}`]: true }, type: "button", disabled: this.disabled, "aria-label": this.label, onClick: this.handleClick }, hAsync("slot", { key: 'cdcf4f656b995fa527d4139a41b2ea3c7086e065' }))));
5296
5371
  }
5297
5372
  static get style() { return chButtonCss(); }
5298
5373
  static get cmpMeta() { return {
@@ -5316,7 +5391,7 @@ class ChCard {
5316
5391
  registerInstance(this, hostRef);
5317
5392
  }
5318
5393
  render() {
5319
- return (hAsync(Host, { key: '89781abc150f0078e9d36233f02d2bb29f3d2cc1' }, hAsync("div", { key: '41271ca28fd5c045a4dad746ec7e2c7264a35aac', class: "card" }, hAsync("slot", { key: '1786ea797968b94fc48de08836fc0195b0731469' }))));
5394
+ return (hAsync(Host, { key: 'de99971fb6a845e8ca6c406d669abd64f7e45068' }, hAsync("div", { key: '6dcae41e636af83221f710212ed1ec16a21dcdde', class: "card" }, hAsync("slot", { key: 'b2a1354d297ce45c97f0ed4378f5710b4b0ac13d' }))));
5320
5395
  }
5321
5396
  static get style() { return chCardCss(); }
5322
5397
  static get cmpMeta() { return {
@@ -5396,7 +5471,7 @@ class ChCheckbox {
5396
5471
  return undefined;
5397
5472
  }
5398
5473
  render() {
5399
- return (hAsync(Host, { key: '746f0c29ea01a3a0c24360d964b3c0d65985f941' }, hAsync("label", { key: '9e423a2055ec4e2d77848b7c4b86cb200315a77d', class: { 'control': true, 'control--disabled': this.disabled }, htmlFor: this.checkboxId }, hAsync("input", { key: 'b355914b0b02c9887f93e2a50fcebaf60b21d5bb', id: this.checkboxId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), this.label && hAsync("span", { key: '6f7128ccac345af5c9224c0388f960575aebc150', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '402417ceee995e578248307a24ba6f9b1955bda8', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '281930b92221157759d3652391b0cdc337a1f25d', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
5474
+ return (hAsync(Host, { key: '4675fecfe18e63c55133ffb78e6a6c0548804e1b' }, hAsync("label", { key: '334ddbcfd3ef1640d84dc751a127a3fb6d69e722', class: { 'control': true, 'control--disabled': this.disabled }, htmlFor: this.checkboxId }, hAsync("input", { key: 'a251b722681f33d3c96ce04a0ce915b6be71a81c', id: this.checkboxId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), this.label && hAsync("span", { key: '2aa179c9467a1b22e7c37b16da44e677cc10bd69', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: 'd31d7b78cc4912b4441b0ab17eb44ed22ef67e6e', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'ae43049c16c7c61322785863d0c6e2e90e79d954', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
5400
5475
  }
5401
5476
  static get style() { return chCheckboxCss(); }
5402
5477
  static get cmpMeta() { return {
@@ -5430,7 +5505,7 @@ class ChDivider {
5430
5505
  */
5431
5506
  orientation = 'horizontal';
5432
5507
  render() {
5433
- return (hAsync(Host, { key: '30ad155d178afd93745eb4072a2d9a8012705191', class: { 'divider--vertical': this.orientation === 'vertical' } }, hAsync("hr", { key: 'ce239ccdebec97a2735e14ad62b81d14888881a5', class: { divider: true, [`divider--${this.orientation}`]: true }, "aria-orientation": this.orientation })));
5508
+ return (hAsync(Host, { key: '888debaaee690d5bbc5e276773f16ac7ead0129a', class: { 'divider--vertical': this.orientation === 'vertical' } }, hAsync("hr", { key: 'ae175f047605cfbe2b24d50e0dab56ac362c49a1', class: { divider: true, [`divider--${this.orientation}`]: true }, "aria-orientation": this.orientation })));
5434
5509
  }
5435
5510
  static get style() { return chDividerCss(); }
5436
5511
  static get cmpMeta() { return {
@@ -5525,7 +5600,7 @@ class ChInput {
5525
5600
  return undefined;
5526
5601
  }
5527
5602
  render() {
5528
- return (hAsync(Host, { key: '82557c17d49bf048b7056853a088565a243325be' }, this.label && (hAsync("label", { key: 'cc774b0001daa6c7f4e4bb8d62ea21698bd744e9', class: "label", htmlFor: this.inputId }, this.label)), hAsync("input", { key: 'dc30d9f798611a0a4bb577c18a2696d065a281ee', id: this.label ? this.inputId : undefined, class: { 'input': true, 'input--invalid': this.invalid }, type: this.type, name: this.name, placeholder: this.placeholder, disabled: this.disabled, required: this.required, value: this.value, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange }), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '21b76002a309dfe167e671fd270699f8699ed6b9', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'be64956da00a76dccdbf0979f3352b263a21fb12', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
5603
+ return (hAsync(Host, { key: '5587a60f279a66d0610ab0dd5f9e64510fe47313' }, this.label && (hAsync("label", { key: 'cc4d3718b5eba3f87dd91be2be2d8bfcccbad7db', class: "label", htmlFor: this.inputId }, this.label)), hAsync("input", { key: 'a40ed7693272f9bdbcec81afa3f6f81ea6aa3dac', id: this.label ? this.inputId : undefined, class: { 'input': true, 'input--invalid': this.invalid }, type: this.type, name: this.name, placeholder: this.placeholder, disabled: this.disabled, required: this.required, value: this.value, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange }), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: 'b574a65d362071b4528f87013a5349f63f0b1768', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '061d995029cd884daa9f7c228ade06036369bb24', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
5529
5604
  }
5530
5605
  static get style() { return chInputCss(); }
5531
5606
  static get cmpMeta() { return {
@@ -5673,7 +5748,7 @@ class ChRadio {
5673
5748
  }
5674
5749
  render() {
5675
5750
  const groupName = this.name || `${this.groupId}-group`;
5676
- return (hAsync(Host, { key: 'd9a24c29e5fe841d5c6fefc68bc22db1d9c4ee02' }, this.label && (hAsync("span", { key: 'c8dc580a29569ca98f7e6dafce797fa6ac5f7442', class: "group-label", id: this.labelId }, this.label)), hAsync("div", { key: '6b10d53fbf83286ad18b29d3238df4927b3341db', class: "radio-group", role: "radiogroup", "aria-labelledby": this.label ? this.labelId : undefined }, this.options.map(option => (hAsync("label", { class: { 'control': true, 'control--disabled': this.disabled || option.disabled } }, hAsync("input", { class: { 'input': true, 'input--invalid': this.invalid }, type: "radio", name: groupName, value: option.value, checked: option.value === this.value, disabled: this.disabled || option.disabled, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), hAsync("span", { class: "mark" }), hAsync("span", { class: "label-text" }, option.label))))), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '654315541c6b5ed2886283fae2fb72c37f91f575', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '1ed129bddbf96f3b6562552edf416293a0ba0071', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
5751
+ return (hAsync(Host, { key: '68ce563b4a03669b76ff3822705b1ff92c4c02f2' }, this.label && (hAsync("span", { key: '1887f5b70a5bf9f049495d76588458181d3f7735', class: "group-label", id: this.labelId }, this.label)), hAsync("div", { key: 'c38ee340f9527e16c5587f2309f91ea463bb7cad', class: "radio-group", role: "radiogroup", "aria-labelledby": this.label ? this.labelId : undefined }, this.options.map(option => (hAsync("label", { class: { 'control': true, 'control--disabled': this.disabled || option.disabled } }, hAsync("input", { class: { 'input': true, 'input--invalid': this.invalid }, type: "radio", name: groupName, value: option.value, checked: option.value === this.value, disabled: this.disabled || option.disabled, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), hAsync("span", { class: "mark" }), hAsync("span", { class: "label-text" }, option.label))))), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: 'ad60ce772279809ee334fc30182be1d0350d5586', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '316c911f9e1a29d17cc2d6b0e60ed35755420ae2', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
5677
5752
  }
5678
5753
  static get style() { return chRadioCss(); }
5679
5754
  static get cmpMeta() { return {
@@ -5767,7 +5842,7 @@ class ChSelect {
5767
5842
  return undefined;
5768
5843
  }
5769
5844
  render() {
5770
- return (hAsync(Host, { key: '206697f7162cbac4e5486a937d7e44bb971b6ee4' }, this.label && (hAsync("label", { key: '664e7423e7ac1a5dd6c626f2094c0ffe63d7ea36', class: "label", htmlFor: this.selectId }, this.label)), hAsync("select", { key: 'd010c2ea52bf449d823d115fa835b53dfa28390a', id: this.label ? this.selectId : undefined, class: { 'select': true, 'select--invalid': this.invalid }, name: this.name, disabled: this.disabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }, this.placeholder && (hAsync("option", { key: '9a28e73a3ef6742d037eaa825f1a66dfd4447ae6', value: "", disabled: true, hidden: true, selected: !this.value }, this.placeholder)), this.options.map(option => (hAsync("option", { value: option.value, disabled: option.disabled, selected: option.value === this.value }, option.label)))), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '6d3ff7d72bc488b723a3d9cd0982f5e3d4d46c87', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'bbc4b768cb94c39b57663d27a86b886e2ff9a556', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
5845
+ return (hAsync(Host, { key: '90aaf1fa70da54071539de8a22ebe9373f2ae90a' }, this.label && (hAsync("label", { key: '8b14b4deb611c4f1eb496c6f0d3fa58b7c4342b6', class: "label", htmlFor: this.selectId }, this.label)), hAsync("select", { key: 'c93b4ba079e9e61ef5bb2392256545af73263665', id: this.label ? this.selectId : undefined, class: { 'select': true, 'select--invalid': this.invalid }, name: this.name, disabled: this.disabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }, this.placeholder && (hAsync("option", { key: 'df8e97bdb0bd3e5426558027d34c1eb63ee76f1e', value: "", disabled: true, hidden: true, selected: !this.value }, this.placeholder)), this.options.map(option => (hAsync("option", { value: option.value, disabled: option.disabled, selected: option.value === this.value }, option.label)))), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '6b6078e31a1a2f183951f5ada63a5e7e7f582f96', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'f7791b37b8660441a43a6b45d99472b2df7df0ab', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
5771
5846
  }
5772
5847
  static get style() { return chSelectCss(); }
5773
5848
  static get cmpMeta() { return {
@@ -5791,6 +5866,51 @@ class ChSelect {
5791
5866
  }; }
5792
5867
  }
5793
5868
 
5869
+ const chSpinnerCss = () => `:host{display:inline-block;vertical-align:middle}.spinner{display:block;box-sizing:border-box;width:1em;height:1em;border:0.125em solid currentColor;border-top-color:transparent;border-radius:50%;animation:ch-spinner-rotate var(--duration-spin) var(--easing-linear) infinite}.spinner--sm{font-size:var(--typography-size-sm)}.spinner--md{font-size:var(--typography-size-lg)}.spinner--lg{font-size:var(--typography-size-xl)}@keyframes ch-spinner-rotate{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.spinner{animation-duration:calc(var(--duration-spin) * 4)}}`;
5870
+
5871
+ /**
5872
+ * Loading indicator.
5873
+ *
5874
+ * The spinner is drawn in `currentColor`, so it takes the surrounding text
5875
+ * colour and stays legible on any surface — inside a primary `ch-button` it
5876
+ * picks up the button's own text colour instead of the accent, which would be
5877
+ * invisible there. Set `color` on or above the element to change it.
5878
+ */
5879
+ class ChSpinner {
5880
+ constructor(hostRef) {
5881
+ registerInstance(this, hostRef);
5882
+ }
5883
+ /**
5884
+ * The size of the spinner. Either `sm`, `md`, or `lg`. Each size sets a
5885
+ * font-size and the spinner is drawn in `em`, so it also scales with an
5886
+ * inherited font-size.
5887
+ */
5888
+ size = 'md';
5889
+ /**
5890
+ * Accessible label announced while the spinner is visible, e.g. `Cargando
5891
+ * resultados`. When omitted the spinner is treated as decorative and hidden
5892
+ * from assistive technology — the right behaviour next to visible loading
5893
+ * text, which would otherwise be announced twice.
5894
+ */
5895
+ label;
5896
+ render() {
5897
+ const labelled = Boolean(this.label);
5898
+ return (hAsync(Host, { key: 'dc7c7e19f6a6878680555b0d7dbd84f5dc5774c8' }, hAsync("span", { key: 'd29d5f3344ae578d2a28382b13b45b901d41e52b', class: { spinner: true, [`spinner--${this.size}`]: true }, role: labelled ? 'status' : undefined, "aria-label": labelled ? this.label : undefined, "aria-hidden": labelled ? undefined : 'true' })));
5899
+ }
5900
+ static get style() { return chSpinnerCss(); }
5901
+ static get cmpMeta() { return {
5902
+ "$flags$": 521,
5903
+ "$tagName$": "ch-spinner",
5904
+ "$members$": {
5905
+ "size": [1],
5906
+ "label": [1]
5907
+ },
5908
+ "$listeners$": undefined,
5909
+ "$lazyBundleId$": "-",
5910
+ "$attrsToReflect$": []
5911
+ }; }
5912
+ }
5913
+
5794
5914
  const chSwitchCss = () => `:host{display:inline-block}.control{position:relative;display:inline-flex;align-items:center;gap:var(--spacing-lg);cursor:pointer}.control--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}.input:focus-visible~.track{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.track{position:relative;box-sizing:border-box;width:var(--spacing-6xl);height:var(--spacing-5xl);flex-shrink:0;border:var(--border-width) solid var(--border);border-radius:var(--radius-pill);background:var(--surface);transition:border-color var(--duration-normal) var(--easing-default), background-color var(--duration-normal) var(--easing-default)}.thumb{position:absolute;top:50%;left:var(--spacing-2xs);width:var(--spacing-2xl);height:var(--spacing-2xl);border-radius:50%;background:var(--text-muted);transform:translateY(-50%);transition:left var(--duration-normal) var(--easing-default), background-color var(--duration-normal) var(--easing-default)}.input:checked~.track{border-color:var(--accent);background:var(--accent)}.input:checked~.track .thumb{left:calc(100% - var(--spacing-2xl) - var(--spacing-2xs));background:var(--color-accent-text)}.input--invalid~.track{border-color:var(--color-status-warning)}.input--invalid:focus-visible~.track{outline-color:var(--color-status-warning)}.label-text{color:var(--text)}.hint,.error{margin:var(--spacing-sm) 0 0;font-size:var(--typography-size-sm);color:var(--text-muted)}.error{color:var(--color-status-warning)}`;
5795
5915
 
5796
5916
  let switchIds = 0;
@@ -5858,7 +5978,7 @@ class ChSwitch {
5858
5978
  return undefined;
5859
5979
  }
5860
5980
  render() {
5861
- return (hAsync(Host, { key: 'a2872e01803daa52a44e9ffe16e5c57ebd8f2a93' }, hAsync("label", { key: 'fb94e4de3381b617a17b8aec2342ee5c72be775a', class: { 'control': true, 'control--disabled': this.disabled }, htmlFor: this.switchId }, hAsync("input", { key: '4861655716af08d93965d78d98fe09a871ab409b', id: this.switchId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", role: "switch", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, required: this.required, "aria-checked": this.checked ? 'true' : 'false', "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), hAsync("span", { key: 'e94675c142dd85c09d1e188a80cffc6978e98369', class: "track" }, hAsync("span", { key: '9ffbd604a65b8530cb9f67c44ec81adc206acdfe', class: "thumb" })), this.label && hAsync("span", { key: 'c8c1cf4745dd7cf9647101269b02cf3d75d8ded4', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: 'aa3afe7f4720766c7e0ab4cdc6baae85f68c8577', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '274e2599ccbd6d5ff6df8fad7bf9c59efcc0ffb6', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
5981
+ return (hAsync(Host, { key: 'a128c7c2e1585f9a71518600938ec9a3e9d8a4d4' }, hAsync("label", { key: '36f4c5cba4e01a50d2aef68c8114ea77991cd11d', class: { 'control': true, 'control--disabled': this.disabled }, htmlFor: this.switchId }, hAsync("input", { key: '9fbf7fc62f8e9a164c3eceb4981288d848e14165', id: this.switchId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", role: "switch", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, required: this.required, "aria-checked": this.checked ? 'true' : 'false', "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), hAsync("span", { key: 'b5e6e89d183871b88f423c83097c7aaed3a62fe8', class: "track" }, hAsync("span", { key: 'cd092c415e40b88f31a72c8f07df0a7d8e09f03e', class: "thumb" })), this.label && hAsync("span", { key: '58032729eae055013e19e8ac3d2acac959e0f333', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '37ee421f7d76991d1d040a04402f1da4eaf22397', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '5ecaa144451f07ecce26e839f757ee53fbdc7265', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
5862
5982
  }
5863
5983
  static get style() { return chSwitchCss(); }
5864
5984
  static get cmpMeta() { return {
@@ -5965,7 +6085,7 @@ class ChTabs {
5965
6085
  }
5966
6086
  render() {
5967
6087
  const active = this.activeValue;
5968
- return (hAsync(Host, { key: '76a7f50b0cfa62b3a9a97114c99ab217da83aeb3' }, hAsync("div", { key: '544691573ac6940ec8406e8377ac0ed5fd95140e', class: "tablist", role: "tablist", "aria-label": this.label, onKeyDown: this.handleKeyDown, ref: el => (this.tablistEl = el) }, this.tabs.map(tab => {
6088
+ return (hAsync(Host, { key: '0467e7ea24884d4c19c33b736a07303569dfaa3b' }, hAsync("div", { key: '8ad451816ef31809c82486f3c9dd36b6e89e77e5', class: "tablist", role: "tablist", "aria-label": this.label, onKeyDown: this.handleKeyDown, ref: el => (this.tablistEl = el) }, this.tabs.map(tab => {
5969
6089
  const selected = tab.value === active;
5970
6090
  return (hAsync("button", { key: tab.value, type: "button", class: { 'tab': true, 'tab--active': selected, 'tab--disabled': Boolean(tab.disabled) }, role: "tab", id: this.tabId(tab.value), "data-value": tab.value, "aria-selected": selected ? 'true' : 'false', "aria-controls": this.panelId(tab.value), tabIndex: selected ? FIRST_TAB_INDEX : LAST_TAB_INDEX, disabled: tab.disabled, onClick: () => this.select(tab.value) }, tab.label));
5971
6091
  })), this.tabs.map(tab => (hAsync("div", { key: `${tab.value}-panel`, class: "tabpanel", id: this.panelId(tab.value), role: "tabpanel", "aria-labelledby": this.tabId(tab.value), tabIndex: FIRST_TAB_INDEX, hidden: tab.value !== active }, hAsync("slot", { name: `panel-${tab.value}` }))))));
@@ -6066,7 +6186,7 @@ class ChTextarea {
6066
6186
  return undefined;
6067
6187
  }
6068
6188
  render() {
6069
- return (hAsync(Host, { key: '90ce8125e93dee720379afabe1aaa5de55534581' }, this.label && (hAsync("label", { key: '6b34d5e3a2a765b1ef799952e40f8661fd747daf', class: "label", htmlFor: this.textareaId }, this.label)), hAsync("textarea", { key: '096be417a6e7fee736a246ab19f894d4ba2da9c7', id: this.label ? this.textareaId : undefined, class: { 'textarea': true, 'textarea--invalid': this.invalid }, rows: this.rows, name: this.name, placeholder: this.placeholder, disabled: this.disabled, required: this.required, value: this.value, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange }), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: 'fedff430ddcfe43965696683203465c1d6e03edc', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'f4a68f2976b14eca667c6ed4b648aa8df88d548a', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
6189
+ return (hAsync(Host, { key: '894524247096933b3d2f9cd5897da2c10133cefb' }, this.label && (hAsync("label", { key: '1e1d409f458fb7431eb2670ddf2c4146bf28060f', class: "label", htmlFor: this.textareaId }, this.label)), hAsync("textarea", { key: '9e2cd4f388bc31df4d498d8e32d88be063b557f1', id: this.label ? this.textareaId : undefined, class: { 'textarea': true, 'textarea--invalid': this.invalid }, rows: this.rows, name: this.name, placeholder: this.placeholder, disabled: this.disabled, required: this.required, value: this.value, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange }), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: 'cea50156d745ca55ef6da857c5302c8e04ceb483', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'ea525c23bf381f8382e134c01ea76086d84164da', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
6070
6190
  }
6071
6191
  static get style() { return chTextareaCss(); }
6072
6192
  static get cmpMeta() { return {
@@ -6092,6 +6212,7 @@ class ChTextarea {
6092
6212
 
6093
6213
  registerComponents([
6094
6214
  ChAccordion,
6215
+ ChAlert,
6095
6216
  ChBadge,
6096
6217
  ChButton,
6097
6218
  ChCard,
@@ -6101,6 +6222,7 @@ registerComponents([
6101
6222
  ChLink,
6102
6223
  ChRadio,
6103
6224
  ChSelect,
6225
+ ChSpinner,
6104
6226
  ChSwitch,
6105
6227
  ChTabs,
6106
6228
  ChTextarea,
@@ -6205,7 +6327,7 @@ var NAMESPACE = (
6205
6327
  );
6206
6328
 
6207
6329
  /*
6208
- Stencil Hydrate Runner v4.43.5 | MIT Licensed | https://stenciljs.com
6330
+ Stencil Hydrate Runner v4.44.0 | MIT Licensed | https://stenciljs.com
6209
6331
  */
6210
6332
  var __create = Object.create;
6211
6333
  var __defProp = Object.defineProperty;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devschile/chucao",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "Chucao — devsChile design system, packaged as StencilJS web components",
5
5
  "keywords": [
6
6
  "stenciljs",
@@ -93,12 +93,13 @@
93
93
  "loader/"
94
94
  ],
95
95
  "devDependencies": {
96
+ "@hectorpalmatellez/toki": "1.12.1",
96
97
  "@release-it/conventional-changelog": "^12.0.0",
97
98
  "@stencil/core": "^4.27.1 || ^5.0.0-0",
98
99
  "@stencil/react-output-target": "^1.6.1",
99
100
  "@stencil/vitest": "^1.8.3",
100
101
  "@stencil/vue-output-target": "^0.14.1",
101
- "@types/node": "^22.13.5",
102
+ "@types/node": "^26.2.0",
102
103
  "@types/react": "^19.2.18",
103
104
  "@types/react-dom": "^19.2.4",
104
105
  "@vitest/browser-playwright": "^4.0.0",
@@ -122,9 +123,12 @@
122
123
  "start": "stencil build --dev --watch --serve",
123
124
  "test": "stencil-test --prod",
124
125
  "test:watch": "stencil-test --prod --watch",
126
+ "tokens": "toki build && node -e \"const fs=require('node:fs'); fs.rmSync('src/tokens',{recursive:true,force:true}); fs.cpSync('.toki/out/stencil','src/tokens',{recursive:true,force:true});\" && prettier --write \"src/tokens/*.css\" \"src/tokens/*.ts\" \"src/tokens/*.d.ts\" \"src/tokens/README.md\"",
127
+ "tokens:check": "toki validate -i chucao-tokens.json",
125
128
  "test:coverage": "stencil-test --prod --coverage",
126
129
  "generate": "stencil generate",
127
130
  "generate:gallery": "node scripts/generate-gallery.mjs",
131
+ "docs:serve": "pnpm build && pnpm run generate:gallery && node scripts/serve-docs.mjs",
128
132
  "lint": "oxlint .",
129
133
  "lint:fix": "oxlint . --fix",
130
134
  "format": "prettier --write .",
@@ -1,3 +0,0 @@
1
- const e="chucao";const t={hotModuleReplacement:false,lazyLoad:true,prop:true,propChangeCallback:false,updatable:true};const n=()=>{};const r=":root{--color-background-base:#100a1c;--color-background-top-glow:#201e40;--color-background-bottom-glow:#261226;--color-surface-default:rgba(32, 30, 64, 0.6);--color-surface-hover:rgba(45, 212, 191, 0.08);--color-border-default:rgba(255, 255, 255, 0.08);--color-border-hover:rgba(45, 212, 191, 0.3);--color-accent-default:#2dd4bf;--color-accent-hover:#5ee8d4;--color-accent-text:#06210f;--color-status-positive:#4ade80;--color-status-positive-background:rgba(34, 197, 94, 0.18);--color-status-warning:#f87171;--color-status-warning-background:rgba(248, 113, 113, 0.15);--color-text-primary:#ffffff;--color-text-secondary:rgba(255, 255, 255, 0.55);--color-brand-huemul-dark:#85422b;--color-brand-huemul-light:#b45b38;--color-brand-stroke:#1d1d1b;--typography-body:Fira Sans, Droid Sans, Helvetica Neue, sans-serif;--typography-heading:Inconsolata, monospace;--typography-size-xs:0.68rem;--typography-size-sm:0.85rem;--typography-size-md:1rem;--typography-size-lg:1.25rem;--typography-size-xl:1.5rem;--typography-weight-regular:400;--typography-weight-semibold:600;--typography-weight-bold:700;--typography-tracking-badge:0.03em;--spacing-2xs:0.18rem;--spacing-xs:0.25rem;--spacing-sm:0.35rem;--spacing-md:0.5rem;--spacing-lg:0.6rem;--spacing-xl:0.8rem;--spacing-2xl:1rem;--spacing-3xl:1.25rem;--spacing-4xl:1.35rem;--spacing-5xl:1.5rem;--spacing-6xl:2rem;--spacing-shift:2px;--spacing-elevate:1px;--radius-sm:6px;--radius-md:8px;--radius-pill:999px;--border-width:1px;--border-accent-bar:3px;--shadow-focus-ring:0 0 0 3px rgba(45, 212, 191, 0.12);--shadow-card-hover:0 4px 20px rgba(45, 212, 191, 0.06);--effect-blur:10px;--duration-fast:150ms;--duration-normal:200ms;--easing-default:ease;--focus-outline-width:2px;--focus-outline-offset:2px;--opacity-disabled:0.5;--z-index-base:0;--z-index-dropdown:100;--z-index-modal:1000;--layout-max-width:68rem}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:400;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-400-normal.woff2') format('woff2')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:600;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-600-normal.woff2') format('woff2')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:700;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-700-normal.woff2') format('woff2')}@font-face{font-family:'Inconsolata';font-style:normal;font-weight:400;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/inconsolata-latin-400-normal.woff2') format('woff2')}:root{--bg:var(--color-background-base);--bg-gradient:radial-gradient(50% 30% ellipse at center top, var(--color-background-top-glow) 0%, rgba(0, 0, 0, 0) 100%),\n radial-gradient(60% 50% ellipse at center bottom, var(--color-background-bottom-glow) 0%, var(--color-background-base) 100%);--surface:var(--color-surface-default);--surface-hover:var(--color-surface-hover);--border:var(--color-border-default);--border-hover:var(--color-border-hover);--text:var(--color-text-primary);--text-muted:var(--color-text-secondary);--accent:var(--color-accent-default);--accent-hover:var(--color-accent-hover);--font-body:var(--typography-body);--font-heading:var(--typography-heading);--radius:var(--radius-sm)}body{font-family:var(--font-body)}.ch-container{width:100%;max-width:var(--layout-max-width);margin-inline:auto}.ch-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.ch-flex{display:flex}.ch-flex-col{display:flex;flex-direction:column}.ch-items-center{align-items:center}.ch-justify-center{justify-content:center}.ch-justify-between{justify-content:space-between}.ch-gap-sm{gap:var(--spacing-md)}.ch-gap-md{gap:var(--spacing-2xl)}.ch-text-center{text-align:center}.ch-text-primary{color:var(--text)}.ch-text-muted{color:var(--text-muted)}.ch-text-accent{color:var(--accent)}.ch-heading{font-family:var(--font-heading)}";var o=(e=>{e["Undefined"]="undefined";e["Null"]="null";e["String"]="string";e["Number"]="number";e["SpecialNumber"]="number";e["Boolean"]="boolean";e["BigInt"]="bigint";return e})(o||{});var i=(e=>{e["Array"]="array";e["Date"]="date";e["Map"]="map";e["Object"]="object";e["RegularExpression"]="regexp";e["Set"]="set";e["Channel"]="channel";e["Symbol"]="symbol";return e})(i||{});var s="type";var l="value";var a="serialized:";function c(e,t,n){const r=typeof HTMLElement!=="undefined"?HTMLElement.prototype:null;while(e&&e!==r){const r=Object.getOwnPropertyDescriptor(e,t);if(r&&(!n||r.get))return r;e=Object.getPrototypeOf(e)}return void 0}var f=(e,t)=>{var n;const r=t.t;const o=Object.entries((n=r.o)!=null?n:{});o.map((([n,[r]])=>{if(r&31||r&32){const r=e[n];const o=c(Object.getPrototypeOf(e),n,true)||Object.getOwnPropertyDescriptor(e,n);if(o){Object.defineProperty(e,n,{get(){return o.get.call(this)},set(e){o.set.call(this,e)},configurable:true,enumerable:true})}if(t.i.has(n)){e[n]=t.i.get(n)}else if(r!==void 0){e[n]=r}}}))};var u=e=>{if(e.__stencil__getHostRef){return e.__stencil__getHostRef()}return void 0};var d=(e,n)=>{if(!n)return;e.__stencil__getHostRef=()=>n;n.l=e;if(n.t.u&512&&t.prop){f(e,n)}};var p=(e,t)=>{const n={u:0,$hostElement$:e,t,i:new Map,p:new Map};{n.v=new Promise((e=>n.h=e));e["s-p"]=[];e["s-rc"]=[]}{n.m=[]}const r=n;e.__stencil__getHostRef=()=>r;return r};var v=(e,t)=>t in e;var h=(e,t)=>(0,console.error)(e,t);var m=new Map;var y=(e,t,n)=>{const r=e.$.replace(/-/g,"_");const o=e.S;if(!o){return void 0}const i=m.get(o);if(i){return i[r]}
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import(`./${o}.entry.js${""}`).then((e=>{{m.set(o,e)}return e[r]}),(e=>{h(e,t.$hostElement$)}))};var g=new Map;var b="r";var $="o";var w="s";var x="t";var S="c";var j="s-id";var k="sty-id";var O="c-id";var C="slot-fb{display:contents}slot-fb[hidden]{display:none}";var I=typeof window!=="undefined"?window:{};var M={u:0,j:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,r)=>e.addEventListener(t,n,r),rel:(e,t,n,r)=>e.removeEventListener(t,n,r),ce:(e,t)=>new CustomEvent(e,t)};var E=e=>Promise.resolve(e);var N=(()=>{try{if(!I.document.adoptedStyleSheets){return false}new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(e){}return false})();var z=N?(()=>!!I.document&&Object.getOwnPropertyDescriptor(I.document.adoptedStyleSheets,"length").writable)():false;var L=false;var A=[];var D=[];var R=(e,t)=>n=>{e.push(n);if(!L){L=true;if(t&&M.u&4){H(F)}else{M.raf(F)}}};var U=e=>{for(let t=0;t<e.length;t++){try{e[t](performance.now())}catch(e){h(e)}}e.length=0};var F=()=>{U(A);{U(D);if(L=A.length>0){M.raf(F)}}};var H=e=>E().then(e);var T=R(D,true);function P(e){if(!N)return void 0;const t=new CSSStyleSheet;t.replaceSync(e);return t}var V;function _(e){var t;const n={mode:"open"};const o=this.attachShadow(n);if(V===void 0)V=(t=P(r))!=null?t:null;if(V){if(z){o.adoptedStyleSheets.push(V)}else{o.adoptedStyleSheets=[...o.adoptedStyleSheets,V]}}else if(!N){const e=document.createElement("style");e.innerHTML=r;o.prepend(e)}}var W=e=>{const t=[];for(let n=0;n<e.length;n++){const r=e[n]["s-nr"]||void 0;if(r&&r.isConnected){t.push(r)}}return t};var B=(e,t,n,r)=>{if(e["s-ol"]&&e["s-ol"].isConnected){return}const o=document.createTextNode("");o["s-nr"]=e;if(!t["s-cr"]||!t["s-cr"].parentNode)return;const i=t["s-cr"].parentNode;const s=G(i,"appendChild");if(typeof r!=="undefined"){o["s-oo"]=r;const e=G(i,"childNodes");const t=[o];e.forEach((e=>{if(e["s-nr"])t.push(e)}));t.sort(((e,t)=>{if(!e["s-oo"]||e["s-oo"]<(t["s-oo"]||0))return-1;else if(!t["s-oo"]||t["s-oo"]<e["s-oo"])return 1;return 0}));t.forEach((e=>s.call(i,e)))}else{s.call(i,o)}e["s-ol"]=o;e["s-sh"]=t["s-hn"]};var q=e=>typeof e["s-sn"]==="string"?e["s-sn"]:e.nodeType===1&&e.getAttribute("slot")||void 0;function Y(e){if(e.assignedElements||e.assignedNodes||!e["s-sr"])return;const t=t=>function(e){const n=[];const r=this["s-sn"];if(e==null?void 0:e.flatten){console.error(`\n Flattening is not supported for Stencil non-shadow slots.\n You can use \`.childNodes\` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n `)}const o=this["s-cr"].parentElement;const i=o.__childNodes?o.childNodes:W(o.childNodes);i.forEach((e=>{if(r===q(e)){n.push(e)}}));if(t){return n.filter((e=>e.nodeType===1))}return n}.bind(e);e.assignedElements=t(true);e.assignedNodes=t(false)}function G(e,t){if("__"+t in e){const n=e["__"+t];if(typeof n!=="function")return n;return n.bind(e)}else{if(typeof e[t]!=="function")return e[t];return e[t].bind(e)}}var J=(e,t="")=>{{return()=>{}}};var Z=(e,t)=>{{return()=>{}}};function K(e){var t,n,r;return(r=(n=(t=e.head)==null?void 0:t.querySelector('meta[name="csp-nonce"]'))==null?void 0:n.getAttribute("content"))!=null?r:void 0}var Q=new WeakMap;var X=(e,t,n)=>{let r=g.get(e);if(N&&n){r=r||new CSSStyleSheet;if(typeof r==="string"){r=t}else{r.replaceSync(t)}}else{r=t}g.set(e,r)};var ee=(e,t,n)=>{var r,o,i;const s=ne(t);const l=g.get(s);if(!I.document){return s}e=e.nodeType===11?e:I.document;if(l){if(typeof l==="string"){e=e.head||e;let n=Q.get(e);let i;if(!n){Q.set(e,n=new Set)}const a=e.querySelector(`[${k}="${s}"]`);if(a){a.textContent=l}else if(!n.has(s)){i=I.document.createElement("style");i.textContent=l;const a=(r=M.k)!=null?r:K(I.document);if(a!=null){i.setAttribute("nonce",a)}if(!(t.u&1)){if(e.nodeName==="HEAD"){const t=e.querySelectorAll("link[rel=preconnect]");const n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(i,(n==null?void 0:n.parentNode)===e?n:null)}else if("host"in e){if(N){const t=(o=e.defaultView)!=null?o:e.ownerDocument.defaultView;const n=new t.CSSStyleSheet;n.replaceSync(l);if(z){e.adoptedStyleSheets.unshift(n)}else{e.adoptedStyleSheets=[n,...e.adoptedStyleSheets]}}else{const t=e.querySelector("style");if(t&&true){t.textContent=l+t.textContent}else{e.prepend(i)}}}else{e.append(i)}}if(t.u&1){e.insertBefore(i,null)}if(t.u&4){i.textContent+=C}if(n){n.add(s)}}}else{let t=Q.get(e);if(!t){Q.set(e,t=new Set)}if(!t.has(s)){const n=(i=e.defaultView)!=null?i:e.ownerDocument.defaultView;let r;if(l.constructor===n.CSSStyleSheet){r=l}else{r=new n.CSSStyleSheet;for(let e=0;e<l.cssRules.length;e++){r.insertRule(l.cssRules[e].cssText,e)}}if(z){e.adoptedStyleSheets.push(r)}else{e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]}t.add(s);if("host"in e){const t=e.querySelector(`[${k}="${s}"]`);if(t){T((()=>t.remove()))}}}}}return s};var te=e=>{const t=e.t;const n=e.$hostElement$;const r=t.u;const o=J("attachStyles",t.$);const i=ee(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);if(r&10){n["s-sc"]=i;n.classList.add(i+"-h")}o()};var ne=(e,t)=>"sc-"+e.$;var re=e=>e.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{");var oe=()=>{if(!I.document){return}const e=I.document.querySelectorAll(`[${k}]`);let t=0;for(;t<e.length;t++){X(e[t].getAttribute(k),re(e[t].innerHTML),true)}};var ie=e=>{e=typeof e;return e==="object"||e==="function"};var se=(e,t,...n)=>{if(typeof e==="string"){e=vt(e)}let r=null;let o=null;let i=false;let s=false;const l=[];const a=t=>{for(let n=0;n<t.length;n++){r=t[n];if(Array.isArray(r)){a(r)}else if(r!=null&&typeof r!=="boolean"){if(i=typeof e!=="function"&&!ie(r)){r=String(r)}if(i&&s){l[l.length-1].O+=r}else{l.push(i?le(null,r):r)}s=i}}};a(n);if(t){if(t.key){o=t.key}{const e=t.className||t.class;if(e){t.class=typeof e!=="object"?e:Object.keys(e).filter((t=>e[t])).join(" ")}}}const c=le(e,null);c.C=t;if(l.length>0){c.I=l}{c.M=o}return c};var le=(e,t)=>{const n={u:0,N:e,O:t!=null?t:null,L:null,I:null};{n.C=null}{n.M=null}return n};var ae={};var ce=e=>e&&e.N===ae;var fe=(e,t,n,r)=>{var o,i,s,l;const a=J("hydrateClient",t);const c=e.shadowRoot;const f=[];const d=[];const p=[];const v=c?[]:null;const h=le(t,null);h.L=e;if(I.document&&(!M.A||!M.A.size)){de(I.document.body,M.A=new Map)}e[j]=n;e.removeAttribute(j);r.D=ue(h,f,d,v,e,e,n,p);let m=0;const y=f.length;let g;for(m;m<y;m++){g=f[m];const n=g.R+"."+g.U;const r=M.A.get(n);const i=g.L;if(!c){i["s-hn"]=vt(t).toUpperCase();if(g.N==="slot"){i["s-cr"]=e["s-cr"]}}else if(((o=g.N)==null?void 0:o.toString().includes("-"))&&g.N!=="slot-fb"&&!g.L.shadowRoot){const e=u(g.L);if(e){const t=ne(e.t);const n=I.document.querySelector(`style[sty-id="${t}"]`);if(n){v.unshift(n.cloneNode(true))}}}if(g.N==="slot"){g.F=g.L["s-sn"]||g.L["name"]||null;if(g.I){g.u|=2;if(!g.L.childNodes.length){g.I.forEach((e=>{g.L.appendChild(e.L)}))}}else{g.u|=1}}if(r&&r.isConnected){if(r.parentElement.shadowRoot&&r["s-en"]===""){r.parentNode.insertBefore(i,r.nextSibling)}r.parentNode.removeChild(r);if(!c){i["s-oo"]=parseInt(g.U)}}if(r&&!r["s-id"]){M.A.delete(n)}}const b=[];const $=p.length;let w=0;let x;let S;let k;let O;let C=0;for(w;w<$;w++){x=p[w];if(!x||!x.length)continue;k=x.length;S=0;for(S;S<k;S++){O=x[S];if(!b[O.hostId]){b[O.hostId]=M.A.get(O.hostId)}if(!b[O.hostId])continue;const e=b[O.hostId];if(e.shadowRoot&&O.node.parentElement!==e){e.insertBefore(O.node,(s=(i=x[S-1])==null?void 0:i.node)==null?void 0:s.nextSibling)}if(!e.shadowRoot||!c){if(!O.slot["s-cr"]){O.slot["s-cr"]=e["s-cr"];if(!O.slot["s-cr"]&&e.shadowRoot){O.slot["s-cr"]=e}else{O.slot["s-cr"]=(e.__childNodes||e.childNodes)[0]}}B(O.node,O.slot,false,O.node["s-oo"]||C);if(((l=O.node.parentElement)==null?void 0:l.shadowRoot)&&O.node["getAttribute"]&&O.node.getAttribute("slot")){O.node.removeAttribute("slot")}}C=(O.node["s-oo"]||C)+1}}if(c&&!c.childNodes.length){let t=0;const n=v.length;if(n){for(t;t<n;t++){const e=v[t];if(e){c.appendChild(e)}}Array.from(e.childNodes).forEach((e=>{if(typeof e["s-en"]!=="string"&&typeof e["s-sn"]!=="string"){if(e.nodeType===1&&e.slot&&e.hidden){e.removeAttribute("hidden")}else if(e.nodeType===8&&!e.nodeValue){e.parentNode.removeChild(e)}}}))}}r.$hostElement$=e;a()};var ue=(e,t,n,r,o,i,s,l=[])=>{let a;let c;let f;let u;if(i.nodeType===1){a=i.getAttribute(O);if(a){c=a.split(".");if(c[0]===s||c[0]==="0"){f=pe({u:0,R:c[0],U:c[1],H:c[2],T:c[3],N:i.tagName.toLowerCase(),L:i,C:{class:i.className||""}});t.push(f);i.removeAttribute(O);if(!e.I){e.I=[]}const o=f.L.getAttribute("s-sn");if(typeof o==="string"){if(f.N==="slot-fb"){ve(o,c[2],f,i,e,t,n,r,l)}f.L["s-sn"]=o;f.L.removeAttribute("s-sn")}if(f.T!==void 0){e.I[f.T]=f}e=f;if(r&&f.H==="0"){r[f.T]=f.L}}}if(i.shadowRoot){for(u=i.shadowRoot.childNodes.length-1;u>=0;u--){ue(e,t,n,r,o,i.shadowRoot.childNodes[u],s,l)}}const d=i.__childNodes||i.childNodes;for(u=d.length-1;u>=0;u--){ue(e,t,n,r,o,d[u],s,l)}}else if(i.nodeType===8){c=i.nodeValue.split(".");if(c[1]===s||c[1]==="0"){a=c[0];f=pe({R:c[1],U:c[2],H:c[3],T:c[4]||"0",L:i,C:null,I:null,M:null,F:null,N:null,O:null});if(a===x){f.L=me(i,3);if(f.L&&f.L.nodeType===3){f.O=f.L.textContent;t.push(f);i.remove();if(s===f.R){if(!e.I){e.I=[]}e.I[f.T]=f}if(r&&f.H==="0"){r[f.T]=f.L}}}else if(a===S){f.L=me(i,8);if(f.L&&f.L.nodeType===8){t.push(f);i.remove()}}else if(f.R===s){if(a===w){const o=i["s-sn"]=c[5]||"";ve(o,c[2],f,i,e,t,n,r,l)}else if(a===b){if(r){i.remove()}}}}}else if(e&&e.N==="style"){const t=le(null,i.textContent);t.L=i;t.T="0";e.I=[t]}return e};var de=(e,t)=>{if(e.nodeType===1){const n=e[j]||e.getAttribute(j);if(n){t.set(n,e)}let r=0;if(e.shadowRoot){for(;r<e.shadowRoot.childNodes.length;r++){de(e.shadowRoot.childNodes[r],t)}}const o=e.__childNodes||e.childNodes;for(r=0;r<o.length;r++){de(o[r],t)}}else if(e.nodeType===8){const n=e.nodeValue.split(".");if(n[0]===$){t.set(n[1]+"."+n[2],e);e.nodeValue="";e["s-en"]=n[3]}}};var pe=e=>{const t={u:0,R:null,U:null,H:null,T:"0",L:null,C:null,I:null,M:null,F:null,N:null,O:null};return{...t,...e}};function ve(e,t,n,r,o,i,s,l,a){r["s-sr"]=true;n.F=e||null;n.N="slot";const c=(o==null?void 0:o.L)?o.L["s-id"]||o.L.getAttribute("s-id"):"";if(l&&I.document){const i=n.L=I.document.createElement(n.N);if(n.F){n.L.setAttribute("name",e)}if(o.L.shadowRoot&&c&&c!==n.R){G(o.L,"insertBefore")(i,G(o.L,"children")[0])}else{G(G(r,"parentNode"),"insertBefore")(i,r)}he(a,t,e,r,n.R);r.remove();if(n.H==="0"){l[n.T]=n.L}}else{const i=n.L;const s=c&&c!==n.R&&o.L.shadowRoot;he(a,t,e,r,s?c:n.R);Y(r);if(s){o.L.insertBefore(i,o.L.children[0])}}i.push(n);s.push(n);if(!o.I){o.I=[]}o.I[n.T]=n}var he=(e,t,n,r,o)=>{var i,s;let l=r.nextSibling;e[t]=e[t]||[];if(!l||((i=l.nodeValue)==null?void 0:i.startsWith(w+".")))return;do{if(l&&((l["getAttribute"]&&l.getAttribute("slot")||l["s-sn"])===n||n===""&&!l["s-sn"]&&(!l["getAttribute"]||!l.getAttribute("slot"))&&(l.nodeType===8||l.nodeType===3))){l["s-sn"]=n;e[t].push({slot:r,node:l,hostId:o})}l=l==null?void 0:l.nextSibling}while(l&&!((s=l.nodeValue)==null?void 0:s.startsWith(w+".")))};var me=(e,t)=>{let n=e;do{n=n.nextSibling}while(n&&(n.nodeType!==t||!n.nodeValue));return n};var ye=class e{static fromLocalValue(t){const n=t[s];const r=l in t?t[l]:void 0;switch(n){case"string":return r;case"boolean":return r;case"bigint":return BigInt(r);case"undefined":return void 0;case"null":return null;case"number":if(r==="NaN")return NaN;if(r==="-0")return-0;if(r==="Infinity")return Infinity;if(r==="-Infinity")return-Infinity;return r;case"array":return r.map((t=>e.fromLocalValue(t)));case"date":return new Date(r);case"map":const t=new Map;for(const[n,o]of r){const r=typeof n==="object"&&n!==null?e.fromLocalValue(n):n;const i=e.fromLocalValue(o);t.set(r,i)}return t;case"object":const o={};for(const[t,n]of r){o[t]=e.fromLocalValue(n)}return o;case"regexp":const{pattern:i,flags:s}=r;return new RegExp(i,s);case"set":const l=new Set;for(const t of r){l.add(e.fromLocalValue(t))}return l;case"symbol":return Symbol(r);default:throw new Error(`Unsupported type: ${n}`)}}static fromLocalValueArray(t){return t.map((t=>e.fromLocalValue(t)))}static isLocalValueObject(e){if(typeof e!=="object"||e===null){return false}if(!e.hasOwnProperty(s)){return false}const t=e[s];const n=Object.values({...o,...i}).includes(t);if(!n){return false}if(t!=="null"&&t!=="undefined"){return e.hasOwnProperty(l)}return true}};function ge(e){const t=atob(e);const n=new Uint8Array(t.length);for(let e=0;e<t.length;e++){n[e]=t.charCodeAt(e)}return(new TextDecoder).decode(n)}function be(e){if(typeof e!=="string"||!e.startsWith(a)){return e}return ye.fromLocalValue(JSON.parse(ge(e.slice(a.length))))}var $e=(e,t,n)=>{if(typeof e==="string"&&e.startsWith(a)){e=be(e);return e}if(e!=null&&!ie(e)){if(t&4){{return e==="false"?false:e===""||!!e}}if(t&2){return typeof e==="string"?parseFloat(e):typeof e==="number"?e:NaN}if(t&1){return String(e)}return e}return e};var we=e=>{var t;return(t=u(e))==null?void 0:t.$hostElement$};var xe=(e,t,n)=>{const r=we(e);return{emit:e=>Se(r,t,{bubbles:true,composed:true,cancelable:true,detail:e})}};var Se=(e,t,n)=>{const r=M.ce(t,n);e.dispatchEvent(r);return r};var je=(e,t,n,r,o,i,s)=>{if(n===r){return}let l=v(e,t);let a=t.toLowerCase();if(t==="class"){const t=e.classList;const o=Oe(n);let i=Oe(r);if((e["s-si"]||e["s-sc"])&&s){const n=e["s-sc"]||e["s-si"];i.push(n);o.forEach((e=>{if(e.startsWith(n))i.push(e)}));i=[...new Set(i)].filter((e=>e));t.add(...i)}else{t.remove(...o.filter((e=>e&&!i.includes(e))));t.add(...i.filter((e=>e&&!o.includes(e))))}}else if(t==="key");else if(t==="ref"){if(r){We(r,e)}}else if(!l&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"){t=t.slice(3)}else if(v(I,a)){t=a.slice(2)}else{t=a[2]+t.slice(3)}if(n||r){const o=t.endsWith(Ce);t=t.replace(Ie,"");if(n){M.rel(e,t,n,o)}if(r){M.ael(e,t,r,o)}}}else if(t[0]==="a"&&t.startsWith("attr:")){const n=t.slice(5);let o;{const t=u(e);if(t&&t.t&&t.t.o){const e=t.t.o[n];if(e&&e[1]){o=e[1]}}}if(!o){o=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}if(r==null||r===false){if(r!==false||e.getAttribute(o)===""){e.removeAttribute(o)}}else{e.setAttribute(o,r===true?"":r)}return}else if(t[0]==="p"&&t.startsWith("prop:")){const n=t.slice(5);try{e[n]=r}catch(e){}return}else{const s=ie(r);if((l||s&&r!==null)&&!o){try{if(!e.tagName.includes("-")){const o=r==null?"":r;if(t==="list"){l=false}else if(n==null||e[t]!==o){if(typeof e.__lookupSetter__(t)==="function"){e[t]=o}else{e.setAttribute(t,o)}}}else if(e[t]!==r){e[t]=r}}catch(e){}}if(r==null||r===false){if(r!==false||e.getAttribute(t)===""){{e.removeAttribute(t)}}}else if((!l||i&4||o)&&!s&&e.nodeType===1){r=r===true?"":r;{e.setAttribute(t,r)}}}};var ke=/\s/;var Oe=e=>{if(typeof e==="object"&&e&&"baseVal"in e){e=e.baseVal}if(!e||typeof e!=="string"){return[]}return e.split(ke)};var Ce="Capture";var Ie=new RegExp(Ce+"$");var Me=(e,t,n,r)=>{const o=t.L.nodeType===11&&t.L.host?t.L.host:t.L;const i=e&&e.C||{};const s=t.C||{};{for(const e of Ee(Object.keys(i))){if(!(e in s)){je(o,e,i[e],void 0,n,t.u,r)}}}for(const e of Ee(Object.keys(s))){je(o,e,i[e],s[e],n,t.u,r)}};function Ee(e){return e.includes("ref")?[...e.filter((e=>e!=="ref")),"ref"]:e}var Ne;var ze=false;var Le=false;var Ae=[];var De=[];var Re=(e,t,n)=>{const r=t.I[n];let o=0;let i;let s;if(r.O!=null){i=r.L=I.document.createTextNode(r.O)}else{if(!I.document){throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.")}i=r.L=I.document.createElement(r.N);{Me(null,r,Le)}if(r.I){const t=r.N==="template"?i.content:i;for(o=0;o<r.I.length;++o){s=Re(e,r,o);if(s){t.appendChild(s)}}}}i["s-hn"]=Ne;return i};var Ue=e=>{M.u|=1;const t=e.closest(Ne.toLowerCase());if(t!=null){const n=Array.from(t.__childNodes||t.childNodes).find((e=>e["s-cr"]));const r=Array.from(e.__childNodes||e.childNodes);for(const e of n?r.reverse():r){if(e["s-sh"]!=null){qe(t,e,n!=null?n:null);e["s-sh"]=void 0}}}M.u&=-2};var Fe=(e,t,n,r,o,i)=>{let s=e;let l;if(s.shadowRoot&&s.tagName===Ne){s=s.shadowRoot}if(n.N==="template"){s=s.content}for(;o<=i;++o){if(r[o]){l=Re(null,n,o);if(l){r[o].L=l;qe(s,l,t)}}}};var He=(e,t,n)=>{for(let r=t;r<=n;++r){const t=e[r];if(t){const e=t.L;_e(t);if(e){e.remove()}}}};var Te=(e,t,n,r,o=false)=>{let i=0;let s=0;let l=0;let a=0;let c=t.length-1;let f=t[0];let u=t[c];let d=r.length-1;let p=r[0];let v=r[d];let h;let m;const y=n.N==="template"?e.content:e;while(i<=c&&s<=d){if(f==null){f=t[++i]}else if(u==null){u=t[--c]}else if(p==null){p=r[++s]}else if(v==null){v=r[--d]}else if(Pe(f,p,o)){Ve(f,p,o);f=t[++i];p=r[++s]}else if(Pe(u,v,o)){Ve(u,v,o);u=t[--c];v=r[--d]}else if(Pe(f,v,o)){Ve(f,v,o);qe(y,f.L,u.L.nextSibling);f=t[++i];v=r[--d]}else if(Pe(u,p,o)){Ve(u,p,o);qe(y,u.L,f.L);u=t[--c];p=r[++s]}else{l=-1;{for(a=i;a<=c;++a){if(t[a]&&t[a].M!==null&&t[a].M===p.M){l=a;break}}}if(l>=0){m=t[l];if(m.N!==p.N){h=Re(t&&t[s],n,l)}else{Ve(m,p,o);t[l]=void 0;h=m.L}p=r[++s]}else{h=Re(t&&t[s],n,s);p=r[++s]}if(h){{qe(f.L.parentNode,h,f.L)}}}}if(i>c){Fe(e,r[d+1]==null?null:r[d+1].L,n,r,s,d)}else if(s>d){He(t,i,c)}};var Pe=(e,t,n=false)=>{if(e.N===t.N){if(!n){return e.M===t.M}if(n&&!e.M&&t.M){e.M=t.M}return true}return false};var Ve=(e,n,r=false)=>{const o=n.L=e.L;const i=e.I;const s=n.I;const l=n.N;const a=n.O;if(a==null){{if(l==="slot"&&!ze){if(e.F!==n.F){n.L["s-sn"]=n.F||"";Ue(n.L.parentElement)}}Me(e,n,Le,r)}if(i!==null&&s!==null){Te(o,i,n,s,r)}else if(s!==null){if(e.O!==null){o.textContent=""}Fe(o,null,n,s,0,s.length-1)}else if(!r&&t.updatable&&i!==null){He(i,0,i.length-1)}else if(r&&t.updatable&&i!==null&&s===null){n.I=i}}else if(e.O!==a){o.data=a}};var _e=e=>{{if(e.C&&e.C.ref){Ae.push((()=>e.C.ref(null)))}e.I&&e.I.map(_e)}};var We=(e,t)=>{{De.push((()=>e(t)))}};var Be=()=>{{Ae.forEach((e=>e()));Ae.length=0;De.forEach((e=>e()));De.length=0}};var qe=(e,t,n,r)=>{if(e.__insertBefore){return e.__insertBefore(t,n)}else{return e==null?void 0:e.insertBefore(t,n)}};var Ye=(e,t,n=false)=>{const r=e.$hostElement$;const o=e.t;const i=e.D||le(null,null);const s=ce(t);const l=s?t:se(null,null,t);Ne=r.tagName;if(n&&l.C){for(const e of Object.keys(l.C)){if(r.hasAttribute(e)&&!["key","ref","style","class"].includes(e)){l.C[e]=r[e]}}}l.N=null;l.u|=4;e.D=l;l.L=i.L=r.shadowRoot||r;ze=!!(o.u&1)&&!(o.u&128);Ve(i,l,n);Be()};var Ge=(e,t)=>{if(t&&!e.P&&t["s-p"]){const n=t["s-p"].push(new Promise((r=>e.P=()=>{t["s-p"].splice(n-1,1);r()})))}};var Je=(e,t)=>{{e.u|=16}if(e.u&4){e.u|=512;return}Ge(e,e.V);const n=()=>Ze(e,t);if(t){queueMicrotask((()=>{n()}));return}return T(n)};var Ze=(e,t)=>{const n=e.$hostElement$;const r=J("scheduleUpdate",e.t.$);const o=e.l;if(!o){throw new 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 i;if(t){{if(e.m.length){e.m.forEach((e=>e(n)))}}i=rt(o,"componentWillLoad",void 0,n)}else{i=rt(o,"componentWillUpdate",void 0,n)}i=Ke(i,(()=>rt(o,"componentWillRender",void 0,n)));r();return Ke(i,(()=>Xe(e,o,t)))};var Ke=(e,t)=>Qe(e)?e.then(t).catch((e=>{console.error(e);t()})):t();var Qe=e=>e instanceof Promise||e&&e.then&&typeof e.then==="function";var Xe=async(e,t,n)=>{var r;const o=e.$hostElement$;const i=J("update",e.t.$);const s=o["s-rc"];if(n){te(e)}const l=J("render",e.t.$);{et(e,t,o,n)}if(s){s.map((e=>e()));o["s-rc"]=void 0}l();i();{const t=(r=o["s-p"])!=null?r:[];const n=()=>tt(e);if(t.length===0){n()}else{Promise.all(t).then(n).catch(n);e.u|=4;t.length=0}}};var et=(e,t,n,r)=>{try{t=t.render();{e.u&=-17}{e.u|=2}{{{Ye(e,t,r)}}}}catch(t){h(t,e.$hostElement$)}return null};var tt=e=>{const t=e.t.$;const n=e.$hostElement$;const r=J("postUpdate",t);const o=e.l;const i=e.V;rt(o,"componentDidRender",void 0,n);if(!(e.u&64)){e.u|=64;rt(o,"componentDidLoad",void 0,n);r();{e.h(n);if(!i){nt()}}}else{rt(o,"componentDidUpdate",void 0,n);r()}{if(e.P){e.P();e.P=void 0}if(e.u&512){H((()=>Je(e,false)))}e.u&=-517}};var nt=t=>{var n;H((()=>Se(I,"appload",{detail:{namespace:e}})));{if((n=M.A)==null?void 0:n.size){M.A.clear()}}};var rt=(e,t,n,r)=>{if(e&&e[t]){try{return e[t](n)}catch(e){h(e,r)}}return void 0};var ot=(e,t)=>u(e).i.get(t);var it=(e,t,n,r)=>{const o=u(e);if(!o){return}if(!o){throw new Error(`Couldn't find host element for "${r.$}" 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/stenciljs/core/issues/5457).`)}const i=o.i.get(t);const s=o.u;const l=o.l;n=$e(n,r.o[t][0]);const a=Number.isNaN(i)&&Number.isNaN(n);const c=n!==i&&!a;if((!(s&8)||i===void 0)&&c){o.i.set(t,n);if(s&2){if(l.componentShouldUpdate){const e=l.componentShouldUpdate(n,i,t);if(e===false&&!(s&16)){return}}if(!(s&16)){Je(o,false)}}}};var st=(e,n,r)=>{var o,i;const s=e.prototype;if(n.o||t.propChangeCallback){const l=Object.entries((o=n.o)!=null?o:{});l.map((([e,[t]])=>{if(t&31||r&2&&t&32){const{get:o,set:i}=c(s,e)||{};if(o)n.o[e][0]|=2048;if(i)n.o[e][0]|=4096;if(r&1||!o){Object.defineProperty(s,e,{get(){{if((n.o[e][0]&2048)===0){return ot(this,e)}const t=u(this);const r=t?t.l:s;if(!r)return;return r[e]}},configurable:true,enumerable:true})}Object.defineProperty(s,e,{set(o){const s=u(this);if(!s){return}if(i){const r=t&32?this[e]:s.$hostElement$[e];if(typeof r==="undefined"&&s.i.get(e)){o=s.i.get(e)}i.apply(this,[$e(o,t)]);o=t&32?this[e]:s.$hostElement$[e];it(this,e,o,n);return}{if((r&1)===0||(n.o[e][0]&4096)===0){it(this,e,o,n);if(r&1&&!s.l){s.m.push((()=>{if(n.o[e][0]&4096&&s.l[e]!==s.i.get(e)){s.l[e]=o}}))}return}const i=()=>{const r=s.l[e];if(!s.i.get(e)&&r){s.i.set(e,r)}s.l[e]=$e(o,t);it(this,e,s.l[e],n)};if(s.l){i()}else{s.m.push((()=>{i()}))}}}})}}));if(r&1){const r=new Map;s.attributeChangedCallback=function(e,o,i){M.jmp((()=>{var a;const c=r.get(e);const f=u(this);if(this.hasOwnProperty(c)&&t.lazyLoad){i=this[c];delete this[c]}if(s.hasOwnProperty(c)&&typeof this[c]==="number"&&this[c]==i){return}else if(c==null){const t=f==null?void 0:f.u;if(f&&t&&!(t&8)&&i!==o){const r=f.l;const s=(a=n._)==null?void 0:a[e];s==null?void 0:s.forEach((n=>{const[[s,l]]=Object.entries(n);if(r[s]!=null&&(t&128||l&1)){r[s].call(r,i,o,e)}}))}return}const d=l.find((([e])=>e===c));const p=d&&d[1][0]&4;const v=p&&i===null&&this[c]===void 0;if(p){i=i===null||i==="false"?false:true}const h=Object.getOwnPropertyDescriptor(s,c);if(!v&&i!=this[c]&&(!h.get||!!h.set)){this[c]=i}}))};e.observedAttributes=Array.from(new Set([...Object.keys((i=n._)!=null?i:{}),...l.filter((([e,t])=>t[0]&31)).map((([e,t])=>{const n=t[1]||e;r.set(n,e);return n}))]))}}return e};var lt=async(e,n,r,o)=>{let i;try{if((n.u&32)===0){n.u|=32;const o=r.S;if(o){const t=y(r,n);if(t&&"then"in t){const e=Z();i=await t;e()}else{i=t}if(!i){throw new Error(`Constructor for "${r.$}#${n.W}" was not found`)}if(!i.isProxied){st(i,r,2);i.isProxied=true}const o=J("createInstance",r.$);{n.u|=8}try{new i(n)}catch(t){h(t,e)}{n.u&=-9}o();{at(n.l,e)}}else{i=e.constructor;const t=e.localName;customElements.whenDefined(t).then((()=>n.u|=128))}if(i&&i.style){let e;if(typeof i.style==="string"){e=i.style}const n=ne(r);if(!g.has(n)||t.hotModuleReplacement){const t=J("registerStyles",r.$);X(n,e,!!(r.u&1));t()}}}const o=n.V;const s=()=>Je(n,true);if(o&&o["s-rc"]){o["s-rc"].push(s)}else{s()}}catch(t){h(t,e);if(n.P){n.P();n.P=void 0}if(n.h){n.h(e)}}};var at=(e,t)=>{{rt(e,"connectedCallback",void 0,t)}};var ct=e=>{if((M.u&1)===0){const t=u(e);if(!t){return}const n=t.t;const r=J("connectedCallback",n.$);if(!(t.u&1)){t.u|=1;let r;{r=e.getAttribute(j);if(r){if(n.u&1){const t=ee(e.shadowRoot,n);e.classList.remove(t+"-h",t+"-s")}fe(e,n.$,r,t)}}{let n=e;while(n=n.parentNode||n.host){if(n.nodeType===1&&n.hasAttribute("s-id")&&n["s-p"]||n["s-p"]){Ge(t,t.V=n);break}}}if(n.o){Object.entries(n.o).map((([t,[n]])=>{if(n&31&&Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];delete e[t];e[t]=n}}))}{lt(e,t,n)}}else{if(t==null?void 0:t.l){at(t.l,e)}else if(t==null?void 0:t.v){t.v.then((()=>at(t.l,e)))}}r()}};var ft=(e,t)=>{{rt(e,"disconnectedCallback",void 0,t||e)}};var ut=async e=>{if((M.u&1)===0){const t=u(e);if(t==null?void 0:t.l){ft(t.l,e)}else if(t==null?void 0:t.v){t.v.then((()=>ft(t.l,e)))}}if(Q.has(e)){Q.delete(e)}if(e.shadowRoot&&Q.has(e.shadowRoot)){Q.delete(e.shadowRoot)}};var dt=(e,t={})=>{var n;if(!I.document){console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");return}const r=J();const o=[];const i=t.exclude||[];const s=I.customElements;const l=I.document.head;const a=l.querySelector("meta[charset]");const c=I.document.createElement("style");const f=[];let d;let v=true;Object.assign(M,t);M.j=new URL(t.resourcesUrl||"./",I.document.baseURI).href;{M.u|=2}{oe()}e.map((e=>{e[1].map((t=>{const n={u:t[0],$:t[1],o:t[2],B:t[3]};{n.o=t[2]}const r=vt(n.$);const l=class extends HTMLElement{["s-p"];["s-rc"];hasRegisteredEventListeners=false;constructor(e){super(e);e=this;p(e,n);if(n.u&1){{if(!e.shadowRoot){_.call(e,n)}else{if(e.shadowRoot.mode!=="open"){throw new Error(`Unable to re-use existing shadow root for ${n.$}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}}}}}connectedCallback(){const e=u(this);if(!e){return}if(!this.hasRegisteredEventListeners){this.hasRegisteredEventListeners=true}if(d){clearTimeout(d);d=null}if(v){f.push(this)}else{M.jmp((()=>ct(this)))}}disconnectedCallback(){M.jmp((()=>ut(this)));M.raf((()=>{var e;const t=u(this);if(!t){return}const n=f.findIndex((e=>e===this));if(n>-1){f.splice(n,1)}if(((e=t==null?void 0:t.D)==null?void 0:e.L)instanceof Node&&!t.D.L.isConnected){delete t.D.L}}))}componentOnReady(){var e;return(e=u(this))==null?void 0:e.v}};n.S=e[0];if(!i.includes(r)&&!s.get(r)){o.push(r);s.define(r,st(l,n,1))}}))}));if(o.length>0){if(c.innerHTML.length){c.setAttribute("data-styles","");const e=(n=M.k)!=null?n:K(I.document);if(e!=null){c.setAttribute("nonce",e)}l.insertBefore(c,a?a.nextSibling:l.firstChild)}}v=false;if(f.length){f.map((e=>e.connectedCallback()))}else{{M.jmp((()=>d=setTimeout(nt,30)))}}r()};var pt=e=>M.k=e;function vt(e){return e}export{ae as H,dt as b,xe as c,n as g,se as h,E as p,d as r,pt as s};
3
- //# sourceMappingURL=p-ImsAHlk9.js.map