UNPKG

@solfacil/girassol

Version:
1,339 lines 746 kB
import { defineComponent as re, openBlock as d, createElementBlock as I, normalizeClass as K, createElementVNode as g, toDisplayString as q, useSlots as _t, computed as j, unref as c, renderSlot as L, createCommentVNode as x, createVNode as V, createBlock as U, withCtx as Y, ref as W, withDirectives as Ke, getCurrentInstance as qt, version as $d, watch as $e, onMounted as ct, provide as sc, isRef as gt, onBeforeUnmount as uc, toRef as xt, resolveDynamicComponent as ke, h as ea, inject as cc, reactive as Tt, onUnmounted as Cn, nextTick as Dt, warn as dc, watchEffect as fc, markRaw as Ed, mergeProps as Oe, vShow as nt, vModelText as Zd, Fragment as se, renderList as pe, createTextVNode as ue, getCurrentScope as mc, onScopeDispose as kl, withModifiers as Ge, shallowRef as Gd, triggerRef as ls, normalizeStyle as At, withKeys as he, Transition as Lt, createSlots as rt, normalizeProps as et, Teleport as Ja, guardReactiveProps as Wt, onBeforeUpdate as Bd, defineAsyncComponent as ft, pushScopeId as Kt, popScopeId as en, createStaticVNode as Yd, toRaw as fn, render as yc } from "vue"; const Ud = /* @__PURE__ */ g("path", { class: "path", d: "M16.0008 1.5C17.905 1.5 19.7905 1.87506 21.5497 2.60375C23.3089 3.33244 24.9074 4.4005 26.2538 5.74695C27.6003 7.0934 28.6684 8.69187 29.397 10.4511C30.1257 12.2103 30.5008 14.0958 30.5008 16C30.5008 17.9042 30.1257 19.7897 29.397 21.5489C28.6684 23.3081 27.6003 24.9066 26.2538 26.2531C24.9074 27.5995 23.3089 28.6676 21.5497 29.3963C19.7905 30.1249 17.905 30.5 16.0008 30.5C14.0966 30.5 12.2111 30.1249 10.4519 29.3963C8.69266 28.6676 7.09419 27.5995 5.74774 26.253C4.4013 24.9066 3.33323 23.3081 2.60454 21.5489C1.87585 19.7897 1.50079 17.9042 1.50079 16C1.5008 14.0958 1.87585 12.2103 2.60454 10.4511C3.33324 8.69187 4.4013 7.0934 5.74775 5.74695C7.0942 4.4005 8.69267 3.33244 10.4519 2.60375C12.2111 1.87505 14.0966 1.5 16.0008 1.5L16.0008 1.5Z" }, null, -1), zn = /* @__PURE__ */ re({ __name: "CircleLoader", props: { size: { default: "large" }, dark: { type: Boolean }, title: { default: "Carregando" } }, setup(e) { return (t, n) => (d(), I("svg", { class: K(["sol-inner-loader", `icon-size-${e.size}`]), viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, [ g("title", null, q(e.title), 1), Ud ], 2)); } }); const Vd = ["id", "data-testid", "disabled"], Rd = { key: 0, class: "icon -left" }, Wd = { key: 1, class: "icon -right" }, Qd = { key: 2, class: "loading" }, ze = /* @__PURE__ */ re({ __name: "Button", props: { id: null, loading: { type: Boolean }, onColor: { type: Boolean, default: !1 }, disabled: { type: Boolean }, size: { default: "large" }, variant: { default: "primary" } }, setup(e) { function t(o, l) { return o ? l : ""; } function n() { return !!(i != null && i["icon-right"]) || !!(i != null && i["icon-left"]) || !!(i != null && i["icon:right"]) || !!(i != null && i["icon:left"]); } const i = _t(), a = j(() => !!(i != null && i.default) && n()), r = j(() => !(i != null && i.default) && n()); return (o, l) => { var s, u, y, m; return d(), I("button", { id: `button-${e.id}`, "data-testid": `button-${e.id}`, class: K(["sol-button-core", `-${e.variant} -${e.size} ${t(e.loading, "-loading")} ${t(e.onColor, "-on-color")} ${t(c(a), "-has-icon")} ${t(c(r), "-only-icon")} `]), type: "button", disabled: e.disabled || e.loading }, [ !!((s = c(i)) != null && s["icon-left"]) || !!((u = c(i)) != null && u["icon:left"]) ? (d(), I("div", Rd, [ L(o.$slots, "icon-left"), L(o.$slots, "icon:left") ])) : x("", !0), L(o.$slots, "default"), !!((y = c(i)) != null && y["icon-right"]) || !!((m = c(i)) != null && m["icon:right"]) ? (d(), I("div", Wd, [ L(o.$slots, "icon-right"), L(o.$slots, "icon:right") ])) : x("", !0), e.loading ? (d(), I("div", Qd, [ V(zn, { "data-testid": `button-loader-${e.id}`, size: e.size === "small" ? "small" : "medium", dark: e.onColor }, null, 8, ["data-testid", "size", "dark"]) ])) : x("", !0) ], 10, Vd); }; } }); const Hd = { viewBox: "0 0 24 24", width: "1em", height: "1em" }, Fd = /* @__PURE__ */ g("path", { fill: "currentColor", d: "M7 21q-.825 0-1.412-.587Q5 19.825 5 19V6H4V4h5V3h6v1h5v2h-1v13q0 .825-.587 1.413Q17.825 21 17 21ZM17 6H7v13h10ZM9 17h2V8H9Zm4 0h2V8h-2ZM7 6v13Z" }, null, -1), Xd = [ Fd ]; function Jd(e, t) { return d(), I("svg", Hd, Xd); } const qd = { name: "material-symbols-delete-outline", render: Jd }, hc = /* @__PURE__ */ re({ __name: "ButtonDestructive", props: { id: null, size: null, loading: { type: Boolean }, hideIcon: { type: Boolean, default: !1 } }, setup(e) { return (t, n) => (d(), U(ze, { id: `destructive-${e.id}`, size: e.size, loading: e.loading, variant: "primary", class: "button-destructive" }, { "icon-left": Y(() => [ e.hideIcon ? (d(), U(c(qd), { key: 0, "aria-hidden": "true" })) : x("", !0) ]), default: Y(() => [ L(t.$slots, "default") ]), _: 3 }, 8, ["id", "size", "loading"])); } }); ze.install = (e) => { e.component("SolButton", ze); }; hc.install = (e) => { e.component("SolButton", ze); }; /*! * maska v1.5.2 * (c) 2019-2022 Alexander Shabunevich * Released under the MIT License. */ function ss(e, t) { var n = Object.keys(e); if (Object.getOwnPropertySymbols) { var i = Object.getOwnPropertySymbols(e); t && (i = i.filter(function(a) { return Object.getOwnPropertyDescriptor(e, a).enumerable; })), n.push.apply(n, i); } return n; } function di(e) { for (var t = 1; t < arguments.length; t++) { var n = arguments[t] != null ? arguments[t] : {}; t % 2 ? ss(Object(n), !0).forEach(function(i) { tf(e, i, n[i]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ss(Object(n)).forEach(function(i) { Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(n, i)); }); } return e; } function Kd(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); } function ef(e, t) { for (var n = 0; n < t.length; n++) { var i = t[n]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, vc(i.key), i); } } function tf(e, t, n) { return (t = vc(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e; } function vc(e) { var t = function(n, i) { if (typeof n != "object" || n === null) return n; var a = n[Symbol.toPrimitive]; if (a !== void 0) { var r = a.call(n, i || "default"); if (typeof r != "object") return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return (i === "string" ? String : Number)(n); }(e, "string"); return typeof t == "symbol" ? t : String(t); } var gc = { "#": { pattern: /[0-9]/ }, X: { pattern: /[0-9a-zA-Z]/ }, S: { pattern: /[a-zA-Z]/ }, A: { pattern: /[a-zA-Z]/, uppercase: !0 }, a: { pattern: /[a-zA-Z]/, lowercase: !0 }, "!": { escape: !0 }, "*": { repeat: !0 } }; function us(e, t) { var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : gc, i = !(arguments.length > 3 && arguments[3] !== void 0) || arguments[3]; return Ic(t).length > 1 ? nf(t)(e, t, n, i) : Tr(e, t, n, i); } function Ic(e) { try { return JSON.parse(e); } catch { return [e]; } } function nf(e) { var t = Ic(e).sort(function(i, a) { return i.length - a.length; }); return function(i, a, r) { var o = !(arguments.length > 3 && arguments[3] !== void 0) || arguments[3], l = t.map(function(y) { return Tr(i, y, r, !1); }), s = l.pop(); for (var u in t) if (n(s, t[u], r)) return Tr(i, t[u], r, o); return ""; }; function n(i, a, r) { for (var o in r) r[o].escape && (a = a.replace(new RegExp(o + ".{1}", "g"), "")); return a.split("").filter(function(l) { return r[l] && r[l].pattern; }).length >= i.length; } } function Tr(e, t, n) { for (var i = !(arguments.length > 3 && arguments[3] !== void 0) || arguments[3], a = 0, r = 0, o = "", l = ""; a < t.length && r < e.length; ) { var s = t[a], u = e[r], y = n[s]; if (y && y.pattern) y.pattern.test(u) && (o += af(u, y), a++, i && t[a] && (n[t[a]] ? n[t[a]] && n[t[a]].escape && (o += t[a + 1], a += 2) : (o += t[a], a++))), r++; else if (y && y.repeat) { var m = n[t[a - 1]]; m && !m.pattern.test(u) ? a++ : a--; } else y && y.escape && (s = t[++a]), i && (o += s), u === s && r++, a++; } for (; i && a < t.length; ) { var f = t[a]; if (n[f]) { l = ""; break; } l += f, a++; } return o + l; } function af(e, t) { return t.transform && (e = t.transform(e)), t.uppercase ? e.toLocaleUpperCase() : t.lowercase ? e.toLocaleLowerCase() : e; } function cs(e) { return e instanceof HTMLInputElement ? e : e.querySelector("input") || e; } function Ar(e) { return Object.prototype.toString.call(e) === "[object String]"; } var rf = function() { function e(i) { var a = this, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; if (Kd(this, e), !i) throw new Error("Maska: no element for mask"); if (r.preprocessor != null && typeof r.preprocessor != "function") throw new Error("Maska: preprocessor must be a function"); if (r.tokens) for (var o in r.tokens) r.tokens[o] = di({}, r.tokens[o]), r.tokens[o].pattern && Ar(r.tokens[o].pattern) && (r.tokens[o].pattern = new RegExp(r.tokens[o].pattern)); this._opts = { mask: r.mask, tokens: di(di({}, gc), r.tokens), preprocessor: r.preprocessor }, this._el = Ar(i) ? document.querySelectorAll(i) : i.length ? i : [i], this.inputEvent = function(l) { return a.updateValue(l.target, l); }, this.init(); } var t, n; return t = e, n = [{ key: "init", value: function() { for (var i = this, a = function(o) { var l = cs(i._el[o]); !i._opts.mask || l.dataset.mask && l.dataset.mask === i._opts.mask || (l.dataset.mask = i._opts.mask), setTimeout(function() { return i.updateValue(l); }, 0), l.dataset.maskInited || (l.dataset.maskInited = !0, l.addEventListener("input", i.inputEvent), l.addEventListener("beforeinput", i.beforeInput)); }, r = 0; r < this._el.length; r++) a(r); } }, { key: "destroy", value: function() { for (var i = 0; i < this._el.length; i++) { var a = cs(this._el[i]); a.removeEventListener("input", this.inputEvent), a.removeEventListener("beforeinput", this.beforeInput), delete a.dataset.mask, delete a.dataset.maskInited; } } }, { key: "updateValue", value: function(i, a) { if (i && i.type) { var r = i.type.match(/^number$/i) && i.validity.badInput; if (!i.value && !r || !i.dataset.mask) return i.dataset.maskRawValue = "", void this.dispatch("maska", i, a); var o = i.selectionEnd, l = i.value, s = l[o - 1]; i.dataset.maskRawValue = us(i.value, i.dataset.mask, this._opts.tokens, !1); var u = i.value; this._opts.preprocessor && (u = this._opts.preprocessor(u)), i.value = us(u, i.dataset.mask, this._opts.tokens), a && a.inputType === "insertText" && o === l.length && (o = i.value.length), function(y, m, f) { for (; m && m < y.value.length && y.value.charAt(m - 1) !== f; ) m++; (y.type ? y.type.match(/^(text|search|password|tel|url)$/i) : !y.type) && y === document.activeElement && (y.setSelectionRange(m, m), setTimeout(function() { y.setSelectionRange(m, m); }, 0)); }(i, o, s), this.dispatch("maska", i, a), i.value !== l && this.dispatch("input", i, a); } } }, { key: "beforeInput", value: function(i) { i && i.target && i.target.type && i.target.type.match(/^number$/i) && i.data && isNaN(i.target.value + i.data) && i.preventDefault(); } }, { key: "dispatch", value: function(i, a, r) { a.dispatchEvent(function(o) { var l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, s = document.createEvent("Event"); return s.initEvent(o, !0, !0), l && (s.inputType = l), s; }(i, r && r.inputType || null)); } }], n && ef(t.prototype, n), Object.defineProperty(t, "prototype", { writable: !1 }), e; }(), sr, _l = (sr = /* @__PURE__ */ new WeakMap(), function(e, t) { t.value && (sr.has(e) && !function(n) { return !(Ar(n.value) && n.value === n.oldValue || Array.isArray(n.value) && JSON.stringify(n.value) === JSON.stringify(n.oldValue) || n.value && n.value.mask && n.oldValue && n.oldValue.mask && n.value.mask === n.oldValue.mask); }(t) || sr.set(e, new rf(e, function(n) { var i = {}; return n.mask ? (i.mask = Array.isArray(n.mask) ? JSON.stringify(n.mask) : n.mask, i.tokens = n.tokens ? di({}, n.tokens) : {}, i.preprocessor = n.preprocessor) : i.mask = Array.isArray(n) ? JSON.stringify(n) : n, i; }(t.value)))); }); function of(e) { e.directive("maska", _l); } typeof window < "u" && window.Vue && window.Vue.use && window.Vue.use(of); const lf = { CPF: "###.###.###-##", CNPJ: "##.###.###/####-##", CPF_CNPJ: ["###.###.###-##", "##.###.###/####-##"], MobilePhoneDDD: "(##) # ####-####" }, $D = _l; function sf(e) { const t = _l, n = j(() => { if (e != null && e.hasOwnProperty("preset")) { const { preset: i } = e; return lf[i]; } return e; }); return { vMask: t, maskValue: n }; } const uf = ["id", "data-testid", "value"], qa = /* @__PURE__ */ re({ __name: "Input", props: { id: null, modelValue: null, error: null, mask: null, hasLeftIcon: null, hasRightIcon: null, size: { default: "medium" }, hasFeedbackIcon: null }, emits: ["update:modelValue"], setup(e, { expose: t, emit: n }) { const i = e, { maskValue: a, vMask: r } = sf(i.mask); function o({ target: s }) { n("update:modelValue", s == null ? void 0 : s.value); } const l = W(""); return t({ input: l }), (s, u) => Ke((d(), I("input", { id: `input-${e.id}`, ref_key: "input", ref: l, "data-testid": `input-${e.id}`, value: e.modelValue, class: K(["sol-input-core", [`-${e.size}`, { "-error": e.error, "-feedback-icon": e.hasFeedbackIcon, "-left-icon": e.hasLeftIcon, "-right-icon": e.hasRightIcon }]]), onInput: o }, null, 42, uf)), [ [c(r), c(a)] ]); } }); /** * Vue Currency Input 3.0.3 * (c) 2018-2022 Matthias Stiller * @license MIT */ var Ft; (function(e) { e.symbol = "symbol", e.narrowSymbol = "narrowSymbol", e.code = "code", e.name = "name", e.hidden = "hidden"; })(Ft || (Ft = {})); var cn; (function(e) { e.precision = "precision", e.thousands = "thousands", e.millions = "millions", e.billions = "billions"; })(cn || (cn = {})); const fi = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), pc = (e) => e.replace(/^0+(0$|[^0])/, "$1"), ur = (e, t) => (e.match(new RegExp(fi(t), "g")) || []).length, cf = (e, t) => e.substring(0, e.indexOf(t)), Mc = [",", ".", "\u066B"], ds = "(0|[1-9]\\d*)"; class df { constructor(t) { var n, i, a, r, o, l; const { currency: s, currencyDisplay: u, locale: y, precision: m, accountingSign: f, useGrouping: h } = t; this.locale = y, this.options = { currency: s, useGrouping: h, style: "currency", currencySign: f ? "accounting" : void 0, currencyDisplay: u !== Ft.hidden ? u : void 0 }; const p = new Intl.NumberFormat(y, this.options), M = p.formatToParts(123456); this.currency = (n = M.find(({ type: w }) => w === "currency")) === null || n === void 0 ? void 0 : n.value, this.digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((w) => w.toLocaleString(y)), this.decimalSymbol = (i = M.find(({ type: w }) => w === "decimal")) === null || i === void 0 ? void 0 : i.value, this.groupingSymbol = (a = M.find(({ type: w }) => w === "group")) === null || a === void 0 ? void 0 : a.value, this.minusSign = (r = p.formatToParts(-1).find(({ type: w }) => w === "minusSign")) === null || r === void 0 ? void 0 : r.value, this.decimalSymbol === void 0 ? this.minimumFractionDigits = this.maximumFractionDigits = 0 : typeof m == "number" ? this.minimumFractionDigits = this.maximumFractionDigits = m : (this.minimumFractionDigits = (o = m == null ? void 0 : m.min) !== null && o !== void 0 ? o : p.resolvedOptions().minimumFractionDigits, this.maximumFractionDigits = (l = m == null ? void 0 : m.max) !== null && l !== void 0 ? l : p.resolvedOptions().maximumFractionDigits); const b = (w) => cf(w, this.digits[1]), O = (w) => w.substring(w.lastIndexOf(this.decimalSymbol ? this.digits[0] : this.digits[1]) + 1); this.prefix = b(p.format(1)), this.suffix = O(p.format(1)), this.negativePrefix = b(p.format(-1)), this.negativeSuffix = O(p.format(-1)); } parse(t) { if (t) { const n = this.isNegative(t); t = this.normalizeDigits(t), t = this.stripCurrency(t, n), t = this.stripSignLiterals(t); const i = this.decimalSymbol ? `(?:${fi(this.decimalSymbol)}(\\d*))?` : "", a = this.stripGroupingSeparator(t).match(new RegExp(`^${ds}${i}$`)); if (a && this.isValidIntegerFormat(this.decimalSymbol ? t.split(this.decimalSymbol)[0] : t, Number(a[1]))) return Number(`${n ? "-" : ""}${this.onlyDigits(a[1])}.${this.onlyDigits(a[2] || "")}`); } return null; } isValidIntegerFormat(t, n) { const i = { ...this.options, minimumFractionDigits: 0 }; return [ this.stripCurrency(this.normalizeDigits(n.toLocaleString(this.locale, { ...i, useGrouping: !0 })), !1), this.stripCurrency(this.normalizeDigits(n.toLocaleString(this.locale, { ...i, useGrouping: !1 })), !1) ].includes(t); } format(t, n = { minimumFractionDigits: this.minimumFractionDigits, maximumFractionDigits: this.maximumFractionDigits }) { return t != null ? t.toLocaleString(this.locale, { ...this.options, ...n }) : ""; } toFraction(t) { return `${this.digits[0]}${this.decimalSymbol}${this.onlyLocaleDigits(t.substr(1)).substr(0, this.maximumFractionDigits)}`; } isFractionIncomplete(t) { return !!this.normalizeDigits(this.stripGroupingSeparator(t)).match(new RegExp(`^${ds}${fi(this.decimalSymbol)}$`)); } isNegative(t) { return t.startsWith(this.negativePrefix) || this.minusSign === void 0 && (t.startsWith("(") || t.startsWith("-")) || this.minusSign !== void 0 && t.replace("-", this.minusSign).startsWith(this.minusSign); } insertCurrency(t, n) { return `${n ? this.negativePrefix : this.prefix}${t}${n ? this.negativeSuffix : this.suffix}`; } stripGroupingSeparator(t) { return this.groupingSymbol !== void 0 ? t.replace(new RegExp(fi(this.groupingSymbol), "g"), "") : t; } stripSignLiterals(t) { return this.minusSign !== void 0 ? t.replace("-", this.minusSign).replace(this.minusSign, "") : t.replace(/[-()]/g, ""); } stripCurrency(t, n) { return t.replace(n ? this.negativePrefix : this.prefix, "").replace(n ? this.negativeSuffix : this.suffix, ""); } normalizeDecimalSeparator(t, n) { return Mc.forEach((i) => { t = t.substr(0, n) + t.substr(n).replace(i, this.decimalSymbol); }), t; } normalizeDigits(t) { return this.digits[0] !== "0" && this.digits.forEach((n, i) => { t = t.replace(new RegExp(n, "g"), String(i)); }), t; } onlyDigits(t) { return this.normalizeDigits(t).replace(/\D+/g, ""); } onlyLocaleDigits(t) { return t.replace(new RegExp(`[^${this.digits.join("")}]*`, "g"), ""); } } class bc { constructor(t) { this.currencyFormat = t; } } class ff extends bc { conformToMask(t, n = "") { const i = this.currencyFormat.isNegative(t), a = (p) => p === "" && i && !(this.currencyFormat.minusSign === void 0 ? n === this.currencyFormat.negativePrefix + this.currencyFormat.negativeSuffix : n === this.currencyFormat.negativePrefix), r = (p) => { if (a(p)) return ""; if (this.currencyFormat.maximumFractionDigits > 0) { if (this.currencyFormat.isFractionIncomplete(p)) return p; if (p.startsWith(this.currencyFormat.decimalSymbol)) return this.currencyFormat.toFraction(p); } return null; }; let o = t; o = this.currencyFormat.stripCurrency(o, i), o = this.currencyFormat.stripSignLiterals(o); const l = r(o); if (l != null) return this.currencyFormat.insertCurrency(l, i); const [s, ...u] = o.split(this.currencyFormat.decimalSymbol), y = pc(this.currencyFormat.onlyDigits(s)), m = this.currencyFormat.onlyDigits(u.join("")).substr(0, this.currencyFormat.maximumFractionDigits), f = u.length > 0 && m.length === 0, h = y === "" && i && (this.currencyFormat.minusSign === void 0 ? n === t.slice(0, -2) + this.currencyFormat.negativeSuffix : n === t.slice(0, -1)); return f || h || a(y) ? n : y.match(/\d+/) ? { numberValue: Number(`${i ? "-" : ""}${y}.${m}`), fractionDigits: m } : ""; } } class mf extends bc { conformToMask(t, n = "") { if (t === "" || this.currencyFormat.parse(n) === 0 && this.currencyFormat.stripCurrency(n, !0).slice(0, -1) === this.currencyFormat.stripCurrency(t, !0)) return ""; const i = this.currencyFormat.isNegative(t), a = this.currencyFormat.stripSignLiterals(t) === "" ? -0 : Number(`${i ? "-" : ""}${pc(this.currencyFormat.onlyDigits(t))}`) / Math.pow(10, this.currencyFormat.maximumFractionDigits); return { numberValue: a, fractionDigits: a.toFixed(this.currencyFormat.maximumFractionDigits).slice(-this.currencyFormat.maximumFractionDigits) }; } } const yf = { locale: void 0, currency: void 0, currencyDisplay: void 0, hideGroupingSeparatorOnFocus: !0, hideCurrencySymbolOnFocus: !0, hideNegligibleDecimalDigitsOnFocus: !0, precision: void 0, autoDecimalDigits: !1, valueRange: void 0, useGrouping: void 0, valueScaling: void 0 }; class hf { constructor(t) { this.el = t.el, this.onInput = t.onInput, this.onChange = t.onChange, this.addEventListener(), this.init(t.options); } setOptions(t) { this.init(t), this.applyFixedFractionFormat(this.numberValue, !0); } getValue() { return { number: this.valueScaling && this.numberValue != null ? this.toInteger(this.numberValue, this.valueScaling) : this.numberValue, formatted: this.formattedValue }; } setValue(t) { const n = this.valueScaling !== void 0 && t != null ? this.toFloat(t, this.valueScaling) : t; n !== this.numberValue && this.applyFixedFractionFormat(n); } init(t) { this.options = { ...yf, ...t }, this.options.autoDecimalDigits ? (this.options.hideNegligibleDecimalDigitsOnFocus = !1, this.el.setAttribute("inputmode", "numeric")) : this.el.setAttribute("inputmode", "decimal"), this.currencyFormat = new df(this.options), this.numberMask = this.options.autoDecimalDigits ? new mf(this.currencyFormat) : new ff(this.currencyFormat); const n = { [cn.precision]: this.currencyFormat.maximumFractionDigits, [cn.thousands]: 3, [cn.millions]: 6, [cn.billions]: 9 }; this.valueScaling = this.options.valueScaling ? n[this.options.valueScaling] : void 0, this.valueScalingFractionDigits = this.valueScaling !== void 0 && this.options.valueScaling !== cn.precision ? this.valueScaling + this.currencyFormat.maximumFractionDigits : this.currencyFormat.maximumFractionDigits, this.minValue = this.getMinValue(), this.maxValue = this.getMaxValue(); } getMinValue() { var t, n; let i = this.toFloat(-Number.MAX_SAFE_INTEGER); return ((t = this.options.valueRange) === null || t === void 0 ? void 0 : t.min) !== void 0 && (i = Math.max((n = this.options.valueRange) === null || n === void 0 ? void 0 : n.min, this.toFloat(-Number.MAX_SAFE_INTEGER))), i; } getMaxValue() { var t, n; let i = this.toFloat(Number.MAX_SAFE_INTEGER); return ((t = this.options.valueRange) === null || t === void 0 ? void 0 : t.max) !== void 0 && (i = Math.min((n = this.options.valueRange) === null || n === void 0 ? void 0 : n.max, this.toFloat(Number.MAX_SAFE_INTEGER))), i; } toFloat(t, n) { return t / Math.pow(10, n != null ? n : this.valueScalingFractionDigits); } toInteger(t, n) { return Number(t.toFixed(n != null ? n : this.valueScalingFractionDigits).split(".").join("")); } validateValueRange(t) { return t != null ? Math.min(Math.max(t, this.minValue), this.maxValue) : t; } applyFixedFractionFormat(t, n = !1) { this.format(this.currencyFormat.format(this.validateValueRange(t))), (t !== this.numberValue || n) && this.onChange(this.getValue()); } format(t, n = !1) { if (t != null) { this.decimalSymbolInsertedAt !== void 0 && (t = this.currencyFormat.normalizeDecimalSeparator(t, this.decimalSymbolInsertedAt), this.decimalSymbolInsertedAt = void 0); const i = this.numberMask.conformToMask(t, this.formattedValue); let a; if (typeof i == "object") { const { numberValue: r, fractionDigits: o } = i; let { maximumFractionDigits: l, minimumFractionDigits: s } = this.currencyFormat; this.focus ? s = n ? o.replace(/0+$/, "").length : Math.min(l, o.length) : Number.isInteger(r) && !this.options.autoDecimalDigits && (this.options.precision === void 0 || s === 0) && (s = l = 0), a = this.toInteger(Math.abs(r)) > Number.MAX_SAFE_INTEGER ? this.formattedValue : this.currencyFormat.format(r, { useGrouping: this.options.useGrouping !== !1 && !(this.focus && this.options.hideGroupingSeparatorOnFocus), minimumFractionDigits: s, maximumFractionDigits: l }); } else a = i; this.maxValue <= 0 && !this.currencyFormat.isNegative(a) && this.currencyFormat.parse(a) !== 0 && (a = a.replace(this.currencyFormat.prefix, this.currencyFormat.negativePrefix)), this.minValue >= 0 && (a = a.replace(this.currencyFormat.negativePrefix, this.currencyFormat.prefix)), (this.options.currencyDisplay === Ft.hidden || this.focus && this.options.hideCurrencySymbolOnFocus) && (a = a.replace(this.currencyFormat.negativePrefix, this.currencyFormat.minusSign !== void 0 ? this.currencyFormat.minusSign : "(").replace(this.currencyFormat.negativeSuffix, this.currencyFormat.minusSign !== void 0 ? "" : ")").replace(this.currencyFormat.prefix, "").replace(this.currencyFormat.suffix, "")), this.el.value = a, this.numberValue = this.currencyFormat.parse(a); } else this.el.value = "", this.numberValue = null; this.formattedValue = this.el.value, this.onInput(this.getValue()); } addEventListener() { this.el.addEventListener("input", (t) => { const { value: n, selectionStart: i } = this.el, a = t; if (i && a.data && Mc.includes(a.data) && (this.decimalSymbolInsertedAt = i - 1), this.format(n), this.focus && i != null) { const r = () => { const { prefix: o, suffix: l, decimalSymbol: s, maximumFractionDigits: u, groupingSymbol: y } = this.currencyFormat; let m = n.length - i; const f = this.formattedValue.length; if (this.currencyFormat.minusSign === void 0 && (n.startsWith("(") || n.startsWith("-")) && !n.endsWith(")")) return f - this.currencyFormat.negativeSuffix.length > 1 ? this.formattedValue.substring(i).length : 1; if (this.formattedValue.substr(i, 1) === y && ur(this.formattedValue, y) === ur(n, y) + 1) return f - m - 1; if (f < m) return i; if (s !== void 0 && n.indexOf(s) !== -1) { const h = n.indexOf(s) + 1; if (Math.abs(f - n.length) > 1 && i <= h) return this.formattedValue.indexOf(s) + 1; !this.options.autoDecimalDigits && i > h && this.currencyFormat.onlyDigits(n.substr(h)).length - 1 === u && (m -= 1); } return this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay === Ft.hidden ? f - m : Math.max(f - Math.max(m, l.length), o.length); }; this.setCaretPosition(r()); } }), this.el.addEventListener("focus", () => { this.focus = !0, setTimeout(() => { const { value: t, selectionStart: n, selectionEnd: i } = this.el; if (this.format(t, this.options.hideNegligibleDecimalDigitsOnFocus), n != null && i != null && Math.abs(n - i) > 0) this.setCaretPosition(0, this.el.value.length); else if (n != null) { const a = this.getCaretPositionOnFocus(t, n); this.setCaretPosition(a); } }); }), this.el.addEventListener("blur", () => { this.focus = !1, this.applyFixedFractionFormat(this.numberValue); }), this.el.addEventListener("change", () => { this.onChange(this.getValue()); }); } getCaretPositionOnFocus(t, n) { if (this.numberValue == null) return n; const { prefix: i, negativePrefix: a, suffix: r, negativeSuffix: o, groupingSymbol: l, currency: s } = this.currencyFormat, u = this.numberValue < 0, y = u ? a : i, m = y.length; if (this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay === Ft.hidden) { if (u) { if (n <= 1) return 1; if (t.endsWith(")") && n > t.indexOf(")")) return this.formattedValue.length - 1; } } else { const h = u ? o.length : r.length; if (n >= t.length - h) return this.formattedValue.length - h; if (n < m) return m; } let f = n; return this.options.hideCurrencySymbolOnFocus && this.options.currencyDisplay !== Ft.hidden && n >= m && s !== void 0 && y.includes(s) && (f -= m, u && (f += 1)), this.options.hideGroupingSeparatorOnFocus && l !== void 0 && (f -= ur(t.substring(0, n), l)), f; } setCaretPosition(t, n = t) { this.el.setSelectionRange(t, n); } } const vf = (e) => e != null && e.matches("input") ? e : e == null ? void 0 : e.querySelector("input"); function gf(e, t) { var n, i, a, r; let o; const l = W(null), s = W(null), u = W(null), y = qt(), m = (y == null ? void 0 : y.emit) || ((i = (n = y == null ? void 0 : y.proxy) === null || n === void 0 ? void 0 : n.$emit) === null || i === void 0 ? void 0 : i.bind(y == null ? void 0 : y.proxy)), f = (y == null ? void 0 : y.props) || ((a = y == null ? void 0 : y.proxy) === null || a === void 0 ? void 0 : a.$props), h = $d.startsWith("3"), p = h && ((r = y == null ? void 0 : y.attrs.modelModifiers) === null || r === void 0 ? void 0 : r.lazy), M = j(() => f == null ? void 0 : f[h ? "modelValue" : "value"]), b = h ? "update:modelValue" : "input", O = p ? "update:modelValue" : "change"; return $e(l, (w) => { var N; if (w) { const S = vf((N = w == null ? void 0 : w.$el) !== null && N !== void 0 ? N : w); S ? (o = new hf({ el: S, options: e, onInput: (Q) => { !p && t !== !1 && M.value !== Q.number && (m == null || m(b, Q.number)), u.value = Q.number, s.value = Q.formatted; }, onChange: (Q) => { m == null || m(O, Q.number); } }), o.setValue(M.value)) : console.error('No input element found. Please make sure that the "inputRef" template ref is properly assigned.'); } else o = null; }), { inputRef: l, numberValue: u, formattedValue: s, setValue: (w) => o == null ? void 0 : o.setValue(w), setOptions: (w) => o == null ? void 0 : o.setOptions(w) }; } function If() { return wc().__VUE_DEVTOOLS_GLOBAL_HOOK__; } function wc() { return typeof navigator < "u" && typeof window < "u" ? window : typeof global < "u" ? global : {}; } const pf = typeof Proxy == "function", Mf = "devtools-plugin:setup", bf = "plugin:settings:set"; let Mn, kr; function wf() { var e; return Mn !== void 0 || (typeof window < "u" && window.performance ? (Mn = !0, kr = window.performance) : typeof global < "u" && ((e = global.perf_hooks) === null || e === void 0 ? void 0 : e.performance) ? (Mn = !0, kr = global.perf_hooks.performance) : Mn = !1), Mn; } function Nf() { return wf() ? kr.now() : Date.now(); } class jf { constructor(t, n) { this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = n; const i = {}; if (t.settings) for (const o in t.settings) { const l = t.settings[o]; i[o] = l.defaultValue; } const a = `__vue-devtools-plugin-settings__${t.id}`; let r = Object.assign({}, i); try { const o = localStorage.getItem(a), l = JSON.parse(o); Object.assign(r, l); } catch { } this.fallbacks = { getSettings() { return r; }, setSettings(o) { try { localStorage.setItem(a, JSON.stringify(o)); } catch { } r = o; }, now() { return Nf(); } }, n && n.on(bf, (o, l) => { o === this.plugin.id && this.fallbacks.setSettings(l); }), this.proxiedOn = new Proxy({}, { get: (o, l) => this.target ? this.target.on[l] : (...s) => { this.onQueue.push({ method: l, args: s }); } }), this.proxiedTarget = new Proxy({}, { get: (o, l) => this.target ? this.target[l] : l === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(l) ? (...s) => (this.targetQueue.push({ method: l, args: s, resolve: () => { } }), this.fallbacks[l](...s)) : (...s) => new Promise((u) => { this.targetQueue.push({ method: l, args: s, resolve: u }); }) }); } async setRealTarget(t) { this.target = t; for (const n of this.onQueue) this.target.on[n.method](...n.args); for (const n of this.targetQueue) n.resolve(await this.target[n.method](...n.args)); } } function Sf(e, t) { const n = e, i = wc(), a = If(), r = pf && n.enableEarlyProxy; if (a && (i.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !r)) a.emit(Mf, e, t); else { const o = r ? new jf(n, a) : null; (i.__VUE_DEVTOOLS_PLUGINS__ = i.__VUE_DEVTOOLS_PLUGINS__ || []).push({ pluginDescriptor: n, setupFn: t, proxy: o }), o && t(o.proxiedTarget); } } /** * vee-validate v4.7.3 * (c) 2022 Abdelrahman Awad * @license MIT */ function Dn(e) { return typeof e == "function"; } function Un(e) { return e == null; } const Jt = (e) => e !== null && !!e && typeof e == "object" && !Array.isArray(e); function Nc(e) { return Number(e) >= 0; } function xf(e) { const t = parseFloat(e); return isNaN(t) ? e : t; } const Df = {}; function Tf(e) { return Df[e]; } const ei = Symbol("vee-validate-form"), Af = Symbol("vee-validate-field-instance"), ta = Symbol("Default empty value"), kf = typeof window < "u"; function _r(e) { return Dn(e) && !!e.__locatorRef; } function Vn(e) { return !!e && Dn(e.validate); } function Tn(e) { return e === "checkbox" || e === "radio"; } function _f(e) { return Jt(e) || Array.isArray(e); } function jc(e) { return Array.isArray(e) ? e.length === 0 : Jt(e) && Object.keys(e).length === 0; } function Ka(e) { return /^\[.+\]$/i.test(e); } function Lf(e) { return Sc(e) && e.multiple; } function Sc(e) { return e.tagName === "SELECT"; } function Cf(e, t) { const n = ![!1, null, void 0, 0].includes(t.multiple) && !Number.isNaN(t.multiple); return e === "select" && "multiple" in t && n; } function zf(e, t) { return !Cf(e, t) && t.type !== "file" && !Tn(t.type); } function xc(e) { return Ll(e) && e.target && "submit" in e.target; } function Ll(e) { return e ? !!(typeof Event < "u" && Dn(Event) && e instanceof Event || e && e.srcElement) : !1; } function fs(e, t) { return t in e && e[t] !== ta; } function ot(e, t) { if (e === t) return !0; if (e && t && typeof e == "object" && typeof t == "object") { if (e.constructor !== t.constructor) return !1; var n, i, a; if (Array.isArray(e)) { if (n = e.length, n != t.length) return !1; for (i = n; i-- !== 0; ) if (!ot(e[i], t[i])) return !1; return !0; } if (e instanceof Map && t instanceof Map) { if (e.size !== t.size) return !1; for (i of e.entries()) if (!t.has(i[0])) return !1; for (i of e.entries()) if (!ot(i[1], t.get(i[0]))) return !1; return !0; } if (ms(e) && ms(t)) return !(e.size !== t.size || e.name !== t.name || e.lastModified !== t.lastModified || e.type !== t.type); if (e instanceof Set && t instanceof Set) { if (e.size !== t.size) return !1; for (i of e.entries()) if (!t.has(i[0])) return !1; return !0; } if (ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) { if (n = e.length, n != t.length) return !1; for (i = n; i-- !== 0; ) if (e[i] !== t[i]) return !1; return !0; } if (e.constructor === RegExp) return e.source === t.source && e.flags === t.flags; if (e.valueOf !== Object.prototype.valueOf) return e.valueOf() === t.valueOf(); if (e.toString !== Object.prototype.toString) return e.toString() === t.toString(); if (a = Object.keys(e), n = a.length, n !== Object.keys(t).length) return !1; for (i = n; i-- !== 0; ) if (!Object.prototype.hasOwnProperty.call(t, a[i])) return !1; for (i = n; i-- !== 0; ) { var r = a[i]; if (!ot(e[r], t[r])) return !1; } return !0; } return e !== e && t !== t; } function ms(e) { return kf ? e instanceof File : !1; } function ys(e, t, n) { typeof n.value == "object" && (n.value = Ye(n.value)), !n.enumerable || n.get || n.set || !n.configurable || !n.writable || t === "__proto__" ? Object.defineProperty(e, t, n) : e[t] = n.value; } function Ye(e) { if (typeof e != "object") return e; var t = 0, n, i, a, r = Object.prototype.toString.call(e); if (r === "[object Object]" ? a = Object.create(e.__proto__ || null) : r === "[object Array]" ? a = Array(e.length) : r === "[object Set]" ? (a = /* @__PURE__ */ new Set(), e.forEach(function(o) { a.add(Ye(o)); })) : r === "[object Map]" ? (a = /* @__PURE__ */ new Map(), e.forEach(function(o, l) { a.set(Ye(l), Ye(o)); })) : r === "[object Date]" ? a = new Date(+e) : r === "[object RegExp]" ? a = new RegExp(e.source, e.flags) : r === "[object DataView]" ? a = new e.constructor(Ye(e.buffer)) : r === "[object ArrayBuffer]" ? a = e.slice(0) : r.slice(-6) === "Array]" && (a = new e.constructor(e)), a) { for (i = Object.getOwnPropertySymbols(e); t < i.length; t++) ys(a, i[t], Object.getOwnPropertyDescriptor(e, i[t])); for (t = 0, i = Object.getOwnPropertyNames(e); t < i.length; t++) Object.hasOwnProperty.call(a, n = i[t]) && a[n] === e[n] || ys(a, n, Object.getOwnPropertyDescriptor(e, n)); } return a || e; } function Cl(e) { return Ka(e) ? e.replace(/\[|\]/gi, "") : e; } function Xe(e, t, n) { return e ? Ka(t) ? e[Cl(t)] : (t || "").split(/\.|\[(\d+)\]/).filter(Boolean).reduce((a, r) => _f(a) && r in a ? a[r] : n, e) : n; } function Yt(e, t, n) { if (Ka(t)) { e[Cl(t)] = n; return; } const i = t.split(/\.|\[(\d+)\]/).filter(Boolean); let a = e; for (let r = 0; r < i.length; r++) { if (r === i.length - 1) { a[i[r]] = n; return; } (!(i[r] in a) || Un(a[i[r]])) && (a[i[r]] = Nc(i[r + 1]) ? [] : {}), a = a[i[r]]; } } function cr(e, t) { if (Array.isArray(e) && Nc(t)) { e.splice(Number(t), 1); return; } Jt(e) && delete e[t]; } function li(e, t) { if (Ka(t)) { delete e[Cl(t)]; return; } const n = t.split(/\.|\[(\d+)\]/).filter(Boolean); let i = e; for (let r = 0; r < n.length; r++) { if (r === n.length - 1) { cr(i, n[r]); break; } if (!(n[r] in i) || Un(i[n[r]])) break; i = i[n[r]]; } const a = n.map((r, o) => Xe(e, n.slice(0, o).join("."))); for (let r = a.length - 1; r >= 0; r--) if (!!jc(a[r])) { if (r === 0) { cr(e, n[0]); continue; } cr(a[r - 1], n[r - 1]); } } function at(e) { return Object.keys(e); } function zl(e, t = void 0) { const n = qt(); return (n == null ? void 0 : n.provides[e]) || cc(e, t); } function dr(e) { dc(`[vee-validate]: ${e}`); } function Pf(e) { return Array.isArray(e) ? e[0] : e; } function Lr(e, t, n) { if (Array.isArray(e)) { const i = [...e], a = i.findIndex((r) => ot(r, t)); return a >= 0 ? i.splice(a, 1) : i.push(t), i; } return ot(e, t) ? n : t; } function Of(e, t) { let n, i; return function(...a) { const r = this; return n || (n = !0, setTimeout(() => n = !1, t), i = e.apply(r, a)), i; }; } function hs(e, t = 0) { let n = null, i = []; return function(...a) { return n && window.clearTimeout(n), n = window.setTimeout(() => { const r = e(...a); i.forEach((o) => o(r)), i = []; }, t), new Promise((r) => i.push(r)); }; } function $f(e, t) { return Jt(t) && t.number ? xf(e) : e; } function Cr(e, t) { let n; return async function(...a) { const r = e(...a); n = r; const o = await r; return r !== n || (n = void 0, t(o, a)), o; }; } function Ef({ get: e, set: t }) { const n = W(Ye(e())); return $e(e, (i) => { ot(i, n.value) || (n.value = Ye(i)); }, { deep: !0 }), $e(n, (i) => { ot(i, e()) || t(Ye(i)); }, { deep: !0 }), n; } const er = (e, t, n) => t.slots.default ? typeof e == "string" || !e ? t.slots.default(n()) : { default: () => { var i, a; return (a = (i = t.slots).default) === null || a === void 0 ? void 0 : a.call(i, n()); } } : t.slots.default; function fr(e) { if (Dc(e)) return e._value; } function Dc(e) { return "_value" in e; } function Pl(e) { if (!Ll(e)) return e; const t = e.target; if (Tn(t.type) && Dc(t)) return fr(t); if (t.type === "file" && t.files) { const n = Array.from(t.files); return t.multiple ? n : n[0]; } if (Lf(t)) return Array.from(t.options).filter((n) => n.selected && !n.disabled).map(fr); if (Sc(t)) { const n = Array.from(t.options).find((i) => i.selected); return n ? fr(n) : t.value; } return t.value; } function Tc(e) { const t = {}; return Object.defineProperty(t, "_$$isNormalized", { value: !0, writable: !1, enumerable: !1, configurable: !1 }), e ? Jt(e) && e._$$isNormalized ? e : Jt(e) ? Object.keys(e).reduce((n, i) => { const a = Zf(e[i]); return e[i] !== !1 && (n[i] = vs(a)), n; }, t) : typeof e != "string" ? t : e.split("|").reduce((n, i) => { const a = Gf(i); return a.name && (n[a.name] = vs(a.params)), n; }, t) : t; } function Zf(e) { return e === !0 ? [] : Array.isArray(e) || Jt(e) ? e : [e]; } function vs(e) { const t = (n) => typeof n == "string" && n[0] === "@" ? Bf(n.slice(1)) : n; return Array.isArray(e) ? e.map(t) : e instanceof RegExp ? [e] : Object.keys(e).reduce((n, i) => (n[i] = t(e[i]), n), {}); } const Gf = (e) => { let t = []; const n = e.split(":")[0]; return e.includes(":") && (t = e.split(":").slice(1).join(":").split(",")), { name: n, params: t }; }; function Bf(e) { const t = (n) => Xe(n, e) || n[e]; return t.__locatorRef = e, t; } function Yf(e) { return Array.isArray(e) ? e.filter(_r) : at(e).filter((t) => _r(e[t])).map((t) => e[t]); } const Uf = { generateMessage: ({ field: e }) => `${e} is not valid.`, bails: !0, validateOnBlur: !0, validateOnChange: !0, validateOnInput: !1, validateOnModelUpdate: !0 }; let Vf = Object.assign({}, Uf); const Ol = () => Vf; async function Ac(e, t, n = {}) { const i = n == null ? void 0 : n.bails, a = { name: (n == null ? void 0 : n.name) || "{field}", rules: t, bails: i != null ? i : !0, formData: (n == null ? void 0 : n.values) || {} }, o = (await Rf(a, e)).errors; return { errors: o, valid: !o.length }; } async function Rf(e, t) { if (Vn(e.rules)) return Wf(t, e.rules, { bails: e.bails }); if (Dn(e.rules) || Array.isArray(e.rules)) { const o = { field: e.name, form: e.formData, value: t }, l = Array.isArray(e.rules) ? e.rules : [e.rules], s = l.length, u = []; for (let y = 0; y < s; y++) { const m = l[y], f = await m(t, o); if (typeof f != "string" && f) continue; const p = typeof f == "string" ? f : kc(o); if (u.push(p), e.bails) return { errors: u }; } return { errors: u }; } const n = Object.assign(Object.assign({}, e), { rules: Tc(e.rules) }), i = [], a = Object.keys(n.rules), r = a.length; for (let o = 0; o < r; o++) { const l = a[o], s = await Qf(n, t, { name: l, params: n.rules[l] }); if (s.error && (i.push(s.error), e.bails)) return { errors: i }; } return { errors: i }; } async function Wf(e, t, n) { var i; return { errors: await t.validate(e, { abortEarly: (i = n.bails) !== null && i !== void 0 ? i : !0 }).then(() => []).catch((r) => { if (r.name === "ValidationError") return r.errors; throw r; }) }; } async function Qf(e, t, n) { const i = Tf(n.name); if (!i) throw new Error(`No such validator '${n.name}' exists.`); const a = Hf(n.params, e.formData), r = { field: e.name, value: t, form: e.formData, rule: Object.assign(Object.assign({}, n), { params: a }) }, o = await i(t, a, r); return typeof o == "string" ? { error: o } : { error: o ? void 0 : kc(r) }; } function kc(e) { const t = Ol().generateMessage; return t ? t(e) : "Field is invalid"; } function Hf(e, t) { const n = (i) => _r(i) ? i(t) : i; return Array.isArray(e) ? e.map(n) : Object.keys(e).reduce((i, a) => (i[a] = n(e[a]), i), {}); } async function Ff(e, t) { const n = await e.validate(t, { abortEarly: !1 }).then(() => []).catch((r) => { if (r.name !== "ValidationError") throw r; return r.inner || []; }), i = {}, a = {}; for (const r of n) { const o = r.errors; i[r.path] = { valid: !o.length, errors: o }, o.length && (a[r.path] = o[0]); } return { valid: !n.length, results: i, errors: a }; } async function Xf(e, t, n) { const a = at(e).map(async (u) => { var y, m, f; const h = await Ac(Xe(t, u), e[u], { name: ((y = n == null ? void 0 : n.names) === null || y === void 0 ? void 0 : y[u]) || u, values: t, bails: (f = (m = n == null ? void 0 : n.bailsMap) === null || m === void 0 ? void 0 : m[u]) !== null && f !== void 0 ? f : !0 }); return Object.assign(Object.assign({}, h), { path: u }); }); let r = !0; const o = await Promise.all(a), l = {}, s = {}; for (const u of o) l[u.path] = { valid: u.valid, errors: u.errors }, u.valid || (r = !1, s[u.path] = u.errors[0]); return { valid: r, results: l, errors: s }; } let gs = 0; function Jf(e, t) { const { value: n, initialValue: i, setInitialValue: a } = _c(e, t.modelValue, t.form), { errorMessage: r, errors: o, setErrors: l } = Kf(e, t.form), s = qf(n, i, o), u = gs >= Number.MAX_SAFE_INTEGER ? 0 : ++gs; function y(m) { var f; "value" in m && (n.value = m.value), "errors" in m && l(m.errors), "touched" in m && (s.touched = (f = m.touched) !== null && f !== void 0 ? f : s.touched), "initialValue" in m && a(m.initialValue); } return { id: u, path: e, value: n, initialValue: i, meta: s, errors: o, errorMessage: r, setState: y }; } function _c(e, t, n) { const i = W(c(t)); function a() { return n ? Xe(n.meta.value.initialValues, c(e), c(i)) : c(i); } function r(u) { if (!n) { i.value = u; return; } n.stageInitialValue(c(e), u, !0); } const o = j(a); if (!n) return { value: W(a()), initialValue: o, setInitialValue: r }; const l = t ? c(t) : Xe(n.values, c(e), c(o)); return n.stageInitialValue(c(e), l, !0), { value: j({ get() { return Xe(n.values, c(e)); }, set(u) { n.setFieldValue(c(e), u); } }), initialValue: o, setInitialValue: r }; } function qf(e, t, n) { const i = Tt({ touched: !1, pending: !1, valid: !0, validated: !!c(n).length, initialValue: j(() => c(t)), dirty: j(() => !ot(c(e), c(t))) }); return $e(n, (a) => { i.valid = !a.length; }, { immediate: !0, flush: "sync" }), i; } function Kf(e, t) { function n(a) { return a ? Array.isArray(a) ? a : [a] : []; } if (!t) { const a = W([]); return { errors: a, errorMessage: j(() => a.value[0]), setErrors: (r) => { a.value = n(r); } }; } const i = j(() => t.errorBag.value[c(e)] || []); return { errors: i, errorMessage: j(() => i.value[0]), setErrors: (a) => { t.setFieldErrorBag(c(e), n(a)); } }; } function Lc(e) { process.env.NODE_ENV !== "production" && Sf({ id: "vee-validate-devtools-plugin", label: "VeeValidate Plugin", packageName: "vee-validate", homepage: "https://vee-validate.logaretm.com/v4", app: e, logo: "https://vee-validate.logaretm.com/v4/logo.png" }, nm); } const Rn = {}, Wn = {}; let Ut; const An = Of(() => { setTimeout(async () => { await Dt(), Ut == null || Ut.sendInspectorState(Nn), Ut == null || Ut.sendInspectorTree(Nn); }, 100); }, 100); function em(e) { const t = qt(); if (!Ut) { const n = t == null ? void 0 : t.appContext.ap