@roku-ui/vue 0.1.0 → 0.1.1

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