@nysds/nys-textinput 1.10.1 → 1.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { css as lt, LitElement as ht, html as F } from "lit";
1
+ import { css as ot, LitElement as at, html as j } from "lit";
2
2
  /*!
3
3
  * ▒█▄░▒█ ▒█░░▒█ ▒█▀▀▀█ ▒█▀▀▄ ▒█▀▀▀█
4
4
  * ▒█▒█▒█ ▒█▄▄▄█ ░▀▀▀▄▄ ▒█░▒█ ░▀▀▀▄▄
@@ -14,18 +14,18 @@ import { css as lt, LitElement as ht, html as F } from "lit";
14
14
  * Copyright 2019 Google LLC
15
15
  * SPDX-License-Identifier: BSD-3-Clause
16
16
  */
17
- const R = globalThis, D = R.ShadowRoot && (R.ShadyCSS === void 0 || R.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, it = Symbol(), Y = /* @__PURE__ */ new WeakMap();
18
- let dt = class {
17
+ const O = globalThis, L = O.ShadowRoot && (O.ShadyCSS === void 0 || O.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, et = Symbol(), W = /* @__PURE__ */ new WeakMap();
18
+ let lt = class {
19
19
  constructor(t, e, s) {
20
- if (this._$cssResult$ = !0, s !== it) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
20
+ if (this._$cssResult$ = !0, s !== et) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
21
21
  this.cssText = t, this.t = e;
22
22
  }
23
23
  get styleSheet() {
24
24
  let t = this.o;
25
25
  const e = this.t;
26
- if (D && t === void 0) {
26
+ if (L && t === void 0) {
27
27
  const s = e !== void 0 && e.length === 1;
28
- s && (t = Y.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && Y.set(e, t));
28
+ s && (t = W.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && W.set(e, t));
29
29
  }
30
30
  return t;
31
31
  }
@@ -33,90 +33,88 @@ let dt = class {
33
33
  return this.cssText;
34
34
  }
35
35
  };
36
- const ut = (o) => new dt(typeof o == "string" ? o : o + "", void 0, it), ct = (o, t) => {
37
- if (D) o.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
36
+ const ht = (r) => new lt(typeof r == "string" ? r : r + "", void 0, et), dt = (r, t) => {
37
+ if (L) r.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
38
38
  else for (const e of t) {
39
- const s = document.createElement("style"), i = R.litNonce;
40
- i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, o.appendChild(s);
39
+ const s = document.createElement("style"), i = O.litNonce;
40
+ i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, r.appendChild(s);
41
41
  }
42
- }, G = D ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((t) => {
42
+ }, F = L ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
43
43
  let e = "";
44
44
  for (const s of t.cssRules) e += s.cssText;
45
- return ut(e);
46
- })(o) : o;
45
+ return ht(e);
46
+ })(r) : r;
47
47
  /**
48
48
  * @license
49
49
  * Copyright 2017 Google LLC
50
50
  * SPDX-License-Identifier: BSD-3-Clause
51
51
  */
52
- const { is: pt, defineProperty: yt, getOwnPropertyDescriptor: _t, getOwnPropertyNames: ft, getOwnPropertySymbols: vt, getPrototypeOf: bt } = Object, m = globalThis, J = m.trustedTypes, gt = J ? J.emptyScript : "", V = m.reactiveElementPolyfillSupport, M = (o, t) => o, H = { toAttribute(o, t) {
52
+ const { is: ut, defineProperty: ct, getOwnPropertyDescriptor: pt, getOwnPropertyNames: yt, getOwnPropertySymbols: _t, getPrototypeOf: ft } = Object, I = globalThis, Y = I.trustedTypes, vt = Y ? Y.emptyScript : "", bt = I.reactiveElementPolyfillSupport, P = (r, t) => r, T = { toAttribute(r, t) {
53
53
  switch (t) {
54
54
  case Boolean:
55
- o = o ? gt : null;
55
+ r = r ? vt : null;
56
56
  break;
57
57
  case Object:
58
58
  case Array:
59
- o = o == null ? o : JSON.stringify(o);
59
+ r = r == null ? r : JSON.stringify(r);
60
60
  }
61
- return o;
62
- }, fromAttribute(o, t) {
63
- let e = o;
61
+ return r;
62
+ }, fromAttribute(r, t) {
63
+ let e = r;
64
64
  switch (t) {
65
65
  case Boolean:
66
- e = o !== null;
66
+ e = r !== null;
67
67
  break;
68
68
  case Number:
69
- e = o === null ? null : Number(o);
69
+ e = r === null ? null : Number(r);
70
70
  break;
71
71
  case Object:
72
72
  case Array:
73
73
  try {
74
- e = JSON.parse(o);
74
+ e = JSON.parse(r);
75
75
  } catch {
76
76
  e = null;
77
77
  }
78
78
  }
79
79
  return e;
80
- } }, j = (o, t) => !pt(o, t), K = { attribute: !0, type: String, converter: H, reflect: !1, hasChanged: j };
81
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), m.litPropertyMetadata ?? (m.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
82
- class S extends HTMLElement {
80
+ } }, V = (r, t) => !ut(r, t), G = { attribute: !0, type: String, converter: T, reflect: !1, useDefault: !1, hasChanged: V };
81
+ Symbol.metadata ??= Symbol("metadata"), I.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
82
+ class E extends HTMLElement {
83
83
  static addInitializer(t) {
84
- this._$Ei(), (this.l ?? (this.l = [])).push(t);
84
+ this._$Ei(), (this.l ??= []).push(t);
85
85
  }
86
86
  static get observedAttributes() {
87
87
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
88
88
  }
89
- static createProperty(t, e = K) {
90
- if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
89
+ static createProperty(t, e = G) {
90
+ if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
91
91
  const s = Symbol(), i = this.getPropertyDescriptor(t, s, e);
92
- i !== void 0 && yt(this.prototype, t, i);
92
+ i !== void 0 && ct(this.prototype, t, i);
93
93
  }
94
94
  }
95
95
  static getPropertyDescriptor(t, e, s) {
96
- const { get: i, set: n } = _t(this.prototype, t) ?? { get() {
96
+ const { get: i, set: n } = pt(this.prototype, t) ?? { get() {
97
97
  return this[e];
98
- }, set(r) {
99
- this[e] = r;
98
+ }, set(o) {
99
+ this[e] = o;
100
100
  } };
101
- return { get() {
102
- return i == null ? void 0 : i.call(this);
103
- }, set(r) {
104
- const l = i == null ? void 0 : i.call(this);
105
- n.call(this, r), this.requestUpdate(t, l, s);
101
+ return { get: i, set(o) {
102
+ const l = i?.call(this);
103
+ n?.call(this, o), this.requestUpdate(t, l, s);
106
104
  }, configurable: !0, enumerable: !0 };
107
105
  }
108
106
  static getPropertyOptions(t) {
109
- return this.elementProperties.get(t) ?? K;
107
+ return this.elementProperties.get(t) ?? G;
110
108
  }
111
109
  static _$Ei() {
112
- if (this.hasOwnProperty(M("elementProperties"))) return;
113
- const t = bt(this);
110
+ if (this.hasOwnProperty(P("elementProperties"))) return;
111
+ const t = ft(this);
114
112
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
115
113
  }
116
114
  static finalize() {
117
- if (this.hasOwnProperty(M("finalized"))) return;
118
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(M("properties"))) {
119
- const e = this.properties, s = [...ft(e), ...vt(e)];
115
+ if (this.hasOwnProperty(P("finalized"))) return;
116
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(P("properties"))) {
117
+ const e = this.properties, s = [...yt(e), ..._t(e)];
120
118
  for (const i of s) this.createProperty(i, e[i]);
121
119
  }
122
120
  const t = this[Symbol.metadata];
@@ -135,8 +133,8 @@ class S extends HTMLElement {
135
133
  const e = [];
136
134
  if (Array.isArray(t)) {
137
135
  const s = new Set(t.flat(1 / 0).reverse());
138
- for (const i of s) e.unshift(G(i));
139
- } else t !== void 0 && e.push(G(t));
136
+ for (const i of s) e.unshift(F(i));
137
+ } else t !== void 0 && e.push(F(t));
140
138
  return e;
141
139
  }
142
140
  static _$Eu(t, e) {
@@ -147,16 +145,13 @@ class S extends HTMLElement {
147
145
  super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
148
146
  }
149
147
  _$Ev() {
150
- var t;
151
- this._$ES = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));
148
+ this._$ES = new Promise(((t) => this.enableUpdating = t)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((t) => t(this)));
152
149
  }
153
150
  addController(t) {
154
- var e;
155
- (this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
151
+ (this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.();
156
152
  }
157
153
  removeController(t) {
158
- var e;
159
- (e = this._$EO) == null || e.delete(t);
154
+ this._$EO?.delete(t);
160
155
  }
161
156
  _$E_() {
162
157
  const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
@@ -165,54 +160,47 @@ class S extends HTMLElement {
165
160
  }
166
161
  createRenderRoot() {
167
162
  const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
168
- return ct(t, this.constructor.elementStyles), t;
163
+ return dt(t, this.constructor.elementStyles), t;
169
164
  }
170
165
  connectedCallback() {
171
- var t;
172
- this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
173
- var s;
174
- return (s = e.hostConnected) == null ? void 0 : s.call(e);
175
- });
166
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((t) => t.hostConnected?.()));
176
167
  }
177
168
  enableUpdating(t) {
178
169
  }
179
170
  disconnectedCallback() {
180
- var t;
181
- (t = this._$EO) == null || t.forEach((e) => {
182
- var s;
183
- return (s = e.hostDisconnected) == null ? void 0 : s.call(e);
184
- });
171
+ this._$EO?.forEach(((t) => t.hostDisconnected?.()));
185
172
  }
186
173
  attributeChangedCallback(t, e, s) {
187
174
  this._$AK(t, s);
188
175
  }
189
- _$EC(t, e) {
190
- var n;
176
+ _$ET(t, e) {
191
177
  const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
192
178
  if (i !== void 0 && s.reflect === !0) {
193
- const r = (((n = s.converter) == null ? void 0 : n.toAttribute) !== void 0 ? s.converter : H).toAttribute(e, s.type);
194
- this._$Em = t, r == null ? this.removeAttribute(i) : this.setAttribute(i, r), this._$Em = null;
179
+ const n = (s.converter?.toAttribute !== void 0 ? s.converter : T).toAttribute(e, s.type);
180
+ this._$Em = t, n == null ? this.removeAttribute(i) : this.setAttribute(i, n), this._$Em = null;
195
181
  }
196
182
  }
197
183
  _$AK(t, e) {
198
- var n;
199
184
  const s = this.constructor, i = s._$Eh.get(t);
200
185
  if (i !== void 0 && this._$Em !== i) {
201
- const r = s.getPropertyOptions(i), l = typeof r.converter == "function" ? { fromAttribute: r.converter } : ((n = r.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? r.converter : H;
202
- this._$Em = i, this[i] = l.fromAttribute(e, r.type), this._$Em = null;
186
+ const n = s.getPropertyOptions(i), o = typeof n.converter == "function" ? { fromAttribute: n.converter } : n.converter?.fromAttribute !== void 0 ? n.converter : T;
187
+ this._$Em = i;
188
+ const l = o.fromAttribute(e, n.type);
189
+ this[i] = l ?? this._$Ej?.get(i) ?? l, this._$Em = null;
203
190
  }
204
191
  }
205
192
  requestUpdate(t, e, s) {
206
193
  if (t !== void 0) {
207
- if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? j)(this[t], e)) return;
208
- this.P(t, e, s);
194
+ const i = this.constructor, n = this[t];
195
+ if (s ??= i.getPropertyOptions(t), !((s.hasChanged ?? V)(n, e) || s.useDefault && s.reflect && n === this._$Ej?.get(t) && !this.hasAttribute(i._$Eu(t, s)))) return;
196
+ this.C(t, e, s);
209
197
  }
210
- this.isUpdatePending === !1 && (this._$ES = this._$ET());
198
+ this.isUpdatePending === !1 && (this._$ES = this._$EP());
211
199
  }
212
- P(t, e, s) {
213
- this._$AL.has(t) || this._$AL.set(t, e), s.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
200
+ C(t, e, { useDefault: s, reflect: i, wrapped: n }, o) {
201
+ s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, o ?? e ?? this[t]), n !== !0 || o !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), i === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
214
202
  }
215
- async _$ET() {
203
+ async _$EP() {
216
204
  this.isUpdatePending = !0;
217
205
  try {
218
206
  await this._$ES;
@@ -226,38 +214,33 @@ class S extends HTMLElement {
226
214
  return this.performUpdate();
227
215
  }
228
216
  performUpdate() {
229
- var s;
230
217
  if (!this.isUpdatePending) return;
231
218
  if (!this.hasUpdated) {
232
- if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
233
- for (const [n, r] of this._$Ep) this[n] = r;
219
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
220
+ for (const [i, n] of this._$Ep) this[i] = n;
234
221
  this._$Ep = void 0;
235
222
  }
236
- const i = this.constructor.elementProperties;
237
- if (i.size > 0) for (const [n, r] of i) r.wrapped !== !0 || this._$AL.has(n) || this[n] === void 0 || this.P(n, this[n], r);
223
+ const s = this.constructor.elementProperties;
224
+ if (s.size > 0) for (const [i, n] of s) {
225
+ const { wrapped: o } = n, l = this[i];
226
+ o !== !0 || this._$AL.has(i) || l === void 0 || this.C(i, void 0, n, l);
227
+ }
238
228
  }
239
229
  let t = !1;
240
230
  const e = this._$AL;
241
231
  try {
242
- t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach((i) => {
243
- var n;
244
- return (n = i.hostUpdate) == null ? void 0 : n.call(i);
245
- }), this.update(e)) : this._$EU();
246
- } catch (i) {
247
- throw t = !1, this._$EU(), i;
232
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach(((s) => s.hostUpdate?.())), this.update(e)) : this._$EM();
233
+ } catch (s) {
234
+ throw t = !1, this._$EM(), s;
248
235
  }
249
236
  t && this._$AE(e);
250
237
  }
251
238
  willUpdate(t) {
252
239
  }
253
240
  _$AE(t) {
254
- var e;
255
- (e = this._$EO) == null || e.forEach((s) => {
256
- var i;
257
- return (i = s.hostUpdated) == null ? void 0 : i.call(s);
258
- }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
241
+ this._$EO?.forEach(((e) => e.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
259
242
  }
260
- _$EU() {
243
+ _$EM() {
261
244
  this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
262
245
  }
263
246
  get updateComplete() {
@@ -270,55 +253,55 @@ class S extends HTMLElement {
270
253
  return !0;
271
254
  }
272
255
  update(t) {
273
- this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EC(e, this[e]))), this._$EU();
256
+ this._$Eq &&= this._$Eq.forEach(((e) => this._$ET(e, this[e]))), this._$EM();
274
257
  }
275
258
  updated(t) {
276
259
  }
277
260
  firstUpdated(t) {
278
261
  }
279
262
  }
280
- S.elementStyles = [], S.shadowRootOptions = { mode: "open" }, S[M("elementProperties")] = /* @__PURE__ */ new Map(), S[M("finalized")] = /* @__PURE__ */ new Map(), V == null || V({ ReactiveElement: S }), (m.reactiveElementVersions ?? (m.reactiveElementVersions = [])).push("2.0.4");
263
+ E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[P("elementProperties")] = /* @__PURE__ */ new Map(), E[P("finalized")] = /* @__PURE__ */ new Map(), bt?.({ ReactiveElement: E }), (I.reactiveElementVersions ??= []).push("2.1.1");
281
264
  /**
282
265
  * @license
283
266
  * Copyright 2017 Google LLC
284
267
  * SPDX-License-Identifier: BSD-3-Clause
285
268
  */
286
- const mt = { attribute: !0, type: String, converter: H, reflect: !1, hasChanged: j }, $t = (o = mt, t, e) => {
269
+ const gt = { attribute: !0, type: String, converter: T, reflect: !1, hasChanged: V }, $t = (r = gt, t, e) => {
287
270
  const { kind: s, metadata: i } = e;
288
271
  let n = globalThis.litPropertyMetadata.get(i);
289
- if (n === void 0 && globalThis.litPropertyMetadata.set(i, n = /* @__PURE__ */ new Map()), n.set(e.name, o), s === "accessor") {
290
- const { name: r } = e;
272
+ if (n === void 0 && globalThis.litPropertyMetadata.set(i, n = /* @__PURE__ */ new Map()), s === "setter" && ((r = Object.create(r)).wrapped = !0), n.set(e.name, r), s === "accessor") {
273
+ const { name: o } = e;
291
274
  return { set(l) {
292
275
  const a = t.get.call(this);
293
- t.set.call(this, l), this.requestUpdate(r, a, o);
276
+ t.set.call(this, l), this.requestUpdate(o, a, r);
294
277
  }, init(l) {
295
- return l !== void 0 && this.P(r, void 0, o), l;
278
+ return l !== void 0 && this.C(o, void 0, r, l), l;
296
279
  } };
297
280
  }
298
281
  if (s === "setter") {
299
- const { name: r } = e;
282
+ const { name: o } = e;
300
283
  return function(l) {
301
- const a = this[r];
302
- t.call(this, l), this.requestUpdate(r, a, o);
284
+ const a = this[o];
285
+ t.call(this, l), this.requestUpdate(o, a, r);
303
286
  };
304
287
  }
305
288
  throw Error("Unsupported decorator location: " + s);
306
289
  };
307
- function u(o) {
308
- return (t, e) => typeof e == "object" ? $t(o, t, e) : ((s, i, n) => {
309
- const r = i.hasOwnProperty(n);
310
- return i.constructor.createProperty(n, r ? { ...s, wrapped: !0 } : s), r ? Object.getOwnPropertyDescriptor(i, n) : void 0;
311
- })(o, t, e);
290
+ function u(r) {
291
+ return (t, e) => typeof e == "object" ? $t(r, t, e) : ((s, i, n) => {
292
+ const o = i.hasOwnProperty(n);
293
+ return i.constructor.createProperty(n, s), o ? Object.getOwnPropertyDescriptor(i, n) : void 0;
294
+ })(r, t, e);
312
295
  }
313
296
  /**
314
297
  * @license
315
298
  * Copyright 2017 Google LLC
316
299
  * SPDX-License-Identifier: BSD-3-Clause
317
300
  */
318
- function xt(o) {
319
- return u({ ...o, state: !0, attribute: !1 });
301
+ function mt(r) {
302
+ return u({ ...r, state: !0, attribute: !1 });
320
303
  }
321
- const wt = lt`
304
+ const xt = ot`
322
305
  :host {
323
306
  /* Anything that can be overridden should be defined here */
324
307
 
@@ -562,50 +545,50 @@ const wt = lt`
562
545
  * Copyright 2017 Google LLC
563
546
  * SPDX-License-Identifier: BSD-3-Clause
564
547
  */
565
- const C = globalThis, I = C.trustedTypes, Z = I ? I.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, nt = "$lit$", g = `lit$${Math.random().toFixed(9).slice(2)}$`, rt = "?" + g, At = `<${rt}>`, A = document, N = () => A.createComment(""), U = (o) => o === null || typeof o != "object" && typeof o != "function", W = Array.isArray, Et = (o) => W(o) || typeof (o == null ? void 0 : o[Symbol.iterator]) == "function", q = `[
566
- \f\r]`, P = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Q = /-->/g, X = />/g, $ = RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^
567
- \f\r"'\`<>=]|("|')|))|$)`, "g"), tt = /'/g, et = /"/g, ot = /^(?:script|style|textarea|title)$/i, k = Symbol.for("lit-noChange"), y = Symbol.for("lit-nothing"), st = /* @__PURE__ */ new WeakMap(), w = A.createTreeWalker(A, 129);
568
- function at(o, t) {
569
- if (!W(o) || !o.hasOwnProperty("raw")) throw Error("invalid template strings array");
570
- return Z !== void 0 ? Z.createHTML(t) : t;
548
+ const z = globalThis, R = z.trustedTypes, J = R ? R.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, st = "$lit$", g = `lit$${Math.random().toFixed(9).slice(2)}$`, it = "?" + g, wt = `<${it}>`, w = document, H = () => w.createComment(""), M = (r) => r === null || typeof r != "object" && typeof r != "function", D = Array.isArray, At = (r) => D(r) || typeof r?.[Symbol.iterator] == "function", B = `[
549
+ \f\r]`, S = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, K = /-->/g, Z = />/g, $ = RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^
550
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Q = /'/g, X = /"/g, nt = /^(?:script|style|textarea|title)$/i, C = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), tt = /* @__PURE__ */ new WeakMap(), x = w.createTreeWalker(w, 129);
551
+ function rt(r, t) {
552
+ if (!D(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
553
+ return J !== void 0 ? J.createHTML(t) : t;
571
554
  }
572
- const St = (o, t) => {
573
- const e = o.length - 1, s = [];
574
- let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", r = P;
555
+ const Et = (r, t) => {
556
+ const e = r.length - 1, s = [];
557
+ let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = S;
575
558
  for (let l = 0; l < e; l++) {
576
- const a = o[l];
577
- let p, _, h = -1, v = 0;
578
- for (; v < a.length && (r.lastIndex = v, _ = r.exec(a), _ !== null); ) v = r.lastIndex, r === P ? _[1] === "!--" ? r = Q : _[1] !== void 0 ? r = X : _[2] !== void 0 ? (ot.test(_[2]) && (i = RegExp("</" + _[2], "g")), r = $) : _[3] !== void 0 && (r = $) : r === $ ? _[0] === ">" ? (r = i ?? P, h = -1) : _[1] === void 0 ? h = -2 : (h = r.lastIndex - _[2].length, p = _[1], r = _[3] === void 0 ? $ : _[3] === '"' ? et : tt) : r === et || r === tt ? r = $ : r === Q || r === X ? r = P : (r = $, i = void 0);
579
- const b = r === $ && o[l + 1].startsWith("/>") ? " " : "";
580
- n += r === P ? a + At : h >= 0 ? (s.push(p), a.slice(0, h) + nt + a.slice(h) + g + b) : a + g + (h === -2 ? l : b);
559
+ const a = r[l];
560
+ let y, _, h = -1, v = 0;
561
+ for (; v < a.length && (o.lastIndex = v, _ = o.exec(a), _ !== null); ) v = o.lastIndex, o === S ? _[1] === "!--" ? o = K : _[1] !== void 0 ? o = Z : _[2] !== void 0 ? (nt.test(_[2]) && (i = RegExp("</" + _[2], "g")), o = $) : _[3] !== void 0 && (o = $) : o === $ ? _[0] === ">" ? (o = i ?? S, h = -1) : _[1] === void 0 ? h = -2 : (h = o.lastIndex - _[2].length, y = _[1], o = _[3] === void 0 ? $ : _[3] === '"' ? X : Q) : o === X || o === Q ? o = $ : o === K || o === Z ? o = S : (o = $, i = void 0);
562
+ const b = o === $ && r[l + 1].startsWith("/>") ? " " : "";
563
+ n += o === S ? a + wt : h >= 0 ? (s.push(y), a.slice(0, h) + st + a.slice(h) + g + b) : a + g + (h === -2 ? l : b);
581
564
  }
582
- return [at(o, n + (o[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
565
+ return [rt(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
583
566
  };
584
- class T {
567
+ class k {
585
568
  constructor({ strings: t, _$litType$: e }, s) {
586
569
  let i;
587
570
  this.parts = [];
588
- let n = 0, r = 0;
589
- const l = t.length - 1, a = this.parts, [p, _] = St(t, e);
590
- if (this.el = T.createElement(p, s), w.currentNode = this.el.content, e === 2 || e === 3) {
571
+ let n = 0, o = 0;
572
+ const l = t.length - 1, a = this.parts, [y, _] = Et(t, e);
573
+ if (this.el = k.createElement(y, s), x.currentNode = this.el.content, e === 2 || e === 3) {
591
574
  const h = this.el.content.firstChild;
592
575
  h.replaceWith(...h.childNodes);
593
576
  }
594
- for (; (i = w.nextNode()) !== null && a.length < l; ) {
577
+ for (; (i = x.nextNode()) !== null && a.length < l; ) {
595
578
  if (i.nodeType === 1) {
596
- if (i.hasAttributes()) for (const h of i.getAttributeNames()) if (h.endsWith(nt)) {
597
- const v = _[r++], b = i.getAttribute(h).split(g), O = /([.?@])?(.*)/.exec(v);
598
- a.push({ type: 1, index: n, name: O[2], strings: b, ctor: O[1] === "." ? Mt : O[1] === "?" ? Ct : O[1] === "@" ? Ut : L }), i.removeAttribute(h);
579
+ if (i.hasAttributes()) for (const h of i.getAttributeNames()) if (h.endsWith(st)) {
580
+ const v = _[o++], b = i.getAttribute(h).split(g), U = /([.?@])?(.*)/.exec(v);
581
+ a.push({ type: 1, index: n, name: U[2], strings: b, ctor: U[1] === "." ? Pt : U[1] === "?" ? Mt : U[1] === "@" ? Ct : q }), i.removeAttribute(h);
599
582
  } else h.startsWith(g) && (a.push({ type: 6, index: n }), i.removeAttribute(h));
600
- if (ot.test(i.tagName)) {
583
+ if (nt.test(i.tagName)) {
601
584
  const h = i.textContent.split(g), v = h.length - 1;
602
585
  if (v > 0) {
603
- i.textContent = I ? I.emptyScript : "";
604
- for (let b = 0; b < v; b++) i.append(h[b], N()), w.nextNode(), a.push({ type: 2, index: ++n });
605
- i.append(h[v], N());
586
+ i.textContent = R ? R.emptyScript : "";
587
+ for (let b = 0; b < v; b++) i.append(h[b], H()), x.nextNode(), a.push({ type: 2, index: ++n });
588
+ i.append(h[v], H());
606
589
  }
607
590
  }
608
- } else if (i.nodeType === 8) if (i.data === rt) a.push({ type: 2, index: n });
591
+ } else if (i.nodeType === 8) if (i.data === it) a.push({ type: 2, index: n });
609
592
  else {
610
593
  let h = -1;
611
594
  for (; (h = i.data.indexOf(g, h + 1)) !== -1; ) a.push({ type: 7, index: n }), h += g.length - 1;
@@ -614,18 +597,17 @@ class T {
614
597
  }
615
598
  }
616
599
  static createElement(t, e) {
617
- const s = A.createElement("template");
600
+ const s = w.createElement("template");
618
601
  return s.innerHTML = t, s;
619
602
  }
620
603
  }
621
- function E(o, t, e = o, s) {
622
- var r, l;
623
- if (t === k) return t;
624
- let i = s !== void 0 ? (r = e._$Co) == null ? void 0 : r[s] : e._$Cl;
625
- const n = U(t) ? void 0 : t._$litDirective$;
626
- return (i == null ? void 0 : i.constructor) !== n && ((l = i == null ? void 0 : i._$AO) == null || l.call(i, !1), n === void 0 ? i = void 0 : (i = new n(o), i._$AT(o, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = i : e._$Cl = i), i !== void 0 && (t = E(o, i._$AS(o, t.values), i, s)), t;
604
+ function A(r, t, e = r, s) {
605
+ if (t === C) return t;
606
+ let i = s !== void 0 ? e._$Co?.[s] : e._$Cl;
607
+ const n = M(t) ? void 0 : t._$litDirective$;
608
+ return i?.constructor !== n && (i?._$AO?.(!1), n === void 0 ? i = void 0 : (i = new n(r), i._$AT(r, e, s)), s !== void 0 ? (e._$Co ??= [])[s] = i : e._$Cl = i), i !== void 0 && (t = A(r, i._$AS(r, t.values), i, s)), t;
627
609
  }
628
- class Pt {
610
+ class St {
629
611
  constructor(t, e) {
630
612
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
631
613
  }
@@ -636,35 +618,34 @@ class Pt {
636
618
  return this._$AM._$AU;
637
619
  }
638
620
  u(t) {
639
- const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? A).importNode(e, !0);
640
- w.currentNode = i;
641
- let n = w.nextNode(), r = 0, l = 0, a = s[0];
621
+ const { el: { content: e }, parts: s } = this._$AD, i = (t?.creationScope ?? w).importNode(e, !0);
622
+ x.currentNode = i;
623
+ let n = x.nextNode(), o = 0, l = 0, a = s[0];
642
624
  for (; a !== void 0; ) {
643
- if (r === a.index) {
644
- let p;
645
- a.type === 2 ? p = new B(n, n.nextSibling, this, t) : a.type === 1 ? p = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (p = new kt(n, this, t)), this._$AV.push(p), a = s[++l];
625
+ if (o === a.index) {
626
+ let y;
627
+ a.type === 2 ? y = new N(n, n.nextSibling, this, t) : a.type === 1 ? y = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (y = new kt(n, this, t)), this._$AV.push(y), a = s[++l];
646
628
  }
647
- r !== (a == null ? void 0 : a.index) && (n = w.nextNode(), r++);
629
+ o !== a?.index && (n = x.nextNode(), o++);
648
630
  }
649
- return w.currentNode = A, i;
631
+ return x.currentNode = w, i;
650
632
  }
651
633
  p(t) {
652
634
  let e = 0;
653
635
  for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
654
636
  }
655
637
  }
656
- class B {
638
+ class N {
657
639
  get _$AU() {
658
- var t;
659
- return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
640
+ return this._$AM?._$AU ?? this._$Cv;
660
641
  }
661
642
  constructor(t, e, s, i) {
662
- this.type = 2, this._$AH = y, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
643
+ this.type = 2, this._$AH = p, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = i?.isConnected ?? !0;
663
644
  }
664
645
  get parentNode() {
665
646
  let t = this._$AA.parentNode;
666
647
  const e = this._$AM;
667
- return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
648
+ return e !== void 0 && t?.nodeType === 11 && (t = e.parentNode), t;
668
649
  }
669
650
  get startNode() {
670
651
  return this._$AA;
@@ -673,7 +654,7 @@ class B {
673
654
  return this._$AB;
674
655
  }
675
656
  _$AI(t, e = this) {
676
- t = E(this, t, e), U(t) ? t === y || t == null || t === "" ? (this._$AH !== y && this._$AR(), this._$AH = y) : t !== this._$AH && t !== k && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Et(t) ? this.k(t) : this._(t);
657
+ t = A(this, t, e), M(t) ? t === p || t == null || t === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : t !== this._$AH && t !== C && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : At(t) ? this.k(t) : this._(t);
677
658
  }
678
659
  O(t) {
679
660
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -682,41 +663,38 @@ class B {
682
663
  this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
683
664
  }
684
665
  _(t) {
685
- this._$AH !== y && U(this._$AH) ? this._$AA.nextSibling.data = t : this.T(A.createTextNode(t)), this._$AH = t;
666
+ this._$AH !== p && M(this._$AH) ? this._$AA.nextSibling.data = t : this.T(w.createTextNode(t)), this._$AH = t;
686
667
  }
687
668
  $(t) {
688
- var n;
689
- const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = T.createElement(at(s.h, s.h[0]), this.options)), s);
690
- if (((n = this._$AH) == null ? void 0 : n._$AD) === i) this._$AH.p(e);
669
+ const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = k.createElement(rt(s.h, s.h[0]), this.options)), s);
670
+ if (this._$AH?._$AD === i) this._$AH.p(e);
691
671
  else {
692
- const r = new Pt(i, this), l = r.u(this.options);
693
- r.p(e), this.T(l), this._$AH = r;
672
+ const n = new St(i, this), o = n.u(this.options);
673
+ n.p(e), this.T(o), this._$AH = n;
694
674
  }
695
675
  }
696
676
  _$AC(t) {
697
- let e = st.get(t.strings);
698
- return e === void 0 && st.set(t.strings, e = new T(t)), e;
677
+ let e = tt.get(t.strings);
678
+ return e === void 0 && tt.set(t.strings, e = new k(t)), e;
699
679
  }
700
680
  k(t) {
701
- W(this._$AH) || (this._$AH = [], this._$AR());
681
+ D(this._$AH) || (this._$AH = [], this._$AR());
702
682
  const e = this._$AH;
703
683
  let s, i = 0;
704
- for (const n of t) i === e.length ? e.push(s = new B(this.O(N()), this.O(N()), this, this.options)) : s = e[i], s._$AI(n), i++;
684
+ for (const n of t) i === e.length ? e.push(s = new N(this.O(H()), this.O(H()), this, this.options)) : s = e[i], s._$AI(n), i++;
705
685
  i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
706
686
  }
707
687
  _$AR(t = this._$AA.nextSibling, e) {
708
- var s;
709
- for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t && t !== this._$AB; ) {
710
- const i = t.nextSibling;
711
- t.remove(), t = i;
688
+ for (this._$AP?.(!1, !0, e); t !== this._$AB; ) {
689
+ const s = t.nextSibling;
690
+ t.remove(), t = s;
712
691
  }
713
692
  }
714
693
  setConnected(t) {
715
- var e;
716
- this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
694
+ this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
717
695
  }
718
696
  }
719
- class L {
697
+ class q {
720
698
  get tagName() {
721
699
  return this.element.tagName;
722
700
  }
@@ -724,51 +702,50 @@ class L {
724
702
  return this._$AM._$AU;
725
703
  }
726
704
  constructor(t, e, s, i, n) {
727
- this.type = 1, this._$AH = y, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = n, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = y;
705
+ this.type = 1, this._$AH = p, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = n, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = p;
728
706
  }
729
707
  _$AI(t, e = this, s, i) {
730
708
  const n = this.strings;
731
- let r = !1;
732
- if (n === void 0) t = E(this, t, e, 0), r = !U(t) || t !== this._$AH && t !== k, r && (this._$AH = t);
709
+ let o = !1;
710
+ if (n === void 0) t = A(this, t, e, 0), o = !M(t) || t !== this._$AH && t !== C, o && (this._$AH = t);
733
711
  else {
734
712
  const l = t;
735
- let a, p;
736
- for (t = n[0], a = 0; a < n.length - 1; a++) p = E(this, l[s + a], e, a), p === k && (p = this._$AH[a]), r || (r = !U(p) || p !== this._$AH[a]), p === y ? t = y : t !== y && (t += (p ?? "") + n[a + 1]), this._$AH[a] = p;
713
+ let a, y;
714
+ for (t = n[0], a = 0; a < n.length - 1; a++) y = A(this, l[s + a], e, a), y === C && (y = this._$AH[a]), o ||= !M(y) || y !== this._$AH[a], y === p ? t = p : t !== p && (t += (y ?? "") + n[a + 1]), this._$AH[a] = y;
737
715
  }
738
- r && !i && this.j(t);
716
+ o && !i && this.j(t);
739
717
  }
740
718
  j(t) {
741
- t === y ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
719
+ t === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
742
720
  }
743
721
  }
744
- class Mt extends L {
722
+ class Pt extends q {
745
723
  constructor() {
746
724
  super(...arguments), this.type = 3;
747
725
  }
748
726
  j(t) {
749
- this.element[this.name] = t === y ? void 0 : t;
727
+ this.element[this.name] = t === p ? void 0 : t;
750
728
  }
751
729
  }
752
- class Ct extends L {
730
+ class Mt extends q {
753
731
  constructor() {
754
732
  super(...arguments), this.type = 4;
755
733
  }
756
734
  j(t) {
757
- this.element.toggleAttribute(this.name, !!t && t !== y);
735
+ this.element.toggleAttribute(this.name, !!t && t !== p);
758
736
  }
759
737
  }
760
- class Ut extends L {
738
+ class Ct extends q {
761
739
  constructor(t, e, s, i, n) {
762
740
  super(t, e, s, i, n), this.type = 5;
763
741
  }
764
742
  _$AI(t, e = this) {
765
- if ((t = E(this, t, e, 0) ?? y) === k) return;
766
- const s = this._$AH, i = t === y && s !== y || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== y && (s === y || i);
743
+ if ((t = A(this, t, e, 0) ?? p) === C) return;
744
+ const s = this._$AH, i = t === p && s !== p || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== p && (s === p || i);
767
745
  i && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
768
746
  }
769
747
  handleEvent(t) {
770
- var e;
771
- typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
748
+ typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
772
749
  }
773
750
  }
774
751
  class kt {
@@ -779,28 +756,28 @@ class kt {
779
756
  return this._$AM._$AU;
780
757
  }
781
758
  _$AI(t) {
782
- E(this, t);
759
+ A(this, t);
783
760
  }
784
761
  }
785
- const z = C.litHtmlPolyfillSupport;
786
- z == null || z(T, B), (C.litHtmlVersions ?? (C.litHtmlVersions = [])).push("3.2.1");
762
+ const Ut = z.litHtmlPolyfillSupport;
763
+ Ut?.(k, N), (z.litHtmlVersions ??= []).push("3.3.1");
787
764
  /**
788
765
  * @license
789
766
  * Copyright 2018 Google LLC
790
767
  * SPDX-License-Identifier: BSD-3-Clause
791
768
  */
792
- const x = (o) => o ?? y;
793
- var Tt = Object.defineProperty, Ot = Object.getOwnPropertyDescriptor, c = (o, t, e, s) => {
794
- for (var i = s > 1 ? void 0 : s ? Ot(t, e) : t, n = o.length - 1, r; n >= 0; n--)
795
- (r = o[n]) && (i = (s ? r(t, e, i) : r(i)) || i);
796
- return s && i && Tt(t, e, i), i;
769
+ const m = (r) => r ?? p;
770
+ var Ot = Object.defineProperty, Tt = Object.getOwnPropertyDescriptor, c = (r, t, e, s) => {
771
+ for (var i = s > 1 ? void 0 : s ? Tt(t, e) : t, n = r.length - 1, o; n >= 0; n--)
772
+ (o = r[n]) && (i = (s ? o(t, e, i) : o(i)) || i);
773
+ return s && i && Ot(t, e, i), i;
797
774
  };
798
775
  let Rt = 0;
799
776
  var f;
800
- const d = (f = class extends ht {
777
+ const d = (f = class extends at {
801
778
  // allows use of elementInternals' API
802
779
  constructor() {
803
- super(), this.id = "", this.name = "", this._type = "text", this.label = "", this.description = "", this.placeholder = "", this.value = "", this.disabled = !1, this.readonly = !1, this.required = !1, this.optional = !1, this._tooltip = "", this.form = null, this.pattern = "", this.maxlength = null, this.width = "full", this.step = null, this.min = null, this.max = null, this.invert = !1, this.showError = !1, this.errorMessage = "", this.showPassword = !1, this._originalErrorMessage = "", this._hasUserInteracted = !1, this._maskPatterns = {
780
+ super(), this.id = "", this.name = "", this._type = "text", this.label = "", this.description = "", this.placeholder = "", this.value = "", this.disabled = !1, this.readonly = !1, this.required = !1, this.optional = !1, this._tooltip = "", this.form = null, this.pattern = "", this.maxlength = null, this.width = "full", this.step = null, this.min = null, this.max = null, this.inverted = !1, this.showError = !1, this.errorMessage = "", this.showPassword = !1, this._originalErrorMessage = "", this._hasUserInteracted = !1, this._maskPatterns = {
804
781
  tel: "(___) ___-____"
805
782
  }, this._internals = this.attachInternals();
806
783
  }
@@ -824,18 +801,17 @@ const d = (f = class extends ht {
824
801
  }
825
802
  // Ensure the "width" property is valid after updates
826
803
  async updated(t) {
827
- var e, s;
828
804
  if (t.has("width") && (await Promise.resolve(), this.width = f.VALID_WIDTHS.includes(this.width) ? this.width : "full"), t.has("disabled") && (this._validateButtonSlot("startButton"), this._validateButtonSlot("endButton")), t.has("type")) {
829
- const i = this._maskPatterns[this.type], n = (e = this.shadowRoot) == null ? void 0 : e.querySelector("input");
830
- if (n)
831
- if (i)
832
- n.maxLength = i.length, this._updateOverlay(n.value, i);
805
+ const e = this._maskPatterns[this.type], s = this.shadowRoot?.querySelector("input");
806
+ if (s)
807
+ if (e)
808
+ s.maxLength = e.length, this._updateOverlay(s.value, e);
833
809
  else {
834
- n.removeAttribute("maxLength");
835
- const r = (s = this.shadowRoot) == null ? void 0 : s.querySelector(
810
+ s.removeAttribute("maxLength");
811
+ const i = this.shadowRoot?.querySelector(
836
812
  ".nys-textinput__mask-overlay"
837
813
  );
838
- r && (r.textContent = "");
814
+ i && (i.textContent = "");
839
815
  }
840
816
  }
841
817
  }
@@ -848,23 +824,20 @@ const d = (f = class extends ht {
848
824
  this._internals.setFormValue(this.value), this._manageRequire();
849
825
  }
850
826
  _manageRequire() {
851
- var i, n;
852
- const t = (i = this.shadowRoot) == null ? void 0 : i.querySelector("input");
827
+ const t = this.shadowRoot?.querySelector("input");
853
828
  if (!t) return;
854
829
  const e = this.errorMessage || "This field is required";
855
- this.required && (!this.value || ((n = this.value) == null ? void 0 : n.trim()) === "") ? (this._internals.ariaRequired = "true", this._internals.setValidity({ valueMissing: !0 }, e, t)) : (this._internals.ariaRequired = "false", this._internals.setValidity({}), this._hasUserInteracted = !1);
830
+ this.required && (!this.value || this.value?.trim() === "") ? (this._internals.ariaRequired = "true", this._internals.setValidity({ valueMissing: !0 }, e, t)) : (this._internals.ariaRequired = "false", this._internals.setValidity({}), this._hasUserInteracted = !1);
856
831
  }
857
832
  _setValidityMessage(t = "") {
858
- var i, n;
859
- const e = (i = this.shadowRoot) == null ? void 0 : i.querySelector("input");
833
+ const e = this.shadowRoot?.querySelector("input");
860
834
  if (!e) return;
861
- this.showError = !!t, (n = this._originalErrorMessage) != null && n.trim() && t !== "" ? this.errorMessage = this._originalErrorMessage : this.errorMessage = t;
835
+ this.showError = !!t, this._originalErrorMessage?.trim() && t !== "" ? this.errorMessage = this._originalErrorMessage : this.errorMessage = t;
862
836
  const s = t ? { customError: !0 } : {};
863
837
  this._internals.setValidity(s, this.errorMessage, e);
864
838
  }
865
839
  _validate() {
866
- var i;
867
- const t = (i = this.shadowRoot) == null ? void 0 : i.querySelector("input");
840
+ const t = this.shadowRoot?.querySelector("input");
868
841
  if (!t) return;
869
842
  const e = t.validity;
870
843
  let s = "";
@@ -873,18 +846,16 @@ const d = (f = class extends ht {
873
846
  /********************** Functions **********************/
874
847
  // This helper function is called to perform the element's native validation.
875
848
  checkValidity() {
876
- var e;
877
- const t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("input");
849
+ const t = this.shadowRoot?.querySelector("input");
878
850
  return t ? t.checkValidity() : !0;
879
851
  }
880
852
  _handleInvalid(t) {
881
- var s;
882
853
  t.preventDefault(), this._hasUserInteracted = !0, this._validate();
883
- const e = (s = this.shadowRoot) == null ? void 0 : s.querySelector("input");
854
+ const e = this.shadowRoot?.querySelector("input");
884
855
  if (e) {
885
- const i = this._internals.form;
886
- i ? Array.from(i.elements).find(
887
- (l) => typeof l.checkValidity == "function" && !l.checkValidity()
856
+ const s = this._internals.form;
857
+ s ? Array.from(s.elements).find(
858
+ (o) => typeof o.checkValidity == "function" && !o.checkValidity()
888
859
  ) === this && e.focus() : e.focus();
889
860
  }
890
861
  }
@@ -892,8 +863,7 @@ const d = (f = class extends ht {
892
863
  this.showPassword = !this.showPassword;
893
864
  }
894
865
  _updateOverlay(t, e) {
895
- var r;
896
- const s = (r = this.shadowRoot) == null ? void 0 : r.querySelector(
866
+ const s = this.shadowRoot?.querySelector(
897
867
  ".nys-textinput__mask-overlay"
898
868
  );
899
869
  if (!s) return;
@@ -906,14 +876,14 @@ const d = (f = class extends ht {
906
876
  if (this.type === "tel")
907
877
  return s.length > 0 && (i = "(" + s.substring(0, 3)), s.length >= 4 && (i += ") " + s.substring(3, 6)), s.length > 6 && (i += "-" + s.substring(6, 10)), i;
908
878
  let n = 0;
909
- for (let r = 0; r < e.length; r++)
910
- if (e[r] === "_" || e[r].match(/[d9]/i))
879
+ for (let o = 0; o < e.length; o++)
880
+ if (e[o] === "_" || e[o].match(/[d9]/i))
911
881
  if (n < s.length)
912
882
  i += s[n++];
913
883
  else
914
884
  break;
915
885
  else
916
- i += e[r];
886
+ i += e[o];
917
887
  return i;
918
888
  }
919
889
  /******************** Event Handlers ********************/
@@ -939,24 +909,23 @@ const d = (f = class extends ht {
939
909
  this._hasUserInteracted || (this._hasUserInteracted = !0), this._validate(), this.dispatchEvent(new Event("nys-blur"));
940
910
  }
941
911
  _validateButtonSlot(t) {
942
- var r, l;
943
- const e = (r = this.shadowRoot) == null ? void 0 : r.querySelector(
912
+ const e = this.shadowRoot?.querySelector(
944
913
  'slot[name="' + t + '"]'
945
- ), s = (l = this.shadowRoot) == null ? void 0 : l.querySelector(
914
+ ), s = this.shadowRoot?.querySelector(
946
915
  ".nys-textinput__buttoncontainer"
947
916
  );
948
917
  if (!e || !s) return;
949
918
  const i = e.assignedElements();
950
919
  let n = !1;
951
- i.forEach((a) => {
952
- a instanceof HTMLElement && a.tagName.toLowerCase() === "nys-button" && !n ? (n = !0, a.setAttribute("size", "sm"), a.setAttribute("variant", "primary"), this.disabled ? a.setAttribute("disabled", "true") : a.removeAttribute("disabled")) : (console.warn(
920
+ i.forEach((o) => {
921
+ o instanceof HTMLElement && o.tagName.toLowerCase() === "nys-button" && !n ? (n = !0, o.setAttribute("size", "sm"), o.setAttribute("variant", "primary"), this.disabled ? o.setAttribute("disabled", "true") : o.removeAttribute("disabled")) : (console.warn(
953
922
  "The '" + t + "' slot only accepts a single <nys-button> element. Removing invalid or extra node:",
954
- a
955
- ), a.remove());
923
+ o
924
+ ), o.remove());
956
925
  }), t === "startButton" ? s.classList.toggle("has-start-button", n) : t === "endButton" && s.classList.toggle("has-end-button", n);
957
926
  }
958
927
  render() {
959
- return F`
928
+ return j`
960
929
  <div class="nys-textinput">
961
930
  <nys-label
962
931
  for=${this.id}
@@ -964,7 +933,7 @@ const d = (f = class extends ht {
964
933
  description=${this.description}
965
934
  flag=${this.required ? "required" : this.optional ? "optional" : ""}
966
935
  _tooltip=${this._tooltip}
967
- ?invert=${this.invert}
936
+ ?inverted=${this.inverted}
968
937
  >
969
938
  <slot name="description" slot="description">${this.description}</slot>
970
939
  </nys-label>
@@ -987,29 +956,29 @@ const d = (f = class extends ht {
987
956
  aria-disabled="${this.disabled}"
988
957
  aria-label="${[this.label, this.description].filter(Boolean).join(" ")}"
989
958
  .value=${this.value}
990
- placeholder=${x(
959
+ placeholder=${m(
991
960
  this.placeholder ? this.placeholder : void 0
992
961
  )}
993
- pattern=${x(this.pattern ? this.pattern : void 0)}
994
- min=${x(this.min !== null ? this.min : void 0)}
995
- maxlength=${x(
962
+ pattern=${m(this.pattern ? this.pattern : void 0)}
963
+ min=${m(this.min !== null ? this.min : void 0)}
964
+ maxlength=${m(
996
965
  this.maxlength !== null ? this.maxlength : void 0
997
966
  )}
998
- step=${x(this.step !== null ? this.step : void 0)}
999
- max=${x(this.max !== null ? this.max : void 0)}
1000
- form=${x(this.form || void 0)}
967
+ step=${m(this.step !== null ? this.step : void 0)}
968
+ max=${m(this.max !== null ? this.max : void 0)}
969
+ form=${m(this.form || void 0)}
1001
970
  @input=${this._handleInput}
1002
971
  @focus="${this._handleFocus}"
1003
972
  @blur="${this._handleBlur}"
1004
973
  />
1005
- ${this.type === "password" ? F` <nys-button
974
+ ${this.type === "password" ? j` <nys-button
1006
975
  class="eye-icon"
1007
976
  id="password-toggle"
1008
977
  suffixIcon="slotted"
1009
978
  ariaLabel="password toggle"
1010
- .onClick=${() => !this.disabled && this._togglePasswordVisibility()}
1011
979
  variant="ghost"
1012
980
  size="sm"
981
+ @nys-click=${() => !this.disabled && this._togglePasswordVisibility()}
1013
982
  >
1014
983
  <nys-icon
1015
984
  slot="suffix-icon"
@@ -1038,7 +1007,7 @@ const d = (f = class extends ht {
1038
1007
  "tel",
1039
1008
  "text",
1040
1009
  "url"
1041
- ], f.VALID_WIDTHS = ["sm", "md", "lg", "full"], f.styles = wt, f.formAssociated = !0, f);
1010
+ ], f.VALID_WIDTHS = ["sm", "md", "lg", "full"], f.styles = xt, f.formAssociated = !0, f);
1042
1011
  c([
1043
1012
  u({ type: String })
1044
1013
  ], d.prototype, "id", 2);
@@ -1098,7 +1067,7 @@ c([
1098
1067
  ], d.prototype, "max", 2);
1099
1068
  c([
1100
1069
  u({ type: Boolean, reflect: !0 })
1101
- ], d.prototype, "invert", 2);
1070
+ ], d.prototype, "inverted", 2);
1102
1071
  c([
1103
1072
  u({ type: Boolean, reflect: !0 })
1104
1073
  ], d.prototype, "showError", 2);
@@ -1106,7 +1075,7 @@ c([
1106
1075
  u({ type: String })
1107
1076
  ], d.prototype, "errorMessage", 2);
1108
1077
  c([
1109
- xt()
1078
+ mt()
1110
1079
  ], d.prototype, "showPassword", 2);
1111
1080
  let Ht = d;
1112
1081
  customElements.get("nys-textinput") || customElements.define("nys-textinput", Ht);