UNPKG

vue-material-you

Version:

Material design 3 UI framework for Vue 3

1,605 lines (1,604 loc) 77 kB
import { reactive as K, computed as p, ref as A, watch as S, defineComponent as v, h as m, Teleport as Ae, Transition as Rt, nextTick as Xt, onBeforeUnmount as vt, provide as G, inject as ut, onMounted as Ce } from "vue"; import { useRoute as we, useRouter as xe } from "vue-router"; /** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ function Q(e) { return e < 0 ? -1 : e === 0 ? 0 : 1; } function jt(e, t, n) { return (1 - n) * e + n * t; } function Ee(e, t, n) { return n < e ? e : n > t ? t : n; } function kt(e) { return e = e % 360, e < 0 && (e = e + 360), e; } function Re(e, t) { return kt(t - e) <= 180 ? 1 : -1; } function ke(e, t) { return 180 - Math.abs(Math.abs(e - t) - 180); } function Mt(e, t) { const n = e[0] * t[0][0] + e[1] * t[0][1] + e[2] * t[0][2], o = e[0] * t[1][0] + e[1] * t[1][1] + e[2] * t[1][2], r = e[0] * t[2][0] + e[1] * t[2][1] + e[2] * t[2][2]; return [n, o, r]; } /** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ const Oe = [ [0.41233895, 0.35762064, 0.18051042], [0.2126, 0.7152, 0.0722], [0.01932141, 0.11916382, 0.95034478] ], Le = [ [ 3.2413774792388685, -1.5376652402851851, -0.49885366846268053 ], [ -0.9691452513005321, 1.8758853451067872, 0.04156585616912061 ], [ 0.05562093689691305, -0.20395524564742123, 1.0571799111220335 ] ], De = [95.047, 100, 108.883]; function Ot(e, t, n) { return (255 << 24 | (e & 255) << 16 | (t & 255) << 8 | n & 255) >>> 0; } function zt(e) { const t = et(e[0]), n = et(e[1]), o = et(e[2]); return Ot(t, n, o); } function Qt(e) { return e >> 16 & 255; } function Zt(e) { return e >> 8 & 255; } function Kt(e) { return e & 255; } function Se(e, t, n) { const o = Le, r = o[0][0] * e + o[0][1] * t + o[0][2] * n, i = o[1][0] * e + o[1][1] * t + o[1][2] * n, a = o[2][0] * e + o[2][1] * t + o[2][2] * n, s = et(r), c = et(i), u = et(a); return Ot(s, c, u); } function $e(e) { const t = it(Qt(e)), n = it(Zt(e)), o = it(Kt(e)); return Mt([t, n, o], Oe); } function Pe(e) { const t = _t(e), n = et(t); return Ot(n, n, n); } function At(e) { const t = $e(e)[1]; return 116 * Be(t / 100) - 16; } function _t(e) { return 100 * Fe((e + 16) / 116); } function it(e) { const t = e / 255; return t <= 0.040449936 ? t / 12.92 * 100 : Math.pow((t + 0.055) / 1.055, 2.4) * 100; } function et(e) { const t = e / 100; let n = 0; return t <= 31308e-7 ? n = t * 12.92 : n = 1.055 * Math.pow(t, 1 / 2.4) - 0.055, Ee(0, 255, Math.round(n * 255)); } function Ve() { return De; } function Be(e) { const t = 0.008856451679035631, n = 24389 / 27; return e > t ? Math.pow(e, 1 / 3) : (n * e + 16) / 116; } function Fe(e) { const t = 0.008856451679035631, n = 24389 / 27, o = e * e * e; return o > t ? o : (116 * e - 16) / n; } /** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ class Y { constructor(t, n, o, r, i, a, s, c, u, d) { this.n = t, this.aw = n, this.nbb = o, this.ncb = r, this.c = i, this.nc = a, this.rgbD = s, this.fl = c, this.fLRoot = u, this.z = d; } static make(t = Ve(), n = 200 / Math.PI * _t(50) / 100, o = 50, r = 2, i = !1) { const a = t, s = a[0] * 0.401288 + a[1] * 0.650173 + a[2] * -0.051461, c = a[0] * -0.250268 + a[1] * 1.204414 + a[2] * 0.045854, u = a[0] * -2079e-6 + a[1] * 0.048952 + a[2] * 0.953127, d = 0.8 + r / 10, f = d >= 0.9 ? jt(0.59, 0.69, (d - 0.9) * 10) : jt(0.525, 0.59, (d - 0.8) * 10); let h = i ? 1 : d * (1 - 1 / 3.6 * Math.exp((-n - 42) / 92)); h = h > 1 ? 1 : h < 0 ? 0 : h; const _ = d, b = [ h * (100 / s) + 1 - h, h * (100 / c) + 1 - h, h * (100 / u) + 1 - h ], y = 1 / (5 * n + 1), I = y * y * y * y, F = 1 - I, x = I * n + 0.1 * F * F * Math.cbrt(5 * n), L = _t(o) / t[1], H = 1.48 + Math.sqrt(L), D = 0.725 / Math.pow(L, 0.2), N = D, T = [ Math.pow(x * b[0] * s / 100, 0.42), Math.pow(x * b[1] * c / 100, 0.42), Math.pow(x * b[2] * u / 100, 0.42) ], k = [ 400 * T[0] / (T[0] + 27.13), 400 * T[1] / (T[1] + 27.13), 400 * T[2] / (T[2] + 27.13) ], $ = (2 * k[0] + k[1] + 0.05 * k[2]) * D; return new Y(L, $, D, N, f, _, b, x, Math.pow(x, 0.25), H); } } Y.DEFAULT = Y.make(); /** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ class C { constructor(t, n, o, r, i, a, s, c, u) { this.hue = t, this.chroma = n, this.j = o, this.q = r, this.m = i, this.s = a, this.jstar = s, this.astar = c, this.bstar = u; } distance(t) { const n = this.jstar - t.jstar, o = this.astar - t.astar, r = this.bstar - t.bstar, i = Math.sqrt(n * n + o * o + r * r); return 1.41 * Math.pow(i, 0.63); } static fromInt(t) { return C.fromIntInViewingConditions(t, Y.DEFAULT); } static fromIntInViewingConditions(t, n) { const o = (t & 16711680) >> 16, r = (t & 65280) >> 8, i = t & 255, a = it(o), s = it(r), c = it(i), u = 0.41233895 * a + 0.35762064 * s + 0.18051042 * c, d = 0.2126 * a + 0.7152 * s + 0.0722 * c, f = 0.01932141 * a + 0.11916382 * s + 0.95034478 * c, h = 0.401288 * u + 0.650173 * d - 0.051461 * f, _ = -0.250268 * u + 1.204414 * d + 0.045854 * f, b = -2079e-6 * u + 0.048952 * d + 0.953127 * f, y = n.rgbD[0] * h, I = n.rgbD[1] * _, F = n.rgbD[2] * b, x = Math.pow(n.fl * Math.abs(y) / 100, 0.42), L = Math.pow(n.fl * Math.abs(I) / 100, 0.42), H = Math.pow(n.fl * Math.abs(F) / 100, 0.42), D = Q(y) * 400 * x / (x + 27.13), N = Q(I) * 400 * L / (L + 27.13), T = Q(F) * 400 * H / (H + 27.13), k = (11 * D + -12 * N + T) / 11, $ = (D + N - 2 * T) / 9, E = (20 * D + 20 * N + 21 * T) / 20, st = (40 * D + 20 * N + T) / 20, J = Math.atan2($, k) * 180 / Math.PI, j = J < 0 ? J + 360 : J >= 360 ? J - 360 : J, Pt = j * Math.PI / 180, ge = st * n.nbb, ct = 100 * Math.pow(ge / n.aw, n.c * n.z), _e = 4 / n.c * Math.sqrt(ct / 100) * (n.aw + 4) * n.fLRoot, be = j < 20.14 ? j + 360 : j, pe = 0.25 * (Math.cos(be * Math.PI / 180 + 2) + 3.8), ve = 5e4 / 13 * pe * n.nc * n.ncb * Math.sqrt(k * k + $ * $) / (E + 0.305), Vt = Math.pow(ve, 0.9) * Math.pow(1.64 - Math.pow(0.29, n.n), 0.73), Bt = Vt * Math.sqrt(ct / 100), Ft = Bt * n.fLRoot, ye = 50 * Math.sqrt(Vt * n.c / (n.aw + 4)), Ie = (1 + 100 * 7e-3) * ct / (1 + 7e-3 * ct), Nt = 1 / 0.0228 * Math.log(1 + 0.0228 * Ft), Te = Nt * Math.cos(Pt), Me = Nt * Math.sin(Pt); return new C(j, Bt, ct, _e, Ft, ye, Ie, Te, Me); } static fromJch(t, n, o) { return C.fromJchInViewingConditions(t, n, o, Y.DEFAULT); } static fromJchInViewingConditions(t, n, o, r) { const i = 4 / r.c * Math.sqrt(t / 100) * (r.aw + 4) * r.fLRoot, a = n * r.fLRoot, s = n / Math.sqrt(t / 100), c = 50 * Math.sqrt(s * r.c / (r.aw + 4)), u = o * Math.PI / 180, d = (1 + 100 * 7e-3) * t / (1 + 7e-3 * t), f = 1 / 0.0228 * Math.log(1 + 0.0228 * a), h = f * Math.cos(u), _ = f * Math.sin(u); return new C(o, n, t, i, a, c, d, h, _); } static fromUcs(t, n, o) { return C.fromUcsInViewingConditions(t, n, o, Y.DEFAULT); } static fromUcsInViewingConditions(t, n, o, r) { const i = n, a = o, s = Math.sqrt(i * i + a * a), u = (Math.exp(s * 0.0228) - 1) / 0.0228 / r.fLRoot; let d = Math.atan2(a, i) * (180 / Math.PI); d < 0 && (d += 360); const f = t / (1 - (t - 100) * 7e-3); return C.fromJchInViewingConditions(f, u, d, r); } toInt() { return this.viewed(Y.DEFAULT); } viewed(t) { const n = this.chroma === 0 || this.j === 0 ? 0 : this.chroma / Math.sqrt(this.j / 100), o = Math.pow(n / Math.pow(1.64 - Math.pow(0.29, t.n), 0.73), 1 / 0.9), r = this.hue * Math.PI / 180, i = 0.25 * (Math.cos(r + 2) + 3.8), a = t.aw * Math.pow(this.j / 100, 1 / t.c / t.z), s = i * (5e4 / 13) * t.nc * t.ncb, c = a / t.nbb, u = Math.sin(r), d = Math.cos(r), f = 23 * (c + 0.305) * o / (23 * s + 11 * o * d + 108 * o * u), h = f * d, _ = f * u, b = (460 * c + 451 * h + 288 * _) / 1403, y = (460 * c - 891 * h - 261 * _) / 1403, I = (460 * c - 220 * h - 6300 * _) / 1403, F = Math.max(0, 27.13 * Math.abs(b) / (400 - Math.abs(b))), x = Q(b) * (100 / t.fl) * Math.pow(F, 1 / 0.42), L = Math.max(0, 27.13 * Math.abs(y) / (400 - Math.abs(y))), H = Q(y) * (100 / t.fl) * Math.pow(L, 1 / 0.42), D = Math.max(0, 27.13 * Math.abs(I) / (400 - Math.abs(I))), N = Q(I) * (100 / t.fl) * Math.pow(D, 1 / 0.42), T = x / t.rgbD[0], k = H / t.rgbD[1], $ = N / t.rgbD[2], E = 1.86206786 * T - 1.01125463 * k + 0.14918677 * $, st = 0.38752654 * T + 0.62144744 * k - 897398e-8 * $, mt = -0.0158415 * T - 0.03412294 * k + 1.04996444 * $; return Se(E, st, mt); } } /** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ class g { static sanitizeRadians(t) { return (t + Math.PI * 8) % (Math.PI * 2); } static trueDelinearized(t) { const n = t / 100; let o = 0; return n <= 31308e-7 ? o = n * 12.92 : o = 1.055 * Math.pow(n, 1 / 2.4) - 0.055, o * 255; } static chromaticAdaptation(t) { const n = Math.pow(Math.abs(t), 0.42); return Q(t) * 400 * n / (n + 27.13); } static hueOf(t) { const n = Mt(t, g.SCALED_DISCOUNT_FROM_LINRGB), o = g.chromaticAdaptation(n[0]), r = g.chromaticAdaptation(n[1]), i = g.chromaticAdaptation(n[2]), a = (11 * o + -12 * r + i) / 11, s = (o + r - 2 * i) / 9; return Math.atan2(s, a); } static areInCyclicOrder(t, n, o) { const r = g.sanitizeRadians(n - t), i = g.sanitizeRadians(o - t); return r < i; } static intercept(t, n, o) { return (n - t) / (o - t); } static lerpPoint(t, n, o) { return [ t[0] + (o[0] - t[0]) * n, t[1] + (o[1] - t[1]) * n, t[2] + (o[2] - t[2]) * n ]; } static setCoordinate(t, n, o, r) { const i = g.intercept(t[r], n, o[r]); return g.lerpPoint(t, i, o); } static isBounded(t) { return 0 <= t && t <= 100; } static nthVertex(t, n) { const o = g.Y_FROM_LINRGB[0], r = g.Y_FROM_LINRGB[1], i = g.Y_FROM_LINRGB[2], a = n % 4 <= 1 ? 0 : 100, s = n % 2 === 0 ? 0 : 100; if (n < 4) { const c = a, u = s, d = (t - c * r - u * i) / o; return g.isBounded(d) ? [d, c, u] : [-1, -1, -1]; } else if (n < 8) { const c = a, u = s, d = (t - u * o - c * i) / r; return g.isBounded(d) ? [u, d, c] : [-1, -1, -1]; } else { const c = a, u = s, d = (t - c * o - u * r) / i; return g.isBounded(d) ? [c, u, d] : [-1, -1, -1]; } } static bisectToSegment(t, n) { let o = [-1, -1, -1], r = o, i = 0, a = 0, s = !1, c = !0; for (let u = 0; u < 12; u++) { const d = g.nthVertex(t, u); if (d[0] < 0) continue; const f = g.hueOf(d); if (!s) { o = d, r = d, i = f, a = f, s = !0; continue; } (c || g.areInCyclicOrder(i, f, a)) && (c = !1, g.areInCyclicOrder(i, n, f) ? (r = d, a = f) : (o = d, i = f)); } return [o, r]; } static midpoint(t, n) { return [ (t[0] + n[0]) / 2, (t[1] + n[1]) / 2, (t[2] + n[2]) / 2 ]; } static criticalPlaneBelow(t) { return Math.floor(t - 0.5); } static criticalPlaneAbove(t) { return Math.ceil(t - 0.5); } static bisectToLimit(t, n) { const o = g.bisectToSegment(t, n); let r = o[0], i = g.hueOf(r), a = o[1]; for (let s = 0; s < 3; s++) if (r[s] !== a[s]) { let c = -1, u = 255; r[s] < a[s] ? (c = g.criticalPlaneBelow(g.trueDelinearized(r[s])), u = g.criticalPlaneAbove(g.trueDelinearized(a[s]))) : (c = g.criticalPlaneAbove(g.trueDelinearized(r[s])), u = g.criticalPlaneBelow(g.trueDelinearized(a[s]))); for (let d = 0; d < 8 && !(Math.abs(u - c) <= 1); d++) { const f = Math.floor((c + u) / 2), h = g.CRITICAL_PLANES[f], _ = g.setCoordinate(r, h, a, s), b = g.hueOf(_); g.areInCyclicOrder(i, n, b) ? (a = _, u = f) : (r = _, i = b, c = f); } } return g.midpoint(r, a); } static inverseChromaticAdaptation(t) { const n = Math.abs(t), o = Math.max(0, 27.13 * n / (400 - n)); return Q(t) * Math.pow(o, 1 / 0.42); } static findResultByJ(t, n, o) { let r = Math.sqrt(o) * 11; const i = Y.DEFAULT, a = 1 / Math.pow(1.64 - Math.pow(0.29, i.n), 0.73), c = 0.25 * (Math.cos(t + 2) + 3.8) * (5e4 / 13) * i.nc * i.ncb, u = Math.sin(t), d = Math.cos(t); for (let f = 0; f < 5; f++) { const h = r / 100, _ = n === 0 || r === 0 ? 0 : n / Math.sqrt(h), b = Math.pow(_ * a, 1 / 0.9), I = i.aw * Math.pow(h, 1 / i.c / i.z) / i.nbb, F = 23 * (I + 0.305) * b / (23 * c + 11 * b * d + 108 * b * u), x = F * d, L = F * u, H = (460 * I + 451 * x + 288 * L) / 1403, D = (460 * I - 891 * x - 261 * L) / 1403, N = (460 * I - 220 * x - 6300 * L) / 1403, T = g.inverseChromaticAdaptation(H), k = g.inverseChromaticAdaptation(D), $ = g.inverseChromaticAdaptation(N), E = Mt([T, k, $], g.LINRGB_FROM_SCALED_DISCOUNT); if (E[0] < 0 || E[1] < 0 || E[2] < 0) return 0; const st = g.Y_FROM_LINRGB[0], mt = g.Y_FROM_LINRGB[1], J = g.Y_FROM_LINRGB[2], j = st * E[0] + mt * E[1] + J * E[2]; if (j <= 0) return 0; if (f === 4 || Math.abs(j - o) < 2e-3) return E[0] > 100.01 || E[1] > 100.01 || E[2] > 100.01 ? 0 : zt(E); r = r - (j - o) * r / (2 * j); } return 0; } static solveToInt(t, n, o) { if (n < 1e-4 || o < 1e-4 || o > 99.9999) return Pe(o); t = kt(t); const r = t / 180 * Math.PI, i = _t(o), a = g.findResultByJ(r, n, i); if (a !== 0) return a; const s = g.bisectToLimit(i, r); return zt(s); } static solveToCam(t, n, o) { return C.fromInt(g.solveToInt(t, n, o)); } } g.SCALED_DISCOUNT_FROM_LINRGB = [ [ 0.001200833568784504, 0.002389694492170889, 2795742885861124e-19 ], [ 5891086651375999e-19, 0.0029785502573438758, 3270666104008398e-19 ], [ 10146692491640572e-20, 5364214359186694e-19, 0.0032979401770712076 ] ]; g.LINRGB_FROM_SCALED_DISCOUNT = [ [ 1373.2198709594231, -1100.4251190754821, -7.278681089101213 ], [ -271.815969077903, 559.6580465940733, -32.46047482791194 ], [ 1.9622899599665666, -57.173814538844006, 308.7233197812385 ] ]; g.Y_FROM_LINRGB = [0.2126, 0.7152, 0.0722]; g.CRITICAL_PLANES = [ 0.015176349177441876, 0.045529047532325624, 0.07588174588720938, 0.10623444424209313, 0.13658714259697685, 0.16693984095186062, 0.19729253930674434, 0.2276452376616281, 0.2579979360165119, 0.28835063437139563, 0.3188300904430532, 0.350925934958123, 0.3848314933096426, 0.42057480301049466, 0.458183274052838, 0.4976837250274023, 0.5391024159806381, 0.5824650784040898, 0.6277969426914107, 0.6751227633498623, 0.7244668422128921, 0.775853049866786, 0.829304845476233, 0.8848452951698498, 0.942497089126609, 1.0022825574869039, 1.0642236851973577, 1.1283421258858297, 1.1946592148522128, 1.2631959812511864, 1.3339731595349034, 1.407011200216447, 1.4823302800086415, 1.5599503113873272, 1.6398909516233677, 1.7221716113234105, 1.8068114625156377, 1.8938294463134073, 1.9832442801866852, 2.075074464868551, 2.1693382909216234, 2.2660538449872063, 2.36523901573795, 2.4669114995532007, 2.5710888059345764, 2.6777882626779785, 2.7870270208169257, 2.898822059350997, 3.0131901897720907, 3.1301480604002863, 3.2497121605402226, 3.3718988244681087, 3.4967242352587946, 3.624204428461639, 3.754355295633311, 3.887192587735158, 4.022731918402185, 4.160988767090289, 4.301978482107941, 4.445716283538092, 4.592217266055746, 4.741496401646282, 4.893568542229298, 5.048448422192488, 5.20615066083972, 5.3666897647573375, 5.5300801301023865, 5.696336044816294, 5.865471690767354, 6.037501145825082, 6.212438385869475, 6.390297286737924, 6.571091626112461, 6.7548350853498045, 6.941541251256611, 7.131223617812143, 7.323895587840543, 7.5195704746346665, 7.7182615035334345, 7.919981813454504, 8.124744458384042, 8.332562408825165, 8.543448553206703, 8.757415699253682, 8.974476575321063, 9.194643831691977, 9.417930041841839, 9.644347703669503, 9.873909240696694, 10.106627003236781, 10.342513269534024, 10.58158024687427, 10.8238400726681, 11.069304815507364, 11.317986476196008, 11.569896988756009, 11.825048221409341, 12.083451977536606, 12.345119996613247, 12.610063955123938, 12.878295467455942, 13.149826086772048, 13.42466730586372, 13.702830557985108, 13.984327217668513, 14.269168601521828, 14.55736596900856, 14.848930523210871, 15.143873411576273, 15.44220572664832, 15.743938506781891, 16.04908273684337, 16.35764934889634, 16.66964922287304, 16.985093187232053, 17.30399201960269, 17.62635644741625, 17.95219714852476, 18.281524751807332, 18.614349837764564, 18.95068293910138, 19.290534541298456, 19.633915083172692, 19.98083495742689, 20.331304511189067, 20.685334046541502, 21.042933821039977, 21.404114048223256, 21.76888489811322, 22.137256497705877, 22.50923893145328, 22.884842241736916, 23.264076429332462, 23.6469514538663, 24.033477234264016, 24.42366364919083, 24.817520537484558, 25.21505769858089, 25.61628489293138, 26.021211842414342, 26.429848230738664, 26.842203703840827, 27.258287870275353, 27.678110301598522, 28.10168053274597, 28.529008062403893, 28.96010235337422, 29.39497283293396, 29.83362889318845, 30.276079891419332, 30.722335150426627, 31.172403958865512, 31.62629557157785, 32.08401920991837, 32.54558406207592, 33.010999283389665, 33.4802739966603, 33.953417292456834, 34.430438229418264, 34.911345834551085, 35.39614910352207, 35.88485700094671, 36.37747846067349, 36.87402238606382, 37.37449765026789, 37.87891309649659, 38.38727753828926, 38.89959975977785, 39.41588851594697, 39.93615253289054, 40.460400508064545, 40.98864111053629, 41.520882981230194, 42.05713473317016, 42.597404951718396, 43.141702194811224, 43.6900349931913, 44.24241185063697, 44.798841244188324, 45.35933162437017, 45.92389141541209, 46.49252901546552, 47.065252796817916, 47.64207110610409, 48.22299226451468, 48.808024568002054, 49.3971762874833, 49.9904556690408, 50.587870934119984, 51.189430279724725, 51.79514187861014, 52.40501387947288, 53.0190544071392, 53.637271562750364, 54.259673423945976, 54.88626804504493, 55.517063457223934, 56.15206766869424, 56.79128866487574, 57.43473440856916, 58.08241284012621, 58.734331877617365, 59.39049941699807, 60.05092333227251, 60.715611475655585, 61.38457167773311, 62.057811747619894, 62.7353394731159, 63.417162620860914, 64.10328893648692, 64.79372614476921, 65.48848194977529, 66.18756403501224, 66.89098006357258, 67.59873767827808, 68.31084450182222, 69.02730813691093, 69.74813616640164, 70.47333615344107, 71.20291564160104, 71.93688215501312, 72.67524319850172, 73.41800625771542, 74.16517879925733, 74.9167682708136, 75.67278210128072, 76.43322770089146, 77.1981124613393, 77.96744375590167, 78.74122893956174, 79.51947534912904, 80.30219030335869, 81.08938110306934, 81.88105503125999, 82.67721935322541, 83.4778813166706, 84.28304815182372, 85.09272707154808, 85.90692527145302, 86.72564993000343, 87.54890820862819, 88.3767072518277, 89.2090541872801, 90.04595612594655, 90.88742016217518, 91.73345337380438, 92.58406282226491, 93.43925555268066, 94.29903859396902, 95.16341895893969, 96.03240364439274, 96.9059996312159, 97.78421388448044, 98.6670533535366, 99.55452497210776 ]; /** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ class z { constructor(t) { this.argb = t; const n = C.fromInt(t); this.internalHue = n.hue, this.internalChroma = n.chroma, this.internalTone = At(t), this.argb = t; } static from(t, n, o) { return new z(g.solveToInt(t, n, o)); } static fromInt(t) { return new z(t); } toInt() { return this.argb; } get hue() { return this.internalHue; } set hue(t) { this.setInternalState(g.solveToInt(t, this.internalChroma, this.internalTone)); } get chroma() { return this.internalChroma; } set chroma(t) { this.setInternalState(g.solveToInt(this.internalHue, t, this.internalTone)); } get tone() { return this.internalTone; } set tone(t) { this.setInternalState(g.solveToInt(this.internalHue, this.internalChroma, t)); } setInternalState(t) { const n = C.fromInt(t); this.internalHue = n.hue, this.internalChroma = n.chroma, this.internalTone = At(t), this.argb = t; } } /** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ class Lt { static harmonize(t, n) { const o = z.fromInt(t), r = z.fromInt(n), i = ke(o.hue, r.hue), a = Math.min(i * 0.5, 15), s = kt(o.hue + a * Re(o.hue, r.hue)); return z.from(s, o.chroma, o.tone).toInt(); } static hctHue(t, n, o) { const r = Lt.cam16Ucs(t, n, o), i = C.fromInt(r), a = C.fromInt(t); return z.from(i.hue, a.chroma, At(t)).toInt(); } static cam16Ucs(t, n, o) { const r = C.fromInt(t), i = C.fromInt(n), a = r.jstar, s = r.astar, c = r.bstar, u = i.jstar, d = i.astar, f = i.bstar, h = a + (u - a) * o, _ = s + (d - s) * o, b = c + (f - c) * o; return C.fromUcs(h, _, b).toInt(); } } /** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ class R { constructor(t, n) { this.hue = t, this.chroma = n, this.cache = /* @__PURE__ */ new Map(); } static fromInt(t) { const n = z.fromInt(t); return R.fromHueAndChroma(n.hue, n.chroma); } static fromHueAndChroma(t, n) { return new R(t, n); } tone(t) { let n = this.cache.get(t); return n === void 0 && (n = z.from(this.hue, this.chroma, t).toInt(), this.cache.set(t, n)), n; } } /** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ class W { constructor(t, n) { const o = z.fromInt(t), r = o.hue, i = o.chroma; n ? (this.a1 = R.fromHueAndChroma(r, i), this.a2 = R.fromHueAndChroma(r, i / 3), this.a3 = R.fromHueAndChroma(r + 60, i / 2), this.n1 = R.fromHueAndChroma(r, Math.min(i / 12, 4)), this.n2 = R.fromHueAndChroma(r, Math.min(i / 6, 8))) : (this.a1 = R.fromHueAndChroma(r, Math.max(48, i)), this.a2 = R.fromHueAndChroma(r, 16), this.a3 = R.fromHueAndChroma(r + 60, 24), this.n1 = R.fromHueAndChroma(r, 4), this.n2 = R.fromHueAndChroma(r, 8)), this.error = R.fromHueAndChroma(25, 84); } static of(t) { return new W(t, !1); } static contentOf(t) { return new W(t, !0); } } /** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ class q { constructor(t) { this.props = t; } get primary() { return this.props.primary; } get onPrimary() { return this.props.onPrimary; } get primaryContainer() { return this.props.primaryContainer; } get onPrimaryContainer() { return this.props.onPrimaryContainer; } get secondary() { return this.props.secondary; } get onSecondary() { return this.props.onSecondary; } get secondaryContainer() { return this.props.secondaryContainer; } get onSecondaryContainer() { return this.props.onSecondaryContainer; } get tertiary() { return this.props.tertiary; } get onTertiary() { return this.props.onTertiary; } get tertiaryContainer() { return this.props.tertiaryContainer; } get onTertiaryContainer() { return this.props.onTertiaryContainer; } get error() { return this.props.error; } get onError() { return this.props.onError; } get errorContainer() { return this.props.errorContainer; } get onErrorContainer() { return this.props.onErrorContainer; } get background() { return this.props.background; } get onBackground() { return this.props.onBackground; } get surface() { return this.props.surface; } get onSurface() { return this.props.onSurface; } get surfaceVariant() { return this.props.surfaceVariant; } get onSurfaceVariant() { return this.props.onSurfaceVariant; } get outline() { return this.props.outline; } get outlineVariant() { return this.props.outlineVariant; } get shadow() { return this.props.shadow; } get scrim() { return this.props.scrim; } get inverseSurface() { return this.props.inverseSurface; } get inverseOnSurface() { return this.props.inverseOnSurface; } get inversePrimary() { return this.props.inversePrimary; } static light(t) { return q.lightFromCorePalette(W.of(t)); } static dark(t) { return q.darkFromCorePalette(W.of(t)); } static lightContent(t) { return q.lightFromCorePalette(W.contentOf(t)); } static darkContent(t) { return q.darkFromCorePalette(W.contentOf(t)); } static lightFromCorePalette(t) { return new q({ primary: t.a1.tone(40), onPrimary: t.a1.tone(100), primaryContainer: t.a1.tone(90), onPrimaryContainer: t.a1.tone(10), secondary: t.a2.tone(40), onSecondary: t.a2.tone(100), secondaryContainer: t.a2.tone(90), onSecondaryContainer: t.a2.tone(10), tertiary: t.a3.tone(40), onTertiary: t.a3.tone(100), tertiaryContainer: t.a3.tone(90), onTertiaryContainer: t.a3.tone(10), error: t.error.tone(40), onError: t.error.tone(100), errorContainer: t.error.tone(90), onErrorContainer: t.error.tone(10), background: t.n1.tone(99), onBackground: t.n1.tone(10), surface: t.n1.tone(99), onSurface: t.n1.tone(10), surfaceVariant: t.n2.tone(90), onSurfaceVariant: t.n2.tone(30), outline: t.n2.tone(50), outlineVariant: t.n2.tone(80), shadow: t.n1.tone(0), scrim: t.n1.tone(0), inverseSurface: t.n1.tone(20), inverseOnSurface: t.n1.tone(95), inversePrimary: t.a1.tone(80) }); } static darkFromCorePalette(t) { return new q({ primary: t.a1.tone(80), onPrimary: t.a1.tone(20), primaryContainer: t.a1.tone(30), onPrimaryContainer: t.a1.tone(90), secondary: t.a2.tone(80), onSecondary: t.a2.tone(20), secondaryContainer: t.a2.tone(30), onSecondaryContainer: t.a2.tone(90), tertiary: t.a3.tone(80), onTertiary: t.a3.tone(20), tertiaryContainer: t.a3.tone(30), onTertiaryContainer: t.a3.tone(90), error: t.error.tone(80), onError: t.error.tone(20), errorContainer: t.error.tone(30), onErrorContainer: t.error.tone(80), background: t.n1.tone(10), onBackground: t.n1.tone(90), surface: t.n1.tone(10), onSurface: t.n1.tone(90), surfaceVariant: t.n2.tone(30), onSurfaceVariant: t.n2.tone(80), outline: t.n2.tone(60), outlineVariant: t.n2.tone(30), shadow: t.n1.tone(0), scrim: t.n1.tone(0), inverseSurface: t.n1.tone(90), inverseOnSurface: t.n1.tone(20), inversePrimary: t.a1.tone(40) }); } toJSON() { return Object.assign({}, this.props); } } /** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ const te = (e) => { const t = Qt(e), n = Zt(e), o = Kt(e), r = [t.toString(16), n.toString(16), o.toString(16)]; for (const [i, a] of r.entries()) a.length === 1 && (r[i] = "0" + a); return "#" + r.join(""); }, Ne = (e) => { e = e.replace("#", ""); const t = e.length === 3, n = e.length === 6, o = e.length === 8; if (!t && !n && !o) throw new Error("unexpected hex " + e); let r = 0, i = 0, a = 0; return t ? (r = U(e.slice(0, 1).repeat(2)), i = U(e.slice(1, 2).repeat(2)), a = U(e.slice(2, 3).repeat(2))) : n ? (r = U(e.slice(0, 2)), i = U(e.slice(2, 4)), a = U(e.slice(4, 6))) : o && (r = U(e.slice(2, 4)), i = U(e.slice(4, 6)), a = U(e.slice(6, 8))), (255 << 24 | (r & 255) << 16 | (i & 255) << 8 | a & 255) >>> 0; }; function U(e) { return parseInt(e, 16); } /** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ function je(e, t = []) { const n = W.of(e); return { source: e, schemes: { light: q.light(e), dark: q.dark(e) }, palettes: { primary: n.a1, secondary: n.a2, tertiary: n.a3, neutral: n.n1, neutralVariant: n.n2, error: n.error }, customColors: t.map((o) => ze(e, o)) }; } function ze(e, t) { let n = t.value; const o = n, r = e; t.blend && (n = Lt.harmonize(o, r)); const a = W.of(n).a1; return { color: t, value: n, light: { color: a.tone(40), onColor: a.tone(100), colorContainer: a.tone(90), onColorContainer: a.tone(10) }, dark: { color: a.tone(80), onColor: a.tone(20), colorContainer: a.tone(30), onColorContainer: a.tone(90) } }; } function Ue(e, t) { var n, o; const r = (t == null ? void 0 : t.target) || document.body, a = ((n = t == null ? void 0 : t.dark) !== null && n !== void 0 ? n : !1) ? e.schemes.dark : e.schemes.light; if (Tt(r, a), t != null && t.brightnessSuffix && (Tt(r, e.schemes.dark, "-dark"), Tt(r, e.schemes.light, "-light")), t != null && t.paletteTones) { const s = (o = t == null ? void 0 : t.paletteTones) !== null && o !== void 0 ? o : []; for (const [c, u] of Object.entries(e.palettes)) { const d = c.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(); for (const f of s) { const h = `--md-ref-palette-${d}-${d}${f}`, _ = te(u.tone(f)); r.style.setProperty(h, _); } } } } function Tt(e, t, n = "") { for (const [o, r] of Object.entries(t.toJSON())) { const i = o.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), a = te(r); e.style.setProperty(`--md-sys-color-${i}${n}`, a); } } const qe = { light: { "--vmu-color-disabled": "31, 31, 31" }, dark: { "--vmu-color-disabled": "227, 227, 227" } }, Dt = { INVALID_HEX: "Invalid HEX color. Please use a valid HEX (eg. #12F349) color.", NO_TARGET_ELEMENT: "Could not find the target element for the color module." }, O = K({ userMode: "auto", systemMode: window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" }); function Ge(e) { const t = e.matches; O.systemMode = t ? "dark" : "light"; } window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", Ge); const ht = p(() => O.userMode === "auto" ? O.systemMode === "dark" : O.userMode === "dark"); function Ye(e) { O.userMode = e; } const We = p({ get: () => O.userMode, set: (e) => Ye(e) }); function ee(e) { return /^#[0-9A-F]{6}$/i.test(e); } function He(e) { const t = e.trim(), n = "0x" + t[1] + t[2], o = "0x" + t[3] + t[4], r = "0x" + t[5] + t[6]; return `${Number(n)}, ${Number(o)}, ${Number(r)}`; } const yt = A("#000000"); function Ct(e) { const t = document.getElementById("vmu-colors"); if (!t) throw new Error(Dt.NO_TARGET_ELEMENT); const n = je(Ne(yt.value)), o = document.createElement("div"); Ue(n, { target: o, dark: e }); const r = o.style.cssText.split(";").map((a) => { const [s, c] = a.split(":"); return c ? { key: s, value: He(c) } : { key: null, value: null }; }).map(({ key: a, value: s }) => s ? `${a.replace("md-sys", "vmu")}: ${s}` : "").join(`; `), i = Object.entries(qe[e ? "dark" : "light"]).map(([a, s]) => `${a}: ${s}`).join(`; `); t.innerHTML = `* { ${r} ${i}}`; } function Je(e) { if (!ee(e)) throw new Error(Dt.INVALID_HEX); yt.value = e, Ct(ht.value); } const Xe = p({ get: () => yt.value, set: (e) => Je(e) }); function Qe(e) { if (!ee(e)) throw new Error(Dt.INVALID_HEX); if (yt.value = e, !document.getElementById("vmu-colors")) { const n = document.createElement("style"); n.id = "vmu-colors", document.head.appendChild(n); } Ct(ht.value), S(ht, () => { Ct(ht.value); }); } function ar() { return Xe; } function ir() { return We; } const Ze = { actions: { cancel: "Cancel" } }, Ke = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: Ze }, Symbol.toStringTag, { value: "Module" })); class Ut extends Error { constructor(t) { super(t), this.name = "[VueMaterialYou] Error"; } } function ne(e, t) { const n = Object.assign({}, e); for (const o in t) Object.prototype.hasOwnProperty.call(t, o) && (typeof t[o] == "object" ? n[o] = ne(n[o], t[o]) : n[o] = t[o]); return n; } const oe = {}; Object.entries(/* @__PURE__ */ Object.assign({ "./dialog.yaml": Ke })).forEach( ([e, t]) => { const n = e.match(/\.\/(.+)\.yaml/); oe[n ? n[1] : ""] = t.default; } ); const wt = A(oe); function sr(e) { wt.value = ne(wt.value, e); } function re(e) { return p(() => { const t = e.split("."); let n = wt.value; for (const o of t) if (n = n[o], !n) throw new Ut(`Message '${e}' not found.`); if (typeof n != "string") throw new Ut(`Incomplete message key path for: ${e}`); return n; }); } function tn(e) { return { type: void 0, default: typeof e == "object" ? () => e : e }; } function en(e) { return { type: void 0, default: typeof e == "object" ? () => e : e, required: !0 }; } function nn(e) { return { type: Boolean, default: e }; } const l = { boolean: nn, generic: tn, required: en }, on = "_button_1t115_21", rn = "_button_small_1t115_61", an = "_button_small_icon_1t115_65", sn = "_button_medium_1t115_69", cn = "_button_medium_icon_1t115_73", ln = "_button_large_1t115_77", un = "_button_large_icon_1t115_80", dn = "_button_filled_1t115_83", fn = "_button_outlined_1t115_99", mn = "_button_text_1t115_115", hn = "_button_elevated_1t115_125", gn = "_button_tonal_1t115_146", _n = "_button__loader_1t115_172", lt = { "vmu-elevation-1": "_vmu-elevation-1_1t115_1", "vmu-elevation-2": "_vmu-elevation-2_1t115_5", "vmu-elevation-3": "_vmu-elevation-3_1t115_9", "vmu-elevation-4": "_vmu-elevation-4_1t115_13", "vmu-elevation-5": "_vmu-elevation-5_1t115_17", button: on, button_small: rn, button_small_icon: an, button_medium: sn, button_medium_icon: cn, button_large: ln, button_large_icon: un, button_filled: dn, button_outlined: fn, button_text: mn, button_elevated: hn, button_tonal: gn, button__loader: _n }, bt = { mountedOn: null }; function ae() { return bt; } function bn(e, t, n) { bt.icon || (bt.icon = { component: e, key: t, defaults: n }); } function pn(e) { bt.mountedOn = e; } const dt = /* @__PURE__ */ v({ name: "VmIcon", props: { icon: l.generic(), props: l.generic({}) }, setup(e, { slots: t }) { const { icon: n } = ae(); return () => { var o; if (n) return m( n.component, { ...n.defaults, ...e.props, [n.key]: e.icon, key: e.icon ? e.icon : void 0 }, (o = t.default) == null ? void 0 : o.call(t) ); }; } }), vn = `<svg xmlns="http://www.w3.org/2000/svg" width="1.5em" height="1.5em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"> <g fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2"> <path stroke-dasharray="60" stroke-dashoffset="60" stroke-opacity=".3" d="M12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3Z"> <animate fill="freeze" attributeName="stroke-dashoffset" dur="1.3s" values="60;0" /> </path> <path stroke-dasharray="15" stroke-dashoffset="15" d="M12 3C16.9706 3 21 7.02944 21 12"> <animate fill="freeze" attributeName="stroke-dashoffset" dur="0.3s" values="15;0" /> <animateTransform attributeName="transform" dur="1.5s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12" /> </path> </g> </svg>`; function qt(e, t) { return e !== t ? Math.min(e, t) : e / 2; } function yn(e, t, n, o, r) { const i = t / 2, a = n / 2, s = o > i ? (o - i) * 2 + t : (i - o) * 2 + t, c = r > a ? (r - a) * 2 + n : (a - r) * 2 + n; return Math.max(s, c) / e * 1.5; } function In() { let e, t; const n = K({ pos: { x: 0, y: 0 }, size: 0, opacity: 0, scale: 0, transition: "transform" }), o = p(() => ({ "--ripple-pos-x": `${n.pos.x}px`, "--ripple-pos-y": `${n.pos.y}px`, "--ripple-width": `${n.size}px`, "--ripple-height": `${n.size}px`, "--ripple-opacity": `${n.opacity}`, "--ripple-scale": `${n.scale}`, "--transition-property": `${n.transition}` })); let r; function i(c) { const u = c.target; if (!u) return; clearTimeout(t), clearTimeout(e); const { clientX: d, clientY: f } = c instanceof MouseEvent ? c : c.touches[0], { left: h, top: _, width: b, height: y } = u.getBoundingClientRect(), I = { x: d - h, y: f - _ }; n.pos = I, n.size = qt(b, y), n.transition = "transform", n.opacity = 0.2, n.scale = yn(n.size, b, y, n.pos.x, n.pos.y), r = new Date(); } function a(c) { const u = c.target; if (!u) return; const { width: d, height: f } = u.getBoundingClientRect(), h = new Date(), b = 250 - Math.max((h == null ? void 0 : h.getMilliseconds()) - (r == null ? void 0 : r.getMilliseconds()), 0); e = setTimeout(() => { n.transition = "opacity", n.opacity = 0, t = setTimeout(() => { n.scale = 0, n.size = qt(d, f), n.pos = { x: 0, y: 0 }; }, 250); }, b); } return { rippleStyleObject: o, events: { onPointerdown: i, onPointerup: a, onPointerleave: a } }; } const Tn = "_sheet_t8ew2_1", Mn = { sheet: Tn }, ie = v({ name: "Sheet", props: { component: l.generic("div"), disableRipple: l.boolean(!1) }, setup(e, { slots: t }) { const { rippleStyleObject: n, events: o } = In(); return () => { var r, i; return e.disableRipple ? m(e.component, {}, (r = t.default) == null ? void 0 : r.call(t)) : m(e.component, { class: Mn.sheet, style: n.value, ...o }, (i = t.default) == null ? void 0 : i.call(t)); }; } }), se = /* @__PURE__ */ v({ name: "VmButton", props: { disabled: l.boolean(), href: l.generic(), icon: l.generic(null), loading: l.boolean(), reset: l.boolean(), size: l.generic("large"), submit: l.boolean(), type: l.generic("filled") }, setup(e, { slots: t }) { const n = { filled: "on-primary", outlined: "primary", text: "primary", elevated: "primary", tonal: "on-secondary-container" }, o = p(() => [ e.icon ? lt[`button_${e.size}_icon`] : lt[`button_${e.size}`], lt.button, lt[`button_${e.type}`], `vmu-ripple-${n[e.type]} vmu-text-label-${e.size}` ]), r = p(() => ({ color: e.loading ? "transparent" : void 0 })), i = p(() => e.submit ? "submit" : e.reset ? "reset" : "button"); return () => m( ie, { component: e.href ? "a" : "button", href: e.href, type: i.value, disabled: e.disabled || e.loading, class: o.value, style: r.value }, () => { var a, s; return [ e.icon ? [m(dt, { icon: e.icon }), (a = t.default) == null ? void 0 : a.call(t)] : (s = t.default) == null ? void 0 : s.call(t), e.loading && m("span", { class: lt.button__loader, innerHTML: vn, "aria-hidden": !0 }) ]; } ); } }); function An(e, t) { return p({ get: () => e.modelValue, set: (o) => t("update:modelValue", o) }); } function B() { return (e) => !0; } function It(e = 20) { return [...Array(e)].map(() => Math.random().toString(36)[2]).join(""); } function Cn(e) { return p(() => e.id ? e.id : `identity_${It()}`); } const X = A([]); function wn(e, t) { const n = ae(); function o() { if (!X.value.find((a) => a === e.value)) { X.value.push(e.value); const a = n.mountedOn; if (!a) return; a.inert = !0, a.ariaHidden = "true"; } } function r() { X.value = X.value.filter((a) => a !== e.value); } t.value && o(), S(t, (a) => { a ? o() : r(); }); const i = p(() => X.value[X.value.length - 1] === e.value); return { dialogs: X, isLast: i }; } const xn = "_scrim_1dzpl_1", En = { scrim: xn }, ce = A(window.innerHeight), le = A(window.innerWidth); function Rn() { ce.value = window.innerHeight, le.value = window.innerWidth; } window.addEventListener("resize", Rn); function kn() { return { height: ce, width: le }; } const On = v({ name: "Scrim", props: { id: l.generic(), isLast: l.boolean(!1), open: l.boolean(!1), style: l.generic(), zIndex: l.generic(100) }, emits: { "update:modelValue": B(), open: B() }, setup(e, { emit: t, slots: n, attrs: o }) { async function r() { await Xt(), t("open"); } const { height: i } = kn(), a = p(() => [ e.style, { zIndex: e.zIndex, height: `${i.value}px` } ]), s = p(() => ({ ...o, id: e.id, style: a.value, tabindex: e.isLast ? void 0 : -1, role: "dialog", "aria-hidden": !e.isLast, "aria-modal": "true", "aria-labelledby": `${e.id}_title`, "aria-describedby": `${e.id}_description` })); return () => m( Ae, { to: "body" }, m( Rt, { name: "vmu-scrim", onBeforeEnter: r }, () => e.open && m("div", { class: En.scrim, ...s.value }, n.default && n.default()) ) ); } }), Ln = "_content_trg8q_1", Dn = "_fullscreenContent_trg8q_10", Sn = "_title_trg8q_19", $n = "_actions_trg8q_23", Pn = "_icon_trg8q_30", Vn = "_header_trg8q_37", Bn = "_header___title_trg8q_44", Fn = "_header___close_trg8q_52", tt = { content: Ln, fullscreenContent: Dn, title: Sn, actions: $n, icon: Pn, header: Vn, header___title: Bn, header___close: Fn }, Nn = v({ name: "DialogTitle", props: { dialogId: l.generic(), title: l.generic(), icon: l.generic() }, setup(e) { return () => m( "h1", { id: `${e.dialogId}_title`, class: ["vmu-text-headline-small vmu-text-on-surface", tt.title], style: { textAlign: e.icon ? "center" : "left" } }, e.title ); } }), jn = v({ name: "DialogDescription", props: { dialogId: l.generic(), description: l.generic() }, setup(e) { return () => m( "p", { id: `${e.dialogId}_description`, class: "vmu-text-body-medium vmu-text-on-surface" }, e.description ); } }), zn = v({ name: "DialogIcon", props: { icon: l.generic() }, setup(e) { return () => e.icon && m( "div", { class: tt.icon }, m(dt, { icon: e.icon, props: { width: 24, height: 24 } }) ); } }), Un = v({ name: "DialogActions", props: { actions: l.generic([]) }, setup(e) { return () => m( "div", { class: tt.actions }, e.actions.map((t) => m(se, { type: "text", onClick: t.handler }, () => t.name)) ); } }), qn = v({ name: "DialogContent", props: { attributes: l.generic(), isOpen: l.boolean(!1) }, emits: { close: B() }, setup(e, { slots: t, emit: n }) { const o = A(0), r = A(), i = new ResizeObserver((a) => { a[0] && (o.value = a[0].target.scrollHeight); }); return S(r, () => { r.value && (o.value = r.value.scrollHeight, i.observe(r.value)); }), vt(() => { i.disconnect(); }), () => m( Rt, { name: "vmu-dialog-content", onBeforeLeave: () => n("close") },