@mhmo91/schmancy 0.5.27 → 0.5.29

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 (35) hide show
  1. package/dist/{autocomplete-BlhAOtex.js → autocomplete-CeB2VvCm.js} +24 -24
  2. package/dist/autocomplete-CeB2VvCm.js.map +1 -0
  3. package/dist/{autocomplete-GW91jVqw.cjs → autocomplete-ChRZ5y2p.cjs} +2 -2
  4. package/dist/autocomplete-ChRZ5y2p.cjs.map +1 -0
  5. package/dist/autocomplete.cjs +1 -1
  6. package/dist/autocomplete.js +1 -1
  7. package/dist/{avatar-q32dkyky.cjs → avatar-B44Yq_7I.cjs} +2 -2
  8. package/dist/{avatar-q32dkyky.cjs.map → avatar-B44Yq_7I.cjs.map} +1 -1
  9. package/dist/{avatar-4sGidVGe.js → avatar-ByCv3NzJ.js} +3 -3
  10. package/dist/{avatar-4sGidVGe.js.map → avatar-ByCv3NzJ.js.map} +1 -1
  11. package/dist/badge.cjs +1 -1
  12. package/dist/badge.js +1 -1
  13. package/dist/chips.cjs +1 -1
  14. package/dist/chips.js +1 -1
  15. package/dist/content-drawer.cjs +1 -1
  16. package/dist/content-drawer.js +1 -1
  17. package/dist/index.cjs +1 -1
  18. package/dist/index.js +3 -3
  19. package/dist/nav-drawer.cjs +1 -1
  20. package/dist/nav-drawer.js +1 -1
  21. package/dist/navigation-bar.cjs +1 -1
  22. package/dist/navigation-bar.js +1 -1
  23. package/dist/{suggestion-chip-C1n2VYBG.cjs → suggestion-chip-BPCzI7GW.cjs} +18 -28
  24. package/dist/suggestion-chip-BPCzI7GW.cjs.map +1 -0
  25. package/dist/{suggestion-chip-Cl0cPTKV.js → suggestion-chip-CASXKYnD.js} +66 -84
  26. package/dist/suggestion-chip-CASXKYnD.js.map +1 -0
  27. package/dist/teleport.cjs +1 -1
  28. package/dist/teleport.js +1 -1
  29. package/package.json +1 -1
  30. package/types/src/autocomplete/autocomplete.d.ts +2 -0
  31. package/types/src/chips/chips.d.ts +6 -1
  32. package/dist/autocomplete-BlhAOtex.js.map +0 -1
  33. package/dist/autocomplete-GW91jVqw.cjs.map +0 -1
  34. package/dist/suggestion-chip-C1n2VYBG.cjs.map +0 -1
  35. package/dist/suggestion-chip-Cl0cPTKV.js.map +0 -1
@@ -12,27 +12,27 @@ import { tap as y, takeUntil as $, distinctUntilChanged as C, debounceTime as E,
12
12
  import { s as m } from "./search-6Hr7K1gh.js";
13
13
  import "./input-chip-CNLkwei6.js";
14
14
  var D = Object.defineProperty, A = Object.getOwnPropertyDescriptor, a = (e, t, i, n) => {
15
- for (var r, s = n > 1 ? void 0 : n ? A(t, i) : t, o = e.length - 1; o >= 0; o--) (r = e[o]) && (s = (n ? r(t, i, s) : r(s)) || s);
15
+ for (var r, s = n > 1 ? void 0 : n ? A(t, i) : t, l = e.length - 1; l >= 0; l--) (r = e[l]) && (s = (n ? r(t, i, s) : r(s)) || s);
16
16
  return n && s && D(t, i, s), s;
17
17
  };
18
- let l = class extends w(":host{display:block;border:unset!important;line-height:unset!important;background:unset!important;padding:unset!important;font-size:unset!important;box-shadow:unset!important}:host:focus{box-shadow:unset!important}@keyframes onAutoFillStart{}sch-input::part(input):-webkit-autofill,sch-input input:-webkit-autofill{animation-name:onAutoFillStart;animation-duration:1ms}") {
18
+ let o = class extends w(":host{display:block;border:unset!important;line-height:unset!important;background:unset!important;padding:unset!important;font-size:unset!important;box-shadow:unset!important}:host:focus{box-shadow:unset!important}@keyframes onAutoFillStart{}sch-input::part(input):-webkit-autofill,sch-input input:-webkit-autofill{animation-name:onAutoFillStart;animation-duration:1ms}") {
19
19
  constructor() {
20
- super(...arguments), this.required = !1, this.placeholder = "", this.label = "", this.name = "", this.maxHeight = "300px", this.multi = !1, this.description = "", this.size = "md", this.autocomplete = "off", this.debounceMs = 200, this.similarityThreshold = 0.3, this.error = !1, this.validationMessage = "", this._open = !1, this._inputValue = "", this._visibleOptionsCount = 0, this._hasResults = !0, this._isSelectingOption = !1, this._inputElementRef = O(), this._selectedValue$ = new _(""), this._selectedValues$ = new _([]), this._inputValue$ = new _("");
20
+ super(...arguments), this._valueSet = !1, this._valuesSet = !1, this.required = !1, this.placeholder = "", this.label = "", this.name = "", this.maxHeight = "300px", this.multi = !1, this.description = "", this.size = "md", this.autocomplete = "off", this.debounceMs = 200, this.similarityThreshold = 0.3, this.error = !1, this.validationMessage = "", this._open = !1, this._inputValue = "", this._visibleOptionsCount = 0, this._hasResults = !0, this._isSelectingOption = !1, this._inputElementRef = O(), this._selectedValue$ = new _(""), this._selectedValues$ = new _([]), this._inputValue$ = new _("");
21
21
  }
22
22
  get values() {
23
23
  return [...this._selectedValues$.value];
24
24
  }
25
25
  set values(e) {
26
- this._selectedValues$.next(Array.isArray(e) ? [...e] : []);
26
+ this._valuesSet = !0, this._selectedValues$.next(Array.isArray(e) ? [...e] : []);
27
27
  }
28
28
  get value() {
29
29
  return this.multi ? this._selectedValues$.value.join(",") : this._selectedValue$.value;
30
30
  }
31
31
  set value(e) {
32
- if (this.multi) {
32
+ if (this._valueSet = !0, this.multi) {
33
33
  const t = e ? e.split(",").map((n) => n.trim()).filter(Boolean) : [], i = this._selectedValues$.value;
34
34
  JSON.stringify(t) !== JSON.stringify(i) && this._selectedValues$.next(t);
35
- } else e !== this._selectedValue$.value && this._selectedValue$.next(e);
35
+ } else e !== this._selectedValue$.value && (this._selectedValue$.next(e), this._updateInputDisplay());
36
36
  }
37
37
  connectedCallback() {
38
38
  super.connectedCallback(), this.id || (this.id = `sch-autocomplete-${Math.random().toString(36).slice(2, 9)}`), this._setupAutocompleteLogic(), this._setupDocumentClickHandler();
@@ -64,14 +64,14 @@ let l = class extends w(":host{display:block;border:unset!important;line-height:
64
64
  const t = e.trim();
65
65
  if (t) {
66
66
  const i = this._options.map((r) => {
67
- const s = r.label || r.textContent || "", o = r.value, p = m(t, s), c = m(t, o);
67
+ const s = r.label || r.textContent || "", l = r.value, p = m(t, s), c = m(t, l);
68
68
  return { option: r, score: Math.max(1.1 * p, c) };
69
69
  });
70
70
  i.sort((r, s) => s.score - r.score);
71
71
  let n = 0;
72
72
  i.forEach((r, s) => {
73
- const { option: o, score: p } = r;
74
- p < this.similarityThreshold ? o.hidden = !0 : (o.hidden = !1, n++, o.style.order = String(s));
73
+ const { option: l, score: p } = r;
74
+ p < this.similarityThreshold ? l.hidden = !0 : (l.hidden = !1, n++, l.style.order = String(s));
75
75
  }), this._visibleOptionsCount = n, this._hasResults = n > 0;
76
76
  } else this._options.forEach((i) => {
77
77
  i.hidden = !1, i.style.order = "0";
@@ -95,7 +95,7 @@ let l = class extends w(":host{display:block;border:unset!important;line-height:
95
95
  });
96
96
  }
97
97
  _updateInputDisplay() {
98
- if (this.multi || this._open) return;
98
+ if (this.multi) return;
99
99
  const e = this._selectedValue$.value, t = this._options.find((i) => i.value === e);
100
100
  this._inputValue = t && (t.label || t.textContent) || "", this._inputValue$.next(this._inputValue), this._inputElementRef.value && (this._inputElementRef.value.value = this._inputValue);
101
101
  }
@@ -117,7 +117,7 @@ let l = class extends w(":host{display:block;border:unset!important;line-height:
117
117
  return this._inputElementRef.value ? this._inputElementRef.value.reportValidity() : this.checkValidity();
118
118
  }
119
119
  firstUpdated() {
120
- this._setupOptionHandlers(), this.shadowRoot?.querySelector("slot")?.addEventListener("slotchange", () => {
120
+ this._setupOptionHandlers(), this._updateInputDisplay(), this.shadowRoot?.querySelector("slot")?.addEventListener("slotchange", () => {
121
121
  this._setupOptionHandlers(), this._updateOptionSelection(this._selectedValue$.value, this._selectedValues$.value);
122
122
  });
123
123
  }
@@ -174,7 +174,7 @@ let l = class extends w(":host{display:block;border:unset!important;line-height:
174
174
  ${k(this._selectedValues$.value, (s) => s, (s) => h`
175
175
  <schmancy-input-chip
176
176
  .value=${s}
177
- @remove=${(o) => this.handleChipRemove(o.detail.value)}
177
+ @remove=${(l) => this.handleChipRemove(l.detail.value)}
178
178
  class="flex-shrink-0 my-0.5"
179
179
  >
180
180
  ${this._getChipLabel(s)}
@@ -192,8 +192,8 @@ let l = class extends w(":host{display:block;border:unset!important;line-height:
192
192
  .value=${this._inputValue}
193
193
  .autocomplete=${this.autocomplete}
194
194
  @input=${(s) => {
195
- const o = s.target.value;
196
- this._inputValue = o, this._inputValue$.next(o);
195
+ const l = s.target.value;
196
+ this._inputValue = l, this._inputValue$.next(l);
197
197
  }}
198
198
  @focus=${(s) => {
199
199
  s.stopPropagation(), this._inputValue = "", this._inputValue$.next(""), this._open = !0;
@@ -236,8 +236,8 @@ let l = class extends w(":host{display:block;border:unset!important;line-height:
236
236
  aria-expanded=${this._open}
237
237
  aria-describedby=${this.description ? e : void 0}
238
238
  @input=${(s) => {
239
- const o = s.target.value;
240
- this._inputValue = o, this._inputValue$.next(o);
239
+ const l = s.target.value;
240
+ this._inputValue = l, this._inputValue$.next(l);
241
241
  }}
242
242
  @focus=${(s) => {
243
243
  s.stopPropagation(), this._open = !0;
@@ -283,7 +283,7 @@ let l = class extends w(":host{display:block;border:unset!important;line-height:
283
283
  let t = null, i = 0;
284
284
  this._options.forEach((n) => {
285
285
  if (n.hidden) return;
286
- const r = n.label || n.textContent || "", s = n.value, o = m(e, r), p = m(e, s), c = Math.max(1.1 * o, p);
286
+ const r = n.label || n.textContent || "", s = n.value, l = m(e, r), p = m(e, s), c = Math.max(1.1 * l, p);
287
287
  c > i && c >= this.similarityThreshold && (i = c, t = n);
288
288
  }), t && (this._selectOption(t), this._open = !1);
289
289
  }
@@ -291,14 +291,14 @@ let l = class extends w(":host{display:block;border:unset!important;line-height:
291
291
  const t = this._open, i = this._selectedValues$.value;
292
292
  if (this.multi && e.key === "Backspace" && !this._inputValue && i.length > 0 && !t) {
293
293
  e.preventDefault();
294
- const o = i[i.length - 1];
295
- return void this.handleChipRemove(o);
294
+ const l = i[i.length - 1];
295
+ return void this.handleChipRemove(l);
296
296
  }
297
297
  if (!t && (e.key === "ArrowDown" || e.key === "Enter")) return e.preventDefault(), this._open = !0, void setTimeout(() => {
298
298
  this._options.find((p) => !p.hidden)?.focus();
299
299
  }, 10);
300
300
  if (!t) return;
301
- const n = this._options.filter((o) => !o.hidden).sort((o, p) => parseInt(o.style.order || "0") - parseInt(p.style.order || "0")), r = n.find((o) => o === document.activeElement), s = r ? n.indexOf(r) : -1;
301
+ const n = this._options.filter((l) => !l.hidden).sort((l, p) => parseInt(l.style.order || "0") - parseInt(p.style.order || "0")), r = n.find((l) => l === document.activeElement), s = r ? n.indexOf(r) : -1;
302
302
  switch (e.key) {
303
303
  case "Escape":
304
304
  e.preventDefault(), this._open = !1, this._updateInputDisplay(), this._inputElementRef.value?.focus();
@@ -308,8 +308,8 @@ let l = class extends w(":host{display:block;border:unset!important;line-height:
308
308
  break;
309
309
  case "ArrowDown":
310
310
  e.preventDefault();
311
- const o = s < n.length - 1 ? s + 1 : 0;
312
- n[o]?.focus();
311
+ const l = s < n.length - 1 ? s + 1 : 0;
312
+ n[l]?.focus();
313
313
  break;
314
314
  case "ArrowUp":
315
315
  e.preventDefault();
@@ -328,5 +328,5 @@ let l = class extends w(":host{display:block;border:unset!important;line-height:
328
328
  }
329
329
  }
330
330
  };
331
- a([u({ type: Boolean })], l.prototype, "required", 2), a([u({ type: String })], l.prototype, "placeholder", 2), a([u({ type: String, reflect: !0 })], l.prototype, "label", 2), a([u({ type: String })], l.prototype, "name", 2), a([u({ type: String })], l.prototype, "maxHeight", 2), a([u({ type: Boolean })], l.prototype, "multi", 2), a([u({ type: String })], l.prototype, "description", 2), a([u({ type: String, reflect: !0 })], l.prototype, "size", 2), a([u({ type: String })], l.prototype, "autocomplete", 2), a([u({ type: Number })], l.prototype, "debounceMs", 2), a([u({ type: Number })], l.prototype, "similarityThreshold", 2), a([u({ type: Boolean })], l.prototype, "error", 2), a([u({ type: String })], l.prototype, "validationMessage", 2), a([u({ type: Array })], l.prototype, "values", 1), a([u({ type: String, reflect: !0 })], l.prototype, "value", 1), a([d()], l.prototype, "_open", 2), a([d()], l.prototype, "_inputValue", 2), a([d()], l.prototype, "_visibleOptionsCount", 2), a([d()], l.prototype, "_hasResults", 2), a([g("#options")], l.prototype, "_listbox", 2), a([g("sch-input")], l.prototype, "_input", 2), a([V({ flatten: !0 })], l.prototype, "_options", 2), l = a([S("schmancy-autocomplete")], l);
332
- //# sourceMappingURL=autocomplete-BlhAOtex.js.map
331
+ a([u({ type: Boolean })], o.prototype, "required", 2), a([u({ type: String })], o.prototype, "placeholder", 2), a([u({ type: String, reflect: !0 })], o.prototype, "label", 2), a([u({ type: String })], o.prototype, "name", 2), a([u({ type: String })], o.prototype, "maxHeight", 2), a([u({ type: Boolean })], o.prototype, "multi", 2), a([u({ type: String })], o.prototype, "description", 2), a([u({ type: String, reflect: !0 })], o.prototype, "size", 2), a([u({ type: String })], o.prototype, "autocomplete", 2), a([u({ type: Number })], o.prototype, "debounceMs", 2), a([u({ type: Number })], o.prototype, "similarityThreshold", 2), a([u({ type: Boolean })], o.prototype, "error", 2), a([u({ type: String })], o.prototype, "validationMessage", 2), a([u({ type: Array })], o.prototype, "values", 1), a([u({ type: String, reflect: !0 })], o.prototype, "value", 1), a([d()], o.prototype, "_open", 2), a([d()], o.prototype, "_inputValue", 2), a([d()], o.prototype, "_visibleOptionsCount", 2), a([d()], o.prototype, "_hasResults", 2), a([g("#options")], o.prototype, "_listbox", 2), a([g("sch-input")], o.prototype, "_input", 2), a([V({ flatten: !0 })], o.prototype, "_options", 2), o = a([S("schmancy-autocomplete")], o);
332
+ //# sourceMappingURL=autocomplete-CeB2VvCm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autocomplete-CeB2VvCm.js","sources":["../src/autocomplete/autocomplete.ts"],"sourcesContent":["import { $LitElement } from '@mixins/index'\nimport { InputSize, SchmancyInput } from '@schmancy/input'\nimport SchmancyOption from '@schmancy/option/option'\nimport { html } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { repeat } from 'lit/directives/repeat.js'\nimport { when } from 'lit/directives/when.js'\nimport {\n BehaviorSubject,\n combineLatest\n} from 'rxjs'\nimport {\n debounceTime,\n distinctUntilChanged,\n take,\n takeUntil,\n tap\n} from 'rxjs/operators'\nimport style from './autocomplete.scss?inline'\n\n// Import the similarity function (or include it inline)\nimport { similarity } from '../utils/search'\n// Import chip component for multi-select display\nimport '../chips/input-chip'\n\nexport type SchmancyAutocompleteChangeEvent = CustomEvent<{\n value: string | string[]\n values?: string[]\n}>\n\ninterface FilteredOption {\n option: SchmancyOption\n score: number\n}\n\n@customElement('schmancy-autocomplete')\nexport default class SchmancyAutocomplete extends $LitElement(style) {\n // Track whether value/values have been explicitly set\n _valueSet: boolean = false\n _valuesSet: boolean = false\n\n // Public API properties\n @property({ type: Boolean }) required = false\n @property({ type: String }) placeholder = ''\n @property({ type: String, reflect: true }) label = ''\n @property({ type: String }) name = ''\n @property({ type: String }) maxHeight = '300px'\n @property({ type: Boolean }) multi = false\n @property({ type: String }) description = ''\n @property({ type: String, reflect: true }) size: InputSize = 'md'\n @property({ type: String }) autocomplete = 'off'\n @property({ type: Number }) debounceMs = 200\n @property({ type: Number }) similarityThreshold = 0.3 // Minimum similarity score to show option\n @property({ type: Boolean }) error = false\n @property({ type: String }) validationMessage = ''\n\n // Values property for multi-select mode\n @property({ type: Array })\n get values() {\n return [...this._selectedValues$.value]\n }\n set values(vals: string[]) {\n this._valuesSet = true\n this._selectedValues$.next(Array.isArray(vals) ? [...vals] : [])\n }\n\n // Value property\n @property({ type: String, reflect: true })\n get value() {\n return this.multi \n ? this._selectedValues$.value.join(',')\n : this._selectedValue$.value\n }\n set value(val: string) {\n this._valueSet = true\n if (this.multi) {\n const newValues = val ? val.split(',').map(v => v.trim()).filter(Boolean) : []\n const currentValues = this._selectedValues$.value\n // Only update if values actually changed\n if (JSON.stringify(newValues) !== JSON.stringify(currentValues)) {\n this._selectedValues$.next(newValues)\n }\n } else {\n // Only update if value actually changed\n if (val !== this._selectedValue$.value) {\n this._selectedValue$.next(val)\n // Update the input display when value is set\n this._updateInputDisplay()\n }\n }\n }\n\n // State\n @state() private _open = false\n @state() private _inputValue = ''\n @state() private _visibleOptionsCount = 0\n @state() private _hasResults = true\n\n // Track if we're clicking on an option to prevent blur interference\n private _isSelectingOption = false\n\n // DOM references\n @query('#options') _listbox!: HTMLUListElement\n @query('sch-input') _input!: SchmancyInput\n @queryAssignedElements({ flatten: true }) private _options!: SchmancyOption[]\n private _inputElementRef = createRef<HTMLInputElement>()\n\n // RxJS Subjects - only what we actually need\n private _selectedValue$ = new BehaviorSubject<string>('')\n private _selectedValues$ = new BehaviorSubject<string[]>([])\n private _inputValue$ = new BehaviorSubject<string>('')\n\n connectedCallback() {\n super.connectedCallback()\n\n if (!this.id) {\n this.id = `sch-autocomplete-${Math.random().toString(36).slice(2, 9)}`\n }\n\n this._setupAutocompleteLogic()\n this._setupDocumentClickHandler()\n }\n\n private _setupAutocompleteLogic() {\n // Sync selection state\n combineLatest([\n this._selectedValue$,\n this._selectedValues$\n ]).pipe(\n tap(([selectedValue, selectedValues]) => {\n this._updateOptionSelection(selectedValue, selectedValues)\n }),\n takeUntil(this.disconnecting)\n ).subscribe()\n\n // Filter options based on input\n this._inputValue$.pipe(\n distinctUntilChanged(),\n debounceTime(this.debounceMs),\n tap(searchTerm => {\n if (this._open) {\n this._filterOptions(searchTerm)\n }\n }),\n takeUntil(this.disconnecting)\n ).subscribe()\n }\n\n private _setupOptionHandlers() {\n this._options.forEach((option, index) => {\n option.setAttribute('role', 'option')\n option.tabIndex = -1\n if (!option.id) {\n option.id = `${this.id}-option-${index}`\n }\n // Prevent blur handler from interfering with option selection\n option.onmousedown = (e: MouseEvent) => {\n e.preventDefault() // Prevent focus loss\n this._isSelectingOption = true\n }\n\n // Handle the actual selection\n option.onclick = (e: MouseEvent) => {\n e.stopPropagation()\n this._selectOption(option)\n // Reset flag after a short delay\n setTimeout(() => {\n this._isSelectingOption = false\n }, 50)\n }\n })\n }\n\n private _updateOptionSelection(selectedValue: string, selectedValues: string[]) {\n this._options.forEach(option => {\n option.selected = this.multi\n ? selectedValues.includes(option.value)\n : option.value === selectedValue\n option.setAttribute('aria-selected', String(option.selected))\n })\n }\n\n private _filterOptions(searchTerm: string) {\n const term = searchTerm.trim()\n\n if (!term) {\n // Show all options if no search term\n this._options.forEach(option => {\n option.hidden = false\n option.style.order = '0'\n })\n this._visibleOptionsCount = this._options.length\n this._hasResults = true\n } else {\n // Calculate similarity scores for all options\n const scoredOptions: FilteredOption[] = this._options.map(option => {\n const optionLabel = option.label || option.textContent || ''\n const optionValue = option.value\n\n const labelScore = similarity(term, optionLabel)\n const valueScore = similarity(term, optionValue)\n const score = Math.max(labelScore * 1.1, valueScore)\n\n return { option, score }\n })\n\n // Sort by score (highest first)\n scoredOptions.sort((a, b) => b.score - a.score)\n\n // Apply visibility and ordering\n let visibleCount = 0\n scoredOptions.forEach((item, index) => {\n const { option, score } = item\n\n if (score < this.similarityThreshold) {\n option.hidden = true\n } else {\n option.hidden = false\n visibleCount++\n option.style.order = String(index)\n }\n })\n\n this._visibleOptionsCount = visibleCount\n this._hasResults = visibleCount > 0\n }\n\n this._announceToScreenReader(\n this._visibleOptionsCount > 0\n ? `${this._visibleOptionsCount} option${this._visibleOptionsCount === 1 ? '' : 's'} available.`\n : 'No results found.'\n )\n }\n\n private _selectOption(option: SchmancyOption) {\n if (this.multi) {\n const currentValues = this._selectedValues$.value\n const index = currentValues.indexOf(option.value)\n const newValues = index > -1\n ? currentValues.filter(v => v !== option.value)\n : [...currentValues, option.value]\n\n this._selectedValues$.next(newValues)\n this._announceToScreenReader(\n newValues.length > 0\n ? `Selected: ${this._getSelectedLabels().join(', ')}`\n : 'No options selected'\n )\n this._fireChangeEvent()\n } else {\n // Fix the bug: Update value BEFORE firing event\n this._selectedValue$.next(option.value)\n\n // Now fire event with the NEW value\n this._fireChangeEvent()\n\n // Update UI\n this._open = false\n this._inputValue = option.label || option.textContent || ''\n this._inputValue$.next(this._inputValue)\n\n // Blur the input\n setTimeout(() => this._inputElementRef.value?.blur(), 100)\n\n this._announceToScreenReader(`Selected: ${option.label || option.textContent}`)\n }\n }\n\n private _setupDocumentClickHandler() {\n // Simple document click handler\n const handleDocumentClick = (e: MouseEvent) => {\n if (!this._open) return\n\n const path = e.composedPath()\n if (!path.includes(this) && !this._options.some(opt => path.includes(opt))) {\n this._open = false\n this._updateInputDisplay()\n }\n }\n\n document.addEventListener('click', handleDocumentClick)\n\n // Cleanup on disconnect\n this.disconnecting.pipe(take(1)).subscribe(() => {\n document.removeEventListener('click', handleDocumentClick)\n })\n }\n\n\n private _updateInputDisplay() {\n // For multi-select, we don't update input display since chips show the selections\n if (this.multi) return\n\n const selectedValue = this._selectedValue$.value\n const option = this._options.find(opt => opt.value === selectedValue)\n this._inputValue = option ? option.label || option.textContent || '' : ''\n this._inputValue$.next(this._inputValue)\n\n if (this._inputElementRef.value) {\n this._inputElementRef.value.value = this._inputValue\n }\n }\n\n private _getSelectedLabels(): string[] {\n return this._options\n .filter(option => \n this.multi \n ? this._selectedValues$.value.includes(option.value)\n : option.value === this._selectedValue$.value\n )\n .map(option => option.label || option.textContent || '')\n }\n\n private _announceToScreenReader(message: string) {\n const liveRegion = this.shadowRoot?.querySelector('#live-status')\n if (liveRegion) {\n liveRegion.textContent = message\n }\n }\n\n private _fireChangeEvent() {\n const detail: SchmancyAutocompleteChangeEvent['detail'] = {\n value: this.value,\n }\n\n if (this.multi) {\n detail.values = [...this._selectedValues$.value]\n }\n\n this.dispatchEvent(\n new CustomEvent<SchmancyAutocompleteChangeEvent['detail']>('change', {\n detail,\n bubbles: true,\n composed: true,\n })\n )\n }\n\n public checkValidity(): boolean {\n if (!this.required) return true\n return this.multi \n ? this._selectedValues$.value.length > 0 \n : Boolean(this._selectedValue$.value)\n }\n\n public reportValidity(): boolean {\n if (this._inputElementRef.value) {\n return this._inputElementRef.value.reportValidity()\n }\n return this.checkValidity()\n }\n\n firstUpdated() {\n this._setupOptionHandlers()\n\n // Sync initial value with display after options are available\n this._updateInputDisplay()\n\n // Update options when slot changes\n const slot = this.shadowRoot?.querySelector('slot')\n slot?.addEventListener('slotchange', () => {\n this._setupOptionHandlers()\n this._updateOptionSelection(this._selectedValue$.value, this._selectedValues$.value)\n })\n }\n\n private handleChipRemove(value: string) {\n const currentValues = this._selectedValues$.value\n const newValues = currentValues.filter(v => v !== value)\n this._selectedValues$.next(newValues)\n this._fireChangeEvent()\n this._announceToScreenReader(`Removed: ${this._getChipLabel(value)}`)\n }\n\n private _getChipLabel(value: string): string {\n const option = this._options.find(opt => opt.value === value)\n return option ? option.label || option.textContent || value : value\n }\n\n private _focusTextInput() {\n if (this._inputElementRef.value) {\n this._inputElementRef.value.focus()\n }\n }\n\n render() {\n const descriptionId = `${this.id}-desc`\n\n // Get size-based styling to match Schmancy input\n const getSizeStyles = () => {\n switch (this.size) {\n case 'sm':\n return {\n height: 'min-h-[40px]',\n padding: 'px-2',\n fontSize: 'text-sm', // 14px\n labelSize: 'text-sm'\n }\n case 'lg':\n return {\n height: 'min-h-[60px]',\n padding: 'px-5',\n fontSize: 'text-lg', // 18px\n labelSize: 'text-lg'\n }\n case 'md':\n default:\n return {\n height: 'min-h-[50px]',\n padding: 'px-4',\n fontSize: 'text-base', // 16px\n labelSize: 'text-base'\n }\n }\n }\n\n const { height, padding, fontSize, labelSize } = getSizeStyles()\n\n return html`\n <div class=\"relative\">\n <!-- Screen reader live region -->\n <div id=\"live-status\" role=\"status\" aria-live=\"polite\" class=\"sr-only\"></div>\n\n <!-- Description -->\n ${this.description ? html`<div id=\"${descriptionId}\" class=\"sr-only\">${this.description}</div>` : ''}\n\n <!-- Custom input wrapper for Gmail-style chip input -->\n <slot name=\"trigger\">\n ${when(this.multi,\n () => html`\n <!-- Custom multi-select input with inline chips -->\n <div class=\"relative\">\n ${when(this.label, () => html`\n <label class=\"${classMap({\n 'block mb-1 font-medium': true,\n 'text-primary-default': !this.error,\n 'text-error-default': this.error,\n [labelSize]: true\n })}\">\n ${this.label}${this.required ? html`<span class=\"text-error-default ml-1\">*</span>` : ''}\n </label>\n `)}\n <div\n class=\"${classMap({\n 'flex flex-wrap items-center gap-1': true,\n [height]: true,\n [padding]: true,\n 'block w-full min-w-0 rounded-[8px] border-0': true,\n 'bg-surface-highest text-surface-on': true,\n 'ring-0 ring-inset focus-within:ring-1 focus-within:ring-inset': true,\n 'ring-secondary-default focus-within:ring-secondary-default': !this.error,\n 'ring-error-default focus-within:ring-error-default': this.error,\n 'cursor-text transition-colors duration-200': true\n })}\"\n @click=${() => this._focusTextInput()}\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n aria-controls=\"options\"\n aria-expanded=${this._open}\n >\n <!-- Render chips inline -->\n ${repeat(\n this._selectedValues$.value,\n value => value,\n value => html`\n <schmancy-input-chip\n .value=${value}\n @remove=${(e: CustomEvent) => this.handleChipRemove(e.detail.value)}\n class=\"flex-shrink-0 my-0.5\"\n >\n ${this._getChipLabel(value)}\n </schmancy-input-chip>\n `\n )}\n\n <!-- Text input for typing -->\n <input\n ${ref(this._inputElementRef)}\n id=\"autocomplete-input\"\n type=\"text\"\n class=\"flex-1 min-w-[120px] py-1 bg-transparent border-none outline-none ${fontSize} font-medium text-surface-on placeholder:text-muted\"\n name=${this.name || this.label?.toLowerCase().replace(/\\s+/g, '-') || ''}\n .placeholder=${this._selectedValues$.value.length > 0 ? 'Add more...' : this.placeholder}\n .value=${this._inputValue}\n .autocomplete=${this.autocomplete}\n @input=${(e: Event) => {\n const value = (e.target as HTMLInputElement).value\n this._inputValue = value\n this._inputValue$.next(value)\n }}\n @focus=${(e: FocusEvent) => {\n e.stopPropagation()\n // Clear input on focus for new searches\n this._inputValue = ''\n this._inputValue$.next('')\n this._open = true\n }}\n @keydown=${(e: KeyboardEvent) => {\n this._handleKeyDown(e)\n }}\n @blur=${() => {\n this._handleAutoSelectOnBlur()\n }}\n />\n </div>\n\n <!-- Validation message -->\n ${when(this.error && this.validationMessage, () => html`\n <div class=\"mt-1 text-sm text-error-default\">\n ${this.validationMessage}\n </div>\n `)}\n </div>\n `,\n () => html`\n <!-- Regular single-select input -->\n <schmancy-input\n .size=${this.size}\n ${ref(this._inputElementRef)}\n id=\"autocomplete-input\"\n class=\"w-full\"\n .name=${this.name || this.label?.toLowerCase().replace(/\\s+/g, '-') || ''}\n .label=${this.label}\n .placeholder=${this.placeholder}\n .required=${this.required}\n .value=${this._inputValue}\n type=\"text\"\n autocomplete=${this.autocomplete}\n clickable\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n aria-controls=\"options\"\n aria-expanded=${this._open}\n aria-describedby=${this.description ? descriptionId : undefined}\n @input=${(e: Event) => {\n const value = (e.target as HTMLInputElement).value\n this._inputValue = value\n this._inputValue$.next(value)\n }}\n @focus=${(e: FocusEvent) => {\n e.stopPropagation()\n this._open = true\n }}\n @click=${(e: MouseEvent) => {\n e.stopPropagation()\n this._open = true\n }}\n @keydown=${(e: KeyboardEvent) => {\n this._handleKeyDown(e)\n }}\n @blur=${() => {\n this._handleAutoSelectOnBlur()\n }}\n >\n </schmancy-input>\n `\n )}\n </slot>\n\n <!-- Options dropdown -->\n <ul\n id=\"options\"\n class=${classMap({\n 'absolute': true,\n 'z-[1000]': true,\n 'mt-1': true,\n 'w-full': true,\n 'rounded-md': true,\n 'shadow-md': true,\n 'overflow-auto': true,\n 'min-w-full': true,\n 'bg-surface-low': true,\n 'flex': true,\n 'flex-col': true, // Enable flexbox for ordering\n })}\n role=\"listbox\"\n aria-multiselectable=${this.multi ? 'true' : 'false'}\n aria-label=${`${this.label || 'Options'} dropdown`}\n ?hidden=${!this._open}\n style=\"max-height: ${this.maxHeight}; display: ${this._open ? 'flex' : 'none'};\"\n @slotchange=${() => {\n this._setupOptionHandlers()\n }}\n >\n <slot></slot>\n ${!this._hasResults ? html`\n <li class=\"px-3 py-2 text-sm text-muted\">No results found</li>\n ` : ''}\n </ul>\n </div>\n `\n }\n\n private _handleAutoSelectOnBlur() {\n // Don't run if we're clicking on an option (prevents interference with click handler)\n if (this._isSelectingOption) {\n return\n }\n\n // Only auto-select in single-select mode and when dropdown is open with a search term\n if (this.multi || !this._open || !this._inputValue.trim()) {\n return\n }\n \n const searchTerm = this._inputValue.trim()\n \n // Find the best matching option using the same similarity logic as filtering\n let bestMatch: SchmancyOption | null = null\n let bestScore = 0\n \n this._options.forEach(option => {\n // Skip hidden options\n if (option.hidden) return\n \n // Get text to search in (prioritize label, then textContent, then value)\n const optionLabel = option.label || option.textContent || ''\n const optionValue = option.value\n \n // Calculate similarity scores for both label and value\n const labelScore = similarity(searchTerm, optionLabel)\n const valueScore = similarity(searchTerm, optionValue)\n \n // Use the higher score (prioritizing label matches)\n const score = Math.max(labelScore * 1.1, valueScore) // Slight boost for label matches\n \n // Keep track of best match that meets threshold\n if (score > bestScore && score >= this.similarityThreshold) {\n bestScore = score\n bestMatch = option\n }\n })\n \n // Auto-select the best match if found\n if (bestMatch) {\n // Select the option directly\n this._selectOption(bestMatch)\n\n // Close the dropdown\n this._open = false\n }\n }\n\n private _handleKeyDown(event: KeyboardEvent) {\n const isOpen = this._open\n const selectedValues = this._selectedValues$.value\n\n // Handle backspace to remove last chip in multi-select when input is empty\n if (this.multi && event.key === 'Backspace' && !this._inputValue && selectedValues.length > 0 && !isOpen) {\n event.preventDefault()\n const lastValue = selectedValues[selectedValues.length - 1]\n this.handleChipRemove(lastValue)\n return\n }\n\n if (!isOpen && (event.key === 'ArrowDown' || event.key === 'Enter')) {\n event.preventDefault()\n this._open = true\n\n setTimeout(() => {\n const firstVisible = this._options.find(opt => !opt.hidden)\n firstVisible?.focus()\n }, 10)\n return\n }\n\n if (!isOpen) return\n\n const visibleOptions = this._options.filter(opt => !opt.hidden)\n .sort((a, b) => parseInt(a.style.order || '0') - parseInt(b.style.order || '0'))\n\n const focusedOption = visibleOptions.find(opt => opt === document.activeElement)\n const currentIndex = focusedOption ? visibleOptions.indexOf(focusedOption) : -1\n\n switch (event.key) {\n case 'Escape':\n event.preventDefault()\n this._open = false\n this._updateInputDisplay()\n this._inputElementRef.value?.focus()\n break\n\n case 'Tab':\n this._open = false\n this._updateInputDisplay()\n break\n\n case 'ArrowDown':\n event.preventDefault()\n const nextIndex = currentIndex < visibleOptions.length - 1 ? currentIndex + 1 : 0\n visibleOptions[nextIndex]?.focus()\n break\n\n case 'ArrowUp':\n event.preventDefault()\n const prevIndex = currentIndex > 0 ? currentIndex - 1 : visibleOptions.length - 1\n visibleOptions[prevIndex]?.focus()\n break\n\n case 'Home':\n event.preventDefault()\n visibleOptions[0]?.focus()\n break\n\n case 'End':\n event.preventDefault()\n visibleOptions[visibleOptions.length - 1]?.focus()\n break\n\n case 'Enter':\n case ' ':\n if (focusedOption) {\n event.preventDefault()\n this._selectOption(focusedOption)\n }\n break\n }\n }\n}\n\n\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'schmancy-autocomplete': SchmancyAutocomplete\n }\n}"],"names":["SchmancyAutocomplete","$LitElement","constructor","super","arguments","this","_valueSet","_valuesSet","required","placeholder","label","name","maxHeight","multi","description","size","autocomplete","debounceMs","similarityThreshold","error","validationMessage","_open","_inputValue","_visibleOptionsCount","_hasResults","_isSelectingOption","_inputElementRef","createRef","_selectedValue$","BehaviorSubject","_selectedValues$","_inputValue$","values","value","vals","next","Array","isArray","join","val","newValues","split","map","v","trim","filter","Boolean","currentValues","JSON","stringify","_updateInputDisplay","connectedCallback","id","Math","random","toString","slice","_setupAutocompleteLogic","_setupDocumentClickHandler","combineLatest","pipe","tap","selectedValue","selectedValues","_updateOptionSelection","takeUntil","disconnecting","subscribe","distinctUntilChanged","debounceTime","searchTerm","_filterOptions","_setupOptionHandlers","_options","forEach","option","index","setAttribute","tabIndex","onmousedown","e","preventDefault","onclick","stopPropagation","_selectOption","setTimeout","selected","includes","String","term","scoredOptions","optionLabel","textContent","optionValue","labelScore","similarity","valueScore","score","max","sort","a","b","visibleCount","item","hidden","style","order","length","_announceToScreenReader","indexOf","_getSelectedLabels","_fireChangeEvent","blur","handleDocumentClick","path","composedPath","some","opt","document","addEventListener","take","removeEventListener","find","message","liveRegion","shadowRoot","querySelector","detail","dispatchEvent","CustomEvent","bubbles","composed","checkValidity","reportValidity","firstUpdated","_getChipLabel","_focusTextInput","focus","render","descriptionId","height","padding","fontSize","labelSize","getSizeStyles","html","when","classMap","repeat","handleChipRemove","ref","toLowerCase","replace","target","_handleKeyDown","_handleAutoSelectOnBlur","absolute","flex","bestMatch","bestScore","event","isOpen","key","lastValue","firstVisible","visibleOptions","parseInt","focusedOption","activeElement","currentIndex","nextIndex","prevIndex","__decorateClass","property","type","prototype","reflect","Number","state","query","queryAssignedElements","flatten","customElement"],"mappings":";;;;;;;;;;;;;;;;;AAsCA,IAAqBA,IAArB,cAAkDC;EAAlD,cAAAC;AAAAC,aAAAC,SAAAA,GAEKC,KAAAC,YAAAA,IACAD,KAAAE,aAAAA,IAG4BF,KAAAG,WAAAA,IACDH,KAAAI,cAAc,IACCJ,KAAAK,QAAQ,IACvBL,KAAAM,OAAO,IACPN,KAAAO,YAAY,SACXP,KAAAQ,QAAAA,IACDR,KAAAS,cAAc,IACCT,KAAAU,OAAkB,MACjCV,KAAAW,eAAe,OACfX,KAAAY,aAAa,KACbZ,KAAAa,sBAAsB,KACrBb,KAAAc,QAAAA,IACDd,KAAAe,oBAAoB,IAuCvCf,KAAQgB,QAAAA,IACRhB,KAAQiB,cAAc,IACtBjB,KAAQkB,uBAAuB,GAC/BlB,KAAQmB,cAAAA,IAGjBnB,KAAQoB,qBAAAA,IAMRpB,KAAQqB,mBAAmBC,EAAAA,GAG3BtB,KAAQuB,kBAAkB,IAAIC,EAAwB,EAAA,GACtDxB,KAAQyB,mBAAmB,IAAID,EAA0B,CAAA,CAAA,GACzDxB,KAAQ0B,eAAe,IAAIF,EAAwB,EAAA;AAAA,EAAE;AAAA,EApDrD,IAAA,SAAIG;AACA,WAAO,CAAA,GAAI3B,KAAKyB,iBAAiBG;EACrC;A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AgCb+K,WAAA,SAAA,IAyBaH,EAAA,CAAhBM,EAAAA,CAAAA,GAzDgBlL,EAyDA+K,WAAA,SAAA,CAAA,GACAH,EAAA,CAAhBM,EAAAA,CAAAA,GA1DgBlL,EA0DA+K,WAAA,eAAA,CAAA,GACAH,EAAA,CAAhBM,EAAAA,CAAAA,GA3DgBlL,EA2DA+K,WAAA,wBAAA,CAAA,GACAH,EAAA,CAAhBM,EAAAA,CAAAA,GA5DgBlL,EA4DA+K,WAAA,eAAA,CAAA,GAMEH,EAAA,CAAlBO,EAAM,UAAA,CAAA,GAlEUnL,EAkEE+K,WAAA,YAAA,CAAA,GACCH,EAAA,CAAnBO,EAAM,WAAA,CAAA,GAnEUnL,EAmEG+K,WAAA,UAAA,CAAA,GAC8BH,EAAA,CAAjDQ,EAAsB,EAAEC,SAAAA,GAAS,CAAA,CAAA,GApEjBrL,EAoEiC+K,WAAA,YAAA,CAAA,GApEjC/K,IAArB4K,EAAA,CADCU,EAAc,uBAAA,CAAA,GACMtL,CAAAA;"}
@@ -1,4 +1,4 @@
1
- "use strict";const m=require("rxjs"),f=require("lit/directives/class-map.js");require("lit/directives/style-map.js");const a=require("lit/decorators.js");require("./tailwind.mixin-CFrLBtkD.cjs");const b=require("./litElement.mixin-DUiUa087.cjs"),h=require("lit"),v=require("lit/directives/ref.js"),g=require("lit/directives/repeat.js"),y=require("lit/directives/when.js"),c=require("rxjs/operators"),_=require("./search-DWW8IoOp.cjs");require("./input-chip-Cf25jEob.cjs");var $=Object.defineProperty,x=Object.getOwnPropertyDescriptor,r=(e,t,i,n)=>{for(var u,s=n>1?void 0:n?x(t,i):t,l=e.length-1;l>=0;l--)(u=e[l])&&(s=(n?u(t,i,s):u(s))||s);return n&&s&&$(t,i,s),s};let o=class extends b.$LitElement(":host{display:block;border:unset!important;line-height:unset!important;background:unset!important;padding:unset!important;font-size:unset!important;box-shadow:unset!important}:host:focus{box-shadow:unset!important}@keyframes onAutoFillStart{}sch-input::part(input):-webkit-autofill,sch-input input:-webkit-autofill{animation-name:onAutoFillStart;animation-duration:1ms}"){constructor(){super(...arguments),this.required=!1,this.placeholder="",this.label="",this.name="",this.maxHeight="300px",this.multi=!1,this.description="",this.size="md",this.autocomplete="off",this.debounceMs=200,this.similarityThreshold=.3,this.error=!1,this.validationMessage="",this._open=!1,this._inputValue="",this._visibleOptionsCount=0,this._hasResults=!0,this._isSelectingOption=!1,this._inputElementRef=v.createRef(),this._selectedValue$=new m.BehaviorSubject(""),this._selectedValues$=new m.BehaviorSubject([]),this._inputValue$=new m.BehaviorSubject("")}get values(){return[...this._selectedValues$.value]}set values(e){this._selectedValues$.next(Array.isArray(e)?[...e]:[])}get value(){return this.multi?this._selectedValues$.value.join(","):this._selectedValue$.value}set value(e){if(this.multi){const t=e?e.split(",").map(n=>n.trim()).filter(Boolean):[],i=this._selectedValues$.value;JSON.stringify(t)!==JSON.stringify(i)&&this._selectedValues$.next(t)}else e!==this._selectedValue$.value&&this._selectedValue$.next(e)}connectedCallback(){super.connectedCallback(),this.id||(this.id=`sch-autocomplete-${Math.random().toString(36).slice(2,9)}`),this._setupAutocompleteLogic(),this._setupDocumentClickHandler()}_setupAutocompleteLogic(){m.combineLatest([this._selectedValue$,this._selectedValues$]).pipe(c.tap(([e,t])=>{this._updateOptionSelection(e,t)}),c.takeUntil(this.disconnecting)).subscribe(),this._inputValue$.pipe(c.distinctUntilChanged(),c.debounceTime(this.debounceMs),c.tap(e=>{this._open&&this._filterOptions(e)}),c.takeUntil(this.disconnecting)).subscribe()}_setupOptionHandlers(){this._options.forEach((e,t)=>{e.setAttribute("role","option"),e.tabIndex=-1,e.id||(e.id=`${this.id}-option-${t}`),e.onmousedown=i=>{i.preventDefault(),this._isSelectingOption=!0},e.onclick=i=>{i.stopPropagation(),this._selectOption(e),setTimeout(()=>{this._isSelectingOption=!1},50)}})}_updateOptionSelection(e,t){this._options.forEach(i=>{i.selected=this.multi?t.includes(i.value):i.value===e,i.setAttribute("aria-selected",String(i.selected))})}_filterOptions(e){const t=e.trim();if(t){const i=this._options.map(u=>{const s=u.label||u.textContent||"",l=u.value,p=_.similarity(t,s),d=_.similarity(t,l);return{option:u,score:Math.max(1.1*p,d)}});i.sort((u,s)=>s.score-u.score);let n=0;i.forEach((u,s)=>{const{option:l,score:p}=u;p<this.similarityThreshold?l.hidden=!0:(l.hidden=!1,n++,l.style.order=String(s))}),this._visibleOptionsCount=n,this._hasResults=n>0}else this._options.forEach(i=>{i.hidden=!1,i.style.order="0"}),this._visibleOptionsCount=this._options.length,this._hasResults=!0;this._announceToScreenReader(this._visibleOptionsCount>0?`${this._visibleOptionsCount} option${this._visibleOptionsCount===1?"":"s"} available.`:"No results found.")}_selectOption(e){if(this.multi){const t=this._selectedValues$.value,i=t.indexOf(e.value)>-1?t.filter(n=>n!==e.value):[...t,e.value];this._selectedValues$.next(i),this._announceToScreenReader(i.length>0?`Selected: ${this._getSelectedLabels().join(", ")}`:"No options selected"),this._fireChangeEvent()}else this._selectedValue$.next(e.value),this._fireChangeEvent(),this._open=!1,this._inputValue=e.label||e.textContent||"",this._inputValue$.next(this._inputValue),setTimeout(()=>this._inputElementRef.value?.blur(),100),this._announceToScreenReader(`Selected: ${e.label||e.textContent}`)}_setupDocumentClickHandler(){const e=t=>{if(!this._open)return;const i=t.composedPath();i.includes(this)||this._options.some(n=>i.includes(n))||(this._open=!1,this._updateInputDisplay())};document.addEventListener("click",e),this.disconnecting.pipe(c.take(1)).subscribe(()=>{document.removeEventListener("click",e)})}_updateInputDisplay(){if(this.multi||this._open)return;const e=this._selectedValue$.value,t=this._options.find(i=>i.value===e);this._inputValue=t&&(t.label||t.textContent)||"",this._inputValue$.next(this._inputValue),this._inputElementRef.value&&(this._inputElementRef.value.value=this._inputValue)}_getSelectedLabels(){return this._options.filter(e=>this.multi?this._selectedValues$.value.includes(e.value):e.value===this._selectedValue$.value).map(e=>e.label||e.textContent||"")}_announceToScreenReader(e){const t=this.shadowRoot?.querySelector("#live-status");t&&(t.textContent=e)}_fireChangeEvent(){const e={value:this.value};this.multi&&(e.values=[...this._selectedValues$.value]),this.dispatchEvent(new CustomEvent("change",{detail:e,bubbles:!0,composed:!0}))}checkValidity(){return!this.required||(this.multi?this._selectedValues$.value.length>0:!!this._selectedValue$.value)}reportValidity(){return this._inputElementRef.value?this._inputElementRef.value.reportValidity():this.checkValidity()}firstUpdated(){this._setupOptionHandlers(),this.shadowRoot?.querySelector("slot")?.addEventListener("slotchange",()=>{this._setupOptionHandlers(),this._updateOptionSelection(this._selectedValue$.value,this._selectedValues$.value)})}handleChipRemove(e){const t=this._selectedValues$.value.filter(i=>i!==e);this._selectedValues$.next(t),this._fireChangeEvent(),this._announceToScreenReader(`Removed: ${this._getChipLabel(e)}`)}_getChipLabel(e){const t=this._options.find(i=>i.value===e);return t&&(t.label||t.textContent)||e}_focusTextInput(){this._inputElementRef.value&&this._inputElementRef.value.focus()}render(){const e=`${this.id}-desc`,{height:t,padding:i,fontSize:n,labelSize:u}=(()=>{switch(this.size){case"sm":return{height:"min-h-[40px]",padding:"px-2",fontSize:"text-sm",labelSize:"text-sm"};case"lg":return{height:"min-h-[60px]",padding:"px-5",fontSize:"text-lg",labelSize:"text-lg"};default:return{height:"min-h-[50px]",padding:"px-4",fontSize:"text-base",labelSize:"text-base"}}})();return h.html`
1
+ "use strict";const m=require("rxjs"),f=require("lit/directives/class-map.js");require("lit/directives/style-map.js");const a=require("lit/decorators.js");require("./tailwind.mixin-CFrLBtkD.cjs");const b=require("./litElement.mixin-DUiUa087.cjs"),h=require("lit"),v=require("lit/directives/ref.js"),g=require("lit/directives/repeat.js"),y=require("lit/directives/when.js"),c=require("rxjs/operators"),_=require("./search-DWW8IoOp.cjs");require("./input-chip-Cf25jEob.cjs");var $=Object.defineProperty,x=Object.getOwnPropertyDescriptor,r=(e,t,i,n)=>{for(var u,s=n>1?void 0:n?x(t,i):t,l=e.length-1;l>=0;l--)(u=e[l])&&(s=(n?u(t,i,s):u(s))||s);return n&&s&&$(t,i,s),s};let o=class extends b.$LitElement(":host{display:block;border:unset!important;line-height:unset!important;background:unset!important;padding:unset!important;font-size:unset!important;box-shadow:unset!important}:host:focus{box-shadow:unset!important}@keyframes onAutoFillStart{}sch-input::part(input):-webkit-autofill,sch-input input:-webkit-autofill{animation-name:onAutoFillStart;animation-duration:1ms}"){constructor(){super(...arguments),this._valueSet=!1,this._valuesSet=!1,this.required=!1,this.placeholder="",this.label="",this.name="",this.maxHeight="300px",this.multi=!1,this.description="",this.size="md",this.autocomplete="off",this.debounceMs=200,this.similarityThreshold=.3,this.error=!1,this.validationMessage="",this._open=!1,this._inputValue="",this._visibleOptionsCount=0,this._hasResults=!0,this._isSelectingOption=!1,this._inputElementRef=v.createRef(),this._selectedValue$=new m.BehaviorSubject(""),this._selectedValues$=new m.BehaviorSubject([]),this._inputValue$=new m.BehaviorSubject("")}get values(){return[...this._selectedValues$.value]}set values(e){this._valuesSet=!0,this._selectedValues$.next(Array.isArray(e)?[...e]:[])}get value(){return this.multi?this._selectedValues$.value.join(","):this._selectedValue$.value}set value(e){if(this._valueSet=!0,this.multi){const t=e?e.split(",").map(n=>n.trim()).filter(Boolean):[],i=this._selectedValues$.value;JSON.stringify(t)!==JSON.stringify(i)&&this._selectedValues$.next(t)}else e!==this._selectedValue$.value&&(this._selectedValue$.next(e),this._updateInputDisplay())}connectedCallback(){super.connectedCallback(),this.id||(this.id=`sch-autocomplete-${Math.random().toString(36).slice(2,9)}`),this._setupAutocompleteLogic(),this._setupDocumentClickHandler()}_setupAutocompleteLogic(){m.combineLatest([this._selectedValue$,this._selectedValues$]).pipe(c.tap(([e,t])=>{this._updateOptionSelection(e,t)}),c.takeUntil(this.disconnecting)).subscribe(),this._inputValue$.pipe(c.distinctUntilChanged(),c.debounceTime(this.debounceMs),c.tap(e=>{this._open&&this._filterOptions(e)}),c.takeUntil(this.disconnecting)).subscribe()}_setupOptionHandlers(){this._options.forEach((e,t)=>{e.setAttribute("role","option"),e.tabIndex=-1,e.id||(e.id=`${this.id}-option-${t}`),e.onmousedown=i=>{i.preventDefault(),this._isSelectingOption=!0},e.onclick=i=>{i.stopPropagation(),this._selectOption(e),setTimeout(()=>{this._isSelectingOption=!1},50)}})}_updateOptionSelection(e,t){this._options.forEach(i=>{i.selected=this.multi?t.includes(i.value):i.value===e,i.setAttribute("aria-selected",String(i.selected))})}_filterOptions(e){const t=e.trim();if(t){const i=this._options.map(u=>{const s=u.label||u.textContent||"",l=u.value,p=_.similarity(t,s),d=_.similarity(t,l);return{option:u,score:Math.max(1.1*p,d)}});i.sort((u,s)=>s.score-u.score);let n=0;i.forEach((u,s)=>{const{option:l,score:p}=u;p<this.similarityThreshold?l.hidden=!0:(l.hidden=!1,n++,l.style.order=String(s))}),this._visibleOptionsCount=n,this._hasResults=n>0}else this._options.forEach(i=>{i.hidden=!1,i.style.order="0"}),this._visibleOptionsCount=this._options.length,this._hasResults=!0;this._announceToScreenReader(this._visibleOptionsCount>0?`${this._visibleOptionsCount} option${this._visibleOptionsCount===1?"":"s"} available.`:"No results found.")}_selectOption(e){if(this.multi){const t=this._selectedValues$.value,i=t.indexOf(e.value)>-1?t.filter(n=>n!==e.value):[...t,e.value];this._selectedValues$.next(i),this._announceToScreenReader(i.length>0?`Selected: ${this._getSelectedLabels().join(", ")}`:"No options selected"),this._fireChangeEvent()}else this._selectedValue$.next(e.value),this._fireChangeEvent(),this._open=!1,this._inputValue=e.label||e.textContent||"",this._inputValue$.next(this._inputValue),setTimeout(()=>this._inputElementRef.value?.blur(),100),this._announceToScreenReader(`Selected: ${e.label||e.textContent}`)}_setupDocumentClickHandler(){const e=t=>{if(!this._open)return;const i=t.composedPath();i.includes(this)||this._options.some(n=>i.includes(n))||(this._open=!1,this._updateInputDisplay())};document.addEventListener("click",e),this.disconnecting.pipe(c.take(1)).subscribe(()=>{document.removeEventListener("click",e)})}_updateInputDisplay(){if(this.multi)return;const e=this._selectedValue$.value,t=this._options.find(i=>i.value===e);this._inputValue=t&&(t.label||t.textContent)||"",this._inputValue$.next(this._inputValue),this._inputElementRef.value&&(this._inputElementRef.value.value=this._inputValue)}_getSelectedLabels(){return this._options.filter(e=>this.multi?this._selectedValues$.value.includes(e.value):e.value===this._selectedValue$.value).map(e=>e.label||e.textContent||"")}_announceToScreenReader(e){const t=this.shadowRoot?.querySelector("#live-status");t&&(t.textContent=e)}_fireChangeEvent(){const e={value:this.value};this.multi&&(e.values=[...this._selectedValues$.value]),this.dispatchEvent(new CustomEvent("change",{detail:e,bubbles:!0,composed:!0}))}checkValidity(){return!this.required||(this.multi?this._selectedValues$.value.length>0:!!this._selectedValue$.value)}reportValidity(){return this._inputElementRef.value?this._inputElementRef.value.reportValidity():this.checkValidity()}firstUpdated(){this._setupOptionHandlers(),this._updateInputDisplay(),this.shadowRoot?.querySelector("slot")?.addEventListener("slotchange",()=>{this._setupOptionHandlers(),this._updateOptionSelection(this._selectedValue$.value,this._selectedValues$.value)})}handleChipRemove(e){const t=this._selectedValues$.value.filter(i=>i!==e);this._selectedValues$.next(t),this._fireChangeEvent(),this._announceToScreenReader(`Removed: ${this._getChipLabel(e)}`)}_getChipLabel(e){const t=this._options.find(i=>i.value===e);return t&&(t.label||t.textContent)||e}_focusTextInput(){this._inputElementRef.value&&this._inputElementRef.value.focus()}render(){const e=`${this.id}-desc`,{height:t,padding:i,fontSize:n,labelSize:u}=(()=>{switch(this.size){case"sm":return{height:"min-h-[40px]",padding:"px-2",fontSize:"text-sm",labelSize:"text-sm"};case"lg":return{height:"min-h-[60px]",padding:"px-5",fontSize:"text-lg",labelSize:"text-lg"};default:return{height:"min-h-[50px]",padding:"px-4",fontSize:"text-base",labelSize:"text-base"}}})();return h.html`
2
2
  <div class="relative">
3
3
  <!-- Screen reader live region -->
4
4
  <div id="live-status" role="status" aria-live="polite" class="sr-only"></div>
@@ -109,4 +109,4 @@
109
109
  </ul>
110
110
  </div>
111
111
  `}_handleAutoSelectOnBlur(){if(this._isSelectingOption||this.multi||!this._open||!this._inputValue.trim())return;const e=this._inputValue.trim();let t=null,i=0;this._options.forEach(n=>{if(n.hidden)return;const u=n.label||n.textContent||"",s=n.value,l=_.similarity(e,u),p=_.similarity(e,s),d=Math.max(1.1*l,p);d>i&&d>=this.similarityThreshold&&(i=d,t=n)}),t&&(this._selectOption(t),this._open=!1)}_handleKeyDown(e){const t=this._open,i=this._selectedValues$.value;if(this.multi&&e.key==="Backspace"&&!this._inputValue&&i.length>0&&!t){e.preventDefault();const l=i[i.length-1];return void this.handleChipRemove(l)}if(!t&&(e.key==="ArrowDown"||e.key==="Enter"))return e.preventDefault(),this._open=!0,void setTimeout(()=>{this._options.find(p=>!p.hidden)?.focus()},10);if(!t)return;const n=this._options.filter(l=>!l.hidden).sort((l,p)=>parseInt(l.style.order||"0")-parseInt(p.style.order||"0")),u=n.find(l=>l===document.activeElement),s=u?n.indexOf(u):-1;switch(e.key){case"Escape":e.preventDefault(),this._open=!1,this._updateInputDisplay(),this._inputElementRef.value?.focus();break;case"Tab":this._open=!1,this._updateInputDisplay();break;case"ArrowDown":e.preventDefault();const l=s<n.length-1?s+1:0;n[l]?.focus();break;case"ArrowUp":e.preventDefault();const p=s>0?s-1:n.length-1;n[p]?.focus();break;case"Home":e.preventDefault(),n[0]?.focus();break;case"End":e.preventDefault(),n[n.length-1]?.focus();break;case"Enter":case" ":u&&(e.preventDefault(),this._selectOption(u))}}};r([a.property({type:Boolean})],o.prototype,"required",2),r([a.property({type:String})],o.prototype,"placeholder",2),r([a.property({type:String,reflect:!0})],o.prototype,"label",2),r([a.property({type:String})],o.prototype,"name",2),r([a.property({type:String})],o.prototype,"maxHeight",2),r([a.property({type:Boolean})],o.prototype,"multi",2),r([a.property({type:String})],o.prototype,"description",2),r([a.property({type:String,reflect:!0})],o.prototype,"size",2),r([a.property({type:String})],o.prototype,"autocomplete",2),r([a.property({type:Number})],o.prototype,"debounceMs",2),r([a.property({type:Number})],o.prototype,"similarityThreshold",2),r([a.property({type:Boolean})],o.prototype,"error",2),r([a.property({type:String})],o.prototype,"validationMessage",2),r([a.property({type:Array})],o.prototype,"values",1),r([a.property({type:String,reflect:!0})],o.prototype,"value",1),r([a.state()],o.prototype,"_open",2),r([a.state()],o.prototype,"_inputValue",2),r([a.state()],o.prototype,"_visibleOptionsCount",2),r([a.state()],o.prototype,"_hasResults",2),r([a.query("#options")],o.prototype,"_listbox",2),r([a.query("sch-input")],o.prototype,"_input",2),r([a.queryAssignedElements({flatten:!0})],o.prototype,"_options",2),o=r([a.customElement("schmancy-autocomplete")],o);
112
- //# sourceMappingURL=autocomplete-GW91jVqw.cjs.map
112
+ //# sourceMappingURL=autocomplete-ChRZ5y2p.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autocomplete-ChRZ5y2p.cjs","sources":["../src/autocomplete/autocomplete.ts"],"sourcesContent":["import { $LitElement } from '@mixins/index'\nimport { InputSize, SchmancyInput } from '@schmancy/input'\nimport SchmancyOption from '@schmancy/option/option'\nimport { html } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { repeat } from 'lit/directives/repeat.js'\nimport { when } from 'lit/directives/when.js'\nimport {\n BehaviorSubject,\n combineLatest\n} from 'rxjs'\nimport {\n debounceTime,\n distinctUntilChanged,\n take,\n takeUntil,\n tap\n} from 'rxjs/operators'\nimport style from './autocomplete.scss?inline'\n\n// Import the similarity function (or include it inline)\nimport { similarity } from '../utils/search'\n// Import chip component for multi-select display\nimport '../chips/input-chip'\n\nexport type SchmancyAutocompleteChangeEvent = CustomEvent<{\n value: string | string[]\n values?: string[]\n}>\n\ninterface FilteredOption {\n option: SchmancyOption\n score: number\n}\n\n@customElement('schmancy-autocomplete')\nexport default class SchmancyAutocomplete extends $LitElement(style) {\n // Track whether value/values have been explicitly set\n _valueSet: boolean = false\n _valuesSet: boolean = false\n\n // Public API properties\n @property({ type: Boolean }) required = false\n @property({ type: String }) placeholder = ''\n @property({ type: String, reflect: true }) label = ''\n @property({ type: String }) name = ''\n @property({ type: String }) maxHeight = '300px'\n @property({ type: Boolean }) multi = false\n @property({ type: String }) description = ''\n @property({ type: String, reflect: true }) size: InputSize = 'md'\n @property({ type: String }) autocomplete = 'off'\n @property({ type: Number }) debounceMs = 200\n @property({ type: Number }) similarityThreshold = 0.3 // Minimum similarity score to show option\n @property({ type: Boolean }) error = false\n @property({ type: String }) validationMessage = ''\n\n // Values property for multi-select mode\n @property({ type: Array })\n get values() {\n return [...this._selectedValues$.value]\n }\n set values(vals: string[]) {\n this._valuesSet = true\n this._selectedValues$.next(Array.isArray(vals) ? [...vals] : [])\n }\n\n // Value property\n @property({ type: String, reflect: true })\n get value() {\n return this.multi \n ? this._selectedValues$.value.join(',')\n : this._selectedValue$.value\n }\n set value(val: string) {\n this._valueSet = true\n if (this.multi) {\n const newValues = val ? val.split(',').map(v => v.trim()).filter(Boolean) : []\n const currentValues = this._selectedValues$.value\n // Only update if values actually changed\n if (JSON.stringify(newValues) !== JSON.stringify(currentValues)) {\n this._selectedValues$.next(newValues)\n }\n } else {\n // Only update if value actually changed\n if (val !== this._selectedValue$.value) {\n this._selectedValue$.next(val)\n // Update the input display when value is set\n this._updateInputDisplay()\n }\n }\n }\n\n // State\n @state() private _open = false\n @state() private _inputValue = ''\n @state() private _visibleOptionsCount = 0\n @state() private _hasResults = true\n\n // Track if we're clicking on an option to prevent blur interference\n private _isSelectingOption = false\n\n // DOM references\n @query('#options') _listbox!: HTMLUListElement\n @query('sch-input') _input!: SchmancyInput\n @queryAssignedElements({ flatten: true }) private _options!: SchmancyOption[]\n private _inputElementRef = createRef<HTMLInputElement>()\n\n // RxJS Subjects - only what we actually need\n private _selectedValue$ = new BehaviorSubject<string>('')\n private _selectedValues$ = new BehaviorSubject<string[]>([])\n private _inputValue$ = new BehaviorSubject<string>('')\n\n connectedCallback() {\n super.connectedCallback()\n\n if (!this.id) {\n this.id = `sch-autocomplete-${Math.random().toString(36).slice(2, 9)}`\n }\n\n this._setupAutocompleteLogic()\n this._setupDocumentClickHandler()\n }\n\n private _setupAutocompleteLogic() {\n // Sync selection state\n combineLatest([\n this._selectedValue$,\n this._selectedValues$\n ]).pipe(\n tap(([selectedValue, selectedValues]) => {\n this._updateOptionSelection(selectedValue, selectedValues)\n }),\n takeUntil(this.disconnecting)\n ).subscribe()\n\n // Filter options based on input\n this._inputValue$.pipe(\n distinctUntilChanged(),\n debounceTime(this.debounceMs),\n tap(searchTerm => {\n if (this._open) {\n this._filterOptions(searchTerm)\n }\n }),\n takeUntil(this.disconnecting)\n ).subscribe()\n }\n\n private _setupOptionHandlers() {\n this._options.forEach((option, index) => {\n option.setAttribute('role', 'option')\n option.tabIndex = -1\n if (!option.id) {\n option.id = `${this.id}-option-${index}`\n }\n // Prevent blur handler from interfering with option selection\n option.onmousedown = (e: MouseEvent) => {\n e.preventDefault() // Prevent focus loss\n this._isSelectingOption = true\n }\n\n // Handle the actual selection\n option.onclick = (e: MouseEvent) => {\n e.stopPropagation()\n this._selectOption(option)\n // Reset flag after a short delay\n setTimeout(() => {\n this._isSelectingOption = false\n }, 50)\n }\n })\n }\n\n private _updateOptionSelection(selectedValue: string, selectedValues: string[]) {\n this._options.forEach(option => {\n option.selected = this.multi\n ? selectedValues.includes(option.value)\n : option.value === selectedValue\n option.setAttribute('aria-selected', String(option.selected))\n })\n }\n\n private _filterOptions(searchTerm: string) {\n const term = searchTerm.trim()\n\n if (!term) {\n // Show all options if no search term\n this._options.forEach(option => {\n option.hidden = false\n option.style.order = '0'\n })\n this._visibleOptionsCount = this._options.length\n this._hasResults = true\n } else {\n // Calculate similarity scores for all options\n const scoredOptions: FilteredOption[] = this._options.map(option => {\n const optionLabel = option.label || option.textContent || ''\n const optionValue = option.value\n\n const labelScore = similarity(term, optionLabel)\n const valueScore = similarity(term, optionValue)\n const score = Math.max(labelScore * 1.1, valueScore)\n\n return { option, score }\n })\n\n // Sort by score (highest first)\n scoredOptions.sort((a, b) => b.score - a.score)\n\n // Apply visibility and ordering\n let visibleCount = 0\n scoredOptions.forEach((item, index) => {\n const { option, score } = item\n\n if (score < this.similarityThreshold) {\n option.hidden = true\n } else {\n option.hidden = false\n visibleCount++\n option.style.order = String(index)\n }\n })\n\n this._visibleOptionsCount = visibleCount\n this._hasResults = visibleCount > 0\n }\n\n this._announceToScreenReader(\n this._visibleOptionsCount > 0\n ? `${this._visibleOptionsCount} option${this._visibleOptionsCount === 1 ? '' : 's'} available.`\n : 'No results found.'\n )\n }\n\n private _selectOption(option: SchmancyOption) {\n if (this.multi) {\n const currentValues = this._selectedValues$.value\n const index = currentValues.indexOf(option.value)\n const newValues = index > -1\n ? currentValues.filter(v => v !== option.value)\n : [...currentValues, option.value]\n\n this._selectedValues$.next(newValues)\n this._announceToScreenReader(\n newValues.length > 0\n ? `Selected: ${this._getSelectedLabels().join(', ')}`\n : 'No options selected'\n )\n this._fireChangeEvent()\n } else {\n // Fix the bug: Update value BEFORE firing event\n this._selectedValue$.next(option.value)\n\n // Now fire event with the NEW value\n this._fireChangeEvent()\n\n // Update UI\n this._open = false\n this._inputValue = option.label || option.textContent || ''\n this._inputValue$.next(this._inputValue)\n\n // Blur the input\n setTimeout(() => this._inputElementRef.value?.blur(), 100)\n\n this._announceToScreenReader(`Selected: ${option.label || option.textContent}`)\n }\n }\n\n private _setupDocumentClickHandler() {\n // Simple document click handler\n const handleDocumentClick = (e: MouseEvent) => {\n if (!this._open) return\n\n const path = e.composedPath()\n if (!path.includes(this) && !this._options.some(opt => path.includes(opt))) {\n this._open = false\n this._updateInputDisplay()\n }\n }\n\n document.addEventListener('click', handleDocumentClick)\n\n // Cleanup on disconnect\n this.disconnecting.pipe(take(1)).subscribe(() => {\n document.removeEventListener('click', handleDocumentClick)\n })\n }\n\n\n private _updateInputDisplay() {\n // For multi-select, we don't update input display since chips show the selections\n if (this.multi) return\n\n const selectedValue = this._selectedValue$.value\n const option = this._options.find(opt => opt.value === selectedValue)\n this._inputValue = option ? option.label || option.textContent || '' : ''\n this._inputValue$.next(this._inputValue)\n\n if (this._inputElementRef.value) {\n this._inputElementRef.value.value = this._inputValue\n }\n }\n\n private _getSelectedLabels(): string[] {\n return this._options\n .filter(option => \n this.multi \n ? this._selectedValues$.value.includes(option.value)\n : option.value === this._selectedValue$.value\n )\n .map(option => option.label || option.textContent || '')\n }\n\n private _announceToScreenReader(message: string) {\n const liveRegion = this.shadowRoot?.querySelector('#live-status')\n if (liveRegion) {\n liveRegion.textContent = message\n }\n }\n\n private _fireChangeEvent() {\n const detail: SchmancyAutocompleteChangeEvent['detail'] = {\n value: this.value,\n }\n\n if (this.multi) {\n detail.values = [...this._selectedValues$.value]\n }\n\n this.dispatchEvent(\n new CustomEvent<SchmancyAutocompleteChangeEvent['detail']>('change', {\n detail,\n bubbles: true,\n composed: true,\n })\n )\n }\n\n public checkValidity(): boolean {\n if (!this.required) return true\n return this.multi \n ? this._selectedValues$.value.length > 0 \n : Boolean(this._selectedValue$.value)\n }\n\n public reportValidity(): boolean {\n if (this._inputElementRef.value) {\n return this._inputElementRef.value.reportValidity()\n }\n return this.checkValidity()\n }\n\n firstUpdated() {\n this._setupOptionHandlers()\n\n // Sync initial value with display after options are available\n this._updateInputDisplay()\n\n // Update options when slot changes\n const slot = this.shadowRoot?.querySelector('slot')\n slot?.addEventListener('slotchange', () => {\n this._setupOptionHandlers()\n this._updateOptionSelection(this._selectedValue$.value, this._selectedValues$.value)\n })\n }\n\n private handleChipRemove(value: string) {\n const currentValues = this._selectedValues$.value\n const newValues = currentValues.filter(v => v !== value)\n this._selectedValues$.next(newValues)\n this._fireChangeEvent()\n this._announceToScreenReader(`Removed: ${this._getChipLabel(value)}`)\n }\n\n private _getChipLabel(value: string): string {\n const option = this._options.find(opt => opt.value === value)\n return option ? option.label || option.textContent || value : value\n }\n\n private _focusTextInput() {\n if (this._inputElementRef.value) {\n this._inputElementRef.value.focus()\n }\n }\n\n render() {\n const descriptionId = `${this.id}-desc`\n\n // Get size-based styling to match Schmancy input\n const getSizeStyles = () => {\n switch (this.size) {\n case 'sm':\n return {\n height: 'min-h-[40px]',\n padding: 'px-2',\n fontSize: 'text-sm', // 14px\n labelSize: 'text-sm'\n }\n case 'lg':\n return {\n height: 'min-h-[60px]',\n padding: 'px-5',\n fontSize: 'text-lg', // 18px\n labelSize: 'text-lg'\n }\n case 'md':\n default:\n return {\n height: 'min-h-[50px]',\n padding: 'px-4',\n fontSize: 'text-base', // 16px\n labelSize: 'text-base'\n }\n }\n }\n\n const { height, padding, fontSize, labelSize } = getSizeStyles()\n\n return html`\n <div class=\"relative\">\n <!-- Screen reader live region -->\n <div id=\"live-status\" role=\"status\" aria-live=\"polite\" class=\"sr-only\"></div>\n\n <!-- Description -->\n ${this.description ? html`<div id=\"${descriptionId}\" class=\"sr-only\">${this.description}</div>` : ''}\n\n <!-- Custom input wrapper for Gmail-style chip input -->\n <slot name=\"trigger\">\n ${when(this.multi,\n () => html`\n <!-- Custom multi-select input with inline chips -->\n <div class=\"relative\">\n ${when(this.label, () => html`\n <label class=\"${classMap({\n 'block mb-1 font-medium': true,\n 'text-primary-default': !this.error,\n 'text-error-default': this.error,\n [labelSize]: true\n })}\">\n ${this.label}${this.required ? html`<span class=\"text-error-default ml-1\">*</span>` : ''}\n </label>\n `)}\n <div\n class=\"${classMap({\n 'flex flex-wrap items-center gap-1': true,\n [height]: true,\n [padding]: true,\n 'block w-full min-w-0 rounded-[8px] border-0': true,\n 'bg-surface-highest text-surface-on': true,\n 'ring-0 ring-inset focus-within:ring-1 focus-within:ring-inset': true,\n 'ring-secondary-default focus-within:ring-secondary-default': !this.error,\n 'ring-error-default focus-within:ring-error-default': this.error,\n 'cursor-text transition-colors duration-200': true\n })}\"\n @click=${() => this._focusTextInput()}\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n aria-controls=\"options\"\n aria-expanded=${this._open}\n >\n <!-- Render chips inline -->\n ${repeat(\n this._selectedValues$.value,\n value => value,\n value => html`\n <schmancy-input-chip\n .value=${value}\n @remove=${(e: CustomEvent) => this.handleChipRemove(e.detail.value)}\n class=\"flex-shrink-0 my-0.5\"\n >\n ${this._getChipLabel(value)}\n </schmancy-input-chip>\n `\n )}\n\n <!-- Text input for typing -->\n <input\n ${ref(this._inputElementRef)}\n id=\"autocomplete-input\"\n type=\"text\"\n class=\"flex-1 min-w-[120px] py-1 bg-transparent border-none outline-none ${fontSize} font-medium text-surface-on placeholder:text-muted\"\n name=${this.name || this.label?.toLowerCase().replace(/\\s+/g, '-') || ''}\n .placeholder=${this._selectedValues$.value.length > 0 ? 'Add more...' : this.placeholder}\n .value=${this._inputValue}\n .autocomplete=${this.autocomplete}\n @input=${(e: Event) => {\n const value = (e.target as HTMLInputElement).value\n this._inputValue = value\n this._inputValue$.next(value)\n }}\n @focus=${(e: FocusEvent) => {\n e.stopPropagation()\n // Clear input on focus for new searches\n this._inputValue = ''\n this._inputValue$.next('')\n this._open = true\n }}\n @keydown=${(e: KeyboardEvent) => {\n this._handleKeyDown(e)\n }}\n @blur=${() => {\n this._handleAutoSelectOnBlur()\n }}\n />\n </div>\n\n <!-- Validation message -->\n ${when(this.error && this.validationMessage, () => html`\n <div class=\"mt-1 text-sm text-error-default\">\n ${this.validationMessage}\n </div>\n `)}\n </div>\n `,\n () => html`\n <!-- Regular single-select input -->\n <schmancy-input\n .size=${this.size}\n ${ref(this._inputElementRef)}\n id=\"autocomplete-input\"\n class=\"w-full\"\n .name=${this.name || this.label?.toLowerCase().replace(/\\s+/g, '-') || ''}\n .label=${this.label}\n .placeholder=${this.placeholder}\n .required=${this.required}\n .value=${this._inputValue}\n type=\"text\"\n autocomplete=${this.autocomplete}\n clickable\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n aria-controls=\"options\"\n aria-expanded=${this._open}\n aria-describedby=${this.description ? descriptionId : undefined}\n @input=${(e: Event) => {\n const value = (e.target as HTMLInputElement).value\n this._inputValue = value\n this._inputValue$.next(value)\n }}\n @focus=${(e: FocusEvent) => {\n e.stopPropagation()\n this._open = true\n }}\n @click=${(e: MouseEvent) => {\n e.stopPropagation()\n this._open = true\n }}\n @keydown=${(e: KeyboardEvent) => {\n this._handleKeyDown(e)\n }}\n @blur=${() => {\n this._handleAutoSelectOnBlur()\n }}\n >\n </schmancy-input>\n `\n )}\n </slot>\n\n <!-- Options dropdown -->\n <ul\n id=\"options\"\n class=${classMap({\n 'absolute': true,\n 'z-[1000]': true,\n 'mt-1': true,\n 'w-full': true,\n 'rounded-md': true,\n 'shadow-md': true,\n 'overflow-auto': true,\n 'min-w-full': true,\n 'bg-surface-low': true,\n 'flex': true,\n 'flex-col': true, // Enable flexbox for ordering\n })}\n role=\"listbox\"\n aria-multiselectable=${this.multi ? 'true' : 'false'}\n aria-label=${`${this.label || 'Options'} dropdown`}\n ?hidden=${!this._open}\n style=\"max-height: ${this.maxHeight}; display: ${this._open ? 'flex' : 'none'};\"\n @slotchange=${() => {\n this._setupOptionHandlers()\n }}\n >\n <slot></slot>\n ${!this._hasResults ? html`\n <li class=\"px-3 py-2 text-sm text-muted\">No results found</li>\n ` : ''}\n </ul>\n </div>\n `\n }\n\n private _handleAutoSelectOnBlur() {\n // Don't run if we're clicking on an option (prevents interference with click handler)\n if (this._isSelectingOption) {\n return\n }\n\n // Only auto-select in single-select mode and when dropdown is open with a search term\n if (this.multi || !this._open || !this._inputValue.trim()) {\n return\n }\n \n const searchTerm = this._inputValue.trim()\n \n // Find the best matching option using the same similarity logic as filtering\n let bestMatch: SchmancyOption | null = null\n let bestScore = 0\n \n this._options.forEach(option => {\n // Skip hidden options\n if (option.hidden) return\n \n // Get text to search in (prioritize label, then textContent, then value)\n const optionLabel = option.label || option.textContent || ''\n const optionValue = option.value\n \n // Calculate similarity scores for both label and value\n const labelScore = similarity(searchTerm, optionLabel)\n const valueScore = similarity(searchTerm, optionValue)\n \n // Use the higher score (prioritizing label matches)\n const score = Math.max(labelScore * 1.1, valueScore) // Slight boost for label matches\n \n // Keep track of best match that meets threshold\n if (score > bestScore && score >= this.similarityThreshold) {\n bestScore = score\n bestMatch = option\n }\n })\n \n // Auto-select the best match if found\n if (bestMatch) {\n // Select the option directly\n this._selectOption(bestMatch)\n\n // Close the dropdown\n this._open = false\n }\n }\n\n private _handleKeyDown(event: KeyboardEvent) {\n const isOpen = this._open\n const selectedValues = this._selectedValues$.value\n\n // Handle backspace to remove last chip in multi-select when input is empty\n if (this.multi && event.key === 'Backspace' && !this._inputValue && selectedValues.length > 0 && !isOpen) {\n event.preventDefault()\n const lastValue = selectedValues[selectedValues.length - 1]\n this.handleChipRemove(lastValue)\n return\n }\n\n if (!isOpen && (event.key === 'ArrowDown' || event.key === 'Enter')) {\n event.preventDefault()\n this._open = true\n\n setTimeout(() => {\n const firstVisible = this._options.find(opt => !opt.hidden)\n firstVisible?.focus()\n }, 10)\n return\n }\n\n if (!isOpen) return\n\n const visibleOptions = this._options.filter(opt => !opt.hidden)\n .sort((a, b) => parseInt(a.style.order || '0') - parseInt(b.style.order || '0'))\n\n const focusedOption = visibleOptions.find(opt => opt === document.activeElement)\n const currentIndex = focusedOption ? visibleOptions.indexOf(focusedOption) : -1\n\n switch (event.key) {\n case 'Escape':\n event.preventDefault()\n this._open = false\n this._updateInputDisplay()\n this._inputElementRef.value?.focus()\n break\n\n case 'Tab':\n this._open = false\n this._updateInputDisplay()\n break\n\n case 'ArrowDown':\n event.preventDefault()\n const nextIndex = currentIndex < visibleOptions.length - 1 ? currentIndex + 1 : 0\n visibleOptions[nextIndex]?.focus()\n break\n\n case 'ArrowUp':\n event.preventDefault()\n const prevIndex = currentIndex > 0 ? currentIndex - 1 : visibleOptions.length - 1\n visibleOptions[prevIndex]?.focus()\n break\n\n case 'Home':\n event.preventDefault()\n visibleOptions[0]?.focus()\n break\n\n case 'End':\n event.preventDefault()\n visibleOptions[visibleOptions.length - 1]?.focus()\n break\n\n case 'Enter':\n case ' ':\n if (focusedOption) {\n event.preventDefault()\n this._selectOption(focusedOption)\n }\n break\n }\n }\n}\n\n\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'schmancy-autocomplete': SchmancyAutocomplete\n }\n}"],"names":["SchmancyAutocomplete","$LitElement","constructor","super","arguments","this","_valueSet","_valuesSet","required","placeholder","label","name","maxHeight","multi","description","size","autocomplete","debounceMs","similarityThreshold","error","validationMessage","_open","_inputValue","_visibleOptionsCount","_hasResults","_isSelectingOption","_inputElementRef","createRef","_selectedValue$","BehaviorSubject","_selectedValues$","_inputValue$","values","value","vals","next","Array","isArray","join","val","newValues","split","map","v","trim","filter","Boolean","currentValues","JSON","stringify","_updateInputDisplay","connectedCallback","id","Math","random","toString","slice","_setupAutocompleteLogic","_setupDocumentClickHandler","combineLatest","pipe","tap","selectedValue","selectedValues","_updateOptionSelection","takeUntil","disconnecting","subscribe","distinctUntilChanged","debounceTime","searchTerm","_filterOptions","_setupOptionHandlers","_options","forEach","option","index","setAttribute","tabIndex","onmousedown","e","preventDefault","onclick","stopPropagation","_selectOption","setTimeout","selected","includes","String","term","scoredOptions","optionLabel","textContent","optionValue","labelScore","similarity","valueScore","score","max","sort","a","b","visibleCount","item","hidden","style","order","length","_announceToScreenReader","indexOf","_getSelectedLabels","_fireChangeEvent","blur","handleDocumentClick","path","composedPath","some","opt","document","addEventListener","take","removeEventListener","find","message","liveRegion","shadowRoot","querySelector","detail","dispatchEvent","CustomEvent","bubbles","composed","checkValidity","reportValidity","firstUpdated","_getChipLabel","_focusTextInput","focus","render","descriptionId","height","padding","fontSize","labelSize","getSizeStyles","html","when","classMap","repeat","handleChipRemove","ref","toLowerCase","replace","target","_handleKeyDown","_handleAutoSelectOnBlur","absolute","flex","bestMatch","bestScore","event","isOpen","key","lastValue","visibleOptions","parseInt","focusedOption","activeElement","currentIndex","nextIndex","prevIndex","__decorateClass","property","type","prototype","reflect","Number","state","query","queryAssignedElements","flatten","customElement"],"mappings":"wpBAsCA,IAAqBA,EAArB,cAAkDC,mYAAlD,aAAAC,CAAAC,MAAAA,GAAAC,SAAAA,EAEKC,KAAAC,UA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BlB/K,EAgCb8K,UAAA,QAAA,CAAA,EAyBaH,EAAA,CAAhBM,EAAAA,MAAAA,CAAAA,EAzDgBjL,EAyDA8K,UAAA,QAAA,CAAA,EACAH,EAAA,CAAhBM,EAAAA,MAAAA,CAAAA,EA1DgBjL,EA0DA8K,UAAA,cAAA,CAAA,EACAH,EAAA,CAAhBM,EAAAA,MAAAA,CAAAA,EA3DgBjL,EA2DA8K,UAAA,uBAAA,CAAA,EACAH,EAAA,CAAhBM,EAAAA,MAAAA,CAAAA,EA5DgBjL,EA4DA8K,UAAA,cAAA,CAAA,EAMEH,EAAA,CAAlBO,EAAAA,MAAM,UAAA,CAAA,EAlEUlL,EAkEE8K,UAAA,WAAA,CAAA,EACCH,EAAA,CAAnBO,EAAAA,MAAM,WAAA,CAAA,EAnEUlL,EAmEG8K,UAAA,SAAA,CAAA,EAC8BH,EAAA,CAAjDQ,wBAAsB,CAAEC,QAAAA,EAAS,CAAA,CAAA,EApEjBpL,EAoEiC8K,UAAA,WAAA,CAAA,EApEjC9K,EAArB2K,EAAA,CADCU,EAAAA,cAAc,uBAAA,CAAA,EACMrL,CAAAA"}
@@ -1,2 +1,2 @@
1
- "use strict";require("./autocomplete-GW91jVqw.cjs");
1
+ "use strict";require("./autocomplete-ChRZ5y2p.cjs");
2
2
  //# sourceMappingURL=autocomplete.cjs.map
@@ -1,2 +1,2 @@
1
- import "./autocomplete-BlhAOtex.js";
1
+ import "./autocomplete-CeB2VvCm.js";
2
2
  //# sourceMappingURL=autocomplete.js.map
@@ -1,4 +1,4 @@
1
- "use strict";const l=require("lit"),o=require("lit/decorators.js"),n=require("rxjs");require("./animated-text-vdNivzdc.cjs");const I=require("./area.component-DwPL6bdo.cjs");require("./autocomplete-GW91jVqw.cjs"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const N=require("./tailwind.mixin-CFrLBtkD.cjs"),g=require("./ripple-DqQrvaTe.cjs");require("lit/directives/guard.js"),require("./boat-DNmaFlxD.cjs"),require("./spinner-BD8cXVK_.cjs"),require("./icon-button-BrRSVzzx.cjs"),require("./media-BZwiyJto.cjs"),require("./checkbox-BJ5aqrKY.cjs"),require("./suggestion-chip-C1n2VYBG.cjs"),require("./input-chip-Cf25jEob.cjs"),require("./code-preview-fda91FDi.cjs"),require("./payment-card-form-C8bWa_hh.cjs");const y=require("./types.cjs"),p=require("./provide-BxZ2kn_p.cjs"),w=require("./litElement.mixin-DUiUa087.cjs"),m=require("./consume-edta5ng5.cjs");require("./date-range-0nOdLk-l.cjs"),require("./date-range-inline-UoP6EDug.cjs"),require("./delay-CaOsI0yP.cjs"),require("./details-B_kKG0Du.cjs"),require("./dialog-content-B5MUa6uq.cjs"),require("./dialog-service-Bdaxn2t0.cjs"),require("./divider-DekMH80a.cjs"),require("./dropdown-content-eXth59vX.cjs"),require("./timezone-wWfEuXrb.cjs"),require("./form-OUNdJnUW.cjs"),require("./icon-BwhQbcAk.cjs"),require("./input-lzxE1e5L.cjs"),require("./flex-CE0IKjR4.cjs"),require("./list-rGx4YHgo.cjs"),require("./email-recipients-DNcWf4_1.cjs"),require("./map-8DhybTup.cjs"),require("./menu-D8qP_e7D.cjs");const j=require("lit/directives/when.js");require("./navigation-rail-BzMOzaFm.cjs"),require("./notification-service-DCmDSvc-.cjs"),require("./option-q-dig7LF.cjs"),require("./progress-CP2lpJsl.cjs"),require("./radio-button-CU-lMs92.cjs"),require("./index-CCi1otmh.cjs"),require("./select-Be8HIqWu.cjs"),require("./sheet-dK5UPVjp.cjs");const W=require("./sheet.service-BxvWBGsJ.cjs");require("./slider-CP3JRaWR.cjs"),require("./schmancy-steps-container-CQY1zmws.cjs"),require("./context-object-DA9DM9QJ.cjs");const d=require("rxjs/operators");require("./surface-ClIDhSRv.cjs"),require("./table-1New2HBS.cjs"),require("./tabs-compatibility-DDtYFCUj.cjs"),require("./textarea-ChDsPBZz.cjs"),require("./theme.component-Blc_4wu9.cjs"),require("./theme-button-qzDX0i9Q.cjs"),require("./tooltip-DLadXXnP.cjs"),require("./tree-Brtho3Eu.cjs"),require("./typewriter-CEgaw_pR.cjs"),require("./typography-NurK7F-8.cjs");const a=require("./theme.interface-BMeNadVb.cjs");var Y=Object.defineProperty,F=Object.getOwnPropertyDescriptor,v=(e,t,i,s)=>{for(var c,r=s>1?void 0:s?F(t,i):t,h=e.length-1;h>=0;h--)(c=e[h])&&(r=(s?c(t,i,r):c(r))||r);return s&&r&&Y(t,i,r),r};exports.SchmancyBadgeV2=class extends N.TailwindElement(l.css`
1
+ "use strict";const l=require("lit"),o=require("lit/decorators.js"),n=require("rxjs");require("./animated-text-vdNivzdc.cjs");const I=require("./area.component-DwPL6bdo.cjs");require("./autocomplete-ChRZ5y2p.cjs"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const N=require("./tailwind.mixin-CFrLBtkD.cjs"),g=require("./ripple-DqQrvaTe.cjs");require("lit/directives/guard.js"),require("./boat-DNmaFlxD.cjs"),require("./spinner-BD8cXVK_.cjs"),require("./icon-button-BrRSVzzx.cjs"),require("./media-BZwiyJto.cjs"),require("./checkbox-BJ5aqrKY.cjs"),require("./suggestion-chip-BPCzI7GW.cjs"),require("./input-chip-Cf25jEob.cjs"),require("./code-preview-fda91FDi.cjs"),require("./payment-card-form-C8bWa_hh.cjs");const y=require("./types.cjs"),p=require("./provide-BxZ2kn_p.cjs"),w=require("./litElement.mixin-DUiUa087.cjs"),m=require("./consume-edta5ng5.cjs");require("./date-range-0nOdLk-l.cjs"),require("./date-range-inline-UoP6EDug.cjs"),require("./delay-CaOsI0yP.cjs"),require("./details-B_kKG0Du.cjs"),require("./dialog-content-B5MUa6uq.cjs"),require("./dialog-service-Bdaxn2t0.cjs"),require("./divider-DekMH80a.cjs"),require("./dropdown-content-eXth59vX.cjs"),require("./timezone-wWfEuXrb.cjs"),require("./form-OUNdJnUW.cjs"),require("./icon-BwhQbcAk.cjs"),require("./input-lzxE1e5L.cjs"),require("./flex-CE0IKjR4.cjs"),require("./list-rGx4YHgo.cjs"),require("./email-recipients-DNcWf4_1.cjs"),require("./map-8DhybTup.cjs"),require("./menu-D8qP_e7D.cjs");const j=require("lit/directives/when.js");require("./navigation-rail-BzMOzaFm.cjs"),require("./notification-service-DCmDSvc-.cjs"),require("./option-q-dig7LF.cjs"),require("./progress-CP2lpJsl.cjs"),require("./radio-button-CU-lMs92.cjs"),require("./index-CCi1otmh.cjs"),require("./select-Be8HIqWu.cjs"),require("./sheet-dK5UPVjp.cjs");const W=require("./sheet.service-BxvWBGsJ.cjs");require("./slider-CP3JRaWR.cjs"),require("./schmancy-steps-container-CQY1zmws.cjs"),require("./context-object-DA9DM9QJ.cjs");const d=require("rxjs/operators");require("./surface-ClIDhSRv.cjs"),require("./table-1New2HBS.cjs"),require("./tabs-compatibility-DDtYFCUj.cjs"),require("./textarea-ChDsPBZz.cjs"),require("./theme.component-Blc_4wu9.cjs"),require("./theme-button-qzDX0i9Q.cjs"),require("./tooltip-DLadXXnP.cjs"),require("./tree-Brtho3Eu.cjs"),require("./typewriter-CEgaw_pR.cjs"),require("./typography-NurK7F-8.cjs");const a=require("./theme.interface-BMeNadVb.cjs");var Y=Object.defineProperty,F=Object.getOwnPropertyDescriptor,v=(e,t,i,s)=>{for(var c,r=s>1?void 0:s?F(t,i):t,h=e.length-1;h>=0;h--)(c=e[h])&&(r=(s?c(t,i,r):c(r))||r);return s&&r&&Y(t,i,r),r};exports.SchmancyBadgeV2=class extends N.TailwindElement(l.css`
2
2
  :host {
3
3
  display: inline-flex;
4
4
  }
@@ -300,4 +300,4 @@
300
300
  `}getColorAttributes(){const e={primary:{bgColor:a.SchmancyTheme.sys.color.primary.container,color:a.SchmancyTheme.sys.color.primary.onContainer},secondary:{bgColor:a.SchmancyTheme.sys.color.secondary.container,color:a.SchmancyTheme.sys.color.secondary.onContainer},tertiary:{bgColor:a.SchmancyTheme.sys.color.tertiary.container,color:a.SchmancyTheme.sys.color.tertiary.onContainer},success:{bgColor:a.SchmancyTheme.sys.color.success.container,color:a.SchmancyTheme.sys.color.success.onContainer},error:{bgColor:a.SchmancyTheme.sys.color.error.container,color:a.SchmancyTheme.sys.color.error.onContainer},neutral:{bgColor:a.SchmancyTheme.sys.color.surface.container,color:a.SchmancyTheme.sys.color.surface.on}};return g.color(e[this.color])}renderStatusIndicator(){const e={online:a.SchmancyTheme.sys.color.success.default,offline:a.SchmancyTheme.sys.color.surface.onVariant,busy:a.SchmancyTheme.sys.color.error.default,away:a.SchmancyTheme.sys.color.tertiary.default},t={"absolute bottom-0 right-0 rounded-full border-2 border-surface-default":!0,[{xs:"w-1.5 h-1.5",sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3",xl:"w-4 h-4"}[this.size]]:!0};return l.html`
301
301
  <div class="${this.classMap(t)}" style="background-color: ${e[this.status]};"></div>
302
302
  `}},b([o.property({type:String})],exports.SchmancyAvatar.prototype,"initials",2),b([o.property({type:String})],exports.SchmancyAvatar.prototype,"src",2),b([o.property({type:String})],exports.SchmancyAvatar.prototype,"icon",2),b([o.property({type:String})],exports.SchmancyAvatar.prototype,"size",2),b([o.property({type:String})],exports.SchmancyAvatar.prototype,"color",2),b([o.property({type:String})],exports.SchmancyAvatar.prototype,"shape",2),b([o.property({type:Boolean})],exports.SchmancyAvatar.prototype,"bordered",2),b([o.property({type:String})],exports.SchmancyAvatar.prototype,"status",2),exports.SchmancyAvatar=b([o.customElement("schmancy-avatar")],exports.SchmancyAvatar),exports.$drawer=re,exports.HereMorty=R,exports.SchmancyContentDrawerID=L,exports.SchmancyContentDrawerMaxHeight=M,exports.SchmancyContentDrawerMinWidth=z,exports.SchmancyContentDrawerSheetMode=O,exports.SchmancyContentDrawerSheetState=P,exports.SchmancyDrawerNavbarMode=B,exports.SchmancyDrawerNavbarState=A,exports.WhereAreYouRicky=H,exports.schmancyContentDrawer=G,exports.schmancyNavDrawer=X,exports.teleport=E;
303
- //# sourceMappingURL=avatar-q32dkyky.cjs.map
303
+ //# sourceMappingURL=avatar-B44Yq_7I.cjs.map