@phila/phila-ui-date-field 0.0.9 → 0.1.0-beta.11

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.
package/dist/index.mjs CHANGED
@@ -1,6 +1,7 @@
1
- import { defineComponent as ve, toRef as Ae, watch as le, h as rt, useAttrs as Xe, computed as Y, ref as W, createElementBlock as U, openBlock as w, normalizeClass as Ye, createCommentVNode as pe, createElementVNode as j, toDisplayString as X, withModifiers as ue, createBlock as ae, renderSlot as me, unref as x, withDirectives as ut, mergeProps as ee, vModelDynamic as lt, createVNode as ge, createTextVNode as be, isRef as ot, readonly as ht, onMounted as dt, onUnmounted as ct, withCtx as oe, normalizeProps as _e, guardReactiveProps as Ce, Fragment as Me, renderList as Be, nextTick as qe, useTemplateRef as pt, withKeys as ft } from "vue";
2
- import { cn as Fe, Icon as Ne, BaseLink as Je, ActionContent as Ie, useCollapse as mt, generateRandomId as gt } from "@phila/phila-ui-core";
3
- import './index.css';const vt = ["disabled"], kt = /* @__PURE__ */ ve({
1
+ import { defineComponent as ve, toRef as Ce, watch as se, h as ot, useAttrs as Qe, computed as N, ref as W, createElementBlock as H, openBlock as I, normalizeClass as Ye, createCommentVNode as de, createElementVNode as K, toDisplayString as X, withModifiers as ce, createBlock as ue, renderSlot as ye, unref as w, withDirectives as ht, mergeProps as ie, vModelDynamic as dt, createVNode as fe, createTextVNode as Ee, isRef as ct, readonly as pt, onMounted as ft, onUnmounted as mt, withCtx as ge, normalizeProps as Be, guardReactiveProps as we, Fragment as De, renderList as Se, nextTick as qe, useTemplateRef as Ke, withKeys as gt } from "vue";
2
+ import { cn as Ae, Icon as Ne, BaseLink as et, ActionContent as Ie, generateRandomId as vt, useVisibility as kt } from "@phila/phila-ui-core";
3
+ import { IconClose as tt, IconCircleExclamation as _t, IconCalendar as Ge } from "@phila/phila-ui-core/icons";
4
+ import './index.css';const Ct = ["disabled"], yt = /* @__PURE__ */ ve({
4
5
  inheritAttrs: !1,
5
6
  __name: "PhlButton",
6
7
  props: {
@@ -16,20 +17,19 @@ import './index.css';const vt = ["disabled"], kt = /* @__PURE__ */ ve({
16
17
  iconRight: { type: Boolean },
17
18
  text: {},
18
19
  className: {},
19
- iconDefinition: {},
20
- iconClass: {},
20
+ icon: {},
21
21
  src: {},
22
22
  svgRaw: {}
23
23
  },
24
24
  setup(r) {
25
- const e = r, t = (n) => "href" in n && n.href !== void 0 || "to" in n && n.to !== void 0, s = Y(() => Fe(
25
+ const e = r, t = (n) => "href" in n && n.href !== void 0 || "to" in n && n.to !== void 0, s = N(() => Ae(
26
26
  "phila-button",
27
27
  `phila-button--${e.variant}`,
28
28
  e.size && `is-${e.size}`,
29
29
  e.iconOnly && "icon-button",
30
30
  e.iconOnly && e.variant === "standard" && "icon-button--standard",
31
31
  e.className
32
- )), a = Y(() => t(e) ? "to" in e && e.to !== void 0 ? {
32
+ )), i = N(() => t(e) ? "to" in e && e.to !== void 0 ? {
33
33
  to: e.to,
34
34
  disabled: e.disabled,
35
35
  className: s.value
@@ -39,10 +39,9 @@ import './index.css';const vt = ["disabled"], kt = /* @__PURE__ */ ve({
39
39
  rel: e.rel,
40
40
  disabled: e.disabled,
41
41
  className: s.value
42
- } : {}), i = Y(
42
+ } : {}), a = N(
43
43
  () => ({
44
- iconDefinition: e.iconDefinition,
45
- iconClass: e.iconClass,
44
+ icon: e.icon,
46
45
  src: e.src,
47
46
  iconRight: e.iconRight,
48
47
  iconOnly: e.iconOnly,
@@ -50,70 +49,61 @@ import './index.css';const vt = ["disabled"], kt = /* @__PURE__ */ ve({
50
49
  size: e.size
51
50
  })
52
51
  );
53
- return (n, u) => t(e) ? (w(), ae(x(Je), ee({ key: 0 }, { ...a.value, ...n.$attrs }, { role: "button" }), {
54
- default: oe(() => [
55
- ge(x(Ie), _e(Ce(i.value)), {
56
- default: oe(() => [
57
- me(n.$slots, "default", {}, () => [
58
- be(X(e.text), 1)
52
+ return (n, u) => t(e) ? (I(), ue(w(et), ie({ key: 0 }, { ...i.value, ...n.$attrs }, { role: "button" }), {
53
+ default: ge(() => [
54
+ fe(w(Ie), Be(we(a.value)), {
55
+ default: ge(() => [
56
+ ye(n.$slots, "default", {}, () => [
57
+ Ee(X(e.text), 1)
59
58
  ])
60
59
  ]),
61
60
  _: 3
62
61
  }, 16)
63
62
  ]),
64
63
  _: 3
65
- }, 16)) : (w(), U("button", ee({
64
+ }, 16)) : (I(), H("button", ie({
66
65
  key: 1,
67
66
  type: "button",
68
67
  disabled: e.disabled,
69
68
  class: s.value
70
69
  }, n.$attrs), [
71
- ge(x(Ie), _e(Ce(i.value)), {
72
- default: oe(() => [
73
- me(n.$slots, "default", {}, () => [
74
- be(X(e.text), 1)
70
+ fe(w(Ie), Be(we(a.value)), {
71
+ default: ge(() => [
72
+ ye(n.$slots, "default", {}, () => [
73
+ Ee(X(e.text), 1)
75
74
  ])
76
75
  ]),
77
76
  _: 3
78
77
  }, 16)
79
- ], 16, vt));
78
+ ], 16, Ct));
80
79
  }
81
80
  });
82
- var _t = {
83
- prefix: "fas",
84
- iconName: "circle-exclamation",
85
- icon: [512, 512, ["exclamation-circle"], "f06a", "M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]
86
- }, Ct = _t, yt = {
87
- prefix: "fas",
88
- iconName: "xmark",
89
- icon: [384, 512, [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], "f00d", "M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]
90
- }, Et = yt;
91
- function he(r) {
81
+ function le(r) {
92
82
  return typeof r == "string" || r instanceof String;
93
83
  }
94
- function Ke(r) {
84
+ function Ze(r) {
95
85
  var e;
96
86
  return typeof r == "object" && r != null && (r == null || (e = r.constructor) == null ? void 0 : e.name) === "Object";
97
87
  }
98
- function Qe(r, e) {
99
- return Array.isArray(e) ? Qe(r, (t, s) => e.includes(s)) : Object.entries(r).reduce((t, s) => {
100
- let [a, i] = s;
101
- return e(i, a) && (t[a] = i), t;
88
+ function st(r, e) {
89
+ return Array.isArray(e) ? st(r, (t, s) => e.includes(s)) : Object.entries(r).reduce((t, s) => {
90
+ let [i, a] = s;
91
+ return e(a, i) && (t[i] = a), t;
102
92
  }, {});
103
93
  }
104
- const m = {
94
+ const f = {
105
95
  NONE: "NONE",
106
96
  LEFT: "LEFT",
107
97
  FORCE_LEFT: "FORCE_LEFT",
108
98
  RIGHT: "RIGHT",
109
99
  FORCE_RIGHT: "FORCE_RIGHT"
110
100
  };
111
- function At(r) {
101
+ function Et(r) {
112
102
  switch (r) {
113
- case m.LEFT:
114
- return m.FORCE_LEFT;
115
- case m.RIGHT:
116
- return m.FORCE_RIGHT;
103
+ case f.LEFT:
104
+ return f.FORCE_LEFT;
105
+ case f.RIGHT:
106
+ return f.FORCE_RIGHT;
117
107
  default:
118
108
  return r;
119
109
  }
@@ -124,29 +114,29 @@ function Ue(r) {
124
114
  function Te(r, e) {
125
115
  if (e === r) return !0;
126
116
  const t = Array.isArray(e), s = Array.isArray(r);
127
- let a;
117
+ let i;
128
118
  if (t && s) {
129
119
  if (e.length != r.length) return !1;
130
- for (a = 0; a < e.length; a++) if (!Te(e[a], r[a])) return !1;
120
+ for (i = 0; i < e.length; i++) if (!Te(e[i], r[i])) return !1;
131
121
  return !0;
132
122
  }
133
123
  if (t != s) return !1;
134
124
  if (e && r && typeof e == "object" && typeof r == "object") {
135
- const i = e instanceof Date, n = r instanceof Date;
136
- if (i && n) return e.getTime() == r.getTime();
137
- if (i != n) return !1;
125
+ const a = e instanceof Date, n = r instanceof Date;
126
+ if (a && n) return e.getTime() == r.getTime();
127
+ if (a != n) return !1;
138
128
  const u = e instanceof RegExp, l = r instanceof RegExp;
139
129
  if (u && l) return e.toString() == r.toString();
140
130
  if (u != l) return !1;
141
131
  const o = Object.keys(e);
142
- for (a = 0; a < o.length; a++) if (!Object.prototype.hasOwnProperty.call(r, o[a])) return !1;
143
- for (a = 0; a < o.length; a++) if (!Te(r[o[a]], e[o[a]])) return !1;
132
+ for (i = 0; i < o.length; i++) if (!Object.prototype.hasOwnProperty.call(r, o[i])) return !1;
133
+ for (i = 0; i < o.length; i++) if (!Te(r[o[i]], e[o[i]])) return !1;
144
134
  return !0;
145
135
  } else if (e && r && typeof e == "function" && typeof r == "function")
146
136
  return e.toString() === r.toString();
147
137
  return !1;
148
138
  }
149
- class bt {
139
+ class At {
150
140
  /** Current input value */
151
141
  /** Current cursor position */
152
142
  /** Old input value */
@@ -189,53 +179,53 @@ class bt {
189
179
  }
190
180
  /** Remove direction */
191
181
  get removeDirection() {
192
- return !this.removedCount || this.insertedCount ? m.NONE : (this.oldSelection.end === this.cursorPos || this.oldSelection.start === this.cursorPos) && // if not range removed (event with backspace)
193
- this.oldSelection.end === this.oldSelection.start ? m.RIGHT : m.LEFT;
182
+ return !this.removedCount || this.insertedCount ? f.NONE : (this.oldSelection.end === this.cursorPos || this.oldSelection.start === this.cursorPos) && // if not range removed (event with backspace)
183
+ this.oldSelection.end === this.oldSelection.start ? f.RIGHT : f.LEFT;
194
184
  }
195
185
  }
196
- function C(r, e) {
197
- return new C.InputMask(r, e);
186
+ function _(r, e) {
187
+ return new _.InputMask(r, e);
198
188
  }
199
- function et(r) {
189
+ function it(r) {
200
190
  if (r == null) throw new Error("mask property should be defined");
201
- return r instanceof RegExp ? C.MaskedRegExp : he(r) ? C.MaskedPattern : r === Date ? C.MaskedDate : r === Number ? C.MaskedNumber : Array.isArray(r) || r === Array ? C.MaskedDynamic : C.Masked && r.prototype instanceof C.Masked ? r : C.Masked && r instanceof C.Masked ? r.constructor : r instanceof Function ? C.MaskedFunction : C.Masked;
191
+ return r instanceof RegExp ? _.MaskedRegExp : le(r) ? _.MaskedPattern : r === Date ? _.MaskedDate : r === Number ? _.MaskedNumber : Array.isArray(r) || r === Array ? _.MaskedDynamic : _.Masked && r.prototype instanceof _.Masked ? r : _.Masked && r instanceof _.Masked ? r.constructor : r instanceof Function ? _.MaskedFunction : _.Masked;
202
192
  }
203
- function xe(r) {
193
+ function be(r) {
204
194
  if (!r) throw new Error("Options in not defined");
205
- if (C.Masked) {
206
- if (r.prototype instanceof C.Masked) return {
195
+ if (_.Masked) {
196
+ if (r.prototype instanceof _.Masked) return {
207
197
  mask: r
208
198
  };
209
199
  const {
210
200
  mask: e = void 0,
211
201
  ...t
212
- } = r instanceof C.Masked ? {
202
+ } = r instanceof _.Masked ? {
213
203
  mask: r
214
- } : Ke(r) && r.mask instanceof C.Masked ? r : {};
204
+ } : Ze(r) && r.mask instanceof _.Masked ? r : {};
215
205
  if (e) {
216
206
  const s = e.mask;
217
207
  return {
218
- ...Qe(e, (a, i) => !i.startsWith("_")),
208
+ ...st(e, (i, a) => !a.startsWith("_")),
219
209
  mask: e.constructor,
220
210
  _mask: s,
221
211
  ...t
222
212
  };
223
213
  }
224
214
  }
225
- return Ke(r) ? {
215
+ return Ze(r) ? {
226
216
  ...r
227
217
  } : {
228
218
  mask: r
229
219
  };
230
220
  }
231
- function ie(r) {
232
- if (C.Masked && r instanceof C.Masked) return r;
233
- const e = xe(r), t = et(e.mask);
221
+ function ae(r) {
222
+ if (_.Masked && r instanceof _.Masked) return r;
223
+ const e = be(r), t = it(e.mask);
234
224
  if (!t) throw new Error("Masked class is not found for provided mask " + e.mask + ", appropriate module needs to be imported manually before creating mask.");
235
225
  return e.mask === t && delete e.mask, e._mask && (e.mask = e._mask, delete e._mask), new t(e);
236
226
  }
237
- C.createMask = ie;
238
- class He {
227
+ _.createMask = ae;
228
+ class je {
239
229
  /** */
240
230
  /** */
241
231
  /** */
@@ -273,9 +263,9 @@ class He {
273
263
  /** */
274
264
  /** */
275
265
  }
276
- C.MaskElement = He;
277
- const Ge = 90, Ft = 89;
278
- class Re extends He {
266
+ _.MaskElement = je;
267
+ const We = 90, bt = 89;
268
+ class Re extends je {
279
269
  /** HTMLElement to use mask on */
280
270
  constructor(e) {
281
271
  super(), this.input = e, this._onKeydown = this._onKeydown.bind(this), this._onInput = this._onInput.bind(this), this._onBeforeinput = this._onBeforeinput.bind(this), this._onCompositionEnd = this._onCompositionEnd.bind(this);
@@ -293,9 +283,9 @@ class Re extends He {
293
283
  this.input.addEventListener("keydown", this._onKeydown), this.input.addEventListener("input", this._onInput), this.input.addEventListener("beforeinput", this._onBeforeinput), this.input.addEventListener("compositionend", this._onCompositionEnd), this.input.addEventListener("drop", e.drop), this.input.addEventListener("click", e.click), this.input.addEventListener("focus", e.focus), this.input.addEventListener("blur", e.commit), this._handlers = e;
294
284
  }
295
285
  _onKeydown(e) {
296
- if (this._handlers.redo && (e.keyCode === Ge && e.shiftKey && (e.metaKey || e.ctrlKey) || e.keyCode === Ft && e.ctrlKey))
286
+ if (this._handlers.redo && (e.keyCode === We && e.shiftKey && (e.metaKey || e.ctrlKey) || e.keyCode === bt && e.ctrlKey))
297
287
  return e.preventDefault(), this._handlers.redo(e);
298
- if (this._handlers.undo && e.keyCode === Ge && (e.metaKey || e.ctrlKey))
288
+ if (this._handlers.undo && e.keyCode === We && (e.metaKey || e.ctrlKey))
299
289
  return e.preventDefault(), this._handlers.undo(e);
300
290
  e.isComposing || this._handlers.selectionChange(e);
301
291
  }
@@ -316,8 +306,8 @@ class Re extends He {
316
306
  this.input.removeEventListener("keydown", this._onKeydown), this.input.removeEventListener("input", this._onInput), this.input.removeEventListener("beforeinput", this._onBeforeinput), this.input.removeEventListener("compositionend", this._onCompositionEnd), this.input.removeEventListener("drop", this._handlers.drop), this.input.removeEventListener("click", this._handlers.click), this.input.removeEventListener("focus", this._handlers.focus), this.input.removeEventListener("blur", this._handlers.commit), this._handlers = {};
317
307
  }
318
308
  }
319
- C.HTMLMaskElement = Re;
320
- class xt extends Re {
309
+ _.HTMLMaskElement = Re;
310
+ class Ft extends Re {
321
311
  /** InputElement to use mask on */
322
312
  constructor(e) {
323
313
  super(e), this.input = e;
@@ -341,25 +331,25 @@ class xt extends Re {
341
331
  this.input.value = e;
342
332
  }
343
333
  }
344
- C.HTMLMaskElement = Re;
345
- class tt extends Re {
334
+ _.HTMLMaskElement = Re;
335
+ class at extends Re {
346
336
  /** Returns HTMLElement selection start */
347
337
  get _unsafeSelectionStart() {
348
- const e = this.rootElement, t = e.getSelection && e.getSelection(), s = t && t.anchorOffset, a = t && t.focusOffset;
349
- return a == null || s == null || s < a ? s : a;
338
+ const e = this.rootElement, t = e.getSelection && e.getSelection(), s = t && t.anchorOffset, i = t && t.focusOffset;
339
+ return i == null || s == null || s < i ? s : i;
350
340
  }
351
341
  /** Returns HTMLElement selection end */
352
342
  get _unsafeSelectionEnd() {
353
- const e = this.rootElement, t = e.getSelection && e.getSelection(), s = t && t.anchorOffset, a = t && t.focusOffset;
354
- return a == null || s == null || s > a ? s : a;
343
+ const e = this.rootElement, t = e.getSelection && e.getSelection(), s = t && t.anchorOffset, i = t && t.focusOffset;
344
+ return i == null || s == null || s > i ? s : i;
355
345
  }
356
346
  /** Sets HTMLElement selection */
357
347
  _unsafeSelect(e, t) {
358
348
  if (!this.rootElement.createRange) return;
359
349
  const s = this.rootElement.createRange();
360
350
  s.setStart(this.input.firstChild || this.input, e), s.setEnd(this.input.lastChild || this.input, t);
361
- const a = this.rootElement, i = a.getSelection && a.getSelection();
362
- i && (i.removeAllRanges(), i.addRange(s));
351
+ const i = this.rootElement, a = i.getSelection && i.getSelection();
352
+ a && (a.removeAllRanges(), a.addRange(s));
363
353
  }
364
354
  /** HTMLElement value */
365
355
  get value() {
@@ -369,7 +359,7 @@ class tt extends Re {
369
359
  this.input.textContent = e;
370
360
  }
371
361
  }
372
- C.HTMLContenteditableMaskElement = tt;
362
+ _.HTMLContenteditableMaskElement = at;
373
363
  class Pe {
374
364
  constructor() {
375
365
  this.states = [], this.currentIndex = 0;
@@ -397,13 +387,13 @@ class Pe {
397
387
  }
398
388
  }
399
389
  Pe.MAX_LENGTH = 100;
400
- class Dt {
390
+ class xt {
401
391
  /**
402
392
  View element
403
393
  */
404
394
  /** Internal {@link Masked} model */
405
395
  constructor(e, t) {
406
- this.el = e instanceof He ? e : e.isContentEditable && e.tagName !== "INPUT" && e.tagName !== "TEXTAREA" ? new tt(e) : new xt(e), this.masked = ie(t), this._listeners = {}, this._value = "", this._unmaskedValue = "", this._rawInputValue = "", this.history = new Pe(), this._saveSelection = this._saveSelection.bind(this), this._onInput = this._onInput.bind(this), this._onChange = this._onChange.bind(this), this._onDrop = this._onDrop.bind(this), this._onFocus = this._onFocus.bind(this), this._onClick = this._onClick.bind(this), this._onUndo = this._onUndo.bind(this), this._onRedo = this._onRedo.bind(this), this.alignCursor = this.alignCursor.bind(this), this.alignCursorFriendly = this.alignCursorFriendly.bind(this), this._bindEvents(), this.updateValue(), this._onChange();
396
+ this.el = e instanceof je ? e : e.isContentEditable && e.tagName !== "INPUT" && e.tagName !== "TEXTAREA" ? new at(e) : new Ft(e), this.masked = ae(t), this._listeners = {}, this._value = "", this._unmaskedValue = "", this._rawInputValue = "", this.history = new Pe(), this._saveSelection = this._saveSelection.bind(this), this._onInput = this._onInput.bind(this), this._onChange = this._onChange.bind(this), this._onDrop = this._onDrop.bind(this), this._onFocus = this._onFocus.bind(this), this._onClick = this._onClick.bind(this), this._onUndo = this._onUndo.bind(this), this._onRedo = this._onRedo.bind(this), this.alignCursor = this.alignCursor.bind(this), this.alignCursorFriendly = this.alignCursorFriendly.bind(this), this._bindEvents(), this.updateValue(), this._onChange();
407
397
  }
408
398
  maskEquals(e) {
409
399
  var t;
@@ -415,13 +405,13 @@ class Dt {
415
405
  }
416
406
  set mask(e) {
417
407
  if (this.maskEquals(e)) return;
418
- if (!(e instanceof C.Masked) && this.masked.constructor === et(e)) {
408
+ if (!(e instanceof _.Masked) && this.masked.constructor === it(e)) {
419
409
  this.masked.updateOptions({
420
410
  mask: e
421
411
  });
422
412
  return;
423
413
  }
424
- const t = e instanceof C.Masked ? e : ie({
414
+ const t = e instanceof _.Masked ? e : ae({
425
415
  mask: e
426
416
  });
427
417
  t.unmaskedValue = this.masked.unmaskedValue, this.masked = t;
@@ -478,7 +468,7 @@ class Dt {
478
468
  /** Fires custom event */
479
469
  _fireEvent(e, t) {
480
470
  const s = this._listeners[e];
481
- s && s.forEach((a) => a(t));
471
+ s && s.forEach((i) => i(t));
482
472
  }
483
473
  /** Current selection start */
484
474
  get selectionStart() {
@@ -504,8 +494,8 @@ class Dt {
504
494
  }
505
495
  /** Syncronizes view from model value, fires change events */
506
496
  updateControl(e) {
507
- const t = this.masked.unmaskedValue, s = this.masked.value, a = this.masked.rawInputValue, i = this.displayValue, n = this.unmaskedValue !== t || this.value !== s || this._rawInputValue !== a;
508
- this._unmaskedValue = t, this._value = s, this._rawInputValue = a, this.el.value !== i && (this.el.value = i), e === "auto" ? this.alignCursor() : e != null && (this.cursorPos = e), n && this._fireChangeEvents(), !this._historyChanging && (n || this.history.isEmpty) && this.history.push({
497
+ const t = this.masked.unmaskedValue, s = this.masked.value, i = this.masked.rawInputValue, a = this.displayValue, n = this.unmaskedValue !== t || this.value !== s || this._rawInputValue !== i;
498
+ this._unmaskedValue = t, this._value = s, this._rawInputValue = i, this.el.value !== a && (this.el.value = a), e === "auto" ? this.alignCursor() : e != null && (this.cursorPos = e), n && this._fireChangeEvents(), !this._historyChanging && (n || this.history.isEmpty) && this.history.push({
509
499
  unmaskedValue: t,
510
500
  selection: {
511
501
  start: this.selectionStart,
@@ -518,8 +508,8 @@ class Dt {
518
508
  const {
519
509
  mask: t,
520
510
  ...s
521
- } = e, a = !this.maskEquals(t), i = this.masked.optionsIsChanged(s);
522
- a && (this.mask = t), i && this.masked.updateOptions(s), (a || i) && this.updateControl();
511
+ } = e, i = !this.maskEquals(t), a = this.masked.optionsIsChanged(s);
512
+ i && (this.mask = t), a && this.masked.updateOptions(s), (i || a) && this.updateControl();
523
513
  }
524
514
  /** Updates cursor */
525
515
  updateCursor(e) {
@@ -541,7 +531,7 @@ class Dt {
541
531
  }
542
532
  /** Aligns cursor to nearest available position */
543
533
  alignCursor() {
544
- this.cursorPos = this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos, m.LEFT));
534
+ this.cursorPos = this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos, f.LEFT));
545
535
  }
546
536
  /** Aligns cursor only if selection is empty */
547
537
  alignCursorFriendly() {
@@ -562,19 +552,19 @@ class Dt {
562
552
  /** Handles view input event */
563
553
  _onInput(e) {
564
554
  this._inputEvent = e, this._abortUpdateCursor();
565
- const t = new bt({
555
+ const t = new At({
566
556
  // new state
567
557
  value: this.el.value,
568
558
  cursorPos: this.cursorPos,
569
559
  // old state
570
560
  oldValue: this.displayValue,
571
561
  oldSelection: this._selection
572
- }), s = this.masked.rawInputValue, a = this.masked.splice(t.startChangePos, t.removed.length, t.inserted, t.removeDirection, {
562
+ }), s = this.masked.rawInputValue, i = this.masked.splice(t.startChangePos, t.removed.length, t.inserted, t.removeDirection, {
573
563
  input: !0,
574
564
  raw: !0
575
- }).offset, i = s === this.masked.rawInputValue ? t.removeDirection : m.NONE;
576
- let n = this.masked.nearestInputPos(t.startChangePos + a, i);
577
- i !== m.NONE && (n = this.masked.nearestInputPos(n, m.NONE)), this.updateControl(n), delete this._inputEvent;
565
+ }).offset, a = s === this.masked.rawInputValue ? t.removeDirection : f.NONE;
566
+ let n = this.masked.nearestInputPos(t.startChangePos + i, a);
567
+ a !== f.NONE && (n = this.masked.nearestInputPos(n, f.NONE)), this.updateControl(n), delete this._inputEvent;
578
568
  }
579
569
  /** Handles view change event and commits model value */
580
570
  _onChange() {
@@ -606,7 +596,7 @@ class Dt {
606
596
  this._unbindEvents(), this._listeners.length = 0, delete this.el;
607
597
  }
608
598
  }
609
- C.InputMask = Dt;
599
+ _.InputMask = xt;
610
600
  class F {
611
601
  /** Inserted symbols */
612
602
  /** Additional offset if any changes occurred before tail */
@@ -638,7 +628,7 @@ class F {
638
628
  return this.inserted === e.inserted && this.tailShift === e.tailShift && this.rawInserted === e.rawInserted && this.skip === e.skip;
639
629
  }
640
630
  }
641
- C.ChangeDetails = F;
631
+ _.ChangeDetails = F;
642
632
  class Q {
643
633
  /** Tail value as string */
644
634
  /** Tail start position */
@@ -678,7 +668,7 @@ class Q {
678
668
  return this.value = this.value.slice(0, -1), e;
679
669
  }
680
670
  }
681
- class z {
671
+ class j {
682
672
  /** */
683
673
  /** */
684
674
  /** Transforms value before mask processing */
@@ -694,7 +684,7 @@ class z {
694
684
  /** */
695
685
  constructor(e) {
696
686
  this._value = "", this._update({
697
- ...z.DEFAULTS,
687
+ ...j.DEFAULTS,
698
688
  ...e
699
689
  }), this._initialized = !0;
700
690
  }
@@ -783,7 +773,7 @@ class z {
783
773
  }
784
774
  /** Appends tail */
785
775
  appendTail(e) {
786
- return he(e) && (e = new Q(String(e))), e.appendTo(this);
776
+ return le(e) && (e = new Q(String(e))), e.appendTo(this);
787
777
  }
788
778
  /** Appends char */
789
779
  _appendCharRaw(e, t) {
@@ -795,36 +785,36 @@ class z {
795
785
  /** Appends char */
796
786
  _appendChar(e, t, s) {
797
787
  t === void 0 && (t = {});
798
- const a = this.state;
799
- let i;
800
- if ([e, i] = this.doPrepareChar(e, t), e && (i = i.aggregate(this._appendCharRaw(e, t)), !i.rawInserted && this.autofix === "pad")) {
788
+ const i = this.state;
789
+ let a;
790
+ if ([e, a] = this.doPrepareChar(e, t), e && (a = a.aggregate(this._appendCharRaw(e, t)), !a.rawInserted && this.autofix === "pad")) {
801
791
  const n = this.state;
802
- this.state = a;
792
+ this.state = i;
803
793
  let u = this.pad(t);
804
794
  const l = this._appendCharRaw(e, t);
805
- u = u.aggregate(l), l.rawInserted || u.equals(i) ? i = u : this.state = n;
795
+ u = u.aggregate(l), l.rawInserted || u.equals(a) ? a = u : this.state = n;
806
796
  }
807
- if (i.inserted) {
797
+ if (a.inserted) {
808
798
  let n, u = this.doValidate(t) !== !1;
809
799
  if (u && s != null) {
810
800
  const l = this.state;
811
801
  if (this.overwrite === !0) {
812
802
  n = s.state;
813
- for (let h = 0; h < i.rawInserted.length; ++h)
814
- s.unshift(this.displayValue.length - i.tailShift);
803
+ for (let p = 0; p < a.rawInserted.length; ++p)
804
+ s.unshift(this.displayValue.length - a.tailShift);
815
805
  }
816
806
  let o = this.appendTail(s);
817
807
  if (u = o.rawInserted.length === s.toString().length, !(u && o.inserted) && this.overwrite === "shift") {
818
808
  this.state = l, n = s.state;
819
- for (let h = 0; h < i.rawInserted.length; ++h)
809
+ for (let p = 0; p < a.rawInserted.length; ++p)
820
810
  s.shift();
821
811
  o = this.appendTail(s), u = o.rawInserted.length === s.toString().length;
822
812
  }
823
813
  u && o.inserted && (this.state = l);
824
814
  }
825
- u || (i = new F(), this.state = a, s && n && (s.state = n));
815
+ u || (a = new F(), this.state = i, s && n && (s.state = n));
826
816
  }
827
- return i;
817
+ return a;
828
818
  }
829
819
  /** Appends optional placeholder at the end */
830
820
  _appendPlaceholder() {
@@ -836,17 +826,17 @@ class z {
836
826
  }
837
827
  /** Appends symbols considering flags */
838
828
  append(e, t, s) {
839
- if (!he(e)) throw new Error("value should be string");
840
- const a = he(s) ? new Q(String(s)) : s;
829
+ if (!le(e)) throw new Error("value should be string");
830
+ const i = le(s) ? new Q(String(s)) : s;
841
831
  t != null && t.tail && (t._beforeTailState = this.state);
842
- let i;
843
- [e, i] = this.doPrepare(e, t);
832
+ let a;
833
+ [e, a] = this.doPrepare(e, t);
844
834
  for (let n = 0; n < e.length; ++n) {
845
- const u = this._appendChar(e[n], t, a);
846
- if (!u.rawInserted && !this.doSkipInvalid(e[n], t, a)) break;
847
- i.aggregate(u);
835
+ const u = this._appendChar(e[n], t, i);
836
+ if (!u.rawInserted && !this.doSkipInvalid(e[n], t, i)) break;
837
+ a.aggregate(u);
848
838
  }
849
- return (this.eager === !0 || this.eager === "append") && t != null && t.input && e && i.aggregate(this._appendEager()), a != null && (i.tailShift += this.appendTail(a).tailShift), i;
839
+ return (this.eager === !0 || this.eager === "append") && t != null && t.input && e && a.aggregate(this._appendEager()), i != null && (a.tailShift += this.appendTail(i).tailShift), a;
850
840
  }
851
841
  remove(e, t) {
852
842
  return e === void 0 && (e = 0), t === void 0 && (t = this.displayValue.length), this._value = this.displayValue.slice(0, e) + this.displayValue.slice(t), new F();
@@ -855,8 +845,8 @@ class z {
855
845
  withValueRefresh(e) {
856
846
  if (this._refreshing || !this._initialized) return e();
857
847
  this._refreshing = !0;
858
- const t = this.rawInputValue, s = this.value, a = e();
859
- return this.rawInputValue = t, this.value && this.value !== s && s.indexOf(this.value) === 0 && (this.append(s.slice(this.displayValue.length), {}, ""), this.doCommit()), delete this._refreshing, a;
848
+ const t = this.rawInputValue, s = this.value, i = e();
849
+ return this.rawInputValue = t, this.value && this.value !== s && s.indexOf(this.value) === 0 && (this.append(s.slice(this.displayValue.length), {}, ""), this.doCommit()), delete this._refreshing, i;
860
850
  }
861
851
  runIsolated(e) {
862
852
  if (this._isolated || !this._initialized) return e(this);
@@ -883,26 +873,26 @@ class z {
883
873
  doCommit() {
884
874
  this.commit && this.commit(this.value, this);
885
875
  }
886
- splice(e, t, s, a, i) {
887
- s === void 0 && (s = ""), a === void 0 && (a = m.NONE), i === void 0 && (i = {
876
+ splice(e, t, s, i, a) {
877
+ s === void 0 && (s = ""), i === void 0 && (i = f.NONE), a === void 0 && (a = {
888
878
  input: !0
889
879
  });
890
880
  const n = e + t, u = this.extractTail(n), l = this.eager === !0 || this.eager === "remove";
891
881
  let o;
892
- l && (a = At(a), o = this.extractInput(0, n, {
882
+ l && (i = Et(i), o = this.extractInput(0, n, {
893
883
  raw: !0
894
884
  }));
895
- let h = e;
896
- const c = new F();
897
- if (a !== m.NONE && (h = this.nearestInputPos(e, t > 1 && e !== 0 && !l ? m.NONE : a), c.tailShift = h - e), c.aggregate(this.remove(h)), l && a !== m.NONE && o === this.rawInputValue)
898
- if (a === m.FORCE_LEFT) {
899
- let k;
900
- for (; o === this.rawInputValue && (k = this.displayValue.length); )
901
- c.aggregate(new F({
885
+ let p = e;
886
+ const m = new F();
887
+ if (i !== f.NONE && (p = this.nearestInputPos(e, t > 1 && e !== 0 && !l ? f.NONE : i), m.tailShift = p - e), m.aggregate(this.remove(p)), l && i !== f.NONE && o === this.rawInputValue)
888
+ if (i === f.FORCE_LEFT) {
889
+ let A;
890
+ for (; o === this.rawInputValue && (A = this.displayValue.length); )
891
+ m.aggregate(new F({
902
892
  tailShift: -1
903
- })).aggregate(this.remove(k - 1));
904
- } else a === m.FORCE_RIGHT && u.unshift();
905
- return c.aggregate(this.append(s, i, u));
893
+ })).aggregate(this.remove(A - 1));
894
+ } else i === f.FORCE_RIGHT && u.unshift();
895
+ return m.aggregate(this.append(s, a, u));
906
896
  }
907
897
  maskEquals(e) {
908
898
  return this.mask === e;
@@ -912,18 +902,18 @@ class z {
912
902
  }
913
903
  typedValueEquals(e) {
914
904
  const t = this.typedValue;
915
- return e === t || z.EMPTY_VALUES.includes(e) && z.EMPTY_VALUES.includes(t) || (this.format ? this.format(e, this) === this.format(this.typedValue, this) : !1);
905
+ return e === t || j.EMPTY_VALUES.includes(e) && j.EMPTY_VALUES.includes(t) || (this.format ? this.format(e, this) === this.format(this.typedValue, this) : !1);
916
906
  }
917
907
  pad(e) {
918
908
  return new F();
919
909
  }
920
910
  }
921
- z.DEFAULTS = {
911
+ j.DEFAULTS = {
922
912
  skipInvalid: !0
923
913
  };
924
- z.EMPTY_VALUES = [void 0, null, ""];
925
- C.Masked = z;
926
- class fe {
914
+ j.EMPTY_VALUES = [void 0, null, ""];
915
+ _.Masked = j;
916
+ class pe {
927
917
  /** */
928
918
  constructor(e, t) {
929
919
  e === void 0 && (e = []), t === void 0 && (t = 0), this.chunks = e, this.from = t;
@@ -933,39 +923,39 @@ class fe {
933
923
  }
934
924
  extend(e) {
935
925
  if (!String(e)) return;
936
- e = he(e) ? new Q(String(e)) : e;
926
+ e = le(e) ? new Q(String(e)) : e;
937
927
  const t = this.chunks[this.chunks.length - 1], s = t && // if stops are same or tail has no stop
938
928
  (t.stop === e.stop || e.stop == null) && // if tail chunk goes just after last chunk
939
929
  e.from === t.from + t.toString().length;
940
930
  if (e instanceof Q)
941
931
  s ? t.extend(e.toString()) : this.chunks.push(e);
942
- else if (e instanceof fe) {
932
+ else if (e instanceof pe) {
943
933
  if (e.stop == null) {
944
- let a;
934
+ let i;
945
935
  for (; e.chunks.length && e.chunks[0].stop == null; )
946
- a = e.chunks.shift(), a.from += e.from, this.extend(a);
936
+ i = e.chunks.shift(), i.from += e.from, this.extend(i);
947
937
  }
948
938
  e.toString() && (e.stop = e.blockIndex, this.chunks.push(e));
949
939
  }
950
940
  }
951
941
  appendTo(e) {
952
- if (!(e instanceof C.MaskedPattern))
942
+ if (!(e instanceof _.MaskedPattern))
953
943
  return new Q(this.toString()).appendTo(e);
954
944
  const t = new F();
955
945
  for (let s = 0; s < this.chunks.length; ++s) {
956
- const a = this.chunks[s], i = e._mapPosToBlock(e.displayValue.length), n = a.stop;
946
+ const i = this.chunks[s], a = e._mapPosToBlock(e.displayValue.length), n = i.stop;
957
947
  let u;
958
948
  if (n != null && // if block not found or stop is behind lastBlock
959
- (!i || i.index <= n) && ((a instanceof fe || // for continuous block also check if stop is exist
960
- e._stops.indexOf(n) >= 0) && t.aggregate(e._appendPlaceholder(n)), u = a instanceof fe && e._blocks[n]), u) {
961
- const l = u.appendTail(a);
949
+ (!a || a.index <= n) && ((i instanceof pe || // for continuous block also check if stop is exist
950
+ e._stops.indexOf(n) >= 0) && t.aggregate(e._appendPlaceholder(n)), u = i instanceof pe && e._blocks[n]), u) {
951
+ const l = u.appendTail(i);
962
952
  t.aggregate(l);
963
- const o = a.toString().slice(l.rawInserted.length);
953
+ const o = i.toString().slice(l.rawInserted.length);
964
954
  o && t.aggregate(e.append(o, {
965
955
  tail: !0
966
956
  }));
967
957
  } else
968
- t.aggregate(e.append(a.toString(), {
958
+ t.aggregate(e.append(i.toString(), {
969
959
  tail: !0
970
960
  }));
971
961
  }
@@ -984,9 +974,9 @@ class fe {
984
974
  chunks: t,
985
975
  ...s
986
976
  } = e;
987
- Object.assign(this, s), this.chunks = t.map((a) => {
988
- const i = "chunks" in a ? new fe() : new Q();
989
- return i.state = a, i;
977
+ Object.assign(this, s), this.chunks = t.map((i) => {
978
+ const a = "chunks" in i ? new pe() : new Q();
979
+ return a.state = i, a;
990
980
  });
991
981
  }
992
982
  unshift(e) {
@@ -994,13 +984,13 @@ class fe {
994
984
  const t = e != null ? e - this.from : e;
995
985
  let s = 0;
996
986
  for (; s < this.chunks.length; ) {
997
- const a = this.chunks[s], i = a.unshift(t);
998
- if (a.toString()) {
999
- if (!i) break;
987
+ const i = this.chunks[s], a = i.unshift(t);
988
+ if (i.toString()) {
989
+ if (!a) break;
1000
990
  ++s;
1001
991
  } else
1002
992
  this.chunks.splice(s, 1);
1003
- if (i) return i;
993
+ if (a) return a;
1004
994
  }
1005
995
  return "";
1006
996
  }
@@ -1019,12 +1009,12 @@ class fe {
1019
1009
  return "";
1020
1010
  }
1021
1011
  }
1022
- class St {
1012
+ class Dt {
1023
1013
  constructor(e, t) {
1024
1014
  this.masked = e, this._log = [];
1025
1015
  const {
1026
1016
  offset: s,
1027
- index: a
1017
+ index: i
1028
1018
  } = e._mapPosToBlock(t) || (t < 0 ? (
1029
1019
  // first
1030
1020
  {
@@ -1038,7 +1028,7 @@ class St {
1038
1028
  offset: 0
1039
1029
  }
1040
1030
  ));
1041
- this.offset = s, this.index = a, this.ok = !1;
1031
+ this.offset = s, this.index = i, this.ok = !1;
1042
1032
  }
1043
1033
  get block() {
1044
1034
  return this.masked._blocks[this.index];
@@ -1080,42 +1070,42 @@ class St {
1080
1070
  }
1081
1071
  pushLeftBeforeFilled() {
1082
1072
  return this._pushLeft(() => {
1083
- if (!(this.block.isFixed || !this.block.value) && (this.offset = this.block.nearestInputPos(this.offset, m.FORCE_LEFT), this.offset !== 0))
1073
+ if (!(this.block.isFixed || !this.block.value) && (this.offset = this.block.nearestInputPos(this.offset, f.FORCE_LEFT), this.offset !== 0))
1084
1074
  return !0;
1085
1075
  });
1086
1076
  }
1087
1077
  pushLeftBeforeInput() {
1088
1078
  return this._pushLeft(() => {
1089
1079
  if (!this.block.isFixed)
1090
- return this.offset = this.block.nearestInputPos(this.offset, m.LEFT), !0;
1080
+ return this.offset = this.block.nearestInputPos(this.offset, f.LEFT), !0;
1091
1081
  });
1092
1082
  }
1093
1083
  pushLeftBeforeRequired() {
1094
1084
  return this._pushLeft(() => {
1095
1085
  if (!(this.block.isFixed || this.block.isOptional && !this.block.value))
1096
- return this.offset = this.block.nearestInputPos(this.offset, m.LEFT), !0;
1086
+ return this.offset = this.block.nearestInputPos(this.offset, f.LEFT), !0;
1097
1087
  });
1098
1088
  }
1099
1089
  pushRightBeforeFilled() {
1100
1090
  return this._pushRight(() => {
1101
- if (!(this.block.isFixed || !this.block.value) && (this.offset = this.block.nearestInputPos(this.offset, m.FORCE_RIGHT), this.offset !== this.block.value.length))
1091
+ if (!(this.block.isFixed || !this.block.value) && (this.offset = this.block.nearestInputPos(this.offset, f.FORCE_RIGHT), this.offset !== this.block.value.length))
1102
1092
  return !0;
1103
1093
  });
1104
1094
  }
1105
1095
  pushRightBeforeInput() {
1106
1096
  return this._pushRight(() => {
1107
1097
  if (!this.block.isFixed)
1108
- return this.offset = this.block.nearestInputPos(this.offset, m.NONE), !0;
1098
+ return this.offset = this.block.nearestInputPos(this.offset, f.NONE), !0;
1109
1099
  });
1110
1100
  }
1111
1101
  pushRightBeforeRequired() {
1112
1102
  return this._pushRight(() => {
1113
1103
  if (!(this.block.isFixed || this.block.isOptional && !this.block.value))
1114
- return this.offset = this.block.nearestInputPos(this.offset, m.NONE), !0;
1104
+ return this.offset = this.block.nearestInputPos(this.offset, f.NONE), !0;
1115
1105
  });
1116
1106
  }
1117
1107
  }
1118
- class st {
1108
+ class nt {
1119
1109
  /** */
1120
1110
  /** */
1121
1111
  /** */
@@ -1144,17 +1134,17 @@ class st {
1144
1134
  return e === void 0 && (e = 0), t === void 0 && (t = this._value.length), this._value = this._value.slice(0, e) + this._value.slice(t), this._value || (this._isRawInput = !1), new F();
1145
1135
  }
1146
1136
  nearestInputPos(e, t) {
1147
- t === void 0 && (t = m.NONE);
1148
- const s = 0, a = this._value.length;
1137
+ t === void 0 && (t = f.NONE);
1138
+ const s = 0, i = this._value.length;
1149
1139
  switch (t) {
1150
- case m.LEFT:
1151
- case m.FORCE_LEFT:
1140
+ case f.LEFT:
1141
+ case f.FORCE_LEFT:
1152
1142
  return s;
1153
- case m.NONE:
1154
- case m.RIGHT:
1155
- case m.FORCE_RIGHT:
1143
+ case f.NONE:
1144
+ case f.RIGHT:
1145
+ case f.FORCE_RIGHT:
1156
1146
  default:
1157
- return a;
1147
+ return i;
1158
1148
  }
1159
1149
  }
1160
1150
  totalInputPositions(e, t) {
@@ -1171,11 +1161,11 @@ class st {
1171
1161
  }
1172
1162
  _appendChar(e, t) {
1173
1163
  if (t === void 0 && (t = {}), this.isFilled) return new F();
1174
- const s = this.eager === !0 || this.eager === "append", a = this.char === e && (this.isUnmasking || t.input || t.raw) && (!t.raw || !s) && !t.tail, i = new F({
1164
+ const s = this.eager === !0 || this.eager === "append", i = this.char === e && (this.isUnmasking || t.input || t.raw) && (!t.raw || !s) && !t.tail, a = new F({
1175
1165
  inserted: this.char,
1176
- rawInserted: a ? this.char : ""
1166
+ rawInserted: i ? this.char : ""
1177
1167
  });
1178
- return this._value = this.char, this._isRawInput = a && (t.raw || t.input), i;
1168
+ return this._value = this.char, this._isRawInput = i && (t.raw || t.input), a;
1179
1169
  }
1180
1170
  _appendEager() {
1181
1171
  return this._appendChar(this.char, {
@@ -1190,11 +1180,11 @@ class st {
1190
1180
  return new Q("");
1191
1181
  }
1192
1182
  appendTail(e) {
1193
- return he(e) && (e = new Q(String(e))), e.appendTo(this);
1183
+ return le(e) && (e = new Q(String(e))), e.appendTo(this);
1194
1184
  }
1195
1185
  append(e, t, s) {
1196
- const a = this._appendChar(e[0], t);
1197
- return s != null && (a.tailShift += this.appendTail(s).tailShift), a;
1186
+ const i = this._appendChar(e[0], t);
1187
+ return s != null && (i.tailShift += this.appendTail(s).tailShift), i;
1198
1188
  }
1199
1189
  doCommit() {
1200
1190
  }
@@ -1224,17 +1214,17 @@ class Oe {
1224
1214
  const {
1225
1215
  parent: t,
1226
1216
  isOptional: s,
1227
- placeholderChar: a,
1228
- displayChar: i,
1217
+ placeholderChar: i,
1218
+ displayChar: a,
1229
1219
  lazy: n,
1230
1220
  eager: u,
1231
1221
  ...l
1232
1222
  } = e;
1233
- this.masked = ie(l), Object.assign(this, {
1223
+ this.masked = ae(l), Object.assign(this, {
1234
1224
  parent: t,
1235
1225
  isOptional: s,
1236
- placeholderChar: a,
1237
- displayChar: i,
1226
+ placeholderChar: i,
1227
+ displayChar: a,
1238
1228
  lazy: n,
1239
1229
  eager: u
1240
1230
  });
@@ -1263,8 +1253,8 @@ class Oe {
1263
1253
  _appendChar(e, t) {
1264
1254
  if (t === void 0 && (t = {}), this.isFilled) return new F();
1265
1255
  const s = this.masked.state;
1266
- let a = this.masked._appendChar(e, this.currentMaskFlags(t));
1267
- return a.inserted && this.doValidate(t) === !1 && (a = new F(), this.masked.state = s), !a.inserted && !this.isOptional && !this.lazy && !t.input && (a.inserted = this.placeholderChar), a.skip = !a.inserted && !this.isOptional, this.isFilled = !!a.inserted, a;
1256
+ let i = this.masked._appendChar(e, this.currentMaskFlags(t));
1257
+ return i.inserted && this.doValidate(t) === !1 && (i = new F(), this.masked.state = s), !i.inserted && !this.isOptional && !this.lazy && !t.input && (i.inserted = this.placeholderChar), i.skip = !i.inserted && !this.isOptional, this.isFilled = !!i.inserted, i;
1268
1258
  }
1269
1259
  append(e, t, s) {
1270
1260
  return this.masked.append(e, this.currentMaskFlags(t), s);
@@ -1287,18 +1277,18 @@ class Oe {
1287
1277
  return e === void 0 && (e = 0), t === void 0 && (t = this.value.length), this.masked.extractInput(e, t, s);
1288
1278
  }
1289
1279
  nearestInputPos(e, t) {
1290
- t === void 0 && (t = m.NONE);
1291
- const s = 0, a = this.value.length, i = Math.min(Math.max(e, s), a);
1280
+ t === void 0 && (t = f.NONE);
1281
+ const s = 0, i = this.value.length, a = Math.min(Math.max(e, s), i);
1292
1282
  switch (t) {
1293
- case m.LEFT:
1294
- case m.FORCE_LEFT:
1295
- return this.isComplete ? i : s;
1296
- case m.RIGHT:
1297
- case m.FORCE_RIGHT:
1298
- return this.isComplete ? i : a;
1299
- case m.NONE:
1283
+ case f.LEFT:
1284
+ case f.FORCE_LEFT:
1285
+ return this.isComplete ? a : s;
1286
+ case f.RIGHT:
1287
+ case f.FORCE_RIGHT:
1288
+ return this.isComplete ? a : i;
1289
+ case f.NONE:
1300
1290
  default:
1301
- return i;
1291
+ return a;
1302
1292
  }
1303
1293
  }
1304
1294
  totalInputPositions(e, t) {
@@ -1338,7 +1328,7 @@ Oe.DEFAULT_DEFINITIONS = {
1338
1328
  // http://stackoverflow.com/a/22075070
1339
1329
  "*": /./
1340
1330
  };
1341
- class Mt extends z {
1331
+ class St extends j {
1342
1332
  /** */
1343
1333
  /** Enable characters overwriting */
1344
1334
  /** */
@@ -1352,8 +1342,8 @@ class Mt extends z {
1352
1342
  t && (e.validate = (s) => s.search(t) >= 0), super._update(e);
1353
1343
  }
1354
1344
  }
1355
- C.MaskedRegExp = Mt;
1356
- class H extends z {
1345
+ _.MaskedRegExp = St;
1346
+ class z extends j {
1357
1347
  /** */
1358
1348
  /** */
1359
1349
  /** Single char for empty input */
@@ -1365,7 +1355,7 @@ class H extends z {
1365
1355
  /** */
1366
1356
  constructor(e) {
1367
1357
  super({
1368
- ...H.DEFAULTS,
1358
+ ...z.DEFAULTS,
1369
1359
  ...e,
1370
1360
  definitions: Object.assign({}, Oe.DEFAULT_DEFINITIONS, e?.definitions)
1371
1361
  });
@@ -1381,37 +1371,37 @@ class H extends z {
1381
1371
  this._blocks = [], this.exposeBlock = void 0, this._stops = [], this._maskedBlocks = {};
1382
1372
  const t = this.mask;
1383
1373
  if (!t || !e) return;
1384
- let s = !1, a = !1;
1385
- for (let i = 0; i < t.length; ++i) {
1374
+ let s = !1, i = !1;
1375
+ for (let a = 0; a < t.length; ++a) {
1386
1376
  if (this.blocks) {
1387
- const o = t.slice(i), h = Object.keys(this.blocks).filter((k) => o.indexOf(k) === 0);
1388
- h.sort((k, v) => v.length - k.length);
1389
- const c = h[0];
1390
- if (c) {
1377
+ const o = t.slice(a), p = Object.keys(this.blocks).filter((A) => o.indexOf(A) === 0);
1378
+ p.sort((A, v) => v.length - A.length);
1379
+ const m = p[0];
1380
+ if (m) {
1391
1381
  const {
1392
- expose: k,
1382
+ expose: A,
1393
1383
  repeat: v,
1394
- ...B
1395
- } = xe(this.blocks[c]), M = {
1384
+ ...V
1385
+ } = be(this.blocks[m]), x = {
1396
1386
  lazy: this.lazy,
1397
1387
  eager: this.eager,
1398
1388
  placeholderChar: this.placeholderChar,
1399
1389
  displayChar: this.displayChar,
1400
1390
  overwrite: this.overwrite,
1401
1391
  autofix: this.autofix,
1402
- ...B,
1392
+ ...V,
1403
1393
  repeat: v,
1404
1394
  parent: this
1405
- }, O = v != null ? new C.RepeatBlock(
1406
- M
1395
+ }, M = v != null ? new _.RepeatBlock(
1396
+ x
1407
1397
  /* TODO */
1408
- ) : ie(M);
1409
- O && (this._blocks.push(O), k && (this.exposeBlock = O), this._maskedBlocks[c] || (this._maskedBlocks[c] = []), this._maskedBlocks[c].push(this._blocks.length - 1)), i += c.length - 1;
1398
+ ) : ae(x);
1399
+ M && (this._blocks.push(M), A && (this.exposeBlock = M), this._maskedBlocks[m] || (this._maskedBlocks[m] = []), this._maskedBlocks[m].push(this._blocks.length - 1)), a += m.length - 1;
1410
1400
  continue;
1411
1401
  }
1412
1402
  }
1413
- let n = t[i], u = n in e;
1414
- if (n === H.STOP_CHAR) {
1403
+ let n = t[a], u = n in e;
1404
+ if (n === z.STOP_CHAR) {
1415
1405
  this._stops.push(this._blocks.length);
1416
1406
  continue;
1417
1407
  }
@@ -1420,22 +1410,22 @@ class H extends z {
1420
1410
  continue;
1421
1411
  }
1422
1412
  if (n === "[" || n === "]") {
1423
- a = !a;
1413
+ i = !i;
1424
1414
  continue;
1425
1415
  }
1426
- if (n === H.ESCAPE_CHAR) {
1427
- if (++i, n = t[i], !n) break;
1416
+ if (n === z.ESCAPE_CHAR) {
1417
+ if (++a, n = t[a], !n) break;
1428
1418
  u = !1;
1429
1419
  }
1430
1420
  const l = u ? new Oe({
1431
- isOptional: a,
1421
+ isOptional: i,
1432
1422
  lazy: this.lazy,
1433
1423
  eager: this.eager,
1434
1424
  placeholderChar: this.placeholderChar,
1435
1425
  displayChar: this.displayChar,
1436
- ...xe(e[n]),
1426
+ ...be(e[n]),
1437
1427
  parent: this
1438
- }) : new st({
1428
+ }) : new nt({
1439
1429
  char: n,
1440
1430
  eager: this.eager,
1441
1431
  isUnmasking: s
@@ -1458,7 +1448,7 @@ class H extends z {
1458
1448
  _blocks: t,
1459
1449
  ...s
1460
1450
  } = e;
1461
- this._blocks.forEach((a, i) => a.state = t[i]), super.state = s;
1451
+ this._blocks.forEach((i, a) => i.state = t[a]), super.state = s;
1462
1452
  }
1463
1453
  reset() {
1464
1454
  super.reset(), this._blocks.forEach((e) => e.reset());
@@ -1520,47 +1510,47 @@ class H extends z {
1520
1510
  let s = (e = this._mapPosToBlock(this.displayValue.length)) == null ? void 0 : e.index;
1521
1511
  if (s == null) return t;
1522
1512
  this._blocks[s].isFilled && ++s;
1523
- for (let a = s; a < this._blocks.length; ++a) {
1524
- const i = this._blocks[a]._appendEager();
1525
- if (!i.inserted) break;
1526
- t.aggregate(i);
1513
+ for (let i = s; i < this._blocks.length; ++i) {
1514
+ const a = this._blocks[i]._appendEager();
1515
+ if (!a.inserted) break;
1516
+ t.aggregate(a);
1527
1517
  }
1528
1518
  return t;
1529
1519
  }
1530
1520
  _appendCharRaw(e, t) {
1531
1521
  t === void 0 && (t = {});
1532
- const s = this._mapPosToBlock(this.displayValue.length), a = new F();
1533
- if (!s) return a;
1522
+ const s = this._mapPosToBlock(this.displayValue.length), i = new F();
1523
+ if (!s) return i;
1534
1524
  for (let n = s.index, u; u = this._blocks[n]; ++n) {
1535
- var i;
1525
+ var a;
1536
1526
  const l = u._appendChar(e, {
1537
1527
  ...t,
1538
- _beforeTailState: (i = t._beforeTailState) == null || (i = i._blocks) == null ? void 0 : i[n]
1528
+ _beforeTailState: (a = t._beforeTailState) == null || (a = a._blocks) == null ? void 0 : a[n]
1539
1529
  });
1540
- if (a.aggregate(l), l.consumed) break;
1530
+ if (i.aggregate(l), l.consumed) break;
1541
1531
  }
1542
- return a;
1532
+ return i;
1543
1533
  }
1544
1534
  extractTail(e, t) {
1545
1535
  e === void 0 && (e = 0), t === void 0 && (t = this.displayValue.length);
1546
- const s = new fe();
1547
- return e === t || this._forEachBlocksInRange(e, t, (a, i, n, u) => {
1548
- const l = a.extractTail(n, u);
1549
- l.stop = this._findStopBefore(i), l.from = this._blockStartPos(i), l instanceof fe && (l.blockIndex = i), s.extend(l);
1536
+ const s = new pe();
1537
+ return e === t || this._forEachBlocksInRange(e, t, (i, a, n, u) => {
1538
+ const l = i.extractTail(n, u);
1539
+ l.stop = this._findStopBefore(a), l.from = this._blockStartPos(a), l instanceof pe && (l.blockIndex = a), s.extend(l);
1550
1540
  }), s;
1551
1541
  }
1552
1542
  extractInput(e, t, s) {
1553
1543
  if (e === void 0 && (e = 0), t === void 0 && (t = this.displayValue.length), s === void 0 && (s = {}), e === t) return "";
1554
- let a = "";
1555
- return this._forEachBlocksInRange(e, t, (i, n, u, l) => {
1556
- a += i.extractInput(u, l, s);
1557
- }), a;
1544
+ let i = "";
1545
+ return this._forEachBlocksInRange(e, t, (a, n, u, l) => {
1546
+ i += a.extractInput(u, l, s);
1547
+ }), i;
1558
1548
  }
1559
1549
  _findStopBefore(e) {
1560
1550
  let t;
1561
1551
  for (let s = 0; s < this._stops.length; ++s) {
1562
- const a = this._stops[s];
1563
- if (a <= e) t = a;
1552
+ const i = this._stops[s];
1553
+ if (i <= e) t = i;
1564
1554
  else break;
1565
1555
  }
1566
1556
  return t;
@@ -1571,8 +1561,8 @@ class H extends z {
1571
1561
  if (this.lazy && e == null) return t;
1572
1562
  const s = this._mapPosToBlock(this.displayValue.length);
1573
1563
  if (!s) return t;
1574
- const a = s.index, i = e ?? this._blocks.length;
1575
- return this._blocks.slice(a, i).forEach((n) => {
1564
+ const i = s.index, a = e ?? this._blocks.length;
1565
+ return this._blocks.slice(i, a).forEach((n) => {
1576
1566
  if (!n.lazy || e != null) {
1577
1567
  var u;
1578
1568
  t.aggregate(n._appendPlaceholder((u = n._blocks) == null ? void 0 : u.length));
@@ -1583,11 +1573,11 @@ class H extends z {
1583
1573
  _mapPosToBlock(e) {
1584
1574
  let t = "";
1585
1575
  for (let s = 0; s < this._blocks.length; ++s) {
1586
- const a = this._blocks[s], i = t.length;
1587
- if (t += a.displayValue, e <= t.length)
1576
+ const i = this._blocks[s], a = t.length;
1577
+ if (t += i.displayValue, e <= t.length)
1588
1578
  return {
1589
1579
  index: s,
1590
- offset: e - i
1580
+ offset: e - a
1591
1581
  };
1592
1582
  }
1593
1583
  }
@@ -1596,46 +1586,46 @@ class H extends z {
1596
1586
  }
1597
1587
  _forEachBlocksInRange(e, t, s) {
1598
1588
  t === void 0 && (t = this.displayValue.length);
1599
- const a = this._mapPosToBlock(e);
1600
- if (a) {
1601
- const i = this._mapPosToBlock(t), n = i && a.index === i.index, u = a.offset, l = i && n ? i.offset : this._blocks[a.index].displayValue.length;
1602
- if (s(this._blocks[a.index], a.index, u, l), i && !n) {
1603
- for (let o = a.index + 1; o < i.index; ++o)
1589
+ const i = this._mapPosToBlock(e);
1590
+ if (i) {
1591
+ const a = this._mapPosToBlock(t), n = a && i.index === a.index, u = i.offset, l = a && n ? a.offset : this._blocks[i.index].displayValue.length;
1592
+ if (s(this._blocks[i.index], i.index, u, l), a && !n) {
1593
+ for (let o = i.index + 1; o < a.index; ++o)
1604
1594
  s(this._blocks[o], o, 0, this._blocks[o].displayValue.length);
1605
- s(this._blocks[i.index], i.index, 0, i.offset);
1595
+ s(this._blocks[a.index], a.index, 0, a.offset);
1606
1596
  }
1607
1597
  }
1608
1598
  }
1609
1599
  remove(e, t) {
1610
1600
  e === void 0 && (e = 0), t === void 0 && (t = this.displayValue.length);
1611
1601
  const s = super.remove(e, t);
1612
- return this._forEachBlocksInRange(e, t, (a, i, n, u) => {
1613
- s.aggregate(a.remove(n, u));
1602
+ return this._forEachBlocksInRange(e, t, (i, a, n, u) => {
1603
+ s.aggregate(i.remove(n, u));
1614
1604
  }), s;
1615
1605
  }
1616
1606
  nearestInputPos(e, t) {
1617
- if (t === void 0 && (t = m.NONE), !this._blocks.length) return 0;
1618
- const s = new St(this, e);
1619
- if (t === m.NONE)
1607
+ if (t === void 0 && (t = f.NONE), !this._blocks.length) return 0;
1608
+ const s = new Dt(this, e);
1609
+ if (t === f.NONE)
1620
1610
  return s.pushRightBeforeInput() || (s.popState(), s.pushLeftBeforeInput()) ? s.pos : this.displayValue.length;
1621
- if (t === m.LEFT || t === m.FORCE_LEFT) {
1622
- if (t === m.LEFT) {
1611
+ if (t === f.LEFT || t === f.FORCE_LEFT) {
1612
+ if (t === f.LEFT) {
1623
1613
  if (s.pushRightBeforeFilled(), s.ok && s.pos === e) return e;
1624
1614
  s.popState();
1625
1615
  }
1626
- if (s.pushLeftBeforeInput(), s.pushLeftBeforeRequired(), s.pushLeftBeforeFilled(), t === m.LEFT) {
1616
+ if (s.pushLeftBeforeInput(), s.pushLeftBeforeRequired(), s.pushLeftBeforeFilled(), t === f.LEFT) {
1627
1617
  if (s.pushRightBeforeInput(), s.pushRightBeforeRequired(), s.ok && s.pos <= e || (s.popState(), s.ok && s.pos <= e)) return s.pos;
1628
1618
  s.popState();
1629
1619
  }
1630
- return s.ok ? s.pos : t === m.FORCE_LEFT ? 0 : (s.popState(), s.ok || (s.popState(), s.ok) ? s.pos : 0);
1620
+ return s.ok ? s.pos : t === f.FORCE_LEFT ? 0 : (s.popState(), s.ok || (s.popState(), s.ok) ? s.pos : 0);
1631
1621
  }
1632
- return t === m.RIGHT || t === m.FORCE_RIGHT ? (s.pushRightBeforeInput(), s.pushRightBeforeRequired(), s.pushRightBeforeFilled() ? s.pos : t === m.FORCE_RIGHT ? this.displayValue.length : (s.popState(), s.ok || (s.popState(), s.ok) ? s.pos : this.nearestInputPos(e, m.LEFT))) : e;
1622
+ return t === f.RIGHT || t === f.FORCE_RIGHT ? (s.pushRightBeforeInput(), s.pushRightBeforeRequired(), s.pushRightBeforeFilled() ? s.pos : t === f.FORCE_RIGHT ? this.displayValue.length : (s.popState(), s.ok || (s.popState(), s.ok) ? s.pos : this.nearestInputPos(e, f.LEFT))) : e;
1633
1623
  }
1634
1624
  totalInputPositions(e, t) {
1635
1625
  e === void 0 && (e = 0), t === void 0 && (t = this.displayValue.length);
1636
1626
  let s = 0;
1637
- return this._forEachBlocksInRange(e, t, (a, i, n, u) => {
1638
- s += a.totalInputPositions(n, u);
1627
+ return this._forEachBlocksInRange(e, t, (i, a, n, u) => {
1628
+ s += i.totalInputPositions(n, u);
1639
1629
  }), s;
1640
1630
  }
1641
1631
  /** Get block by name */
@@ -1652,17 +1642,17 @@ class H extends z {
1652
1642
  return this._forEachBlocksInRange(0, this.displayValue.length, (s) => t.aggregate(s.pad(e))), t;
1653
1643
  }
1654
1644
  }
1655
- H.DEFAULTS = {
1656
- ...z.DEFAULTS,
1645
+ z.DEFAULTS = {
1646
+ ...j.DEFAULTS,
1657
1647
  lazy: !0,
1658
1648
  placeholderChar: "_"
1659
1649
  };
1660
- H.STOP_CHAR = "`";
1661
- H.ESCAPE_CHAR = "\\";
1662
- H.InputDefinition = Oe;
1663
- H.FixedDefinition = st;
1664
- C.MaskedPattern = H;
1665
- class Ve extends H {
1650
+ z.STOP_CHAR = "`";
1651
+ z.ESCAPE_CHAR = "\\";
1652
+ z.InputDefinition = Oe;
1653
+ z.FixedDefinition = nt;
1654
+ _.MaskedPattern = z;
1655
+ class Me extends z {
1666
1656
  /**
1667
1657
  Optionally sets max length of pattern.
1668
1658
  Used when pattern length is longer then `to` param length. Pads zeros at start in this case.
@@ -1682,11 +1672,11 @@ class Ve extends H {
1682
1672
  const {
1683
1673
  to: t = this.to || 0,
1684
1674
  from: s = this.from || 0,
1685
- maxLength: a = this.maxLength || 0,
1686
- autofix: i = this.autofix,
1675
+ maxLength: i = this.maxLength || 0,
1676
+ autofix: a = this.autofix,
1687
1677
  ...n
1688
1678
  } = e;
1689
- this.to = t, this.from = s, this.maxLength = Math.max(String(t).length, a), this.autofix = i;
1679
+ this.to = t, this.from = s, this.maxLength = Math.max(String(t).length, i), this.autofix = a;
1690
1680
  const u = String(this.from).padStart(this.maxLength, "0"), l = String(this.to).padStart(this.maxLength, "0");
1691
1681
  let o = 0;
1692
1682
  for (; o < l.length && l[o] === u[o]; ) ++o;
@@ -1697,8 +1687,8 @@ class Ve extends H {
1697
1687
  }
1698
1688
  boundaries(e) {
1699
1689
  let t = "", s = "";
1700
- const [, a, i] = e.match(/^(\D*)(\d*)(\D*)/) || [];
1701
- return i && (t = "0".repeat(a.length) + i, s = "9".repeat(a.length) + i), t = t.padEnd(this.maxLength, "0"), s = s.padEnd(this.maxLength, "9"), [t, s];
1690
+ const [, i, a] = e.match(/^(\D*)(\d*)(\D*)/) || [];
1691
+ return a && (t = "0".repeat(i.length) + a, s = "9".repeat(i.length) + a), t = t.padEnd(this.maxLength, "0"), s = s.padEnd(this.maxLength, "9"), [t, s];
1702
1692
  }
1703
1693
  doPrepareChar(e, t) {
1704
1694
  t === void 0 && (t = {});
@@ -1707,40 +1697,40 @@ class Ve extends H {
1707
1697
  }
1708
1698
  _appendCharRaw(e, t) {
1709
1699
  if (t === void 0 && (t = {}), !this.autofix || this.value.length + 1 > this.maxLength) return super._appendCharRaw(e, t);
1710
- const s = String(this.from).padStart(this.maxLength, "0"), a = String(this.to).padStart(this.maxLength, "0"), [i, n] = this.boundaries(this.value + e);
1711
- return Number(n) < this.from ? super._appendCharRaw(s[this.value.length], t) : Number(i) > this.to ? !t.tail && this.autofix === "pad" && this.value.length + 1 < this.maxLength ? super._appendCharRaw(s[this.value.length], t).aggregate(this._appendCharRaw(e, t)) : super._appendCharRaw(a[this.value.length], t) : super._appendCharRaw(e, t);
1700
+ const s = String(this.from).padStart(this.maxLength, "0"), i = String(this.to).padStart(this.maxLength, "0"), [a, n] = this.boundaries(this.value + e);
1701
+ return Number(n) < this.from ? super._appendCharRaw(s[this.value.length], t) : Number(a) > this.to ? !t.tail && this.autofix === "pad" && this.value.length + 1 < this.maxLength ? super._appendCharRaw(s[this.value.length], t).aggregate(this._appendCharRaw(e, t)) : super._appendCharRaw(i[this.value.length], t) : super._appendCharRaw(e, t);
1712
1702
  }
1713
1703
  doValidate(e) {
1714
1704
  const t = this.value;
1715
1705
  if (t.search(/[^0]/) === -1 && t.length <= this._matchFrom) return !0;
1716
- const [s, a] = this.boundaries(t);
1717
- return this.from <= Number(a) && Number(s) <= this.to && super.doValidate(e);
1706
+ const [s, i] = this.boundaries(t);
1707
+ return this.from <= Number(i) && Number(s) <= this.to && super.doValidate(e);
1718
1708
  }
1719
1709
  pad(e) {
1720
1710
  const t = new F();
1721
1711
  if (this.value.length === this.maxLength) return t;
1722
- const s = this.value, a = this.maxLength - this.value.length;
1723
- if (a) {
1712
+ const s = this.value, i = this.maxLength - this.value.length;
1713
+ if (i) {
1724
1714
  this.reset();
1725
- for (let i = 0; i < a; ++i)
1715
+ for (let a = 0; a < i; ++a)
1726
1716
  t.aggregate(super._appendCharRaw("0", e));
1727
- s.split("").forEach((i) => this._appendCharRaw(i));
1717
+ s.split("").forEach((a) => this._appendCharRaw(a));
1728
1718
  }
1729
1719
  return t;
1730
1720
  }
1731
1721
  }
1732
- C.MaskedRange = Ve;
1733
- const Bt = "d{.}`m{.}`Y";
1734
- class se extends H {
1722
+ _.MaskedRange = Me;
1723
+ const Mt = "d{.}`m{.}`Y";
1724
+ class te extends z {
1735
1725
  static extractPatternOptions(e) {
1736
1726
  const {
1737
1727
  mask: t,
1738
1728
  pattern: s,
1739
- ...a
1729
+ ...i
1740
1730
  } = e;
1741
1731
  return {
1742
- ...a,
1743
- mask: he(t) ? t : s
1732
+ ...i,
1733
+ mask: le(t) ? t : s
1744
1734
  };
1745
1735
  }
1746
1736
  /** Pattern mask for date according to {@link MaskedDate#format} */
@@ -1749,8 +1739,8 @@ class se extends H {
1749
1739
  /** Format typed value to string */
1750
1740
  /** Parse string to get typed value */
1751
1741
  constructor(e) {
1752
- super(se.extractPatternOptions({
1753
- ...se.DEFAULTS,
1742
+ super(te.extractPatternOptions({
1743
+ ...te.DEFAULTS,
1754
1744
  ...e
1755
1745
  }));
1756
1746
  }
@@ -1761,15 +1751,15 @@ class se extends H {
1761
1751
  const {
1762
1752
  mask: t,
1763
1753
  pattern: s,
1764
- blocks: a,
1765
- ...i
1754
+ blocks: i,
1755
+ ...a
1766
1756
  } = {
1767
- ...se.DEFAULTS,
1757
+ ...te.DEFAULTS,
1768
1758
  ...e
1769
- }, n = Object.assign({}, se.GET_DEFAULT_BLOCKS());
1770
- e.min && (n.Y.from = e.min.getFullYear()), e.max && (n.Y.to = e.max.getFullYear()), e.min && e.max && n.Y.from === n.Y.to && (n.m.from = e.min.getMonth() + 1, n.m.to = e.max.getMonth() + 1, n.m.from === n.m.to && (n.d.from = e.min.getDate(), n.d.to = e.max.getDate())), Object.assign(n, this.blocks, a), super._update({
1771
- ...i,
1772
- mask: he(t) ? t : s,
1759
+ }, n = Object.assign({}, te.GET_DEFAULT_BLOCKS());
1760
+ e.min && (n.Y.from = e.min.getFullYear()), e.max && (n.Y.to = e.max.getFullYear()), e.min && e.max && n.Y.from === n.Y.to && (n.m.from = e.min.getMonth() + 1, n.m.to = e.max.getMonth() + 1, n.m.from === n.m.to && (n.d.from = e.min.getDate(), n.d.to = e.max.getDate())), Object.assign(n, this.blocks, i), super._update({
1761
+ ...a,
1762
+ mask: le(t) ? t : s,
1773
1763
  blocks: n
1774
1764
  });
1775
1765
  }
@@ -1798,47 +1788,47 @@ class se extends H {
1798
1788
  return e === Date || super.maskEquals(e);
1799
1789
  }
1800
1790
  optionsIsChanged(e) {
1801
- return super.optionsIsChanged(se.extractPatternOptions(e));
1791
+ return super.optionsIsChanged(te.extractPatternOptions(e));
1802
1792
  }
1803
1793
  }
1804
- se.GET_DEFAULT_BLOCKS = () => ({
1794
+ te.GET_DEFAULT_BLOCKS = () => ({
1805
1795
  d: {
1806
- mask: Ve,
1796
+ mask: Me,
1807
1797
  from: 1,
1808
1798
  to: 31,
1809
1799
  maxLength: 2
1810
1800
  },
1811
1801
  m: {
1812
- mask: Ve,
1802
+ mask: Me,
1813
1803
  from: 1,
1814
1804
  to: 12,
1815
1805
  maxLength: 2
1816
1806
  },
1817
1807
  Y: {
1818
- mask: Ve,
1808
+ mask: Me,
1819
1809
  from: 1900,
1820
1810
  to: 9999
1821
1811
  }
1822
1812
  });
1823
- se.DEFAULTS = {
1824
- ...H.DEFAULTS,
1813
+ te.DEFAULTS = {
1814
+ ...z.DEFAULTS,
1825
1815
  mask: Date,
1826
- pattern: Bt,
1816
+ pattern: Mt,
1827
1817
  format: (r, e) => {
1828
1818
  if (!r) return "";
1829
- const t = String(r.getDate()).padStart(2, "0"), s = String(r.getMonth() + 1).padStart(2, "0"), a = r.getFullYear();
1830
- return [t, s, a].join(".");
1819
+ const t = String(r.getDate()).padStart(2, "0"), s = String(r.getMonth() + 1).padStart(2, "0"), i = r.getFullYear();
1820
+ return [t, s, i].join(".");
1831
1821
  },
1832
1822
  parse: (r, e) => {
1833
- const [t, s, a] = r.split(".").map(Number);
1834
- return new Date(a, s - 1, t);
1823
+ const [t, s, i] = r.split(".").map(Number);
1824
+ return new Date(i, s - 1, t);
1835
1825
  }
1836
1826
  };
1837
- C.MaskedDate = se;
1838
- class Le extends z {
1827
+ _.MaskedDate = te;
1828
+ class $e extends j {
1839
1829
  constructor(e) {
1840
1830
  super({
1841
- ...Le.DEFAULTS,
1831
+ ...$e.DEFAULTS,
1842
1832
  ...e
1843
1833
  }), this.currentMask = void 0;
1844
1834
  }
@@ -1849,14 +1839,14 @@ class Le extends z {
1849
1839
  super._update(e), "mask" in e && (this.exposeMask = void 0, this.compiledMasks = Array.isArray(e.mask) ? e.mask.map((t) => {
1850
1840
  const {
1851
1841
  expose: s,
1852
- ...a
1853
- } = xe(t), i = ie({
1842
+ ...i
1843
+ } = be(t), a = ae({
1854
1844
  overwrite: this._overwrite,
1855
1845
  eager: this._eager,
1856
1846
  skipInvalid: this._skipInvalid,
1857
- ...a
1847
+ ...i
1858
1848
  });
1859
- return s && (this.exposeMask = i), i;
1849
+ return s && (this.exposeMask = a), a;
1860
1850
  }) : []);
1861
1851
  }
1862
1852
  _appendCharRaw(e, t) {
@@ -1866,15 +1856,15 @@ class Le extends z {
1866
1856
  }
1867
1857
  _applyDispatch(e, t, s) {
1868
1858
  e === void 0 && (e = ""), t === void 0 && (t = {}), s === void 0 && (s = "");
1869
- const a = t.tail && t._beforeTailState != null ? t._beforeTailState._value : this.value, i = this.rawInputValue, n = t.tail && t._beforeTailState != null ? t._beforeTailState._rawInputValue : i, u = i.slice(n.length), l = this.currentMask, o = new F(), h = l?.state;
1859
+ const i = t.tail && t._beforeTailState != null ? t._beforeTailState._value : this.value, a = this.rawInputValue, n = t.tail && t._beforeTailState != null ? t._beforeTailState._rawInputValue : a, u = a.slice(n.length), l = this.currentMask, o = new F(), p = l?.state;
1870
1860
  return this.currentMask = this.doDispatch(e, {
1871
1861
  ...t
1872
1862
  }, s), this.currentMask && (this.currentMask !== l ? (this.currentMask.reset(), n && (this.currentMask.append(n, {
1873
1863
  raw: !0
1874
- }), o.tailShift = this.currentMask.value.length - a.length), u && (o.tailShift += this.currentMask.append(u, {
1864
+ }), o.tailShift = this.currentMask.value.length - i.length), u && (o.tailShift += this.currentMask.append(u, {
1875
1865
  raw: !0,
1876
1866
  tail: !0
1877
- }).tailShift)) : h && (this.currentMask.state = h)), o;
1867
+ }).tailShift)) : p && (this.currentMask.state = p)), o;
1878
1868
  }
1879
1869
  _appendPlaceholder() {
1880
1870
  const e = this._applyDispatch();
@@ -1903,21 +1893,21 @@ class Le extends z {
1903
1893
  }
1904
1894
  doPrepare(e, t) {
1905
1895
  t === void 0 && (t = {});
1906
- let [s, a] = super.doPrepare(e, t);
1896
+ let [s, i] = super.doPrepare(e, t);
1907
1897
  if (this.currentMask) {
1908
- let i;
1909
- [s, i] = super.doPrepare(s, this.currentMaskFlags(t)), a = a.aggregate(i);
1898
+ let a;
1899
+ [s, a] = super.doPrepare(s, this.currentMaskFlags(t)), i = i.aggregate(a);
1910
1900
  }
1911
- return [s, a];
1901
+ return [s, i];
1912
1902
  }
1913
1903
  doPrepareChar(e, t) {
1914
1904
  t === void 0 && (t = {});
1915
- let [s, a] = super.doPrepareChar(e, t);
1905
+ let [s, i] = super.doPrepareChar(e, t);
1916
1906
  if (this.currentMask) {
1917
- let i;
1918
- [s, i] = super.doPrepareChar(s, this.currentMaskFlags(t)), a = a.aggregate(i);
1907
+ let a;
1908
+ [s, a] = super.doPrepareChar(s, this.currentMaskFlags(t)), i = i.aggregate(a);
1919
1909
  }
1920
- return [s, a];
1910
+ return [s, i];
1921
1911
  }
1922
1912
  reset() {
1923
1913
  var e;
@@ -1975,10 +1965,10 @@ class Le extends z {
1975
1965
  const {
1976
1966
  compiledMasks: t,
1977
1967
  currentMaskRef: s,
1978
- currentMask: a,
1979
- ...i
1968
+ currentMask: i,
1969
+ ...a
1980
1970
  } = e;
1981
- t && this.compiledMasks.forEach((n, u) => n.state = t[u]), s != null && (this.currentMask = s, this.currentMask.state = a), super.state = i;
1971
+ t && this.compiledMasks.forEach((n, u) => n.state = t[u]), s != null && (this.currentMask = s, this.currentMask.state = i), super.state = a;
1982
1972
  }
1983
1973
  extractInput(e, t, s) {
1984
1974
  return this.currentMask ? this.currentMask.extractInput(e, t, s) : "";
@@ -2020,10 +2010,10 @@ class Le extends z {
2020
2010
  return Array.isArray(e) ? this.compiledMasks.every((t, s) => {
2021
2011
  if (!e[s]) return;
2022
2012
  const {
2023
- mask: a,
2024
- ...i
2013
+ mask: i,
2014
+ ...a
2025
2015
  } = e[s];
2026
- return Te(t, i) && t.maskEquals(a);
2016
+ return Te(t, a) && t.maskEquals(i);
2027
2017
  }) : super.maskEquals(e);
2028
2018
  }
2029
2019
  typedValueEquals(e) {
@@ -2031,28 +2021,28 @@ class Le extends z {
2031
2021
  return !!((t = this.currentMask) != null && t.typedValueEquals(e));
2032
2022
  }
2033
2023
  }
2034
- Le.DEFAULTS = {
2035
- ...z.DEFAULTS,
2024
+ $e.DEFAULTS = {
2025
+ ...j.DEFAULTS,
2036
2026
  dispatch: (r, e, t, s) => {
2037
2027
  if (!e.compiledMasks.length) return;
2038
- const a = e.rawInputValue, i = e.compiledMasks.map((n, u) => {
2039
- const l = e.currentMask === n, o = l ? n.displayValue.length : n.nearestInputPos(n.displayValue.length, m.FORCE_LEFT);
2040
- return n.rawInputValue !== a ? (n.reset(), n.append(a, {
2028
+ const i = e.rawInputValue, a = e.compiledMasks.map((n, u) => {
2029
+ const l = e.currentMask === n, o = l ? n.displayValue.length : n.nearestInputPos(n.displayValue.length, f.FORCE_LEFT);
2030
+ return n.rawInputValue !== i ? (n.reset(), n.append(i, {
2041
2031
  raw: !0
2042
2032
  })) : l || n.remove(o), n.append(r, e.currentMaskFlags(t)), n.appendTail(s), {
2043
2033
  index: u,
2044
2034
  weight: n.rawInputValue.length,
2045
- totalInputPositions: n.totalInputPositions(0, Math.max(o, n.nearestInputPos(n.displayValue.length, m.FORCE_LEFT)))
2035
+ totalInputPositions: n.totalInputPositions(0, Math.max(o, n.nearestInputPos(n.displayValue.length, f.FORCE_LEFT)))
2046
2036
  };
2047
2037
  });
2048
- return i.sort((n, u) => u.weight - n.weight || u.totalInputPositions - n.totalInputPositions), e.compiledMasks[i[0].index];
2038
+ return a.sort((n, u) => u.weight - n.weight || u.totalInputPositions - n.totalInputPositions), e.compiledMasks[a[0].index];
2049
2039
  }
2050
2040
  };
2051
- C.MaskedDynamic = Le;
2052
- class $e extends H {
2041
+ _.MaskedDynamic = $e;
2042
+ class Le extends z {
2053
2043
  constructor(e) {
2054
2044
  super({
2055
- ...$e.DEFAULTS,
2045
+ ...Le.DEFAULTS,
2056
2046
  ...e
2057
2047
  });
2058
2048
  }
@@ -2065,21 +2055,21 @@ class $e extends H {
2065
2055
  ...s
2066
2056
  } = e;
2067
2057
  if (t) {
2068
- const a = t.map((u) => u.length), i = Math.min(...a), n = Math.max(...a) - i;
2069
- s.mask = "*".repeat(i), n && (s.mask += "[" + "*".repeat(n) + "]"), this.enum = t;
2058
+ const i = t.map((u) => u.length), a = Math.min(...i), n = Math.max(...i) - a;
2059
+ s.mask = "*".repeat(a), n && (s.mask += "[" + "*".repeat(n) + "]"), this.enum = t;
2070
2060
  }
2071
2061
  super._update(s);
2072
2062
  }
2073
2063
  _appendCharRaw(e, t) {
2074
2064
  t === void 0 && (t = {});
2075
- const s = Math.min(this.nearestInputPos(0, m.FORCE_RIGHT), this.value.length), a = this.enum.filter((i) => this.matchValue(i, this.unmaskedValue + e, s));
2076
- if (a.length) {
2077
- a.length === 1 && this._forEachBlocksInRange(0, this.value.length, (n, u) => {
2078
- const l = a[0][u];
2065
+ const s = Math.min(this.nearestInputPos(0, f.FORCE_RIGHT), this.value.length), i = this.enum.filter((a) => this.matchValue(a, this.unmaskedValue + e, s));
2066
+ if (i.length) {
2067
+ i.length === 1 && this._forEachBlocksInRange(0, this.value.length, (n, u) => {
2068
+ const l = i[0][u];
2079
2069
  u >= this.value.length || l === n.value || (n.reset(), n._appendChar(l, t));
2080
2070
  });
2081
- const i = super._appendCharRaw(a[0][this.value.length], t);
2082
- return a.length === 1 && a[0].slice(this.unmaskedValue.length).split("").forEach((n) => i.aggregate(super._appendCharRaw(n))), i;
2071
+ const a = super._appendCharRaw(i[0][this.value.length], t);
2072
+ return i.length === 1 && i[0].slice(this.unmaskedValue.length).split("").forEach((n) => a.aggregate(super._appendCharRaw(n))), a;
2083
2073
  }
2084
2074
  return new F({
2085
2075
  skip: !this.isComplete
@@ -2090,23 +2080,23 @@ class $e extends H {
2090
2080
  }
2091
2081
  remove(e, t) {
2092
2082
  if (e === void 0 && (e = 0), t === void 0 && (t = this.displayValue.length), e === t) return new F();
2093
- const s = Math.min(super.nearestInputPos(0, m.FORCE_RIGHT), this.value.length);
2094
- let a;
2095
- for (a = e; a >= 0 && !(this.enum.filter((n) => this.matchValue(n, this.value.slice(s, a), s)).length > 1); --a)
2083
+ const s = Math.min(super.nearestInputPos(0, f.FORCE_RIGHT), this.value.length);
2084
+ let i;
2085
+ for (i = e; i >= 0 && !(this.enum.filter((n) => this.matchValue(n, this.value.slice(s, i), s)).length > 1); --i)
2096
2086
  ;
2097
- const i = super.remove(a, t);
2098
- return i.tailShift += a - e, i;
2087
+ const a = super.remove(i, t);
2088
+ return a.tailShift += i - e, a;
2099
2089
  }
2100
2090
  get isComplete() {
2101
2091
  return this.enum.indexOf(this.value) >= 0;
2102
2092
  }
2103
2093
  }
2104
- $e.DEFAULTS = {
2105
- ...H.DEFAULTS,
2094
+ Le.DEFAULTS = {
2095
+ ...z.DEFAULTS,
2106
2096
  matchValue: (r, e, t) => r.indexOf(e, t) === t
2107
2097
  };
2108
- C.MaskedEnum = $e;
2109
- class Vt extends z {
2098
+ _.MaskedEnum = Le;
2099
+ class Vt extends j {
2110
2100
  /** */
2111
2101
  /** Enable characters overwriting */
2112
2102
  /** */
@@ -2122,9 +2112,9 @@ class Vt extends z {
2122
2112
  });
2123
2113
  }
2124
2114
  }
2125
- C.MaskedFunction = Vt;
2126
- var at;
2127
- class K extends z {
2115
+ _.MaskedFunction = Vt;
2116
+ var rt;
2117
+ class G extends j {
2128
2118
  /** Single char */
2129
2119
  /** Single char */
2130
2120
  /** Array of single chars */
@@ -2141,7 +2131,7 @@ class K extends z {
2141
2131
  /** Parse string to get typed value */
2142
2132
  constructor(e) {
2143
2133
  super({
2144
- ...K.DEFAULTS,
2134
+ ...G.DEFAULTS,
2145
2135
  ...e
2146
2136
  });
2147
2137
  }
@@ -2164,7 +2154,7 @@ class K extends z {
2164
2154
  }
2165
2155
  doPrepareChar(e, t) {
2166
2156
  t === void 0 && (t = {});
2167
- const [s, a] = super.doPrepareChar(this._removeThousandsSeparators(this.scale && this.mapToRadix.length && /*
2157
+ const [s, i] = super.doPrepareChar(this._removeThousandsSeparators(this.scale && this.mapToRadix.length && /*
2168
2158
  radix should be mapped when
2169
2159
  1) input is done from keyboard = flags.input && flags.raw
2170
2160
  2) unmasked value is set = !flags.input && !flags.raw
@@ -2173,13 +2163,13 @@ class K extends z {
2173
2163
  2) raw value is set = !flags.input && flags.raw
2174
2164
  */
2175
2165
  (t.input && t.raw || !t.input && !t.raw) ? e.replace(this._mapToRadixRegExp, this.radix) : e), t);
2176
- return e && !s && (a.skip = !0), s && !this.allowPositive && !this.value && s !== "-" && a.aggregate(this._appendChar("-")), [s, a];
2166
+ return e && !s && (i.skip = !0), s && !this.allowPositive && !this.value && s !== "-" && i.aggregate(this._appendChar("-")), [s, i];
2177
2167
  }
2178
2168
  _separatorsCount(e, t) {
2179
2169
  t === void 0 && (t = !1);
2180
2170
  let s = 0;
2181
- for (let a = 0; a < e; ++a)
2182
- this._value.indexOf(this.thousandsSeparator, a) === a && (++s, t && (e += this.thousandsSeparator.length));
2171
+ for (let i = 0; i < e; ++i)
2172
+ this._value.indexOf(this.thousandsSeparator, i) === i && (++s, t && (e += this.thousandsSeparator.length));
2183
2173
  return s;
2184
2174
  }
2185
2175
  _separatorsCountFromSlice(e) {
@@ -2190,24 +2180,24 @@ class K extends z {
2190
2180
  }
2191
2181
  _appendCharRaw(e, t) {
2192
2182
  t === void 0 && (t = {});
2193
- const s = t.tail && t._beforeTailState ? t._beforeTailState._value : this._value, a = this._separatorsCountFromSlice(s);
2183
+ const s = t.tail && t._beforeTailState ? t._beforeTailState._value : this._value, i = this._separatorsCountFromSlice(s);
2194
2184
  this._value = this._removeThousandsSeparators(this.value);
2195
- const i = this._value;
2185
+ const a = this._value;
2196
2186
  this._value += e;
2197
2187
  const n = this.number;
2198
2188
  let u = !isNaN(n), l = !1;
2199
2189
  if (u) {
2200
- let k;
2201
- this.min != null && this.min < 0 && this.number < this.min && (k = this.min), this.max != null && this.max > 0 && this.number > this.max && (k = this.max), k != null && (this.autofix ? (this._value = this.format(k, this).replace(K.UNMASKED_RADIX, this.radix), l || (l = i === this._value && !t.tail)) : u = !1), u && (u = !!this._value.match(this._numberRegExp));
2190
+ let A;
2191
+ this.min != null && this.min < 0 && this.number < this.min && (A = this.min), this.max != null && this.max > 0 && this.number > this.max && (A = this.max), A != null && (this.autofix ? (this._value = this.format(A, this).replace(G.UNMASKED_RADIX, this.radix), l || (l = a === this._value && !t.tail)) : u = !1), u && (u = !!this._value.match(this._numberRegExp));
2202
2192
  }
2203
2193
  let o;
2204
2194
  u ? o = new F({
2205
- inserted: this._value.slice(i.length),
2195
+ inserted: this._value.slice(a.length),
2206
2196
  rawInserted: l ? "" : e,
2207
2197
  skip: l
2208
- }) : (this._value = i, o = new F()), this._value = this._insertThousandsSeparators(this._value);
2209
- const h = t.tail && t._beforeTailState ? t._beforeTailState._value : this._value, c = this._separatorsCountFromSlice(h);
2210
- return o.tailShift += (c - a) * this.thousandsSeparator.length, o;
2198
+ }) : (this._value = a, o = new F()), this._value = this._insertThousandsSeparators(this._value);
2199
+ const p = t.tail && t._beforeTailState ? t._beforeTailState._value : this._value, m = this._separatorsCountFromSlice(p);
2200
+ return o.tailShift += (m - i) * this.thousandsSeparator.length, o;
2211
2201
  }
2212
2202
  _findSeparatorAround(e) {
2213
2203
  if (this.thousandsSeparator) {
@@ -2219,34 +2209,34 @@ class K extends z {
2219
2209
  _adjustRangeWithSeparators(e, t) {
2220
2210
  const s = this._findSeparatorAround(e);
2221
2211
  s >= 0 && (e = s);
2222
- const a = this._findSeparatorAround(t);
2223
- return a >= 0 && (t = a + this.thousandsSeparator.length), [e, t];
2212
+ const i = this._findSeparatorAround(t);
2213
+ return i >= 0 && (t = i + this.thousandsSeparator.length), [e, t];
2224
2214
  }
2225
2215
  remove(e, t) {
2226
2216
  e === void 0 && (e = 0), t === void 0 && (t = this.displayValue.length), [e, t] = this._adjustRangeWithSeparators(e, t);
2227
- const s = this.value.slice(0, e), a = this.value.slice(t), i = this._separatorsCount(s.length);
2228
- this._value = this._insertThousandsSeparators(this._removeThousandsSeparators(s + a));
2217
+ const s = this.value.slice(0, e), i = this.value.slice(t), a = this._separatorsCount(s.length);
2218
+ this._value = this._insertThousandsSeparators(this._removeThousandsSeparators(s + i));
2229
2219
  const n = this._separatorsCountFromSlice(s);
2230
2220
  return new F({
2231
- tailShift: (n - i) * this.thousandsSeparator.length
2221
+ tailShift: (n - a) * this.thousandsSeparator.length
2232
2222
  });
2233
2223
  }
2234
2224
  nearestInputPos(e, t) {
2235
2225
  if (!this.thousandsSeparator) return e;
2236
2226
  switch (t) {
2237
- case m.NONE:
2238
- case m.LEFT:
2239
- case m.FORCE_LEFT: {
2227
+ case f.NONE:
2228
+ case f.LEFT:
2229
+ case f.FORCE_LEFT: {
2240
2230
  const s = this._findSeparatorAround(e - 1);
2241
2231
  if (s >= 0) {
2242
- const a = s + this.thousandsSeparator.length;
2243
- if (e < a || this.value.length <= a || t === m.FORCE_LEFT)
2232
+ const i = s + this.thousandsSeparator.length;
2233
+ if (e < i || this.value.length <= i || t === f.FORCE_LEFT)
2244
2234
  return s;
2245
2235
  }
2246
2236
  break;
2247
2237
  }
2248
- case m.RIGHT:
2249
- case m.FORCE_RIGHT: {
2238
+ case f.RIGHT:
2239
+ case f.FORCE_RIGHT: {
2250
2240
  const s = this._findSeparatorAround(e);
2251
2241
  if (s >= 0)
2252
2242
  return s + this.thousandsSeparator.length;
@@ -2266,7 +2256,7 @@ class K extends z {
2266
2256
  }
2267
2257
  _normalizeZeros(e) {
2268
2258
  const t = this._removeThousandsSeparators(e).split(this.radix);
2269
- return t[0] = t[0].replace(/^(\D*)(0*)(\d*)/, (s, a, i, n) => a + n), e.length && !/\d$/.test(t[0]) && (t[0] = t[0] + "0"), t.length > 1 && (t[1] = t[1].replace(/0*$/, ""), t[1].length || (t.length = 1)), this._insertThousandsSeparators(t.join(this.radix));
2259
+ return t[0] = t[0].replace(/^(\D*)(0*)(\d*)/, (s, i, a, n) => i + n), e.length && !/\d$/.test(t[0]) && (t[0] = t[0] + "0"), t.length > 1 && (t[1] = t[1].replace(/0*$/, ""), t[1].length || (t.length = 1)), this._insertThousandsSeparators(t.join(this.radix));
2270
2260
  }
2271
2261
  _padFractionalZeros(e) {
2272
2262
  if (!e) return e;
@@ -2275,11 +2265,11 @@ class K extends z {
2275
2265
  }
2276
2266
  doSkipInvalid(e, t, s) {
2277
2267
  t === void 0 && (t = {});
2278
- const a = this.scale === 0 && e !== this.thousandsSeparator && (e === this.radix || e === K.UNMASKED_RADIX || this.mapToRadix.includes(e));
2279
- return super.doSkipInvalid(e, t, s) && !a;
2268
+ const i = this.scale === 0 && e !== this.thousandsSeparator && (e === this.radix || e === G.UNMASKED_RADIX || this.mapToRadix.includes(e));
2269
+ return super.doSkipInvalid(e, t, s) && !i;
2280
2270
  }
2281
2271
  get unmaskedValue() {
2282
- return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix, K.UNMASKED_RADIX);
2272
+ return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix, G.UNMASKED_RADIX);
2283
2273
  }
2284
2274
  set unmaskedValue(e) {
2285
2275
  super.unmaskedValue = e;
@@ -2288,7 +2278,7 @@ class K extends z {
2288
2278
  return this.parse(this.unmaskedValue, this);
2289
2279
  }
2290
2280
  set typedValue(e) {
2291
- this.rawInputValue = this.format(e, this).replace(K.UNMASKED_RADIX, this.radix);
2281
+ this.rawInputValue = this.format(e, this).replace(G.UNMASKED_RADIX, this.radix);
2292
2282
  }
2293
2283
  /** Parsed Number */
2294
2284
  get number() {
@@ -2304,18 +2294,18 @@ class K extends z {
2304
2294
  return this.min != null && this.min > 0 || this.max != null && this.max > 0;
2305
2295
  }
2306
2296
  typedValueEquals(e) {
2307
- return (super.typedValueEquals(e) || K.EMPTY_VALUES.includes(e) && K.EMPTY_VALUES.includes(this.typedValue)) && !(e === 0 && this.value === "");
2297
+ return (super.typedValueEquals(e) || G.EMPTY_VALUES.includes(e) && G.EMPTY_VALUES.includes(this.typedValue)) && !(e === 0 && this.value === "");
2308
2298
  }
2309
2299
  }
2310
- at = K;
2311
- K.UNMASKED_RADIX = ".";
2312
- K.EMPTY_VALUES = [...z.EMPTY_VALUES, 0];
2313
- K.DEFAULTS = {
2314
- ...z.DEFAULTS,
2300
+ rt = G;
2301
+ G.UNMASKED_RADIX = ".";
2302
+ G.EMPTY_VALUES = [...j.EMPTY_VALUES, 0];
2303
+ G.DEFAULTS = {
2304
+ ...j.DEFAULTS,
2315
2305
  mask: Number,
2316
2306
  radix: ",",
2317
2307
  thousandsSeparator: "",
2318
- mapToRadix: [at.UNMASKED_RADIX],
2308
+ mapToRadix: [rt.UNMASKED_RADIX],
2319
2309
  min: Number.MIN_SAFE_INTEGER,
2320
2310
  max: Number.MAX_SAFE_INTEGER,
2321
2311
  scale: 2,
@@ -2327,24 +2317,24 @@ K.DEFAULTS = {
2327
2317
  maximumFractionDigits: 20
2328
2318
  })
2329
2319
  };
2330
- C.MaskedNumber = K;
2331
- const ze = {
2320
+ _.MaskedNumber = G;
2321
+ const He = {
2332
2322
  MASKED: "value",
2333
2323
  UNMASKED: "unmaskedValue",
2334
2324
  TYPED: "typedValue"
2335
2325
  };
2336
- function it(r, e, t) {
2337
- e === void 0 && (e = ze.MASKED), t === void 0 && (t = ze.MASKED);
2338
- const s = ie(r);
2339
- return (a) => s.runIsolated((i) => (i[e] = a, i[t]));
2326
+ function ut(r, e, t) {
2327
+ e === void 0 && (e = He.MASKED), t === void 0 && (t = He.MASKED);
2328
+ const s = ae(r);
2329
+ return (i) => s.runIsolated((a) => (a[e] = i, a[t]));
2340
2330
  }
2341
- function wt(r, e, t, s) {
2342
- return it(e, t, s)(r);
2331
+ function Bt(r, e, t, s) {
2332
+ return ut(e, t, s)(r);
2343
2333
  }
2344
- C.PIPE_TYPE = ze;
2345
- C.createPipe = it;
2346
- C.pipe = wt;
2347
- class It extends H {
2334
+ _.PIPE_TYPE = He;
2335
+ _.createPipe = ut;
2336
+ _.pipe = Bt;
2337
+ class wt extends z {
2348
2338
  get repeatFrom() {
2349
2339
  var e;
2350
2340
  return (e = Array.isArray(this.repeat) ? this.repeat[0] : this.repeat === 1 / 0 ? 0 : this.repeat) != null ? e : 0;
@@ -2360,15 +2350,15 @@ class It extends H {
2360
2350
  super.updateOptions(e);
2361
2351
  }
2362
2352
  _update(e) {
2363
- var t, s, a;
2353
+ var t, s, i;
2364
2354
  const {
2365
- repeat: i,
2355
+ repeat: a,
2366
2356
  ...n
2367
- } = xe(e);
2357
+ } = be(e);
2368
2358
  this._blockOpts = Object.assign({}, this._blockOpts, n);
2369
- const u = ie(this._blockOpts);
2370
- this.repeat = (t = (s = i ?? u.repeat) != null ? s : this.repeat) != null ? t : 1 / 0, super._update({
2371
- mask: "m".repeat(Math.max(this.repeatTo === 1 / 0 && ((a = this._blocks) == null ? void 0 : a.length) || 0, this.repeatFrom)),
2359
+ const u = ae(this._blockOpts);
2360
+ this.repeat = (t = (s = a ?? u.repeat) != null ? s : this.repeat) != null ? t : 1 / 0, super._update({
2361
+ mask: "m".repeat(Math.max(this.repeatTo === 1 / 0 && ((i = this._blocks) == null ? void 0 : i.length) || 0, this.repeatFrom)),
2372
2362
  blocks: {
2373
2363
  m: u
2374
2364
  },
@@ -2383,39 +2373,39 @@ class It extends H {
2383
2373
  _allocateBlock(e) {
2384
2374
  if (e < this._blocks.length) return this._blocks[e];
2385
2375
  if (this.repeatTo === 1 / 0 || this._blocks.length < this.repeatTo)
2386
- return this._blocks.push(ie(this._blockOpts)), this.mask += "m", this._blocks[this._blocks.length - 1];
2376
+ return this._blocks.push(ae(this._blockOpts)), this.mask += "m", this._blocks[this._blocks.length - 1];
2387
2377
  }
2388
2378
  _appendCharRaw(e, t) {
2389
2379
  t === void 0 && (t = {});
2390
2380
  const s = new F();
2391
2381
  for (
2392
- let l = (a = (i = this._mapPosToBlock(this.displayValue.length)) == null ? void 0 : i.index) != null ? a : Math.max(this._blocks.length - 1, 0), o, h;
2382
+ let l = (i = (a = this._mapPosToBlock(this.displayValue.length)) == null ? void 0 : a.index) != null ? i : Math.max(this._blocks.length - 1, 0), o, p;
2393
2383
  // try to get a block or
2394
2384
  // try to allocate a new block if not allocated already
2395
- o = (n = this._blocks[l]) != null ? n : h = !h && this._allocateBlock(l);
2385
+ o = (n = this._blocks[l]) != null ? n : p = !p && this._allocateBlock(l);
2396
2386
  ++l
2397
2387
  ) {
2398
- var a, i, n, u;
2399
- const c = o._appendChar(e, {
2388
+ var i, a, n, u;
2389
+ const m = o._appendChar(e, {
2400
2390
  ...t,
2401
2391
  _beforeTailState: (u = t._beforeTailState) == null || (u = u._blocks) == null ? void 0 : u[l]
2402
2392
  });
2403
- if (c.skip && h) {
2393
+ if (m.skip && p) {
2404
2394
  this._blocks.pop(), this.mask = this.mask.slice(1);
2405
2395
  break;
2406
2396
  }
2407
- if (s.aggregate(c), c.consumed) break;
2397
+ if (s.aggregate(m), m.consumed) break;
2408
2398
  }
2409
2399
  return s;
2410
2400
  }
2411
2401
  _trimEmptyTail(e, t) {
2412
- var s, a;
2402
+ var s, i;
2413
2403
  e === void 0 && (e = 0);
2414
- const i = Math.max(((s = this._mapPosToBlock(e)) == null ? void 0 : s.index) || 0, this.repeatFrom, 0);
2404
+ const a = Math.max(((s = this._mapPosToBlock(e)) == null ? void 0 : s.index) || 0, this.repeatFrom, 0);
2415
2405
  let n;
2416
- t != null && (n = (a = this._mapPosToBlock(t)) == null ? void 0 : a.index), n == null && (n = this._blocks.length - 1);
2406
+ t != null && (n = (i = this._mapPosToBlock(t)) == null ? void 0 : i.index), n == null && (n = this._blocks.length - 1);
2417
2407
  let u = 0;
2418
- for (let l = n; i <= l && !this._blocks[l].unmaskedValue; --l, ++u)
2408
+ for (let l = n; a <= l && !this._blocks[l].unmaskedValue; --l, ++u)
2419
2409
  ;
2420
2410
  u && (this._blocks.splice(n - u + 1, u), this.mask = this.mask.slice(u));
2421
2411
  }
@@ -2437,12 +2427,12 @@ class It extends H {
2437
2427
  this._blocks.length = e._blocks.length, this.mask = this.mask.slice(0, this._blocks.length), super.state = e;
2438
2428
  }
2439
2429
  }
2440
- C.RepeatBlock = It;
2430
+ _.RepeatBlock = wt;
2441
2431
  try {
2442
- globalThis.IMask = C;
2432
+ globalThis.IMask = _;
2443
2433
  } catch {
2444
2434
  }
2445
- var Tt = {
2435
+ var It = {
2446
2436
  // common
2447
2437
  mask: void 0,
2448
2438
  prepare: Function,
@@ -2509,67 +2499,67 @@ var Tt = {
2509
2499
  // dynamic
2510
2500
  dispatch: Function
2511
2501
  };
2512
- function Ot(r, e) {
2502
+ function Tt(r, e) {
2513
2503
  let {
2514
2504
  emit: t,
2515
2505
  onAccept: s,
2516
- onComplete: a,
2517
- defaultValue: i,
2506
+ onComplete: i,
2507
+ defaultValue: a,
2518
2508
  defaultUnmaskedValue: n,
2519
2509
  defaultTypedValue: u
2520
2510
  } = e === void 0 ? {} : e;
2521
- const l = ot(r) ? r : W(r), o = W(), h = W(), c = W(""), k = W(""), v = W();
2522
- let B, M = c.value, O = k.value, G = v.value;
2511
+ const l = ct(r) ? r : W(r), o = W(), p = W(), m = W(""), A = W(""), v = W();
2512
+ let V, x = m.value, M = A.value, P = v.value;
2523
2513
  function ne() {
2524
- G = v.value = h.value.typedValue, O = k.value = h.value.unmaskedValue, M = c.value = h.value.value;
2514
+ P = v.value = p.value.typedValue, M = A.value = p.value.unmaskedValue, x = m.value = p.value.value;
2525
2515
  }
2526
2516
  function D(b) {
2527
- ne(), t && (t("accept", c.value, b), t("accept:masked", c.value, b), t("accept:typed", v.value, b), t("accept:unmasked", k.value, b)), s?.(b);
2517
+ ne(), t && (t("accept", m.value, b), t("accept:masked", m.value, b), t("accept:typed", v.value, b), t("accept:unmasked", A.value, b)), s?.(b);
2528
2518
  }
2529
2519
  function R(b) {
2530
- t && (t("complete", h.value.value, b), t("complete:masked", h.value.value, b), t("complete:typed", h.value.typedValue, b), t("complete:unmasked", h.value.unmaskedValue, b)), a?.(b);
2520
+ t && (t("complete", p.value.value, b), t("complete:masked", p.value.value, b), t("complete:typed", p.value.typedValue, b), t("complete:unmasked", p.value.unmaskedValue, b)), i?.(b);
2531
2521
  }
2532
- const y = () => {
2533
- !h.value || k.value === void 0 || (O !== k.value && (h.value.unmaskedValue = k.value, h.value.unmaskedValue !== k.value && D()), O = void 0);
2522
+ const C = () => {
2523
+ !p.value || A.value === void 0 || (M !== A.value && (p.value.unmaskedValue = A.value, p.value.unmaskedValue !== A.value && D()), M = void 0);
2534
2524
  };
2535
- le(k, y);
2536
- const I = () => {
2537
- !h.value || c.value === void 0 || (M !== c.value && (h.value.value = c.value, h.value.value !== c.value && D()), M = void 0);
2525
+ se(A, C);
2526
+ const T = () => {
2527
+ !p.value || m.value === void 0 || (x !== m.value && (p.value.value = m.value, p.value.value !== m.value && D()), x = void 0);
2538
2528
  };
2539
- le(c, I);
2540
- const $ = () => {
2541
- !h.value || v.value === void 0 || (G !== v.value && (h.value.typedValue = v.value, h.value.masked.typedValueEquals(v.value) || D()), G = void 0);
2529
+ se(m, T);
2530
+ const U = () => {
2531
+ !p.value || v.value === void 0 || (P !== v.value && (p.value.typedValue = v.value, p.value.masked.typedValueEquals(v.value) || D()), P = void 0);
2542
2532
  };
2543
- le(v, $);
2544
- function P() {
2545
- B = o.value;
2533
+ se(v, U);
2534
+ function $() {
2535
+ V = o.value;
2546
2536
  const b = l.value;
2547
- !B || !(b != null && b.mask) || (h.value = C(B, b), i !== void 0 && (c.value = i), n !== void 0 && (k.value = n), u !== void 0 && (v.value = u), y(), I(), $(), ne(), h.value.on("accept", D).on("complete", R));
2537
+ !V || !(b != null && b.mask) || (p.value = _(V, b), a !== void 0 && (m.value = a), n !== void 0 && (A.value = n), u !== void 0 && (v.value = u), C(), T(), U(), ne(), p.value.on("accept", D).on("complete", R));
2548
2538
  }
2549
- function te() {
2539
+ function ee() {
2550
2540
  var b;
2551
- (b = h.value) == null || b.destroy(), h.value = void 0;
2541
+ (b = p.value) == null || b.destroy(), p.value = void 0;
2552
2542
  }
2553
- return dt(P), ct(te), le([o, l], () => {
2543
+ return ft($), mt(ee), se([o, l], () => {
2554
2544
  const b = o.value, S = l.value;
2555
- (!(S != null && S.mask) || b !== B) && te(), b && (h.value ? h.value.updateOptions(S) : P());
2545
+ (!(S != null && S.mask) || b !== V) && ee(), b && (p.value ? p.value.updateOptions(S) : $());
2556
2546
  }), {
2557
2547
  el: o,
2558
- mask: ht(h),
2559
- masked: c,
2560
- unmasked: k,
2548
+ mask: pt(p),
2549
+ masked: m,
2550
+ unmasked: A,
2561
2551
  typed: v
2562
2552
  };
2563
2553
  }
2564
- function Rt(r, e) {
2554
+ function Ot(r, e) {
2565
2555
  return r = {
2566
2556
  ...r
2567
2557
  }, Object.keys(r).forEach((t) => {
2568
2558
  (r[t] === void 0 || e.includes(t)) && delete r[t];
2569
2559
  }), r;
2570
2560
  }
2571
- const Pt = ["typed", "unmasked", "value", "modelValue"];
2572
- var Lt = ve({
2561
+ const Rt = ["typed", "unmasked", "value", "modelValue"];
2562
+ var Pt = ve({
2573
2563
  name: "imask-input",
2574
2564
  inheritAttrs: !1,
2575
2565
  props: {
@@ -2580,7 +2570,7 @@ var Lt = ve({
2580
2570
  typed: {
2581
2571
  validator: () => !0
2582
2572
  },
2583
- ...Tt
2573
+ ...It
2584
2574
  },
2585
2575
  emits: ["update:modelValue", "update:masked", "update:value", "update:unmasked", "update:typed", "accept", "accept:value", "accept:masked", "accept:unmasked", "accept:typed", "complete", "complete:value", "complete:masked", "complete:unmasked", "complete:typed"],
2586
2576
  setup(r, e) {
@@ -2589,40 +2579,40 @@ var Lt = ve({
2589
2579
  emit: s
2590
2580
  } = e;
2591
2581
  const {
2592
- el: a,
2593
- mask: i,
2582
+ el: i,
2583
+ mask: a,
2594
2584
  masked: n,
2595
2585
  unmasked: u,
2596
2586
  typed: l
2597
- } = Ot(Rt(r, Pt), {
2587
+ } = Tt(Ot(r, Rt), {
2598
2588
  emit: s,
2599
2589
  onAccept: (v) => {
2600
- const B = n.value;
2601
- s("accept:value", B, v), s("update:value", B, v), s("update:masked", B, v), s("update:modelValue", B, v), s("update:unmasked", u.value, v), s("update:typed", l.value, v);
2590
+ const V = n.value;
2591
+ s("accept:value", V, v), s("update:value", V, v), s("update:masked", V, v), s("update:modelValue", V, v), s("update:unmasked", u.value, v), s("update:typed", l.value, v);
2602
2592
  },
2603
2593
  onComplete: (v) => {
2604
2594
  s("complete:value", n.value, v);
2605
2595
  }
2606
- }), o = Ae(r, "value"), h = Ae(r, "modelValue"), c = Ae(r, "unmasked"), k = Ae(r, "typed");
2607
- return n.value = h.value || o.value || "", u.value = c.value || "", l.value = k.value, le(o, (v) => n.value = v), le(h, (v) => n.value = v), le(c, (v) => u.value = v), le(k, (v) => l.value = v), () => {
2596
+ }), o = Ce(r, "value"), p = Ce(r, "modelValue"), m = Ce(r, "unmasked"), A = Ce(r, "typed");
2597
+ return n.value = p.value || o.value || "", u.value = m.value || "", l.value = A.value, se(o, (v) => n.value = v), se(p, (v) => n.value = v), se(m, (v) => u.value = v), se(A, (v) => l.value = v), () => {
2608
2598
  const v = {
2609
2599
  ...t,
2610
- value: r.value != null ? r.value : r.modelValue != null ? r.modelValue : i.value ? i.value.displayValue : "",
2611
- ref: a
2600
+ value: r.value != null ? r.value : r.modelValue != null ? r.modelValue : a.value ? a.value.displayValue : "",
2601
+ ref: i
2612
2602
  };
2613
- return r.mask || (v.onInput = (B) => {
2614
- s("update:modelValue", B.target.value), s("update:value", B.target.value);
2615
- }), rt("input", v);
2603
+ return r.mask || (v.onInput = (V) => {
2604
+ s("update:modelValue", V.target.value), s("update:value", V.target.value);
2605
+ }), ot("input", v);
2616
2606
  };
2617
2607
  }
2618
- }), $t = Lt;
2619
- const Nt = ["for"], Ut = { class: "state-layer" }, Yt = { class: "content" }, zt = { class: "input-text-container" }, Ht = ["id", "placeholder", "aria-label"], jt = {
2608
+ }), $t = Pt;
2609
+ const Lt = ["for"], Nt = { class: "state-layer" }, Ut = { class: "content" }, Yt = { class: "input-text-container" }, Ht = ["id", "placeholder", "aria-label"], jt = {
2620
2610
  key: 1,
2621
2611
  class: "has-text-body-small phila-supporting-text"
2622
- }, qt = {
2612
+ }, zt = {
2623
2613
  key: 2,
2624
2614
  class: "has-text-body-small phila-error-text"
2625
- }, Ze = /* @__PURE__ */ ve({
2615
+ }, Xe = /* @__PURE__ */ ve({
2626
2616
  inheritAttrs: !1,
2627
2617
  __name: "TextField",
2628
2618
  props: {
@@ -2633,154 +2623,105 @@ const Nt = ["for"], Ut = { class: "state-layer" }, Yt = { class: "content" }, zt
2633
2623
  imaskProps: { default: void 0 },
2634
2624
  supportingText: { default: "" },
2635
2625
  placeholder: { default: "" },
2636
- leadingIcon: { default: "" },
2637
- trailingIcon: { default: "" },
2626
+ leadingIcon: { type: [Function, Object], default: void 0 },
2627
+ trailingIcon: { type: [Function, Object], default: void 0 },
2638
2628
  error: { default() {
2639
2629
  return [];
2640
2630
  } }
2641
2631
  },
2642
2632
  emits: ["update:modelValue", "complete"],
2643
2633
  setup(r, { expose: e, emit: t }) {
2644
- const s = Xe(), a = r, i = Y(() => typeof a.error == "string" ? a.error : a.error[0]), n = Ae(a, "id"), u = t, l = W(""), o = Y({
2645
- get: () => a.modelValue !== void 0 ? a.modelValue : l.value,
2646
- set: (M) => {
2647
- u("update:modelValue", M), l.value = M;
2634
+ const s = Qe(), i = r, a = N(() => typeof i.error == "string" ? i.error : i.error[0]), n = Ce(i, "id"), u = t, l = W(""), o = N({
2635
+ get: () => i.modelValue !== void 0 ? i.modelValue : l.value,
2636
+ set: (x) => {
2637
+ u("update:modelValue", x), l.value = x;
2648
2638
  }
2649
- }), h = Y(() => {
2650
- const M = ["default-class"];
2651
- return s.disabled != null && M.push("phila-input--disabled"), i.value && M.push("phila-input--error"), s.required != null && M.push("phila-input--required"), Fe(...M);
2652
- }), c = Y(() => {
2653
- const M = [];
2654
- return o.value !== "" && M.push("phila-text-field--filled"), a.className && M.push(a.className), Fe(...M);
2655
- }), k = Y(() => {
2656
- if (!(a.label || s["aria-label"]))
2657
- return a.placeholder || void 0;
2658
- }), v = W(null), B = (M) => {
2659
- M.target.closest("button") || v.value?.focus();
2639
+ }), p = N(() => {
2640
+ const x = ["default-class"];
2641
+ return s.disabled != null && x.push("phila-input--disabled"), a.value && x.push("phila-input--error"), s.required != null && x.push("phila-input--required"), Ae(...x);
2642
+ }), m = N(() => {
2643
+ const x = [];
2644
+ return o.value !== "" && x.push("phila-text-field--filled"), i.className && x.push(i.className), Ae(...x);
2645
+ }), A = N(() => {
2646
+ if (!(i.label || s["aria-label"]))
2647
+ return i.placeholder || void 0;
2648
+ }), v = W(null), V = (x) => {
2649
+ x.target.closest("button") || v.value?.focus();
2660
2650
  };
2661
- return e({ inputRef: v }), (M, O) => (w(), U("div", {
2662
- class: Ye(["phila-input", h.value])
2651
+ return e({ inputRef: v }), (x, M) => (I(), H("div", {
2652
+ class: Ye(["phila-input", p.value])
2663
2653
  }, [
2664
- a.label ? (w(), U("label", {
2654
+ i.label ? (I(), H("label", {
2665
2655
  key: 0,
2666
2656
  for: n.value,
2667
2657
  class: "has-text-label-small phila-label"
2668
- }, X(a.label), 9, Nt)) : pe("", !0),
2669
- j("div", {
2670
- class: Ye(["phila-text-field", c.value]),
2671
- onClick: ue(B, ["prevent"])
2658
+ }, X(i.label), 9, Lt)) : de("", !0),
2659
+ K("div", {
2660
+ class: Ye(["phila-text-field", m.value]),
2661
+ onClick: ce(V, ["prevent"])
2672
2662
  }, [
2673
- j("div", Ut, [
2674
- a.leadingIcon ? (w(), ae(x(Ne), {
2663
+ K("div", Nt, [
2664
+ i.leadingIcon ? (I(), ue(w(Ne), {
2675
2665
  key: 0,
2676
- "icon-class": a.leadingIcon,
2666
+ icon: i.leadingIcon,
2677
2667
  inline: "",
2678
2668
  decorative: ""
2679
- }, null, 8, ["icon-class"])) : pe("", !0),
2680
- j("div", Yt, [
2681
- j("div", zt, [
2682
- a.imaskProps?.mask ? (w(), ae(x($t), ee({ key: 0 }, { ...x(s), ...a.imaskProps }, {
2669
+ }, null, 8, ["icon"])) : de("", !0),
2670
+ K("div", Ut, [
2671
+ K("div", Yt, [
2672
+ i.imaskProps?.mask ? (I(), ue(w($t), ie({ key: 0 }, { ...w(s), ...i.imaskProps }, {
2683
2673
  id: n.value,
2684
2674
  modelValue: o.value,
2685
- "onUpdate:modelValue": O[0] || (O[0] = (G) => o.value = G),
2675
+ "onUpdate:modelValue": M[0] || (M[0] = (P) => o.value = P),
2686
2676
  class: "phila-text-field-input has-text-body-default",
2687
- placeholder: a.placeholder,
2688
- onComplete: O[1] || (O[1] = () => u("complete", l.value))
2689
- }), null, 16, ["id", "modelValue", "placeholder"])) : ut((w(), U("input", ee({
2677
+ placeholder: i.placeholder,
2678
+ onComplete: M[1] || (M[1] = () => u("complete", l.value))
2679
+ }), null, 16, ["id", "modelValue", "placeholder"])) : ht((I(), H("input", ie({
2690
2680
  key: 1,
2691
2681
  id: n.value,
2692
2682
  ref_key: "inputRef",
2693
2683
  ref: v
2694
- }, x(s), {
2695
- "onUpdate:modelValue": O[2] || (O[2] = (G) => o.value = G),
2684
+ }, w(s), {
2685
+ "onUpdate:modelValue": M[2] || (M[2] = (P) => o.value = P),
2696
2686
  class: "phila-text-field-input has-text-body-default",
2697
- placeholder: a.placeholder,
2698
- "aria-label": k.value
2687
+ placeholder: i.placeholder,
2688
+ "aria-label": A.value
2699
2689
  }), null, 16, Ht)), [
2700
- [lt, o.value]
2690
+ [dt, o.value]
2701
2691
  ])
2702
2692
  ])
2703
2693
  ]),
2704
- o.value != "" ? (w(), ae(x(kt), {
2694
+ o.value != "" ? (I(), ue(w(yt), {
2705
2695
  key: 1,
2706
2696
  variant: "standard",
2707
2697
  size: "small",
2708
2698
  "icon-only": "",
2709
- "icon-definition": x(Et),
2710
- onClick: O[3] || (O[3] = (G) => o.value = "")
2711
- }, null, 8, ["icon-definition"])) : pe("", !0),
2712
- a.trailingIcon ? (w(), ae(x(Ne), {
2699
+ icon: w(tt),
2700
+ onClick: M[3] || (M[3] = (P) => o.value = "")
2701
+ }, null, 8, ["icon"])) : de("", !0),
2702
+ i.trailingIcon ? (I(), ue(w(Ne), {
2713
2703
  key: 2,
2714
2704
  size: "small",
2715
- "icon-class": a.trailingIcon,
2705
+ icon: i.trailingIcon,
2716
2706
  inline: "",
2717
2707
  decorative: ""
2718
- }, null, 8, ["icon-class"])) : pe("", !0),
2719
- me(M.$slots, "trailing-action")
2708
+ }, null, 8, ["icon"])) : de("", !0),
2709
+ ye(x.$slots, "trailing-action")
2720
2710
  ])
2721
2711
  ], 2),
2722
- a.supportingText ? (w(), U("div", jt, X(a.supportingText), 1)) : pe("", !0),
2723
- i.value ? (w(), U("div", qt, [
2724
- ge(x(Ne), {
2725
- "icon-definition": x(Ct),
2712
+ i.supportingText ? (I(), H("div", jt, X(i.supportingText), 1)) : de("", !0),
2713
+ a.value ? (I(), H("div", zt, [
2714
+ fe(w(Ne), {
2715
+ icon: w(_t),
2726
2716
  size: "small",
2727
2717
  inline: "",
2728
2718
  decorative: ""
2729
- }, null, 8, ["icon-definition"]),
2730
- be(" " + X(i.value), 1)
2731
- ])) : pe("", !0)
2719
+ }, null, 8, ["icon"]),
2720
+ Ee(" " + X(a.value), 1)
2721
+ ])) : de("", !0)
2732
2722
  ], 2));
2733
2723
  }
2734
- }), Kt = ["data-toggle", "aria-label", "aria-expanded", "aria-controls"], Gt = /* @__PURE__ */ ve({
2735
- __name: "CollapsePanel",
2736
- props: {
2737
- className: {},
2738
- id: {},
2739
- group: { default: void 0 },
2740
- blurClose: { type: Boolean, default: !1 },
2741
- openSingle: { type: Boolean, default: !1 },
2742
- mouseOverToggle: { type: Boolean, default: !1 },
2743
- outsideClickClose: { type: Boolean, default: !1 },
2744
- escapeKeyClose: { type: Boolean, default: !1 },
2745
- toggleAttrs: { default: void 0 }
2746
- },
2747
- setup(r) {
2748
- const e = r, { isCollapsed: t, onMouseEnter: s, onMouseLeave: a, onClickToggle: i, onClickOpen: n, focusChange: u } = mt(e), l = Y(() => t(e.id));
2749
- return (o, h) => (w(), U("div", {
2750
- onMouseenter: h[1] || (h[1] = //@ts-ignore
2751
- (...c) => x(s) && x(s)(...c)),
2752
- onMouseleave: h[2] || (h[2] = //@ts-ignore
2753
- (...c) => x(a) && x(a)(...c)),
2754
- onFocusout: h[3] || (h[3] = //@ts-ignore
2755
- (...c) => x(u) && x(u)(...c))
2756
- }, [
2757
- me(o.$slots, "toggle", _e(Ce({
2758
- open: l.value,
2759
- ariaLabel: l.value ? "Close panel" : "Open panel",
2760
- ariaExpanded: l.value,
2761
- ariaControls: r.id,
2762
- onClickToggle: x(i),
2763
- onClickOpen: x(n),
2764
- focusChange: x(u),
2765
- onClick: x(i)
2766
- })), () => [
2767
- j("button", ee({
2768
- "data-toggle": r.id,
2769
- "aria-label": l.value ? "Close panel" : "Open panel",
2770
- "aria-expanded": l.value,
2771
- "aria-controls": r.id
2772
- }, r.toggleAttrs, {
2773
- onClick: h[0] || (h[0] = ue(
2774
- //@ts-ignore
2775
- (...c) => x(i) && x(i)(...c),
2776
- ["prevent"]
2777
- ))
2778
- }), null, 16, Kt)
2779
- ]),
2780
- me(o.$slots, "default", _e(Ce({ id: r.id, open: l.value, onClickToggle: x(i), focusChange: x(u), hidden: !l.value })))
2781
- ], 32));
2782
- }
2783
- }), Zt = ["disabled"], Wt = /* @__PURE__ */ ve({
2724
+ }), qt = ["disabled"], Kt = /* @__PURE__ */ ve({
2784
2725
  inheritAttrs: !1,
2785
2726
  __name: "PhlButton",
2786
2727
  props: {
@@ -2796,20 +2737,19 @@ const Nt = ["for"], Ut = { class: "state-layer" }, Yt = { class: "content" }, zt
2796
2737
  iconRight: { type: Boolean },
2797
2738
  text: {},
2798
2739
  className: {},
2799
- iconDefinition: {},
2800
- iconClass: {},
2740
+ icon: {},
2801
2741
  src: {},
2802
2742
  svgRaw: {}
2803
2743
  },
2804
2744
  setup(r) {
2805
- const e = r, t = (n) => "href" in n && n.href !== void 0 || "to" in n && n.to !== void 0, s = Y(() => Fe(
2745
+ const e = r, t = (n) => "href" in n && n.href !== void 0 || "to" in n && n.to !== void 0, s = N(() => Ae(
2806
2746
  "phila-button",
2807
2747
  `phila-button--${e.variant}`,
2808
2748
  e.size && `is-${e.size}`,
2809
2749
  e.iconOnly && "icon-button",
2810
2750
  e.iconOnly && e.variant === "standard" && "icon-button--standard",
2811
2751
  e.className
2812
- )), a = Y(() => t(e) ? "to" in e && e.to !== void 0 ? {
2752
+ )), i = N(() => t(e) ? "to" in e && e.to !== void 0 ? {
2813
2753
  to: e.to,
2814
2754
  disabled: e.disabled,
2815
2755
  className: s.value
@@ -2819,10 +2759,9 @@ const Nt = ["for"], Ut = { class: "state-layer" }, Yt = { class: "content" }, zt
2819
2759
  rel: e.rel,
2820
2760
  disabled: e.disabled,
2821
2761
  className: s.value
2822
- } : {}), i = Y(
2762
+ } : {}), a = N(
2823
2763
  () => ({
2824
- iconDefinition: e.iconDefinition,
2825
- iconClass: e.iconClass,
2764
+ icon: e.icon,
2826
2765
  src: e.src,
2827
2766
  iconRight: e.iconRight,
2828
2767
  iconOnly: e.iconOnly,
@@ -2830,202 +2769,197 @@ const Nt = ["for"], Ut = { class: "state-layer" }, Yt = { class: "content" }, zt
2830
2769
  size: e.size
2831
2770
  })
2832
2771
  );
2833
- return (n, u) => t(e) ? (w(), ae(x(Je), ee({ key: 0 }, { ...a.value, ...n.$attrs }, { role: "button" }), {
2834
- default: oe(() => [
2835
- ge(x(Ie), _e(Ce(i.value)), {
2836
- default: oe(() => [
2837
- me(n.$slots, "default", {}, () => [
2838
- be(X(e.text), 1)
2772
+ return (n, u) => t(e) ? (I(), ue(w(et), ie({ key: 0 }, { ...i.value, ...n.$attrs }, { role: "button" }), {
2773
+ default: ge(() => [
2774
+ fe(w(Ie), Be(we(a.value)), {
2775
+ default: ge(() => [
2776
+ ye(n.$slots, "default", {}, () => [
2777
+ Ee(X(e.text), 1)
2839
2778
  ])
2840
2779
  ]),
2841
2780
  _: 3
2842
2781
  }, 16)
2843
2782
  ]),
2844
2783
  _: 3
2845
- }, 16)) : (w(), U("button", ee({
2784
+ }, 16)) : (I(), H("button", ie({
2846
2785
  key: 1,
2847
2786
  type: "button",
2848
2787
  disabled: e.disabled,
2849
2788
  class: s.value
2850
2789
  }, n.$attrs), [
2851
- ge(x(Ie), _e(Ce(i.value)), {
2852
- default: oe(() => [
2853
- me(n.$slots, "default", {}, () => [
2854
- be(X(e.text), 1)
2790
+ fe(w(Ie), Be(we(a.value)), {
2791
+ default: ge(() => [
2792
+ ye(n.$slots, "default", {}, () => [
2793
+ Ee(X(e.text), 1)
2855
2794
  ])
2856
2795
  ]),
2857
2796
  _: 3
2858
2797
  }, 16)
2859
- ], 16, Zt));
2798
+ ], 16, qt));
2860
2799
  }
2861
2800
  });
2862
- var Xt = {
2863
- prefix: "fas",
2864
- iconName: "xmark",
2865
- icon: [384, 512, [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], "f00d", "M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]
2866
- }, Jt = Xt;
2867
- function Qt(r) {
2801
+ function Gt(r) {
2868
2802
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
2869
2803
  }
2870
- var we = { exports: {} }, es = we.exports, We;
2871
- function ts() {
2872
- return We || (We = 1, (function(r, e) {
2804
+ var Ve = { exports: {} }, Zt = Ve.exports, Je;
2805
+ function Wt() {
2806
+ return Je || (Je = 1, (function(r, e) {
2873
2807
  (function(t, s) {
2874
2808
  r.exports = s();
2875
- })(es, (function() {
2876
- var t = 1e3, s = 6e4, a = 36e5, i = "millisecond", n = "second", u = "minute", l = "hour", o = "day", h = "week", c = "month", k = "quarter", v = "year", B = "date", M = "Invalid Date", O = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, G = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, ne = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(_) {
2877
- var f = ["th", "st", "nd", "rd"], d = _ % 100;
2878
- return "[" + _ + (f[(d - 20) % 10] || f[d] || f[0]) + "]";
2879
- } }, D = function(_, f, d) {
2880
- var g = String(_);
2881
- return !g || g.length >= f ? _ : "" + Array(f + 1 - g.length).join(d) + _;
2882
- }, R = { s: D, z: function(_) {
2883
- var f = -_.utcOffset(), d = Math.abs(f), g = Math.floor(d / 60), p = d % 60;
2884
- return (f <= 0 ? "+" : "-") + D(g, 2, "0") + ":" + D(p, 2, "0");
2885
- }, m: function _(f, d) {
2886
- if (f.date() < d.date()) return -_(d, f);
2887
- var g = 12 * (d.year() - f.year()) + (d.month() - f.month()), p = f.clone().add(g, c), E = d - p < 0, A = f.clone().add(g + (E ? -1 : 1), c);
2888
- return +(-(g + (d - p) / (E ? p - A : A - p)) || 0);
2889
- }, a: function(_) {
2890
- return _ < 0 ? Math.ceil(_) || 0 : Math.floor(_);
2891
- }, p: function(_) {
2892
- return { M: c, y: v, w: h, d: o, D: B, h: l, m: u, s: n, ms: i, Q: k }[_] || String(_ || "").toLowerCase().replace(/s$/, "");
2893
- }, u: function(_) {
2894
- return _ === void 0;
2895
- } }, y = "en", I = {};
2896
- I[y] = ne;
2897
- var $ = "$isDayjsObject", P = function(_) {
2898
- return _ instanceof De || !(!_ || !_[$]);
2899
- }, te = function _(f, d, g) {
2900
- var p;
2901
- if (!f) return y;
2902
- if (typeof f == "string") {
2903
- var E = f.toLowerCase();
2904
- I[E] && (p = E), d && (I[E] = d, p = E);
2905
- var A = f.split("-");
2906
- if (!p && A.length > 1) return _(A[0]);
2809
+ })(Zt, (function() {
2810
+ var t = 1e3, s = 6e4, i = 36e5, a = "millisecond", n = "second", u = "minute", l = "hour", o = "day", p = "week", m = "month", A = "quarter", v = "year", V = "date", x = "Invalid Date", M = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, P = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, ne = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(k) {
2811
+ var c = ["th", "st", "nd", "rd"], h = k % 100;
2812
+ return "[" + k + (c[(h - 20) % 10] || c[h] || c[0]) + "]";
2813
+ } }, D = function(k, c, h) {
2814
+ var g = String(k);
2815
+ return !g || g.length >= c ? k : "" + Array(c + 1 - g.length).join(h) + k;
2816
+ }, R = { s: D, z: function(k) {
2817
+ var c = -k.utcOffset(), h = Math.abs(c), g = Math.floor(h / 60), d = h % 60;
2818
+ return (c <= 0 ? "+" : "-") + D(g, 2, "0") + ":" + D(d, 2, "0");
2819
+ }, m: function k(c, h) {
2820
+ if (c.date() < h.date()) return -k(h, c);
2821
+ var g = 12 * (h.year() - c.year()) + (h.month() - c.month()), d = c.clone().add(g, m), y = h - d < 0, E = c.clone().add(g + (y ? -1 : 1), m);
2822
+ return +(-(g + (h - d) / (y ? d - E : E - d)) || 0);
2823
+ }, a: function(k) {
2824
+ return k < 0 ? Math.ceil(k) || 0 : Math.floor(k);
2825
+ }, p: function(k) {
2826
+ return { M: m, y: v, w: p, d: o, D: V, h: l, m: u, s: n, ms: a, Q: A }[k] || String(k || "").toLowerCase().replace(/s$/, "");
2827
+ }, u: function(k) {
2828
+ return k === void 0;
2829
+ } }, C = "en", T = {};
2830
+ T[C] = ne;
2831
+ var U = "$isDayjsObject", $ = function(k) {
2832
+ return k instanceof Fe || !(!k || !k[U]);
2833
+ }, ee = function k(c, h, g) {
2834
+ var d;
2835
+ if (!c) return C;
2836
+ if (typeof c == "string") {
2837
+ var y = c.toLowerCase();
2838
+ T[y] && (d = y), h && (T[y] = h, d = y);
2839
+ var E = c.split("-");
2840
+ if (!d && E.length > 1) return k(E[0]);
2907
2841
  } else {
2908
- var V = f.name;
2909
- I[V] = f, p = V;
2842
+ var B = c.name;
2843
+ T[B] = c, d = B;
2910
2844
  }
2911
- return !g && p && (y = p), p || !g && y;
2912
- }, b = function(_, f) {
2913
- if (P(_)) return _.clone();
2914
- var d = typeof f == "object" ? f : {};
2915
- return d.date = _, d.args = arguments, new De(d);
2845
+ return !g && d && (C = d), d || !g && C;
2846
+ }, b = function(k, c) {
2847
+ if ($(k)) return k.clone();
2848
+ var h = typeof c == "object" ? c : {};
2849
+ return h.date = k, h.args = arguments, new Fe(h);
2916
2850
  }, S = R;
2917
- S.l = te, S.i = P, S.w = function(_, f) {
2918
- return b(_, { locale: f.$L, utc: f.$u, x: f.$x, $offset: f.$offset });
2851
+ S.l = ee, S.i = $, S.w = function(k, c) {
2852
+ return b(k, { locale: c.$L, utc: c.$u, x: c.$x, $offset: c.$offset });
2919
2853
  };
2920
- var De = (function() {
2921
- function _(d) {
2922
- this.$L = te(d.locale, null, !0), this.parse(d), this.$x = this.$x || d.x || {}, this[$] = !0;
2854
+ var Fe = (function() {
2855
+ function k(h) {
2856
+ this.$L = ee(h.locale, null, !0), this.parse(h), this.$x = this.$x || h.x || {}, this[U] = !0;
2923
2857
  }
2924
- var f = _.prototype;
2925
- return f.parse = function(d) {
2858
+ var c = k.prototype;
2859
+ return c.parse = function(h) {
2926
2860
  this.$d = (function(g) {
2927
- var p = g.date, E = g.utc;
2928
- if (p === null) return /* @__PURE__ */ new Date(NaN);
2929
- if (S.u(p)) return /* @__PURE__ */ new Date();
2930
- if (p instanceof Date) return new Date(p);
2931
- if (typeof p == "string" && !/Z$/i.test(p)) {
2932
- var A = p.match(O);
2933
- if (A) {
2934
- var V = A[2] - 1 || 0, T = (A[7] || "0").substring(0, 3);
2935
- return E ? new Date(Date.UTC(A[1], V, A[3] || 1, A[4] || 0, A[5] || 0, A[6] || 0, T)) : new Date(A[1], V, A[3] || 1, A[4] || 0, A[5] || 0, A[6] || 0, T);
2861
+ var d = g.date, y = g.utc;
2862
+ if (d === null) return /* @__PURE__ */ new Date(NaN);
2863
+ if (S.u(d)) return /* @__PURE__ */ new Date();
2864
+ if (d instanceof Date) return new Date(d);
2865
+ if (typeof d == "string" && !/Z$/i.test(d)) {
2866
+ var E = d.match(M);
2867
+ if (E) {
2868
+ var B = E[2] - 1 || 0, O = (E[7] || "0").substring(0, 3);
2869
+ return y ? new Date(Date.UTC(E[1], B, E[3] || 1, E[4] || 0, E[5] || 0, E[6] || 0, O)) : new Date(E[1], B, E[3] || 1, E[4] || 0, E[5] || 0, E[6] || 0, O);
2936
2870
  }
2937
2871
  }
2938
- return new Date(p);
2939
- })(d), this.init();
2940
- }, f.init = function() {
2941
- var d = this.$d;
2942
- this.$y = d.getFullYear(), this.$M = d.getMonth(), this.$D = d.getDate(), this.$W = d.getDay(), this.$H = d.getHours(), this.$m = d.getMinutes(), this.$s = d.getSeconds(), this.$ms = d.getMilliseconds();
2943
- }, f.$utils = function() {
2872
+ return new Date(d);
2873
+ })(h), this.init();
2874
+ }, c.init = function() {
2875
+ var h = this.$d;
2876
+ this.$y = h.getFullYear(), this.$M = h.getMonth(), this.$D = h.getDate(), this.$W = h.getDay(), this.$H = h.getHours(), this.$m = h.getMinutes(), this.$s = h.getSeconds(), this.$ms = h.getMilliseconds();
2877
+ }, c.$utils = function() {
2944
2878
  return S;
2945
- }, f.isValid = function() {
2946
- return this.$d.toString() !== M;
2947
- }, f.isSame = function(d, g) {
2948
- var p = b(d);
2949
- return this.startOf(g) <= p && p <= this.endOf(g);
2950
- }, f.isAfter = function(d, g) {
2951
- return b(d) < this.startOf(g);
2952
- }, f.isBefore = function(d, g) {
2953
- return this.endOf(g) < b(d);
2954
- }, f.$g = function(d, g, p) {
2955
- return S.u(d) ? this[g] : this.set(p, d);
2956
- }, f.unix = function() {
2879
+ }, c.isValid = function() {
2880
+ return this.$d.toString() !== x;
2881
+ }, c.isSame = function(h, g) {
2882
+ var d = b(h);
2883
+ return this.startOf(g) <= d && d <= this.endOf(g);
2884
+ }, c.isAfter = function(h, g) {
2885
+ return b(h) < this.startOf(g);
2886
+ }, c.isBefore = function(h, g) {
2887
+ return this.endOf(g) < b(h);
2888
+ }, c.$g = function(h, g, d) {
2889
+ return S.u(h) ? this[g] : this.set(d, h);
2890
+ }, c.unix = function() {
2957
2891
  return Math.floor(this.valueOf() / 1e3);
2958
- }, f.valueOf = function() {
2892
+ }, c.valueOf = function() {
2959
2893
  return this.$d.getTime();
2960
- }, f.startOf = function(d, g) {
2961
- var p = this, E = !!S.u(g) || g, A = S.p(d), V = function(ce, q) {
2962
- var re = S.w(p.$u ? Date.UTC(p.$y, q, ce) : new Date(p.$y, q, ce), p);
2963
- return E ? re : re.endOf(o);
2964
- }, T = function(ce, q) {
2965
- return S.w(p.toDate()[ce].apply(p.toDate("s"), (E ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(q)), p);
2966
- }, L = this.$W, N = this.$M, Z = this.$D, ke = "set" + (this.$u ? "UTC" : "");
2967
- switch (A) {
2894
+ }, c.startOf = function(h, g) {
2895
+ var d = this, y = !!S.u(g) || g, E = S.p(h), B = function(he, q) {
2896
+ var re = S.w(d.$u ? Date.UTC(d.$y, q, he) : new Date(d.$y, q, he), d);
2897
+ return y ? re : re.endOf(o);
2898
+ }, O = function(he, q) {
2899
+ return S.w(d.toDate()[he].apply(d.toDate("s"), (y ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(q)), d);
2900
+ }, L = this.$W, Y = this.$M, Z = this.$D, me = "set" + (this.$u ? "UTC" : "");
2901
+ switch (E) {
2968
2902
  case v:
2969
- return E ? V(1, 0) : V(31, 11);
2970
- case c:
2971
- return E ? V(1, N) : V(0, N + 1);
2972
- case h:
2973
- var de = this.$locale().weekStart || 0, ye = (L < de ? L + 7 : L) - de;
2974
- return V(E ? Z - ye : Z + (6 - ye), N);
2903
+ return y ? B(1, 0) : B(31, 11);
2904
+ case m:
2905
+ return y ? B(1, Y) : B(0, Y + 1);
2906
+ case p:
2907
+ var oe = this.$locale().weekStart || 0, ke = (L < oe ? L + 7 : L) - oe;
2908
+ return B(y ? Z - ke : Z + (6 - ke), Y);
2975
2909
  case o:
2976
- case B:
2977
- return T(ke + "Hours", 0);
2910
+ case V:
2911
+ return O(me + "Hours", 0);
2978
2912
  case l:
2979
- return T(ke + "Minutes", 1);
2913
+ return O(me + "Minutes", 1);
2980
2914
  case u:
2981
- return T(ke + "Seconds", 2);
2915
+ return O(me + "Seconds", 2);
2982
2916
  case n:
2983
- return T(ke + "Milliseconds", 3);
2917
+ return O(me + "Milliseconds", 3);
2984
2918
  default:
2985
2919
  return this.clone();
2986
2920
  }
2987
- }, f.endOf = function(d) {
2988
- return this.startOf(d, !1);
2989
- }, f.$set = function(d, g) {
2990
- var p, E = S.p(d), A = "set" + (this.$u ? "UTC" : ""), V = (p = {}, p[o] = A + "Date", p[B] = A + "Date", p[c] = A + "Month", p[v] = A + "FullYear", p[l] = A + "Hours", p[u] = A + "Minutes", p[n] = A + "Seconds", p[i] = A + "Milliseconds", p)[E], T = E === o ? this.$D + (g - this.$W) : g;
2991
- if (E === c || E === v) {
2992
- var L = this.clone().set(B, 1);
2993
- L.$d[V](T), L.init(), this.$d = L.set(B, Math.min(this.$D, L.daysInMonth())).$d;
2994
- } else V && this.$d[V](T);
2921
+ }, c.endOf = function(h) {
2922
+ return this.startOf(h, !1);
2923
+ }, c.$set = function(h, g) {
2924
+ var d, y = S.p(h), E = "set" + (this.$u ? "UTC" : ""), B = (d = {}, d[o] = E + "Date", d[V] = E + "Date", d[m] = E + "Month", d[v] = E + "FullYear", d[l] = E + "Hours", d[u] = E + "Minutes", d[n] = E + "Seconds", d[a] = E + "Milliseconds", d)[y], O = y === o ? this.$D + (g - this.$W) : g;
2925
+ if (y === m || y === v) {
2926
+ var L = this.clone().set(V, 1);
2927
+ L.$d[B](O), L.init(), this.$d = L.set(V, Math.min(this.$D, L.daysInMonth())).$d;
2928
+ } else B && this.$d[B](O);
2995
2929
  return this.init(), this;
2996
- }, f.set = function(d, g) {
2997
- return this.clone().$set(d, g);
2998
- }, f.get = function(d) {
2999
- return this[S.p(d)]();
3000
- }, f.add = function(d, g) {
3001
- var p, E = this;
3002
- d = Number(d);
3003
- var A = S.p(g), V = function(N) {
3004
- var Z = b(E);
3005
- return S.w(Z.date(Z.date() + Math.round(N * d)), E);
2930
+ }, c.set = function(h, g) {
2931
+ return this.clone().$set(h, g);
2932
+ }, c.get = function(h) {
2933
+ return this[S.p(h)]();
2934
+ }, c.add = function(h, g) {
2935
+ var d, y = this;
2936
+ h = Number(h);
2937
+ var E = S.p(g), B = function(Y) {
2938
+ var Z = b(y);
2939
+ return S.w(Z.date(Z.date() + Math.round(Y * h)), y);
3006
2940
  };
3007
- if (A === c) return this.set(c, this.$M + d);
3008
- if (A === v) return this.set(v, this.$y + d);
3009
- if (A === o) return V(1);
3010
- if (A === h) return V(7);
3011
- var T = (p = {}, p[u] = s, p[l] = a, p[n] = t, p)[A] || 1, L = this.$d.getTime() + d * T;
2941
+ if (E === m) return this.set(m, this.$M + h);
2942
+ if (E === v) return this.set(v, this.$y + h);
2943
+ if (E === o) return B(1);
2944
+ if (E === p) return B(7);
2945
+ var O = (d = {}, d[u] = s, d[l] = i, d[n] = t, d)[E] || 1, L = this.$d.getTime() + h * O;
3012
2946
  return S.w(L, this);
3013
- }, f.subtract = function(d, g) {
3014
- return this.add(-1 * d, g);
3015
- }, f.format = function(d) {
3016
- var g = this, p = this.$locale();
3017
- if (!this.isValid()) return p.invalidDate || M;
3018
- var E = d || "YYYY-MM-DDTHH:mm:ssZ", A = S.z(this), V = this.$H, T = this.$m, L = this.$M, N = p.weekdays, Z = p.months, ke = p.meridiem, de = function(q, re, Ee, Se) {
3019
- return q && (q[re] || q(g, E)) || Ee[re].slice(0, Se);
3020
- }, ye = function(q) {
3021
- return S.s(V % 12 || 12, q, "0");
3022
- }, ce = ke || function(q, re, Ee) {
3023
- var Se = q < 12 ? "AM" : "PM";
3024
- return Ee ? Se.toLowerCase() : Se;
2947
+ }, c.subtract = function(h, g) {
2948
+ return this.add(-1 * h, g);
2949
+ }, c.format = function(h) {
2950
+ var g = this, d = this.$locale();
2951
+ if (!this.isValid()) return d.invalidDate || x;
2952
+ var y = h || "YYYY-MM-DDTHH:mm:ssZ", E = S.z(this), B = this.$H, O = this.$m, L = this.$M, Y = d.weekdays, Z = d.months, me = d.meridiem, oe = function(q, re, _e, xe) {
2953
+ return q && (q[re] || q(g, y)) || _e[re].slice(0, xe);
2954
+ }, ke = function(q) {
2955
+ return S.s(B % 12 || 12, q, "0");
2956
+ }, he = me || function(q, re, _e) {
2957
+ var xe = q < 12 ? "AM" : "PM";
2958
+ return _e ? xe.toLowerCase() : xe;
3025
2959
  };
3026
- return E.replace(G, (function(q, re) {
3027
- return re || (function(Ee) {
3028
- switch (Ee) {
2960
+ return y.replace(P, (function(q, re) {
2961
+ return re || (function(_e) {
2962
+ switch (_e) {
3029
2963
  case "YY":
3030
2964
  return String(g.$y).slice(-2);
3031
2965
  case "YYYY":
@@ -3035,9 +2969,9 @@ function ts() {
3035
2969
  case "MM":
3036
2970
  return S.s(L + 1, 2, "0");
3037
2971
  case "MMM":
3038
- return de(p.monthsShort, L, Z, 3);
2972
+ return oe(d.monthsShort, L, Z, 3);
3039
2973
  case "MMMM":
3040
- return de(Z, L);
2974
+ return oe(Z, L);
3041
2975
  case "D":
3042
2976
  return g.$D;
3043
2977
  case "DD":
@@ -3045,27 +2979,27 @@ function ts() {
3045
2979
  case "d":
3046
2980
  return String(g.$W);
3047
2981
  case "dd":
3048
- return de(p.weekdaysMin, g.$W, N, 2);
2982
+ return oe(d.weekdaysMin, g.$W, Y, 2);
3049
2983
  case "ddd":
3050
- return de(p.weekdaysShort, g.$W, N, 3);
2984
+ return oe(d.weekdaysShort, g.$W, Y, 3);
3051
2985
  case "dddd":
3052
- return N[g.$W];
2986
+ return Y[g.$W];
3053
2987
  case "H":
3054
- return String(V);
2988
+ return String(B);
3055
2989
  case "HH":
3056
- return S.s(V, 2, "0");
2990
+ return S.s(B, 2, "0");
3057
2991
  case "h":
3058
- return ye(1);
2992
+ return ke(1);
3059
2993
  case "hh":
3060
- return ye(2);
2994
+ return ke(2);
3061
2995
  case "a":
3062
- return ce(V, T, !0);
2996
+ return he(B, O, !0);
3063
2997
  case "A":
3064
- return ce(V, T, !1);
2998
+ return he(B, O, !1);
3065
2999
  case "m":
3066
- return String(T);
3000
+ return String(O);
3067
3001
  case "mm":
3068
- return S.s(T, 2, "0");
3002
+ return S.s(O, 2, "0");
3069
3003
  case "s":
3070
3004
  return String(g.$s);
3071
3005
  case "ss":
@@ -3073,80 +3007,80 @@ function ts() {
3073
3007
  case "SSS":
3074
3008
  return S.s(g.$ms, 3, "0");
3075
3009
  case "Z":
3076
- return A;
3010
+ return E;
3077
3011
  }
3078
3012
  return null;
3079
- })(q) || A.replace(":", "");
3013
+ })(q) || E.replace(":", "");
3080
3014
  }));
3081
- }, f.utcOffset = function() {
3015
+ }, c.utcOffset = function() {
3082
3016
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
3083
- }, f.diff = function(d, g, p) {
3084
- var E, A = this, V = S.p(g), T = b(d), L = (T.utcOffset() - this.utcOffset()) * s, N = this - T, Z = function() {
3085
- return S.m(A, T);
3017
+ }, c.diff = function(h, g, d) {
3018
+ var y, E = this, B = S.p(g), O = b(h), L = (O.utcOffset() - this.utcOffset()) * s, Y = this - O, Z = function() {
3019
+ return S.m(E, O);
3086
3020
  };
3087
- switch (V) {
3021
+ switch (B) {
3088
3022
  case v:
3089
- E = Z() / 12;
3023
+ y = Z() / 12;
3090
3024
  break;
3091
- case c:
3092
- E = Z();
3025
+ case m:
3026
+ y = Z();
3093
3027
  break;
3094
- case k:
3095
- E = Z() / 3;
3028
+ case A:
3029
+ y = Z() / 3;
3096
3030
  break;
3097
- case h:
3098
- E = (N - L) / 6048e5;
3031
+ case p:
3032
+ y = (Y - L) / 6048e5;
3099
3033
  break;
3100
3034
  case o:
3101
- E = (N - L) / 864e5;
3035
+ y = (Y - L) / 864e5;
3102
3036
  break;
3103
3037
  case l:
3104
- E = N / a;
3038
+ y = Y / i;
3105
3039
  break;
3106
3040
  case u:
3107
- E = N / s;
3041
+ y = Y / s;
3108
3042
  break;
3109
3043
  case n:
3110
- E = N / t;
3044
+ y = Y / t;
3111
3045
  break;
3112
3046
  default:
3113
- E = N;
3047
+ y = Y;
3114
3048
  }
3115
- return p ? E : S.a(E);
3116
- }, f.daysInMonth = function() {
3117
- return this.endOf(c).$D;
3118
- }, f.$locale = function() {
3119
- return I[this.$L];
3120
- }, f.locale = function(d, g) {
3121
- if (!d) return this.$L;
3122
- var p = this.clone(), E = te(d, g, !0);
3123
- return E && (p.$L = E), p;
3124
- }, f.clone = function() {
3049
+ return d ? y : S.a(y);
3050
+ }, c.daysInMonth = function() {
3051
+ return this.endOf(m).$D;
3052
+ }, c.$locale = function() {
3053
+ return T[this.$L];
3054
+ }, c.locale = function(h, g) {
3055
+ if (!h) return this.$L;
3056
+ var d = this.clone(), y = ee(h, g, !0);
3057
+ return y && (d.$L = y), d;
3058
+ }, c.clone = function() {
3125
3059
  return S.w(this.$d, this);
3126
- }, f.toDate = function() {
3060
+ }, c.toDate = function() {
3127
3061
  return new Date(this.valueOf());
3128
- }, f.toJSON = function() {
3062
+ }, c.toJSON = function() {
3129
3063
  return this.isValid() ? this.toISOString() : null;
3130
- }, f.toISOString = function() {
3064
+ }, c.toISOString = function() {
3131
3065
  return this.$d.toISOString();
3132
- }, f.toString = function() {
3066
+ }, c.toString = function() {
3133
3067
  return this.$d.toUTCString();
3134
- }, _;
3135
- })(), je = De.prototype;
3136
- return b.prototype = je, [["$ms", i], ["$s", n], ["$m", u], ["$H", l], ["$W", o], ["$M", c], ["$y", v], ["$D", B]].forEach((function(_) {
3137
- je[_[1]] = function(f) {
3138
- return this.$g(f, _[0], _[1]);
3068
+ }, k;
3069
+ })(), ze = Fe.prototype;
3070
+ return b.prototype = ze, [["$ms", a], ["$s", n], ["$m", u], ["$H", l], ["$W", o], ["$M", m], ["$y", v], ["$D", V]].forEach((function(k) {
3071
+ ze[k[1]] = function(c) {
3072
+ return this.$g(c, k[0], k[1]);
3139
3073
  };
3140
- })), b.extend = function(_, f) {
3141
- return _.$i || (_(f, De, b), _.$i = !0), b;
3142
- }, b.locale = te, b.isDayjs = P, b.unix = function(_) {
3143
- return b(1e3 * _);
3144
- }, b.en = I[y], b.Ls = I, b.p = {}, b;
3074
+ })), b.extend = function(k, c) {
3075
+ return k.$i || (k(c, Fe, b), k.$i = !0), b;
3076
+ }, b.locale = ee, b.isDayjs = $, b.unix = function(k) {
3077
+ return b(1e3 * k);
3078
+ }, b.en = T[C], b.Ls = T, b.p = {}, b;
3145
3079
  }));
3146
- })(we)), we.exports;
3080
+ })(Ve)), Ve.exports;
3147
3081
  }
3148
- var ss = ts();
3149
- const J = /* @__PURE__ */ Qt(ss), as = ["id"], is = { class: "date-picker-close is-flex is-justify-flex-end" }, ns = { class: "date-picker-header is-flex is-justify-space-between is-align-center mb-2 content" }, rs = { class: "calendar is-flex is-flex-wrap content" }, us = ["title", "tabindex", "disabled", "onClick"], ls = ["id", "title", "tabindex", "disabled", "onClick"], os = ["title", "disabled", "onClick"], hs = /* @__PURE__ */ ve({
3082
+ var Xt = Wt();
3083
+ const J = /* @__PURE__ */ Gt(Xt), Jt = ["id"], Qt = { class: "date-picker-close is-flex is-justify-flex-end" }, es = { class: "date-picker-header is-flex is-justify-space-between is-align-center mb-2 content" }, ts = { class: "calendar is-flex is-flex-wrap content" }, ss = ["title", "tabindex", "disabled", "onClick"], is = ["id", "title", "tabindex", "disabled", "onClick"], as = ["title", "disabled", "onClick"], ns = /* @__PURE__ */ ve({
3150
3084
  __name: "DatePicker",
3151
3085
  props: {
3152
3086
  id: {},
@@ -3158,65 +3092,65 @@ const J = /* @__PURE__ */ Qt(ss), as = ["id"], is = { class: "date-picker-close
3158
3092
  },
3159
3093
  emits: ["update:modelValue"],
3160
3094
  setup(r, { expose: e, emit: t }) {
3161
- const s = r, a = t, i = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], n = W(J(s.initialValue === "" ? void 0 : s.initialValue)), u = W(n.value), l = Y(() => {
3095
+ const s = r, i = t, a = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], n = W(J(s.initialValue === "" ? void 0 : s.initialValue)), u = W(n.value), l = N(() => {
3162
3096
  const D = u.value.daysInMonth();
3163
- return Array.from({ length: D }, (R, y) => u.value.date(y + 1));
3164
- }), o = Y(() => Array.from(
3097
+ return Array.from({ length: D }, (R, C) => u.value.date(C + 1));
3098
+ }), o = N(() => Array.from(
3165
3099
  {
3166
3100
  length: u.value.date(1).day()
3167
3101
  },
3168
- (R, y) => u.value.date(-y)
3169
- ).reverse()), h = Y(() => Array.from(
3102
+ (R, C) => u.value.date(-C)
3103
+ ).reverse()), p = N(() => Array.from(
3170
3104
  {
3171
3105
  length: 6 - u.value.endOf("month").day()
3172
3106
  },
3173
- (R, y) => u.value.endOf("month").add(y + 1, "day")
3174
- )), c = (D) => !nt(D, s.min, s.max), k = (D) => {
3175
- n.value = D, a("update:modelValue", n.value.format(s.format)), s.close();
3107
+ (R, C) => u.value.endOf("month").add(C + 1, "day")
3108
+ )), m = (D) => !lt(D, s.min, s.max), A = (D) => {
3109
+ n.value = D, i("update:modelValue", n.value.format(s.format)), s.close();
3176
3110
  }, v = (D) => {
3177
- a("update:modelValue", D), D ? (n.value = J(D, s.format), u.value = n.value) : (n.value = J(), u.value = J());
3178
- }, B = () => {
3111
+ i("update:modelValue", D), D ? (n.value = J(D, s.format), u.value = n.value) : (n.value = J(), u.value = J());
3112
+ }, V = () => {
3179
3113
  u.value = u.value.add(1, "month");
3180
- }, M = () => {
3114
+ }, x = () => {
3181
3115
  u.value = u.value.subtract(1, "month");
3182
- }, O = (D) => {
3116
+ }, M = (D) => {
3183
3117
  const R = document.querySelector("#selected-day");
3184
3118
  R instanceof HTMLButtonElement && (D.preventDefault(), R.focus());
3185
- }, G = (D) => {
3119
+ }, P = (D) => {
3186
3120
  const R = document.querySelector(`#${s.id} button`);
3187
3121
  R instanceof HTMLButtonElement && (D.preventDefault(), R.focus());
3188
3122
  }, ne = (D) => {
3189
- if (D.key === "Tab" && !D.shiftKey && G(D), ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Home", "End"].includes(D.key)) {
3123
+ if (D.key === "Tab" && !D.shiftKey && P(D), ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Home", "End"].includes(D.key)) {
3190
3124
  D.preventDefault();
3191
- const y = document.activeElement;
3192
- if (y instanceof HTMLButtonElement) {
3193
- const I = Array.from(document.querySelectorAll(".calendar button")).filter(
3194
- (te) => !te.disabled
3195
- ), $ = I.indexOf(y);
3196
- let P = $;
3125
+ const C = document.activeElement;
3126
+ if (C instanceof HTMLButtonElement) {
3127
+ const T = Array.from(document.querySelectorAll(".calendar button")).filter(
3128
+ (ee) => !ee.disabled
3129
+ ), U = T.indexOf(C);
3130
+ let $ = U;
3197
3131
  switch (D.key) {
3198
3132
  case "ArrowUp":
3199
- P = $ - 7;
3133
+ $ = U - 7;
3200
3134
  break;
3201
3135
  case "ArrowDown":
3202
- P = $ + 7;
3136
+ $ = U + 7;
3203
3137
  break;
3204
3138
  case "ArrowLeft":
3205
- P = $ - 1;
3139
+ $ = U - 1;
3206
3140
  break;
3207
3141
  case "ArrowRight":
3208
- P = $ + 1;
3142
+ $ = U + 1;
3209
3143
  break;
3210
3144
  case "Home":
3211
- P = 0;
3145
+ $ = 0;
3212
3146
  break;
3213
3147
  case "End":
3214
- P = I.length - 1;
3148
+ $ = T.length - 1;
3215
3149
  break;
3216
3150
  }
3217
- P >= 0 && P < I.length ? I[P].focus() : P < 0 ? (M(), qe(() => {
3151
+ $ >= 0 && $ < T.length ? T[$].focus() : $ < 0 ? (x(), qe(() => {
3218
3152
  document.querySelector(".calendar > span:last-of-type button:last-of-type")?.focus();
3219
- })) : P >= I.length && (B(), qe(() => {
3153
+ })) : $ >= T.length && (V(), qe(() => {
3220
3154
  document.querySelector(".calendar button")?.focus();
3221
3155
  }));
3222
3156
  }
@@ -3224,89 +3158,89 @@ const J = /* @__PURE__ */ Qt(ss), as = ["id"], is = { class: "date-picker-close
3224
3158
  };
3225
3159
  return e({
3226
3160
  update: v,
3227
- focusDatePicker: O
3228
- }), (D, R) => (w(), U("div", {
3161
+ focusDatePicker: M
3162
+ }), (D, R) => (I(), H("div", {
3229
3163
  id: r.id,
3230
3164
  class: "date-picker"
3231
3165
  }, [
3232
- j("div", is, [
3233
- ge(x(Wt), {
3166
+ K("div", Qt, [
3167
+ fe(w(Kt), {
3234
3168
  id: `${r.id}-date-picker-toggle`,
3235
3169
  variant: "standard",
3236
3170
  size: "extra-small",
3237
3171
  "icon-only": "",
3238
- "icon-definition": x(Jt),
3172
+ icon: w(tt),
3239
3173
  "aria-label": "close date picker",
3240
- onClick: ue(r.close, ["prevent"])
3241
- }, null, 8, ["id", "icon-definition", "onClick"])
3174
+ onClick: ce(r.close, ["prevent"])
3175
+ }, null, 8, ["id", "icon", "onClick"])
3242
3176
  ]),
3243
- j("div", ns, [
3244
- j("button", {
3177
+ K("div", es, [
3178
+ K("button", {
3245
3179
  class: "phila-button icon-button--secondary is-extra-small",
3246
- onClick: ue(M, ["prevent"])
3180
+ onClick: ce(x, ["prevent"])
3247
3181
  }, " Prev "),
3248
- j("span", null, X(u.value.format("MMMM YYYY")), 1),
3249
- j("button", {
3182
+ K("span", null, X(u.value.format("MMMM YYYY")), 1),
3183
+ K("button", {
3250
3184
  class: "phila-button is-extra-small",
3251
- onClick: ue(B, ["prevent"])
3185
+ onClick: ce(V, ["prevent"])
3252
3186
  }, "Next")
3253
3187
  ]),
3254
- j("div", rs, [
3255
- (w(), U(Me, null, Be(i, (y) => j("span", {
3256
- key: y,
3188
+ K("div", ts, [
3189
+ (I(), H(De, null, Se(a, (C) => K("span", {
3190
+ key: C,
3257
3191
  class: "calendar-day is-5 has-text-weight-bold"
3258
- }, X(y), 1)), 64)),
3259
- (w(!0), U(Me, null, Be(o.value, (y, I) => (w(), U("span", {
3260
- key: "day-in-previous-month-" + y.date(),
3192
+ }, X(C), 1)), 64)),
3193
+ (I(!0), H(De, null, Se(o.value, (C, T) => (I(), H("span", {
3194
+ key: "day-in-previous-month-" + C.date(),
3261
3195
  class: "calendar-day outside-month is-5"
3262
3196
  }, [
3263
- j("button", {
3197
+ K("button", {
3264
3198
  class: "phila-button is-extra-small p-2",
3265
- title: `${y.format("MMMM D, YYYY")}`,
3266
- tabindex: I === 0 ? 0 : -1,
3267
- disabled: c(y),
3268
- onKeydown: R[0] || (R[0] = ($) => ne($)),
3269
- onClick: ue(($) => k(y), ["prevent"])
3270
- }, X(y.date()), 41, us)
3199
+ title: `${C.format("MMMM D, YYYY")}`,
3200
+ tabindex: T === 0 ? 0 : -1,
3201
+ disabled: m(C),
3202
+ onKeydown: R[0] || (R[0] = (U) => ne(U)),
3203
+ onClick: ce((U) => A(C), ["prevent"])
3204
+ }, X(C.date()), 41, ss)
3271
3205
  ]))), 128)),
3272
- (w(!0), U(Me, null, Be(l.value, (y, I) => (w(), U("span", {
3273
- key: `day-in-current-month-${y.date()}`,
3206
+ (I(!0), H(De, null, Se(l.value, (C, T) => (I(), H("span", {
3207
+ key: `day-in-current-month-${C.date()}`,
3274
3208
  class: "calendar-day is-5"
3275
3209
  }, [
3276
- j("button", {
3277
- id: y.isSame(n.value, "day") ? "selected-day" : void 0,
3210
+ K("button", {
3211
+ id: C.isSame(n.value, "day") ? "selected-day" : void 0,
3278
3212
  class: Ye(["phila-button is-extra-small p-2", {
3279
- active: y.isSame(n.value, "day")
3213
+ active: C.isSame(n.value, "day")
3280
3214
  }]),
3281
- title: y.format("MMMM D, YYYY"),
3282
- tabindex: y.isSame(n.value, "day") || y.month() !== n.value.month() && I === 0 ? 0 : -1,
3283
- disabled: c(y),
3284
- onKeydown: R[1] || (R[1] = ($) => ne($)),
3285
- onClick: ue(() => k(y), ["prevent"])
3286
- }, X(y.date()), 43, ls)
3215
+ title: C.format("MMMM D, YYYY"),
3216
+ tabindex: C.isSame(n.value, "day") || C.month() !== n.value.month() && T === 0 ? 0 : -1,
3217
+ disabled: m(C),
3218
+ onKeydown: R[1] || (R[1] = (U) => ne(U)),
3219
+ onClick: ce(() => A(C), ["prevent"])
3220
+ }, X(C.date()), 43, is)
3287
3221
  ]))), 128)),
3288
- (w(!0), U(Me, null, Be(h.value, (y) => (w(), U("span", {
3289
- key: "day-in-next-month-" + y.date(),
3222
+ (I(!0), H(De, null, Se(p.value, (C) => (I(), H("span", {
3223
+ key: "day-in-next-month-" + C.date(),
3290
3224
  class: "calendar-day outside-month is-5"
3291
3225
  }, [
3292
- j("button", {
3226
+ K("button", {
3293
3227
  class: "phila-button is-extra-small p-2",
3294
- title: `${y.format("MMMM D, YYYY")}`,
3228
+ title: `${C.format("MMMM D, YYYY")}`,
3295
3229
  tabindex: "-1",
3296
- disabled: c(y),
3297
- onKeydown: R[2] || (R[2] = (I) => ne(I)),
3298
- onClick: ue((I) => k(y), ["prevent"])
3299
- }, X(y.date()), 41, os)
3230
+ disabled: m(C),
3231
+ onKeydown: R[2] || (R[2] = (T) => ne(T)),
3232
+ onClick: ce((T) => A(C), ["prevent"])
3233
+ }, X(C.date()), 41, as)
3300
3234
  ]))), 128))
3301
3235
  ])
3302
- ], 8, as));
3236
+ ], 8, Jt));
3303
3237
  }
3304
- }), ds = (r, e) => {
3238
+ }), rs = (r, e) => {
3305
3239
  const t = r.__vccOpts || r;
3306
- for (const [s, a] of e)
3307
- t[s] = a;
3240
+ for (const [s, i] of e)
3241
+ t[s] = i;
3308
3242
  return t;
3309
- }, cs = /* @__PURE__ */ ds(hs, [["__scopeId", "data-v-225c8851"]]), ms = /* @__PURE__ */ ve({
3243
+ }, us = /* @__PURE__ */ rs(ns, [["__scopeId", "data-v-b781fd7a"]]), ls = { key: 0 }, cs = /* @__PURE__ */ ve({
3310
3244
  inheritAttrs: !1,
3311
3245
  __name: "DateField",
3312
3246
  props: {
@@ -3322,9 +3256,16 @@ const J = /* @__PURE__ */ Qt(ss), as = ["id"], is = { class: "date-picker-close
3322
3256
  min: {},
3323
3257
  max: {},
3324
3258
  className: {},
3259
+ id: { default: () => vt("phila-date-field-") },
3260
+ group: {},
3261
+ blurHide: { type: Boolean },
3262
+ showSingle: { type: Boolean, default: !0 },
3263
+ mouseOverToggle: { type: Boolean },
3264
+ outsideClickHide: { type: Boolean, default: !0 },
3265
+ escapeKeyHide: { type: Boolean, default: !0 },
3266
+ visibleOnMount: { type: Boolean },
3325
3267
  modelValue: {},
3326
3268
  label: {},
3327
- id: { default: () => gt("phila-date-field-") },
3328
3269
  supportingText: {},
3329
3270
  placeholder: {},
3330
3271
  leadingIcon: {},
@@ -3332,73 +3273,78 @@ const J = /* @__PURE__ */ Qt(ss), as = ["id"], is = { class: "date-picker-close
3332
3273
  error: {}
3333
3274
  },
3334
3275
  setup(r) {
3335
- const e = r, t = Xe(), s = pt("datePicker"), a = W(e.modelValue), i = W(""), n = Y(() => Fe("default-class", e.className)), u = (o) => {
3336
- a.value = o;
3337
- }, l = (o) => {
3338
- (e.min || e.max) && (nt(o, e.min, e.max) ? i.value = "" : i.value = "Selected date should be between " + J(e.min).format(e.format) + " and " + J(e.max).format(e.format)), s.value?.update(o);
3339
- };
3340
- return (o, h) => r.datePicker ? (w(), ae(x(Gt), {
3341
- key: 0,
3276
+ const e = r, { setVisibility: t, isVisible: s, toggleProps: i } = kt({
3342
3277
  id: `${e.id}-date-picker`,
3343
- group: "date-picker",
3344
- "outside-click-close": "",
3345
- "escape-key-close": "",
3346
- "open-single": ""
3347
- }, {
3348
- toggle: oe((c) => [
3349
- ge(x(Ze), ee({ ...x(t), ...e }, {
3350
- modelValue: a.value,
3351
- "onUpdate:modelValue": [
3352
- h[0] || (h[0] = (k) => a.value = k),
3353
- u
3354
- ],
3355
- class: n.value,
3356
- "aria-controls": c.ariaControls,
3357
- "trailing-icon": "fa-solid fa-calendar",
3358
- min: void 0,
3359
- max: void 0,
3360
- error: i.value || e.error,
3361
- onFocus: (k) => c.open ? null : c?.onClickToggle(k),
3362
- onClick: (k) => c.open ? null : c?.onClickOpen(k),
3363
- onKeydown: h[1] || (h[1] = ft((k) => s.value?.focusDatePicker(k), ["tab"])),
3364
- onComplete: l
3365
- }), null, 16, ["modelValue", "class", "aria-controls", "error", "onFocus", "onClick"])
3366
- ]),
3367
- default: oe(({ open: c, id: k, onClickToggle: v }) => [
3368
- c ? (w(), ae(cs, ee({
3369
- key: 0,
3370
- id: k,
3371
- ref: "datePicker"
3372
- }, e.datePickerOptions, {
3373
- "initial-value": a.value,
3374
- min: e.min,
3375
- max: e.max,
3376
- format: e.format,
3377
- close: v,
3378
- "onUpdate:modelValue": u
3379
- }), null, 16, ["id", "initial-value", "min", "max", "format", "close"])) : pe("", !0)
3380
- ]),
3381
- _: 1
3382
- }, 8, ["id"])) : (w(), ae(x(Ze), ee({ key: 1 }, { ...x(t), ...e }, {
3383
- modelValue: a.value,
3278
+ group: e.group ?? "date-picker",
3279
+ outsideClickHide: e.outsideClickHide,
3280
+ escapeKeyHide: e.escapeKeyHide,
3281
+ showSingle: e.showSingle
3282
+ }), a = N(() => s()), n = Qe(), u = Ke("datePicker"), l = Ke("text-field"), o = W(e.modelValue), p = W(""), m = N(() => Ae("default-class", e.className)), A = (x) => {
3283
+ o.value = x;
3284
+ }, v = (x) => {
3285
+ (e.min || e.max) && (lt(x, e.min, e.max) ? p.value = "" : p.value = "Selected date should be between " + J(e.min).format(e.format) + " and " + J(e.max).format(e.format)), u.value?.update(x);
3286
+ }, V = N(() => a.value ? null : () => t(!0));
3287
+ return se(
3288
+ () => a.value,
3289
+ (x) => {
3290
+ if (!x) {
3291
+ const M = l.value?.$el.querySelector("input");
3292
+ M && M.focus();
3293
+ }
3294
+ },
3295
+ { immediate: !0 }
3296
+ ), (x, M) => r.datePicker ? (I(), H("div", ls, [
3297
+ fe(w(Xe), ie({ ...w(n), ...e }, {
3298
+ ref: "text-field",
3299
+ modelValue: o.value,
3300
+ "onUpdate:modelValue": [
3301
+ M[0] || (M[0] = (P) => o.value = P),
3302
+ A
3303
+ ],
3304
+ class: m.value,
3305
+ "aria-controls": `${e.id}-date-picker`,
3306
+ "trailing-icon": w(Ge),
3307
+ min: void 0,
3308
+ max: void 0,
3309
+ error: p.value || e.error,
3310
+ "data-toggle": w(i)?.["data-toggle"],
3311
+ onFocus: V.value,
3312
+ onClick: V.value,
3313
+ onKeydown: M[1] || (M[1] = gt((P) => u.value?.focusDatePicker(P), ["tab"])),
3314
+ onComplete: v
3315
+ }), null, 16, ["modelValue", "class", "aria-controls", "trailing-icon", "error", "data-toggle", "onFocus", "onClick"]),
3316
+ a.value ? (I(), ue(us, ie({
3317
+ key: 0,
3318
+ id: `${e.id}-date-picker`,
3319
+ ref: "datePicker"
3320
+ }, e.datePickerOptions, {
3321
+ "initial-value": o.value,
3322
+ min: e.min,
3323
+ max: e.max,
3324
+ format: e.format,
3325
+ close: () => w(t)(!1),
3326
+ "onUpdate:modelValue": A
3327
+ }), null, 16, ["id", "initial-value", "min", "max", "format", "close"])) : de("", !0)
3328
+ ])) : (I(), ue(w(Xe), ie({ key: 1 }, { ...w(n), ...e }, {
3329
+ modelValue: o.value,
3384
3330
  "onUpdate:modelValue": [
3385
- h[2] || (h[2] = (c) => a.value = c),
3386
- u
3331
+ M[2] || (M[2] = (P) => o.value = P),
3332
+ A
3387
3333
  ],
3388
- class: n.value,
3334
+ class: m.value,
3389
3335
  label: "Date field",
3390
- "trailing-icon": "fa-solid fa-calendar",
3391
- errors: i.value || e.error,
3336
+ "trailing-icon": w(Ge),
3337
+ errors: p.value || e.error,
3392
3338
  min: void 0,
3393
3339
  max: void 0
3394
- }), null, 16, ["modelValue", "class", "errors"]));
3340
+ }), null, 16, ["modelValue", "class", "trailing-icon", "errors"]));
3395
3341
  }
3396
- }), nt = (r, e, t) => {
3342
+ }), lt = (r, e, t) => {
3397
3343
  typeof r == "string" && (r = J(r));
3398
- const s = e ? J(e) : null, a = t ? J(t) : null;
3399
- return !(s && r.isBefore(s, "day") || a && r.isAfter(a, "day"));
3344
+ const s = e ? J(e) : null, i = t ? J(t) : null;
3345
+ return !(s && r.isBefore(s, "day") || i && r.isAfter(i, "day"));
3400
3346
  };
3401
3347
  export {
3402
- ms as DateField,
3403
- nt as isInDateRange
3348
+ cs as DateField,
3349
+ lt as isInDateRange
3404
3350
  };