@pismo/marola 1.0.0-beta.24 → 1.0.0-beta.27

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.
@@ -2,11 +2,11 @@ import '../../assets/Autocomplete.css';
2
2
  import { jsx as le, jsxs as lt } from "react/jsx-runtime";
3
3
  import * as h from "react";
4
4
  import { useId as at, useState as ut, createElement as ct } from "react";
5
- import { Icon as ft } from "../Icon/Icon.js";
6
- import { Input as dt } from "../Input/Input.js";
7
- import { b as Ve, s as pt } from "../../useSlotProps-C_I1kEHr.js";
5
+ import { Icon as pt } from "../Icon/Icon.js";
6
+ import { Input as ft } from "../Input/Input.js";
7
+ import { b as Ve, s as dt } from "../../useSlotProps-C_I1kEHr.js";
8
8
  import { u as gt } from "../../useId-BW-oWmul.js";
9
- import { u as Oe } from "../../useControlled-CCMYYdCM.js";
9
+ import { u as _e } from "../../useControlled-CCMYYdCM.js";
10
10
  import { u as ae } from "../../useEventCallback-BAQJJ3ye.js";
11
11
  const ht = (c) => {
12
12
  const b = h.useRef({});
@@ -17,26 +17,26 @@ const ht = (c) => {
17
17
  function Me(c) {
18
18
  return typeof c.normalize < "u" ? c.normalize("NFD").replace(/[\u0300-\u036f]/g, "") : c;
19
19
  }
20
- function mt(c = {}) {
20
+ function yt(c = {}) {
21
21
  const {
22
22
  ignoreAccents: b = !0,
23
23
  ignoreCase: g = !0,
24
- limit: P,
25
- matchFrom: U = "any",
26
- stringify: N,
24
+ limit: D,
25
+ matchFrom: K = "any",
26
+ stringify: v,
27
27
  trim: C = !1
28
28
  } = c;
29
- return (v, {
29
+ return (N, {
30
30
  inputValue: L,
31
- getOptionLabel: x
31
+ getOptionLabel: m
32
32
  }) => {
33
- let k = C ? L.trim() : L;
34
- g && (k = k.toLowerCase()), b && (k = Me(k));
35
- const F = k ? v.filter((j) => {
36
- let w = (N || x)(j);
37
- return g && (w = w.toLowerCase()), b && (w = Me(w)), U === "start" ? w.indexOf(k) === 0 : w.indexOf(k) > -1;
38
- }) : v;
39
- return typeof P == "number" ? F.slice(0, P) : F;
33
+ let S = C ? L.trim() : L;
34
+ g && (S = S.toLowerCase()), b && (S = Me(S));
35
+ const B = S ? N.filter((z) => {
36
+ let w = (v || m)(z);
37
+ return g && (w = w.toLowerCase()), b && (w = Me(w)), K === "start" ? w.indexOf(S) === 0 : w.indexOf(S) > -1;
38
+ }) : N;
39
+ return typeof D == "number" ? B.slice(0, D) : B;
40
40
  };
41
41
  }
42
42
  function ue(c, b) {
@@ -45,312 +45,312 @@ function ue(c, b) {
45
45
  return g;
46
46
  return -1;
47
47
  }
48
- const bt = mt(), Re = 5, xt = (c) => {
48
+ const bt = yt(), Re = 5, mt = (c) => {
49
49
  var b;
50
50
  return c.current !== null && ((b = c.current.parentElement) == null ? void 0 : b.contains(document.activeElement));
51
51
  };
52
- function yt(c) {
52
+ function xt(c) {
53
53
  const {
54
54
  // eslint-disable-next-line @typescript-eslint/naming-convention
55
- unstable_isActiveElementInListbox: b = xt,
55
+ unstable_isActiveElementInListbox: b = mt,
56
56
  // eslint-disable-next-line @typescript-eslint/naming-convention
57
57
  unstable_classNamePrefix: g = "Mui",
58
- autoComplete: P = !1,
59
- autoHighlight: U = !1,
60
- autoSelect: N = !1,
58
+ autoComplete: D = !1,
59
+ autoHighlight: K = !1,
60
+ autoSelect: v = !1,
61
61
  blurOnSelect: C = !1,
62
- clearOnBlur: v = !c.freeSolo,
62
+ clearOnBlur: N = !c.freeSolo,
63
63
  clearOnEscape: L = !1,
64
- componentName: x = "useAutocomplete",
65
- defaultValue: k = c.multiple ? [] : null,
66
- disableClearable: F = !1,
67
- disableCloseOnSelect: j = !1,
64
+ componentName: m = "useAutocomplete",
65
+ defaultValue: S = c.multiple ? [] : null,
66
+ disableClearable: B = !1,
67
+ disableCloseOnSelect: z = !1,
68
68
  disabled: w,
69
69
  disabledItemsFocusable: ce = !1,
70
- disableListWrap: K = !1,
71
- filterOptions: fe = bt,
72
- filterSelectedOptions: G = !1,
70
+ disableListWrap: J = !1,
71
+ filterOptions: pe = bt,
72
+ filterSelectedOptions: Q = !1,
73
73
  freeSolo: i = !1,
74
- getOptionDisabled: m,
75
- getOptionKey: Q,
76
- getOptionLabel: z = (t) => {
74
+ getOptionDisabled: y,
75
+ getOptionKey: V,
76
+ getOptionLabel: M = (t) => {
77
77
  var e;
78
78
  return (e = t.label) != null ? e : t;
79
79
  },
80
- groupBy: E,
80
+ groupBy: _,
81
81
  handleHomeEndKeys: Z = !c.freeSolo,
82
- id: de,
83
- includeInputInList: Ie = !1,
82
+ id: fe,
83
+ includeInputInList: Oe = !1,
84
84
  inputValue: He,
85
- isOptionEqualToValue: V = (t, e) => t === e,
85
+ isOptionEqualToValue: R = (t, e) => t === e,
86
86
  multiple: u = !1,
87
- onChange: we,
87
+ onChange: Ie,
88
88
  onClose: Se,
89
- onHighlightChange: ke,
90
- onInputChange: M,
91
- onOpen: Ee,
89
+ onHighlightChange: we,
90
+ onInputChange: H,
91
+ onOpen: ke,
92
92
  open: Fe,
93
93
  openOnFocus: qe = !1,
94
- options: pe,
95
- readOnly: J = !1,
94
+ options: de,
95
+ readOnly: W = !1,
96
96
  selectOnFocus: Be = !c.freeSolo,
97
97
  value: Ue
98
- } = c, T = gt(de);
99
- let O = z;
98
+ } = c, E = gt(fe);
99
+ let O = M;
100
100
  O = (t) => {
101
- const e = z(t);
101
+ const e = M(t);
102
102
  if (typeof e != "string") {
103
103
  if (process.env.NODE_ENV !== "production") {
104
- const n = e === void 0 ? "undefined" : `${typeof e} (${e})`;
105
- console.error(`MUI: The \`getOptionLabel\` method of ${x} returned ${n} instead of a string for ${JSON.stringify(t)}.`);
104
+ const o = e === void 0 ? "undefined" : `${typeof e} (${e})`;
105
+ console.error(`MUI: The \`getOptionLabel\` method of ${m} returned ${o} instead of a string for ${JSON.stringify(t)}.`);
106
106
  }
107
107
  return String(e);
108
108
  }
109
109
  return e;
110
110
  };
111
- const ge = h.useRef(!1), he = h.useRef(!0), d = h.useRef(null), _ = h.useRef(null), [ee, je] = h.useState(null), [$, me] = h.useState(-1), Te = U ? 0 : -1, y = h.useRef(Te), [o, Ke] = Oe({
111
+ const ge = h.useRef(!1), he = h.useRef(!0), f = h.useRef(null), T = h.useRef(null), [ee, je] = h.useState(null), [$, ye] = h.useState(-1), Ee = K ? 0 : -1, x = h.useRef(Ee), [r, Ke] = _e({
112
112
  controlled: Ue,
113
- default: k,
114
- name: x
115
- }), [a, te] = Oe({
113
+ default: S,
114
+ name: m
115
+ }), [a, te] = _e({
116
116
  controlled: He,
117
117
  default: "",
118
- name: x,
118
+ name: m,
119
119
  state: "inputValue"
120
- }), [ne, _e] = h.useState(!1), oe = h.useCallback((t, e) => {
121
- if (!(u ? o.length < e.length : e !== null) && !v)
120
+ }), [oe, Te] = h.useState(!1), re = h.useCallback((t, e) => {
121
+ if (!(u ? r.length < e.length : e !== null) && !N)
122
122
  return;
123
- let r;
123
+ let n;
124
124
  if (u)
125
- r = "";
125
+ n = "";
126
126
  else if (e == null)
127
- r = "";
127
+ n = "";
128
128
  else {
129
129
  const s = O(e);
130
- r = typeof s == "string" ? s : "";
130
+ n = typeof s == "string" ? s : "";
131
131
  }
132
- a !== r && (te(r), M && M(t, r, "reset"));
133
- }, [O, a, u, M, te, v, o]), [q, $e] = Oe({
132
+ a !== n && (te(n), H && H(t, n, "reset"));
133
+ }, [O, a, u, H, te, N, r]), [U, $e] = _e({
134
134
  controlled: Fe,
135
135
  default: !1,
136
- name: x,
136
+ name: m,
137
137
  state: "open"
138
- }), [ze, Ae] = h.useState(!0), De = !u && o != null && a === O(o), S = q && !J, f = S ? fe(
139
- pe.filter((t) => !(G && (u ? o : [o]).some((e) => e !== null && V(t, e)))),
138
+ }), [ze, Pe] = h.useState(!0), Ae = !u && r != null && a === O(r), k = U && !W, p = k ? pe(
139
+ de.filter((t) => !(Q && (u ? r : [r]).some((e) => e !== null && R(t, e)))),
140
140
  // we use the empty string to manipulate `filterOptions` to not filter any options
141
141
  // i.e. the filter predicate always returns true
142
142
  {
143
- inputValue: De && ze ? "" : a,
143
+ inputValue: Ae && ze ? "" : a,
144
144
  getOptionLabel: O
145
145
  }
146
- ) : [], A = ht({
147
- filteredOptions: f,
148
- value: o,
146
+ ) : [], P = ht({
147
+ filteredOptions: p,
148
+ value: r,
149
149
  inputValue: a
150
150
  });
151
151
  h.useEffect(() => {
152
- const t = o !== A.value;
153
- ne && !t || i && !t || oe(null, o);
154
- }, [o, oe, ne, A.value, i]);
155
- const be = q && f.length > 0 && !J;
156
- if (process.env.NODE_ENV !== "production" && o !== null && !i && pe.length > 0) {
157
- const t = (u ? o : [o]).filter((e) => !pe.some((n) => V(n, e)));
158
- t.length > 0 && console.warn([`MUI: The value provided to ${x} is invalid.`, `None of the options match with \`${t.length > 1 ? JSON.stringify(t) : JSON.stringify(t[0])}\`.`, "You can use the `isOptionEqualToValue` prop to customize the equality test."].join(`
152
+ const t = r !== P.value;
153
+ oe && !t || i && !t || re(null, r);
154
+ }, [r, re, oe, P.value, i]);
155
+ const be = U && p.length > 0 && !W;
156
+ if (process.env.NODE_ENV !== "production" && r !== null && !i && de.length > 0) {
157
+ const t = (u ? r : [r]).filter((e) => !de.some((o) => R(o, e)));
158
+ t.length > 0 && console.warn([`MUI: The value provided to ${m} is invalid.`, `None of the options match with \`${t.length > 1 ? JSON.stringify(t) : JSON.stringify(t[0])}\`.`, "You can use the `isOptionEqualToValue` prop to customize the equality test."].join(`
159
159
  `));
160
160
  }
161
- const re = ae((t) => {
162
- t === -1 ? d.current.focus() : ee.querySelector(`[data-tag-index="${t}"]`).focus();
161
+ const ne = ae((t) => {
162
+ t === -1 ? f.current.focus() : ee.querySelector(`[data-tag-index="${t}"]`).focus();
163
163
  });
164
164
  h.useEffect(() => {
165
- u && $ > o.length - 1 && (me(-1), re(-1));
166
- }, [o, u, $, re]);
165
+ u && $ > r.length - 1 && (ye(-1), ne(-1));
166
+ }, [r, u, $, ne]);
167
167
  function Je(t, e) {
168
- if (!_.current || t < 0 || t >= f.length)
168
+ if (!T.current || t < 0 || t >= p.length)
169
169
  return -1;
170
- let n = t;
170
+ let o = t;
171
171
  for (; ; ) {
172
- const r = _.current.querySelector(`[data-option-index="${n}"]`), s = ce ? !1 : !r || r.disabled || r.getAttribute("aria-disabled") === "true";
173
- if (r && r.hasAttribute("tabindex") && !s)
174
- return n;
175
- if (e === "next" ? n = (n + 1) % f.length : n = (n - 1 + f.length) % f.length, n === t)
172
+ const n = T.current.querySelector(`[data-option-index="${o}"]`), s = ce ? !1 : !n || n.disabled || n.getAttribute("aria-disabled") === "true";
173
+ if (n && n.hasAttribute("tabindex") && !s)
174
+ return o;
175
+ if (e === "next" ? o = (o + 1) % p.length : o = (o - 1 + p.length) % p.length, o === t)
176
176
  return -1;
177
177
  }
178
178
  }
179
- const R = ae(({
179
+ const F = ae(({
180
180
  event: t,
181
181
  index: e,
182
- reason: n = "auto"
182
+ reason: o = "auto"
183
183
  }) => {
184
- if (y.current = e, e === -1 ? d.current.removeAttribute("aria-activedescendant") : d.current.setAttribute("aria-activedescendant", `${T}-option-${e}`), ke && ke(t, e === -1 ? null : f[e], n), !_.current)
184
+ if (x.current = e, e === -1 ? f.current.removeAttribute("aria-activedescendant") : f.current.setAttribute("aria-activedescendant", `${E}-option-${e}`), we && we(t, e === -1 ? null : p[e], o), !T.current)
185
185
  return;
186
- const r = _.current.querySelector(`[role="option"].${g}-focused`);
187
- r && (r.classList.remove(`${g}-focused`), r.classList.remove(`${g}-focusVisible`));
188
- let s = _.current;
189
- if (_.current.getAttribute("role") !== "listbox" && (s = _.current.parentElement.querySelector('[role="listbox"]')), !s)
186
+ const n = T.current.querySelector(`[role="option"].${g}-focused`);
187
+ n && (n.classList.remove(`${g}-focused`), n.classList.remove(`${g}-focusVisible`));
188
+ let s = T.current;
189
+ if (T.current.getAttribute("role") !== "listbox" && (s = T.current.parentElement.querySelector('[role="listbox"]')), !s)
190
190
  return;
191
191
  if (e === -1) {
192
192
  s.scrollTop = 0;
193
193
  return;
194
194
  }
195
- const l = _.current.querySelector(`[data-option-index="${e}"]`);
196
- if (l && (l.classList.add(`${g}-focused`), n === "keyboard" && l.classList.add(`${g}-focusVisible`), s.scrollHeight > s.clientHeight && n !== "mouse" && n !== "touch")) {
197
- const p = l, I = s.clientHeight + s.scrollTop, ie = p.offsetTop + p.offsetHeight;
198
- ie > I ? s.scrollTop = ie - s.clientHeight : p.offsetTop - p.offsetHeight * (E ? 1.3 : 0) < s.scrollTop && (s.scrollTop = p.offsetTop - p.offsetHeight * (E ? 1.3 : 0));
195
+ const l = T.current.querySelector(`[data-option-index="${e}"]`);
196
+ if (l && (l.classList.add(`${g}-focused`), o === "keyboard" && l.classList.add(`${g}-focusVisible`), s.scrollHeight > s.clientHeight && o !== "mouse" && o !== "touch")) {
197
+ const d = l, I = s.clientHeight + s.scrollTop, ie = d.offsetTop + d.offsetHeight;
198
+ ie > I ? s.scrollTop = ie - s.clientHeight : d.offsetTop - d.offsetHeight * (_ ? 1.3 : 0) < s.scrollTop && (s.scrollTop = d.offsetTop - d.offsetHeight * (_ ? 1.3 : 0));
199
199
  }
200
- }), D = ae(({
200
+ }), A = ae(({
201
201
  event: t,
202
202
  diff: e,
203
- direction: n = "next",
204
- reason: r = "auto"
203
+ direction: o = "next",
204
+ reason: n = "auto"
205
205
  }) => {
206
- if (!S)
206
+ if (!k)
207
207
  return;
208
208
  const l = Je((() => {
209
- const p = f.length - 1;
209
+ const d = p.length - 1;
210
210
  if (e === "reset")
211
- return Te;
211
+ return Ee;
212
212
  if (e === "start")
213
213
  return 0;
214
214
  if (e === "end")
215
- return p;
216
- const I = y.current + e;
217
- return I < 0 ? I === -1 && Ie ? -1 : K && y.current !== -1 || Math.abs(e) > 1 ? 0 : p : I > p ? I === p + 1 && Ie ? -1 : K || Math.abs(e) > 1 ? p : 0 : I;
218
- })(), n);
219
- if (R({
215
+ return d;
216
+ const I = x.current + e;
217
+ return I < 0 ? I === -1 && Oe ? -1 : J && x.current !== -1 || Math.abs(e) > 1 ? 0 : d : I > d ? I === d + 1 && Oe ? -1 : J || Math.abs(e) > 1 ? d : 0 : I;
218
+ })(), o);
219
+ if (F({
220
220
  index: l,
221
- reason: r,
221
+ reason: n,
222
222
  event: t
223
- }), P && e !== "reset")
223
+ }), D && e !== "reset")
224
224
  if (l === -1)
225
- d.current.value = a;
225
+ f.current.value = a;
226
226
  else {
227
- const p = O(f[l]);
228
- d.current.value = p, p.toLowerCase().indexOf(a.toLowerCase()) === 0 && a.length > 0 && d.current.setSelectionRange(a.length, p.length);
227
+ const d = O(p[l]);
228
+ f.current.value = d, d.toLowerCase().indexOf(a.toLowerCase()) === 0 && a.length > 0 && f.current.setSelectionRange(a.length, d.length);
229
229
  }
230
230
  }), We = () => {
231
- const t = (e, n) => {
232
- const r = e ? O(e) : "", s = n ? O(n) : "";
233
- return r === s;
231
+ const t = (e, o) => {
232
+ const n = e ? O(e) : "", s = o ? O(o) : "";
233
+ return n === s;
234
234
  };
235
- if (y.current !== -1 && A.filteredOptions && A.filteredOptions.length !== f.length && A.inputValue === a && (u ? o.length === A.value.length && A.value.every((e, n) => O(o[n]) === O(e)) : t(A.value, o))) {
236
- const e = A.filteredOptions[y.current];
235
+ if (x.current !== -1 && P.filteredOptions && P.filteredOptions.length !== p.length && P.inputValue === a && (u ? r.length === P.value.length && P.value.every((e, o) => O(r[o]) === O(e)) : t(P.value, r))) {
236
+ const e = P.filteredOptions[x.current];
237
237
  if (e)
238
- return ue(f, (n) => O(n) === O(e));
238
+ return ue(p, (o) => O(o) === O(e));
239
239
  }
240
240
  return -1;
241
- }, xe = h.useCallback(() => {
242
- if (!S)
241
+ }, me = h.useCallback(() => {
242
+ if (!k)
243
243
  return;
244
244
  const t = We();
245
245
  if (t !== -1) {
246
- y.current = t;
246
+ x.current = t;
247
247
  return;
248
248
  }
249
- const e = u ? o[0] : o;
250
- if (f.length === 0 || e == null) {
251
- D({
249
+ const e = u ? r[0] : r;
250
+ if (p.length === 0 || e == null) {
251
+ A({
252
252
  diff: "reset"
253
253
  });
254
254
  return;
255
255
  }
256
- if (_.current) {
256
+ if (T.current) {
257
257
  if (e != null) {
258
- const n = f[y.current];
259
- if (u && n && ue(o, (s) => V(n, s)) !== -1)
258
+ const o = p[x.current];
259
+ if (u && o && ue(r, (s) => R(o, s)) !== -1)
260
260
  return;
261
- const r = ue(f, (s) => V(s, e));
262
- r === -1 ? D({
261
+ const n = ue(p, (s) => R(s, e));
262
+ n === -1 ? A({
263
263
  diff: "reset"
264
- }) : R({
265
- index: r
264
+ }) : F({
265
+ index: n
266
266
  });
267
267
  return;
268
268
  }
269
- if (y.current >= f.length - 1) {
270
- R({
271
- index: f.length - 1
269
+ if (x.current >= p.length - 1) {
270
+ F({
271
+ index: p.length - 1
272
272
  });
273
273
  return;
274
274
  }
275
- R({
276
- index: y.current
275
+ F({
276
+ index: x.current
277
277
  });
278
278
  }
279
279
  }, [
280
280
  // Only sync the highlighted index when the option switch between empty and not
281
- f.length,
281
+ p.length,
282
282
  // Don't sync the highlighted index with the value when multiple
283
283
  // eslint-disable-next-line react-hooks/exhaustive-deps
284
- u ? !1 : o,
285
- G,
286
- D,
287
- R,
288
- S,
284
+ u ? !1 : r,
285
+ Q,
286
+ A,
287
+ F,
288
+ k,
289
289
  a,
290
290
  u
291
291
  ]), Ye = ae((t) => {
292
- pt(_, t), t && xe();
292
+ dt(T, t), t && me();
293
293
  });
294
294
  process.env.NODE_ENV !== "production" && h.useEffect(() => {
295
- (!d.current || d.current.nodeName !== "INPUT") && (d.current && d.current.nodeName === "TEXTAREA" ? console.warn([`A textarea element was provided to ${x} where input was expected.`, "This is not a supported scenario but it may work under certain conditions.", "A textarea keyboard navigation may conflict with Autocomplete controls (for example enter and arrow keys).", "Make sure to test keyboard navigation and add custom event handlers if necessary."].join(`
296
- `)) : console.error([`MUI: Unable to find the input element. It was resolved to ${d.current} while an HTMLInputElement was expected.`, `Instead, ${x} expects an input element.`, "", x === "useAutocomplete" ? "Make sure you have bound getInputProps correctly and that the normal ref/effect resolutions order is guaranteed." : "Make sure you have customized the input component correctly."].join(`
295
+ (!f.current || f.current.nodeName !== "INPUT") && (f.current && f.current.nodeName === "TEXTAREA" ? console.warn([`A textarea element was provided to ${m} where input was expected.`, "This is not a supported scenario but it may work under certain conditions.", "A textarea keyboard navigation may conflict with Autocomplete controls (for example enter and arrow keys).", "Make sure to test keyboard navigation and add custom event handlers if necessary."].join(`
296
+ `)) : console.error([`MUI: Unable to find the input element. It was resolved to ${f.current} while an HTMLInputElement was expected.`, `Instead, ${m} expects an input element.`, "", m === "useAutocomplete" ? "Make sure you have bound getInputProps correctly and that the normal ref/effect resolutions order is guaranteed." : "Make sure you have customized the input component correctly."].join(`
297
297
  `)));
298
- }, [x]), h.useEffect(() => {
299
- xe();
300
- }, [xe]);
301
- const H = (t) => {
302
- q || ($e(!0), Ae(!0), Ee && Ee(t));
303
- }, W = (t, e) => {
304
- q && ($e(!1), Se && Se(t, e));
305
- }, B = (t, e, n, r) => {
298
+ }, [m]), h.useEffect(() => {
299
+ me();
300
+ }, [me]);
301
+ const q = (t) => {
302
+ U || ($e(!0), Pe(!0), ke && ke(t));
303
+ }, Y = (t, e) => {
304
+ U && ($e(!1), Se && Se(t, e));
305
+ }, j = (t, e, o, n) => {
306
306
  if (u) {
307
- if (o.length === e.length && o.every((s, l) => s === e[l]))
307
+ if (r.length === e.length && r.every((s, l) => s === e[l]))
308
308
  return;
309
- } else if (o === e)
309
+ } else if (r === e)
310
310
  return;
311
- we && we(t, e, n, r), Ke(e);
312
- }, se = h.useRef(!1), Y = (t, e, n = "selectOption", r = "options") => {
313
- let s = n, l = e;
311
+ Ie && Ie(t, e, o, n), Ke(e);
312
+ }, se = h.useRef(!1), X = (t, e, o = "selectOption", n = "options") => {
313
+ let s = o, l = e;
314
314
  if (u) {
315
- if (l = Array.isArray(o) ? o.slice() : [], process.env.NODE_ENV !== "production") {
316
- const I = l.filter((ie) => V(e, ie));
317
- I.length > 1 && console.error([`MUI: The \`isOptionEqualToValue\` method of ${x} does not handle the arguments correctly.`, `The component expects a single value to match a given option but found ${I.length} matches.`].join(`
315
+ if (l = Array.isArray(r) ? r.slice() : [], process.env.NODE_ENV !== "production") {
316
+ const I = l.filter((ie) => R(e, ie));
317
+ I.length > 1 && console.error([`MUI: The \`isOptionEqualToValue\` method of ${m} does not handle the arguments correctly.`, `The component expects a single value to match a given option but found ${I.length} matches.`].join(`
318
318
  `));
319
319
  }
320
- const p = ue(l, (I) => V(e, I));
321
- p === -1 ? l.push(e) : r !== "freeSolo" && (l.splice(p, 1), s = "removeOption");
320
+ const d = ue(l, (I) => R(e, I));
321
+ d === -1 ? l.push(e) : n !== "freeSolo" && (l.splice(d, 1), s = "removeOption");
322
322
  }
323
- oe(t, l), B(t, l, s, {
323
+ re(t, l), j(t, l, s, {
324
324
  option: e
325
- }), !j && (!t || !t.ctrlKey && !t.metaKey) && W(t, s), (C === !0 || C === "touch" && se.current || C === "mouse" && !se.current) && d.current.blur();
325
+ }), !z && (!t || !t.ctrlKey && !t.metaKey) && Y(t, s), (C === !0 || C === "touch" && se.current || C === "mouse" && !se.current) && f.current.blur();
326
326
  };
327
327
  function Xe(t, e) {
328
328
  if (t === -1)
329
329
  return -1;
330
- let n = t;
330
+ let o = t;
331
331
  for (; ; ) {
332
- if (e === "next" && n === o.length || e === "previous" && n === -1)
332
+ if (e === "next" && o === r.length || e === "previous" && o === -1)
333
333
  return -1;
334
- const r = ee.querySelector(`[data-tag-index="${n}"]`);
335
- if (!r || !r.hasAttribute("tabindex") || r.disabled || r.getAttribute("aria-disabled") === "true")
336
- n += e === "next" ? 1 : -1;
334
+ const n = ee.querySelector(`[data-tag-index="${o}"]`);
335
+ if (!n || !n.hasAttribute("tabindex") || n.disabled || n.getAttribute("aria-disabled") === "true")
336
+ o += e === "next" ? 1 : -1;
337
337
  else
338
- return n;
338
+ return o;
339
339
  }
340
340
  }
341
- const Pe = (t, e) => {
341
+ const De = (t, e) => {
342
342
  if (!u)
343
343
  return;
344
- a === "" && W(t, "toggleInput");
345
- let n = $;
346
- $ === -1 ? a === "" && e === "previous" && (n = o.length - 1) : (n += e === "next" ? 1 : -1, n < 0 && (n = 0), n === o.length && (n = -1)), n = Xe(n, e), me(n), re(n);
344
+ a === "" && Y(t, "toggleInput");
345
+ let o = $;
346
+ $ === -1 ? a === "" && e === "previous" && (o = r.length - 1) : (o += e === "next" ? 1 : -1, o < 0 && (o = 0), o === r.length && (o = -1)), o = Xe(o, e), ye(o), ne(o);
347
347
  }, Ce = (t) => {
348
- ge.current = !0, te(""), M && M(t, "", "clear"), B(t, u ? [] : null, "clear");
348
+ ge.current = !0, te(""), H && H(t, "", "clear"), j(t, u ? [] : null, "clear");
349
349
  }, Ge = (t) => (e) => {
350
- if (t.onKeyDown && t.onKeyDown(e), !e.defaultMuiPrevented && ($ !== -1 && ["ArrowLeft", "ArrowRight"].indexOf(e.key) === -1 && (me(-1), re(-1)), e.which !== 229))
350
+ if (t.onKeyDown && t.onKeyDown(e), !e.defaultMuiPrevented && ($ !== -1 && ["ArrowLeft", "ArrowRight"].indexOf(e.key) === -1 && (ye(-1), ne(-1)), e.which !== 229))
351
351
  switch (e.key) {
352
352
  case "Home":
353
- S && Z && (e.preventDefault(), D({
353
+ k && Z && (e.preventDefault(), A({
354
354
  diff: "start",
355
355
  direction: "next",
356
356
  reason: "keyboard",
@@ -358,7 +358,7 @@ function yt(c) {
358
358
  }));
359
359
  break;
360
360
  case "End":
361
- S && Z && (e.preventDefault(), D({
361
+ k && Z && (e.preventDefault(), A({
362
362
  diff: "end",
363
363
  direction: "previous",
364
364
  reason: "keyboard",
@@ -366,158 +366,158 @@ function yt(c) {
366
366
  }));
367
367
  break;
368
368
  case "PageUp":
369
- e.preventDefault(), D({
369
+ e.preventDefault(), A({
370
370
  diff: -Re,
371
371
  direction: "previous",
372
372
  reason: "keyboard",
373
373
  event: e
374
- }), H(e);
374
+ }), q(e);
375
375
  break;
376
376
  case "PageDown":
377
- e.preventDefault(), D({
377
+ e.preventDefault(), A({
378
378
  diff: Re,
379
379
  direction: "next",
380
380
  reason: "keyboard",
381
381
  event: e
382
- }), H(e);
382
+ }), q(e);
383
383
  break;
384
384
  case "ArrowDown":
385
- e.preventDefault(), D({
385
+ e.preventDefault(), A({
386
386
  diff: 1,
387
387
  direction: "next",
388
388
  reason: "keyboard",
389
389
  event: e
390
- }), H(e);
390
+ }), q(e);
391
391
  break;
392
392
  case "ArrowUp":
393
- e.preventDefault(), D({
393
+ e.preventDefault(), A({
394
394
  diff: -1,
395
395
  direction: "previous",
396
396
  reason: "keyboard",
397
397
  event: e
398
- }), H(e);
398
+ }), q(e);
399
399
  break;
400
400
  case "ArrowLeft":
401
- Pe(e, "previous");
401
+ De(e, "previous");
402
402
  break;
403
403
  case "ArrowRight":
404
- Pe(e, "next");
404
+ De(e, "next");
405
405
  break;
406
406
  case "Enter":
407
- if (y.current !== -1 && S) {
408
- const n = f[y.current], r = m ? m(n) : !1;
409
- if (e.preventDefault(), r)
407
+ if (x.current !== -1 && k) {
408
+ const o = p[x.current], n = y ? y(o) : !1;
409
+ if (e.preventDefault(), n)
410
410
  return;
411
- Y(e, n, "selectOption"), P && d.current.setSelectionRange(d.current.value.length, d.current.value.length);
411
+ X(e, o, "selectOption"), D && f.current.setSelectionRange(f.current.value.length, f.current.value.length);
412
412
  } else
413
- i && a !== "" && De === !1 && (u && e.preventDefault(), Y(e, a, "createOption", "freeSolo"));
413
+ i && a !== "" && Ae === !1 && (u && e.preventDefault(), X(e, a, "createOption", "freeSolo"));
414
414
  break;
415
415
  case "Escape":
416
- S ? (e.preventDefault(), e.stopPropagation(), W(e, "escape")) : L && (a !== "" || u && o.length > 0) && (e.preventDefault(), e.stopPropagation(), Ce(e));
416
+ k ? (e.preventDefault(), e.stopPropagation(), Y(e, "escape")) : L && (a !== "" || u && r.length > 0) && (e.preventDefault(), e.stopPropagation(), Ce(e));
417
417
  break;
418
418
  case "Backspace":
419
- if (u && !J && a === "" && o.length > 0) {
420
- const n = $ === -1 ? o.length - 1 : $, r = o.slice();
421
- r.splice(n, 1), B(e, r, "removeOption", {
422
- option: o[n]
419
+ if (u && !W && a === "" && r.length > 0) {
420
+ const o = $ === -1 ? r.length - 1 : $, n = r.slice();
421
+ n.splice(o, 1), j(e, n, "removeOption", {
422
+ option: r[o]
423
423
  });
424
424
  }
425
425
  break;
426
426
  case "Delete":
427
- if (u && !J && a === "" && o.length > 0 && $ !== -1) {
428
- const n = $, r = o.slice();
429
- r.splice(n, 1), B(e, r, "removeOption", {
430
- option: o[n]
427
+ if (u && !W && a === "" && r.length > 0 && $ !== -1) {
428
+ const o = $, n = r.slice();
429
+ n.splice(o, 1), j(e, n, "removeOption", {
430
+ option: r[o]
431
431
  });
432
432
  }
433
433
  break;
434
434
  }
435
435
  }, Qe = (t) => {
436
- _e(!0), qe && !ge.current && H(t);
437
- }, ve = (t) => {
438
- if (b(_)) {
439
- d.current.focus();
436
+ Te(!0), qe && !ge.current && q(t);
437
+ }, Ne = (t) => {
438
+ if (b(T)) {
439
+ f.current.focus();
440
440
  return;
441
441
  }
442
- _e(!1), he.current = !0, ge.current = !1, N && y.current !== -1 && S ? Y(t, f[y.current], "blur") : N && i && a !== "" ? Y(t, a, "blur", "freeSolo") : v && oe(t, o), W(t, "blur");
442
+ Te(!1), he.current = !0, ge.current = !1, v && x.current !== -1 && k ? X(t, p[x.current], "blur") : v && i && a !== "" ? X(t, a, "blur", "freeSolo") : N && re(t, r), Y(t, "blur");
443
443
  }, Ze = (t) => {
444
444
  const e = t.target.value;
445
- a !== e && (te(e), Ae(!1), M && M(t, e, "input")), e === "" ? !F && !u && B(t, null, "clear") : H(t);
445
+ a !== e && (te(e), Pe(!1), H && H(t, e, "input")), e === "" ? !B && !u && j(t, null, "clear") : q(t);
446
446
  }, et = (t) => {
447
447
  const e = Number(t.currentTarget.getAttribute("data-option-index"));
448
- y.current !== e && R({
448
+ x.current !== e && F({
449
449
  event: t,
450
450
  index: e,
451
451
  reason: "mouse"
452
452
  });
453
453
  }, tt = (t) => {
454
- R({
454
+ F({
455
455
  event: t,
456
456
  index: Number(t.currentTarget.getAttribute("data-option-index")),
457
457
  reason: "touch"
458
458
  }), se.current = !0;
459
- }, nt = (t) => {
459
+ }, ot = (t) => {
460
460
  const e = Number(t.currentTarget.getAttribute("data-option-index"));
461
- Y(t, f[e], "selectOption"), se.current = !1;
462
- }, ot = (t) => (e) => {
463
- const n = o.slice();
464
- n.splice(t, 1), B(e, n, "removeOption", {
465
- option: o[t]
461
+ X(t, p[e], "selectOption"), se.current = !1;
462
+ }, rt = (t) => (e) => {
463
+ const o = r.slice();
464
+ o.splice(t, 1), j(e, o, "removeOption", {
465
+ option: r[t]
466
466
  });
467
- }, Ne = (t) => {
468
- q ? W(t, "toggleInput") : H(t);
469
- }, rt = (t) => {
470
- t.currentTarget.contains(t.target) && t.target.getAttribute("id") !== T && t.preventDefault();
467
+ }, ve = (t) => {
468
+ U ? Y(t, "toggleInput") : q(t);
469
+ }, nt = (t) => {
470
+ t.currentTarget.contains(t.target) && t.target.getAttribute("id") !== E && t.preventDefault();
471
471
  }, st = (t) => {
472
- t.currentTarget.contains(t.target) && (d.current.focus(), Be && he.current && d.current.selectionEnd - d.current.selectionStart === 0 && d.current.select(), he.current = !1);
472
+ t.currentTarget.contains(t.target) && (f.current.focus(), Be && he.current && f.current.selectionEnd - f.current.selectionStart === 0 && f.current.select(), he.current = !1);
473
473
  }, it = (t) => {
474
- !w && (a === "" || !q) && Ne(t);
474
+ !w && (a === "" || !U) && ve(t);
475
475
  };
476
- let ye = i && a.length > 0;
477
- ye = ye || (u ? o.length > 0 : o !== null);
478
- let Le = f;
479
- if (E) {
476
+ let xe = i && a.length > 0;
477
+ xe = xe || (u ? r.length > 0 : r !== null);
478
+ let Le = p;
479
+ if (_) {
480
480
  const t = /* @__PURE__ */ new Map();
481
481
  let e = !1;
482
- Le = f.reduce((n, r, s) => {
483
- const l = E(r);
484
- return n.length > 0 && n[n.length - 1].group === l ? n[n.length - 1].options.push(r) : (process.env.NODE_ENV !== "production" && (t.get(l) && !e && (console.warn(`MUI: The options provided combined with the \`groupBy\` method of ${x} returns duplicated headers.`, "You can solve the issue by sorting the options with the output of `groupBy`."), e = !0), t.set(l, !0)), n.push({
482
+ Le = p.reduce((o, n, s) => {
483
+ const l = _(n);
484
+ return o.length > 0 && o[o.length - 1].group === l ? o[o.length - 1].options.push(n) : (process.env.NODE_ENV !== "production" && (t.get(l) && !e && (console.warn(`MUI: The options provided combined with the \`groupBy\` method of ${m} returns duplicated headers.`, "You can solve the issue by sorting the options with the output of `groupBy`."), e = !0), t.set(l, !0)), o.push({
485
485
  key: s,
486
486
  index: s,
487
487
  group: l,
488
- options: [r]
489
- })), n;
488
+ options: [n]
489
+ })), o;
490
490
  }, []);
491
491
  }
492
- return w && ne && ve(), {
492
+ return w && oe && Ne(), {
493
493
  getRootProps: (t = {}) => Ve({
494
- "aria-owns": be ? `${T}-listbox` : null
494
+ "aria-owns": be ? `${E}-listbox` : null
495
495
  }, t, {
496
496
  onKeyDown: Ge(t),
497
- onMouseDown: rt,
497
+ onMouseDown: nt,
498
498
  onClick: st
499
499
  }),
500
500
  getInputLabelProps: () => ({
501
- id: `${T}-label`,
502
- htmlFor: T
501
+ id: `${E}-label`,
502
+ htmlFor: E
503
503
  }),
504
504
  getInputProps: () => ({
505
- id: T,
505
+ id: E,
506
506
  value: a,
507
- onBlur: ve,
507
+ onBlur: Ne,
508
508
  onFocus: Qe,
509
509
  onChange: Ze,
510
510
  onMouseDown: it,
511
511
  // if open then this is handled imperatively so don't let react override
512
512
  // only have an opinion about this when closed
513
- "aria-activedescendant": S ? "" : null,
514
- "aria-autocomplete": P ? "both" : "list",
515
- "aria-controls": be ? `${T}-listbox` : void 0,
513
+ "aria-activedescendant": k ? "" : null,
514
+ "aria-autocomplete": D ? "both" : "list",
515
+ "aria-controls": be ? `${E}-listbox` : void 0,
516
516
  "aria-expanded": be,
517
517
  // Disable browser's suggestion that might overlap with the popup.
518
518
  // Handle autocomplete but not autofill.
519
519
  autoComplete: "off",
520
- ref: d,
520
+ ref: f,
521
521
  autoCapitalize: "none",
522
522
  spellCheck: "false",
523
523
  role: "combobox",
@@ -531,7 +531,7 @@ function yt(c) {
531
531
  getPopupIndicatorProps: () => ({
532
532
  tabIndex: -1,
533
533
  type: "button",
534
- onClick: Ne
534
+ onClick: ve
535
535
  }),
536
536
  getTagProps: ({
537
537
  index: t
@@ -539,13 +539,13 @@ function yt(c) {
539
539
  key: t,
540
540
  "data-tag-index": t,
541
541
  tabIndex: -1
542
- }, !J && {
543
- onDelete: ot(t)
542
+ }, !W && {
543
+ onDelete: rt(t)
544
544
  }),
545
545
  getListboxProps: () => ({
546
546
  role: "listbox",
547
- id: `${T}-listbox`,
548
- "aria-labelledby": `${T}-label`,
547
+ id: `${E}-listbox`,
548
+ "aria-labelledby": `${E}-label`,
549
549
  ref: Ye,
550
550
  onMouseDown: (t) => {
551
551
  t.preventDefault();
@@ -555,106 +555,125 @@ function yt(c) {
555
555
  index: t,
556
556
  option: e
557
557
  }) => {
558
- var n;
559
- const r = (u ? o : [o]).some((l) => l != null && V(e, l)), s = m ? m(e) : !1;
558
+ var o;
559
+ const n = (u ? r : [r]).some((l) => l != null && R(e, l)), s = y ? y(e) : !1;
560
560
  return {
561
- key: (n = Q == null ? void 0 : Q(e)) != null ? n : O(e),
561
+ key: (o = V == null ? void 0 : V(e)) != null ? o : O(e),
562
562
  tabIndex: -1,
563
563
  role: "option",
564
- id: `${T}-option-${t}`,
564
+ id: `${E}-option-${t}`,
565
565
  onMouseMove: et,
566
- onClick: nt,
566
+ onClick: ot,
567
567
  onTouchStart: tt,
568
568
  "data-option-index": t,
569
569
  "aria-disabled": s,
570
- "aria-selected": r
570
+ "aria-selected": n
571
571
  };
572
572
  },
573
- id: T,
573
+ id: E,
574
574
  inputValue: a,
575
- value: o,
576
- dirty: ye,
577
- expanded: S && ee,
578
- popupOpen: S,
579
- focused: ne || $ !== -1,
575
+ value: r,
576
+ dirty: xe,
577
+ expanded: k && ee,
578
+ popupOpen: k,
579
+ focused: oe || $ !== -1,
580
580
  anchorEl: ee,
581
581
  setAnchorEl: je,
582
582
  focusedTag: $,
583
583
  groupedOptions: Le
584
584
  };
585
585
  }
586
- const Ot = "_autocomplete_pfc9v_1", X = {
587
- autocomplete: Ot,
588
- "autocomplete__dropdown-list": "_autocomplete__dropdown-list_pfc9v_5",
589
- "autocomplete__dropdown-item": "_autocomplete__dropdown-item_pfc9v_17",
590
- "option-focused": "_option-focused_pfc9v_26"
591
- }, At = ({
586
+ const _t = "_autocomplete_164gy_65", G = {
587
+ "u-typography-h1": "_u-typography-h1_164gy_1",
588
+ "u-typography-h2": "_u-typography-h2_164gy_8",
589
+ "u-typography-h3": "_u-typography-h3_164gy_15",
590
+ "u-typography-h4": "_u-typography-h4_164gy_22",
591
+ "u-typography-h5": "_u-typography-h5_164gy_29",
592
+ "u-typography-h6": "_u-typography-h6_164gy_36",
593
+ "u-typography-base": "_u-typography-base_164gy_43",
594
+ "u-typography-base--xxl": "_u-typography-base--xxl_164gy_49",
595
+ "u-typography-base--xl": "_u-typography-base--xl_164gy_53",
596
+ "u-typography-base--lg": "_u-typography-base--lg_164gy_57",
597
+ "u-typography-base--sm": "_u-typography-base--sm_164gy_61",
598
+ "u-typography-base--bold": "_u-typography-base--bold_164gy_65",
599
+ "autocomplete__dropdown-item": "_autocomplete__dropdown-item_164gy_65",
600
+ "u-typography-base--strikethrough": "_u-typography-base--strikethrough_164gy_68",
601
+ "u-typography-base--underlined": "_u-typography-base--underlined_164gy_71",
602
+ "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_164gy_74",
603
+ autocomplete: _t,
604
+ "autocomplete__dropdown-list": "_autocomplete__dropdown-list_164gy_82",
605
+ "option-focused": "_option-focused_164gy_106"
606
+ }, Pt = ({
592
607
  labelKey: c,
593
608
  valueKey: b,
594
609
  options: g,
595
- type: P,
596
- value: U,
597
- onChange: N,
610
+ type: D,
611
+ value: K,
612
+ onChange: v,
598
613
  onInputChange: C,
599
- "data-testid-wrapper": v,
614
+ "data-testid-wrapper": N,
600
615
  ...L
601
616
  }) => {
602
- const x = at(), [k, F] = ut("");
617
+ const m = at(), [S, B] = ut("");
603
618
  g != null && g.some((i) => typeof i != "string") && (!c || !b) && console.error(
604
619
  '[autocomplete] When options is a list of objects, you must provide the "labelKey" and "valueKey" parameters.'
605
620
  );
606
- const { getRootProps: j, getInputProps: w, getOptionProps: ce, groupedOptions: K, getListboxProps: fe } = yt({
607
- id: `autocomplete_${x}`,
621
+ const { getRootProps: z, getInputProps: w, getOptionProps: ce, groupedOptions: J, getListboxProps: pe } = xt({
622
+ id: `autocomplete_${m}`,
608
623
  options: g,
609
624
  getOptionLabel: (i) => typeof i == "string" ? i : String(i[c || "label"]),
610
- value: U,
611
- inputValue: k,
612
- isOptionEqualToValue: (i, m) => typeof i == "string" ? String(i) === String(m) : String(i[b || "id"]) === String(m[b || "id"]),
613
- onChange: (i, m) => {
614
- N && N(i, m);
625
+ value: K,
626
+ inputValue: S,
627
+ isOptionEqualToValue: (i, y) => typeof i == "string" ? String(i) === String(y) : String(i[b || "id"]) === String(y[b || "id"]),
628
+ onChange: (i, y) => {
629
+ v && v(i, y);
615
630
  },
616
- onInputChange: (i, m) => {
617
- C && C(i, m), F(m);
631
+ onInputChange: (i, y) => {
632
+ C && C(i, y), B(y);
618
633
  },
619
- onHighlightChange: (i, m, Q) => {
620
- var z;
621
- if (Q === "keyboard") {
622
- const E = document.querySelector("#autocomplete-list"), Z = (i == null ? void 0 : i.target).getAttribute("aria-activedescendant");
623
- E == null || E.querySelectorAll("li").forEach((de) => de.classList.remove(X["option-focused"])), (z = E == null ? void 0 : E.querySelector(`[id="${Z}"]`)) == null || z.classList.add(X["option-focused"]);
634
+ onHighlightChange: (i, y, V) => {
635
+ var M;
636
+ if (V === "keyboard") {
637
+ const _ = document.querySelector("#autocomplete-list"), Z = (i == null ? void 0 : i.target).getAttribute("aria-activedescendant");
638
+ _ == null || _.querySelectorAll("li").forEach((fe) => fe.classList.remove(G["option-focused"])), (M = _ == null ? void 0 : _.querySelector(`[id="${Z}"]`)) == null || M.classList.add(G["option-focused"]);
624
639
  }
625
640
  }
626
- }), G = {
641
+ }), Q = {
627
642
  ...w(),
628
643
  ...L
629
644
  };
630
- return /* @__PURE__ */ le("div", { className: X.autocomplete, "data-testid": v, children: /* @__PURE__ */ lt("div", { ...j(), children: [
645
+ return /* @__PURE__ */ le("div", { className: G.autocomplete, "data-testid": N, children: /* @__PURE__ */ lt("div", { ...z(), children: [
631
646
  /* @__PURE__ */ le(
632
- dt,
647
+ ft,
633
648
  {
634
- rightIcon: P === "search" && /* @__PURE__ */ le(ft, { color: "var(--accent)", icon: "magnifying-glass" }),
635
- ...G
649
+ rightIcon: D === "search" && /* @__PURE__ */ le(pt, { color: "var(--accent)", icon: "magnifying-glass" }),
650
+ ...Q
636
651
  }
637
652
  ),
638
- K.length > 0 && !L.disabled && /* @__PURE__ */ le(
653
+ J.length > 0 && !L.disabled && /* @__PURE__ */ le(
639
654
  "ul",
640
655
  {
641
- ...fe(),
656
+ ...pe(),
642
657
  id: "autocomplete-list",
643
- className: X["autocomplete__dropdown-list"],
644
- children: K.map((i, m) => /* @__PURE__ */ ct(
645
- "li",
646
- {
647
- tabIndex: m,
648
- className: X["autocomplete__dropdown-item"],
649
- ...ce({ option: i, index: m }),
650
- key: String(m)
651
- },
652
- typeof i == "string" ? i : String(i[c || "label"])
653
- ))
658
+ className: G["autocomplete__dropdown-list"],
659
+ children: J.map((i, y) => {
660
+ const V = ce({ option: i, index: y }), M = typeof i == "string" ? i : String(i[c || "label"]), _ = V.key === S;
661
+ return /* @__PURE__ */ ct(
662
+ "li",
663
+ {
664
+ tabIndex: y,
665
+ className: G["autocomplete__dropdown-item"],
666
+ ...V,
667
+ "aria-selected": _,
668
+ key: String(y)
669
+ },
670
+ M
671
+ );
672
+ })
654
673
  }
655
674
  )
656
675
  ] }) });
657
676
  };
658
677
  export {
659
- At as Autocomplete
678
+ Pt as Autocomplete
660
679
  };