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