@roku-ui/vue 0.1.0 → 0.1.2

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.js CHANGED
@@ -1,5 +1,5 @@
1
- import { defineComponent as R, computed as m, openBlock as g, createBlock as L, resolveDynamicComponent as xe, normalizeClass as w, unref as c, withCtx as ce, renderSlot as P, createCommentVNode as $, getCurrentScope as Ke, onScopeDispose as Qe, onMounted as de, nextTick as Ze, getCurrentInstance as Ve, watch as ae, ref as k, watchEffect as oe, createElementBlock as y, createElementVNode as S, withModifiers as Oe, normalizeStyle as C, Fragment as X, renderList as te, toDisplayString as q, withDirectives as Ie, isRef as Je, vModelCheckbox as et, reactive as tt, provide as rt, createTextVNode as nt, Teleport as at, createVNode as st, Transition as ot, withKeys as it, useSlots as lt, inject as ut } from "vue";
2
- const ct = /* @__PURE__ */ R({
1
+ import { defineComponent as $, computed as m, useAttrs as ht, openBlock as g, createBlock as D, resolveDynamicComponent as _e, mergeProps as Pe, unref as l, withCtx as J, renderSlot as H, createCommentVNode as z, getCurrentScope as pt, onScopeDispose as mt, onMounted as se, nextTick as gt, getCurrentInstance as Qe, watch as ie, ref as v, mergeModels as ee, useModel as me, watchEffect as X, createElementBlock as y, createElementVNode as M, normalizeClass as w, withModifiers as Ze, normalizeStyle as T, Fragment as te, renderList as fe, toDisplayString as re, withDirectives as Je, vModelCheckbox as bt, reactive as vt, inject as et, provide as Fe, createTextVNode as yt, Teleport as wt, createVNode as We, Transition as _t, withKeys as xt, useSlots as kt, isRef as Mt } from "vue";
2
+ const St = /* @__PURE__ */ $({
3
3
  __name: "Btn",
4
4
  props: {
5
5
  type: { default: "button" },
@@ -9,7 +9,6 @@ const ct = /* @__PURE__ */ R({
9
9
  pressEffect: { default: "translate" },
10
10
  variant: {},
11
11
  color: {},
12
- disabled: { type: Boolean },
13
12
  animate: { type: Boolean },
14
13
  rounded: { default: "md" }
15
14
  },
@@ -45,7 +44,7 @@ const ct = /* @__PURE__ */ R({
45
44
  iconContent: "h-10 w-10 p-3"
46
45
  };
47
46
  }
48
- }), s = m(() => {
47
+ }), o = m(() => {
49
48
  switch (t.variant) {
50
49
  case "filled":
51
50
  switch (t.color) {
@@ -117,213 +116,286 @@ const ct = /* @__PURE__ */ R({
117
116
  default:
118
117
  return "btn-default";
119
118
  }
120
- });
121
- return (a, o) => (g(), L(xe(a.is), {
122
- "data-size": a.size,
123
- type: a.type,
124
- class: w(["flex items-center justify-center gap-1 decoration-none", [
125
- c(s),
126
- c(r),
127
- a.icon ? c(n).iconContent : c(n).normalContent,
119
+ }), a = ht();
120
+ return (s, i) => (g(), D(_e(s.is), Pe({
121
+ "data-size": s.size,
122
+ type: s.type,
123
+ class: ["flex items-center justify-center gap-1 decoration-none", [
124
+ l(o),
125
+ l(r),
126
+ s.icon ? l(n).iconContent : l(n).normalContent,
128
127
  {
129
- "filter-grayscale": a.disabled,
130
- "active:translate-y-0.25": !a.disabled && a.pressEffect === "translate",
131
- "active:scale-98": !a.disabled && a.pressEffect === "scale",
132
- "transition-all": a.animate
128
+ "filter-grayscale": l(a).disabled,
129
+ "active:translate-y-0.25": !l(a).disabled && s.pressEffect === "translate",
130
+ "active:scale-98": !l(a).disabled && s.pressEffect === "scale",
131
+ "transition-all": s.animate
133
132
  }
134
- ]]),
135
- disabled: a.disabled
136
- }, {
137
- default: ce(() => [
138
- a.$slots.leftSection ? P(a.$slots, "leftSection", { key: 0 }) : $("", !0),
139
- P(a.$slots, "default"),
140
- a.$slots.rightSection ? P(a.$slots, "rightSection", { key: 1 }) : $("", !0)
133
+ ]]
134
+ }, s.$attrs), {
135
+ default: J(() => [
136
+ s.$slots.leftSection ? H(s.$slots, "leftSection", { key: 0 }) : z("", !0),
137
+ H(s.$slots, "default"),
138
+ s.$slots.rightSection ? H(s.$slots, "rightSection", { key: 1 }) : z("", !0)
141
139
  ]),
142
140
  _: 3
143
- }, 8, ["data-size", "type", "class", "disabled"]));
141
+ }, 16, ["data-size", "type", "class"]));
144
142
  }
145
143
  });
146
- function Fe(e) {
147
- return Ke() ? (Qe(e), !0) : !1;
144
+ function Ne(e) {
145
+ return pt() ? (mt(e), !0) : !1;
148
146
  }
149
- function ke(e) {
150
- return typeof e == "function" ? e() : c(e);
147
+ function He(e) {
148
+ return typeof e == "function" ? e() : l(e);
151
149
  }
152
- const dt = typeof window < "u" && typeof document < "u";
150
+ const be = typeof window < "u" && typeof document < "u";
153
151
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
154
- const ft = Object.prototype.toString, ht = (e) => ft.call(e) === "[object Object]", pt = () => {
152
+ const At = Object.prototype.toString, Ct = (e) => At.call(e) === "[object Object]", $t = () => {
155
153
  };
156
- function gt(e) {
157
- return e || Ve();
154
+ function Tt(e) {
155
+ return e || Qe();
158
156
  }
159
- function mt(e, t = !0, r) {
160
- const n = gt(r);
161
- n ? de(e, n) : t ? e() : Ze(e);
157
+ function zt(e, t = !0, r) {
158
+ Tt() ? se(e, r) : t ? e() : gt(e);
162
159
  }
163
- function U(e) {
160
+ function q(e) {
164
161
  var t;
165
- const r = ke(e);
162
+ const r = He(e);
166
163
  return (t = r == null ? void 0 : r.$el) != null ? t : r;
167
164
  }
168
- const Me = dt ? window : void 0;
169
- function F(...e) {
170
- let t, r, n, s;
171
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, n, s] = e, t = Me) : [t, r, n, s] = e, !t)
172
- return pt;
165
+ const xe = be ? window : void 0;
166
+ function Y(...e) {
167
+ let t, r, n, o;
168
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, n, o] = e, t = xe) : [t, r, n, o] = e, !t)
169
+ return $t;
173
170
  Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);
174
- const a = [], o = () => {
175
- a.forEach((u) => u()), a.length = 0;
176
- }, i = (u, f, p, v) => (u.addEventListener(f, p, v), () => u.removeEventListener(f, p, v)), l = ae(
177
- () => [U(t), ke(s)],
178
- ([u, f]) => {
179
- if (o(), !u)
171
+ const a = [], s = () => {
172
+ a.forEach((f) => f()), a.length = 0;
173
+ }, i = (f, u, p, b) => (f.addEventListener(u, p, b), () => f.removeEventListener(u, p, b)), c = ie(
174
+ () => [q(t), He(o)],
175
+ ([f, u]) => {
176
+ if (s(), !f)
180
177
  return;
181
- const p = ht(f) ? { ...f } : f;
178
+ const p = Ct(u) ? { ...u } : u;
182
179
  a.push(
183
- ...r.flatMap((v) => n.map((b) => i(u, v, b, p)))
180
+ ...r.flatMap((b) => n.map((k) => i(f, b, k, p)))
184
181
  );
185
182
  },
186
183
  { immediate: !0, flush: "post" }
187
184
  ), d = () => {
188
- l(), o();
185
+ c(), s();
189
186
  };
190
- return Fe(d), d;
187
+ return Ne(d), d;
191
188
  }
192
- function bt(e) {
189
+ function Rt(e) {
193
190
  return typeof e == "function" ? e : typeof e == "string" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;
194
191
  }
195
- function be(...e) {
192
+ function Ae(...e) {
196
193
  let t, r, n = {};
197
194
  e.length === 3 ? (t = e[0], r = e[1], n = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (t = !0, r = e[0], n = e[1]) : (t = e[0], r = e[1]) : (t = !0, r = e[0]);
198
195
  const {
199
- target: s = Me,
196
+ target: o = xe,
200
197
  eventName: a = "keydown",
201
- passive: o = !1,
198
+ passive: s = !1,
202
199
  dedupe: i = !1
203
- } = n, l = bt(t);
204
- return F(s, a, (u) => {
205
- u.repeat && ke(i) || l(u) && r(u);
206
- }, o);
207
- }
208
- function vt() {
209
- const e = k(!1);
210
- return Ve() && de(() => {
200
+ } = n, c = Rt(t);
201
+ return Y(o, a, (f) => {
202
+ f.repeat && He(i) || c(f) && r(f);
203
+ }, s);
204
+ }
205
+ function Et() {
206
+ const e = v(!1);
207
+ return Qe() && se(() => {
211
208
  e.value = !0;
212
209
  }), e;
213
210
  }
214
- function yt(e) {
215
- const t = vt();
211
+ function tt(e) {
212
+ const t = Et();
216
213
  return m(() => (t.value, !!e()));
217
214
  }
218
- function wt(e, t, r = {}) {
219
- const { window: n = Me, ...s } = r;
215
+ function Pt(e, t, r = {}) {
216
+ const { window: n = xe, ...o } = r;
217
+ let a;
218
+ const s = tt(() => n && "MutationObserver" in n), i = () => {
219
+ a && (a.disconnect(), a = void 0);
220
+ }, c = ie(
221
+ () => q(e),
222
+ (u) => {
223
+ i(), s.value && n && u && (a = new MutationObserver(t), a.observe(u, o));
224
+ },
225
+ { immediate: !0 }
226
+ ), d = () => a == null ? void 0 : a.takeRecords(), f = () => {
227
+ i(), c();
228
+ };
229
+ return Ne(f), {
230
+ isSupported: s,
231
+ stop: f,
232
+ takeRecords: d
233
+ };
234
+ }
235
+ function Nt(e, t, r = {}) {
236
+ const { window: n = xe, ...o } = r;
220
237
  let a;
221
- const o = yt(() => n && "ResizeObserver" in n), i = () => {
238
+ const s = tt(() => n && "ResizeObserver" in n), i = () => {
222
239
  a && (a.disconnect(), a = void 0);
223
- }, l = m(() => Array.isArray(e) ? e.map((f) => U(f)) : [U(e)]), d = ae(
224
- l,
225
- (f) => {
226
- if (i(), o.value && n) {
240
+ }, c = m(() => Array.isArray(e) ? e.map((u) => q(u)) : [q(e)]), d = ie(
241
+ c,
242
+ (u) => {
243
+ if (i(), s.value && n) {
227
244
  a = new ResizeObserver(t);
228
- for (const p of f)
229
- p && a.observe(p, s);
245
+ for (const p of u)
246
+ p && a.observe(p, o);
230
247
  }
231
248
  },
232
249
  { immediate: !0, flush: "post", deep: !0 }
233
- ), u = () => {
250
+ ), f = () => {
234
251
  i(), d();
235
252
  };
236
- return Fe(u), {
237
- isSupported: o,
238
- stop: u
253
+ return Ne(f), {
254
+ isSupported: s,
255
+ stop: f
239
256
  };
240
257
  }
241
- function _t(e, t = {}) {
258
+ function Ht(e, t = {}) {
242
259
  const {
243
260
  reset: r = !0,
244
261
  windowResize: n = !0,
245
- windowScroll: s = !0,
262
+ windowScroll: o = !0,
246
263
  immediate: a = !0
247
- } = t, o = k(0), i = k(0), l = k(0), d = k(0), u = k(0), f = k(0), p = k(0), v = k(0);
248
- function b() {
249
- const _ = U(e);
250
- if (!_) {
251
- r && (o.value = 0, i.value = 0, l.value = 0, d.value = 0, u.value = 0, f.value = 0, p.value = 0, v.value = 0);
264
+ } = t, s = v(0), i = v(0), c = v(0), d = v(0), f = v(0), u = v(0), p = v(0), b = v(0);
265
+ function k() {
266
+ const S = q(e);
267
+ if (!S) {
268
+ r && (s.value = 0, i.value = 0, c.value = 0, d.value = 0, f.value = 0, u.value = 0, p.value = 0, b.value = 0);
252
269
  return;
253
270
  }
254
- const A = _.getBoundingClientRect();
255
- o.value = A.height, i.value = A.bottom, l.value = A.left, d.value = A.right, u.value = A.top, f.value = A.width, p.value = A.x, v.value = A.y;
271
+ const C = S.getBoundingClientRect();
272
+ s.value = C.height, i.value = C.bottom, c.value = C.left, d.value = C.right, f.value = C.top, u.value = C.width, p.value = C.x, b.value = C.y;
256
273
  }
257
- return wt(e, b), ae(() => U(e), (_) => !_ && b()), s && F("scroll", b, { capture: !0, passive: !0 }), n && F("resize", b, { passive: !0 }), mt(() => {
258
- a && b();
274
+ return Nt(e, k), ie(() => q(e), (S) => !S && k()), Pt(e, k, {
275
+ attributeFilter: ["style", "class"]
276
+ }), o && Y("scroll", k, { capture: !0, passive: !0 }), n && Y("resize", k, { passive: !0 }), zt(() => {
277
+ a && k();
259
278
  }), {
260
- height: o,
279
+ height: s,
261
280
  bottom: i,
262
- left: l,
281
+ left: c,
263
282
  right: d,
264
- top: u,
265
- width: f,
283
+ top: f,
284
+ width: u,
266
285
  x: p,
267
- y: v,
268
- update: b
286
+ y: b,
287
+ update: k
269
288
  };
270
289
  }
271
- function xt(e, t = {}) {
272
- const { initialValue: r = !1, focusVisible: n = !1 } = t, s = k(!1), a = m(() => U(e));
273
- F(a, "focus", (i) => {
274
- var l, d;
275
- (!n || (d = (l = i.target).matches) != null && d.call(l, ":focus-visible")) && (s.value = !0);
276
- }), F(a, "blur", () => s.value = !1);
277
- const o = m({
278
- get: () => s.value,
290
+ function It(e, t = {}) {
291
+ const { initialValue: r = !1, focusVisible: n = !1 } = t, o = v(!1), a = m(() => q(e));
292
+ Y(a, "focus", (i) => {
293
+ var c, d;
294
+ (!n || (d = (c = i.target).matches) != null && d.call(c, ":focus-visible")) && (o.value = !0);
295
+ }), Y(a, "blur", () => o.value = !1);
296
+ const s = m({
297
+ get: () => o.value,
279
298
  set(i) {
280
- var l, d;
281
- !i && s.value ? (l = a.value) == null || l.blur() : i && !s.value && ((d = a.value) == null || d.focus());
299
+ var c, d;
300
+ !i && o.value ? (c = a.value) == null || c.blur() : i && !o.value && ((d = a.value) == null || d.focus());
282
301
  }
283
302
  });
284
- return ae(
303
+ return ie(
285
304
  a,
286
305
  () => {
287
- o.value = r;
306
+ s.value = r;
288
307
  },
289
308
  { immediate: !0, flush: "post" }
290
- ), { focused: o };
309
+ ), { focused: s };
291
310
  }
292
- const kt = { class: "relative inline-block" }, Hr = /* @__PURE__ */ R({
311
+ const Ot = { class: "relative inline-block" }, rn = /* @__PURE__ */ $({
293
312
  __name: "Slider",
294
- props: {
295
- modelValue: {},
313
+ props: /* @__PURE__ */ ee({
296
314
  size: { default: "md" },
297
- animate: { type: Boolean, default: !0 },
315
+ animate: { type: Boolean, default: !1 },
316
+ width: { default: 12 },
298
317
  options: {},
299
- width: { default: 12 }
300
- },
318
+ min: { default: 0 },
319
+ max: { default: 100 },
320
+ step: { default: 1 },
321
+ tickNum: {},
322
+ color: { default: "primary" }
323
+ }, {
324
+ modelValue: {
325
+ default: void 0
326
+ },
327
+ modelModifiers: {}
328
+ }),
301
329
  emits: ["update:modelValue"],
302
- setup(e, { emit: t }) {
303
- const r = e, n = t, s = m(() => r.options.length ?? 0), a = k(r.options.includes(r.modelValue) ? r.options.indexOf(r.modelValue) : 0);
304
- oe(() => {
305
- n("update:modelValue", r.options[a.value]);
330
+ setup(e) {
331
+ const t = e;
332
+ function r(A, R, E) {
333
+ const I = [];
334
+ for (let G = A; G <= R; G += E)
335
+ I.push(G);
336
+ return I[I.length - 1] !== R && I.push(R), I;
337
+ }
338
+ function n(A, R) {
339
+ const E = [];
340
+ E.push(R[0]);
341
+ const I = (R.length - 1) / (A - 1);
342
+ for (let G = 1; G < A - 1; G++)
343
+ E.push(R[Math.round(G * I)]);
344
+ return E.push(R[R.length - 1]), E;
345
+ }
346
+ const o = m(() => t.options ? t.options.length : t.tickNum ?? 0), a = m(() => t.options === void 0 ? r(t.min, t.max, t.step) : t.options), s = m(() => n(o.value, a.value)), i = me(e, "modelValue"), c = m(() => a.value.length ?? 0), d = v(a.value.includes(i.value) ? a.value.indexOf(i.value) : 0);
347
+ function f(A) {
348
+ return a.value.indexOf(A);
349
+ }
350
+ const u = m(() => {
351
+ switch (t.color) {
352
+ case "primary":
353
+ return "bg-primary-container";
354
+ case "secondary":
355
+ return "bg-secondary-container";
356
+ case "tertiary":
357
+ return "bg-tertiary-container";
358
+ case "error":
359
+ return "bg-error-container";
360
+ }
361
+ }), p = m(() => `dark:bg-white bg-${t.color}-container`), b = m(() => {
362
+ switch (t.color) {
363
+ case "primary":
364
+ return "dark:bg-primary-container bg-white";
365
+ case "secondary":
366
+ return "dark:bg-secondary-container bg-white";
367
+ case "tertiary":
368
+ return "dark:bg-tertiary-container bg-white";
369
+ case "error":
370
+ return "dark:bg-error-container bg-white";
371
+ }
306
372
  });
307
- const o = k(), i = k(), l = _t(o), d = k(!1);
308
- function u(b) {
309
- if (!d.value)
373
+ X(() => {
374
+ i.value = a.value[d.value];
375
+ });
376
+ const k = v(), S = v(), C = Ht(k), le = v(!1);
377
+ function ce(A) {
378
+ if (!le.value)
310
379
  return;
311
- if (!(b.buttons === 1)) {
312
- d.value = !1;
380
+ if (!(A.buttons === 1)) {
381
+ le.value = !1;
313
382
  return;
314
383
  }
315
- b.preventDefault(), b.stopPropagation();
316
- const { clientX: A } = b, O = l.left.value, x = l.right.value - O, j = Math.round((A - O) / x * (s.value - 1));
317
- j < 0 || j > s.value - 1 || (a.value = j);
384
+ A.preventDefault(), A.stopPropagation();
385
+ const { clientX: E } = A, I = C.left.value, ft = C.right.value - I, Se = Math.round((E - I) / ft * (c.value - 1));
386
+ Se < 0 || Se > c.value - 1 || (d.value = Se);
318
387
  }
319
- function f(b) {
320
- b.preventDefault(), b.stopPropagation(), d.value = !0, u(b);
388
+ X(() => {
389
+ d.value = f(i.value);
390
+ });
391
+ function _(A) {
392
+ A.preventDefault(), A.stopPropagation(), le.value = !0, ce(A);
321
393
  }
322
- F(o, "pointerdown", f), de(() => {
323
- F(document, "pointermove", u);
394
+ Y(k, "pointerdown", _), se(() => {
395
+ Y(document, "pointermove", ce), d.value = Math.max(0, f(i.value));
324
396
  });
325
- const p = m(() => {
326
- switch (r.size) {
397
+ const O = m(() => {
398
+ switch (t.size) {
327
399
  case "sm":
328
400
  return {
329
401
  wrapper: "h-2",
@@ -355,82 +427,83 @@ const kt = { class: "relative inline-block" }, Hr = /* @__PURE__ */ R({
355
427
  progress: "-mx-1.5"
356
428
  };
357
429
  }
358
- }), v = m(() => r.animate ? {
430
+ }), j = m(() => t.animate ? {
359
431
  indicator: "transition-left",
360
432
  progress: "transition-width"
361
433
  } : {
362
434
  indicator: "",
363
435
  progress: ""
364
436
  });
365
- return (b, _) => (g(), y("div", kt, [
366
- S("div", {
437
+ return (A, R) => (g(), y("div", Ot, [
438
+ M("div", {
367
439
  ref_key: "wrapper",
368
- ref: o,
440
+ ref: k,
369
441
  type: "size",
370
- class: w(["flex cursor-pointer items-center", c(p).wrapper]),
371
- onTouchmove: _[0] || (_[0] = Oe(() => {
442
+ class: w(["flex cursor-pointer items-center", l(O).wrapper]),
443
+ onTouchmove: R[0] || (R[0] = Ze(() => {
372
444
  }, ["prevent"]))
373
445
  }, [
374
- S("div", {
375
- class: w(["rounded-full bg-neutral-7", c(p).innerWrapper])
446
+ M("div", {
447
+ class: w(["rounded-full bg-surface-lowest transition-background-color,border-color,color", l(O).innerWrapper])
376
448
  }, [
377
- S("div", {
378
- class: w(["relative flex", c(p).content]),
379
- style: C({
380
- width: `${r.width}rem`
449
+ M("div", {
450
+ class: w(["relative flex", l(O).content]),
451
+ style: T({
452
+ width: `${t.width}rem`
381
453
  })
382
454
  }, [
383
- (g(!0), y(X, null, te(b.options, (A, O) => (g(), y("div", {
384
- key: A,
385
- style: C({
386
- left: `${O / (c(s) - 1) * 100}%`
455
+ (g(!0), y(te, null, fe(l(s), (E) => (g(), y("div", {
456
+ key: E,
457
+ style: T({
458
+ left: `${f(E) / (l(c) - 1) * 100}%`
387
459
  }),
388
- class: w(["absolute top-50% rounded-full bg-white", c(p).tick])
460
+ class: w(["absolute top-50% rounded-full bg-white", l(O).tick])
389
461
  }, null, 6))), 128)),
390
- S("div", {
462
+ M("div", {
391
463
  ref_key: "indicator",
392
- ref: i,
393
- class: w(["absolute top-50% cursor-pointer rounded-full bg-white", [c(p).indicator, c(v).indicator]]),
394
- style: C({
395
- left: `${c(a) / (c(s) - 1) * 100}%`
464
+ ref: S,
465
+ class: w(["absolute top-50% cursor-pointer rounded-full transition-background-color,border-color,color", [l(O).indicator, l(j).indicator, l(p)]]),
466
+ style: T({
467
+ left: `${l(d) / (l(c) - 1) * 100}%`
396
468
  })
397
469
  }, [
398
- S("div", {
399
- class: w(["pointer-events-none absolute left-50% top-50% rounded-full bg-sky-5", c(p).indicatorInner])
470
+ M("div", {
471
+ class: w(["pointer-events-none absolute left-50% top-50% rounded-full transition-background-color,border-color,color", [l(O).indicatorInner, l(b)]])
400
472
  }, null, 2)
401
473
  ], 6),
402
- S("div", {
403
- class: w(["pointer-events-none h-full rounded-full bg-sky-5", [c(p).progress, c(v).progress]]),
404
- style: C({
405
- width: `${c(a) / (c(s) - 1) * 100}%`
474
+ M("div", {
475
+ class: w(["pointer-events-none h-full rounded-full", [l(O).progress, l(j).progress, l(u)]]),
476
+ style: T({
477
+ width: `${l(d) / (l(c) - 1) * 100}%`
406
478
  })
407
479
  }, null, 6)
408
480
  ], 6)
409
481
  ], 2)
410
482
  ], 34),
411
- S("div", {
412
- class: "relative mx-1 h-1em text-xs op56",
413
- style: C({
414
- width: `${r.width}rem`
483
+ M("div", {
484
+ class: "relative mx-1 h-1em text-xs text-surface-onlow",
485
+ style: T({
486
+ width: `${t.width}rem`
415
487
  })
416
488
  }, [
417
- (g(!0), y(X, null, te(b.options, (A, O) => (g(), y("div", {
418
- key: A,
419
- style: C({
420
- left: `${O / (c(s) - 1) * 100}%`
489
+ (g(!0), y(te, null, fe(l(s), (E, I) => (g(), y("div", {
490
+ key: I,
491
+ style: T({
492
+ left: `${f(E) / (l(c) - 1) * 100}%`
421
493
  }),
422
- class: w(["absolute w-auto flex rounded-full -translate-x-50%", c(p).tick])
423
- }, q(A), 7))), 128))
494
+ class: w(["absolute w-auto flex rounded-full -translate-x-50%", l(O).tick])
495
+ }, re(E), 7))), 128))
424
496
  ], 4)
425
497
  ]));
426
498
  }
427
499
  });
428
- function fe(e) {
500
+ function ge(e) {
429
501
  return m(
430
- () => ({ style: Mt(e.rounded), class: "rounded-[var(--r-rounded)]" })
502
+ () => ({ style: Bt(e.rounded), class: "rounded-[var(--r-rounded)]" })
431
503
  );
432
504
  }
433
- function Mt(e) {
505
+ function Bt(e) {
506
+ const t = /^-?\d*\.?\d+(px|em|rem|vh|vw|in|cm|mm|pt|pc|%)?$/;
434
507
  switch (e) {
435
508
  case "none":
436
509
  return "--r-rounded: 0";
@@ -443,13 +516,13 @@ function Mt(e) {
443
516
  case "full":
444
517
  return "--r-rounded: 9999px";
445
518
  default:
446
- return typeof e == "number" || !Number.isNaN(Number(e)) ? `--r-rounded: ${e}rem;` : "rounded-[var(--r-rounded)]";
519
+ return typeof e == "string" && t.test(e) ? `--r-rounded: ${e};` : typeof e == "number" || !Number.isNaN(Number(e)) ? `--r-rounded: ${e}rem;` : "rounded-[var(--r-rounded)]";
447
520
  }
448
521
  }
449
- const St = ["id"], At = ["for"], $t = ["for"], Br = /* @__PURE__ */ R({
522
+ const Vt = ["id"], Ft = ["for"], Wt = ["for"], Lt = /* @__PURE__ */ $({
523
+ inheritAttrs: !1,
450
524
  __name: "Switch",
451
- props: {
452
- modelValue: {},
525
+ props: /* @__PURE__ */ ee({
453
526
  size: { default: "md" },
454
527
  animate: { type: Boolean, default: !0 },
455
528
  options: {},
@@ -457,128 +530,138 @@ const St = ["id"], At = ["for"], $t = ["for"], Br = /* @__PURE__ */ R({
457
530
  id: {},
458
531
  rounded: { default: "full" },
459
532
  color: { default: "primary" },
460
- disabled: { type: Boolean }
461
- },
533
+ disabled: { type: Boolean },
534
+ offIcon: {},
535
+ onIcon: {}
536
+ }, {
537
+ modelValue: { type: Boolean },
538
+ modelModifiers: {}
539
+ }),
462
540
  emits: ["update:modelValue"],
463
- setup(e, { emit: t }) {
464
- const r = e, n = t, s = k(null), a = k(!1), o = m(() => {
465
- switch (r.size) {
541
+ setup(e) {
542
+ const t = e, r = me(e, "modelValue"), n = v(null), o = v(!1), a = m(() => {
543
+ switch (t.size) {
466
544
  case "sm":
467
545
  return {
546
+ icon: "text-xs mx-0.5",
468
547
  wrapper: "h-4 w-8",
469
- indicator: a.value ? "h-3 w-4" : "h-3 w-3",
548
+ indicator: o.value ? "h-3 w-4" : "h-3 w-3",
470
549
  inactive: "left-[calc(0.125rem-1px)]",
471
- active: a.value ? "left-[calc(0.875rem-1px)]" : "left-[calc(1.125rem-1px)]"
550
+ active: o.value ? "left-[calc(0.875rem-1px)]" : "left-[calc(1.125rem-1px)]"
472
551
  };
473
552
  case "md":
474
553
  return {
554
+ icon: "text-sm mx-1",
475
555
  wrapper: "h-6 w-12",
476
- indicator: a.value ? "h-4 w-5" : "h-4 w-4",
556
+ indicator: o.value ? "h-4 w-5" : "h-4 w-4",
477
557
  inactive: "left-[calc(0.25rem-1px)]",
478
- active: a.value ? "left-[calc(1.5rem-1px)]" : "left-[calc(1.75rem-1px)]"
558
+ active: o.value ? "left-[calc(1.5rem-1px)]" : "left-[calc(1.75rem-1px)]"
479
559
  };
480
560
  case "lg":
481
561
  return {
562
+ icon: "text-lg mx-2",
482
563
  wrapper: "h-8 w-16",
483
- indicator: a.value ? "h-6 w-8" : "h-6 w-6",
564
+ indicator: o.value ? "h-6 w-8" : "h-6 w-6",
484
565
  inactive: "left-[calc(0.25rem-1px)]",
485
- active: a.value ? "left-[calc(1.75rem-1px)]" : "left-[calc(2.25rem-1px)]"
566
+ active: o.value ? "left-[calc(1.75rem-1px)]" : "left-[calc(2.25rem-1px)]"
486
567
  };
487
568
  }
488
- }), i = m(() => r.animate ? {
569
+ }), s = m(() => t.animate ? {
489
570
  indicator: "transition-all",
490
571
  progress: "transition-width"
491
572
  } : {
492
573
  indicator: "",
493
574
  progress: ""
494
- }), l = r.modelValue !== void 0 ? m({
495
- get() {
496
- return r.modelValue;
497
- },
498
- set(v) {
499
- n("update:modelValue", v);
500
- }
501
- }) : k(!1);
502
- function d() {
503
- const v = k("");
504
- return de(() => {
505
- r.id ? v.value = r.id : v.value = `switch-${Math.random().toString(36).slice(2)}-${Date.now().toString(36)}`;
506
- }), v;
575
+ });
576
+ function i() {
577
+ const u = v("");
578
+ return se(() => {
579
+ t.id ? u.value = t.id : u.value = `switch-${Math.random().toString(36).slice(2)}-${Date.now().toString(36)}`;
580
+ }), u;
507
581
  }
508
- const u = d(), f = m(() => {
509
- let v = "bg-primary-7";
510
- switch (r.color) {
582
+ const c = i(), d = m(() => {
583
+ let u = "bg-primary-container";
584
+ switch (t.color) {
511
585
  case "secondary":
512
- v = "bg-secondary-7";
586
+ u = "bg-secondary-7";
513
587
  break;
514
588
  case "tertiary":
515
- v = "bg-tertiary-7";
589
+ u = "bg-tertiary-7";
516
590
  break;
517
591
  case "error":
518
- v = "bg-error-7";
592
+ u = "bg-error-7";
519
593
  break;
520
594
  }
521
595
  return {
522
- wrapper: l.value ? `border border-transparent ${v}` : "bg-surface-8 border border-surface-7",
523
- indicator: r.disabled ? "bg-surface-7" : "bg-white"
596
+ wrapper: r.value ? `border border-transparent ${u}` : "bg-surface-lowest border border-surface-border-low",
597
+ indicator: t.disabled ? "bg-surface-high" : "bg-white text-primary-container"
524
598
  };
525
- }), p = fe(r);
526
- return (v, b) => (g(), y("div", {
599
+ }), f = ge(t);
600
+ return (u, p) => (g(), y("div", {
527
601
  role: "switch",
528
602
  class: w(["relative flex items-center gap-2", {
529
- "pointer-events-none filter-grayscale": r.disabled
603
+ "pointer-events-none filter-grayscale op60": t.disabled
530
604
  }])
531
605
  }, [
532
- Ie(S("input", {
533
- id: c(u),
534
- "onUpdate:modelValue": b[0] || (b[0] = (_) => Je(l) ? l.value = _ : null),
606
+ Je(M("input", Pe({
607
+ id: l(c),
608
+ "onUpdate:modelValue": p[0] || (p[0] = (b) => r.value = b)
609
+ }, u.$attrs, {
535
610
  class: "hidden",
536
611
  type: "checkbox"
537
- }, null, 8, St), [
538
- [et, c(l)]
612
+ }), null, 16, Vt), [
613
+ [bt, r.value]
539
614
  ]),
540
- S("label", {
615
+ M("label", {
541
616
  class: "leading-0 cursor-pointer!",
542
- for: c(u)
617
+ for: l(c)
543
618
  }, [
544
- S("div", {
619
+ M("div", {
545
620
  ref_key: "wrapper",
546
- ref: s,
547
- class: w([[c(o).wrapper, c(f).wrapper, c(p).class], "relative inline-block transition-all"]),
548
- style: C([c(p).style]),
549
- onPointerdown: b[1] || (b[1] = (_) => a.value = !0),
550
- onPointerup: b[2] || (b[2] = (_) => a.value = !1),
551
- onPointerleave: b[3] || (b[3] = (_) => a.value = !1),
552
- onPointerenter: b[4] || (b[4] = (_) => _.buttons === 1 && (a.value = !0))
621
+ ref: n,
622
+ class: w([[l(a).wrapper, l(d).wrapper, l(f).class], "relative inline-block transition-all"]),
623
+ style: T([l(f).style]),
624
+ onPointerdown: p[1] || (p[1] = (b) => o.value = !0),
625
+ onPointerup: p[2] || (p[2] = (b) => o.value = !1),
626
+ onPointerleave: p[3] || (p[3] = (b) => o.value = !1),
627
+ onPointerenter: p[4] || (p[4] = (b) => b.buttons === 1 && (o.value = !0))
553
628
  }, [
554
- S("div", {
555
- class: w(["absolute top-50% -translate-y-50%", [c(o).indicator, c(f).indicator, c(i).indicator, c(l) ? c(o).active : c(o).inactive, c(p).class]]),
556
- style: C([c(p).style])
557
- }, null, 6)
629
+ M("div", {
630
+ class: w(["absolute top-50% -translate-y-50%", [l(a).indicator, l(d).indicator, l(s).indicator, r.value ? l(a).active : l(a).inactive, l(f).class]]),
631
+ style: T([l(f).style])
632
+ }, null, 6),
633
+ M("i", {
634
+ class: w(["absolute top-1/2 -translate-y-50%", [l(a).icon, {
635
+ [`left-0 text-${u.color}-on`]: r.value,
636
+ "right-0 text-surface-on ": !r.value,
637
+ [u.onIcon ?? ""]: r.value && u.onIcon,
638
+ [u.offIcon ?? ""]: !r.value && u.offIcon
639
+ }]])
640
+ }, null, 2)
558
641
  ], 38)
559
- ], 8, At),
560
- v.label ? (g(), y("label", {
642
+ ], 8, Ft),
643
+ u.label ? (g(), y("label", {
561
644
  key: 0,
562
- for: c(u)
563
- }, q(v.label), 9, $t)) : $("", !0)
645
+ for: l(c)
646
+ }, re(u.label), 9, Wt)) : z("", !0)
564
647
  ], 2));
565
648
  }
566
649
  });
567
- function ie(e) {
650
+ function ve(e) {
568
651
  "@babel/helpers - typeof";
569
- return ie = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
652
+ return ve = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
570
653
  return typeof t;
571
654
  } : function(t) {
572
655
  return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
573
- }, ie(e);
656
+ }, ve(e);
574
657
  }
575
- var Ct = /^\s+/, zt = /\s+$/;
658
+ var Dt = /^\s+/, jt = /\s+$/;
576
659
  function h(e, t) {
577
660
  if (e = e || "", t = t || {}, e instanceof h)
578
661
  return e;
579
662
  if (!(this instanceof h))
580
663
  return new h(e, t);
581
- var r = Rt(e);
664
+ var r = Gt(e);
582
665
  this._originalInput = e, this._r = r.r, this._g = r.g, this._b = r.b, this._a = r.a, this._roundA = Math.round(100 * this._a) / 100, this._format = t.format || r.format, this._gradientType = t.gradientType, this._r < 1 && (this._r = Math.round(this._r)), this._g < 1 && (this._g = Math.round(this._g)), this._b < 1 && (this._b = Math.round(this._b)), this._ok = r.ok;
583
666
  }
584
667
  h.prototype = {
@@ -605,14 +688,14 @@ h.prototype = {
605
688
  return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
606
689
  },
607
690
  getLuminance: function() {
608
- var t = this.toRgb(), r, n, s, a, o, i;
609
- return r = t.r / 255, n = t.g / 255, s = t.b / 255, r <= 0.03928 ? a = r / 12.92 : a = Math.pow((r + 0.055) / 1.055, 2.4), n <= 0.03928 ? o = n / 12.92 : o = Math.pow((n + 0.055) / 1.055, 2.4), s <= 0.03928 ? i = s / 12.92 : i = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * a + 0.7152 * o + 0.0722 * i;
691
+ var t = this.toRgb(), r, n, o, a, s, i;
692
+ return r = t.r / 255, n = t.g / 255, o = t.b / 255, r <= 0.03928 ? a = r / 12.92 : a = Math.pow((r + 0.055) / 1.055, 2.4), n <= 0.03928 ? s = n / 12.92 : s = Math.pow((n + 0.055) / 1.055, 2.4), o <= 0.03928 ? i = o / 12.92 : i = Math.pow((o + 0.055) / 1.055, 2.4), 0.2126 * a + 0.7152 * s + 0.0722 * i;
610
693
  },
611
694
  setAlpha: function(t) {
612
- return this._a = De(t), this._roundA = Math.round(100 * this._a) / 100, this;
695
+ return this._a = rt(t), this._roundA = Math.round(100 * this._a) / 100, this;
613
696
  },
614
697
  toHsv: function() {
615
- var t = Re(this._r, this._g, this._b);
698
+ var t = De(this._r, this._g, this._b);
616
699
  return {
617
700
  h: t.h * 360,
618
701
  s: t.s,
@@ -621,11 +704,11 @@ h.prototype = {
621
704
  };
622
705
  },
623
706
  toHsvString: function() {
624
- var t = Re(this._r, this._g, this._b), r = Math.round(t.h * 360), n = Math.round(t.s * 100), s = Math.round(t.v * 100);
625
- return this._a == 1 ? "hsv(" + r + ", " + n + "%, " + s + "%)" : "hsva(" + r + ", " + n + "%, " + s + "%, " + this._roundA + ")";
707
+ var t = De(this._r, this._g, this._b), r = Math.round(t.h * 360), n = Math.round(t.s * 100), o = Math.round(t.v * 100);
708
+ return this._a == 1 ? "hsv(" + r + ", " + n + "%, " + o + "%)" : "hsva(" + r + ", " + n + "%, " + o + "%, " + this._roundA + ")";
626
709
  },
627
710
  toHsl: function() {
628
- var t = ze(this._r, this._g, this._b);
711
+ var t = Le(this._r, this._g, this._b);
629
712
  return {
630
713
  h: t.h * 360,
631
714
  s: t.s,
@@ -634,17 +717,17 @@ h.prototype = {
634
717
  };
635
718
  },
636
719
  toHslString: function() {
637
- var t = ze(this._r, this._g, this._b), r = Math.round(t.h * 360), n = Math.round(t.s * 100), s = Math.round(t.l * 100);
638
- return this._a == 1 ? "hsl(" + r + ", " + n + "%, " + s + "%)" : "hsla(" + r + ", " + n + "%, " + s + "%, " + this._roundA + ")";
720
+ var t = Le(this._r, this._g, this._b), r = Math.round(t.h * 360), n = Math.round(t.s * 100), o = Math.round(t.l * 100);
721
+ return this._a == 1 ? "hsl(" + r + ", " + n + "%, " + o + "%)" : "hsla(" + r + ", " + n + "%, " + o + "%, " + this._roundA + ")";
639
722
  },
640
723
  toHex: function(t) {
641
- return Te(this._r, this._g, this._b, t);
724
+ return je(this._r, this._g, this._b, t);
642
725
  },
643
726
  toHexString: function(t) {
644
727
  return "#" + this.toHex(t);
645
728
  },
646
729
  toHex8: function(t) {
647
- return Pt(this._r, this._g, this._b, this._a, t);
730
+ return Yt(this._r, this._g, this._b, this._a, t);
648
731
  },
649
732
  toHex8String: function(t) {
650
733
  return "#" + this.toHex8(t);
@@ -662,30 +745,30 @@ h.prototype = {
662
745
  },
663
746
  toPercentageRgb: function() {
664
747
  return {
665
- r: Math.round(M(this._r, 255) * 100) + "%",
666
- g: Math.round(M(this._g, 255) * 100) + "%",
667
- b: Math.round(M(this._b, 255) * 100) + "%",
748
+ r: Math.round(x(this._r, 255) * 100) + "%",
749
+ g: Math.round(x(this._g, 255) * 100) + "%",
750
+ b: Math.round(x(this._b, 255) * 100) + "%",
668
751
  a: this._a
669
752
  };
670
753
  },
671
754
  toPercentageRgbString: function() {
672
- return this._a == 1 ? "rgb(" + Math.round(M(this._r, 255) * 100) + "%, " + Math.round(M(this._g, 255) * 100) + "%, " + Math.round(M(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(M(this._r, 255) * 100) + "%, " + Math.round(M(this._g, 255) * 100) + "%, " + Math.round(M(this._b, 255) * 100) + "%, " + this._roundA + ")";
755
+ return this._a == 1 ? "rgb(" + Math.round(x(this._r, 255) * 100) + "%, " + Math.round(x(this._g, 255) * 100) + "%, " + Math.round(x(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(x(this._r, 255) * 100) + "%, " + Math.round(x(this._g, 255) * 100) + "%, " + Math.round(x(this._b, 255) * 100) + "%, " + this._roundA + ")";
673
756
  },
674
757
  toName: function() {
675
- return this._a === 0 ? "transparent" : this._a < 1 ? !1 : Xt[Te(this._r, this._g, this._b, !0)] || !1;
758
+ return this._a === 0 ? "transparent" : this._a < 1 ? !1 : ir[je(this._r, this._g, this._b, !0)] || !1;
676
759
  },
677
760
  toFilter: function(t) {
678
- var r = "#" + Ee(this._r, this._g, this._b, this._a), n = r, s = this._gradientType ? "GradientType = 1, " : "";
761
+ var r = "#" + Ge(this._r, this._g, this._b, this._a), n = r, o = this._gradientType ? "GradientType = 1, " : "";
679
762
  if (t) {
680
763
  var a = h(t);
681
- n = "#" + Ee(a._r, a._g, a._b, a._a);
764
+ n = "#" + Ge(a._r, a._g, a._b, a._a);
682
765
  }
683
- return "progid:DXImageTransform.Microsoft.gradient(" + s + "startColorstr=" + r + ",endColorstr=" + n + ")";
766
+ return "progid:DXImageTransform.Microsoft.gradient(" + o + "startColorstr=" + r + ",endColorstr=" + n + ")";
684
767
  },
685
768
  toString: function(t) {
686
769
  var r = !!t;
687
770
  t = t || this._format;
688
- var n = !1, s = this._a < 1 && this._a >= 0, a = !r && s && (t === "hex" || t === "hex6" || t === "hex3" || t === "hex4" || t === "hex8" || t === "name");
771
+ var n = !1, o = this._a < 1 && this._a >= 0, a = !r && o && (t === "hex" || t === "hex6" || t === "hex3" || t === "hex4" || t === "hex8" || t === "name");
689
772
  return a ? t === "name" && this._a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (n = this.toRgbString()), t === "prgb" && (n = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (n = this.toHexString()), t === "hex3" && (n = this.toHexString(!0)), t === "hex4" && (n = this.toHex8String(!0)), t === "hex8" && (n = this.toHex8String()), t === "name" && (n = this.toName()), t === "hsl" && (n = this.toHslString()), t === "hsv" && (n = this.toHsvString()), n || this.toHexString());
690
773
  },
691
774
  clone: function() {
@@ -696,69 +779,69 @@ h.prototype = {
696
779
  return this._r = n._r, this._g = n._g, this._b = n._b, this.setAlpha(n._a), this;
697
780
  },
698
781
  lighten: function() {
699
- return this._applyModification(Ot, arguments);
782
+ return this._applyModification(Jt, arguments);
700
783
  },
701
784
  brighten: function() {
702
- return this._applyModification(It, arguments);
785
+ return this._applyModification(er, arguments);
703
786
  },
704
787
  darken: function() {
705
- return this._applyModification(Ft, arguments);
788
+ return this._applyModification(tr, arguments);
706
789
  },
707
790
  desaturate: function() {
708
- return this._applyModification(Ht, arguments);
791
+ return this._applyModification(Kt, arguments);
709
792
  },
710
793
  saturate: function() {
711
- return this._applyModification(Bt, arguments);
794
+ return this._applyModification(Qt, arguments);
712
795
  },
713
796
  greyscale: function() {
714
- return this._applyModification(Vt, arguments);
797
+ return this._applyModification(Zt, arguments);
715
798
  },
716
799
  spin: function() {
717
- return this._applyModification(Dt, arguments);
800
+ return this._applyModification(rr, arguments);
718
801
  },
719
802
  _applyCombination: function(t, r) {
720
803
  return t.apply(null, [this].concat([].slice.call(r)));
721
804
  },
722
805
  analogous: function() {
723
- return this._applyCombination(jt, arguments);
806
+ return this._applyCombination(ar, arguments);
724
807
  },
725
808
  complement: function() {
726
- return this._applyCombination(Lt, arguments);
809
+ return this._applyCombination(nr, arguments);
727
810
  },
728
811
  monochromatic: function() {
729
- return this._applyCombination(Gt, arguments);
812
+ return this._applyCombination(sr, arguments);
730
813
  },
731
814
  splitcomplement: function() {
732
- return this._applyCombination(Wt, arguments);
815
+ return this._applyCombination(or, arguments);
733
816
  },
734
817
  // Disabled until https://github.com/bgrins/TinyColor/issues/254
735
818
  // polyad: function (number) {
736
819
  // return this._applyCombination(polyad, [number]);
737
820
  // },
738
821
  triad: function() {
739
- return this._applyCombination(Ne, [3]);
822
+ return this._applyCombination(Ue, [3]);
740
823
  },
741
824
  tetrad: function() {
742
- return this._applyCombination(Ne, [4]);
825
+ return this._applyCombination(Ue, [4]);
743
826
  }
744
827
  };
745
828
  h.fromRatio = function(e, t) {
746
- if (ie(e) == "object") {
829
+ if (ve(e) == "object") {
747
830
  var r = {};
748
831
  for (var n in e)
749
- e.hasOwnProperty(n) && (n === "a" ? r[n] = e[n] : r[n] = J(e[n]));
832
+ e.hasOwnProperty(n) && (n === "a" ? r[n] = e[n] : r[n] = ue(e[n]));
750
833
  e = r;
751
834
  }
752
835
  return h(e, t);
753
836
  };
754
- function Rt(e) {
837
+ function Gt(e) {
755
838
  var t = {
756
839
  r: 0,
757
840
  g: 0,
758
841
  b: 0
759
- }, r = 1, n = null, s = null, a = null, o = !1, i = !1;
760
- return typeof e == "string" && (e = Kt(e)), ie(e) == "object" && (B(e.r) && B(e.g) && B(e.b) ? (t = Tt(e.r, e.g, e.b), o = !0, i = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : B(e.h) && B(e.s) && B(e.v) ? (n = J(e.s), s = J(e.v), t = Nt(e.h, n, s), o = !0, i = "hsv") : B(e.h) && B(e.s) && B(e.l) && (n = J(e.s), a = J(e.l), t = Et(e.h, n, a), o = !0, i = "hsl"), e.hasOwnProperty("a") && (r = e.a)), r = De(r), {
761
- ok: o,
842
+ }, r = 1, n = null, o = null, a = null, s = !1, i = !1;
843
+ return typeof e == "string" && (e = dr(e)), ve(e) == "object" && (W(e.r) && W(e.g) && W(e.b) ? (t = Ut(e.r, e.g, e.b), s = !0, i = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : W(e.h) && W(e.s) && W(e.v) ? (n = ue(e.s), o = ue(e.v), t = qt(e.h, n, o), s = !0, i = "hsv") : W(e.h) && W(e.s) && W(e.l) && (n = ue(e.s), a = ue(e.l), t = Xt(e.h, n, a), s = !0, i = "hsl"), e.hasOwnProperty("a") && (r = e.a)), r = rt(r), {
844
+ ok: s,
762
845
  format: e.format || i,
763
846
  r: Math.min(255, Math.max(t.r, 0)),
764
847
  g: Math.min(255, Math.max(t.g, 0)),
@@ -766,102 +849,102 @@ function Rt(e) {
766
849
  a: r
767
850
  };
768
851
  }
769
- function Tt(e, t, r) {
852
+ function Ut(e, t, r) {
770
853
  return {
771
- r: M(e, 255) * 255,
772
- g: M(t, 255) * 255,
773
- b: M(r, 255) * 255
854
+ r: x(e, 255) * 255,
855
+ g: x(t, 255) * 255,
856
+ b: x(r, 255) * 255
774
857
  };
775
858
  }
776
- function ze(e, t, r) {
777
- e = M(e, 255), t = M(t, 255), r = M(r, 255);
778
- var n = Math.max(e, t, r), s = Math.min(e, t, r), a, o, i = (n + s) / 2;
779
- if (n == s)
780
- a = o = 0;
859
+ function Le(e, t, r) {
860
+ e = x(e, 255), t = x(t, 255), r = x(r, 255);
861
+ var n = Math.max(e, t, r), o = Math.min(e, t, r), a, s, i = (n + o) / 2;
862
+ if (n == o)
863
+ a = s = 0;
781
864
  else {
782
- var l = n - s;
783
- switch (o = i > 0.5 ? l / (2 - n - s) : l / (n + s), n) {
865
+ var c = n - o;
866
+ switch (s = i > 0.5 ? c / (2 - n - o) : c / (n + o), n) {
784
867
  case e:
785
- a = (t - r) / l + (t < r ? 6 : 0);
868
+ a = (t - r) / c + (t < r ? 6 : 0);
786
869
  break;
787
870
  case t:
788
- a = (r - e) / l + 2;
871
+ a = (r - e) / c + 2;
789
872
  break;
790
873
  case r:
791
- a = (e - t) / l + 4;
874
+ a = (e - t) / c + 4;
792
875
  break;
793
876
  }
794
877
  a /= 6;
795
878
  }
796
879
  return {
797
880
  h: a,
798
- s: o,
881
+ s,
799
882
  l: i
800
883
  };
801
884
  }
802
- function Et(e, t, r) {
803
- var n, s, a;
804
- e = M(e, 360), t = M(t, 100), r = M(r, 100);
805
- function o(d, u, f) {
806
- return f < 0 && (f += 1), f > 1 && (f -= 1), f < 1 / 6 ? d + (u - d) * 6 * f : f < 1 / 2 ? u : f < 2 / 3 ? d + (u - d) * (2 / 3 - f) * 6 : d;
885
+ function Xt(e, t, r) {
886
+ var n, o, a;
887
+ e = x(e, 360), t = x(t, 100), r = x(r, 100);
888
+ function s(d, f, u) {
889
+ return u < 0 && (u += 1), u > 1 && (u -= 1), u < 1 / 6 ? d + (f - d) * 6 * u : u < 1 / 2 ? f : u < 2 / 3 ? d + (f - d) * (2 / 3 - u) * 6 : d;
807
890
  }
808
891
  if (t === 0)
809
- n = s = a = r;
892
+ n = o = a = r;
810
893
  else {
811
- var i = r < 0.5 ? r * (1 + t) : r + t - r * t, l = 2 * r - i;
812
- n = o(l, i, e + 1 / 3), s = o(l, i, e), a = o(l, i, e - 1 / 3);
894
+ var i = r < 0.5 ? r * (1 + t) : r + t - r * t, c = 2 * r - i;
895
+ n = s(c, i, e + 1 / 3), o = s(c, i, e), a = s(c, i, e - 1 / 3);
813
896
  }
814
897
  return {
815
898
  r: n * 255,
816
- g: s * 255,
899
+ g: o * 255,
817
900
  b: a * 255
818
901
  };
819
902
  }
820
- function Re(e, t, r) {
821
- e = M(e, 255), t = M(t, 255), r = M(r, 255);
822
- var n = Math.max(e, t, r), s = Math.min(e, t, r), a, o, i = n, l = n - s;
823
- if (o = n === 0 ? 0 : l / n, n == s)
903
+ function De(e, t, r) {
904
+ e = x(e, 255), t = x(t, 255), r = x(r, 255);
905
+ var n = Math.max(e, t, r), o = Math.min(e, t, r), a, s, i = n, c = n - o;
906
+ if (s = n === 0 ? 0 : c / n, n == o)
824
907
  a = 0;
825
908
  else {
826
909
  switch (n) {
827
910
  case e:
828
- a = (t - r) / l + (t < r ? 6 : 0);
911
+ a = (t - r) / c + (t < r ? 6 : 0);
829
912
  break;
830
913
  case t:
831
- a = (r - e) / l + 2;
914
+ a = (r - e) / c + 2;
832
915
  break;
833
916
  case r:
834
- a = (e - t) / l + 4;
917
+ a = (e - t) / c + 4;
835
918
  break;
836
919
  }
837
920
  a /= 6;
838
921
  }
839
922
  return {
840
923
  h: a,
841
- s: o,
924
+ s,
842
925
  v: i
843
926
  };
844
927
  }
845
- function Nt(e, t, r) {
846
- e = M(e, 360) * 6, t = M(t, 100), r = M(r, 100);
847
- var n = Math.floor(e), s = e - n, a = r * (1 - t), o = r * (1 - s * t), i = r * (1 - (1 - s) * t), l = n % 6, d = [r, o, a, a, i, r][l], u = [i, r, r, o, a, a][l], f = [a, a, i, r, r, o][l];
928
+ function qt(e, t, r) {
929
+ e = x(e, 360) * 6, t = x(t, 100), r = x(r, 100);
930
+ var n = Math.floor(e), o = e - n, a = r * (1 - t), s = r * (1 - o * t), i = r * (1 - (1 - o) * t), c = n % 6, d = [r, s, a, a, i, r][c], f = [i, r, r, s, a, a][c], u = [a, a, i, r, r, s][c];
848
931
  return {
849
932
  r: d * 255,
850
- g: u * 255,
851
- b: f * 255
933
+ g: f * 255,
934
+ b: u * 255
852
935
  };
853
936
  }
854
- function Te(e, t, r, n) {
855
- var s = [N(Math.round(e).toString(16)), N(Math.round(t).toString(16)), N(Math.round(r).toString(16))];
856
- return n && s[0].charAt(0) == s[0].charAt(1) && s[1].charAt(0) == s[1].charAt(1) && s[2].charAt(0) == s[2].charAt(1) ? s[0].charAt(0) + s[1].charAt(0) + s[2].charAt(0) : s.join("");
937
+ function je(e, t, r, n) {
938
+ var o = [V(Math.round(e).toString(16)), V(Math.round(t).toString(16)), V(Math.round(r).toString(16))];
939
+ return n && o[0].charAt(0) == o[0].charAt(1) && o[1].charAt(0) == o[1].charAt(1) && o[2].charAt(0) == o[2].charAt(1) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) : o.join("");
857
940
  }
858
- function Pt(e, t, r, n, s) {
859
- var a = [N(Math.round(e).toString(16)), N(Math.round(t).toString(16)), N(Math.round(r).toString(16)), N(Le(n))];
860
- return s && a[0].charAt(0) == a[0].charAt(1) && a[1].charAt(0) == a[1].charAt(1) && a[2].charAt(0) == a[2].charAt(1) && a[3].charAt(0) == a[3].charAt(1) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) + a[3].charAt(0) : a.join("");
941
+ function Yt(e, t, r, n, o) {
942
+ var a = [V(Math.round(e).toString(16)), V(Math.round(t).toString(16)), V(Math.round(r).toString(16)), V(nt(n))];
943
+ return o && a[0].charAt(0) == a[0].charAt(1) && a[1].charAt(0) == a[1].charAt(1) && a[2].charAt(0) == a[2].charAt(1) && a[3].charAt(0) == a[3].charAt(1) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) + a[3].charAt(0) : a.join("");
861
944
  }
862
- function Ee(e, t, r, n) {
863
- var s = [N(Le(n)), N(Math.round(e).toString(16)), N(Math.round(t).toString(16)), N(Math.round(r).toString(16))];
864
- return s.join("");
945
+ function Ge(e, t, r, n) {
946
+ var o = [V(nt(n)), V(Math.round(e).toString(16)), V(Math.round(t).toString(16)), V(Math.round(r).toString(16))];
947
+ return o.join("");
865
948
  }
866
949
  h.equals = function(e, t) {
867
950
  return !e || !t ? !1 : h(e).toRgbString() == h(t).toRgbString();
@@ -873,54 +956,54 @@ h.random = function() {
873
956
  b: Math.random()
874
957
  });
875
958
  };
876
- function Ht(e, t) {
959
+ function Kt(e, t) {
877
960
  t = t === 0 ? 0 : t || 10;
878
961
  var r = h(e).toHsl();
879
- return r.s -= t / 100, r.s = he(r.s), h(r);
962
+ return r.s -= t / 100, r.s = ke(r.s), h(r);
880
963
  }
881
- function Bt(e, t) {
964
+ function Qt(e, t) {
882
965
  t = t === 0 ? 0 : t || 10;
883
966
  var r = h(e).toHsl();
884
- return r.s += t / 100, r.s = he(r.s), h(r);
967
+ return r.s += t / 100, r.s = ke(r.s), h(r);
885
968
  }
886
- function Vt(e) {
969
+ function Zt(e) {
887
970
  return h(e).desaturate(100);
888
971
  }
889
- function Ot(e, t) {
972
+ function Jt(e, t) {
890
973
  t = t === 0 ? 0 : t || 10;
891
974
  var r = h(e).toHsl();
892
- return r.l += t / 100, r.l = he(r.l), h(r);
975
+ return r.l += t / 100, r.l = ke(r.l), h(r);
893
976
  }
894
- function It(e, t) {
977
+ function er(e, t) {
895
978
  t = t === 0 ? 0 : t || 10;
896
979
  var r = h(e).toRgb();
897
980
  return r.r = Math.max(0, Math.min(255, r.r - Math.round(255 * -(t / 100)))), r.g = Math.max(0, Math.min(255, r.g - Math.round(255 * -(t / 100)))), r.b = Math.max(0, Math.min(255, r.b - Math.round(255 * -(t / 100)))), h(r);
898
981
  }
899
- function Ft(e, t) {
982
+ function tr(e, t) {
900
983
  t = t === 0 ? 0 : t || 10;
901
984
  var r = h(e).toHsl();
902
- return r.l -= t / 100, r.l = he(r.l), h(r);
985
+ return r.l -= t / 100, r.l = ke(r.l), h(r);
903
986
  }
904
- function Dt(e, t) {
987
+ function rr(e, t) {
905
988
  var r = h(e).toHsl(), n = (r.h + t) % 360;
906
989
  return r.h = n < 0 ? 360 + n : n, h(r);
907
990
  }
908
- function Lt(e) {
991
+ function nr(e) {
909
992
  var t = h(e).toHsl();
910
993
  return t.h = (t.h + 180) % 360, h(t);
911
994
  }
912
- function Ne(e, t) {
995
+ function Ue(e, t) {
913
996
  if (isNaN(t) || t <= 0)
914
997
  throw new Error("Argument to polyad must be a positive number");
915
- for (var r = h(e).toHsl(), n = [h(e)], s = 360 / t, a = 1; a < t; a++)
998
+ for (var r = h(e).toHsl(), n = [h(e)], o = 360 / t, a = 1; a < t; a++)
916
999
  n.push(h({
917
- h: (r.h + a * s) % 360,
1000
+ h: (r.h + a * o) % 360,
918
1001
  s: r.s,
919
1002
  l: r.l
920
1003
  }));
921
1004
  return n;
922
1005
  }
923
- function Wt(e) {
1006
+ function or(e) {
924
1007
  var t = h(e).toHsl(), r = t.h;
925
1008
  return [h(e), h({
926
1009
  h: (r + 72) % 360,
@@ -932,40 +1015,40 @@ function Wt(e) {
932
1015
  l: t.l
933
1016
  })];
934
1017
  }
935
- function jt(e, t, r) {
1018
+ function ar(e, t, r) {
936
1019
  t = t || 6, r = r || 30;
937
- var n = h(e).toHsl(), s = 360 / r, a = [h(e)];
938
- for (n.h = (n.h - (s * t >> 1) + 720) % 360; --t; )
939
- n.h = (n.h + s) % 360, a.push(h(n));
1020
+ var n = h(e).toHsl(), o = 360 / r, a = [h(e)];
1021
+ for (n.h = (n.h - (o * t >> 1) + 720) % 360; --t; )
1022
+ n.h = (n.h + o) % 360, a.push(h(n));
940
1023
  return a;
941
1024
  }
942
- function Gt(e, t) {
1025
+ function sr(e, t) {
943
1026
  t = t || 6;
944
- for (var r = h(e).toHsv(), n = r.h, s = r.s, a = r.v, o = [], i = 1 / t; t--; )
945
- o.push(h({
1027
+ for (var r = h(e).toHsv(), n = r.h, o = r.s, a = r.v, s = [], i = 1 / t; t--; )
1028
+ s.push(h({
946
1029
  h: n,
947
- s,
1030
+ s: o,
948
1031
  v: a
949
1032
  })), a = (a + i) % 1;
950
- return o;
1033
+ return s;
951
1034
  }
952
1035
  h.mix = function(e, t, r) {
953
1036
  r = r === 0 ? 0 : r || 50;
954
- var n = h(e).toRgb(), s = h(t).toRgb(), a = r / 100, o = {
955
- r: (s.r - n.r) * a + n.r,
956
- g: (s.g - n.g) * a + n.g,
957
- b: (s.b - n.b) * a + n.b,
958
- a: (s.a - n.a) * a + n.a
1037
+ var n = h(e).toRgb(), o = h(t).toRgb(), a = r / 100, s = {
1038
+ r: (o.r - n.r) * a + n.r,
1039
+ g: (o.g - n.g) * a + n.g,
1040
+ b: (o.b - n.b) * a + n.b,
1041
+ a: (o.a - n.a) * a + n.a
959
1042
  };
960
- return h(o);
1043
+ return h(s);
961
1044
  };
962
1045
  h.readability = function(e, t) {
963
1046
  var r = h(e), n = h(t);
964
1047
  return (Math.max(r.getLuminance(), n.getLuminance()) + 0.05) / (Math.min(r.getLuminance(), n.getLuminance()) + 0.05);
965
1048
  };
966
1049
  h.isReadable = function(e, t, r) {
967
- var n = h.readability(e, t), s, a;
968
- switch (a = !1, s = Qt(r), s.level + s.size) {
1050
+ var n = h.readability(e, t), o, a;
1051
+ switch (a = !1, o = fr(r), o.level + o.size) {
969
1052
  case "AAsmall":
970
1053
  case "AAAlarge":
971
1054
  a = n >= 4.5;
@@ -980,16 +1063,16 @@ h.isReadable = function(e, t, r) {
980
1063
  return a;
981
1064
  };
982
1065
  h.mostReadable = function(e, t, r) {
983
- var n = null, s = 0, a, o, i, l;
984
- r = r || {}, o = r.includeFallbackColors, i = r.level, l = r.size;
1066
+ var n = null, o = 0, a, s, i, c;
1067
+ r = r || {}, s = r.includeFallbackColors, i = r.level, c = r.size;
985
1068
  for (var d = 0; d < t.length; d++)
986
- a = h.readability(e, t[d]), a > s && (s = a, n = h(t[d]));
1069
+ a = h.readability(e, t[d]), a > o && (o = a, n = h(t[d]));
987
1070
  return h.isReadable(e, n, {
988
1071
  level: i,
989
- size: l
990
- }) || !o ? n : (r.includeFallbackColors = !1, h.mostReadable(e, ["#fff", "#000"], r));
1072
+ size: c
1073
+ }) || !s ? n : (r.includeFallbackColors = !1, h.mostReadable(e, ["#fff", "#000"], r));
991
1074
  };
992
- var ye = h.names = {
1075
+ var $e = h.names = {
993
1076
  aliceblue: "f0f8ff",
994
1077
  antiquewhite: "faebd7",
995
1078
  aqua: "0ff",
@@ -1139,69 +1222,69 @@ var ye = h.names = {
1139
1222
  whitesmoke: "f5f5f5",
1140
1223
  yellow: "ff0",
1141
1224
  yellowgreen: "9acd32"
1142
- }, Xt = h.hexNames = qt(ye);
1143
- function qt(e) {
1225
+ }, ir = h.hexNames = lr($e);
1226
+ function lr(e) {
1144
1227
  var t = {};
1145
1228
  for (var r in e)
1146
1229
  e.hasOwnProperty(r) && (t[e[r]] = r);
1147
1230
  return t;
1148
1231
  }
1149
- function De(e) {
1232
+ function rt(e) {
1150
1233
  return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
1151
1234
  }
1152
- function M(e, t) {
1153
- Ut(e) && (e = "100%");
1154
- var r = Yt(e);
1235
+ function x(e, t) {
1236
+ cr(e) && (e = "100%");
1237
+ var r = ur(e);
1155
1238
  return e = Math.min(t, Math.max(0, parseFloat(e))), r && (e = parseInt(e * t, 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : e % t / parseFloat(t);
1156
1239
  }
1157
- function he(e) {
1240
+ function ke(e) {
1158
1241
  return Math.min(1, Math.max(0, e));
1159
1242
  }
1160
- function T(e) {
1243
+ function N(e) {
1161
1244
  return parseInt(e, 16);
1162
1245
  }
1163
- function Ut(e) {
1246
+ function cr(e) {
1164
1247
  return typeof e == "string" && e.indexOf(".") != -1 && parseFloat(e) === 1;
1165
1248
  }
1166
- function Yt(e) {
1249
+ function ur(e) {
1167
1250
  return typeof e == "string" && e.indexOf("%") != -1;
1168
1251
  }
1169
- function N(e) {
1252
+ function V(e) {
1170
1253
  return e.length == 1 ? "0" + e : "" + e;
1171
1254
  }
1172
- function J(e) {
1255
+ function ue(e) {
1173
1256
  return e <= 1 && (e = e * 100 + "%"), e;
1174
1257
  }
1175
- function Le(e) {
1258
+ function nt(e) {
1176
1259
  return Math.round(parseFloat(e) * 255).toString(16);
1177
1260
  }
1178
- function Pe(e) {
1179
- return T(e) / 255;
1261
+ function Xe(e) {
1262
+ return N(e) / 255;
1180
1263
  }
1181
- var E = function() {
1182
- var e = "[-\\+]?\\d+%?", t = "[-\\+]?\\d*\\.\\d+%?", r = "(?:" + t + ")|(?:" + e + ")", n = "[\\s|\\(]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")\\s*\\)?", s = "[\\s|\\(]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")\\s*\\)?";
1264
+ var B = function() {
1265
+ var e = "[-\\+]?\\d+%?", t = "[-\\+]?\\d*\\.\\d+%?", r = "(?:" + t + ")|(?:" + e + ")", n = "[\\s|\\(]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")\\s*\\)?", o = "[\\s|\\(]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")\\s*\\)?";
1183
1266
  return {
1184
1267
  CSS_UNIT: new RegExp(r),
1185
1268
  rgb: new RegExp("rgb" + n),
1186
- rgba: new RegExp("rgba" + s),
1269
+ rgba: new RegExp("rgba" + o),
1187
1270
  hsl: new RegExp("hsl" + n),
1188
- hsla: new RegExp("hsla" + s),
1271
+ hsla: new RegExp("hsla" + o),
1189
1272
  hsv: new RegExp("hsv" + n),
1190
- hsva: new RegExp("hsva" + s),
1273
+ hsva: new RegExp("hsva" + o),
1191
1274
  hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
1192
1275
  hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
1193
1276
  hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
1194
1277
  hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
1195
1278
  };
1196
1279
  }();
1197
- function B(e) {
1198
- return !!E.CSS_UNIT.exec(e);
1280
+ function W(e) {
1281
+ return !!B.CSS_UNIT.exec(e);
1199
1282
  }
1200
- function Kt(e) {
1201
- e = e.replace(Ct, "").replace(zt, "").toLowerCase();
1283
+ function dr(e) {
1284
+ e = e.replace(Dt, "").replace(jt, "").toLowerCase();
1202
1285
  var t = !1;
1203
- if (ye[e])
1204
- e = ye[e], t = !0;
1286
+ if ($e[e])
1287
+ e = $e[e], t = !0;
1205
1288
  else if (e == "transparent")
1206
1289
  return {
1207
1290
  r: 0,
@@ -1211,58 +1294,58 @@ function Kt(e) {
1211
1294
  format: "name"
1212
1295
  };
1213
1296
  var r;
1214
- return (r = E.rgb.exec(e)) ? {
1297
+ return (r = B.rgb.exec(e)) ? {
1215
1298
  r: r[1],
1216
1299
  g: r[2],
1217
1300
  b: r[3]
1218
- } : (r = E.rgba.exec(e)) ? {
1301
+ } : (r = B.rgba.exec(e)) ? {
1219
1302
  r: r[1],
1220
1303
  g: r[2],
1221
1304
  b: r[3],
1222
1305
  a: r[4]
1223
- } : (r = E.hsl.exec(e)) ? {
1306
+ } : (r = B.hsl.exec(e)) ? {
1224
1307
  h: r[1],
1225
1308
  s: r[2],
1226
1309
  l: r[3]
1227
- } : (r = E.hsla.exec(e)) ? {
1310
+ } : (r = B.hsla.exec(e)) ? {
1228
1311
  h: r[1],
1229
1312
  s: r[2],
1230
1313
  l: r[3],
1231
1314
  a: r[4]
1232
- } : (r = E.hsv.exec(e)) ? {
1315
+ } : (r = B.hsv.exec(e)) ? {
1233
1316
  h: r[1],
1234
1317
  s: r[2],
1235
1318
  v: r[3]
1236
- } : (r = E.hsva.exec(e)) ? {
1319
+ } : (r = B.hsva.exec(e)) ? {
1237
1320
  h: r[1],
1238
1321
  s: r[2],
1239
1322
  v: r[3],
1240
1323
  a: r[4]
1241
- } : (r = E.hex8.exec(e)) ? {
1242
- r: T(r[1]),
1243
- g: T(r[2]),
1244
- b: T(r[3]),
1245
- a: Pe(r[4]),
1324
+ } : (r = B.hex8.exec(e)) ? {
1325
+ r: N(r[1]),
1326
+ g: N(r[2]),
1327
+ b: N(r[3]),
1328
+ a: Xe(r[4]),
1246
1329
  format: t ? "name" : "hex8"
1247
- } : (r = E.hex6.exec(e)) ? {
1248
- r: T(r[1]),
1249
- g: T(r[2]),
1250
- b: T(r[3]),
1330
+ } : (r = B.hex6.exec(e)) ? {
1331
+ r: N(r[1]),
1332
+ g: N(r[2]),
1333
+ b: N(r[3]),
1251
1334
  format: t ? "name" : "hex"
1252
- } : (r = E.hex4.exec(e)) ? {
1253
- r: T(r[1] + "" + r[1]),
1254
- g: T(r[2] + "" + r[2]),
1255
- b: T(r[3] + "" + r[3]),
1256
- a: Pe(r[4] + "" + r[4]),
1335
+ } : (r = B.hex4.exec(e)) ? {
1336
+ r: N(r[1] + "" + r[1]),
1337
+ g: N(r[2] + "" + r[2]),
1338
+ b: N(r[3] + "" + r[3]),
1339
+ a: Xe(r[4] + "" + r[4]),
1257
1340
  format: t ? "name" : "hex8"
1258
- } : (r = E.hex3.exec(e)) ? {
1259
- r: T(r[1] + "" + r[1]),
1260
- g: T(r[2] + "" + r[2]),
1261
- b: T(r[3] + "" + r[3]),
1341
+ } : (r = B.hex3.exec(e)) ? {
1342
+ r: N(r[1] + "" + r[1]),
1343
+ g: N(r[2] + "" + r[2]),
1344
+ b: N(r[3] + "" + r[3]),
1262
1345
  format: t ? "name" : "hex"
1263
1346
  } : !1;
1264
1347
  }
1265
- function Qt(e) {
1348
+ function fr(e) {
1266
1349
  var t, r;
1267
1350
  return e = e || {
1268
1351
  level: "AA",
@@ -1272,114 +1355,232 @@ function Qt(e) {
1272
1355
  size: r
1273
1356
  };
1274
1357
  }
1275
- const Zt = {
1276
- primary: ["#f0f9ff", "#e0f2fe", "#bae6fd", "#7dd3fc", "#38bdf8", "#0ea5e9", "#0284c7", "#0369a1", "#075985", "#0c4a6e", "#082f49"],
1277
- secondary: ["#f0fdf4", "#dcfce7", "#bbf7d0", "#86efac", "#4ade80", "#22c55e", "#059669", "#047857", "#065f46", "#064e3b", "#033d2f"],
1278
- tertiary: ["#fffbeb", "#fef3c7", "#fde68a", "#fcd34d", "#fbbf24", "#f59e0b", "#d97706", "#b45309", "#92400e", "#78350f", "#572508"],
1279
- error: ["#fff5f5", "#fed7d7", "#feb2b2", "#fc8181", "#f56565", "#e53e3e", "#9b2c2c", "#7c1d1d", "#6b1616", "#581414", "#450a0a"],
1280
- surface: ["#fafafa", "#f5f5f5", "#e5e5e5", "#d4d4d4", "#a3a3a3", "#737373", "#525252", "#404040", "#262626", "#171717", "#0a0a0a"]
1281
- }, se = {
1282
- theme: "dark",
1283
- colors: Zt
1284
- }, Vr = Symbol("Notifications"), We = tt([]);
1285
- function Jt() {
1286
- return We;
1287
- }
1288
- class Or {
1358
+ const ot = {
1359
+ primary: ["#e5f7ff", "#d3ebfa", "#a9d4f1", "#7cbde9", "#57a9e0", "#3f9cdc", "#3096dc", "#1f82c4", "#0f73b0", "#00649c", "#082f49"],
1360
+ secondary: ["#e9fbf0", "#dcf1e3", "#badfc7", "#96cea9", "#77bf90", "#63b580", "#58b077", "#479a64", "#3b8a58", "#2c7749", "#022c22"],
1361
+ tertiary: ["#fff7e1", "#ffedcd", "#fcd99e", "#f9c46b", "#f7b23f", "#f6a724", "#f5a113", "#da8c04", "#c37d00", "#aa6a00", "#572508"],
1362
+ error: ["#ffeaea", "#fcd5d5", "#f2a8a9", "#ea7a7a", "#e25353", "#de3939", "#dd2b2b", "#c41e1f", "#af171a", "#9a0913", "#450a0a"],
1363
+ surface: ["#fafafa", "#f5f5f5", "#e5e5e5", "#d4d4d4", "#a3a3a3", "#737373", "#525252", "#404040", "#262626", "#171717", "#121212"]
1364
+ }, Te = {
1365
+ name: "dark",
1366
+ scheme: "dark",
1367
+ colors: ot
1368
+ }, hr = {
1369
+ name: "light",
1370
+ scheme: "light",
1371
+ colors: ot
1372
+ }, nn = Symbol("Notifications"), at = vt([]);
1373
+ function pr() {
1374
+ return at;
1375
+ }
1376
+ class on {
1289
1377
  static show(t) {
1290
- t.hash = Math.random().toString(36), We.push(t);
1378
+ t.hash = Math.random().toString(36), at.push(t);
1291
1379
  }
1292
1380
  }
1293
- const Ir = /* @__PURE__ */ R({
1381
+ const ze = [0.96, 0.907, 0.805, 0.697, 0.605, 0.547, 0.518, 0.445, 0.395, 0.34, 0.28], qe = [0.32, 0.16, 0.08, 0.04, 0, 0, 0.04, 0.08, 0.16, 0.32, 0.64];
1382
+ function mr(e) {
1383
+ const t = h(e).toHsl().l;
1384
+ return ze.reduce(
1385
+ (r, n) => Math.abs(n - t) < Math.abs(r - t) ? n : r
1386
+ );
1387
+ }
1388
+ function gr(e) {
1389
+ const t = h(e), r = mr(t), n = ze.findIndex((a) => a === r), o = ze.map((a) => {
1390
+ const s = h({ h: t.toHsl().h, s: t.toHsl().s, l: a }), i = qe[n] - qe[n];
1391
+ return i >= 0 ? s.saturate(i * 100) : s.desaturate(i * -100), s;
1392
+ });
1393
+ return { baseColorIndex: n, colors: o.map((a) => a.toHexString()) };
1394
+ }
1395
+ function an(e) {
1396
+ return gr(e).colors;
1397
+ }
1398
+ function br() {
1399
+ if (typeof window > "u")
1400
+ return v("dark");
1401
+ const e = v(document.documentElement.dataset.scheme);
1402
+ return new MutationObserver((r) => {
1403
+ r.forEach((n) => {
1404
+ n.type === "attributes" && n.attributeName === "data-scheme" && (e.value = document.documentElement.dataset.scheme);
1405
+ });
1406
+ }).observe(document.documentElement, {
1407
+ attributes: !0,
1408
+ attributeFilter: ["data-scheme"]
1409
+ }), e;
1410
+ }
1411
+ function sn() {
1412
+ return et("currentThemeScheme", null);
1413
+ }
1414
+ function vr() {
1415
+ return et("currentTheme", v(Te));
1416
+ }
1417
+ function st(e, t = !0) {
1418
+ const r = v(e), n = v(e.scheme), o = br();
1419
+ X(() => {
1420
+ o.value && (n.value = o.value);
1421
+ }), Fe("currentTheme", r), Fe("currentThemeScheme", n);
1422
+ const s = {
1423
+ ...Object.keys(r.value.colors).map((f) => {
1424
+ const u = f;
1425
+ return r.value.colors[u].reduce((b, k, S) => {
1426
+ const C = h(k).toRgb();
1427
+ return b[`--r-color-${u}-${S}`] = `${C.r} ${C.g} ${C.b}`, b;
1428
+ }, {});
1429
+ }).reduce((f, u) => ({
1430
+ ...f,
1431
+ ...u
1432
+ }), {})
1433
+ }, i = {
1434
+ "color-scheme": n.value,
1435
+ "font-family": "'Roboto', sans-serif",
1436
+ "background-color": "rgb(var(--r-color-surface-lowest))",
1437
+ color: "rgb(var(--r-color-surface-on))"
1438
+ }, c = m(() => {
1439
+ if (t)
1440
+ return {};
1441
+ switch (e.scheme) {
1442
+ case "dark":
1443
+ return {
1444
+ colorScheme: "dark",
1445
+ "--r-color-surface-on": "var(--r-color-surface-3)",
1446
+ "--r-color-surface-oninverted": "var(--r-color-surface-8)",
1447
+ "--r-color-surface-onlow": "var(--r-color-surface-4)",
1448
+ "--r-color-surface-onlowinverted": "var(--r-color-surface-7)",
1449
+ "--r-color-surface-lowest": "var(--r-color-surface-10)",
1450
+ "--r-color-surface-low": "var(--r-color-surface-9)",
1451
+ "--r-color-surface-base": "var(--r-color-surface-8)",
1452
+ "--r-color-surface-high": "var(--r-color-surface-7)",
1453
+ "--r-color-surface-highest": "var(--r-color-surface-6)",
1454
+ "--r-color-surface-border": "var(--r-color-surface-7)",
1455
+ "--r-color-primary-container": "var(--r-color-primary-8)",
1456
+ "--r-color-secondary-container": "var(--r-color-secondary-8)",
1457
+ "--r-color-tertiary-container": "var(--r-color-tertiary-8)",
1458
+ "--r-color-error-container": "var(--r-color-error-8)",
1459
+ "--r-color-primary-containerd": "var(--r-color-primary-9)",
1460
+ "--r-color-secondary-containerd": "var(--r-color-secondary-9)",
1461
+ "--r-color-tertiary-containerd": "var(--r-color-tertiary-9)",
1462
+ "--r-color-error-containerd": "var(--r-color-error-9)",
1463
+ "--r-color-primary-containerl": "var(--r-color-primary-6)",
1464
+ "--r-color-secondary-containerl": "var(--r-color-secondary-6)",
1465
+ "--r-color-tertiary-containerl": "var(--r-color-tertiary-6)",
1466
+ "--r-color-error-containerl": "var(--r-color-error-6)"
1467
+ };
1468
+ case "light":
1469
+ return {
1470
+ colorScheme: "light",
1471
+ "--r-color-surface-on": "var(--r-color-surface-7)",
1472
+ "--r-color-surface-oninverted": "var(--r-color-surface-2)",
1473
+ "--r-color-surface-onlow": "var(--r-color-surface-6)",
1474
+ "--r-color-surface-onlowinverted": "var(--r-color-surface-3)",
1475
+ "--r-color-surface-lowest": "var(--r-color-surface-3)",
1476
+ "--r-color-surface-low": "var(--r-color-surface-2)",
1477
+ "--r-color-surface-base": "var(--r-color-surface-1)",
1478
+ "--r-color-surface-high": "var(--r-color-surface-0)",
1479
+ "--r-color-surface-highest": "var(--r-color-surface-0)",
1480
+ "--r-color-surface-border": "var(--r-color-surface-4)",
1481
+ "--r-color-primary-container": "var(--r-color-primary-6)",
1482
+ "--r-color-secondary-container": "var(--r-color-secondary-6)",
1483
+ "--r-color-tertiary-container": "var(--r-color-tertiary-6)",
1484
+ "--r-color-error-container": "var(--r-color-error-6)",
1485
+ "--r-color-primary-containerd": "var(--r-color-primary-7)",
1486
+ "--r-color-secondary-containerd": "var(--r-color-secondary-7)",
1487
+ "--r-color-tertiary-containerd": "var(--r-color-tertiary-7)",
1488
+ "--r-color-error-containerd": "var(--r-color-error-7)",
1489
+ "--r-color-primary-containerl": "var(--r-color-primary-4)",
1490
+ "--r-color-secondary-containerl": "var(--r-color-secondary-4)",
1491
+ "--r-color-tertiary-containerl": "var(--r-color-tertiary-4)",
1492
+ "--r-color-error-containerl": "var(--r-color-error-4)"
1493
+ };
1494
+ }
1495
+ });
1496
+ return {
1497
+ ...s,
1498
+ ...i,
1499
+ ...c.value
1500
+ };
1501
+ }
1502
+ const ln = /* @__PURE__ */ $({
1294
1503
  __name: "RokuProvider",
1295
1504
  props: {
1296
1505
  is: { default: "div" },
1297
1506
  theme: { default() {
1298
- return se;
1507
+ return typeof window > "u" || document.documentElement.dataset.scheme === "dark" ? Te : hr;
1299
1508
  } }
1300
1509
  },
1301
1510
  setup(e) {
1302
- const t = e, r = Object.keys(se.colors).map((s) => {
1303
- const a = s;
1304
- return se.colors[a].reduce((i, l, d) => {
1305
- const u = h(l).toRgb();
1306
- return i[`--r-color-${a}-${d}`] = `${u.r} ${u.g} ${u.b}`, i;
1307
- }, {});
1308
- }).reduce((s, a) => ({
1309
- ...s,
1310
- ...a
1311
- }), {}), n = {
1312
- "--r-color-theme": se.theme,
1313
- ...r,
1314
- "color-scheme": "dark light",
1315
- "font-family": "'Roboto', sans-serif",
1316
- "background-color": "rgb(var(--r-color-surface-9))"
1317
- };
1318
- return rt("theme", t.theme), (s, a) => (g(), L(xe(s.is), { style: n }, {
1319
- default: ce(() => [
1320
- P(s.$slots, "default")
1511
+ const t = e, r = v(0), n = v(0);
1512
+ be && new ResizeObserver(() => {
1513
+ const i = window.innerWidth - document.body.clientWidth;
1514
+ i !== 0 && (r.value = i), n.value = i;
1515
+ }).observe(document.body);
1516
+ const o = m(() => n.value === r.value ? "0px" : `${r.value}px`), a = st(t.theme);
1517
+ return (s, i) => (g(), D(_e(s.is), {
1518
+ style: T([
1519
+ l(a),
1520
+ { paddingRight: l(o) }
1521
+ ]),
1522
+ class: "text-surface-on transition-background-color,border-color,color"
1523
+ }, {
1524
+ default: J(() => [
1525
+ H(s.$slots, "default")
1321
1526
  ]),
1322
1527
  _: 3
1323
- }));
1528
+ }, 8, ["style"]));
1324
1529
  }
1325
- }), er = { class: "w-full flex items-center" }, tr = ["value"], rr = /* @__PURE__ */ S("i", { class: "i-tabler-chevron-down pointer-events-none absolute right-2" }, null, -1), nr = {
1530
+ }), yr = { class: "w-full flex items-center" }, wr = ["placeholder", "value"], _r = /* @__PURE__ */ M("i", { class: "i-tabler-chevron-down pointer-events-none absolute right-2" }, null, -1), xr = {
1326
1531
  key: 0,
1327
1532
  class: "flex cursor-default items-center justify-between gap-2 rounded p-1 px-2"
1328
- }, ar = ["onPointerdown", "onHover"], sr = { key: 0 }, or = /* @__PURE__ */ S("i", { class: "i-tabler-check h-3 w-3" }, null, -1), ir = [
1329
- or
1330
- ], Fr = /* @__PURE__ */ R({
1533
+ }, kr = ["onPointerdown", "onHover"], Mr = { key: 0 }, Sr = /* @__PURE__ */ M("i", { class: "i-tabler-check h-3 w-3" }, null, -1), Ar = [
1534
+ Sr
1535
+ ], cn = /* @__PURE__ */ $({
1331
1536
  __name: "Select",
1332
- props: {
1537
+ props: /* @__PURE__ */ ee({
1333
1538
  options: { default() {
1334
1539
  return [];
1335
1540
  } },
1336
- modelValue: { default: void 0 },
1337
1541
  size: { default: "md" },
1338
- noneText: { default: "No options" }
1339
- },
1340
- emits: ["update:modelValue", "change"],
1542
+ noneText: { default: "No options" },
1543
+ placeholder: { default: "" }
1544
+ }, {
1545
+ modelValue: { default: void 0 },
1546
+ modelModifiers: {}
1547
+ }),
1548
+ emits: /* @__PURE__ */ ee(["change"], ["update:modelValue"]),
1341
1549
  setup(e, { emit: t }) {
1342
- const r = e, n = t, s = m({
1343
- get() {
1344
- return r.modelValue;
1345
- },
1346
- set(x) {
1347
- n("update:modelValue", x);
1348
- }
1349
- }), a = k(null), o = k(null), { focused: i } = xt(a), l = m(() => r.options.map((x) => _(x)).indexOf(s.value)), d = k(-1), u = k(-1);
1350
- oe(() => {
1351
- i.value || (u.value = -1);
1352
- }), oe(() => {
1353
- s.value = _(r.options[l.value]);
1354
- }), ae(s, () => {
1355
- n("change", s.value);
1550
+ const r = e, n = t, o = me(e, "modelValue"), a = v(null), s = v(null), { focused: i } = It(a), c = m(() => r.options.map((_) => S(_)).indexOf(o.value)), d = v(-1), f = v(-1);
1551
+ X(() => {
1552
+ i.value || (f.value = -1);
1553
+ }), X(() => {
1554
+ o.value = S(r.options[c.value]);
1555
+ }), ie(o, () => {
1556
+ n("change", o.value);
1356
1557
  });
1357
- const f = r.options, p = m(() => f[l.value]), v = m(() => b(p.value));
1358
- function b(x) {
1359
- if (x)
1360
- return typeof x == "string" || typeof x == "symbol" || typeof x == "number" ? x : x.label;
1558
+ const u = r.options, p = m(() => u[c.value]), b = m(() => k(p.value));
1559
+ function k(_) {
1560
+ if (_)
1561
+ return typeof _ == "string" || typeof _ == "symbol" || typeof _ == "number" ? _ : _.label;
1361
1562
  }
1362
- function _(x) {
1363
- if (x)
1364
- return typeof x == "string" || typeof x == "symbol" || typeof x == "number" ? x : x.id;
1563
+ function S(_) {
1564
+ if (_)
1565
+ return typeof _ == "string" || typeof _ == "symbol" || typeof _ == "number" ? _ : _.id;
1365
1566
  }
1366
- be("ArrowDown", (x) => {
1367
- i.value && (x.preventDefault(), u.value = (u.value + 1) % f.length);
1368
- }), be("ArrowUp", (x) => {
1369
- i.value && (x.preventDefault(), u.value = (u.value - 1 + f.length) % f.length);
1370
- }), be("Enter", () => {
1371
- i.value && u.value !== -1 && (s.value = _(f[u.value]), i.value = !1);
1567
+ Ae("ArrowDown", (_) => {
1568
+ i.value && (_.preventDefault(), f.value = (f.value + 1) % u.length);
1569
+ }), Ae("ArrowUp", (_) => {
1570
+ i.value && (_.preventDefault(), f.value = (f.value - 1 + u.length) % u.length);
1571
+ }), Ae("Enter", () => {
1572
+ i.value && f.value !== -1 && (o.value = S(u[f.value]), i.value = !1);
1372
1573
  });
1373
- function A(x) {
1574
+ function C(_) {
1374
1575
  if (!i.value) {
1375
1576
  i.value = !0;
1376
1577
  return;
1377
1578
  }
1378
- s.value = _(x), i.value = !1;
1579
+ o.value = S(_), i.value = !1;
1379
1580
  }
1380
- const O = m(() => ({
1381
- input: "container-default focus:border-primary-7"
1382
- })), ge = m(() => {
1581
+ const le = m(() => ({
1582
+ input: "container-base focus:border-primary-container"
1583
+ })), ce = m(() => {
1383
1584
  switch (r.size) {
1384
1585
  case "sm":
1385
1586
  return {
@@ -1398,45 +1599,45 @@ const Ir = /* @__PURE__ */ R({
1398
1599
  };
1399
1600
  }
1400
1601
  });
1401
- return (x, j) => (g(), y("div", {
1602
+ return (_, O) => (g(), y("div", {
1402
1603
  ref_key: "wrapperRef",
1403
- ref: o,
1604
+ ref: s,
1404
1605
  class: "r-select-wrapper relative"
1405
1606
  }, [
1406
- S("div", er, [
1407
- S("input", {
1607
+ M("div", yr, [
1608
+ M("input", {
1408
1609
  ref_key: "inputRef",
1409
1610
  ref: a,
1410
- class: w([[c(O).input, c(ge).wrapper], "r-select-input cursor-pointer border rounded outline-none"]),
1411
- placeholder: "Select",
1611
+ class: w([[l(le).input, l(ce).wrapper], "r-select-input cursor-pointer border rounded outline-none"]),
1612
+ placeholder: _.placeholder,
1412
1613
  readonly: "",
1413
- value: c(v),
1614
+ value: l(b),
1414
1615
  "aria-haspopup": "listbox",
1415
1616
  autocomplete: "off",
1416
- onFocus: j[0] || (j[0] = (Z) => i.value = !0)
1417
- }, null, 42, tr),
1418
- rr
1617
+ onFocus: O[0] || (O[0] = (j) => i.value = !0)
1618
+ }, null, 42, wr),
1619
+ _r
1419
1620
  ]),
1420
- c(i) ? (g(), y("div", {
1621
+ l(i) ? (g(), y("div", {
1421
1622
  key: 0,
1422
- class: w([c(ge).dropdown, "absolute z-1 mt-2 w-full flex-col overflow-hidden border container-default rounded p-1"])
1623
+ class: w([l(ce).dropdown, "absolute z-1 mt-2 w-full flex-col overflow-hidden border container-base rounded p-1"])
1423
1624
  }, [
1424
- c(f).length === 0 ? (g(), y("div", nr, q(x.noneText), 1)) : (g(!0), y(X, { key: 1 }, te(c(f), (Z, me) => (g(), y("div", {
1425
- key: _(Z),
1625
+ l(u).length === 0 ? (g(), y("div", xr, re(_.noneText), 1)) : (g(!0), y(te, { key: 1 }, fe(l(u), (j, A) => (g(), y("div", {
1626
+ key: S(j),
1426
1627
  class: w([{
1427
- "hover:bg-surface-7": c(u) !== me,
1428
- "container-filled-primary": c(u) === me
1628
+ "hover:bg-surface-high": l(f) !== A,
1629
+ "container-filled-primary": l(f) === A
1429
1630
  }, "flex cursor-pointer items-center justify-between gap-2 rounded p-1 px-2"]),
1430
- onPointerdown: (Ye) => A(Z),
1431
- onHover: (Ye) => d.value = me
1631
+ onPointerdown: (R) => C(j),
1632
+ onHover: (R) => d.value = A
1432
1633
  }, [
1433
- nt(q(b(Z)) + " ", 1),
1434
- Z === c(p) ? (g(), y("div", sr, ir)) : $("", !0)
1435
- ], 42, ar))), 128))
1436
- ], 2)) : $("", !0)
1634
+ yt(re(k(j)) + " ", 1),
1635
+ j === l(p) ? (g(), y("div", Mr, Ar)) : z("", !0)
1636
+ ], 42, kr))), 128))
1637
+ ], 2)) : z("", !0)
1437
1638
  ], 512));
1438
1639
  }
1439
- }), lr = ["value", "placeholder", "type"], ur = /* @__PURE__ */ R({
1640
+ }), Cr = ["value", "placeholder", "type"], $r = /* @__PURE__ */ $({
1440
1641
  __name: "TextField",
1441
1642
  props: {
1442
1643
  modelValue: {},
@@ -1445,54 +1646,70 @@ const Ir = /* @__PURE__ */ R({
1445
1646
  error: { type: Boolean },
1446
1647
  disabled: { type: Boolean },
1447
1648
  rounded: { default: "md" },
1649
+ size: { default: "md" },
1448
1650
  password: { type: Boolean },
1449
1651
  placeholder: {}
1450
1652
  },
1451
1653
  emits: ["change", "update:modelValue", "input", "click", "pointerdown", "pointerup"],
1452
1654
  setup(e, { expose: t, emit: r }) {
1453
- const n = e, s = r, a = m(() => {
1655
+ const n = e, o = r, a = m(() => {
1656
+ switch (n.size) {
1657
+ case "sm":
1658
+ return {
1659
+ base: "h-6 px-2 py-1 text-xs"
1660
+ };
1661
+ case "md":
1662
+ return {
1663
+ base: "h-8 px-3 py-1 text-sm"
1664
+ };
1665
+ case "lg":
1666
+ return {
1667
+ base: "h-10 px-4 py-2 text-base"
1668
+ };
1669
+ }
1670
+ }), s = m(() => {
1454
1671
  if (n.error)
1455
- return "text-error-5 bg-error-10 border-error-5 focus:border-error-5";
1672
+ return "text-error-container bg-surface-base border-error-container focus:border-error-container";
1456
1673
  switch (n.color) {
1457
1674
  case "secondary":
1458
- return "text-surface-2 bg-surface-8 border-surface-6 focus:border-secondary-5";
1675
+ return "text-surface-on bg-surface-base border-surface-border-base focus:border-secondary-container";
1459
1676
  case "tertiary":
1460
- return "text-surface-2 bg-surface-8 border-surface-6 focus:border-tertiary-5";
1677
+ return "text-surface-on bg-surface-base border-surface-border-base focus:border-tertiary-container";
1461
1678
  case "error":
1462
- return "text-surface-2 bg-surface-8 border-surface-6 focus:border-error-5";
1679
+ return "text-surface-on bg-surface-base border-surface-border-base focus:border-error-container";
1463
1680
  case "primary":
1464
1681
  default:
1465
- return "text-surface-2 bg-surface-8 border-surface-6 focus:border-primary-5";
1682
+ return "text-surface-on bg-surface-base border-surface-border-base focus:border-primary-container";
1466
1683
  }
1467
- }), o = m(() => n.disabled ? "pointer-events-none filter grayscale opacity-60" : ""), i = fe(n), l = k(null);
1468
- function d(u) {
1469
- var f;
1470
- s("update:modelValue", ((f = u.target) == null ? void 0 : f.value) ?? ""), s("input", u);
1684
+ }), i = m(() => n.disabled ? "pointer-events-none filter grayscale opacity-60" : ""), c = ge(n), d = v(null);
1685
+ function f(u) {
1686
+ var p;
1687
+ o("update:modelValue", ((p = u.target) == null ? void 0 : p.value) ?? ""), o("input", u);
1471
1688
  }
1472
1689
  return t({
1473
- el: l
1474
- }), (u, f) => (g(), y("input", {
1690
+ el: d
1691
+ }), (u, p) => (g(), y("input", {
1475
1692
  ref_key: "input",
1476
- ref: l,
1693
+ ref: d,
1477
1694
  value: u.modelValue,
1478
- class: w(["bg-back-2 border px-2 py-1 outline-none", [c(a), c(o), c(i).class]]),
1479
- style: C([c(i).style]),
1695
+ class: w(["bg-back-2 border px-2 py-1 outline-none transition-background-color,border-color,color", [l(s), l(i), l(c).class, l(a).base]]),
1696
+ style: T([l(c).style]),
1480
1697
  placeholder: u.placeholder,
1481
1698
  type: n.password ? "password" : "text",
1482
- onChange: f[0] || (f[0] = (p) => u.$emit("change", p)),
1483
- onInput: d,
1484
- onClick: f[1] || (f[1] = (p) => u.$emit("click", p)),
1485
- onPointerdown: f[2] || (f[2] = (p) => u.$emit("pointerdown", p)),
1486
- onPointerup: f[3] || (f[3] = (p) => u.$emit("pointerup", p))
1487
- }, null, 46, lr));
1699
+ onChange: p[0] || (p[0] = (b) => u.$emit("change", b)),
1700
+ onInput: f,
1701
+ onClick: p[1] || (p[1] = (b) => u.$emit("click", b)),
1702
+ onPointerdown: p[2] || (p[2] = (b) => u.$emit("pointerdown", b)),
1703
+ onPointerup: p[3] || (p[3] = (b) => u.$emit("pointerup", b))
1704
+ }, null, 46, Cr));
1488
1705
  }
1489
- }), cr = {
1706
+ }), Tr = {
1490
1707
  key: 0,
1491
- class: "i-tabler-loader-2 h-5 w-5 shrink-0 animate-spin"
1492
- }, dr = { key: 1 }, fr = { class: "grow-1" }, hr = {
1708
+ class: "i-tabler-loader-2 h-container w-container shrink-0 animate-spin"
1709
+ }, zr = { key: 1 }, Rr = { class: "grow-1" }, Er = {
1493
1710
  key: 1,
1494
- class: "text-sm text-surface-4"
1495
- }, pr = /* @__PURE__ */ S("i", { class: "i-tabler-x" }, null, -1), gr = /* @__PURE__ */ R({
1711
+ class: "text-sm text-surface-container"
1712
+ }, Pr = /* @__PURE__ */ M("i", { class: "i-tabler-x" }, null, -1), Nr = /* @__PURE__ */ $({
1496
1713
  __name: "Notification",
1497
1714
  props: {
1498
1715
  title: {},
@@ -1508,92 +1725,102 @@ const Ir = /* @__PURE__ */ R({
1508
1725
  const t = e, r = m(() => {
1509
1726
  switch (t.color) {
1510
1727
  case "secondary":
1511
- return "bg-secondary-5";
1728
+ return "bg-secondary-container";
1512
1729
  case "tertiary":
1513
- return "bg-tertiary-5";
1730
+ return "bg-tertiary-container";
1514
1731
  case "error":
1515
- return "bg-error-5";
1732
+ return "bg-error-container";
1516
1733
  default:
1517
- return "bg-primary-5";
1734
+ return "bg-primary-container";
1518
1735
  }
1519
1736
  }), n = m(() => {
1520
1737
  switch (t.color) {
1521
1738
  case "secondary":
1522
- return "text-secondary-5";
1739
+ return "text-secondary-container";
1523
1740
  case "tertiary":
1524
- return "text-tertiary-5";
1741
+ return "text-tertiary-container";
1525
1742
  case "error":
1526
- return "text-error-5";
1743
+ return "text-error-container";
1527
1744
  default:
1528
- return "text-primary-5";
1745
+ return "text-primary-container";
1529
1746
  }
1530
1747
  });
1531
- return (s, a) => {
1532
- const o = ct;
1748
+ return (o, a) => {
1749
+ const s = St;
1533
1750
  return g(), y("div", {
1534
- class: w(["relative max-w-100 min-h-16 min-w-80 w-full flex items-center gap-2 container-default rounded p-3", [
1535
- { "border-0": !s.withBorder }
1751
+ class: w(["relative max-w-100 min-h-16 min-w-80 w-full flex items-center gap-2 container-low rounded p-3", [
1752
+ { "border-0": !o.withBorder }
1536
1753
  ]])
1537
1754
  }, [
1538
- s.icon ? (g(), y("div", {
1755
+ o.icon ? (g(), y("div", {
1539
1756
  key: 0,
1540
- class: w(["leading-0", c(n)])
1757
+ class: w(["leading-0", l(n)])
1541
1758
  }, [
1542
- s.loading ? (g(), y("i", cr)) : (g(), y("i", {
1759
+ o.loading ? (g(), y("i", Tr)) : (g(), y("i", {
1543
1760
  key: 1,
1544
- class: w(["h-5 w-5 shrink-0", s.icon])
1761
+ class: w(["h-container w-container shrink-0", o.icon])
1545
1762
  }, null, 2))
1546
- ], 2)) : (g(), y("div", dr, [
1547
- S("div", {
1763
+ ], 2)) : (g(), y("div", zr, [
1764
+ M("div", {
1548
1765
  class: w(["absolute left-[0.25rem] top-[0.25rem] h-[calc(100%-0.5rem)] w-1 rounded-full", [{
1549
- "animate-pulse": s.loading
1550
- }, c(r)]])
1766
+ "animate-pulse": o.loading
1767
+ }, l(r)]])
1551
1768
  }, null, 2)
1552
1769
  ])),
1553
- S("div", fr, [
1554
- s.title ? (g(), y("div", {
1770
+ M("div", Rr, [
1771
+ o.title ? (g(), y("div", {
1555
1772
  key: 0,
1556
- class: w([c(n), "text-base"])
1557
- }, q(s.title), 3)) : $("", !0),
1558
- s.message ? (g(), y("div", hr, q(s.message), 1)) : $("", !0)
1773
+ class: w([l(n), "text-base"])
1774
+ }, re(o.title), 3)) : z("", !0),
1775
+ o.message ? (g(), y("div", Er, re(o.message), 1)) : z("", !0)
1559
1776
  ]),
1560
- s.closeable ? (g(), L(o, {
1777
+ o.closeable ? (g(), D(s, {
1561
1778
  key: 2,
1562
1779
  icon: "",
1563
1780
  variant: "transparent",
1564
- class: "text-white hover:text-white",
1565
- onClick: a[0] || (a[0] = (i) => s.$emit("close"))
1781
+ class: "text-surface-on hover:text-surface-on",
1782
+ onClick: a[0] || (a[0] = (i) => o.$emit("close"))
1566
1783
  }, {
1567
- default: ce(() => [
1568
- pr
1784
+ default: J(() => [
1785
+ Pr
1569
1786
  ]),
1570
1787
  _: 1
1571
- })) : $("", !0)
1788
+ })) : z("", !0)
1572
1789
  ], 2);
1573
1790
  };
1574
1791
  }
1575
- }), Dr = /* @__PURE__ */ R({
1576
- __name: "Modal",
1792
+ }), Hr = ["data-scheme", "data-theme"], Ir = /* @__PURE__ */ $({
1793
+ __name: "ThemeProvider",
1577
1794
  props: {
1578
- modelValue: { type: Boolean, default: !1 },
1795
+ theme: {}
1796
+ },
1797
+ setup(e) {
1798
+ const r = st(e.theme, !1);
1799
+ return (n, o) => (g(), y("div", {
1800
+ style: T([l(r)]),
1801
+ "data-scheme": n.theme.scheme,
1802
+ "data-theme": n.theme.name
1803
+ }, [
1804
+ H(n.$slots, "default")
1805
+ ], 12, Hr));
1806
+ }
1807
+ }), un = /* @__PURE__ */ $({
1808
+ __name: "Modal",
1809
+ props: /* @__PURE__ */ ee({
1579
1810
  persistent: { type: Boolean, default: !1 },
1580
1811
  blur: { type: [String, Boolean] }
1581
- },
1812
+ }, {
1813
+ modelValue: { type: Boolean },
1814
+ modelModifiers: {}
1815
+ }),
1582
1816
  emits: ["update:modelValue"],
1583
- setup(e, { emit: t }) {
1584
- const r = e, n = t, s = m({
1585
- get() {
1586
- return r.modelValue;
1587
- },
1588
- set(l) {
1589
- n("update:modelValue", l);
1590
- }
1591
- }), a = k(null);
1592
- function o(l) {
1593
- r.persistent || l.target === a.value && (s.value = !1);
1817
+ setup(e) {
1818
+ const t = e, r = me(e, "modelValue"), n = v(null);
1819
+ function o(i) {
1820
+ t.persistent || i.target === n.value && (r.value = !1);
1594
1821
  }
1595
- const i = m(() => {
1596
- switch (r.blur) {
1822
+ const a = m(() => {
1823
+ switch (t.blur) {
1597
1824
  case "sm":
1598
1825
  return "backdrop-blur-sm";
1599
1826
  case "md":
@@ -1605,140 +1832,150 @@ const Ir = /* @__PURE__ */ R({
1605
1832
  return "";
1606
1833
  }
1607
1834
  });
1608
- return oe(() => {
1609
- r.modelValue ? (document.body.style.overflow = "hidden", document.body.style.marginRight = "15px") : setTimeout(() => {
1610
- document.body.style.overflow = "", document.body.style.marginRight = "";
1835
+ X(() => {
1836
+ r.value ? document.body.style.overflow = "hidden" : setTimeout(() => {
1837
+ document.querySelector(".modal-wrapper.op100") || (document.body.style.overflow = "", document.body.style.marginRight = "");
1611
1838
  }, 300);
1612
- }), (l, d) => (g(), L(at, { to: "body" }, [
1613
- S("div", {
1614
- ref_key: "wrapperRef",
1615
- ref: a,
1616
- class: w(["fixed left-0 top-0 z-100 h-full w-full flex items-end justify-center bg-surface-10/50 transition-all duration-300 md:items-center", [i.value, {
1617
- "opacity-0 pointer-events-none": !s.value,
1618
- "opacity-100": s.value
1619
- }]]),
1620
- onClick: o
1621
- }, [
1622
- st(ot, {
1623
- "enter-from-class": "translate-y-1/2",
1624
- "enter-to-class": "translate-y-0",
1625
- "leave-from-class": "translate-y-0",
1626
- "leave-to-class": "translate-y-1/2",
1627
- "enter-active-class": "transition ease-out duration-300",
1628
- "leave-active-class": "transition ease-in duration-200"
1629
- }, {
1630
- default: ce(() => [
1631
- s.value ? P(l.$slots, "default", { key: 0 }) : $("", !0)
1839
+ });
1840
+ const s = vr();
1841
+ return (i, c) => {
1842
+ const d = Ir;
1843
+ return g(), D(wt, { to: "body" }, [
1844
+ We(d, { theme: l(s) }, {
1845
+ default: J(() => [
1846
+ M("div", {
1847
+ ref_key: "wrapperRef",
1848
+ ref: n,
1849
+ class: w(["modal-wrapper fixed left-0 top-0 z-100 h-full w-full flex items-end justify-center bg-surface-lowest/50 transition-all duration-300 md:items-center", [a.value, {
1850
+ "op0 pointer-events-none": !r.value,
1851
+ op100: r.value
1852
+ }]]),
1853
+ onClick: o
1854
+ }, [
1855
+ We(_t, {
1856
+ "enter-from-class": "translate-y-1/2",
1857
+ "enter-to-class": "translate-y-0",
1858
+ "leave-from-class": "translate-y-0",
1859
+ "leave-to-class": "translate-y-1/2",
1860
+ "enter-active-class": "transition ease-out duration-300",
1861
+ "leave-active-class": "transition ease-in duration-200"
1862
+ }, {
1863
+ default: J(() => [
1864
+ r.value ? H(i.$slots, "default", { key: 0 }) : z("", !0)
1865
+ ]),
1866
+ _: 3
1867
+ })
1868
+ ], 2)
1632
1869
  ]),
1633
1870
  _: 3
1634
- })
1635
- ], 2)
1636
- ]));
1871
+ }, 8, ["theme"])
1872
+ ]);
1873
+ };
1637
1874
  }
1638
- }), je = /* @__PURE__ */ new Set(), z = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakMap(), mr = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), le = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakSet();
1639
- let I, Se = 0, Ae = 0;
1640
- const V = "__aa_tgt", re = "__aa_del", ue = "__aa_new", br = (e) => {
1641
- const t = xr(e);
1642
- t && t.forEach((r) => kr(r));
1643
- }, vr = (e) => {
1875
+ }), it = /* @__PURE__ */ new Set(), P = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), Or = /* @__PURE__ */ new WeakMap(), oe = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap(), de = /* @__PURE__ */ new WeakSet();
1876
+ let U, Ie = 0, Oe = 0;
1877
+ const L = "__aa_tgt", he = "__aa_del", we = "__aa_new", Br = (e) => {
1878
+ const t = Dr(e);
1879
+ t && t.forEach((r) => jr(r));
1880
+ }, Vr = (e) => {
1644
1881
  e.forEach((t) => {
1645
- t.target === I && wr(), z.has(t.target) && W(t.target);
1882
+ t.target === U && Wr(), P.has(t.target) && Q(t.target);
1646
1883
  });
1647
1884
  };
1648
- function yr(e) {
1649
- const t = we.get(e);
1885
+ function Fr(e) {
1886
+ const t = Re.get(e);
1650
1887
  t == null || t.disconnect();
1651
- let r = z.get(e), n = 0;
1652
- const s = 5;
1653
- r || (r = Q(e), z.set(e, r));
1654
- const { offsetWidth: a, offsetHeight: o } = I, l = [
1655
- r.top - s,
1656
- a - (r.left + s + r.width),
1657
- o - (r.top + s + r.height),
1658
- r.left - s
1659
- ].map((u) => `${-1 * Math.floor(u)}px`).join(" "), d = new IntersectionObserver(() => {
1660
- ++n > 1 && W(e);
1888
+ let r = P.get(e), n = 0;
1889
+ const o = 5;
1890
+ r || (r = ae(e), P.set(e, r));
1891
+ const { offsetWidth: a, offsetHeight: s } = U, c = [
1892
+ r.top - o,
1893
+ a - (r.left + o + r.width),
1894
+ s - (r.top + o + r.height),
1895
+ r.left - o
1896
+ ].map((f) => `${-1 * Math.floor(f)}px`).join(" "), d = new IntersectionObserver(() => {
1897
+ ++n > 1 && Q(e);
1661
1898
  }, {
1662
- root: I,
1899
+ root: U,
1663
1900
  threshold: 1,
1664
- rootMargin: l
1901
+ rootMargin: c
1665
1902
  });
1666
- d.observe(e), we.set(e, d);
1903
+ d.observe(e), Re.set(e, d);
1667
1904
  }
1668
- function W(e) {
1669
- clearTimeout(le.get(e));
1670
- const t = pe(e), r = ne(t) ? 500 : t.duration;
1671
- le.set(e, setTimeout(async () => {
1672
- const n = D.get(e);
1905
+ function Q(e) {
1906
+ clearTimeout(ye.get(e));
1907
+ const t = Me(e), r = pe(t) ? 500 : t.duration;
1908
+ ye.set(e, setTimeout(async () => {
1909
+ const n = K.get(e);
1673
1910
  try {
1674
- await (n == null ? void 0 : n.finished), z.set(e, Q(e)), yr(e);
1911
+ await (n == null ? void 0 : n.finished), P.set(e, ae(e)), Fr(e);
1675
1912
  } catch {
1676
1913
  }
1677
1914
  }, r));
1678
1915
  }
1679
- function wr() {
1680
- clearTimeout(le.get(I)), le.set(I, setTimeout(() => {
1681
- je.forEach((e) => Ue(e, (t) => Ge(() => W(t))));
1916
+ function Wr() {
1917
+ clearTimeout(ye.get(U)), ye.set(U, setTimeout(() => {
1918
+ it.forEach((e) => dt(e, (t) => lt(() => Q(t))));
1682
1919
  }, 100));
1683
1920
  }
1684
- function _r(e) {
1921
+ function Lr(e) {
1685
1922
  setTimeout(() => {
1686
- mr.set(e, setInterval(() => Ge(W.bind(null, e)), 2e3));
1923
+ Or.set(e, setInterval(() => lt(Q.bind(null, e)), 2e3));
1687
1924
  }, Math.round(2e3 * Math.random()));
1688
1925
  }
1689
- function Ge(e) {
1926
+ function lt(e) {
1690
1927
  typeof requestIdleCallback == "function" ? requestIdleCallback(() => e()) : requestAnimationFrame(() => e());
1691
1928
  }
1692
- let _e, G;
1693
- typeof window < "u" && (I = document.documentElement, _e = new MutationObserver(br), G = new ResizeObserver(vr), window.addEventListener("scroll", () => {
1694
- Ae = window.scrollY, Se = window.scrollX;
1695
- }), G.observe(I));
1696
- function xr(e) {
1697
- return e.reduce((n, s) => [
1929
+ let Ee, Z;
1930
+ typeof window < "u" && (U = document.documentElement, Ee = new MutationObserver(Br), Z = new ResizeObserver(Vr), window.addEventListener("scroll", () => {
1931
+ Oe = window.scrollY, Ie = window.scrollX;
1932
+ }), Z.observe(U));
1933
+ function Dr(e) {
1934
+ return e.reduce((n, o) => [
1698
1935
  ...n,
1699
- ...Array.from(s.addedNodes),
1700
- ...Array.from(s.removedNodes)
1701
- ], []).every((n) => n.nodeName === "#comment") ? !1 : e.reduce((n, s) => {
1936
+ ...Array.from(o.addedNodes),
1937
+ ...Array.from(o.removedNodes)
1938
+ ], []).every((n) => n.nodeName === "#comment") ? !1 : e.reduce((n, o) => {
1702
1939
  if (n === !1)
1703
1940
  return !1;
1704
- if (s.target instanceof Element) {
1705
- if (ve(s.target), !n.has(s.target)) {
1706
- n.add(s.target);
1707
- for (let a = 0; a < s.target.children.length; a++) {
1708
- const o = s.target.children.item(a);
1709
- if (o) {
1710
- if (re in o)
1941
+ if (o.target instanceof Element) {
1942
+ if (Ce(o.target), !n.has(o.target)) {
1943
+ n.add(o.target);
1944
+ for (let a = 0; a < o.target.children.length; a++) {
1945
+ const s = o.target.children.item(a);
1946
+ if (s) {
1947
+ if (he in s)
1711
1948
  return !1;
1712
- ve(s.target, o), n.add(o);
1949
+ Ce(o.target, s), n.add(s);
1713
1950
  }
1714
1951
  }
1715
1952
  }
1716
- if (s.removedNodes.length)
1717
- for (let a = 0; a < s.removedNodes.length; a++) {
1718
- const o = s.removedNodes[a];
1719
- if (re in o)
1953
+ if (o.removedNodes.length)
1954
+ for (let a = 0; a < o.removedNodes.length; a++) {
1955
+ const s = o.removedNodes[a];
1956
+ if (he in s)
1720
1957
  return !1;
1721
- o instanceof Element && (n.add(o), ve(s.target, o), Y.set(o, [
1722
- s.previousSibling,
1723
- s.nextSibling
1958
+ s instanceof Element && (n.add(s), Ce(o.target, s), ne.set(s, [
1959
+ o.previousSibling,
1960
+ o.nextSibling
1724
1961
  ]));
1725
1962
  }
1726
1963
  }
1727
1964
  return n;
1728
1965
  }, /* @__PURE__ */ new Set());
1729
1966
  }
1730
- function ve(e, t) {
1731
- !t && !(V in e) ? Object.defineProperty(e, V, { value: e }) : t && !(V in t) && Object.defineProperty(t, V, { value: e });
1967
+ function Ce(e, t) {
1968
+ !t && !(L in e) ? Object.defineProperty(e, L, { value: e }) : t && !(L in t) && Object.defineProperty(t, L, { value: e });
1732
1969
  }
1733
- function kr(e) {
1970
+ function jr(e) {
1734
1971
  var t;
1735
- const r = e.isConnected, n = z.has(e);
1736
- r && Y.has(e) && Y.delete(e), D.has(e) && ((t = D.get(e)) === null || t === void 0 || t.cancel()), ue in e ? He(e) : n && r ? Sr(e) : n && !r ? Ar(e) : He(e);
1972
+ const r = e.isConnected, n = P.has(e);
1973
+ r && ne.has(e) && ne.delete(e), K.has(e) && ((t = K.get(e)) === null || t === void 0 || t.cancel()), we in e ? Ye(e) : n && r ? Ur(e) : n && !r ? Xr(e) : Ye(e);
1737
1974
  }
1738
- function H(e) {
1975
+ function F(e) {
1739
1976
  return Number(e.replace(/[^0-9.\-]/g, ""));
1740
1977
  }
1741
- function Mr(e) {
1978
+ function Gr(e) {
1742
1979
  let t = e.parentElement;
1743
1980
  for (; t; ) {
1744
1981
  if (t.scrollLeft || t.scrollTop)
@@ -1747,8 +1984,8 @@ function Mr(e) {
1747
1984
  }
1748
1985
  return { x: 0, y: 0 };
1749
1986
  }
1750
- function Q(e) {
1751
- const t = e.getBoundingClientRect(), { x: r, y: n } = Mr(e);
1987
+ function ae(e) {
1988
+ const t = e.getBoundingClientRect(), { x: r, y: n } = Gr(e);
1752
1989
  return {
1753
1990
  top: t.top + n,
1754
1991
  left: t.left + r,
@@ -1756,69 +1993,69 @@ function Q(e) {
1756
1993
  height: t.height
1757
1994
  };
1758
1995
  }
1759
- function Xe(e, t, r) {
1760
- let n = t.width, s = t.height, a = r.width, o = r.height;
1996
+ function ct(e, t, r) {
1997
+ let n = t.width, o = t.height, a = r.width, s = r.height;
1761
1998
  const i = getComputedStyle(e);
1762
1999
  if (i.getPropertyValue("box-sizing") === "content-box") {
1763
- const d = H(i.paddingTop) + H(i.paddingBottom) + H(i.borderTopWidth) + H(i.borderBottomWidth), u = H(i.paddingLeft) + H(i.paddingRight) + H(i.borderRightWidth) + H(i.borderLeftWidth);
1764
- n -= u, a -= u, s -= d, o -= d;
2000
+ const d = F(i.paddingTop) + F(i.paddingBottom) + F(i.borderTopWidth) + F(i.borderBottomWidth), f = F(i.paddingLeft) + F(i.paddingRight) + F(i.borderRightWidth) + F(i.borderLeftWidth);
2001
+ n -= f, a -= f, o -= d, s -= d;
1765
2002
  }
1766
- return [n, a, s, o].map(Math.round);
2003
+ return [n, a, o, s].map(Math.round);
1767
2004
  }
1768
- function pe(e) {
1769
- return V in e && K.has(e[V]) ? K.get(e[V]) : { duration: 250, easing: "ease-in-out" };
2005
+ function Me(e) {
2006
+ return L in e && oe.has(e[L]) ? oe.get(e[L]) : { duration: 250, easing: "ease-in-out" };
1770
2007
  }
1771
- function qe(e) {
1772
- if (V in e)
1773
- return e[V];
2008
+ function ut(e) {
2009
+ if (L in e)
2010
+ return e[L];
1774
2011
  }
1775
- function $e(e) {
1776
- const t = qe(e);
1777
- return t ? ee.has(t) : !1;
2012
+ function Be(e) {
2013
+ const t = ut(e);
2014
+ return t ? de.has(t) : !1;
1778
2015
  }
1779
- function Ue(e, ...t) {
1780
- t.forEach((r) => r(e, K.has(e)));
2016
+ function dt(e, ...t) {
2017
+ t.forEach((r) => r(e, oe.has(e)));
1781
2018
  for (let r = 0; r < e.children.length; r++) {
1782
2019
  const n = e.children.item(r);
1783
- n && t.forEach((s) => s(n, K.has(n)));
2020
+ n && t.forEach((o) => o(n, oe.has(n)));
1784
2021
  }
1785
2022
  }
1786
- function Ce(e) {
2023
+ function Ve(e) {
1787
2024
  return Array.isArray(e) ? e : [e];
1788
2025
  }
1789
- function ne(e) {
2026
+ function pe(e) {
1790
2027
  return typeof e == "function";
1791
2028
  }
1792
- function Sr(e) {
1793
- const t = z.get(e), r = Q(e);
1794
- if (!$e(e))
1795
- return z.set(e, r);
2029
+ function Ur(e) {
2030
+ const t = P.get(e), r = ae(e);
2031
+ if (!Be(e))
2032
+ return P.set(e, r);
1796
2033
  let n;
1797
2034
  if (!t)
1798
2035
  return;
1799
- const s = pe(e);
1800
- if (typeof s != "function") {
1801
- const a = t.left - r.left, o = t.top - r.top, [i, l, d, u] = Xe(e, t, r), f = {
1802
- transform: `translate(${a}px, ${o}px)`
2036
+ const o = Me(e);
2037
+ if (typeof o != "function") {
2038
+ const a = t.left - r.left, s = t.top - r.top, [i, c, d, f] = ct(e, t, r), u = {
2039
+ transform: `translate(${a}px, ${s}px)`
1803
2040
  }, p = {
1804
2041
  transform: "translate(0, 0)"
1805
2042
  };
1806
- i !== l && (f.width = `${i}px`, p.width = `${l}px`), d !== u && (f.height = `${d}px`, p.height = `${u}px`), n = e.animate([f, p], {
1807
- duration: s.duration,
1808
- easing: s.easing
2043
+ i !== c && (u.width = `${i}px`, p.width = `${c}px`), d !== f && (u.height = `${d}px`, p.height = `${f}px`), n = e.animate([u, p], {
2044
+ duration: o.duration,
2045
+ easing: o.easing
1809
2046
  });
1810
2047
  } else {
1811
- const [a] = Ce(s(e, "remain", t, r));
2048
+ const [a] = Ve(o(e, "remain", t, r));
1812
2049
  n = new Animation(a), n.play();
1813
2050
  }
1814
- D.set(e, n), z.set(e, r), n.addEventListener("finish", W.bind(null, e));
1815
- }
1816
- function He(e) {
1817
- ue in e && delete e[ue];
1818
- const t = Q(e);
1819
- z.set(e, t);
1820
- const r = pe(e);
1821
- if (!$e(e))
2051
+ K.set(e, n), P.set(e, r), n.addEventListener("finish", Q.bind(null, e));
2052
+ }
2053
+ function Ye(e) {
2054
+ we in e && delete e[we];
2055
+ const t = ae(e);
2056
+ P.set(e, t);
2057
+ const r = Me(e);
2058
+ if (!Be(e))
1822
2059
  return;
1823
2060
  let n;
1824
2061
  if (typeof r != "function")
@@ -1831,43 +2068,43 @@ function He(e) {
1831
2068
  easing: "ease-in"
1832
2069
  });
1833
2070
  else {
1834
- const [s] = Ce(r(e, "add", t));
1835
- n = new Animation(s), n.play();
2071
+ const [o] = Ve(r(e, "add", t));
2072
+ n = new Animation(o), n.play();
1836
2073
  }
1837
- D.set(e, n), n.addEventListener("finish", W.bind(null, e));
2074
+ K.set(e, n), n.addEventListener("finish", Q.bind(null, e));
1838
2075
  }
1839
- function Be(e, t) {
2076
+ function Ke(e, t) {
1840
2077
  var r;
1841
- e.remove(), z.delete(e), Y.delete(e), D.delete(e), (r = we.get(e)) === null || r === void 0 || r.disconnect(), setTimeout(() => {
1842
- if (re in e && delete e[re], Object.defineProperty(e, ue, { value: !0, configurable: !0 }), t && e instanceof HTMLElement)
2078
+ e.remove(), P.delete(e), ne.delete(e), K.delete(e), (r = Re.get(e)) === null || r === void 0 || r.disconnect(), setTimeout(() => {
2079
+ if (he in e && delete e[he], Object.defineProperty(e, we, { value: !0, configurable: !0 }), t && e instanceof HTMLElement)
1843
2080
  for (const n in t)
1844
2081
  e.style[n] = "";
1845
2082
  }, 0);
1846
2083
  }
1847
- function Ar(e) {
2084
+ function Xr(e) {
1848
2085
  var t;
1849
- if (!Y.has(e) || !z.has(e))
2086
+ if (!ne.has(e) || !P.has(e))
1850
2087
  return;
1851
- const [r, n] = Y.get(e);
1852
- Object.defineProperty(e, re, { value: !0, configurable: !0 });
1853
- const s = window.scrollX, a = window.scrollY;
1854
- if (n && n.parentNode && n.parentNode instanceof Element ? n.parentNode.insertBefore(e, n) : r && r.parentNode ? r.parentNode.appendChild(e) : (t = qe(e)) === null || t === void 0 || t.appendChild(e), !$e(e))
1855
- return Be(e);
1856
- const [o, i, l, d] = Cr(e), u = pe(e), f = z.get(e);
1857
- (s !== Se || a !== Ae) && $r(e, s, a, u);
1858
- let p, v = {
2088
+ const [r, n] = ne.get(e);
2089
+ Object.defineProperty(e, he, { value: !0, configurable: !0 });
2090
+ const o = window.scrollX, a = window.scrollY;
2091
+ if (n && n.parentNode && n.parentNode instanceof Element ? n.parentNode.insertBefore(e, n) : r && r.parentNode ? r.parentNode.appendChild(e) : (t = ut(e)) === null || t === void 0 || t.appendChild(e), !Be(e))
2092
+ return Ke(e);
2093
+ const [s, i, c, d] = Yr(e), f = Me(e), u = P.get(e);
2094
+ (o !== Ie || a !== Oe) && qr(e, o, a, f);
2095
+ let p, b = {
1859
2096
  position: "absolute",
1860
- top: `${o}px`,
2097
+ top: `${s}px`,
1861
2098
  left: `${i}px`,
1862
- width: `${l}px`,
2099
+ width: `${c}px`,
1863
2100
  height: `${d}px`,
1864
2101
  margin: "0",
1865
2102
  pointerEvents: "none",
1866
2103
  transformOrigin: "center",
1867
2104
  zIndex: "100"
1868
2105
  };
1869
- if (!ne(u))
1870
- Object.assign(e.style, v), p = e.animate([
2106
+ if (!pe(f))
2107
+ Object.assign(e.style, b), p = e.animate([
1871
2108
  {
1872
2109
  transform: "scale(1)",
1873
2110
  opacity: 1
@@ -1876,84 +2113,84 @@ function Ar(e) {
1876
2113
  transform: "scale(.98)",
1877
2114
  opacity: 0
1878
2115
  }
1879
- ], { duration: u.duration, easing: "ease-out" });
2116
+ ], { duration: f.duration, easing: "ease-out" });
1880
2117
  else {
1881
- const [b, _] = Ce(u(e, "remove", f));
1882
- (_ == null ? void 0 : _.styleReset) !== !1 && (v = (_ == null ? void 0 : _.styleReset) || v, Object.assign(e.style, v)), p = new Animation(b), p.play();
2118
+ const [k, S] = Ve(f(e, "remove", u));
2119
+ (S == null ? void 0 : S.styleReset) !== !1 && (b = (S == null ? void 0 : S.styleReset) || b, Object.assign(e.style, b)), p = new Animation(k), p.play();
1883
2120
  }
1884
- D.set(e, p), p.addEventListener("finish", Be.bind(null, e, v));
2121
+ K.set(e, p), p.addEventListener("finish", Ke.bind(null, e, b));
1885
2122
  }
1886
- function $r(e, t, r, n) {
1887
- const s = Se - t, a = Ae - r, o = document.documentElement.style.scrollBehavior;
1888
- if (getComputedStyle(I).scrollBehavior === "smooth" && (document.documentElement.style.scrollBehavior = "auto"), window.scrollTo(window.scrollX + s, window.scrollY + a), !e.parentElement)
2123
+ function qr(e, t, r, n) {
2124
+ const o = Ie - t, a = Oe - r, s = document.documentElement.style.scrollBehavior;
2125
+ if (getComputedStyle(U).scrollBehavior === "smooth" && (document.documentElement.style.scrollBehavior = "auto"), window.scrollTo(window.scrollX + o, window.scrollY + a), !e.parentElement)
1889
2126
  return;
1890
- const l = e.parentElement;
1891
- let d = l.clientHeight, u = l.clientWidth;
1892
- const f = performance.now();
2127
+ const c = e.parentElement;
2128
+ let d = c.clientHeight, f = c.clientWidth;
2129
+ const u = performance.now();
1893
2130
  function p() {
1894
2131
  requestAnimationFrame(() => {
1895
- if (!ne(n)) {
1896
- const v = d - l.clientHeight, b = u - l.clientWidth;
1897
- f + n.duration > performance.now() ? (window.scrollTo({
1898
- left: window.scrollX - b,
1899
- top: window.scrollY - v
1900
- }), d = l.clientHeight, u = l.clientWidth, p()) : document.documentElement.style.scrollBehavior = o;
2132
+ if (!pe(n)) {
2133
+ const b = d - c.clientHeight, k = f - c.clientWidth;
2134
+ u + n.duration > performance.now() ? (window.scrollTo({
2135
+ left: window.scrollX - k,
2136
+ top: window.scrollY - b
2137
+ }), d = c.clientHeight, f = c.clientWidth, p()) : document.documentElement.style.scrollBehavior = s;
1901
2138
  }
1902
2139
  });
1903
2140
  }
1904
2141
  p();
1905
2142
  }
1906
- function Cr(e) {
1907
- const t = z.get(e), [r, , n] = Xe(e, t, Q(e));
1908
- let s = e.parentElement;
1909
- for (; s && (getComputedStyle(s).position === "static" || s instanceof HTMLBodyElement); )
1910
- s = s.parentElement;
1911
- s || (s = document.body);
1912
- const a = getComputedStyle(s), o = z.get(s) || Q(s), i = Math.round(t.top - o.top) - H(a.borderTopWidth), l = Math.round(t.left - o.left) - H(a.borderLeftWidth);
1913
- return [i, l, r, n];
1914
- }
1915
- function zr(e, t = {}) {
1916
- return _e && G && (window.matchMedia("(prefers-reduced-motion: reduce)").matches && !ne(t) && !t.disrespectUserMotionPreference || (ee.add(e), getComputedStyle(e).position === "static" && Object.assign(e.style, { position: "relative" }), Ue(e, W, _r, (s) => G == null ? void 0 : G.observe(s)), ne(t) ? K.set(e, t) : K.set(e, { duration: 250, easing: "ease-in-out", ...t }), _e.observe(e, { childList: !0 }), je.add(e))), Object.freeze({
2143
+ function Yr(e) {
2144
+ const t = P.get(e), [r, , n] = ct(e, t, ae(e));
2145
+ let o = e.parentElement;
2146
+ for (; o && (getComputedStyle(o).position === "static" || o instanceof HTMLBodyElement); )
2147
+ o = o.parentElement;
2148
+ o || (o = document.body);
2149
+ const a = getComputedStyle(o), s = P.get(o) || ae(o), i = Math.round(t.top - s.top) - F(a.borderTopWidth), c = Math.round(t.left - s.left) - F(a.borderLeftWidth);
2150
+ return [i, c, r, n];
2151
+ }
2152
+ function Kr(e, t = {}) {
2153
+ return Ee && Z && (window.matchMedia("(prefers-reduced-motion: reduce)").matches && !pe(t) && !t.disrespectUserMotionPreference || (de.add(e), getComputedStyle(e).position === "static" && Object.assign(e.style, { position: "relative" }), dt(e, Q, Lr, (o) => Z == null ? void 0 : Z.observe(o)), pe(t) ? oe.set(e, t) : oe.set(e, { duration: 250, easing: "ease-in-out", ...t }), Ee.observe(e, { childList: !0 }), it.add(e))), Object.freeze({
1917
2154
  parent: e,
1918
2155
  enable: () => {
1919
- ee.add(e);
2156
+ de.add(e);
1920
2157
  },
1921
2158
  disable: () => {
1922
- ee.delete(e);
2159
+ de.delete(e);
1923
2160
  },
1924
- isEnabled: () => ee.has(e)
2161
+ isEnabled: () => de.has(e)
1925
2162
  });
1926
2163
  }
1927
- const Rr = {
2164
+ const Qr = {
1928
2165
  mounted: (e, t) => {
1929
- zr(e, t.value || {});
2166
+ Kr(e, t.value || {});
1930
2167
  },
1931
2168
  // ignore ssr see #96:
1932
2169
  getSSRProps: () => ({})
1933
- }, Tr = { class: "absolute z-20 flex flex-col gap-2 p-2" }, Lr = /* @__PURE__ */ R({
2170
+ }, Zr = { class: "fixed z-20 flex flex-col gap-2 p-2" }, dn = /* @__PURE__ */ $({
1934
2171
  __name: "NotificationSystem",
1935
2172
  setup(e) {
1936
- const t = Jt();
2173
+ const t = pr();
1937
2174
  return (r, n) => {
1938
- const s = gr;
1939
- return Ie((g(), y("div", Tr, [
1940
- (g(!0), y(X, null, te(c(t), (a) => (g(), L(s, {
2175
+ const o = Nr;
2176
+ return Je((g(), y("div", Zr, [
2177
+ (g(!0), y(te, null, fe(l(t), (a) => (g(), D(o, {
1941
2178
  key: a.hash,
1942
- "with-border": "",
1943
2179
  closeable: "",
2180
+ "with-border": "",
1944
2181
  title: a.title,
1945
2182
  message: a.message,
1946
2183
  icon: a.icon,
1947
2184
  loading: a.loading,
1948
2185
  color: a.color,
1949
- onClose: (o) => c(t).splice(c(t).indexOf(a), 1)
2186
+ onClose: (s) => l(t).splice(l(t).indexOf(a), 1)
1950
2187
  }, null, 8, ["title", "message", "icon", "loading", "color", "onClose"]))), 128))
1951
2188
  ])), [
1952
- [c(Rr)]
2189
+ [l(Qr)]
1953
2190
  ]);
1954
2191
  };
1955
2192
  }
1956
- }), Er = { class: "flex gap-2" }, Wr = /* @__PURE__ */ R({
2193
+ }), Jr = { class: "flex gap-2" }, fn = /* @__PURE__ */ $({
1957
2194
  __name: "PinInput",
1958
2195
  props: {
1959
2196
  modelValue: {},
@@ -1962,36 +2199,36 @@ const Rr = {
1962
2199
  password: { type: Boolean }
1963
2200
  },
1964
2201
  setup(e) {
1965
- const t = e, r = k([]);
2202
+ const t = e, r = v([]);
1966
2203
  function n(a) {
1967
2204
  a.preventDefault(), a.stopPropagation();
1968
- const o = r.value.findIndex((l) => l.el === a.target), i = a.target.value ?? "";
1969
- a.target.value = "", Array.from(i).forEach((l, d) => {
1970
- o + d >= r.value.length || (r.value[o + d].el.value = l, o + d + 1 < r.value.length ? (r.value[o + d + 1].el.focus(), r.value[o + d + 1].el.select()) : r.value[o + d].el.blur());
2205
+ const s = r.value.findIndex((c) => c.el === a.target), i = a.target.value ?? "";
2206
+ a.target.value = "", Array.from(i).forEach((c, d) => {
2207
+ s + d >= r.value.length || (r.value[s + d].el.value = c, s + d + 1 < r.value.length ? (r.value[s + d + 1].el.focus(), r.value[s + d + 1].el.select()) : r.value[s + d].el.blur());
1971
2208
  });
1972
2209
  }
1973
- function s(a) {
2210
+ function o(a) {
1974
2211
  a.preventDefault(), a.stopPropagation();
1975
- const o = a.target.value !== "";
2212
+ const s = a.target.value !== "";
1976
2213
  a.target.value = "";
1977
- const i = r.value.findIndex((l) => l.el === a.target);
1978
- i !== 0 && (r.value[i - 1].el.focus(), r.value[i - 1].el.select(), o || (r.value[i - 1].el.value = ""));
2214
+ const i = r.value.findIndex((c) => c.el === a.target);
2215
+ i !== 0 && (r.value[i - 1].el.focus(), r.value[i - 1].el.select(), s || (r.value[i - 1].el.value = ""));
1979
2216
  }
1980
- return (a, o) => (g(), y("div", Er, [
1981
- (g(!0), y(X, null, te(t.length, (i) => (g(), L(c(ur), {
2217
+ return (a, s) => (g(), y("div", Jr, [
2218
+ (g(!0), y(te, null, fe(t.length, (i) => (g(), D(l($r), {
1982
2219
  ref_for: !0,
1983
2220
  ref_key: "inputs",
1984
2221
  ref: r,
1985
2222
  key: i,
1986
2223
  class: "h-8 w-8 text-center",
1987
2224
  password: t.password,
1988
- onPointerup: o[0] || (o[0] = (l) => l.target.select()),
1989
- onInput: Oe(n, ["stop", "prevent"]),
1990
- onKeydown: it(s, ["backspace"])
2225
+ onPointerup: s[0] || (s[0] = (c) => c.target.select()),
2226
+ onInput: Ze(n, ["stop", "prevent"]),
2227
+ onKeydown: xt(o, ["backspace"])
1991
2228
  }, null, 8, ["password"]))), 128))
1992
2229
  ]));
1993
2230
  }
1994
- }), jr = /* @__PURE__ */ R({
2231
+ }), hn = /* @__PURE__ */ $({
1995
2232
  __name: "Progress",
1996
2233
  props: {
1997
2234
  value: { default: 0 },
@@ -2006,16 +2243,16 @@ const Rr = {
2006
2243
  const t = e, r = m(() => {
2007
2244
  switch (t.size) {
2008
2245
  case "sm":
2009
- return "h-0.5";
2246
+ return "h-0.25";
2010
2247
  case "md":
2011
- return "h-1";
2248
+ return "h-0.5";
2012
2249
  case "lg":
2013
- return "h-2";
2250
+ return "h-1";
2014
2251
  }
2015
2252
  }), n = m(() => {
2016
2253
  switch (t.color) {
2017
2254
  case "primary":
2018
- return "bg-primary-7";
2255
+ return "bg-primary-container";
2019
2256
  case "secondary":
2020
2257
  return "bg-secondary-7";
2021
2258
  case "tertiary":
@@ -2023,25 +2260,24 @@ const Rr = {
2023
2260
  case "error":
2024
2261
  return "bg-error-7";
2025
2262
  }
2026
- }), s = fe(t);
2027
- return (a, o) => (g(), y("div", {
2028
- class: w(["relative w-full self-center overflow-hidden bg-surface-7", [c(r), c(s).class]]),
2029
- style: C([c(s).style])
2263
+ }), o = ge(t);
2264
+ return (a, s) => (g(), y("div", {
2265
+ class: w(["relative w-full self-center overflow-hidden bg-surface-high transition-background-color,border-color,color", [l(r), l(o).class]]),
2266
+ style: T([l(o).style])
2030
2267
  }, [
2031
2268
  a.loading ? (g(), y("div", {
2032
2269
  key: 1,
2033
- class: w(["loading-progress h-full", [c(n)]])
2270
+ class: w(["loading-progress h-full", [l(n)]])
2034
2271
  }, null, 2)) : (g(), y("div", {
2035
2272
  key: 0,
2036
- class: w(["h-full", [c(n)]]),
2037
- style: C([{
2273
+ class: w(["h-full", [l(n)]]),
2274
+ style: T([{
2038
2275
  width: `${(a.value - a.min) / (a.max - a.min) * 100}%`
2039
2276
  }])
2040
2277
  }, null, 6))
2041
2278
  ], 6));
2042
2279
  }
2043
- });
2044
- const Nr = { class: "relative" }, Gr = /* @__PURE__ */ R({
2280
+ }), en = { class: "relative" }, pn = /* @__PURE__ */ $({
2045
2281
  __name: "Indicator",
2046
2282
  props: {
2047
2283
  color: { default: "primary" },
@@ -2061,7 +2297,7 @@ const Nr = { class: "relative" }, Gr = /* @__PURE__ */ R({
2061
2297
  default:
2062
2298
  return typeof t.size == "number" || !Number.isNaN(Number(t.size)) ? `w-${t.size} h-${t.size}` : t.size;
2063
2299
  }
2064
- }), n = lt(), s = m(() => {
2300
+ }), n = kt(), o = m(() => {
2065
2301
  if (!n.label)
2066
2302
  return "";
2067
2303
  switch (t.size) {
@@ -2083,69 +2319,64 @@ const Nr = { class: "relative" }, Gr = /* @__PURE__ */ R({
2083
2319
  case "bottom-right":
2084
2320
  return "bottom-0 right-0 translate-x-1/2 translate-y-1/2";
2085
2321
  }
2086
- }), o = m(() => {
2322
+ }), s = m(() => {
2087
2323
  switch (t.color) {
2088
2324
  case "primary":
2089
- return "bg-primary-7";
2325
+ return "bg-primary-container text-primary-on";
2090
2326
  case "secondary":
2091
- return "bg-secondary-7";
2327
+ return "bg-secondary-container text-secondary-on";
2092
2328
  case "tertiary":
2093
- return "bg-tertiary-7";
2329
+ return "bg-tertiary-container text-tertiary-on";
2094
2330
  case "error":
2095
- return "bg-error-7";
2331
+ return "bg-error-container text-error-on";
2096
2332
  }
2097
2333
  });
2098
- return (i, l) => (g(), y("div", Nr, [
2099
- S("div", {
2100
- class: w([[c(a), c(s)], "absolute z-1"])
2334
+ return (i, c) => (g(), y("div", en, [
2335
+ M("div", {
2336
+ class: w([[l(a), l(o)], "absolute z-1"])
2101
2337
  }, [
2102
2338
  t.ping ? (g(), y("div", {
2103
2339
  key: 0,
2104
- class: w(["absolute animate-ping rounded-full", [
2340
+ class: w(["absolute animate-ping rounded-full border-2 border-transparent box-content", [
2105
2341
  {
2106
- [c(r)]: !i.$slots.label
2342
+ [l(r)]: !i.$slots.label
2107
2343
  },
2108
- c(o)
2344
+ l(s)
2109
2345
  ]])
2110
2346
  }, [
2111
- i.$slots.label ? P(i.$slots, "label", { key: 0 }) : $("", !0)
2112
- ], 2)) : $("", !0),
2113
- S("div", {
2114
- class: w(["top-0 rounded-full", [
2347
+ i.$slots.label ? H(i.$slots, "label", { key: 0 }) : z("", !0)
2348
+ ], 2)) : z("", !0),
2349
+ M("div", {
2350
+ class: w(["top-0 rounded-full border-2 border-surface-low box-content", [
2115
2351
  {
2116
- [c(r)]: !i.$slots.label
2352
+ [l(r)]: !i.$slots.label
2117
2353
  },
2118
- c(o)
2354
+ l(s)
2119
2355
  ]])
2120
2356
  }, [
2121
- i.$slots.label ? P(i.$slots, "label", { key: 0 }) : $("", !0)
2357
+ i.$slots.label ? H(i.$slots, "label", { key: 0 }) : z("", !0)
2122
2358
  ], 2)
2123
2359
  ], 2),
2124
- P(i.$slots, "default")
2360
+ H(i.$slots, "default")
2125
2361
  ]));
2126
2362
  }
2127
- }), Xr = /* @__PURE__ */ R({
2363
+ }), mn = /* @__PURE__ */ $({
2128
2364
  __name: "Chip",
2129
- props: {
2365
+ props: /* @__PURE__ */ ee({
2130
2366
  is: { default: "img" },
2131
2367
  src: {},
2132
2368
  size: { default: "md" },
2133
2369
  style: {},
2134
2370
  class: {},
2135
- modelValue: { type: Boolean },
2136
2371
  rounded: { default: "full" }
2137
- },
2372
+ }, {
2373
+ modelValue: { type: Boolean, default: void 0 },
2374
+ modelModifiers: {}
2375
+ }),
2138
2376
  emits: ["update:modelValue"],
2139
- setup(e, { emit: t }) {
2140
- const r = e, n = t, s = m({
2141
- get() {
2142
- return r.modelValue;
2143
- },
2144
- set(u) {
2145
- n("update:modelValue", u);
2146
- }
2147
- }), a = fe(r), o = m(() => {
2148
- switch (r.size) {
2377
+ setup(e) {
2378
+ const t = e, r = me(e, "modelValue"), n = ge(t), o = m(() => {
2379
+ switch (t.size) {
2149
2380
  case "sm":
2150
2381
  return "px-3 text-sm h-6";
2151
2382
  case "md":
@@ -2153,18 +2384,18 @@ const Nr = { class: "relative" }, Gr = /* @__PURE__ */ R({
2153
2384
  case "lg":
2154
2385
  return "px-8 h-10 text-lg";
2155
2386
  }
2156
- }), i = m(() => s.value ? "container-filled-primary" : "container-default"), l = m(() => s.value !== void 0), d = m(() => l.value ? "cursor-pointer" : "");
2157
- return (u, f) => (g(), y("span", {
2158
- class: w(["inline-flex items-center gap-1", [c(a).class, c(o), c(i), c(d)]]),
2159
- style: C([c(a).style]),
2160
- onPointerup: f[0] || (f[0] = (p) => u.$emit("update:modelValue", !u.modelValue))
2387
+ }), a = m(() => r.value ? "container-filled-primary border-transparent" : "container-base"), s = m(() => r.value !== void 0), i = m(() => s.value ? "cursor-pointer" : "");
2388
+ return (c, d) => (g(), y("span", {
2389
+ class: w(["inline-flex items-center gap-1", [l(n).class, l(o), l(a), l(i)]]),
2390
+ style: T([l(n).style]),
2391
+ onPointerup: d[0] || (d[0] = (f) => l(s) && (r.value = !r.value))
2161
2392
  }, [
2162
- u.$slots.leftSection ? P(u.$slots, "leftSection", { key: 0 }) : $("", !0),
2163
- P(u.$slots, "default"),
2164
- u.$slots.rightSection ? P(u.$slots, "rightSection", { key: 1 }) : $("", !0)
2393
+ c.$slots.leftSection ? H(c.$slots, "leftSection", { key: 0 }) : z("", !0),
2394
+ H(c.$slots, "default"),
2395
+ c.$slots.rightSection ? H(c.$slots, "rightSection", { key: 1 }) : z("", !0)
2165
2396
  ], 38));
2166
2397
  }
2167
- }), qr = /* @__PURE__ */ R({
2398
+ }), gn = /* @__PURE__ */ $({
2168
2399
  __name: "Avatar",
2169
2400
  props: {
2170
2401
  is: { default: "img" },
@@ -2185,46 +2416,106 @@ const Nr = { class: "relative" }, Gr = /* @__PURE__ */ R({
2185
2416
  default:
2186
2417
  return typeof t.size == "number" || !Number.isNaN(Number(t.size)) ? `--size: ${t.size}rem;` : `--size: ${t.size};`;
2187
2418
  }
2188
- }), n = k(!1);
2189
- return (s, a) => (g(), y(X, null, [
2190
- s.src ? (g(), L(xe(s.is), {
2419
+ }), n = v(!1), o = v(null);
2420
+ function a() {
2421
+ n.value = !0;
2422
+ }
2423
+ return se(() => {
2424
+ var s;
2425
+ (s = o.value) != null && s.complete && a();
2426
+ }), (s, i) => (g(), y(te, null, [
2427
+ s.src ? (g(), D(_e(s.is), Pe({
2191
2428
  key: 0,
2192
- style: C([s.style, c(r)]),
2429
+ ref_key: "img",
2430
+ ref: o,
2431
+ style: [s.style, l(r)],
2193
2432
  placeholder: "",
2194
2433
  src: s.src,
2195
- class: w(["h-[var(--size)] w-[var(--size)] rounded-full object-cover", [{ hidden: !c(n) }, t.class]]),
2196
- onLoad: a[0] || (a[0] = (o) => n.value = !0)
2197
- }, null, 40, ["style", "src", "class"])) : $("", !0),
2198
- c(n) ? $("", !0) : (g(), y("img", {
2434
+ class: ["h-[var(--size)] w-[var(--size)] rounded-full object-cover", [{ hidden: !l(n) }, t.class]]
2435
+ }, s.$attrs, { onLoad: a }), null, 16, ["style", "src", "class"])) : z("", !0),
2436
+ l(n) ? z("", !0) : (g(), y("div", {
2199
2437
  key: 1,
2200
- class: "h-[var(--size)] w-[var(--size)] animate-pulse rounded-full bg-surface-5 object-cover",
2201
- style: C([s.style, c(r)])
2438
+ class: "h-[var(--size)] w-[var(--size)] animate-pulse rounded-full bg-surface-high object-cover border-transparent",
2439
+ style: T([s.style, l(r)])
2202
2440
  }, null, 4))
2203
2441
  ], 64));
2204
2442
  }
2443
+ }), bn = /* @__PURE__ */ $({
2444
+ __name: "ThemeSwitch",
2445
+ setup(e) {
2446
+ const t = v(void 0);
2447
+ return X(() => {
2448
+ be && (t.value === !0 ? (document.documentElement.setAttribute("data-scheme", "dark"), localStorage.setItem("scheme", "dark")) : t.value === !1 && (document.documentElement.setAttribute("data-scheme", "light"), localStorage.setItem("scheme", "light")));
2449
+ }), se(() => {
2450
+ if (be) {
2451
+ const r = localStorage.getItem("scheme");
2452
+ r === "dark" ? t.value = !0 : r === "light" ? t.value = !1 : t.value = window.matchMedia("(prefers-color-scheme: dark)").matches;
2453
+ }
2454
+ }), (r, n) => {
2455
+ const o = Lt;
2456
+ return g(), D(o, {
2457
+ modelValue: l(t),
2458
+ "onUpdate:modelValue": n[0] || (n[0] = (a) => Mt(t) ? t.value = a : null),
2459
+ color: "secondary",
2460
+ "on-icon": "i-tabler-moon",
2461
+ "off-icon": "i-tabler-sun"
2462
+ }, null, 8, ["modelValue"]);
2463
+ };
2464
+ }
2465
+ }), vn = /* @__PURE__ */ $({
2466
+ __name: "Paper",
2467
+ props: {
2468
+ size: { default: "md" },
2469
+ rounded: { default: "md" },
2470
+ withBorder: { type: Boolean, default: !1 },
2471
+ is: { default: "div" }
2472
+ },
2473
+ setup(e) {
2474
+ const r = ge(e);
2475
+ return (n, o) => (g(), D(_e(n.is), {
2476
+ class: w(["container-low rounded-lg p-4", [
2477
+ {
2478
+ "border-transparent": !n.withBorder
2479
+ },
2480
+ l(r).class
2481
+ ]]),
2482
+ style: T([l(r).style])
2483
+ }, {
2484
+ default: J(() => [
2485
+ H(n.$slots, "default")
2486
+ ]),
2487
+ _: 3
2488
+ }, 8, ["class", "style"]));
2489
+ }
2205
2490
  });
2206
- function Ur() {
2207
- return ut("theme");
2208
- }
2209
2491
  export {
2210
- qr as Avatar,
2211
- ct as Btn,
2212
- Xr as Chip,
2213
- Gr as Indicator,
2214
- Dr as Modal,
2215
- gr as Notification,
2216
- Lr as NotificationSystem,
2217
- Or as Notifications,
2218
- Wr as PinInput,
2219
- jr as Progress,
2220
- Ir as RokuProvider,
2221
- Fr as Select,
2222
- Hr as Slider,
2223
- Br as Switch,
2224
- ur as TextField,
2225
- se as darkTheme,
2226
- Vr as notificationsSymbol,
2227
- Zt as themeColors,
2228
- Jt as useNotifications,
2229
- Ur as useTheme
2492
+ gn as Avatar,
2493
+ St as Btn,
2494
+ mn as Chip,
2495
+ pn as Indicator,
2496
+ un as Modal,
2497
+ Nr as Notification,
2498
+ dn as NotificationSystem,
2499
+ on as Notifications,
2500
+ vn as Paper,
2501
+ fn as PinInput,
2502
+ hn as Progress,
2503
+ ln as RokuProvider,
2504
+ cn as Select,
2505
+ rn as Slider,
2506
+ Lt as Switch,
2507
+ $r as TextField,
2508
+ Ir as ThemeProvider,
2509
+ bn as ThemeSwitch,
2510
+ Te as darkTheme,
2511
+ an as generateColors,
2512
+ gr as generateColorsMap,
2513
+ hr as lightTheme,
2514
+ nn as notificationsSymbol,
2515
+ ot as themeColors,
2516
+ vr as useCurrentTheme,
2517
+ sn as useCurrentThemeScheme,
2518
+ pr as useNotifications,
2519
+ br as useRootTheme,
2520
+ st as useThemeStyles
2230
2521
  };