@elmethis/vue 0.13.0 → 0.14.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/lib/index.vue.mjs
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import "@elmethis/core/tokens.css";
|
|
2
2
|
import { Fragment as e, computed as t, createTextVNode as n, createVNode as r, defineComponent as i, h as a, inject as o, isVNode as s, mergeProps as c, normalizeStyle as l, onBeforeUnmount as u, onMounted as d, onUnmounted as f, provide as p, ref as m, shallowRef as h, useId as g, watch as _ } from "vue";
|
|
3
3
|
import { Catalog as ee, ComponentContext as te, MessageProcessor as v } from "@a2ui/web_core/v0_9";
|
|
4
|
-
import { AudioPlayerApi as ne, BASIC_COMPONENTS as
|
|
5
|
-
import { clsx as
|
|
6
|
-
import { useClipboard as
|
|
4
|
+
import { AudioPlayerApi as ne, BASIC_COMPONENTS as re, BASIC_FUNCTIONS as y, ButtonApi as ie, CardApi as ae, CheckBoxApi as oe, ChoicePickerApi as se, ColumnApi as ce, DateTimeInputApi as le, DividerApi as ue, IconApi as de, ImageApi as fe, ListApi as pe, ModalApi as me, RowApi as he, SliderApi as ge, TabsApi as _e, TextApi as ve, TextFieldApi as ye, VideoApi as be } from "@a2ui/web_core/v0_9/basic_catalog";
|
|
5
|
+
import { clsx as b } from "clsx";
|
|
6
|
+
import { useClipboard as xe, useClipboardItems as Se, useVModel as Ce } from "@vueuse/core";
|
|
7
7
|
import "zod";
|
|
8
|
-
import { renderToString as
|
|
9
|
-
import { mdiAlert as
|
|
10
|
-
import { AudioApi as
|
|
11
|
-
import { codeToHtml as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { marked as
|
|
15
|
-
var
|
|
8
|
+
import { renderToString as we } from "katex";
|
|
9
|
+
import { mdiAlert as Te, mdiAlertCircleOutline as Ee, mdiAlertOctagram as De, mdiApplicationOutline as Oe, mdiArrowDownDropCircleOutline as ke, mdiCheckCircle as Ae, mdiCheckCircleOutline as je, mdiChevronRight as Me, mdiClipboardCheckOutline as Ne, mdiClipboardOutline as Pe, mdiCodeTags as Fe, mdiDownload as Ie, mdiEyeOffOutline as Le, mdiEyeOutline as Re, mdiFastForward10 as ze, mdiFile as Be, mdiFolderOpen as Ve, mdiFormatColorFill as He, mdiFormatQuoteClose as Ue, mdiFormatQuoteOpen as We, mdiHexadecimal as Ge, mdiHome as Ke, mdiInformation as qe, mdiLightbulbOn as Je, mdiLinkVariant as Ye, mdiMenuDown as Xe, mdiMessageImageOutline as Ze, mdiMusicNote as Qe, mdiOpenInNew as $e, mdiPause as et, mdiPlay as tt, mdiPlus as nt, mdiRewind10 as rt, mdiShieldAlert as it, mdiText as at, mdiTextLong as ot, mdiTrashCanOutline as st, mdiVolumeHigh as ct, mdiVolumeLow as lt, mdiVolumeMedium as ut, mdiVolumeOff as dt } from "@mdi/js";
|
|
10
|
+
import { AudioApi as ft, BlockImageApi as pt, BlockQuoteApi as mt, BookmarkApi as ht, CalloutApi as gt, CodeBlockApi as _t, ColumnApi as vt, ColumnListApi as yt, ContentTabApi as bt, ContentTabsApi as xt, DividerApi as St, FileApi as Ct, HeadingApi as wt, HtmlApi as Tt, IconApi as Et, KatexApi as Dt, LANGUAGES as Ot, LinkTextApi as kt, ListApi as At, ListItemApi as jt, MermaidApi as Mt, NotionCalloutApi as Nt, ParagraphApi as Pt, RichTextApi as Ft, TableApi as It, TableCellApi as Lt, TableRowApi as Rt, ToggleApi as zt, UnsupportedApi as Bt, VideoApi as Vt, languageIcons as Ht, normalizeLanguage as Ut } from "@elmethis/core";
|
|
11
|
+
import { codeToHtml as Wt } from "shiki";
|
|
12
|
+
import Gt from "@46ki75/ikuma-theme/dark";
|
|
13
|
+
import Kt from "@46ki75/ikuma-theme/light";
|
|
14
|
+
import { marked as qt } from "marked";
|
|
15
|
+
var x = {
|
|
16
16
|
"elm-tabs": "_elm-tabs_whoym_1",
|
|
17
17
|
"tab-container": "_tab-container_whoym_13",
|
|
18
18
|
tab: "_tab_whoym_13",
|
|
19
19
|
active: "_active_whoym_41",
|
|
20
20
|
"tab-content": "_tab-content_whoym_52",
|
|
21
21
|
"tab-content-inner": "_tab-content-inner_whoym_57"
|
|
22
|
-
},
|
|
22
|
+
}, S = {
|
|
23
23
|
"elm-collapse": "_elm-collapse_12wiu_1",
|
|
24
24
|
row: "_row_12wiu_5",
|
|
25
25
|
open: "_open_12wiu_11",
|
|
@@ -44,16 +44,16 @@ var S = {
|
|
|
44
44
|
},
|
|
45
45
|
setup(e, { slots: t }) {
|
|
46
46
|
return () => r("div", {
|
|
47
|
-
class:
|
|
47
|
+
class: b(S["elm-collapse"], e.isOpen && S.open, e.direction === "row" && S.row, e.direction === "column" && S.column, e.direction === "both" && S.both),
|
|
48
48
|
style: { "--elmethis-scoped-transition-timing-function": e.transitionTimingFunction }
|
|
49
|
-
}, [r("div", { class:
|
|
49
|
+
}, [r("div", { class: S.inner }, [t.default?.()])]);
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
52
|
//#endregion
|
|
53
53
|
//#region src/hooks/use-bindable-signal.ts
|
|
54
54
|
function Yt(e) {
|
|
55
55
|
let { props: t, key: n, emit: r, defaultValue: i } = e;
|
|
56
|
-
return
|
|
56
|
+
return Ce(t, n, r, {
|
|
57
57
|
passive: !0,
|
|
58
58
|
defaultValue: i
|
|
59
59
|
});
|
|
@@ -95,12 +95,12 @@ var Xt = Symbol("elm.tabs"), Zt = (e) => {
|
|
|
95
95
|
get transitionTimingFunction() {
|
|
96
96
|
return e.transitionTimingFunction;
|
|
97
97
|
}
|
|
98
|
-
}), () => r("div", { class: x
|
|
98
|
+
}), () => r("div", { class: b(x["elm-tabs"]) }, [n.default?.()]);
|
|
99
99
|
}
|
|
100
100
|
}), $t = /* @__PURE__ */ i({
|
|
101
101
|
name: "ElmTabList",
|
|
102
102
|
setup(e, { slots: t }) {
|
|
103
|
-
return () => r("div", { class: x
|
|
103
|
+
return () => r("div", { class: b(x["tab-container"]) }, [t.default?.()]);
|
|
104
104
|
}
|
|
105
105
|
}), en = /* @__PURE__ */ i({
|
|
106
106
|
name: "ElmTab",
|
|
@@ -111,7 +111,7 @@ var Xt = Symbol("elm.tabs"), Zt = (e) => {
|
|
|
111
111
|
setup(e, { slots: t }) {
|
|
112
112
|
let n = Zt(o(Xt));
|
|
113
113
|
return () => r("div", {
|
|
114
|
-
class: x
|
|
114
|
+
class: b(x.tab, n.selectedValue.value === e.value && x.active),
|
|
115
115
|
onClick: () => n.setSelectedValue(e.value)
|
|
116
116
|
}, [t.default?.()]);
|
|
117
117
|
}
|
|
@@ -123,11 +123,11 @@ var Xt = Symbol("elm.tabs"), Zt = (e) => {
|
|
|
123
123
|
} },
|
|
124
124
|
setup(e, { slots: t }) {
|
|
125
125
|
let n = Zt(o(Xt));
|
|
126
|
-
return () => r("div", { class: x
|
|
126
|
+
return () => r("div", { class: b(x["tab-content"]) }, [r(Jt, {
|
|
127
127
|
direction: "row",
|
|
128
128
|
isOpen: n.selectedValue.value === e.value,
|
|
129
129
|
transitionTimingFunction: n.transitionTimingFunction
|
|
130
|
-
}, { default: () => [r("div", { class:
|
|
130
|
+
}, { default: () => [r("div", { class: x["tab-content-inner"] }, [t.default?.()])] })]);
|
|
131
131
|
}
|
|
132
132
|
}), nn = {
|
|
133
133
|
"elm-heading": "_elm-heading_1fuld_1",
|
|
@@ -153,7 +153,7 @@ var Xt = Symbol("elm.tabs"), Zt = (e) => {
|
|
|
153
153
|
return () => {
|
|
154
154
|
let { class: a, ...o } = t;
|
|
155
155
|
return r("span", c({
|
|
156
|
-
class:
|
|
156
|
+
class: b(rn["elm-fragment-identifier"], a),
|
|
157
157
|
onClick: () => i(e.id)
|
|
158
158
|
}, o), [n("#")]);
|
|
159
159
|
};
|
|
@@ -183,7 +183,7 @@ var Xt = Symbol("elm.tabs"), Zt = (e) => {
|
|
|
183
183
|
},
|
|
184
184
|
setup(e, { slots: t }) {
|
|
185
185
|
return () => r(`h${e.level}`, {
|
|
186
|
-
class:
|
|
186
|
+
class: b(nn["elm-heading"], C.text, nn[`h${e.level}`]),
|
|
187
187
|
style: { "--elmethis-scoped-font-size": `${on[e.level]}em` },
|
|
188
188
|
id: e.id
|
|
189
189
|
}, { default: () => [
|
|
@@ -233,7 +233,7 @@ var Xt = Symbol("elm.tabs"), Zt = (e) => {
|
|
|
233
233
|
setup(e, { attrs: t }) {
|
|
234
234
|
return () => {
|
|
235
235
|
let { class: n, ...i } = t;
|
|
236
|
-
return r("span", c({ class:
|
|
236
|
+
return r("span", c({ class: b(ln["elm-inline-icon"], n) }, i), [r("img", {
|
|
237
237
|
src: e.src,
|
|
238
238
|
alt: e.alt,
|
|
239
239
|
class: ln["elm-inline-icon"],
|
|
@@ -319,7 +319,7 @@ var Xt = Symbol("elm.tabs"), Zt = (e) => {
|
|
|
319
319
|
})(), s = r("strong", null, [s])), e.code && ((function() {
|
|
320
320
|
return s;
|
|
321
321
|
})(), s = r("code", { class: cn.code }, [s])), e.ruby && (s = r("ruby", { class: cn["elm-inline-text"] }, [r("span", null, [s]), r("rt", null, [e.ruby])])), r("span", c({
|
|
322
|
-
class:
|
|
322
|
+
class: b(cn["elm-inline-text"], C.text, i),
|
|
323
323
|
style: [a, {
|
|
324
324
|
"--elmethis-scoped-color": e.color,
|
|
325
325
|
"--elmethis-scoped-font-size": e.size,
|
|
@@ -345,7 +345,7 @@ var Xt = Symbol("elm.tabs"), Zt = (e) => {
|
|
|
345
345
|
return () => {
|
|
346
346
|
let { class: i, style: a, ...o } = t;
|
|
347
347
|
return r("p", c({
|
|
348
|
-
class:
|
|
348
|
+
class: b(un["elm-paragraph"], C.text, i),
|
|
349
349
|
style: [a, {
|
|
350
350
|
"--elmethis-scoped-color": e.color,
|
|
351
351
|
"--elmethis-scoped-background-color": e.backgroundColor
|
|
@@ -498,11 +498,11 @@ function Sn(e) {
|
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
500
|
var Cn = new gn([
|
|
501
|
-
D(
|
|
501
|
+
D(ve, ({ props: e, resolve: t }) => {
|
|
502
502
|
let n = t(e.text), i = e.variant ?? "body";
|
|
503
503
|
return i === "caption" ? r(T, null, bn(n) ? n : { default: () => [n] }) : i === "body" ? r(dn, null, bn(n) ? n : { default: () => [n] }) : r(sn, { level: Sn(i) }, bn(n) ? n : { default: () => [n] });
|
|
504
504
|
}),
|
|
505
|
-
D(
|
|
505
|
+
D(he, ({ props: e, childRefs: t, renderChild: n }) => r("div", {
|
|
506
506
|
class: E.row,
|
|
507
507
|
style: {
|
|
508
508
|
justifyContent: _n[e.justify ?? "start"],
|
|
@@ -512,31 +512,31 @@ var Cn = new gn([
|
|
|
512
512
|
key: `${e}:${i}`,
|
|
513
513
|
class: E["child-wrap"]
|
|
514
514
|
}, [n(e, t, i)]))])),
|
|
515
|
-
D(
|
|
515
|
+
D(ce, ({ props: e, childRefs: t, renderChild: n }) => r("div", { class: E.column }, [t(e.children).map(({ id: e, path: t }, i) => r("span", {
|
|
516
516
|
key: `${e}:${i}`,
|
|
517
517
|
class: E["child-wrap"]
|
|
518
518
|
}, [n(e, t, i)]))])),
|
|
519
|
-
D(
|
|
519
|
+
D(pe, ({ props: e, childRefs: t, renderChild: n }) => r("div", { class: b(E.list, e.direction === "horizontal" && E["list-horizontal"]) }, [t(e.children).map(({ id: e, path: t }, i) => r("div", {
|
|
520
520
|
key: `${e}:${i}`,
|
|
521
521
|
class: E["list-item"]
|
|
522
522
|
}, [n(e, t, i)]))])),
|
|
523
|
-
D(
|
|
524
|
-
D(
|
|
523
|
+
D(ae, ({ props: e, renderChild: t }) => r("div", { class: E.card }, [t(e.child)])),
|
|
524
|
+
D(ie, ({ props: e, renderChild: t, dispatchAction: n }) => r("div", {
|
|
525
525
|
role: "button",
|
|
526
526
|
tabindex: 0,
|
|
527
|
-
class:
|
|
527
|
+
class: b(E.button, e.variant === "primary" && E["button-primary"]),
|
|
528
528
|
onClick: e.action ? () => n("action") : void 0,
|
|
529
529
|
onKeydown: e.action ? (e) => {
|
|
530
530
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), n("action"));
|
|
531
531
|
} : void 0
|
|
532
532
|
}, [t(e.child)])),
|
|
533
|
-
D(
|
|
533
|
+
D(fe, ({ props: e, resolve: t }) => r("img", {
|
|
534
534
|
class: E.image,
|
|
535
535
|
src: t(e.url),
|
|
536
536
|
alt: e.description ? t(e.description) : "",
|
|
537
537
|
style: { objectFit: yn[e.fit ?? "cover"] }
|
|
538
538
|
}, null)),
|
|
539
|
-
D(
|
|
539
|
+
D(de, ({ props: e, resolve: t }) => {
|
|
540
540
|
let n = t(e.name);
|
|
541
541
|
return r("span", {
|
|
542
542
|
class: E.icon,
|
|
@@ -544,11 +544,11 @@ var Cn = new gn([
|
|
|
544
544
|
"data-icon": n
|
|
545
545
|
}, null);
|
|
546
546
|
}),
|
|
547
|
-
D(
|
|
548
|
-
class:
|
|
547
|
+
D(ue, ({ props: e }) => r("div", {
|
|
548
|
+
class: b(E.divider, e.axis === "vertical" && E["divider-vertical"]),
|
|
549
549
|
role: "separator"
|
|
550
550
|
}, null)),
|
|
551
|
-
D(
|
|
551
|
+
D(ye, ({ props: e, resolve: t, setBinding: n }) => {
|
|
552
552
|
let i = e.variant ?? "shortText", a = e.value ? t(e.value) : "";
|
|
553
553
|
return r("div", { class: E["text-field"] }, [r("label", { class: E.label }, [t(e.label)]), i === "longText" ? r("textarea", {
|
|
554
554
|
class: E.input,
|
|
@@ -563,7 +563,7 @@ var Cn = new gn([
|
|
|
563
563
|
onChange: (e) => n("value", e.target.value)
|
|
564
564
|
}, null)]);
|
|
565
565
|
}),
|
|
566
|
-
D(
|
|
566
|
+
D(oe, ({ props: e, ctx: t, resolve: n, setBinding: i }) => {
|
|
567
567
|
let a = e.value, o = typeof a == "boolean" ? a : !!(t.dataContext.resolveDynamicValue(a) ?? !1);
|
|
568
568
|
return r("label", { class: E.checkbox }, [r("input", {
|
|
569
569
|
type: "checkbox",
|
|
@@ -571,7 +571,7 @@ var Cn = new gn([
|
|
|
571
571
|
onChange: (e) => i("value", e.target.checked)
|
|
572
572
|
}, null), r("span", { class: E["checkbox-label"] }, [n(e.label)])]);
|
|
573
573
|
}),
|
|
574
|
-
D(
|
|
574
|
+
D(ge, ({ props: e, ctx: t, setBinding: n }) => {
|
|
575
575
|
let i = e.value, a = typeof i == "number" ? i : Number(t.dataContext.resolveDynamicValue(i) ?? 0);
|
|
576
576
|
return r("input", {
|
|
577
577
|
class: E.slider,
|
|
@@ -583,7 +583,7 @@ var Cn = new gn([
|
|
|
583
583
|
onChange: (e) => n("value", Number(e.target.value))
|
|
584
584
|
}, null);
|
|
585
585
|
}),
|
|
586
|
-
D(
|
|
586
|
+
D(_e, ({ props: e, resolve: t, renderChild: n }) => {
|
|
587
587
|
let i;
|
|
588
588
|
return r(Qt, { defaultValue: "0" }, { default: () => [r($t, null, bn(i = e.tabs.map((e, n) => {
|
|
589
589
|
let i;
|
|
@@ -599,8 +599,8 @@ var Cn = new gn([
|
|
|
599
599
|
}, bn(i = n(e.child)) ? i : { default: () => [i] });
|
|
600
600
|
})] });
|
|
601
601
|
}),
|
|
602
|
-
D(
|
|
603
|
-
D(
|
|
602
|
+
D(me, ({ props: e, renderChild: t }) => r("div", { class: E.modal }, [t(e.trigger), r("div", { class: E["modal-content"] }, [t(e.content)])])),
|
|
603
|
+
D(be, ({ props: e, resolve: t }) => r("video", {
|
|
604
604
|
class: E.video,
|
|
605
605
|
controls: !0,
|
|
606
606
|
src: t(e.url)
|
|
@@ -610,7 +610,7 @@ var Cn = new gn([
|
|
|
610
610
|
controls: !0,
|
|
611
611
|
src: t(e.url)
|
|
612
612
|
}, null)),
|
|
613
|
-
D(
|
|
613
|
+
D(se, ({ props: e, componentId: t, ctx: n, resolve: i, setBinding: a }) => {
|
|
614
614
|
let o = e.value, s = Array.isArray(o) ? o : n.dataContext.resolveDynamicValue(o) ?? [], c = Array.isArray(s) ? s : [], l = (e.variant ?? "mutuallyExclusive") === "multipleSelection";
|
|
615
615
|
return r("div", {
|
|
616
616
|
class: E["choice-picker"],
|
|
@@ -629,7 +629,7 @@ var Cn = new gn([
|
|
|
629
629
|
checked: c.includes(e.value)
|
|
630
630
|
}, null), r("span", null, [i(e.label)])]))])]);
|
|
631
631
|
}),
|
|
632
|
-
D(
|
|
632
|
+
D(le, ({ props: e, resolve: t, setBinding: n }) => {
|
|
633
633
|
let i = e.enableDate ?? !1, a = e.enableTime ?? !1, o = i && a ? "datetime-local" : i ? "date" : a ? "time" : "text";
|
|
634
634
|
return r("div", { class: E["datetime-input"] }, [e.label ? r("label", { class: E.label }, [t(e.label)]) : null, r("input", {
|
|
635
635
|
class: E.input,
|
|
@@ -880,7 +880,7 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
880
880
|
let t = e.createSurface?.catalogId;
|
|
881
881
|
typeof t == "string" && c.add(t);
|
|
882
882
|
}
|
|
883
|
-
let l = new v(Array.from(c).map((e) => new ee(e,
|
|
883
|
+
let l = new v(Array.from(c).map((e) => new ee(e, re, y))), u = /* @__PURE__ */ new Map(), d = [];
|
|
884
884
|
d.push(l.model.onSurfaceCreated.subscribe((e) => {
|
|
885
885
|
u.set(e.id, e), n.value++;
|
|
886
886
|
})), d.push(l.model.onSurfaceDeleted.subscribe((e) => {
|
|
@@ -950,12 +950,12 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
950
950
|
}
|
|
951
951
|
},
|
|
952
952
|
setup(e) {
|
|
953
|
-
let n = t(() =>
|
|
953
|
+
let n = t(() => we(e.expression, {
|
|
954
954
|
displayMode: e.block,
|
|
955
955
|
output: "mathml"
|
|
956
956
|
}));
|
|
957
957
|
return () => r("div", {
|
|
958
|
-
class:
|
|
958
|
+
class: b(C.text, e.block ? Pn["elm-katex"] : void 0),
|
|
959
959
|
innerHTML: n.value
|
|
960
960
|
}, null);
|
|
961
961
|
}
|
|
@@ -1021,7 +1021,7 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1021
1021
|
return () => {
|
|
1022
1022
|
let { class: n, style: i, ...a } = t;
|
|
1023
1023
|
return r("svg", c({
|
|
1024
|
-
class:
|
|
1024
|
+
class: b(Bn["elm-mdi-icon"], n),
|
|
1025
1025
|
style: [{
|
|
1026
1026
|
"--elmethis-scoped-color": e.lightColor ?? e.color,
|
|
1027
1027
|
"--dark-color": e.darkColor ?? e.color
|
|
@@ -1050,12 +1050,12 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1050
1050
|
},
|
|
1051
1051
|
setup(e) {
|
|
1052
1052
|
return () => {
|
|
1053
|
-
let t =
|
|
1053
|
+
let t = Ut(e.language);
|
|
1054
1054
|
return t === "file" ? r(O, {
|
|
1055
|
-
d:
|
|
1055
|
+
d: Fe,
|
|
1056
1056
|
size: String(e.size)
|
|
1057
1057
|
}, null) : a(zn, {
|
|
1058
|
-
icon:
|
|
1058
|
+
icon: Ht[t],
|
|
1059
1059
|
size: e.size
|
|
1060
1060
|
});
|
|
1061
1061
|
};
|
|
@@ -1080,11 +1080,11 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1080
1080
|
return;
|
|
1081
1081
|
}
|
|
1082
1082
|
try {
|
|
1083
|
-
let i = await
|
|
1083
|
+
let i = await Wt(e, {
|
|
1084
1084
|
lang: t,
|
|
1085
1085
|
themes: {
|
|
1086
|
-
dark:
|
|
1087
|
-
light:
|
|
1086
|
+
dark: Gt,
|
|
1087
|
+
light: Kt
|
|
1088
1088
|
},
|
|
1089
1089
|
defaultColor: !1,
|
|
1090
1090
|
colorReplacements: {
|
|
@@ -1105,7 +1105,7 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1105
1105
|
}, { immediate: !0 }), () => {
|
|
1106
1106
|
let { class: e, ...i } = t;
|
|
1107
1107
|
return r("pre", c({
|
|
1108
|
-
class:
|
|
1108
|
+
class: b(Hn["elm-shiki-highlighter"], e),
|
|
1109
1109
|
innerHTML: n.value
|
|
1110
1110
|
}, i), null);
|
|
1111
1111
|
};
|
|
@@ -1114,7 +1114,7 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1114
1114
|
"use-clipboard": "_use-clipboard_mb0qt_1",
|
|
1115
1115
|
"use-clipboard-icon-copied": "_use-clipboard-icon-copied_mb0qt_15"
|
|
1116
1116
|
}, Gn = (e) => {
|
|
1117
|
-
let n = e.delay ?? 1500, a =
|
|
1117
|
+
let n = e.delay ?? 1500, a = xe({ copiedDuring: n }), o = Se({ copiedDuring: n }), s = t(() => a.copied.value || o.copied.value), c = async () => {
|
|
1118
1118
|
let t = e.content;
|
|
1119
1119
|
typeof t == "string" ? await a.copy(t) : await o.copy(t.map((e) => new ClipboardItem(e)));
|
|
1120
1120
|
};
|
|
@@ -1124,12 +1124,12 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1124
1124
|
name: "CopyButton",
|
|
1125
1125
|
setup() {
|
|
1126
1126
|
return () => r("span", {
|
|
1127
|
-
class:
|
|
1127
|
+
class: b(Wn["use-clipboard"], e.class),
|
|
1128
1128
|
style: e.style,
|
|
1129
1129
|
onClick: c
|
|
1130
1130
|
}, [r(O, {
|
|
1131
|
-
class:
|
|
1132
|
-
d: s.value ?
|
|
1131
|
+
class: b(s.value && Wn["use-clipboard-icon-copied"]),
|
|
1132
|
+
d: s.value ? Ne : Pe,
|
|
1133
1133
|
size: "1.25rem"
|
|
1134
1134
|
}, null)]);
|
|
1135
1135
|
}
|
|
@@ -1153,7 +1153,7 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1153
1153
|
},
|
|
1154
1154
|
setup(e, { slots: t }) {
|
|
1155
1155
|
let { CopyButton: n } = Gn({ content: e.code });
|
|
1156
|
-
return () => r("figure", { class:
|
|
1156
|
+
return () => r("figure", { class: b(In["elm-code-block"]) }, [
|
|
1157
1157
|
r("span", { class: In["language-icon"] }, [r(Vn, { language: e.language }, null)]),
|
|
1158
1158
|
r("span", { class: In.caption }, [r(T, null, { default: () => [e.caption || e.language, t.default?.()] })]),
|
|
1159
1159
|
r("div", { class: In["copy-icon"] }, [a(n)]),
|
|
@@ -1194,7 +1194,11 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1194
1194
|
props: {
|
|
1195
1195
|
html: {
|
|
1196
1196
|
type: String,
|
|
1197
|
-
|
|
1197
|
+
default: void 0
|
|
1198
|
+
},
|
|
1199
|
+
src: {
|
|
1200
|
+
type: String,
|
|
1201
|
+
default: void 0
|
|
1198
1202
|
},
|
|
1199
1203
|
autoHeight: {
|
|
1200
1204
|
type: Boolean,
|
|
@@ -1214,46 +1218,57 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1214
1218
|
}
|
|
1215
1219
|
},
|
|
1216
1220
|
setup(e, { attrs: t }) {
|
|
1217
|
-
let n = m(null), i = m(void 0);
|
|
1218
|
-
_(() => [
|
|
1221
|
+
let n = m(null), i = m(void 0), a = () => e.src !== void 0;
|
|
1222
|
+
_(() => [
|
|
1223
|
+
e.html,
|
|
1224
|
+
e.src,
|
|
1225
|
+
e.autoHeight
|
|
1226
|
+
], ([, , e]) => {
|
|
1219
1227
|
e && (i.value = void 0);
|
|
1220
1228
|
}, { flush: "pre" });
|
|
1221
|
-
let
|
|
1229
|
+
let o, s = (e) => {
|
|
1230
|
+
if (a()) return;
|
|
1222
1231
|
let t = n.value;
|
|
1223
1232
|
if (!t) return;
|
|
1224
|
-
let r,
|
|
1233
|
+
let r, s = () => {
|
|
1225
1234
|
let e = t.contentDocument?.documentElement;
|
|
1226
1235
|
e && (i.value = e.scrollHeight);
|
|
1227
|
-
}, s = () => {
|
|
1228
|
-
let e = t.contentDocument?.documentElement;
|
|
1229
|
-
e && (r?.disconnect(), r = new ResizeObserver(o), r.observe(e));
|
|
1230
1236
|
}, c = () => {
|
|
1231
|
-
e
|
|
1237
|
+
let e = t.contentDocument?.documentElement;
|
|
1238
|
+
e && (r?.disconnect(), r = new ResizeObserver(s), r.observe(e));
|
|
1239
|
+
}, l = () => {
|
|
1240
|
+
e && (s(), c());
|
|
1232
1241
|
};
|
|
1233
|
-
t.addEventListener("load",
|
|
1234
|
-
t.removeEventListener("load",
|
|
1242
|
+
t.addEventListener("load", l), o = () => {
|
|
1243
|
+
t.removeEventListener("load", l), r?.disconnect();
|
|
1235
1244
|
};
|
|
1236
1245
|
};
|
|
1237
|
-
return d(() =>
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1246
|
+
return d(() => s(e.autoHeight)), _(() => [
|
|
1247
|
+
e.html,
|
|
1248
|
+
e.src,
|
|
1249
|
+
e.autoHeight
|
|
1250
|
+
], ([, , e]) => {
|
|
1251
|
+
o?.(), s(e);
|
|
1252
|
+
}, { flush: "post" }), u(() => o?.()), () => {
|
|
1253
|
+
let o = a(), { class: s, style: l, srcDoc: u, srcdoc: d, referrerPolicy: f, referrerpolicy: p, ...m } = t, h = Xn(l), g = h?.height, _ = new Set(e.sandbox?.split(/\s+/).filter(Boolean) ?? []);
|
|
1254
|
+
if ([..._].some((e) => e.toLowerCase() === "allow-scripts")) for (let e of _) e.toLowerCase() === "allow-same-origin" && _.delete(e);
|
|
1255
|
+
else e.autoHeight && !o && _.add("allow-same-origin");
|
|
1256
|
+
let ee = [..._].join(" ");
|
|
1244
1257
|
return r("iframe", c({
|
|
1245
1258
|
key: String(e.autoHeight),
|
|
1246
1259
|
ref: n,
|
|
1247
1260
|
title: e.title ?? "Embedded HTML content",
|
|
1248
|
-
class:
|
|
1261
|
+
class: b(qn["elm-html"], s),
|
|
1249
1262
|
style: e.autoHeight ? {
|
|
1250
|
-
...
|
|
1251
|
-
height: i.value === void 0 ?
|
|
1252
|
-
} :
|
|
1253
|
-
height: e.autoHeight ? i.value === void 0 &&
|
|
1254
|
-
},
|
|
1255
|
-
|
|
1256
|
-
|
|
1263
|
+
...h,
|
|
1264
|
+
height: i.value === void 0 ? g : `${i.value}px`
|
|
1265
|
+
} : h,
|
|
1266
|
+
height: e.autoHeight ? i.value === void 0 && g === void 0 ? e.height : void 0 : e.height
|
|
1267
|
+
}, m, {
|
|
1268
|
+
src: o ? e.src : void 0,
|
|
1269
|
+
srcdoc: o ? void 0 : e.html ?? "",
|
|
1270
|
+
sandbox: ee,
|
|
1271
|
+
referrerpolicy: o ? "no-referrer" : void 0
|
|
1257
1272
|
}), null);
|
|
1258
1273
|
};
|
|
1259
1274
|
}
|
|
@@ -1331,7 +1346,7 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1331
1346
|
}
|
|
1332
1347
|
},
|
|
1333
1348
|
setup(n) {
|
|
1334
|
-
let i = m(null), a = m(null), o = null, s = m(!1), c = m(!0), l = m(!1), d = m(0), f = m(0), p = m(1), h = m(!1), g = m(null), _ = t(() => d.value > 0 ? Math.min(1, f.value / d.value) : 0), ee = t(() => h.value || p.value === 0 ?
|
|
1349
|
+
let i = m(null), a = m(null), o = null, s = m(!1), c = m(!0), l = m(!1), d = m(0), f = m(0), p = m(1), h = m(!1), g = m(null), _ = t(() => d.value > 0 ? Math.min(1, f.value / d.value) : 0), ee = t(() => h.value || p.value === 0 ? dt : p.value < .34 ? lt : p.value < .67 ? ut : ct), te = t(() => n.title ?? $n(n.src)), v = () => {
|
|
1335
1350
|
if (o != null) return;
|
|
1336
1351
|
let e = () => {
|
|
1337
1352
|
i.value && (f.value = i.value.currentTime), o = requestAnimationFrame(e);
|
|
@@ -1341,37 +1356,37 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1341
1356
|
o != null && (cancelAnimationFrame(o), o = null);
|
|
1342
1357
|
};
|
|
1343
1358
|
u(ne);
|
|
1344
|
-
let
|
|
1359
|
+
let re = () => {
|
|
1345
1360
|
let e = i.value;
|
|
1346
1361
|
e && (e.paused ? e.play().catch(() => s.value = !1) : e.pause());
|
|
1347
|
-
},
|
|
1362
|
+
}, y = (e) => {
|
|
1348
1363
|
let t = i.value;
|
|
1349
1364
|
if (!t || !Number.isFinite(d.value) || d.value <= 0) return;
|
|
1350
1365
|
let n = Math.max(0, Math.min(d.value, e));
|
|
1351
1366
|
t.currentTime = n, f.value = n;
|
|
1352
|
-
},
|
|
1367
|
+
}, ie = (e) => {
|
|
1353
1368
|
let t = a.value;
|
|
1354
1369
|
if (!t) return 0;
|
|
1355
1370
|
let n = t.getBoundingClientRect();
|
|
1356
1371
|
return n.width === 0 ? 0 : Math.max(0, Math.min(1, (e - n.left) / n.width));
|
|
1357
|
-
}, ie = (e) => {
|
|
1358
|
-
e.currentTarget.setPointerCapture(e.pointerId), b(re(e.clientX) * d.value);
|
|
1359
1372
|
}, ae = (e) => {
|
|
1360
|
-
|
|
1361
|
-
g.value = t, e.currentTarget.hasPointerCapture(e.pointerId) && b(t * d.value);
|
|
1373
|
+
e.currentTarget.setPointerCapture(e.pointerId), y(ie(e.clientX) * d.value);
|
|
1362
1374
|
}, oe = (e) => {
|
|
1363
|
-
|
|
1375
|
+
let t = ie(e.clientX);
|
|
1376
|
+
g.value = t, e.currentTarget.hasPointerCapture(e.pointerId) && y(t * d.value);
|
|
1364
1377
|
}, se = (e) => {
|
|
1378
|
+
e.key === "ArrowRight" ? (e.preventDefault(), y(f.value + n.seekStep)) : e.key === "ArrowLeft" ? (e.preventDefault(), y(f.value - n.seekStep)) : e.key === "Home" ? (e.preventDefault(), y(0)) : e.key === "End" && (e.preventDefault(), y(d.value));
|
|
1379
|
+
}, ce = (e) => {
|
|
1365
1380
|
let t = i.value, n = Math.max(0, Math.min(1, e));
|
|
1366
1381
|
t && (t.volume = n, t.muted = n === 0), p.value = n, h.value = n === 0;
|
|
1367
|
-
},
|
|
1382
|
+
}, le = () => {
|
|
1368
1383
|
let e = i.value;
|
|
1369
1384
|
if (!e) return;
|
|
1370
1385
|
let t = !e.muted;
|
|
1371
1386
|
e.muted = t, h.value = t;
|
|
1372
1387
|
};
|
|
1373
1388
|
return () => r("div", {
|
|
1374
|
-
class:
|
|
1389
|
+
class: b(k["elm-audio-player"], s.value && k.playing, c.value && k.loading, l.value && k.errored),
|
|
1375
1390
|
style: {
|
|
1376
1391
|
"--elmethis-scoped-progress": _.value,
|
|
1377
1392
|
"--elmethis-scoped-hover": g.value ?? 0
|
|
@@ -1415,10 +1430,10 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1415
1430
|
}, null),
|
|
1416
1431
|
r("div", { class: k.header }, [
|
|
1417
1432
|
r("span", {
|
|
1418
|
-
class:
|
|
1433
|
+
class: b(k.artwork, l.value && k["artwork-error"]),
|
|
1419
1434
|
"aria-hidden": "true"
|
|
1420
1435
|
}, [r(O, {
|
|
1421
|
-
d: l.value ?
|
|
1436
|
+
d: l.value ? Ee : Qe,
|
|
1422
1437
|
size: "1.25rem"
|
|
1423
1438
|
}, null)]),
|
|
1424
1439
|
r("div", { class: k.meta }, [r("span", {
|
|
@@ -1439,7 +1454,7 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1439
1454
|
class: k["error-notice"],
|
|
1440
1455
|
role: "alert"
|
|
1441
1456
|
}, [r(O, {
|
|
1442
|
-
d:
|
|
1457
|
+
d: Ee,
|
|
1443
1458
|
size: "1.25rem"
|
|
1444
1459
|
}, null), r("span", { class: k["error-message"] }, [n.errorMessage])]) : r(e, null, [r("div", {
|
|
1445
1460
|
ref: a,
|
|
@@ -1451,10 +1466,10 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1451
1466
|
"aria-valuemax": Math.round(d.value) || 0,
|
|
1452
1467
|
"aria-valuenow": Math.round(f.value),
|
|
1453
1468
|
"aria-valuetext": `${Qn(f.value)} of ${Qn(d.value)}`,
|
|
1454
|
-
onPointerdown:
|
|
1455
|
-
onPointermove:
|
|
1469
|
+
onPointerdown: ae,
|
|
1470
|
+
onPointermove: oe,
|
|
1456
1471
|
onPointerleave: () => g.value = null,
|
|
1457
|
-
onKeydown:
|
|
1472
|
+
onKeydown: se
|
|
1458
1473
|
}, [
|
|
1459
1474
|
r("div", {
|
|
1460
1475
|
class: k.track,
|
|
@@ -1469,41 +1484,41 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1469
1484
|
"aria-hidden": "true"
|
|
1470
1485
|
}, null)
|
|
1471
1486
|
]), r("div", { class: k.controls }, [
|
|
1472
|
-
r("span", { class:
|
|
1487
|
+
r("span", { class: b(k.time, k["time-current"]) }, [Qn(f.value)]),
|
|
1473
1488
|
r("div", { class: k.transport }, [
|
|
1474
1489
|
r("button", {
|
|
1475
1490
|
type: "button",
|
|
1476
1491
|
class: k["icon-button"],
|
|
1477
|
-
onClick: () =>
|
|
1492
|
+
onClick: () => y(f.value - n.seekStep),
|
|
1478
1493
|
"aria-label": `Back ${n.seekStep} seconds`
|
|
1479
1494
|
}, [r(O, {
|
|
1480
|
-
d:
|
|
1495
|
+
d: rt,
|
|
1481
1496
|
size: "1.25rem"
|
|
1482
1497
|
}, null)]),
|
|
1483
1498
|
r("button", {
|
|
1484
1499
|
type: "button",
|
|
1485
1500
|
class: k["play-button"],
|
|
1486
|
-
onClick:
|
|
1501
|
+
onClick: re,
|
|
1487
1502
|
"aria-label": s.value ? "Pause" : "Play",
|
|
1488
1503
|
"aria-pressed": s.value
|
|
1489
1504
|
}, [r(O, {
|
|
1490
|
-
d: s.value ?
|
|
1505
|
+
d: s.value ? et : tt,
|
|
1491
1506
|
size: "1.5rem"
|
|
1492
1507
|
}, null)]),
|
|
1493
1508
|
r("button", {
|
|
1494
1509
|
type: "button",
|
|
1495
1510
|
class: k["icon-button"],
|
|
1496
|
-
onClick: () =>
|
|
1511
|
+
onClick: () => y(f.value + n.seekStep),
|
|
1497
1512
|
"aria-label": `Forward ${n.seekStep} seconds`
|
|
1498
1513
|
}, [r(O, {
|
|
1499
|
-
d:
|
|
1514
|
+
d: ze,
|
|
1500
1515
|
size: "1.25rem"
|
|
1501
1516
|
}, null)])
|
|
1502
1517
|
]),
|
|
1503
1518
|
r("div", { class: k.volume }, [r("button", {
|
|
1504
1519
|
type: "button",
|
|
1505
1520
|
class: k["icon-button"],
|
|
1506
|
-
onClick:
|
|
1521
|
+
onClick: le,
|
|
1507
1522
|
"aria-label": h.value ? "Unmute" : "Mute",
|
|
1508
1523
|
"aria-pressed": h.value
|
|
1509
1524
|
}, [r(O, {
|
|
@@ -1517,10 +1532,10 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1517
1532
|
step: .01,
|
|
1518
1533
|
value: h.value ? 0 : p.value,
|
|
1519
1534
|
"aria-label": "Volume",
|
|
1520
|
-
onInput: (e) =>
|
|
1535
|
+
onInput: (e) => ce(e.target.valueAsNumber),
|
|
1521
1536
|
style: { "--elmethis-scoped-volume": h.value ? 0 : p.value }
|
|
1522
1537
|
}, null)]),
|
|
1523
|
-
r("span", { class:
|
|
1538
|
+
r("span", { class: b(k.time, k["time-total"]) }, [Qn(d.value)])
|
|
1524
1539
|
])])
|
|
1525
1540
|
]);
|
|
1526
1541
|
}
|
|
@@ -1539,7 +1554,7 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1539
1554
|
setup() {
|
|
1540
1555
|
return () => r("div", {
|
|
1541
1556
|
"aria-hidden": "true",
|
|
1542
|
-
class:
|
|
1557
|
+
class: b(tr["elm-rectangle-wave"])
|
|
1543
1558
|
}, null);
|
|
1544
1559
|
}
|
|
1545
1560
|
}), rr = {
|
|
@@ -1583,7 +1598,7 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1583
1598
|
let { class: o, style: s, ...u } = t;
|
|
1584
1599
|
return r("dialog", c({
|
|
1585
1600
|
ref: i,
|
|
1586
|
-
class:
|
|
1601
|
+
class: b(rr["elm-modal"], a.value && rr.shown, o),
|
|
1587
1602
|
onClick: l,
|
|
1588
1603
|
style: [{ "--elmethis-scoped-modal-delay": `${e.delay}ms` }, s]
|
|
1589
1604
|
}, { closedby: "none" }, u), [r("div", { onClick: (e) => e.stopPropagation() }, [n.default?.()])]);
|
|
@@ -1674,7 +1689,7 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1674
1689
|
"--elmethis-scoped-aspect-ratio": e.width && e.height ? `${e.width} / ${e.height}` : "auto"
|
|
1675
1690
|
}
|
|
1676
1691
|
}, { fetchpriority: n ? "low" : "auto" }), null);
|
|
1677
|
-
return () => r("figure", { class:
|
|
1692
|
+
return () => r("figure", { class: b(A["elm-block-image"]) }, [
|
|
1678
1693
|
r("div", {
|
|
1679
1694
|
class: A["image-container"],
|
|
1680
1695
|
style: { "--elmethis-scoped-opacity": t.value ? 1 : .01 },
|
|
@@ -1684,7 +1699,7 @@ var An = "https://a2ui.org/specification/v0_9/basic_catalog.json", jn = /* @__PU
|
|
|
1684
1699
|
class: A["caption-box"],
|
|
1685
1700
|
style: { "--elmethis-scoped-opacity": t.value ? .01 : 1 }
|
|
1686
1701
|
}, [r("span", { class: A["caption-icon"] }, [r(O, {
|
|
1687
|
-
d:
|
|
1702
|
+
d: Ze,
|
|
1688
1703
|
size: "1.25rem"
|
|
1689
1704
|
}, null)]), r(T, { size: "1rem" }, { default: () => [e.caption] })]),
|
|
1690
1705
|
a(n, null, { default: () => i.value ? h(!0) : null })
|
|
@@ -1731,9 +1746,9 @@ var lr = /* @__PURE__ */ i({
|
|
|
1731
1746
|
t && URL.revokeObjectURL(t.href);
|
|
1732
1747
|
}
|
|
1733
1748
|
};
|
|
1734
|
-
return () => r("div", { class:
|
|
1749
|
+
return () => r("div", { class: b(sr["elm-file"]) }, [
|
|
1735
1750
|
r("div", null, [r(O, {
|
|
1736
|
-
d:
|
|
1751
|
+
d: Be,
|
|
1737
1752
|
size: "1.25rem"
|
|
1738
1753
|
}, null)]),
|
|
1739
1754
|
r("div", null, [r(T, null, { default: () => [e.name ?? cr(e.src)] })]),
|
|
@@ -1742,7 +1757,7 @@ var lr = /* @__PURE__ */ i({
|
|
|
1742
1757
|
class: sr["download-icon"],
|
|
1743
1758
|
onClick: t
|
|
1744
1759
|
}, [r(O, {
|
|
1745
|
-
d:
|
|
1760
|
+
d: Ie,
|
|
1746
1761
|
size: "1.25rem"
|
|
1747
1762
|
}, null)])
|
|
1748
1763
|
]);
|
|
@@ -1784,7 +1799,7 @@ var lr = /* @__PURE__ */ i({
|
|
|
1784
1799
|
},
|
|
1785
1800
|
setup(e) {
|
|
1786
1801
|
let t = m(!1);
|
|
1787
|
-
return () => r("div", { class:
|
|
1802
|
+
return () => r("div", { class: b(j["elm-bookmark"]) }, [r("a", {
|
|
1788
1803
|
class: j.container,
|
|
1789
1804
|
href: e.url,
|
|
1790
1805
|
target: "_blank",
|
|
@@ -1799,7 +1814,7 @@ var lr = /* @__PURE__ */ i({
|
|
|
1799
1814
|
r("div", { class: j.title }, [r(T, { bold: !0 }, { default: () => [e.title] })]),
|
|
1800
1815
|
r("div", { class: j.description }, [r(T, { size: "0.75rem" }, { default: () => [e.description] })]),
|
|
1801
1816
|
r("div", { class: j.link }, [e.favicon ? r(w, { src: e.favicon }, null) : r(O, {
|
|
1802
|
-
d:
|
|
1817
|
+
d: Ye,
|
|
1803
1818
|
color: "var(--elmethis-color-accent-info)"
|
|
1804
1819
|
}, null), r(T, { size: "0.75rem" }, { default: () => [e.url] })])
|
|
1805
1820
|
])])]);
|
|
@@ -1842,45 +1857,45 @@ var lr = /* @__PURE__ */ i({
|
|
|
1842
1857
|
emit: t,
|
|
1843
1858
|
defaultValue: e.defaultIsOpen ?? !1
|
|
1844
1859
|
});
|
|
1845
|
-
return () => r("div", { class:
|
|
1860
|
+
return () => r("div", { class: b(M["elm-toggle"], i.value && M.open) }, [
|
|
1846
1861
|
r("div", {
|
|
1847
1862
|
class: M.summary,
|
|
1848
1863
|
onClick: (e) => {
|
|
1849
1864
|
e.preventDefault(), i.value = !i.value;
|
|
1850
1865
|
}
|
|
1851
1866
|
}, [
|
|
1852
|
-
r("div", { class: M["summary-left"] }, [r("span", { class:
|
|
1853
|
-
d:
|
|
1867
|
+
r("div", { class: M["summary-left"] }, [r("span", { class: b(M.chevron, i.value && M.open) }, [r(O, {
|
|
1868
|
+
d: Me,
|
|
1854
1869
|
color: e.monochrome ? "var(--elmethis-color-neutral-weak)" : "var(--elmethis-color-primary)",
|
|
1855
1870
|
size: "1rem"
|
|
1856
1871
|
}, null)]), r("div", null, [e.summary == null ? n.summary?.() : r(T, null, { default: () => [e.summary] })])]),
|
|
1857
1872
|
r("hr", { class: M.divider }, null),
|
|
1858
|
-
r("span", { class:
|
|
1859
|
-
d:
|
|
1873
|
+
r("span", { class: b(M.cross, i.value && M.open) }, [r(O, {
|
|
1874
|
+
d: nt,
|
|
1860
1875
|
size: "1rem",
|
|
1861
1876
|
color: e.monochrome ? "var(--elmethis-color-neutral-weak)" : i.value ? "var(--elmethis-color-accent-error)" : "var(--elmethis-color-primary)"
|
|
1862
1877
|
}, null)])
|
|
1863
1878
|
]),
|
|
1864
1879
|
r("div", { class: M.border }, null),
|
|
1865
|
-
r("div", { class:
|
|
1880
|
+
r("div", { class: b(M.content, i.value && M.open) }, [n.default?.()])
|
|
1866
1881
|
]);
|
|
1867
1882
|
}
|
|
1868
|
-
}),
|
|
1883
|
+
}), N = {
|
|
1869
1884
|
"elm-block-quote": "_elm-block-quote_xzf6a_1",
|
|
1870
1885
|
body: "_body_xzf6a_19",
|
|
1871
1886
|
icon: "_icon_xzf6a_27",
|
|
1872
1887
|
"icon-top-left": "_icon-top-left_xzf6a_32",
|
|
1873
1888
|
"icon-bottom-right": "_icon-bottom-right_xzf6a_36"
|
|
1874
|
-
},
|
|
1889
|
+
}, pr = /* @__PURE__ */ i({
|
|
1875
1890
|
name: "ElmBlockQuote",
|
|
1876
1891
|
setup(e, { slots: t }) {
|
|
1877
|
-
return () => r("blockquote", { class:
|
|
1878
|
-
r("div", { class:
|
|
1879
|
-
r("div", { class:
|
|
1880
|
-
r("div", { class:
|
|
1892
|
+
return () => r("blockquote", { class: b(N["elm-block-quote"], C.text) }, [
|
|
1893
|
+
r("div", { class: b(N.icon, N["icon-top-left"]) }, [r(O, { d: We }, null)]),
|
|
1894
|
+
r("div", { class: N.body }, [t.default?.()]),
|
|
1895
|
+
r("div", { class: b(N.icon, N["icon-bottom-right"]) }, [r(O, { d: Ue }, null)])
|
|
1881
1896
|
]);
|
|
1882
1897
|
}
|
|
1883
|
-
}),
|
|
1898
|
+
}), mr = {
|
|
1884
1899
|
"elm-callout": "_elm-callout_1nsmp_1",
|
|
1885
1900
|
header: "_header_1nsmp_26",
|
|
1886
1901
|
content: "_content_1nsmp_35",
|
|
@@ -1890,26 +1905,26 @@ var lr = /* @__PURE__ */ i({
|
|
|
1890
1905
|
important: "_important_1nsmp_55",
|
|
1891
1906
|
warning: "_warning_1nsmp_59",
|
|
1892
1907
|
caution: "_caution_1nsmp_63"
|
|
1893
|
-
},
|
|
1894
|
-
note:
|
|
1895
|
-
tip:
|
|
1896
|
-
important:
|
|
1897
|
-
warning:
|
|
1898
|
-
caution:
|
|
1899
|
-
}),
|
|
1908
|
+
}, hr = Object.freeze({
|
|
1909
|
+
note: qe,
|
|
1910
|
+
tip: Je,
|
|
1911
|
+
important: it,
|
|
1912
|
+
warning: Te,
|
|
1913
|
+
caution: De
|
|
1914
|
+
}), gr = /* @__PURE__ */ i({
|
|
1900
1915
|
name: "ElmCallout",
|
|
1901
1916
|
props: { type: {
|
|
1902
1917
|
type: String,
|
|
1903
1918
|
default: "note"
|
|
1904
1919
|
} },
|
|
1905
1920
|
setup(e, { slots: t }) {
|
|
1906
|
-
return () => r("aside", { class:
|
|
1907
|
-
class:
|
|
1908
|
-
d:
|
|
1921
|
+
return () => r("aside", { class: b(mr["elm-callout"], mr[e.type]) }, [r("div", { class: mr.header }, [r(O, {
|
|
1922
|
+
class: mr.icon,
|
|
1923
|
+
d: hr[e.type],
|
|
1909
1924
|
size: "1.25rem"
|
|
1910
|
-
}, null), r("span", null, [e.type])]), r("div", { class:
|
|
1925
|
+
}, null), r("span", null, [e.type])]), r("div", { class: mr.content }, [t.default?.()])]);
|
|
1911
1926
|
}
|
|
1912
|
-
}),
|
|
1927
|
+
}), _r = {
|
|
1913
1928
|
"elm-notion-callout": "_elm-notion-callout_15idh_1",
|
|
1914
1929
|
icon: "_icon_15idh_9",
|
|
1915
1930
|
content: "_content_15idh_15",
|
|
@@ -1945,15 +1960,15 @@ var lr = /* @__PURE__ */ i({
|
|
|
1945
1960
|
setup(e, { slots: t, attrs: n }) {
|
|
1946
1961
|
return () => {
|
|
1947
1962
|
let { class: i, ...a } = n;
|
|
1948
|
-
return r("div", c({ class:
|
|
1949
|
-
class:
|
|
1963
|
+
return r("div", c({ class: b(_r["elm-notion-callout"], _r[e.color], _r[e.variant], i) }, a), [e.icon !== void 0 && (e.icon.kind === "emoji" ? r("span", {
|
|
1964
|
+
class: _r.icon,
|
|
1950
1965
|
role: "img"
|
|
1951
1966
|
}, [e.icon.emoji]) : r(w, {
|
|
1952
|
-
class:
|
|
1967
|
+
class: _r.icon,
|
|
1953
1968
|
src: e.icon.src,
|
|
1954
1969
|
alt: e.icon.alt,
|
|
1955
1970
|
size: 20
|
|
1956
|
-
}, null)), r("div", { class:
|
|
1971
|
+
}, null)), r("div", { class: _r.content }, [t.default?.()])]);
|
|
1957
1972
|
};
|
|
1958
1973
|
}
|
|
1959
1974
|
}), yr = { "elm-divider": "_elm-divider_9m6gb_1" }, br = /* @__PURE__ */ i({
|
|
@@ -1962,7 +1977,7 @@ var lr = /* @__PURE__ */ i({
|
|
|
1962
1977
|
setup(e, { attrs: t }) {
|
|
1963
1978
|
return () => {
|
|
1964
1979
|
let { class: e, ...n } = t;
|
|
1965
|
-
return r("hr", c({ class:
|
|
1980
|
+
return r("hr", c({ class: b(yr["elm-divider"], e) }, n), null);
|
|
1966
1981
|
};
|
|
1967
1982
|
}
|
|
1968
1983
|
}), xr = {
|
|
@@ -1976,7 +1991,7 @@ var lr = /* @__PURE__ */ i({
|
|
|
1976
1991
|
default: "unordered"
|
|
1977
1992
|
} },
|
|
1978
1993
|
setup(e, { slots: t }) {
|
|
1979
|
-
return () => e.listStyle === "ordered" ? r("ol", { class:
|
|
1994
|
+
return () => e.listStyle === "ordered" ? r("ol", { class: b(C.text, xr["elm-list"], xr.numbered) }, [t.default?.()]) : r("ul", { class: b(C.text, xr["elm-list"], xr.bulleted) }, [t.default?.()]);
|
|
1980
1995
|
}
|
|
1981
1996
|
}), P = {
|
|
1982
1997
|
"elm-table-frame": "_elm-table-frame_1b7h2_3",
|
|
@@ -2024,7 +2039,7 @@ var lr = /* @__PURE__ */ i({
|
|
|
2024
2039
|
tabindex: o.value ? 0 : void 0,
|
|
2025
2040
|
role: o.value && e.caption != null ? "region" : void 0,
|
|
2026
2041
|
"aria-label": o.value && e.caption != null ? e.caption : void 0
|
|
2027
|
-
}, [r("table", c({ class:
|
|
2042
|
+
}, [r("table", c({ class: b(P["elm-table"], C.text, e.hasRowHeader && P["sticky-row-header"], t) }, u), [e.caption && r("caption", null, [r("span", { class: P.caption }, [
|
|
2028
2043
|
r("span", { class: P.spacing }, null),
|
|
2029
2044
|
r("span", { class: P["caption-inner"] }, [r(T, null, { default: () => [e.caption] })]),
|
|
2030
2045
|
r("span", { class: P.spacing }, null)
|
|
@@ -2066,11 +2081,11 @@ var lr = /* @__PURE__ */ i({
|
|
|
2066
2081
|
return () => {
|
|
2067
2082
|
let { class: o, style: s, ...l } = t, u = i === "head", d = !u && !e.isHeader && e.columnIndex === 0 && a.value, f = u || e.isHeader || d, p = e.scope ?? (u ? "col" : d ? "row" : void 0), m = e.text == null ? n.default?.() : e.text;
|
|
2068
2083
|
return f ? r("th", c({
|
|
2069
|
-
class:
|
|
2084
|
+
class: b(Dr["elm-table-cell"], Dr.th, o),
|
|
2070
2085
|
style: s,
|
|
2071
2086
|
scope: p
|
|
2072
2087
|
}, l), [m]) : r("td", c({
|
|
2073
|
-
class:
|
|
2088
|
+
class: b(Dr["elm-table-cell"], Dr.td, o),
|
|
2074
2089
|
style: s
|
|
2075
2090
|
}, l), [m]);
|
|
2076
2091
|
};
|
|
@@ -2078,12 +2093,12 @@ var lr = /* @__PURE__ */ i({
|
|
|
2078
2093
|
}), kr = { "elm-table-header": "_elm-table-header_jhft7_1" }, Ar = /* @__PURE__ */ i({
|
|
2079
2094
|
name: "ElmTableHeader",
|
|
2080
2095
|
setup(e, { slots: t }) {
|
|
2081
|
-
return p(wr, "head"), () => r("thead", { class:
|
|
2096
|
+
return p(wr, "head"), () => r("thead", { class: b(kr["elm-table-header"]) }, [t.default?.()]);
|
|
2082
2097
|
}
|
|
2083
2098
|
}), jr = { "elm-table-row": "_elm-table-row_mkm0q_1" }, Mr = /* @__PURE__ */ i({
|
|
2084
2099
|
name: "ElmTableRow",
|
|
2085
2100
|
setup(e, { slots: t }) {
|
|
2086
|
-
return () => r("tr", { class:
|
|
2101
|
+
return () => r("tr", { class: b(jr["elm-table-row"]) }, [t.default?.()]);
|
|
2087
2102
|
}
|
|
2088
2103
|
}), Nr = {
|
|
2089
2104
|
"elm-unsupported-block": "_elm-unsupported-block_8bkk1_1",
|
|
@@ -2100,7 +2115,7 @@ var lr = /* @__PURE__ */ i({
|
|
|
2100
2115
|
setup(e, { attrs: t }) {
|
|
2101
2116
|
return () => {
|
|
2102
2117
|
let { class: i, ...a } = t;
|
|
2103
|
-
return r("div", c({ class:
|
|
2118
|
+
return r("div", c({ class: b(Nr["elm-unsupported-block"], i) }, a), [r("div", { class: Nr.message }, [r("svg", {
|
|
2104
2119
|
viewBox: "0 0 24 24",
|
|
2105
2120
|
width: "1.25rem",
|
|
2106
2121
|
height: "1.25rem",
|
|
@@ -2126,7 +2141,7 @@ var Ir = {
|
|
|
2126
2141
|
gap: "0.25rem",
|
|
2127
2142
|
justifyContent: "space-around",
|
|
2128
2143
|
overflowX: "auto"
|
|
2129
|
-
}, Lr = Cn.extend(D(
|
|
2144
|
+
}, Lr = Cn.extend(D(Ft, ({ props: e, resolve: t }) => {
|
|
2130
2145
|
let n = t(e.text), i = e.decoration ?? [];
|
|
2131
2146
|
return i.includes("katex") ? r(Fn, {
|
|
2132
2147
|
expression: n,
|
|
@@ -2140,16 +2155,16 @@ var Ir = {
|
|
|
2140
2155
|
color: e.color,
|
|
2141
2156
|
ruby: e.ruby
|
|
2142
2157
|
}, F(n) ? n : { default: () => [n] });
|
|
2143
|
-
}), D(
|
|
2158
|
+
}), D(kt, ({ props: e, resolve: t }) => {
|
|
2144
2159
|
let n;
|
|
2145
2160
|
return r(T, {
|
|
2146
2161
|
href: e.href,
|
|
2147
2162
|
favicon: e.favicon
|
|
2148
2163
|
}, F(n = t(e.text)) ? n : { default: () => [n] });
|
|
2149
|
-
}), D(
|
|
2164
|
+
}), D(Et, ({ props: e, resolve: t }) => r(w, {
|
|
2150
2165
|
src: t(e.src),
|
|
2151
2166
|
alt: e.alt
|
|
2152
|
-
}, null)), D(
|
|
2167
|
+
}, null)), D(vt, ({ props: e, childRefs: t, renderChild: n }) => r("div", { style: {
|
|
2153
2168
|
display: "flex",
|
|
2154
2169
|
flexDirection: "column",
|
|
2155
2170
|
justifyContent: _n[e.justify ?? "start"],
|
|
@@ -2158,50 +2173,50 @@ var Ir = {
|
|
|
2158
2173
|
boxSizing: "border-box",
|
|
2159
2174
|
padding: "0.125rem",
|
|
2160
2175
|
gap: "var(--elmethis-stack-gap)"
|
|
2161
|
-
} }, [t(e.children).map(({ id: e, path: t }, i) => r("span", { key: `${e}:${i}` }, [n(e, t, i)]))])), D(
|
|
2176
|
+
} }, [t(e.children).map(({ id: e, path: t }, i) => r("span", { key: `${e}:${i}` }, [n(e, t, i)]))])), D(yt, ({ props: t, childRefs: n, renderChild: i }) => r("div", { style: Ir }, [n(t.children).map(({ id: t, path: n }, a) => r(e, { key: `${t}:${a}` }, [i(t, n, a)]))])), D(wt, ({ props: t, childRefs: n, renderChild: i }) => {
|
|
2162
2177
|
let a;
|
|
2163
2178
|
return r(sn, { level: t.level }, F(a = n(t.children).map(({ id: t, path: n }, a) => r(e, { key: `${t}:${a}` }, [i(t, n, a)]))) ? a : { default: () => [a] });
|
|
2164
|
-
}), D(
|
|
2179
|
+
}), D(Pt, ({ props: e, childRefs: t, renderChild: n }) => {
|
|
2165
2180
|
let i;
|
|
2166
2181
|
return r(dn, {
|
|
2167
2182
|
color: e.color,
|
|
2168
2183
|
backgroundColor: e.backgroundColor
|
|
2169
2184
|
}, F(i = t(e.children).map(({ id: e, path: t }, i) => r("span", { key: `${e}:${i}` }, [n(e, t, i)]))) ? i : { default: () => [i] });
|
|
2170
|
-
}), D(
|
|
2185
|
+
}), D(At, ({ props: e, childRefs: t, renderChild: n }) => {
|
|
2171
2186
|
let i;
|
|
2172
2187
|
return r(Sr, { listStyle: e.style ?? "unordered" }, F(i = t(e.children).map(({ id: e, path: t }, i) => r("li", { key: `${e}:${i}` }, [n(e, t, i)]))) ? i : { default: () => [i] });
|
|
2173
|
-
}), D(
|
|
2188
|
+
}), D(jt, ({ props: t, childRefs: n, renderChild: i }) => r(e, null, [n(t.children).map(({ id: t, path: n }, a) => r(e, { key: `${t}:${a}` }, [i(t, n, a)]))])), D(mt, ({ props: t, childRefs: n, renderChild: i }) => {
|
|
2174
2189
|
let a;
|
|
2175
|
-
return r(
|
|
2176
|
-
}), D(
|
|
2190
|
+
return r(pr, { cite: t.cite }, F(a = n(t.children).map(({ id: t, path: n }, a) => r(e, { key: `${t}:${a}` }, [i(t, n, a)]))) ? a : { default: () => [a] });
|
|
2191
|
+
}), D(gt, ({ props: t, childRefs: n, renderChild: i }) => {
|
|
2177
2192
|
let a;
|
|
2178
|
-
return r(
|
|
2179
|
-
}), D(
|
|
2193
|
+
return r(gr, { type: t.type }, F(a = n(t.children).map(({ id: t, path: n }, a) => r(e, { key: `${t}:${a}` }, [i(t, n, a)]))) ? a : { default: () => [a] });
|
|
2194
|
+
}), D(Nt, ({ props: t, childRefs: n, renderChild: i }) => {
|
|
2180
2195
|
let a;
|
|
2181
2196
|
return r(vr, {
|
|
2182
2197
|
icon: t.icon,
|
|
2183
2198
|
color: t.color,
|
|
2184
2199
|
variant: t.variant
|
|
2185
2200
|
}, F(a = n(t.children).map(({ id: t, path: n }, a) => r(e, { key: `${t}:${a}` }, [i(t, n, a)]))) ? a : { default: () => [a] });
|
|
2186
|
-
}), D(
|
|
2201
|
+
}), D(St, () => r(br, null, null)), D(zt, ({ props: t, childRefs: n, renderChild: i }) => r(fr, null, {
|
|
2187
2202
|
summary: () => n(t.summary).map(({ id: e, path: t }, n) => r("span", { key: `${e}:${n}` }, [i(e, t, n)])),
|
|
2188
2203
|
default: () => n(t.children).map(({ id: t, path: n }, a) => r(e, { key: `${t}:${a}` }, [i(t, n, a)]))
|
|
2189
|
-
})), D(
|
|
2204
|
+
})), D(ht, ({ props: e, resolve: t }) => r(dr, {
|
|
2190
2205
|
url: t(e.url),
|
|
2191
2206
|
title: e.title ? t(e.title) : void 0,
|
|
2192
2207
|
description: e.description ? t(e.description) : void 0,
|
|
2193
2208
|
image: e.image ? t(e.image) : void 0
|
|
2194
|
-
}, null)), D(
|
|
2209
|
+
}, null)), D(Ct, ({ props: e, resolve: t }) => r(lr, {
|
|
2195
2210
|
src: t(e.src),
|
|
2196
2211
|
name: e.name ? t(e.name) : void 0
|
|
2197
|
-
}, null)), D(
|
|
2212
|
+
}, null)), D(ft, ({ props: e, resolve: t }) => r(er, {
|
|
2198
2213
|
src: t(e.src),
|
|
2199
2214
|
title: e.title ? t(e.title) : void 0,
|
|
2200
2215
|
artist: e.artist ? t(e.artist) : void 0,
|
|
2201
2216
|
seekStep: e.seekStep,
|
|
2202
2217
|
loop: e.loop,
|
|
2203
2218
|
autoplay: e.autoPlay
|
|
2204
|
-
}, null)), D(
|
|
2219
|
+
}, null)), D(Vt, ({ props: e, resolve: t }) => {
|
|
2205
2220
|
let n = e.caption ? t(e.caption) : void 0;
|
|
2206
2221
|
return r("figure", { style: { margin: 0 } }, [r("video", {
|
|
2207
2222
|
src: t(e.src),
|
|
@@ -2218,7 +2233,7 @@ var Ir = {
|
|
|
2218
2233
|
height: "auto"
|
|
2219
2234
|
}
|
|
2220
2235
|
}, null), n ? r("figcaption", null, [n]) : null]);
|
|
2221
|
-
}), D(
|
|
2236
|
+
}), D(pt, ({ props: e, resolve: t }) => r(or, {
|
|
2222
2237
|
src: t(e.src),
|
|
2223
2238
|
alt: e.alt ? t(e.alt) : void 0,
|
|
2224
2239
|
width: e.width,
|
|
@@ -2227,20 +2242,21 @@ var Ir = {
|
|
|
2227
2242
|
sizes: e.sizes ? t(e.sizes) : void 0,
|
|
2228
2243
|
caption: e.caption ? t(e.caption) : void 0,
|
|
2229
2244
|
enableModal: !0
|
|
2230
|
-
}, null)), D(
|
|
2231
|
-
html: t(e.html),
|
|
2245
|
+
}, null)), D(Tt, ({ props: e, resolve: t }) => r(Zn, {
|
|
2246
|
+
html: e.html ? t(e.html) : void 0,
|
|
2247
|
+
src: e.src ? t(e.src) : void 0,
|
|
2232
2248
|
autoHeight: e.autoHeight
|
|
2233
|
-
}, null)), D(
|
|
2249
|
+
}, null)), D(_t, ({ props: e, resolve: t }) => r(Kn, {
|
|
2234
2250
|
code: t(e.code),
|
|
2235
2251
|
language: e.language ? t(e.language) : void 0,
|
|
2236
2252
|
caption: e.caption ? t(e.caption) : void 0
|
|
2237
|
-
}, null)), D(
|
|
2253
|
+
}, null)), D(Dt, ({ props: e, resolve: t }) => r(Fn, {
|
|
2238
2254
|
expression: t(e.expression),
|
|
2239
2255
|
block: !0
|
|
2240
|
-
}, null)), D(
|
|
2256
|
+
}, null)), D(Mt, ({ props: e, resolve: t }) => r(Kn, {
|
|
2241
2257
|
code: t(e.code),
|
|
2242
2258
|
language: "mermaid"
|
|
2243
|
-
}, null)), D(
|
|
2259
|
+
}, null)), D(bt, () => null), D(xt, ({ props: t, surface: n, renderChild: i }) => {
|
|
2244
2260
|
let a, o = (Array.isArray(t.children) ? t.children : []).map((e) => {
|
|
2245
2261
|
let t = n.componentsModel.get(e);
|
|
2246
2262
|
return {
|
|
@@ -2262,28 +2278,28 @@ var Ir = {
|
|
|
2262
2278
|
value: String(a)
|
|
2263
2279
|
}, F(o = n.map((t, n) => r(e, { key: `${t}:${n}` }, [i(t, "/", n)]))) ? o : { default: () => [o] });
|
|
2264
2280
|
})] });
|
|
2265
|
-
}), D(
|
|
2281
|
+
}), D(It, ({ props: t, childRefs: n, renderChild: i }) => {
|
|
2266
2282
|
let a, o;
|
|
2267
2283
|
return r(Tr, {
|
|
2268
2284
|
caption: t.caption ? String(t.caption) : void 0,
|
|
2269
2285
|
hasRowHeader: t.hasRowHeader
|
|
2270
2286
|
}, { default: () => [t.header && t.header.length > 0 && r(Ar, null, F(a = n(t.header).map(({ id: t, path: n }, a) => r(e, { key: `${t}:${a}` }, [i(t, n, a)]))) ? a : { default: () => [a] }), r(Er, null, F(o = n(t.body).map(({ id: t, path: n }, a) => r(e, { key: `${t}:${a}` }, [i(t, n, a)]))) ? o : { default: () => [o] })] });
|
|
2271
|
-
}), D(
|
|
2287
|
+
}), D(Rt, ({ props: t, childRefs: n, renderChild: i }) => {
|
|
2272
2288
|
let a;
|
|
2273
2289
|
return r(Mr, null, F(a = n(t.children).map(({ id: t, path: n }, a) => r(e, { key: `${t}:${a}` }, [i(t, n, a)]))) ? a : { default: () => [a] });
|
|
2274
|
-
}), D(
|
|
2290
|
+
}), D(Lt, ({ props: e, index: t, childRefs: n, renderChild: i }) => {
|
|
2275
2291
|
let a;
|
|
2276
2292
|
return r(Or, {
|
|
2277
2293
|
isHeader: e.isHeader,
|
|
2278
2294
|
columnIndex: t
|
|
2279
2295
|
}, F(a = n(e.children).map(({ id: e, path: t }, n) => r("span", { key: `${e}:${n}` }, [i(e, t, n)]))) ? a : { default: () => [a] });
|
|
2280
|
-
}), D(
|
|
2296
|
+
}), D(Bt, ({ props: e }) => r(Pr, { details: e.details ? `Unsupported component type: ${String(e.details)}` : "Unsupported component type" }, null))), Rr = {
|
|
2281
2297
|
"elm-html-viewer": "_elm-html-viewer_jde0x_1",
|
|
2282
2298
|
header: "_header_jde0x_15",
|
|
2283
2299
|
"icon-button": "_icon-button_jde0x_23",
|
|
2284
2300
|
divider: "_divider_jde0x_49",
|
|
2285
2301
|
content: "_content_jde0x_57"
|
|
2286
|
-
},
|
|
2302
|
+
}, zr = /* @__PURE__ */ i({
|
|
2287
2303
|
name: "ElmHtmlViewer",
|
|
2288
2304
|
props: {
|
|
2289
2305
|
html: {
|
|
@@ -2335,36 +2351,36 @@ var Ir = {
|
|
|
2335
2351
|
n?.remove(), t && URL.revokeObjectURL(t);
|
|
2336
2352
|
}
|
|
2337
2353
|
};
|
|
2338
|
-
return () => r("figure", { class:
|
|
2339
|
-
r("div", { class:
|
|
2354
|
+
return () => r("figure", { class: b(Rr["elm-html-viewer"]) }, [
|
|
2355
|
+
r("div", { class: Rr.header }, [r("button", {
|
|
2340
2356
|
type: "button",
|
|
2341
|
-
class:
|
|
2357
|
+
class: Rr["icon-button"],
|
|
2342
2358
|
onClick: n,
|
|
2343
2359
|
"aria-label": "Download"
|
|
2344
2360
|
}, [r(O, {
|
|
2345
|
-
d:
|
|
2361
|
+
d: Ie,
|
|
2346
2362
|
size: "1.25rem"
|
|
2347
2363
|
}, null)]), r("button", {
|
|
2348
2364
|
type: "button",
|
|
2349
|
-
class:
|
|
2365
|
+
class: Rr["icon-button"],
|
|
2350
2366
|
onClick: t,
|
|
2351
2367
|
"aria-label": "Open in new tab"
|
|
2352
2368
|
}, [r(O, {
|
|
2353
|
-
d:
|
|
2369
|
+
d: $e,
|
|
2354
2370
|
size: "1.25rem"
|
|
2355
2371
|
}, null)])]),
|
|
2356
|
-
r("hr", { class:
|
|
2357
|
-
r("div", { class:
|
|
2372
|
+
r("hr", { class: Rr.divider }, null),
|
|
2373
|
+
r("div", { class: Rr.content }, [r(Zn, {
|
|
2358
2374
|
html: e.html,
|
|
2359
2375
|
sandbox: e.sandbox,
|
|
2360
2376
|
autoHeight: e.autoHeight
|
|
2361
2377
|
}, null)])
|
|
2362
2378
|
]);
|
|
2363
2379
|
}
|
|
2364
|
-
}),
|
|
2380
|
+
}), Br = {
|
|
2365
2381
|
"parallax-watcher": "_parallax-watcher_z693a_1",
|
|
2366
2382
|
parallax: "_parallax_z693a_1"
|
|
2367
|
-
},
|
|
2383
|
+
}, Vr = /* @__PURE__ */ i({
|
|
2368
2384
|
name: "ElmParallax",
|
|
2369
2385
|
props: { images: {
|
|
2370
2386
|
type: Array,
|
|
@@ -2374,9 +2390,9 @@ var Ir = {
|
|
|
2374
2390
|
let t = m(0), n = () => {
|
|
2375
2391
|
t.value = window.scrollY;
|
|
2376
2392
|
};
|
|
2377
|
-
return d(() => window.addEventListener("scroll", n)), u(() => window.removeEventListener("scroll", n)), () => r("div", null, [r("div", { class:
|
|
2393
|
+
return d(() => window.addEventListener("scroll", n)), u(() => window.removeEventListener("scroll", n)), () => r("div", null, [r("div", { class: Br["parallax-watcher"] }, null), e.images.map((e, n) => r("div", {
|
|
2378
2394
|
key: n,
|
|
2379
|
-
class:
|
|
2395
|
+
class: Br.parallax,
|
|
2380
2396
|
style: {
|
|
2381
2397
|
backgroundImage: `url(${e})`,
|
|
2382
2398
|
transform: `scale(1.2) translateY(${t.value / (1e3 * (n + 1))}%)`,
|
|
@@ -2384,11 +2400,11 @@ var Ir = {
|
|
|
2384
2400
|
}
|
|
2385
2401
|
}, null))]);
|
|
2386
2402
|
}
|
|
2387
|
-
}),
|
|
2403
|
+
}), Hr = {
|
|
2388
2404
|
"elm-tooltip": "_elm-tooltip_1b13f_1",
|
|
2389
2405
|
tooltip: "_tooltip_1b13f_5",
|
|
2390
2406
|
show: "_show_1b13f_18"
|
|
2391
|
-
},
|
|
2407
|
+
}, Ur = /* @__PURE__ */ i({
|
|
2392
2408
|
name: "ElmTooltip",
|
|
2393
2409
|
setup(e, { slots: t }) {
|
|
2394
2410
|
let n = m(null), i = m(!1), a = !1, o, s = m({}), c = () => {
|
|
@@ -2410,19 +2426,19 @@ var Ir = {
|
|
|
2410
2426
|
};
|
|
2411
2427
|
return () => r("span", {
|
|
2412
2428
|
ref: n,
|
|
2413
|
-
class:
|
|
2429
|
+
class: b(Hr["elm-tooltip"]),
|
|
2414
2430
|
onMouseover: c,
|
|
2415
2431
|
onMouseleave: l
|
|
2416
2432
|
}, [t.original?.(), r("div", {
|
|
2417
|
-
class:
|
|
2433
|
+
class: b(Hr.tooltip, i.value && Hr.show),
|
|
2418
2434
|
style: s.value
|
|
2419
2435
|
}, [t.tooltip?.()])]);
|
|
2420
2436
|
}
|
|
2421
|
-
}),
|
|
2437
|
+
}), Wr = { "elm-block-fallback": "_elm-block-fallback_1sx02_1" }, Gr = {
|
|
2422
2438
|
"elm-dot-loading-icon": "_elm-dot-loading-icon_qjgj2_15",
|
|
2423
2439
|
dot: "_dot_qjgj2_25",
|
|
2424
2440
|
bounce: "_bounce_qjgj2_1"
|
|
2425
|
-
},
|
|
2441
|
+
}, Kr = /* @__PURE__ */ i({
|
|
2426
2442
|
name: "ElmDotLoadingIcon",
|
|
2427
2443
|
inheritAttrs: !1,
|
|
2428
2444
|
props: { size: {
|
|
@@ -2433,25 +2449,25 @@ var Ir = {
|
|
|
2433
2449
|
return () => {
|
|
2434
2450
|
let { class: n, style: i, ...a } = t;
|
|
2435
2451
|
return r("span", c({
|
|
2436
|
-
class:
|
|
2452
|
+
class: b(Gr["elm-dot-loading-icon"], n),
|
|
2437
2453
|
style: [{ "--elmethis-scoped-size": e.size }, i]
|
|
2438
2454
|
}, a), [
|
|
2439
2455
|
r("span", {
|
|
2440
|
-
class:
|
|
2456
|
+
class: Gr.dot,
|
|
2441
2457
|
"aria-hidden": "true"
|
|
2442
2458
|
}, null),
|
|
2443
2459
|
r("span", {
|
|
2444
|
-
class:
|
|
2460
|
+
class: Gr.dot,
|
|
2445
2461
|
"aria-hidden": "true"
|
|
2446
2462
|
}, null),
|
|
2447
2463
|
r("span", {
|
|
2448
|
-
class:
|
|
2464
|
+
class: Gr.dot,
|
|
2449
2465
|
"aria-hidden": "true"
|
|
2450
2466
|
}, null)
|
|
2451
2467
|
]);
|
|
2452
2468
|
};
|
|
2453
2469
|
}
|
|
2454
|
-
}),
|
|
2470
|
+
}), qr = /* @__PURE__ */ i({
|
|
2455
2471
|
name: "ElmBlockFallback",
|
|
2456
2472
|
props: { height: {
|
|
2457
2473
|
type: String,
|
|
@@ -2459,11 +2475,11 @@ var Ir = {
|
|
|
2459
2475
|
} },
|
|
2460
2476
|
setup(e) {
|
|
2461
2477
|
return () => r("div", {
|
|
2462
|
-
class:
|
|
2478
|
+
class: b(Wr["elm-block-fallback"]),
|
|
2463
2479
|
style: { "--elmethis-scoped-height": e.height }
|
|
2464
|
-
}, [r(
|
|
2480
|
+
}, [r(Kr, null, null), r(nr, null, null)]);
|
|
2465
2481
|
}
|
|
2466
|
-
}),
|
|
2482
|
+
}), I = {
|
|
2467
2483
|
"elm-button": "_elm-button_9qh0y_1",
|
|
2468
2484
|
normal: "_normal_9qh0y_22",
|
|
2469
2485
|
primary: "_primary_9qh0y_29",
|
|
@@ -2472,7 +2488,7 @@ var Ir = {
|
|
|
2472
2488
|
flex: "_flex_9qh0y_59",
|
|
2473
2489
|
ripple: "_ripple_9qh0y_83",
|
|
2474
2490
|
"button-ripple": "_button-ripple_9qh0y_1"
|
|
2475
|
-
},
|
|
2491
|
+
}, Jr = /* @__PURE__ */ i({
|
|
2476
2492
|
name: "ElmButton",
|
|
2477
2493
|
inheritAttrs: !1,
|
|
2478
2494
|
props: {
|
|
@@ -2506,7 +2522,7 @@ var Ir = {
|
|
|
2506
2522
|
!e.isLoading && !e.disabled && typeof l == "function" && (i.value = !0, clearTimeout(a), a = setTimeout(() => i.value = !1, 300), l(t));
|
|
2507
2523
|
},
|
|
2508
2524
|
disabled: e.disabled,
|
|
2509
|
-
class:
|
|
2525
|
+
class: b(I["elm-button"], !e.isLoading && !e.disabled && I.enable, e.color && I.colored, !e.color && !e.primary && I.normal, !e.color && e.primary && I.primary, o),
|
|
2510
2526
|
style: [{
|
|
2511
2527
|
display: e.block ? "flex" : "inline-flex",
|
|
2512
2528
|
width: e.block ? "100%" : "auto",
|
|
@@ -2514,10 +2530,10 @@ var Ir = {
|
|
|
2514
2530
|
"--elmethis-scoped-opacity": e.disabled || e.isLoading ? .6 : void 0,
|
|
2515
2531
|
"--elmethis-scoped-color": e.color
|
|
2516
2532
|
}, s]
|
|
2517
|
-
}, u), [i.value && r("span", { class:
|
|
2533
|
+
}, u), [i.value && r("span", { class: I.ripple }, null), e.isLoading ? r(Kr, { size: "1.5rem" }, null) : r("span", { class: I.flex }, [n.default?.()])]);
|
|
2518
2534
|
};
|
|
2519
2535
|
}
|
|
2520
|
-
}),
|
|
2536
|
+
}), L = {
|
|
2521
2537
|
"elm-button-dropdown": "_elm-button-dropdown_hhp3p_1",
|
|
2522
2538
|
block: "_block_hhp3p_7",
|
|
2523
2539
|
main: "_main_hhp3p_11",
|
|
@@ -2530,10 +2546,10 @@ var Ir = {
|
|
|
2530
2546
|
};
|
|
2531
2547
|
//#endregion
|
|
2532
2548
|
//#region src/components/form/elm-button-dropdown.tsx
|
|
2533
|
-
function
|
|
2549
|
+
function Yr(e) {
|
|
2534
2550
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !s(e);
|
|
2535
2551
|
}
|
|
2536
|
-
var
|
|
2552
|
+
var Xr = /* @__PURE__ */ i({
|
|
2537
2553
|
name: "ElmButtonDropdown",
|
|
2538
2554
|
props: {
|
|
2539
2555
|
label: {
|
|
@@ -2586,7 +2602,7 @@ var Yr = /* @__PURE__ */ i({
|
|
|
2586
2602
|
},
|
|
2587
2603
|
dropdownIcon: {
|
|
2588
2604
|
type: String,
|
|
2589
|
-
default:
|
|
2605
|
+
default: Xe
|
|
2590
2606
|
}
|
|
2591
2607
|
},
|
|
2592
2608
|
emits: [
|
|
@@ -2596,7 +2612,7 @@ var Yr = /* @__PURE__ */ i({
|
|
|
2596
2612
|
"openChange"
|
|
2597
2613
|
],
|
|
2598
2614
|
setup(t, { emit: n, slots: i }) {
|
|
2599
|
-
let a =
|
|
2615
|
+
let a = Ce(t, "selectedOptionId", n, {
|
|
2600
2616
|
passive: !0,
|
|
2601
2617
|
defaultValue: t.defaultSelectedOptionId ?? null
|
|
2602
2618
|
}), o = m(!1), s = m(null), c = (e) => {
|
|
@@ -2606,14 +2622,14 @@ var Yr = /* @__PURE__ */ i({
|
|
|
2606
2622
|
};
|
|
2607
2623
|
return d(() => document.addEventListener("click", l)), u(() => document.removeEventListener("click", l)), () => {
|
|
2608
2624
|
let l, u = t.items.find((e) => e.id === a.value) ?? null, d = t.disabled || t.disableDropdown || t.isLoading, f = t.disabled || t.disableMainButton, p = {
|
|
2609
|
-
class:
|
|
2625
|
+
class: b(L.main, L.segment),
|
|
2610
2626
|
primary: t.primary,
|
|
2611
2627
|
color: t.color,
|
|
2612
2628
|
isLoading: t.isLoading,
|
|
2613
2629
|
disabled: f,
|
|
2614
2630
|
onClick: () => n("click", u)
|
|
2615
2631
|
}, m = {
|
|
2616
|
-
class:
|
|
2632
|
+
class: b(L.caret, L.segment),
|
|
2617
2633
|
primary: t.primary,
|
|
2618
2634
|
color: t.color,
|
|
2619
2635
|
disabled: d,
|
|
@@ -2623,26 +2639,26 @@ var Yr = /* @__PURE__ */ i({
|
|
|
2623
2639
|
};
|
|
2624
2640
|
return r("div", {
|
|
2625
2641
|
ref: s,
|
|
2626
|
-
class:
|
|
2642
|
+
class: b(L["elm-button-dropdown"], t.block && L.block)
|
|
2627
2643
|
}, [
|
|
2628
|
-
r(
|
|
2629
|
-
r(
|
|
2644
|
+
r(Jr, p, { default: () => [u ? r(e, null, [u.icon && r(w, { src: u.icon }, null), u.label]) : r(e, null, [i.icon?.(), t.label])] }),
|
|
2645
|
+
r(Jr, m, { default: () => [r(O, {
|
|
2630
2646
|
d: t.dropdownIcon,
|
|
2631
2647
|
size: "1.25rem"
|
|
2632
2648
|
}, null)] }),
|
|
2633
2649
|
r(Jt, {
|
|
2634
2650
|
isOpen: o.value,
|
|
2635
|
-
class:
|
|
2636
|
-
},
|
|
2651
|
+
class: L.menu
|
|
2652
|
+
}, Yr(l = t.items.map((e) => r("div", {
|
|
2637
2653
|
key: e.id,
|
|
2638
|
-
class:
|
|
2654
|
+
class: b(L.item, C.text, e.id === a.value && L.selected, e.disabled && L["item-disabled"]),
|
|
2639
2655
|
"aria-selected": e.id === a.value,
|
|
2640
2656
|
onClick: (r) => {
|
|
2641
2657
|
r.stopPropagation(), !e.disabled && (a.value = e.id, e.onClick?.(), n("itemClick", e), t.autoClose && c(!1));
|
|
2642
2658
|
}
|
|
2643
2659
|
}, [
|
|
2644
2660
|
r(O, {
|
|
2645
|
-
d:
|
|
2661
|
+
d: Me,
|
|
2646
2662
|
color: "var(--elmethis-color-primary-weak)",
|
|
2647
2663
|
size: "0.75em"
|
|
2648
2664
|
}, null),
|
|
@@ -2652,7 +2668,7 @@ var Yr = /* @__PURE__ */ i({
|
|
|
2652
2668
|
]);
|
|
2653
2669
|
};
|
|
2654
2670
|
}
|
|
2655
|
-
}),
|
|
2671
|
+
}), R = {
|
|
2656
2672
|
"elm-checkbox": "_elm-checkbox_18dfs_1",
|
|
2657
2673
|
disabled: "_disabled_18dfs_12",
|
|
2658
2674
|
checkbox: "_checkbox_18dfs_22",
|
|
@@ -2662,7 +2678,7 @@ var Yr = /* @__PURE__ */ i({
|
|
|
2662
2678
|
"loading-dot": "_loading-dot_18dfs_39",
|
|
2663
2679
|
"check-line": "_check-line_18dfs_54",
|
|
2664
2680
|
"elmethis-checkbox-check-line": "_elmethis-checkbox-check-line_18dfs_1"
|
|
2665
|
-
},
|
|
2681
|
+
}, Zr = /* @__PURE__ */ i({
|
|
2666
2682
|
name: "ElmCheckbox",
|
|
2667
2683
|
inheritAttrs: !1,
|
|
2668
2684
|
props: {
|
|
@@ -2698,7 +2714,7 @@ var Yr = /* @__PURE__ */ i({
|
|
|
2698
2714
|
return () => {
|
|
2699
2715
|
let { class: n, ...a } = t;
|
|
2700
2716
|
return r("div", c({
|
|
2701
|
-
class:
|
|
2717
|
+
class: b(R["elm-checkbox"], e.disabled && R.disabled, n),
|
|
2702
2718
|
onClick: () => {
|
|
2703
2719
|
!e.isLoading && !e.disabled && (i.value = !i.value);
|
|
2704
2720
|
}
|
|
@@ -2709,13 +2725,13 @@ var Yr = /* @__PURE__ */ i({
|
|
|
2709
2725
|
} }, [r("svg", {
|
|
2710
2726
|
width: "24",
|
|
2711
2727
|
height: "24",
|
|
2712
|
-
class:
|
|
2728
|
+
class: R.checkbox
|
|
2713
2729
|
}, [
|
|
2714
2730
|
r("circle", {
|
|
2715
2731
|
cx: "0",
|
|
2716
2732
|
cy: "0",
|
|
2717
2733
|
r: "2",
|
|
2718
|
-
class:
|
|
2734
|
+
class: R["loading-dot"],
|
|
2719
2735
|
style: { opacity: +!!e.isLoading }
|
|
2720
2736
|
}, [r("animate", {
|
|
2721
2737
|
attributeName: "cx",
|
|
@@ -2736,7 +2752,7 @@ var Yr = /* @__PURE__ */ i({
|
|
|
2736
2752
|
cx: "20",
|
|
2737
2753
|
cy: "20",
|
|
2738
2754
|
r: "2",
|
|
2739
|
-
class:
|
|
2755
|
+
class: R["loading-dot"],
|
|
2740
2756
|
style: { opacity: +!!e.isLoading }
|
|
2741
2757
|
}, [r("animate", {
|
|
2742
2758
|
attributeName: "cx",
|
|
@@ -2758,11 +2774,11 @@ var Yr = /* @__PURE__ */ i({
|
|
|
2758
2774
|
y: "4",
|
|
2759
2775
|
width: "16",
|
|
2760
2776
|
height: "16",
|
|
2761
|
-
class:
|
|
2777
|
+
class: b(R.rect, i.value && R.checked, e.isLoading && R.loading),
|
|
2762
2778
|
"stroke-width": "0.8"
|
|
2763
2779
|
}, null),
|
|
2764
2780
|
i.value && r("polyline", {
|
|
2765
|
-
class:
|
|
2781
|
+
class: R["check-line"],
|
|
2766
2782
|
points: "5,12 10,17 19,8",
|
|
2767
2783
|
"stroke-width": "1.5",
|
|
2768
2784
|
fill: "transparent"
|
|
@@ -2826,7 +2842,7 @@ var Yr = /* @__PURE__ */ i({
|
|
|
2826
2842
|
]), r(T, null, { default: () => [e.label] })])]);
|
|
2827
2843
|
};
|
|
2828
2844
|
}
|
|
2829
|
-
}),
|
|
2845
|
+
}), z = {
|
|
2830
2846
|
"elm-select": "_elm-select_1u7w1_1",
|
|
2831
2847
|
disabled: "_disabled_1u7w1_23",
|
|
2832
2848
|
active: "_active_1u7w1_27",
|
|
@@ -2841,10 +2857,10 @@ var Yr = /* @__PURE__ */ i({
|
|
|
2841
2857
|
};
|
|
2842
2858
|
//#endregion
|
|
2843
2859
|
//#region src/components/form/elm-select.tsx
|
|
2844
|
-
function
|
|
2860
|
+
function Qr(e) {
|
|
2845
2861
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !s(e);
|
|
2846
2862
|
}
|
|
2847
|
-
var
|
|
2863
|
+
var $r = /* @__PURE__ */ i({
|
|
2848
2864
|
name: "ElmSelect",
|
|
2849
2865
|
props: {
|
|
2850
2866
|
label: {
|
|
@@ -2878,7 +2894,7 @@ var Qr = /* @__PURE__ */ i({
|
|
|
2878
2894
|
},
|
|
2879
2895
|
emits: ["update:selectedOptionId"],
|
|
2880
2896
|
setup(e, { emit: t, slots: n }) {
|
|
2881
|
-
let i =
|
|
2897
|
+
let i = Ce(e, "selectedOptionId", t, {
|
|
2882
2898
|
passive: !0,
|
|
2883
2899
|
defaultValue: e.defaultSelectedOptionId ?? null
|
|
2884
2900
|
}), a = m(!1), o = m(null), s = (e) => {
|
|
@@ -2892,29 +2908,29 @@ var Qr = /* @__PURE__ */ i({
|
|
|
2892
2908
|
let t, s = e.options.find((e) => e.id === i.value) ?? null;
|
|
2893
2909
|
return r("div", {
|
|
2894
2910
|
ref: o,
|
|
2895
|
-
class:
|
|
2911
|
+
class: b(z["elm-select"], a.value && z.active, (e.disabled || e.isLoading) && z.disabled),
|
|
2896
2912
|
onClick: c
|
|
2897
|
-
}, [r("span", { class:
|
|
2898
|
-
d:
|
|
2913
|
+
}, [r("span", { class: b(z.label, a.value && z["label-active"]) }, [n.icon?.() ?? r(O, {
|
|
2914
|
+
d: ke,
|
|
2899
2915
|
size: "0.75rem"
|
|
2900
|
-
}, null), e.label]), r("div", { class:
|
|
2901
|
-
r("div", { class:
|
|
2916
|
+
}, null), e.label]), r("div", { class: z.body }, [
|
|
2917
|
+
r("div", { class: b(z["selected-option"], C.text) }, [s ? r("div", { class: z["option-content"] }, [s.icon && r(w, { src: s.icon }, null), r(T, null, { default: () => [s.label] })]) : r("div", { class: z.fallback }, [r("span", null, [e.placeholder ?? "Select an option"])])]),
|
|
2902
2918
|
r(O, {
|
|
2903
|
-
d:
|
|
2919
|
+
d: Xe,
|
|
2904
2920
|
size: "1.5rem"
|
|
2905
2921
|
}, null),
|
|
2906
2922
|
r(Jt, {
|
|
2907
2923
|
isOpen: a.value,
|
|
2908
|
-
class:
|
|
2909
|
-
},
|
|
2924
|
+
class: z.pulldown
|
|
2925
|
+
}, Qr(t = e.options.map((e) => r("div", {
|
|
2910
2926
|
key: e.id,
|
|
2911
|
-
class:
|
|
2927
|
+
class: b(z.option, C.text),
|
|
2912
2928
|
onClick: (t) => {
|
|
2913
2929
|
t.stopPropagation(), i.value = e.id, a.value = !1;
|
|
2914
2930
|
}
|
|
2915
2931
|
}, [
|
|
2916
2932
|
r(O, {
|
|
2917
|
-
d:
|
|
2933
|
+
d: Me,
|
|
2918
2934
|
color: "var(--elmethis-color-primary-weak)",
|
|
2919
2935
|
size: "0.75em"
|
|
2920
2936
|
}, null),
|
|
@@ -2924,7 +2940,7 @@ var Qr = /* @__PURE__ */ i({
|
|
|
2924
2940
|
])]);
|
|
2925
2941
|
};
|
|
2926
2942
|
}
|
|
2927
|
-
}),
|
|
2943
|
+
}), B = {
|
|
2928
2944
|
"elm-slider": "_elm-slider_1cmd9_1",
|
|
2929
2945
|
vertical: "_vertical_1cmd9_7",
|
|
2930
2946
|
disabled: "_disabled_1cmd9_12",
|
|
@@ -2943,7 +2959,7 @@ var Qr = /* @__PURE__ */ i({
|
|
|
2943
2959
|
tick: "_tick_1cmd9_274",
|
|
2944
2960
|
"mark-restricted": "_mark-restricted_1cmd9_287",
|
|
2945
2961
|
"mark-label": "_mark-label_1cmd9_207"
|
|
2946
|
-
},
|
|
2962
|
+
}, V = (e, t, n) => Math.min(n, Math.max(t, e)), H = (e) => Math.round(e * 1e9) / 1e9, ei = 500, ti = (e) => e == null || typeof e == "boolean" ? "" : typeof e == "string" ? e : typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(ti).join("") : s(e) ? ti(e.children) : "", ni = /* @__PURE__ */ i({
|
|
2947
2963
|
name: "ElmSlider",
|
|
2948
2964
|
inheritAttrs: !1,
|
|
2949
2965
|
props: {
|
|
@@ -2998,24 +3014,24 @@ var Qr = /* @__PURE__ */ i({
|
|
|
2998
3014
|
},
|
|
2999
3015
|
emits: ["update:value"],
|
|
3000
3016
|
setup(e, { attrs: n, emit: i }) {
|
|
3001
|
-
let a = m(null), o = t(() => e.orientation === "vertical"), s = t(() => Math.min(e.min, e.max)), l = t(() => Math.max(e.min, e.max)), u = t(() =>
|
|
3017
|
+
let a = m(null), o = t(() => e.orientation === "vertical"), s = t(() => Math.min(e.min, e.max)), l = t(() => Math.max(e.min, e.max)), u = t(() => V(e.innerMin ?? s.value, s.value, l.value)), d = t(() => V(e.innerMax ?? l.value, u.value, l.value)), f = (t) => {
|
|
3002
3018
|
let n = Math.abs(e.step);
|
|
3003
|
-
return H(
|
|
3004
|
-
}, p = (e) => H(
|
|
3019
|
+
return V(H(n > 0 ? e.min + Math.round((t - e.min) / n) * n : t), u.value, d.value);
|
|
3020
|
+
}, p = (e) => V(H(e), u.value, d.value), h = Yt({
|
|
3005
3021
|
props: e,
|
|
3006
3022
|
key: "value",
|
|
3007
3023
|
emit: i,
|
|
3008
3024
|
defaultValue: p(e.defaultValue ?? (u.value + d.value) / 2)
|
|
3009
|
-
}), g = (t) => e.max === e.min ? 0 :
|
|
3025
|
+
}), g = (t) => e.max === e.min ? 0 : V((t - e.min) / (e.max - e.min), 0, 1), _ = (t, n) => {
|
|
3010
3026
|
let r = a.value;
|
|
3011
3027
|
if (!r) return h.value;
|
|
3012
|
-
let i = r.getBoundingClientRect(), s = o.value ? i.height === 0 ? 0 :
|
|
3028
|
+
let i = r.getBoundingClientRect(), s = o.value ? i.height === 0 ? 0 : V((i.bottom - n) / i.height, 0, 1) : i.width === 0 ? 0 : V((t - i.left) / i.width, 0, 1);
|
|
3013
3029
|
return f(e.min + s * (e.max - e.min));
|
|
3014
3030
|
}, ee = (t) => {
|
|
3015
3031
|
e.disabled || (t.currentTarget.setPointerCapture(t.pointerId), h.value = _(t.clientX, t.clientY));
|
|
3016
3032
|
}, te = (t) => {
|
|
3017
3033
|
e.disabled || t.currentTarget.hasPointerCapture(t.pointerId) && (h.value = _(t.clientX, t.clientY));
|
|
3018
|
-
}, v = t(() =>
|
|
3034
|
+
}, v = t(() => V(h.value, u.value, d.value)), ne = (t) => {
|
|
3019
3035
|
if (e.disabled) return;
|
|
3020
3036
|
let n = Math.abs(e.step);
|
|
3021
3037
|
switch (t.key) {
|
|
@@ -3040,27 +3056,27 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3040
3056
|
t.preventDefault(), h.value = d.value;
|
|
3041
3057
|
break;
|
|
3042
3058
|
}
|
|
3043
|
-
},
|
|
3059
|
+
}, re = t(() => {
|
|
3044
3060
|
if (!e.markers && !e.markerLabels) return [];
|
|
3045
3061
|
let t = Math.abs(e.step);
|
|
3046
3062
|
if (t <= 0 || e.max <= e.min) return [];
|
|
3047
|
-
let n = Math.floor(
|
|
3048
|
-
if (n <=
|
|
3063
|
+
let n = Math.floor(H((e.max - e.min) / t)), r = [];
|
|
3064
|
+
if (n <= ei) {
|
|
3049
3065
|
for (let i = 0; i <= n; i++) {
|
|
3050
|
-
let n =
|
|
3066
|
+
let n = H(e.min + i * t);
|
|
3051
3067
|
r.push({
|
|
3052
3068
|
value: n,
|
|
3053
3069
|
ratio: g(n)
|
|
3054
3070
|
});
|
|
3055
3071
|
}
|
|
3056
|
-
|
|
3072
|
+
H(e.min + n * t) !== H(e.max) && r.push({
|
|
3057
3073
|
value: e.max,
|
|
3058
3074
|
ratio: g(e.max)
|
|
3059
3075
|
});
|
|
3060
3076
|
} else {
|
|
3061
|
-
let t = (e.max - e.min) /
|
|
3062
|
-
for (let n = 0; n <=
|
|
3063
|
-
let i = n ===
|
|
3077
|
+
let t = (e.max - e.min) / ei;
|
|
3078
|
+
for (let n = 0; n <= ei; n++) {
|
|
3079
|
+
let i = n === ei ? e.max : H(e.min + n * t);
|
|
3064
3080
|
r.push({
|
|
3065
3081
|
value: i,
|
|
3066
3082
|
ratio: g(i)
|
|
@@ -3068,11 +3084,11 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3068
3084
|
}
|
|
3069
3085
|
}
|
|
3070
3086
|
return r;
|
|
3071
|
-
}),
|
|
3087
|
+
}), y = t(() => {
|
|
3072
3088
|
if (!e.markerLabels) return 0;
|
|
3073
3089
|
let t = 0;
|
|
3074
|
-
for (let n of
|
|
3075
|
-
let r =
|
|
3090
|
+
for (let n of re.value) {
|
|
3091
|
+
let r = ti(e.formatMarkerLabel?.(n.value) ?? n.value);
|
|
3076
3092
|
r.length > t && (t = r.length);
|
|
3077
3093
|
}
|
|
3078
3094
|
return t;
|
|
@@ -3080,17 +3096,17 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3080
3096
|
return () => {
|
|
3081
3097
|
let { class: t, style: i, onKeydown: s, ...l } = n, f = g(v.value), p = g(u.value), m = g(d.value);
|
|
3082
3098
|
return r("div", {
|
|
3083
|
-
class:
|
|
3099
|
+
class: b(B["elm-slider"], o.value && B.vertical, e.disabled && B.disabled, e.markers && B["has-markers"], e.markerLabels && B["has-marker-labels"], t),
|
|
3084
3100
|
style: {
|
|
3085
3101
|
"--elmethis-scoped-value-ratio": f,
|
|
3086
3102
|
"--elmethis-scoped-inner-min-ratio": p,
|
|
3087
3103
|
"--elmethis-scoped-inner-max-ratio": m,
|
|
3088
|
-
"--elmethis-scoped-max-marker-label-chars":
|
|
3104
|
+
"--elmethis-scoped-max-marker-label-chars": y.value,
|
|
3089
3105
|
...i
|
|
3090
3106
|
}
|
|
3091
3107
|
}, [r("div", c({
|
|
3092
3108
|
ref: a,
|
|
3093
|
-
class:
|
|
3109
|
+
class: B.track,
|
|
3094
3110
|
tabindex: e.disabled ? -1 : 0,
|
|
3095
3111
|
onPointerdown: ee,
|
|
3096
3112
|
onPointermove: te,
|
|
@@ -3106,35 +3122,35 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3106
3122
|
"aria-disabled": e.disabled || void 0
|
|
3107
3123
|
}), [
|
|
3108
3124
|
r("div", {
|
|
3109
|
-
class:
|
|
3125
|
+
class: B.rail,
|
|
3110
3126
|
"aria-hidden": "true"
|
|
3111
3127
|
}, [
|
|
3112
|
-
r("div", { class:
|
|
3113
|
-
r("div", { class:
|
|
3114
|
-
r("div", { class:
|
|
3128
|
+
r("div", { class: B["restricted-start"] }, null),
|
|
3129
|
+
r("div", { class: B.fill }, null),
|
|
3130
|
+
r("div", { class: B["restricted-end"] }, null)
|
|
3115
3131
|
]),
|
|
3116
|
-
|
|
3117
|
-
class:
|
|
3132
|
+
re.value.length > 0 && r("div", {
|
|
3133
|
+
class: B.marks,
|
|
3118
3134
|
"aria-hidden": "true"
|
|
3119
|
-
}, [
|
|
3135
|
+
}, [re.value.map((t, n) => r("span", {
|
|
3120
3136
|
key: t.value,
|
|
3121
|
-
class:
|
|
3137
|
+
class: b(B.mark, n === 0 && B["mark-start"], n === re.value.length - 1 && B["mark-end"], (t.value < u.value || t.value > d.value) && B["mark-restricted"]),
|
|
3122
3138
|
style: { "--elmethis-scoped-marker-ratio": t.ratio }
|
|
3123
|
-
}, [e.markers && r("i", { class:
|
|
3139
|
+
}, [e.markers && r("i", { class: B.tick }, null), e.markerLabels && r("span", { class: B["mark-label"] }, [e.formatMarkerLabel?.(t.value) ?? t.value])]))]),
|
|
3124
3140
|
r("span", {
|
|
3125
|
-
class:
|
|
3141
|
+
class: B.thumb,
|
|
3126
3142
|
"aria-hidden": "true"
|
|
3127
3143
|
}, null)
|
|
3128
3144
|
])]);
|
|
3129
3145
|
};
|
|
3130
3146
|
}
|
|
3131
|
-
}),
|
|
3147
|
+
}), U = {
|
|
3132
3148
|
switch: "_switch_9s4vz_1",
|
|
3133
3149
|
bar: "_bar_9s4vz_5",
|
|
3134
3150
|
checked: "_checked_9s4vz_21",
|
|
3135
3151
|
disabled: "_disabled_9s4vz_26",
|
|
3136
3152
|
circle: "_circle_9s4vz_31"
|
|
3137
|
-
},
|
|
3153
|
+
}, ri = /* @__PURE__ */ i({
|
|
3138
3154
|
name: "ElmSwitch",
|
|
3139
3155
|
props: {
|
|
3140
3156
|
color: {
|
|
@@ -3167,13 +3183,13 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3167
3183
|
"--elmethis-scoped-width": "calc(var(--elmethis-scoped-size) * 2 + var(--elmethis-scoped-padding) * 2)"
|
|
3168
3184
|
}
|
|
3169
3185
|
}, [r("input", {
|
|
3170
|
-
class:
|
|
3186
|
+
class: U.switch,
|
|
3171
3187
|
type: "checkbox",
|
|
3172
3188
|
checked: e.checked,
|
|
3173
3189
|
disabled: e.disabled
|
|
3174
|
-
}, null), r("div", { class:
|
|
3190
|
+
}, null), r("div", { class: b(U.bar, e.checked && U.checked, e.disabled && U.disabled) }, [r("div", { class: b(U.circle, e.checked && U.checked, e.disabled && U.disabled) }, null)])]);
|
|
3175
3191
|
}
|
|
3176
|
-
}),
|
|
3192
|
+
}), W = {
|
|
3177
3193
|
loading: "_loading_lgmx3_23",
|
|
3178
3194
|
"elm-text-area": "_elm-text-area_lgmx3_37",
|
|
3179
3195
|
disabled: "_disabled_lgmx3_63",
|
|
@@ -3183,7 +3199,7 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3183
3199
|
requierd: "_requierd_lgmx3_90",
|
|
3184
3200
|
body: "_body_lgmx3_96",
|
|
3185
3201
|
textarea: "_textarea_lgmx3_101"
|
|
3186
|
-
},
|
|
3202
|
+
}, ii = /* @__PURE__ */ i({
|
|
3187
3203
|
name: "ElmTextArea",
|
|
3188
3204
|
inheritAttrs: !1,
|
|
3189
3205
|
props: {
|
|
@@ -3230,25 +3246,25 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3230
3246
|
return () => {
|
|
3231
3247
|
let { class: t, style: p, onFocus: m, onBlur: h, ...g } = i;
|
|
3232
3248
|
return r("label", {
|
|
3233
|
-
class:
|
|
3249
|
+
class: b(W["elm-text-area"], s.value && W.active, (e.disabled || e.isLoading) && W.disabled, t),
|
|
3234
3250
|
style: p
|
|
3235
3251
|
}, [
|
|
3236
|
-
r("span", { class:
|
|
3252
|
+
r("span", { class: b(W.header, s.value && W["label-active"]) }, [
|
|
3237
3253
|
o.icon?.() ?? r(O, {
|
|
3238
|
-
d:
|
|
3254
|
+
d: ot,
|
|
3239
3255
|
size: "0.75rem"
|
|
3240
3256
|
}, null),
|
|
3241
|
-
r("span", null, [e.label, e.required && r("span", { class:
|
|
3257
|
+
r("span", null, [e.label, e.required && r("span", { class: W.requierd }, [n("*")])]),
|
|
3242
3258
|
d.value && r(T, {
|
|
3243
3259
|
color: e.maxLength != null && f.value > e.maxLength ? "var(--elmethis-color-accent-error)" : "gray",
|
|
3244
3260
|
size: "0.75rem"
|
|
3245
3261
|
}, { default: () => [e.maxLength == null ? `${f.value}` : `${f.value} / ${e.maxLength}`] })
|
|
3246
3262
|
]),
|
|
3247
|
-
r("div", { class:
|
|
3263
|
+
r("div", { class: W.body }, [r("textarea", c({
|
|
3248
3264
|
value: u.value,
|
|
3249
3265
|
rows: e.rows,
|
|
3250
3266
|
maxlength: e.maxLength,
|
|
3251
|
-
class:
|
|
3267
|
+
class: W.textarea,
|
|
3252
3268
|
placeholder: e.placeholder,
|
|
3253
3269
|
onFocus: (e) => {
|
|
3254
3270
|
s.value = !0, m?.(e);
|
|
@@ -3265,13 +3281,13 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3265
3281
|
}
|
|
3266
3282
|
}, g), null)]),
|
|
3267
3283
|
r("div", {
|
|
3268
|
-
class:
|
|
3284
|
+
class: W.loading,
|
|
3269
3285
|
style: { opacity: +!!e.isLoading }
|
|
3270
3286
|
}, null)
|
|
3271
3287
|
]);
|
|
3272
3288
|
};
|
|
3273
3289
|
}
|
|
3274
|
-
}),
|
|
3290
|
+
}), G = {
|
|
3275
3291
|
loading: "_loading_11box_23",
|
|
3276
3292
|
"elm-text-field": "_elm-text-field_11box_37",
|
|
3277
3293
|
disabled: "_disabled_11box_59",
|
|
@@ -3284,7 +3300,7 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3284
3300
|
"right-icon-box": "_right-icon-box_11box_121",
|
|
3285
3301
|
"clickable-icon": "_clickable-icon_11box_126",
|
|
3286
3302
|
"prefix-suffix": "_prefix-suffix_11box_142"
|
|
3287
|
-
},
|
|
3303
|
+
}, ai = /* @__PURE__ */ i({
|
|
3288
3304
|
name: "ElmTextField",
|
|
3289
3305
|
inheritAttrs: !1,
|
|
3290
3306
|
props: {
|
|
@@ -3338,27 +3354,27 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3338
3354
|
return () => {
|
|
3339
3355
|
let { class: d, style: f, onFocus: p, onBlur: m, ...h } = t, g = e.value == null ? 0 : String(e.value).length;
|
|
3340
3356
|
return r("label", {
|
|
3341
|
-
class:
|
|
3357
|
+
class: b(G["elm-text-field"], s.value && G.active, (e.disabled || e.isLoading) && G.disabled, d),
|
|
3342
3358
|
style: f
|
|
3343
3359
|
}, [
|
|
3344
|
-
r("span", { class:
|
|
3360
|
+
r("span", { class: b(G.header, s.value && G["label-active"]) }, [
|
|
3345
3361
|
a.icon?.() ?? r(O, {
|
|
3346
|
-
d:
|
|
3362
|
+
d: at,
|
|
3347
3363
|
size: "0.75rem"
|
|
3348
3364
|
}, null),
|
|
3349
|
-
r("span", null, [e.label, e.required && r("span", { class:
|
|
3365
|
+
r("span", null, [e.label, e.required && r("span", { class: G.requierd }, [n("*")])]),
|
|
3350
3366
|
e.value != null && r(T, {
|
|
3351
3367
|
color: e.maxLength != null && g > e.maxLength ? "var(--elmethis-color-accent-error)" : "gray",
|
|
3352
3368
|
size: "0.75rem"
|
|
3353
3369
|
}, { default: () => [e.maxLength == null ? `${g}` : `${g} / ${e.maxLength}`] })
|
|
3354
3370
|
]),
|
|
3355
|
-
r("div", { class:
|
|
3356
|
-
e.prefix && r("span", { class:
|
|
3371
|
+
r("div", { class: G.body }, [
|
|
3372
|
+
e.prefix && r("span", { class: G["prefix-suffix"] }, [e.prefix]),
|
|
3357
3373
|
r("input", c({
|
|
3358
3374
|
ref: o,
|
|
3359
3375
|
value: e.value,
|
|
3360
3376
|
type: l.value,
|
|
3361
|
-
class:
|
|
3377
|
+
class: G.input,
|
|
3362
3378
|
placeholder: e.placeholder,
|
|
3363
3379
|
onInput: (e) => {
|
|
3364
3380
|
i("update:value", e.target.value);
|
|
@@ -3373,38 +3389,38 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3373
3389
|
style: { cursor: e.disabled ? "not-allowed" : e.isLoading ? "progress" : "auto" },
|
|
3374
3390
|
"aria-required": e.required
|
|
3375
3391
|
}, h), null),
|
|
3376
|
-
r("div", { class:
|
|
3377
|
-
r("span", { class:
|
|
3392
|
+
r("div", { class: G["right-icon-box"] }, [
|
|
3393
|
+
r("span", { class: G["prefix-suffix"] }, [e.suffix != null && r(T, null, { default: () => [e.suffix] })]),
|
|
3378
3394
|
r("div", {
|
|
3379
|
-
class:
|
|
3395
|
+
class: G["clickable-icon"],
|
|
3380
3396
|
onClick: () => {
|
|
3381
3397
|
!e.isLoading && !e.disabled && (l.value = l.value === "text" ? "password" : "text");
|
|
3382
3398
|
}
|
|
3383
3399
|
}, [r(O, {
|
|
3384
|
-
d: l.value === "text" ?
|
|
3400
|
+
d: l.value === "text" ? Re : Le,
|
|
3385
3401
|
size: "1.25rem",
|
|
3386
3402
|
color: "gray"
|
|
3387
3403
|
}, null)]),
|
|
3388
3404
|
r("div", {
|
|
3389
|
-
class:
|
|
3405
|
+
class: G["clickable-icon"],
|
|
3390
3406
|
onClick: () => {
|
|
3391
3407
|
!e.isLoading && !e.disabled && u("");
|
|
3392
3408
|
}
|
|
3393
3409
|
}, [r(O, {
|
|
3394
|
-
d:
|
|
3410
|
+
d: st,
|
|
3395
3411
|
size: "1.25rem",
|
|
3396
3412
|
color: "gray"
|
|
3397
3413
|
}, null)])
|
|
3398
3414
|
])
|
|
3399
3415
|
]),
|
|
3400
3416
|
r("div", {
|
|
3401
|
-
class:
|
|
3417
|
+
class: G.loading,
|
|
3402
3418
|
style: { opacity: +!!e.isLoading }
|
|
3403
3419
|
}, null)
|
|
3404
3420
|
]);
|
|
3405
3421
|
};
|
|
3406
3422
|
}
|
|
3407
|
-
}),
|
|
3423
|
+
}), oi = { "elm-validation": "_elm-validation_1cigg_1" }, si = /* @__PURE__ */ i({
|
|
3408
3424
|
name: "ElmValidation",
|
|
3409
3425
|
props: {
|
|
3410
3426
|
text: {
|
|
@@ -3422,14 +3438,14 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3422
3438
|
},
|
|
3423
3439
|
setup(e) {
|
|
3424
3440
|
return () => r("div", {
|
|
3425
|
-
class:
|
|
3441
|
+
class: b(oi["elm-validation"]),
|
|
3426
3442
|
style: { "--elmethis-scoped-opacity": e.isValid ? 1 : .5 }
|
|
3427
3443
|
}, [r(O, {
|
|
3428
|
-
d: e.isValid ?
|
|
3444
|
+
d: e.isValid ? Ae : je,
|
|
3429
3445
|
color: e.isValid ? e.validColor : void 0
|
|
3430
3446
|
}, null), r(T, { color: e.isValid ? e.validColor : void 0 }, { default: () => [e.text] })]);
|
|
3431
3447
|
}
|
|
3432
|
-
}),
|
|
3448
|
+
}), ci = /* @__PURE__ */ i({
|
|
3433
3449
|
name: "ElmCopyIcon",
|
|
3434
3450
|
inheritAttrs: !1,
|
|
3435
3451
|
props: { content: {
|
|
@@ -3444,11 +3460,11 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3444
3460
|
});
|
|
3445
3461
|
return () => a(n);
|
|
3446
3462
|
}
|
|
3447
|
-
}),
|
|
3463
|
+
}), li = {
|
|
3448
3464
|
"elm-square-loading-icon": "_elm-square-loading-icon_m72nq_19",
|
|
3449
3465
|
square: "_square_m72nq_28",
|
|
3450
3466
|
appear: "_appear_m72nq_1"
|
|
3451
|
-
},
|
|
3467
|
+
}, ui = /* @__PURE__ */ i({
|
|
3452
3468
|
name: "ElmSquareLoadingIcon",
|
|
3453
3469
|
inheritAttrs: !1,
|
|
3454
3470
|
props: {
|
|
@@ -3466,11 +3482,11 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3466
3482
|
let { class: n, style: i, ...a } = t, o = 1200, s = o / (e.dimensions * 3), l = [];
|
|
3467
3483
|
for (let t = 0; t < e.dimensions; t++) for (let n = 0; n < e.dimensions; n++) l.push(r("span", {
|
|
3468
3484
|
key: `${t}-${n}`,
|
|
3469
|
-
class:
|
|
3485
|
+
class: li.square,
|
|
3470
3486
|
style: { "--elmethis-scoped-delay": `${s * (t + n)}ms` }
|
|
3471
3487
|
}, null));
|
|
3472
3488
|
return r("span", c({
|
|
3473
|
-
class:
|
|
3489
|
+
class: b(li["elm-square-loading-icon"], n),
|
|
3474
3490
|
style: [{
|
|
3475
3491
|
"--elmethis-scoped-size": e.size,
|
|
3476
3492
|
"--elmethis-scoped-dimensions": e.dimensions,
|
|
@@ -3479,12 +3495,12 @@ var Qr = /* @__PURE__ */ i({
|
|
|
3479
3495
|
}, a), [l]);
|
|
3480
3496
|
};
|
|
3481
3497
|
}
|
|
3482
|
-
}),
|
|
3498
|
+
}), K = "elmethis-theme", di = "elmethis-theme-change", fi = (e) => e === "dark" ? "dark" : e === "light" ? "light" : null, pi = () => typeof matchMedia < "u" && matchMedia("(prefers-color-scheme: dark)").matches, mi = (e, t) => {
|
|
3483
3499
|
let n = document.documentElement;
|
|
3484
|
-
e == null ? (n.style.removeProperty("color-scheme"), n.removeAttribute("data-theme"), t && typeof localStorage < "u" && localStorage.removeItem(
|
|
3500
|
+
e == null ? (n.style.removeProperty("color-scheme"), n.removeAttribute("data-theme"), t && typeof localStorage < "u" && localStorage.removeItem(K)) : (n.style.colorScheme = e, n.setAttribute("data-theme", e), t && typeof localStorage < "u" && localStorage.setItem(K, e)), window.dispatchEvent(new CustomEvent(di, { detail: e }));
|
|
3485
3501
|
}, hi = () => {
|
|
3486
3502
|
if (typeof window > "u") return !1;
|
|
3487
|
-
let e = fi(localStorage.getItem(
|
|
3503
|
+
let e = fi(localStorage.getItem(K));
|
|
3488
3504
|
return e == null ? pi() : e === "dark";
|
|
3489
3505
|
};
|
|
3490
3506
|
function gi() {
|
|
@@ -3494,15 +3510,15 @@ function gi() {
|
|
|
3494
3510
|
let n = t.detail;
|
|
3495
3511
|
e.value = n == null ? pi() : n === "dark";
|
|
3496
3512
|
}, r = (t) => {
|
|
3497
|
-
if (t.key !==
|
|
3513
|
+
if (t.key !== K) return;
|
|
3498
3514
|
let n = fi(t.newValue);
|
|
3499
3515
|
e.value = n == null ? pi() : n === "dark", mi(n, !1);
|
|
3500
3516
|
}, i, a = (t) => {
|
|
3501
|
-
fi(localStorage.getItem(
|
|
3517
|
+
fi(localStorage.getItem(K)) ?? (e.value = t.matches);
|
|
3502
3518
|
};
|
|
3503
3519
|
return d(() => {
|
|
3504
3520
|
window.addEventListener(di, n), window.addEventListener("storage", r);
|
|
3505
|
-
let e = fi(localStorage.getItem(
|
|
3521
|
+
let e = fi(localStorage.getItem(K));
|
|
3506
3522
|
e != null && mi(e, !1), typeof matchMedia < "u" && (i = matchMedia("(prefers-color-scheme: dark)"), i.addEventListener("change", a));
|
|
3507
3523
|
}), u(() => {
|
|
3508
3524
|
window.removeEventListener(di, n), window.removeEventListener("storage", r), i?.removeEventListener("change", a);
|
|
@@ -3526,7 +3542,7 @@ var _i = { "elm-toggle-theme": "_elm-toggle-theme_11awq_1" }, vi = /* @__PURE__
|
|
|
3526
3542
|
width: e.size,
|
|
3527
3543
|
height: e.size,
|
|
3528
3544
|
viewBox: "0 0 24 24",
|
|
3529
|
-
class:
|
|
3545
|
+
class: b(_i["elm-toggle-theme"]),
|
|
3530
3546
|
onClick: n
|
|
3531
3547
|
}, [
|
|
3532
3548
|
r("path", {
|
|
@@ -3738,7 +3754,7 @@ var _i = { "elm-toggle-theme": "_elm-toggle-theme_11awq_1" }, vi = /* @__PURE__
|
|
|
3738
3754
|
width: e.size,
|
|
3739
3755
|
height: e.size,
|
|
3740
3756
|
viewBox: "0 0 24 24",
|
|
3741
|
-
class:
|
|
3757
|
+
class: b(_i["elm-toggle-theme"]),
|
|
3742
3758
|
onClick: n
|
|
3743
3759
|
}, [
|
|
3744
3760
|
r("g", {
|
|
@@ -3923,7 +3939,7 @@ var _i = { "elm-toggle-theme": "_elm-toggle-theme_11awq_1" }, vi = /* @__PURE__
|
|
|
3923
3939
|
required: !0
|
|
3924
3940
|
} },
|
|
3925
3941
|
setup(e) {
|
|
3926
|
-
return () => r("nav", { class:
|
|
3942
|
+
return () => r("nav", { class: b(yi["elm-breadcrumb"]) }, [e.links.map((t, n) => r("span", {
|
|
3927
3943
|
key: n,
|
|
3928
3944
|
style: { display: "contents" }
|
|
3929
3945
|
}, [r("span", {
|
|
@@ -3931,11 +3947,11 @@ var _i = { "elm-toggle-theme": "_elm-toggle-theme_11awq_1" }, vi = /* @__PURE__
|
|
|
3931
3947
|
onClick: t.onClick
|
|
3932
3948
|
}, [r(O, {
|
|
3933
3949
|
class: yi.icon,
|
|
3934
|
-
d: n === 0 ?
|
|
3950
|
+
d: n === 0 ? Ke : n === e.links.length - 1 ? Oe : Ve,
|
|
3935
3951
|
size: "1rem"
|
|
3936
3952
|
}, null), r("span", { class: yi.chunk }, [t.text])]), e.links.length !== n + 1 && r(O, {
|
|
3937
3953
|
class: yi.chevron,
|
|
3938
|
-
d:
|
|
3954
|
+
d: Me,
|
|
3939
3955
|
size: "1rem"
|
|
3940
3956
|
}, null)]))]);
|
|
3941
3957
|
}
|
|
@@ -3965,7 +3981,7 @@ var _i = { "elm-toggle-theme": "_elm-toggle-theme_11awq_1" }, vi = /* @__PURE__
|
|
|
3965
3981
|
});
|
|
3966
3982
|
};
|
|
3967
3983
|
return () => r("nav", {
|
|
3968
|
-
class:
|
|
3984
|
+
class: b(xi["elm-page-top"], t.value && xi.visible),
|
|
3969
3985
|
style: {
|
|
3970
3986
|
"--elmethis-scoped-size": "64px",
|
|
3971
3987
|
left: e.position === "left" ? "0" : "auto",
|
|
@@ -4081,7 +4097,7 @@ var _i = { "elm-toggle-theme": "_elm-toggle-theme_11awq_1" }, vi = /* @__PURE__
|
|
|
4081
4097
|
}, 1500);
|
|
4082
4098
|
};
|
|
4083
4099
|
return () => r("div", {
|
|
4084
|
-
class:
|
|
4100
|
+
class: b(q["elm-color-primitive-sample"]),
|
|
4085
4101
|
onClick: (e) => {
|
|
4086
4102
|
a(e);
|
|
4087
4103
|
}
|
|
@@ -4094,7 +4110,7 @@ var _i = { "elm-toggle-theme": "_elm-toggle-theme_11awq_1" }, vi = /* @__PURE__
|
|
|
4094
4110
|
}, [
|
|
4095
4111
|
r(O, {
|
|
4096
4112
|
class: q["mode-toggle-icon"],
|
|
4097
|
-
d: t.value === "hex" ?
|
|
4113
|
+
d: t.value === "hex" ? Ge : He,
|
|
4098
4114
|
size: "1.25rem"
|
|
4099
4115
|
}, null),
|
|
4100
4116
|
n("Copy: "),
|
|
@@ -4262,7 +4278,7 @@ var _i = { "elm-toggle-theme": "_elm-toggle-theme_11awq_1" }, vi = /* @__PURE__
|
|
|
4262
4278
|
}
|
|
4263
4279
|
}, [r("span", { "data-copy-token": e }, [o(e)]), r("span", { "data-copy-token": t }, [o(t)])]))])
|
|
4264
4280
|
])])]);
|
|
4265
|
-
return () => r("div", { class:
|
|
4281
|
+
return () => r("div", { class: b(Y["elm-color-semantic-sample"]) }, [r("div", { class: Y.toolbar }, [r("button", {
|
|
4266
4282
|
type: "button",
|
|
4267
4283
|
class: Y["mode-toggle"],
|
|
4268
4284
|
onClick: () => {
|
|
@@ -4271,7 +4287,7 @@ var _i = { "elm-toggle-theme": "_elm-toggle-theme_11awq_1" }, vi = /* @__PURE__
|
|
|
4271
4287
|
}, [
|
|
4272
4288
|
r(O, {
|
|
4273
4289
|
class: Y["mode-toggle-icon"],
|
|
4274
|
-
d: t.value === "hex" ?
|
|
4290
|
+
d: t.value === "hex" ? Ge : He,
|
|
4275
4291
|
size: "1.25rem"
|
|
4276
4292
|
}, null),
|
|
4277
4293
|
n("Copy: "),
|
|
@@ -4297,7 +4313,7 @@ var Z = (e) => {
|
|
|
4297
4313
|
case "blockquote":
|
|
4298
4314
|
if (c.tokens && c.tokens.length !== 0) {
|
|
4299
4315
|
let e;
|
|
4300
|
-
o.push(r(
|
|
4316
|
+
o.push(r(pr, { key: s }, X(e = Z(c.tokens)) ? e : { default: () => [e] }));
|
|
4301
4317
|
}
|
|
4302
4318
|
break;
|
|
4303
4319
|
case "br":
|
|
@@ -4438,7 +4454,7 @@ var Z = (e) => {
|
|
|
4438
4454
|
setup(e) {
|
|
4439
4455
|
let t = h([]), n = h([]);
|
|
4440
4456
|
return _(() => e.markdown, (r) => {
|
|
4441
|
-
let i =
|
|
4457
|
+
let i = qt.setOptions({ gfm: !0 }).lexer(r);
|
|
4442
4458
|
if (e.isStreaming && i.length > 0) {
|
|
4443
4459
|
let e = i.slice(0, -1);
|
|
4444
4460
|
e.length !== t.value.length && (t.value = e), n.value = i.slice(-1);
|
|
@@ -4601,7 +4617,7 @@ var qi = (e) => {
|
|
|
4601
4617
|
let n = "", o = "empty";
|
|
4602
4618
|
return a ? (n = a[t].letter.toUpperCase(), o = a[t].status) : s && (n = (i[t] ?? "").toUpperCase(), o = n ? "tbd" : "empty"), r("div", {
|
|
4603
4619
|
key: t,
|
|
4604
|
-
class:
|
|
4620
|
+
class: b(Q.cell, o === "correct" && Q.correct, o === "present" && Q.present, o === "absent" && Q.absent, o === "tbd" && Q.tbd, o === "empty" && Q.empty)
|
|
4605
4621
|
}, [n]);
|
|
4606
4622
|
});
|
|
4607
4623
|
return r("div", {
|
|
@@ -4611,7 +4627,7 @@ var qi = (e) => {
|
|
|
4611
4627
|
});
|
|
4612
4628
|
return r("div", { class: Q["elm-wordle"] }, [
|
|
4613
4629
|
r("div", {
|
|
4614
|
-
class:
|
|
4630
|
+
class: b(Q["message-area"], d ? Q.error : o === "playing" ? void 0 : Q.status),
|
|
4615
4631
|
"aria-live": "polite"
|
|
4616
4632
|
}, [d || (o === "won" ? `🎉 You won in ${t.length} ${t.length === 1 ? "guess" : "guesses"}!` : o === "lost" ? `😢 The word was "${e.toUpperCase()}"` : null)]),
|
|
4617
4633
|
r("div", { class: Q.board }, [p]),
|
|
@@ -4629,10 +4645,10 @@ var qi = (e) => {
|
|
|
4629
4645
|
return r("button", {
|
|
4630
4646
|
key: e,
|
|
4631
4647
|
"data-key": e,
|
|
4632
|
-
class:
|
|
4648
|
+
class: b(Q.key, e === "Enter" && Q.wide, e === "⌫" && Q.wide, t === "correct" && Q.correct, t === "present" && Q.present, t === "absent" && Q.absent)
|
|
4633
4649
|
}, [e]);
|
|
4634
4650
|
})]))]),
|
|
4635
|
-
r("div", { class:
|
|
4651
|
+
r("div", { class: b(Q["reset-container"], o === "playing" && Q.hidden) }, [r("button", {
|
|
4636
4652
|
class: Q["reset-button"],
|
|
4637
4653
|
onClick: f
|
|
4638
4654
|
}, [n("Play Again")])])
|
|
@@ -4655,4 +4671,4 @@ var qi = (e) => {
|
|
|
4655
4671
|
};
|
|
4656
4672
|
};
|
|
4657
4673
|
//#endregion
|
|
4658
|
-
export { Mn as A2uiSurface, gn as CatalogRenderer, Nn as ElmA2ui, er as ElmAudioPlayer,
|
|
4674
|
+
export { Mn as A2uiSurface, gn as CatalogRenderer, Nn as ElmA2ui, er as ElmAudioPlayer, qr as ElmBlockFallback, or as ElmBlockImage, pr as ElmBlockQuote, dr as ElmBookmark, bi as ElmBreadcrumb, Jr as ElmButton, Xr as ElmButtonDropdown, gr as ElmCallout, Zr as ElmCheckbox, Kn as ElmCodeBlock, Jt as ElmCollapse, Ei as ElmColorPrimitiveSample, Pi as ElmColorSemanticSample, ci as ElmCopyIcon, br as ElmDivider, Kr as ElmDotLoadingIcon, lr as ElmFile, an as ElmFragmentIdentifier, sn as ElmHeading, Zn as ElmHtml, zr as ElmHtmlViewer, w as ElmInlineIcon, T as ElmInlineText, Fn as ElmKatex, Vn as ElmLanguageIcon, Sr as ElmList, Li as ElmMarkdown, O as ElmMdiIcon, ir as ElmModal, vr as ElmNotionCallout, Si as ElmPageTop, dn as ElmParagraph, Vr as ElmParallax, nr as ElmRectangleWave, $r as ElmSelect, Un as ElmShikiHighlighter, ni as ElmSlider, ui as ElmSquareLoadingIcon, ri as ElmSwitch, en as ElmTab, $t as ElmTabList, tn as ElmTabPanel, Tr as ElmTable, Er as ElmTableBody, Or as ElmTableCell, Ar as ElmTableHeader, Mr as ElmTableRow, Qt as ElmTabs, ii as ElmTextArea, ai as ElmTextField, fr as ElmToggle, vi as ElmToggleTheme, Ur as ElmTooltip, Pr as ElmUnsupportedBlock, si as ElmValidation, Cr as HasRowHeaderContext, Ot as LANGUAGES, di as THEME_CHANGE_EVENT, wr as TableSectionContext, Cn as basicCatalog, Lr as blockCatalog, D as defineRenderer, Gn as useClipboard, gi as useElmethisTheme, ar as useModal, qi as useWordle };
|