@nysds/nys-radiobutton 1.10.1 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { css as bt, LitElement as nt, html as F } from "lit";
1
+ import { css as ut, LitElement as st, html as L } from "lit";
2
2
  /*!
3
3
  * ▒█▄░▒█ ▒█░░▒█ ▒█▀▀▀█ ▒█▀▀▄ ▒█▀▀▀█
4
4
  * ▒█▒█▒█ ▒█▄▄▄█ ░▀▀▀▄▄ ▒█░▒█ ░▀▀▀▄▄
@@ -14,18 +14,18 @@ import { css as bt, LitElement as nt, html as F } from "lit";
14
14
  * Copyright 2019 Google LLC
15
15
  * SPDX-License-Identifier: BSD-3-Clause
16
16
  */
17
- const O = globalThis, W = O.ShadowRoot && (O.ShadyCSS === void 0 || O.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, at = Symbol(), J = /* @__PURE__ */ new WeakMap();
18
- let yt = class {
17
+ const U = globalThis, j = U.ShadowRoot && (U.ShadyCSS === void 0 || U.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, rt = Symbol(), Z = /* @__PURE__ */ new WeakMap();
18
+ let pt = class {
19
19
  constructor(t, e, o) {
20
- if (this._$cssResult$ = !0, o !== at) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
20
+ if (this._$cssResult$ = !0, o !== rt) 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 (W && t === void 0) {
26
+ if (j && t === void 0) {
27
27
  const o = e !== void 0 && e.length === 1;
28
- o && (t = J.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), o && J.set(e, t));
28
+ o && (t = Z.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), o && Z.set(e, t));
29
29
  }
30
30
  return t;
31
31
  }
@@ -33,90 +33,88 @@ let yt = class {
33
33
  return this.cssText;
34
34
  }
35
35
  };
36
- const ft = (r) => new yt(typeof r == "string" ? r : r + "", void 0, at), _t = (r, t) => {
37
- if (W) r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
36
+ const bt = (s) => new pt(typeof s == "string" ? s : s + "", void 0, rt), yt = (s, t) => {
37
+ if (j) s.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
38
38
  else for (const e of t) {
39
- const o = document.createElement("style"), i = O.litNonce;
40
- i !== void 0 && o.setAttribute("nonce", i), o.textContent = e.cssText, r.appendChild(o);
39
+ const o = document.createElement("style"), i = U.litNonce;
40
+ i !== void 0 && o.setAttribute("nonce", i), o.textContent = e.cssText, s.appendChild(o);
41
41
  }
42
- }, Y = W ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
42
+ }, K = j ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
43
43
  let e = "";
44
44
  for (const o of t.cssRules) e += o.cssText;
45
- return ft(e);
46
- })(r) : r;
45
+ return bt(e);
46
+ })(s) : s;
47
47
  /**
48
48
  * @license
49
49
  * Copyright 2017 Google LLC
50
50
  * SPDX-License-Identifier: BSD-3-Clause
51
51
  */
52
- const { is: vt, defineProperty: gt, getOwnPropertyDescriptor: mt, getOwnPropertyNames: $t, getOwnPropertySymbols: At, getPrototypeOf: wt } = Object, w = globalThis, Q = w.trustedTypes, kt = Q ? Q.emptyScript : "", V = w.reactiveElementPolyfillSupport, P = (r, t) => r, H = { toAttribute(r, t) {
52
+ const { is: ft, defineProperty: _t, getOwnPropertyDescriptor: vt, getOwnPropertyNames: gt, getOwnPropertySymbols: mt, getPrototypeOf: $t } = Object, D = globalThis, J = D.trustedTypes, At = J ? J.emptyScript : "", wt = D.reactiveElementPolyfillSupport, R = (s, t) => s, T = { toAttribute(s, t) {
53
53
  switch (t) {
54
54
  case Boolean:
55
- r = r ? kt : null;
55
+ s = s ? At : null;
56
56
  break;
57
57
  case Object:
58
58
  case Array:
59
- r = r == null ? r : JSON.stringify(r);
59
+ s = s == null ? s : JSON.stringify(s);
60
60
  }
61
- return r;
62
- }, fromAttribute(r, t) {
63
- let e = r;
61
+ return s;
62
+ }, fromAttribute(s, t) {
63
+ let e = s;
64
64
  switch (t) {
65
65
  case Boolean:
66
- e = r !== null;
66
+ e = s !== null;
67
67
  break;
68
68
  case Number:
69
- e = r === null ? null : Number(r);
69
+ e = s === null ? null : Number(s);
70
70
  break;
71
71
  case Object:
72
72
  case Array:
73
73
  try {
74
- e = JSON.parse(r);
74
+ e = JSON.parse(s);
75
75
  } catch {
76
76
  e = null;
77
77
  }
78
78
  }
79
79
  return e;
80
- } }, Z = (r, t) => !vt(r, t), X = { attribute: !0, type: String, converter: H, reflect: !1, hasChanged: Z };
81
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), w.litPropertyMetadata ?? (w.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
82
- class C extends HTMLElement {
80
+ } }, G = (s, t) => !ft(s, t), Y = { attribute: !0, type: String, converter: T, reflect: !1, useDefault: !1, hasChanged: G };
81
+ Symbol.metadata ??= Symbol("metadata"), D.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
82
+ class x 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 = X) {
90
- if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
89
+ static createProperty(t, e = Y) {
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 o = Symbol(), i = this.getPropertyDescriptor(t, o, e);
92
- i !== void 0 && gt(this.prototype, t, i);
92
+ i !== void 0 && _t(this.prototype, t, i);
93
93
  }
94
94
  }
95
95
  static getPropertyDescriptor(t, e, o) {
96
- const { get: i, set: n } = mt(this.prototype, t) ?? { get() {
96
+ const { get: i, set: r } = vt(this.prototype, t) ?? { get() {
97
97
  return this[e];
98
- }, set(s) {
99
- this[e] = s;
98
+ }, set(n) {
99
+ this[e] = n;
100
100
  } };
101
- return { get() {
102
- return i == null ? void 0 : i.call(this);
103
- }, set(s) {
104
- const d = i == null ? void 0 : i.call(this);
105
- n.call(this, s), this.requestUpdate(t, d, o);
101
+ return { get: i, set(n) {
102
+ const d = i?.call(this);
103
+ r?.call(this, n), this.requestUpdate(t, d, o);
106
104
  }, configurable: !0, enumerable: !0 };
107
105
  }
108
106
  static getPropertyOptions(t) {
109
- return this.elementProperties.get(t) ?? X;
107
+ return this.elementProperties.get(t) ?? Y;
110
108
  }
111
109
  static _$Ei() {
112
- if (this.hasOwnProperty(P("elementProperties"))) return;
113
- const t = wt(this);
110
+ if (this.hasOwnProperty(R("elementProperties"))) return;
111
+ const t = $t(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(P("finalized"))) return;
118
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(P("properties"))) {
119
- const e = this.properties, o = [...$t(e), ...At(e)];
115
+ if (this.hasOwnProperty(R("finalized"))) return;
116
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(R("properties"))) {
117
+ const e = this.properties, o = [...gt(e), ...mt(e)];
120
118
  for (const i of o) this.createProperty(i, e[i]);
121
119
  }
122
120
  const t = this[Symbol.metadata];
@@ -135,8 +133,8 @@ class C extends HTMLElement {
135
133
  const e = [];
136
134
  if (Array.isArray(t)) {
137
135
  const o = new Set(t.flat(1 / 0).reverse());
138
- for (const i of o) e.unshift(Y(i));
139
- } else t !== void 0 && e.push(Y(t));
136
+ for (const i of o) e.unshift(K(i));
137
+ } else t !== void 0 && e.push(K(t));
140
138
  return e;
141
139
  }
142
140
  static _$Eu(t, e) {
@@ -147,16 +145,13 @@ class C 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 C extends HTMLElement {
165
160
  }
166
161
  createRenderRoot() {
167
162
  const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
168
- return _t(t, this.constructor.elementStyles), t;
163
+ return yt(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 o;
174
- return (o = e.hostConnected) == null ? void 0 : o.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 o;
183
- return (o = e.hostDisconnected) == null ? void 0 : o.call(e);
184
- });
171
+ this._$EO?.forEach(((t) => t.hostDisconnected?.()));
185
172
  }
186
173
  attributeChangedCallback(t, e, o) {
187
174
  this._$AK(t, o);
188
175
  }
189
- _$EC(t, e) {
190
- var n;
176
+ _$ET(t, e) {
191
177
  const o = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, o);
192
178
  if (i !== void 0 && o.reflect === !0) {
193
- const s = (((n = o.converter) == null ? void 0 : n.toAttribute) !== void 0 ? o.converter : H).toAttribute(e, o.type);
194
- this._$Em = t, s == null ? this.removeAttribute(i) : this.setAttribute(i, s), this._$Em = null;
179
+ const r = (o.converter?.toAttribute !== void 0 ? o.converter : T).toAttribute(e, o.type);
180
+ this._$Em = t, r == null ? this.removeAttribute(i) : this.setAttribute(i, r), this._$Em = null;
195
181
  }
196
182
  }
197
183
  _$AK(t, e) {
198
- var n;
199
184
  const o = this.constructor, i = o._$Eh.get(t);
200
185
  if (i !== void 0 && this._$Em !== i) {
201
- const s = o.getPropertyOptions(i), d = typeof s.converter == "function" ? { fromAttribute: s.converter } : ((n = s.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? s.converter : H;
202
- this._$Em = i, this[i] = d.fromAttribute(e, s.type), this._$Em = null;
186
+ const r = o.getPropertyOptions(i), n = typeof r.converter == "function" ? { fromAttribute: r.converter } : r.converter?.fromAttribute !== void 0 ? r.converter : T;
187
+ this._$Em = i;
188
+ const d = n.fromAttribute(e, r.type);
189
+ this[i] = d ?? this._$Ej?.get(i) ?? d, this._$Em = null;
203
190
  }
204
191
  }
205
192
  requestUpdate(t, e, o) {
206
193
  if (t !== void 0) {
207
- if (o ?? (o = this.constructor.getPropertyOptions(t)), !(o.hasChanged ?? Z)(this[t], e)) return;
208
- this.P(t, e, o);
194
+ const i = this.constructor, r = this[t];
195
+ if (o ??= i.getPropertyOptions(t), !((o.hasChanged ?? G)(r, e) || o.useDefault && o.reflect && r === this._$Ej?.get(t) && !this.hasAttribute(i._$Eu(t, o)))) return;
196
+ this.C(t, e, o);
209
197
  }
210
- this.isUpdatePending === !1 && (this._$ES = this._$ET());
198
+ this.isUpdatePending === !1 && (this._$ES = this._$EP());
211
199
  }
212
- P(t, e, o) {
213
- this._$AL.has(t) || this._$AL.set(t, e), o.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
200
+ C(t, e, { useDefault: o, reflect: i, wrapped: r }, n) {
201
+ o && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, n ?? e ?? this[t]), r !== !0 || n !== void 0) || (this._$AL.has(t) || (this.hasUpdated || o || (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 C extends HTMLElement {
226
214
  return this.performUpdate();
227
215
  }
228
216
  performUpdate() {
229
- var o;
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, s] of this._$Ep) this[n] = s;
219
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
220
+ for (const [i, r] of this._$Ep) this[i] = r;
234
221
  this._$Ep = void 0;
235
222
  }
236
- const i = this.constructor.elementProperties;
237
- if (i.size > 0) for (const [n, s] of i) s.wrapped !== !0 || this._$AL.has(n) || this[n] === void 0 || this.P(n, this[n], s);
223
+ const o = this.constructor.elementProperties;
224
+ if (o.size > 0) for (const [i, r] of o) {
225
+ const { wrapped: n } = r, d = this[i];
226
+ n !== !0 || this._$AL.has(i) || d === void 0 || this.C(i, void 0, r, d);
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), (o = this._$EO) == null || o.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(((o) => o.hostUpdate?.())), this.update(e)) : this._$EM();
233
+ } catch (o) {
234
+ throw t = !1, this._$EM(), o;
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((o) => {
256
- var i;
257
- return (i = o.hostUpdated) == null ? void 0 : i.call(o);
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,123 +253,122 @@ class C 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
- C.elementStyles = [], C.shadowRootOptions = { mode: "open" }, C[P("elementProperties")] = /* @__PURE__ */ new Map(), C[P("finalized")] = /* @__PURE__ */ new Map(), V == null || V({ ReactiveElement: C }), (w.reactiveElementVersions ?? (w.reactiveElementVersions = [])).push("2.0.4");
263
+ x.elementStyles = [], x.shadowRootOptions = { mode: "open" }, x[R("elementProperties")] = /* @__PURE__ */ new Map(), x[R("finalized")] = /* @__PURE__ */ new Map(), wt?.({ ReactiveElement: x }), (D.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 Et = { attribute: !0, type: String, converter: H, reflect: !1, hasChanged: Z }, St = (r = Et, t, e) => {
269
+ const Et = { attribute: !0, type: String, converter: T, reflect: !1, hasChanged: G }, kt = (s = Et, t, e) => {
287
270
  const { kind: o, metadata: i } = e;
288
- let n = globalThis.litPropertyMetadata.get(i);
289
- if (n === void 0 && globalThis.litPropertyMetadata.set(i, n = /* @__PURE__ */ new Map()), n.set(e.name, r), o === "accessor") {
290
- const { name: s } = e;
271
+ let r = globalThis.litPropertyMetadata.get(i);
272
+ if (r === void 0 && globalThis.litPropertyMetadata.set(i, r = /* @__PURE__ */ new Map()), o === "setter" && ((s = Object.create(s)).wrapped = !0), r.set(e.name, s), o === "accessor") {
273
+ const { name: n } = e;
291
274
  return { set(d) {
292
275
  const a = t.get.call(this);
293
- t.set.call(this, d), this.requestUpdate(s, a, r);
276
+ t.set.call(this, d), this.requestUpdate(n, a, s);
294
277
  }, init(d) {
295
- return d !== void 0 && this.P(s, void 0, r), d;
278
+ return d !== void 0 && this.C(n, void 0, s, d), d;
296
279
  } };
297
280
  }
298
281
  if (o === "setter") {
299
- const { name: s } = e;
282
+ const { name: n } = e;
300
283
  return function(d) {
301
- const a = this[s];
302
- t.call(this, d), this.requestUpdate(s, a, r);
284
+ const a = this[n];
285
+ t.call(this, d), this.requestUpdate(n, a, s);
303
286
  };
304
287
  }
305
288
  throw Error("Unsupported decorator location: " + o);
306
289
  };
307
- function l(r) {
308
- return (t, e) => typeof e == "object" ? St(r, t, e) : ((o, i, n) => {
309
- const s = i.hasOwnProperty(n);
310
- return i.constructor.createProperty(n, s ? { ...o, wrapped: !0 } : o), s ? Object.getOwnPropertyDescriptor(i, n) : void 0;
311
- })(r, t, e);
290
+ function l(s) {
291
+ return (t, e) => typeof e == "object" ? kt(s, t, e) : ((o, i, r) => {
292
+ const n = i.hasOwnProperty(r);
293
+ return i.constructor.createProperty(r, o), n ? Object.getOwnPropertyDescriptor(i, r) : void 0;
294
+ })(s, 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 dt(r) {
319
- return l({ ...r, state: !0, attribute: !1 });
301
+ function nt(s) {
302
+ return l({ ...s, state: !0, attribute: !1 });
320
303
  }
321
304
  /**
322
305
  * @license
323
306
  * Copyright 2017 Google LLC
324
307
  * SPDX-License-Identifier: BSD-3-Clause
325
308
  */
326
- const z = globalThis, M = z.trustedTypes, tt = M ? M.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, lt = "$lit$", A = `lit$${Math.random().toFixed(9).slice(2)}$`, ct = "?" + A, xt = `<${ct}>`, S = document, I = () => S.createComment(""), B = (r) => r === null || typeof r != "object" && typeof r != "function", K = Array.isArray, Ct = (r) => K(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", L = `[
327
- \f\r]`, R = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, et = /-->/g, ot = />/g, k = RegExp(`>|${L}(?:([^\\s"'>=/]+)(${L}*=${L}*(?:[^
328
- \f\r"'\`<>=]|("|')|))|$)`, "g"), it = /'/g, st = /"/g, ht = /^(?:script|style|textarea|title)$/i, U = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), rt = /* @__PURE__ */ new WeakMap(), E = S.createTreeWalker(S, 129);
329
- function ut(r, t) {
330
- if (!K(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
331
- return tt !== void 0 ? tt.createHTML(t) : t;
309
+ const F = globalThis, O = F.trustedTypes, Q = O ? O.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, at = "$lit$", A = `lit$${Math.random().toFixed(9).slice(2)}$`, dt = "?" + A, St = `<${dt}>`, k = document, M = () => k.createComment(""), P = (s) => s === null || typeof s != "object" && typeof s != "function", W = Array.isArray, xt = (s) => W(s) || typeof s?.[Symbol.iterator] == "function", N = `[
310
+ \f\r]`, C = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, X = /-->/g, tt = />/g, w = RegExp(`>|${N}(?:([^\\s"'>=/]+)(${N}*=${N}*(?:[^
311
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), et = /'/g, ot = /"/g, lt = /^(?:script|style|textarea|title)$/i, z = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), it = /* @__PURE__ */ new WeakMap(), E = k.createTreeWalker(k, 129);
312
+ function ct(s, t) {
313
+ if (!W(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
314
+ return Q !== void 0 ? Q.createHTML(t) : t;
332
315
  }
333
- const Rt = (r, t) => {
334
- const e = r.length - 1, o = [];
335
- let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", s = R;
316
+ const Ct = (s, t) => {
317
+ const e = s.length - 1, o = [];
318
+ let i, r = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = C;
336
319
  for (let d = 0; d < e; d++) {
337
- const a = r[d];
320
+ const a = s[d];
338
321
  let h, b, c = -1, g = 0;
339
- for (; g < a.length && (s.lastIndex = g, b = s.exec(a), b !== null); ) g = s.lastIndex, s === R ? b[1] === "!--" ? s = et : b[1] !== void 0 ? s = ot : b[2] !== void 0 ? (ht.test(b[2]) && (i = RegExp("</" + b[2], "g")), s = k) : b[3] !== void 0 && (s = k) : s === k ? b[0] === ">" ? (s = i ?? R, c = -1) : b[1] === void 0 ? c = -2 : (c = s.lastIndex - b[2].length, h = b[1], s = b[3] === void 0 ? k : b[3] === '"' ? st : it) : s === st || s === it ? s = k : s === et || s === ot ? s = R : (s = k, i = void 0);
340
- const $ = s === k && r[d + 1].startsWith("/>") ? " " : "";
341
- n += s === R ? a + xt : c >= 0 ? (o.push(h), a.slice(0, c) + lt + a.slice(c) + A + $) : a + A + (c === -2 ? d : $);
322
+ for (; g < a.length && (n.lastIndex = g, b = n.exec(a), b !== null); ) g = n.lastIndex, n === C ? b[1] === "!--" ? n = X : b[1] !== void 0 ? n = tt : b[2] !== void 0 ? (lt.test(b[2]) && (i = RegExp("</" + b[2], "g")), n = w) : b[3] !== void 0 && (n = w) : n === w ? b[0] === ">" ? (n = i ?? C, c = -1) : b[1] === void 0 ? c = -2 : (c = n.lastIndex - b[2].length, h = b[1], n = b[3] === void 0 ? w : b[3] === '"' ? ot : et) : n === ot || n === et ? n = w : n === X || n === tt ? n = C : (n = w, i = void 0);
323
+ const $ = n === w && s[d + 1].startsWith("/>") ? " " : "";
324
+ r += n === C ? a + St : c >= 0 ? (o.push(h), a.slice(0, c) + at + a.slice(c) + A + $) : a + A + (c === -2 ? d : $);
342
325
  }
343
- return [ut(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), o];
326
+ return [ct(s, r + (s[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), o];
344
327
  };
345
- class q {
328
+ class B {
346
329
  constructor({ strings: t, _$litType$: e }, o) {
347
330
  let i;
348
331
  this.parts = [];
349
- let n = 0, s = 0;
350
- const d = t.length - 1, a = this.parts, [h, b] = Rt(t, e);
351
- if (this.el = q.createElement(h, o), E.currentNode = this.el.content, e === 2 || e === 3) {
332
+ let r = 0, n = 0;
333
+ const d = t.length - 1, a = this.parts, [h, b] = Ct(t, e);
334
+ if (this.el = B.createElement(h, o), E.currentNode = this.el.content, e === 2 || e === 3) {
352
335
  const c = this.el.content.firstChild;
353
336
  c.replaceWith(...c.childNodes);
354
337
  }
355
338
  for (; (i = E.nextNode()) !== null && a.length < d; ) {
356
339
  if (i.nodeType === 1) {
357
- if (i.hasAttributes()) for (const c of i.getAttributeNames()) if (c.endsWith(lt)) {
358
- const g = b[s++], $ = i.getAttribute(c).split(A), T = /([.?@])?(.*)/.exec(g);
359
- a.push({ type: 1, index: n, name: T[2], strings: $, ctor: T[1] === "." ? zt : T[1] === "?" ? Bt : T[1] === "@" ? Ut : N }), i.removeAttribute(c);
360
- } else c.startsWith(A) && (a.push({ type: 6, index: n }), i.removeAttribute(c));
361
- if (ht.test(i.tagName)) {
340
+ if (i.hasAttributes()) for (const c of i.getAttributeNames()) if (c.endsWith(at)) {
341
+ const g = b[n++], $ = i.getAttribute(c).split(A), q = /([.?@])?(.*)/.exec(g);
342
+ a.push({ type: 1, index: r, name: q[2], strings: $, ctor: q[1] === "." ? Pt : q[1] === "?" ? zt : q[1] === "@" ? Bt : I }), i.removeAttribute(c);
343
+ } else c.startsWith(A) && (a.push({ type: 6, index: r }), i.removeAttribute(c));
344
+ if (lt.test(i.tagName)) {
362
345
  const c = i.textContent.split(A), g = c.length - 1;
363
346
  if (g > 0) {
364
- i.textContent = M ? M.emptyScript : "";
365
- for (let $ = 0; $ < g; $++) i.append(c[$], I()), E.nextNode(), a.push({ type: 2, index: ++n });
366
- i.append(c[g], I());
347
+ i.textContent = O ? O.emptyScript : "";
348
+ for (let $ = 0; $ < g; $++) i.append(c[$], M()), E.nextNode(), a.push({ type: 2, index: ++r });
349
+ i.append(c[g], M());
367
350
  }
368
351
  }
369
- } else if (i.nodeType === 8) if (i.data === ct) a.push({ type: 2, index: n });
352
+ } else if (i.nodeType === 8) if (i.data === dt) a.push({ type: 2, index: r });
370
353
  else {
371
354
  let c = -1;
372
- for (; (c = i.data.indexOf(A, c + 1)) !== -1; ) a.push({ type: 7, index: n }), c += A.length - 1;
355
+ for (; (c = i.data.indexOf(A, c + 1)) !== -1; ) a.push({ type: 7, index: r }), c += A.length - 1;
373
356
  }
374
- n++;
357
+ r++;
375
358
  }
376
359
  }
377
360
  static createElement(t, e) {
378
- const o = S.createElement("template");
361
+ const o = k.createElement("template");
379
362
  return o.innerHTML = t, o;
380
363
  }
381
364
  }
382
- function x(r, t, e = r, o) {
383
- var s, d;
384
- if (t === U) return t;
385
- let i = o !== void 0 ? (s = e._$Co) == null ? void 0 : s[o] : e._$Cl;
386
- const n = B(t) ? void 0 : t._$litDirective$;
387
- return (i == null ? void 0 : i.constructor) !== n && ((d = i == null ? void 0 : i._$AO) == null || d.call(i, !1), n === void 0 ? i = void 0 : (i = new n(r), i._$AT(r, e, o)), o !== void 0 ? (e._$Co ?? (e._$Co = []))[o] = i : e._$Cl = i), i !== void 0 && (t = x(r, i._$AS(r, t.values), i, o)), t;
365
+ function S(s, t, e = s, o) {
366
+ if (t === z) return t;
367
+ let i = o !== void 0 ? e._$Co?.[o] : e._$Cl;
368
+ const r = P(t) ? void 0 : t._$litDirective$;
369
+ return i?.constructor !== r && (i?._$AO?.(!1), r === void 0 ? i = void 0 : (i = new r(s), i._$AT(s, e, o)), o !== void 0 ? (e._$Co ??= [])[o] = i : e._$Cl = i), i !== void 0 && (t = S(s, i._$AS(s, t.values), i, o)), t;
388
370
  }
389
- class Pt {
371
+ class Rt {
390
372
  constructor(t, e) {
391
373
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
392
374
  }
@@ -397,35 +379,34 @@ class Pt {
397
379
  return this._$AM._$AU;
398
380
  }
399
381
  u(t) {
400
- const { el: { content: e }, parts: o } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? S).importNode(e, !0);
382
+ const { el: { content: e }, parts: o } = this._$AD, i = (t?.creationScope ?? k).importNode(e, !0);
401
383
  E.currentNode = i;
402
- let n = E.nextNode(), s = 0, d = 0, a = o[0];
384
+ let r = E.nextNode(), n = 0, d = 0, a = o[0];
403
385
  for (; a !== void 0; ) {
404
- if (s === a.index) {
386
+ if (n === a.index) {
405
387
  let h;
406
- a.type === 2 ? h = new D(n, n.nextSibling, this, t) : a.type === 1 ? h = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (h = new qt(n, this, t)), this._$AV.push(h), a = o[++d];
388
+ a.type === 2 ? h = new H(r, r.nextSibling, this, t) : a.type === 1 ? h = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (h = new qt(r, this, t)), this._$AV.push(h), a = o[++d];
407
389
  }
408
- s !== (a == null ? void 0 : a.index) && (n = E.nextNode(), s++);
390
+ n !== a?.index && (r = E.nextNode(), n++);
409
391
  }
410
- return E.currentNode = S, i;
392
+ return E.currentNode = k, i;
411
393
  }
412
394
  p(t) {
413
395
  let e = 0;
414
396
  for (const o of this._$AV) o !== void 0 && (o.strings !== void 0 ? (o._$AI(t, o, e), e += o.strings.length - 2) : o._$AI(t[e])), e++;
415
397
  }
416
398
  }
417
- class D {
399
+ class H {
418
400
  get _$AU() {
419
- var t;
420
- return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
401
+ return this._$AM?._$AU ?? this._$Cv;
421
402
  }
422
403
  constructor(t, e, o, i) {
423
- this.type = 2, this._$AH = p, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = o, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
404
+ this.type = 2, this._$AH = p, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = o, this.options = i, this._$Cv = i?.isConnected ?? !0;
424
405
  }
425
406
  get parentNode() {
426
407
  let t = this._$AA.parentNode;
427
408
  const e = this._$AM;
428
- return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
409
+ return e !== void 0 && t?.nodeType === 11 && (t = e.parentNode), t;
429
410
  }
430
411
  get startNode() {
431
412
  return this._$AA;
@@ -434,7 +415,7 @@ class D {
434
415
  return this._$AB;
435
416
  }
436
417
  _$AI(t, e = this) {
437
- t = x(this, t, e), B(t) ? t === p || t == null || t === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : t !== this._$AH && t !== U && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Ct(t) ? this.k(t) : this._(t);
418
+ t = S(this, t, e), P(t) ? t === p || t == null || t === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : t !== this._$AH && t !== z && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : xt(t) ? this.k(t) : this._(t);
438
419
  }
439
420
  O(t) {
440
421
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -443,66 +424,63 @@ class D {
443
424
  this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
444
425
  }
445
426
  _(t) {
446
- this._$AH !== p && B(this._$AH) ? this._$AA.nextSibling.data = t : this.T(S.createTextNode(t)), this._$AH = t;
427
+ this._$AH !== p && P(this._$AH) ? this._$AA.nextSibling.data = t : this.T(k.createTextNode(t)), this._$AH = t;
447
428
  }
448
429
  $(t) {
449
- var n;
450
- const { values: e, _$litType$: o } = t, i = typeof o == "number" ? this._$AC(t) : (o.el === void 0 && (o.el = q.createElement(ut(o.h, o.h[0]), this.options)), o);
451
- if (((n = this._$AH) == null ? void 0 : n._$AD) === i) this._$AH.p(e);
430
+ const { values: e, _$litType$: o } = t, i = typeof o == "number" ? this._$AC(t) : (o.el === void 0 && (o.el = B.createElement(ct(o.h, o.h[0]), this.options)), o);
431
+ if (this._$AH?._$AD === i) this._$AH.p(e);
452
432
  else {
453
- const s = new Pt(i, this), d = s.u(this.options);
454
- s.p(e), this.T(d), this._$AH = s;
433
+ const r = new Rt(i, this), n = r.u(this.options);
434
+ r.p(e), this.T(n), this._$AH = r;
455
435
  }
456
436
  }
457
437
  _$AC(t) {
458
- let e = rt.get(t.strings);
459
- return e === void 0 && rt.set(t.strings, e = new q(t)), e;
438
+ let e = it.get(t.strings);
439
+ return e === void 0 && it.set(t.strings, e = new B(t)), e;
460
440
  }
461
441
  k(t) {
462
- K(this._$AH) || (this._$AH = [], this._$AR());
442
+ W(this._$AH) || (this._$AH = [], this._$AR());
463
443
  const e = this._$AH;
464
444
  let o, i = 0;
465
- for (const n of t) i === e.length ? e.push(o = new D(this.O(I()), this.O(I()), this, this.options)) : o = e[i], o._$AI(n), i++;
445
+ for (const r of t) i === e.length ? e.push(o = new H(this.O(M()), this.O(M()), this, this.options)) : o = e[i], o._$AI(r), i++;
466
446
  i < e.length && (this._$AR(o && o._$AB.nextSibling, i), e.length = i);
467
447
  }
468
448
  _$AR(t = this._$AA.nextSibling, e) {
469
- var o;
470
- for ((o = this._$AP) == null ? void 0 : o.call(this, !1, !0, e); t && t !== this._$AB; ) {
471
- const i = t.nextSibling;
472
- t.remove(), t = i;
449
+ for (this._$AP?.(!1, !0, e); t !== this._$AB; ) {
450
+ const o = t.nextSibling;
451
+ t.remove(), t = o;
473
452
  }
474
453
  }
475
454
  setConnected(t) {
476
- var e;
477
- this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
455
+ this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
478
456
  }
479
457
  }
480
- class N {
458
+ class I {
481
459
  get tagName() {
482
460
  return this.element.tagName;
483
461
  }
484
462
  get _$AU() {
485
463
  return this._$AM._$AU;
486
464
  }
487
- constructor(t, e, o, i, n) {
488
- this.type = 1, this._$AH = p, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = n, o.length > 2 || o[0] !== "" || o[1] !== "" ? (this._$AH = Array(o.length - 1).fill(new String()), this.strings = o) : this._$AH = p;
465
+ constructor(t, e, o, i, r) {
466
+ this.type = 1, this._$AH = p, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = r, o.length > 2 || o[0] !== "" || o[1] !== "" ? (this._$AH = Array(o.length - 1).fill(new String()), this.strings = o) : this._$AH = p;
489
467
  }
490
468
  _$AI(t, e = this, o, i) {
491
- const n = this.strings;
492
- let s = !1;
493
- if (n === void 0) t = x(this, t, e, 0), s = !B(t) || t !== this._$AH && t !== U, s && (this._$AH = t);
469
+ const r = this.strings;
470
+ let n = !1;
471
+ if (r === void 0) t = S(this, t, e, 0), n = !P(t) || t !== this._$AH && t !== z, n && (this._$AH = t);
494
472
  else {
495
473
  const d = t;
496
474
  let a, h;
497
- for (t = n[0], a = 0; a < n.length - 1; a++) h = x(this, d[o + a], e, a), h === U && (h = this._$AH[a]), s || (s = !B(h) || h !== this._$AH[a]), h === p ? t = p : t !== p && (t += (h ?? "") + n[a + 1]), this._$AH[a] = h;
475
+ for (t = r[0], a = 0; a < r.length - 1; a++) h = S(this, d[o + a], e, a), h === z && (h = this._$AH[a]), n ||= !P(h) || h !== this._$AH[a], h === p ? t = p : t !== p && (t += (h ?? "") + r[a + 1]), this._$AH[a] = h;
498
476
  }
499
- s && !i && this.j(t);
477
+ n && !i && this.j(t);
500
478
  }
501
479
  j(t) {
502
480
  t === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
503
481
  }
504
482
  }
505
- class zt extends N {
483
+ class Pt extends I {
506
484
  constructor() {
507
485
  super(...arguments), this.type = 3;
508
486
  }
@@ -510,7 +488,7 @@ class zt extends N {
510
488
  this.element[this.name] = t === p ? void 0 : t;
511
489
  }
512
490
  }
513
- class Bt extends N {
491
+ class zt extends I {
514
492
  constructor() {
515
493
  super(...arguments), this.type = 4;
516
494
  }
@@ -518,18 +496,17 @@ class Bt extends N {
518
496
  this.element.toggleAttribute(this.name, !!t && t !== p);
519
497
  }
520
498
  }
521
- class Ut extends N {
522
- constructor(t, e, o, i, n) {
523
- super(t, e, o, i, n), this.type = 5;
499
+ class Bt extends I {
500
+ constructor(t, e, o, i, r) {
501
+ super(t, e, o, i, r), this.type = 5;
524
502
  }
525
503
  _$AI(t, e = this) {
526
- if ((t = x(this, t, e, 0) ?? p) === U) return;
527
- const o = this._$AH, i = t === p && o !== p || t.capture !== o.capture || t.once !== o.once || t.passive !== o.passive, n = t !== p && (o === p || i);
528
- i && this.element.removeEventListener(this.name, this, o), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
504
+ if ((t = S(this, t, e, 0) ?? p) === z) return;
505
+ const o = this._$AH, i = t === p && o !== p || t.capture !== o.capture || t.once !== o.once || t.passive !== o.passive, r = t !== p && (o === p || i);
506
+ i && this.element.removeEventListener(this.name, this, o), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
529
507
  }
530
508
  handleEvent(t) {
531
- var e;
532
- typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
509
+ typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
533
510
  }
534
511
  }
535
512
  class qt {
@@ -540,17 +517,17 @@ class qt {
540
517
  return this._$AM._$AU;
541
518
  }
542
519
  _$AI(t) {
543
- x(this, t);
520
+ S(this, t);
544
521
  }
545
522
  }
546
- const G = z.litHtmlPolyfillSupport;
547
- G == null || G(q, D), (z.litHtmlVersions ?? (z.litHtmlVersions = [])).push("3.2.1");
523
+ const Ut = F.litHtmlPolyfillSupport;
524
+ Ut?.(B, H), (F.litHtmlVersions ??= []).push("3.3.1");
548
525
  /**
549
526
  * @license
550
527
  * Copyright 2018 Google LLC
551
528
  * SPDX-License-Identifier: BSD-3-Clause
552
529
  */
553
- const j = (r) => r ?? p, pt = bt`
530
+ const V = (s) => s ?? p, ht = ut`
554
531
  :host {
555
532
  /* Global Radiobutton Styles */
556
533
  --_nys-radiobutton-size: var(--nys-size-400, 32px);
@@ -910,17 +887,17 @@ const j = (r) => r ?? p, pt = bt`
910
887
  border: 0;
911
888
  }
912
889
  `;
913
- var Tt = Object.defineProperty, Ot = Object.getOwnPropertyDescriptor, f = (r, t, e, o) => {
914
- for (var i = o > 1 ? void 0 : o ? Ot(t, e) : t, n = r.length - 1, s; n >= 0; n--)
915
- (s = r[n]) && (i = (o ? s(t, e, i) : s(i)) || i);
890
+ var Tt = Object.defineProperty, Ot = Object.getOwnPropertyDescriptor, f = (s, t, e, o) => {
891
+ for (var i = o > 1 ? void 0 : o ? Ot(t, e) : t, r = s.length - 1, n; r >= 0; r--)
892
+ (n = s[r]) && (i = (o ? n(t, e, i) : n(i)) || i);
916
893
  return o && i && Tt(t, e, i), i;
917
894
  };
918
- let Ht = 0;
895
+ let Mt = 0;
919
896
  var m;
920
- const y = (m = class extends nt {
897
+ const y = (m = class extends st {
921
898
  // allows use of elementInternals' API
922
899
  constructor() {
923
- super(), this.id = "", this.name = "", this.required = !1, this.optional = !1, this.showError = !1, this.errorMessage = "", this.label = "", this.description = "", this.tile = !1, this._tooltip = "", this.invert = !1, this.form = null, this.selectedValue = null, this._slottedDescriptionText = "", this._size = "md", this._internals = this.attachInternals();
900
+ super(), this.id = "", this.name = "", this.required = !1, this.optional = !1, this.showError = !1, this.errorMessage = "", this.label = "", this.description = "", this.tile = !1, this._tooltip = "", this.inverted = !1, this.form = null, this.selectedValue = null, this._slottedDescriptionText = "", this._size = "md", this._internals = this.attachInternals();
924
901
  }
925
902
  get size() {
926
903
  return this._size;
@@ -932,7 +909,7 @@ const y = (m = class extends nt {
932
909
  }
933
910
  // Generate a unique ID if one is not provided
934
911
  connectedCallback() {
935
- super.connectedCallback(), this.id || (this.id = `nys-radiogroup-${Date.now()}-${Ht++}`), this.addEventListener("nys-change", this._handleRadioButtonChange), this.addEventListener("invalid", this._handleInvalid);
912
+ super.connectedCallback(), this.id || (this.id = `nys-radiogroup-${Date.now()}-${Mt++}`), this.addEventListener("nys-change", this._handleRadioButtonChange), this.addEventListener("invalid", this._handleInvalid);
936
913
  }
937
914
  disconnectedCallback() {
938
915
  super.disconnectedCallback(), this.removeEventListener("nys-change", this._handleRadioButtonChange), this.removeEventListener("invalid", this._handleInvalid);
@@ -941,7 +918,7 @@ const y = (m = class extends nt {
941
918
  this._initializeCheckedRadioValue(), this._setValue(), this._setRadioButtonRequire(), this._updateRadioButtonsSize(), this._updateRadioButtonsTile(), this._updateRadioButtonsShowError(), this._getSlotDescriptionForAria(), await this.updateComplete, this._initializeChildAttributes(), this._updateGroupTabIndex();
942
919
  }
943
920
  updated(t) {
944
- (t.has("required") || t.has("selectedValue")) && this._manageRequire(), t.has("size") && this._updateRadioButtonsSize(), t.has("tile") && this._updateRadioButtonsTile(), t.has("invert") && this._updateRadioButtonsInvert(), t.has("showError") && this._updateRadioButtonsShowError(), t.has("form") && this._updateRadioButtonsForm();
921
+ (t.has("required") || t.has("selectedValue")) && this._manageRequire(), t.has("size") && this._updateRadioButtonsSize(), t.has("tile") && this._updateRadioButtonsTile(), t.has("inverted") && this._updateRadioButtonsInvert(), t.has("showError") && this._updateRadioButtonsShowError(), t.has("form") && this._updateRadioButtonsForm();
945
922
  }
946
923
  // This callback is automatically called when the parent form is reset.
947
924
  formResetCallback() {
@@ -993,11 +970,11 @@ const y = (m = class extends nt {
993
970
  "Enter"
994
971
  ].includes(t.key)) return;
995
972
  t.preventDefault();
996
- const o = this._getAllRadios().filter((h) => !h.disabled), i = o.find((h) => h.checked) || o[0], n = t.key === " " || t.key === "Enter" ? 0 : ["ArrowUp", "ArrowLeft"].includes(t.key) ? -1 : 1;
997
- let s = o.indexOf(i) + n;
998
- s < 0 && (s = o.length - 1), s >= o.length && (s = 0);
999
- const d = o[s], a = await d.getInputElement();
1000
- a == null || a.click(), this._updateGroupTabIndex(), d.focus();
973
+ const o = this._getAllRadios().filter((h) => !h.disabled), i = o.find((h) => h.checked) || o[0], r = t.key === " " || t.key === "Enter" ? 0 : ["ArrowUp", "ArrowLeft"].includes(t.key) ? -1 : 1;
974
+ let n = o.indexOf(i) + r;
975
+ n < 0 && (n = o.length - 1), n >= o.length && (n = 0);
976
+ const d = o[n];
977
+ (await d.getInputElement())?.click(), this._updateGroupTabIndex(), d.focus();
1001
978
  }
1002
979
  _updateGroupTabIndex() {
1003
980
  const t = this._getAllRadios(), e = t.find((o) => o.checked) || t[0];
@@ -1025,7 +1002,7 @@ const y = (m = class extends nt {
1025
1002
  }
1026
1003
  _updateRadioButtonsInvert() {
1027
1004
  this.querySelectorAll("nys-radiobutton").forEach((e) => {
1028
- this.invert ? e.toggleAttribute("invert", !0) : e.removeAttribute("invert");
1005
+ this.inverted ? e.toggleAttribute("inverted", !0) : e.removeAttribute("inverted");
1029
1006
  });
1030
1007
  }
1031
1008
  _updateRadioButtonsShowError() {
@@ -1040,14 +1017,10 @@ const y = (m = class extends nt {
1040
1017
  }
1041
1018
  // Get the slotted text contents so native VO can attempt to announce it within the legend in the fieldset
1042
1019
  _getSlotDescriptionForAria() {
1043
- var o;
1044
- const t = (o = this.shadowRoot) == null ? void 0 : o.querySelector(
1020
+ const e = this.shadowRoot?.querySelector(
1045
1021
  'slot[name="description"]'
1046
- ), e = (t == null ? void 0 : t.assignedNodes({ flatten: !0 })) || [];
1047
- this._slottedDescriptionText = e.map((i) => {
1048
- var n;
1049
- return (n = i.textContent) == null ? void 0 : n.trim();
1050
- }).filter(Boolean).join(", ");
1022
+ )?.assignedNodes({ flatten: !0 }) || [];
1023
+ this._slottedDescriptionText = e.map((o) => o.textContent?.trim()).filter(Boolean).join(", ");
1051
1024
  }
1052
1025
  /******************** Event Handlers ********************/
1053
1026
  // Keeps radiogroup informed of the name and value of its current selected radiobutton at each change
@@ -1062,20 +1035,20 @@ const y = (m = class extends nt {
1062
1035
  if (e) {
1063
1036
  const o = this._internals.form;
1064
1037
  o ? Array.from(o.elements).find(
1065
- (s) => typeof s.checkValidity == "function" && !s.checkValidity()
1038
+ (n) => typeof n.checkValidity == "function" && !n.checkValidity()
1066
1039
  ) === this && (e.focus(), e.classList.add("active-focus")) : (e.focus(), e.classList.add("active-focus"));
1067
1040
  }
1068
1041
  }
1069
1042
  }
1070
1043
  render() {
1071
- return F`<div class="nys-radiogroup">
1044
+ return L`<div class="nys-radiogroup">
1072
1045
  <nys-label
1073
1046
  for=${this.id}
1074
1047
  label=${this.label}
1075
1048
  description=${this.description}
1076
1049
  flag=${this.required ? "required" : this.optional ? "optional" : ""}
1077
1050
  _tooltip=${this._tooltip}
1078
- ?invert=${this.invert}
1051
+ ?inverted=${this.inverted}
1079
1052
  >
1080
1053
  <slot name="description" slot="description">${this.description}</slot>
1081
1054
  </nys-label>
@@ -1094,7 +1067,7 @@ const y = (m = class extends nt {
1094
1067
  ></nys-errormessage>
1095
1068
  </div>`;
1096
1069
  }
1097
- }, m.VALID_SIZES = ["sm", "md"], m.styles = pt, m.formAssociated = !0, m);
1070
+ }, m.VALID_SIZES = ["sm", "md"], m.styles = ht, m.formAssociated = !0, m);
1098
1071
  f([
1099
1072
  l({ type: String })
1100
1073
  ], y.prototype, "id", 2);
@@ -1127,31 +1100,31 @@ f([
1127
1100
  ], y.prototype, "_tooltip", 2);
1128
1101
  f([
1129
1102
  l({ type: Boolean, reflect: !0 })
1130
- ], y.prototype, "invert", 2);
1103
+ ], y.prototype, "inverted", 2);
1131
1104
  f([
1132
1105
  l({ type: String, reflect: !0 })
1133
1106
  ], y.prototype, "form", 2);
1134
1107
  f([
1135
- dt()
1108
+ nt()
1136
1109
  ], y.prototype, "selectedValue", 2);
1137
1110
  f([
1138
- dt()
1111
+ nt()
1139
1112
  ], y.prototype, "_slottedDescriptionText", 2);
1140
1113
  f([
1141
1114
  l({ reflect: !0 })
1142
1115
  ], y.prototype, "size", 1);
1143
- let Mt = y;
1144
- customElements.get("nys-radiogroup") || customElements.define("nys-radiogroup", Mt);
1145
- var It = Object.defineProperty, Dt = Object.getOwnPropertyDescriptor, v = (r, t, e, o) => {
1146
- for (var i = o > 1 ? void 0 : o ? Dt(t, e) : t, n = r.length - 1, s; n >= 0; n--)
1147
- (s = r[n]) && (i = (o ? s(t, e, i) : s(i)) || i);
1148
- return o && i && It(t, e, i), i;
1116
+ let Dt = y;
1117
+ customElements.get("nys-radiogroup") || customElements.define("nys-radiogroup", Dt);
1118
+ var Ht = Object.defineProperty, It = Object.getOwnPropertyDescriptor, v = (s, t, e, o) => {
1119
+ for (var i = o > 1 ? void 0 : o ? It(t, e) : t, r = s.length - 1, n; r >= 0; r--)
1120
+ (n = s[r]) && (i = (o ? n(t, e, i) : n(i)) || i);
1121
+ return o && i && Ht(t, e, i), i;
1149
1122
  };
1150
1123
  let Nt = 0;
1151
1124
  var u;
1152
- const _ = (u = class extends nt {
1125
+ const _ = (u = class extends st {
1153
1126
  constructor() {
1154
- super(...arguments), this.checked = !1, this.disabled = !1, this.required = !1, this.label = "", this.description = "", this.id = "", this.name = "", this.value = "", this.invert = !1, this.form = null, this._size = "md", this.tile = !1;
1127
+ super(...arguments), this.checked = !1, this.disabled = !1, this.required = !1, this.label = "", this.description = "", this.id = "", this.name = "", this.value = "", this.inverted = !1, this.form = null, this._size = "md", this.tile = !1;
1155
1128
  }
1156
1129
  get size() {
1157
1130
  return this._size;
@@ -1162,8 +1135,7 @@ const _ = (u = class extends nt {
1162
1135
  ) ? t : "md";
1163
1136
  }
1164
1137
  async getInputElement() {
1165
- var t;
1166
- return await this.updateComplete, ((t = this.shadowRoot) == null ? void 0 : t.querySelector("input")) || null;
1138
+ return await this.updateComplete, this.shadowRoot?.querySelector("input") || null;
1167
1139
  }
1168
1140
  // This callback is automatically called when the parent form is reset.
1169
1141
  formResetUpdate() {
@@ -1183,10 +1155,9 @@ const _ = (u = class extends nt {
1183
1155
  /********************** Functions **********************/
1184
1156
  // This helper function is called to perform the element's native validation.
1185
1157
  checkValidity() {
1186
- var e;
1187
1158
  if (this.required && !this.checked)
1188
1159
  return !1;
1189
- const t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("input");
1160
+ const t = this.shadowRoot?.querySelector("input");
1190
1161
  return t ? t.checkValidity() : !0;
1191
1162
  }
1192
1163
  /******************** Event Handlers ********************/
@@ -1217,24 +1188,23 @@ const _ = (u = class extends nt {
1217
1188
  this.classList.remove("active-focus"), this.dispatchEvent(new Event("nys-blur"));
1218
1189
  }
1219
1190
  _callInputHandling() {
1220
- var e;
1221
1191
  if (this.disabled) return;
1222
- const t = (e = this.shadowRoot) == null ? void 0 : e.querySelector(
1192
+ const t = this.shadowRoot?.querySelector(
1223
1193
  'input[type="radio"]'
1224
1194
  );
1225
1195
  t && (t.focus(), t.click());
1226
1196
  }
1227
1197
  render() {
1228
- return F`
1198
+ return L`
1229
1199
  <input
1230
1200
  id="${this.id}"
1231
1201
  type="radio"
1232
- name="${j(this.name ? this.name : void 0)}"
1202
+ name="${V(this.name ? this.name : void 0)}"
1233
1203
  .checked=${this.checked}
1234
1204
  ?disabled=${this.disabled}
1235
1205
  .value=${this.value}
1236
1206
  ?required="${this.required}"
1237
- form=${j(this.form || void 0)}
1207
+ form=${V(this.form || void 0)}
1238
1208
  @change="${this._handleChange}"
1239
1209
  hidden
1240
1210
  aria-hidden="true"
@@ -1246,18 +1216,18 @@ const _ = (u = class extends nt {
1246
1216
  aria-label=${this.label}
1247
1217
  >
1248
1218
  <span class="nys-radiobutton__radio"></span>
1249
- ${this.label && F`<nys-label
1219
+ ${this.label && L`<nys-label
1250
1220
  for=${this.id}
1251
1221
  label=${this.label}
1252
- description=${j(this.description || void 0)}
1253
- ?invert=${this.invert}
1222
+ description=${V(this.description || void 0)}
1223
+ ?inverted=${this.inverted}
1254
1224
  >
1255
1225
  <slot name="description" slot="description">${this.description}</slot>
1256
1226
  </nys-label> `}
1257
1227
  </label>
1258
1228
  `;
1259
1229
  }
1260
- }, u.VALID_SIZES = ["sm", "md"], u.buttonGroup = {}, u.styles = pt, u);
1230
+ }, u.VALID_SIZES = ["sm", "md"], u.buttonGroup = {}, u.styles = ht, u);
1261
1231
  v([
1262
1232
  l({ type: Boolean, reflect: !0 })
1263
1233
  ], _.prototype, "checked", 2);
@@ -1284,7 +1254,7 @@ v([
1284
1254
  ], _.prototype, "value", 2);
1285
1255
  v([
1286
1256
  l({ type: Boolean, reflect: !0 })
1287
- ], _.prototype, "invert", 2);
1257
+ ], _.prototype, "inverted", 2);
1288
1258
  v([
1289
1259
  l({ type: String, reflect: !0 })
1290
1260
  ], _.prototype, "form", 2);
@@ -1298,6 +1268,6 @@ let Vt = _;
1298
1268
  customElements.get("nys-radiobutton") || customElements.define("nys-radiobutton", Vt);
1299
1269
  export {
1300
1270
  Vt as NysRadiobutton,
1301
- Mt as NysRadiogroup
1271
+ Dt as NysRadiogroup
1302
1272
  };
1303
1273
  //# sourceMappingURL=nys-radiobutton.js.map