@dcodegroup-au/dsg-vue 0.0.15 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{_commonjsHelpers-CgdWM-5-.js → DsgColoursConfig-BseFo6-R.js} +17 -21
- package/dist/{_commonjsHelpers-q0radSi0.cjs → DsgColoursConfig-D7UiFGB5.cjs} +1 -1
- package/dist/{DsgDatepicker.vue_vue_type_style_index_0_lang-Cpqj3Iw0.js → DsgDatepicker.vue_vue_type_style_index_0_lang-CMJ0kV_S.js} +6167 -6181
- package/dist/{DsgDatepicker.vue_vue_type_style_index_0_lang-DAa-EUxO.cjs → DsgDatepicker.vue_vue_type_style_index_0_lang-DDMs4q6M.cjs} +1192 -1192
- package/dist/DsgLabel.vue_vue_type_style_index_0_lang-BRVMqZ-w.js +28 -0
- package/dist/DsgLabel.vue_vue_type_style_index_0_lang-gCBicmCZ.cjs +1 -0
- package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/_commonjsHelpers-DwGv2jUC.cjs +1 -0
- package/dist/components/Editor/DsgEditor.vue.d.ts +29 -0
- package/dist/components/Editor/EditorComponents.d.ts +2 -0
- package/dist/components/Elements/DsgInput.vue.d.ts +1 -0
- package/dist/components/Navigation/DsgTab.vue.d.ts +2 -0
- package/dist/components/Table/DsgTable.vue.d.ts +16 -2
- package/dist/components/Table/DsgTableComponent.vue.d.ts +4 -0
- package/dist/components/Table/DsgTableFilter.vue.d.ts +2 -0
- package/dist/components/Table/DsgTableRowHeader.vue.d.ts +7 -3
- package/dist/components/Table/TableComponents.d.ts +2 -1
- package/dist/dsg-vue.cjs +2 -2
- package/dist/dsg-vue.css +51 -1
- package/dist/dsg-vue.editor.cjs +261 -0
- package/dist/dsg-vue.editor.esm.js +8155 -0
- package/dist/dsg-vue.esm.js +732 -723
- package/dist/dsg-vue.table.cjs +7 -7
- package/dist/dsg-vue.table.esm.js +1686 -1603
- package/dist/dsg-vue.tailwind.cjs +1 -1
- package/dist/dsg-vue.tailwind.esm.js +7 -6
- package/dist/editor.d.ts +64 -0
- package/dist/helpers.d.ts +2 -0
- package/dist/table.d.ts +71 -2
- package/dist/utilities/URL.d.ts +18 -0
- package/package.json +21 -9
- package/vite.config.ts +1 -0
package/dist/dsg-vue.esm.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { _ as G, D as
|
|
2
|
-
import { defineComponent as H, createElementBlock as v, openBlock as h, normalizeClass as D, unref as
|
|
3
|
-
import { C as
|
|
4
|
-
|
|
1
|
+
import { _ as G, D as ne, a as ts, b as $o, c as yt, k as os, d as _e, e as ss, f as is, g as ns } from "./DsgDatepicker.vue_vue_type_style_index_0_lang-CMJ0kV_S.js";
|
|
2
|
+
import { defineComponent as H, createElementBlock as v, openBlock as h, normalizeClass as D, unref as ge, createVNode as I, normalizeProps as Lo, guardReactiveProps as as, ref as Y, useTemplateRef as we, createElementVNode as T, createCommentVNode as w, renderSlot as M, createBlock as $, toDisplayString as P, reactive as Se, mergeProps as J, toRaw as ee, createApp as ls, nextTick as eo, computed as q, onMounted as to, onUnmounted as Io, Fragment as Z, h as ut, isVNode as _o, cloneVNode as rs, watchEffect as ht, useAttrs as ds, mergeModels as Bo, useModel as Do, resolveDirective as us, renderList as ke, withDirectives as Po, onBeforeUnmount as cs, withCtx as Vt, vModelSelect as fs, normalizeStyle as No, resolveDynamicComponent as gs, withModifiers as ps } from "vue";
|
|
3
|
+
import { C as hs } from "./DsgColoursConfig-BseFo6-R.js";
|
|
4
|
+
import { _ as ms } from "./DsgLabel.vue_vue_type_style_index_0_lang-BRVMqZ-w.js";
|
|
5
|
+
const bs = /* @__PURE__ */ H({
|
|
5
6
|
__name: "DsgMiscIcon",
|
|
6
7
|
props: {
|
|
7
8
|
theme: { default: "brand" },
|
|
@@ -12,18 +13,18 @@ const bo = /* @__PURE__ */ H({
|
|
|
12
13
|
},
|
|
13
14
|
setup(e) {
|
|
14
15
|
const t = ["dsg-misc-icon", `dsg-misc-icon--${e.theme}`, `dsg-misc-icon--${e.type}`, `dsg-misc-icon--${e.size}`, e.classes].join(" ").replace(/\s+/g, " ").trim();
|
|
15
|
-
return (
|
|
16
|
-
class: D(
|
|
16
|
+
return (o, i) => (h(), v("div", {
|
|
17
|
+
class: D(ge(t))
|
|
17
18
|
}, [
|
|
18
|
-
|
|
19
|
+
I(G, Lo(as(o.icon)), null, 16)
|
|
19
20
|
], 2));
|
|
20
21
|
}
|
|
21
|
-
}),
|
|
22
|
-
const
|
|
23
|
-
for (const [i,
|
|
24
|
-
|
|
25
|
-
return
|
|
26
|
-
},
|
|
22
|
+
}), Mo = (e, t) => {
|
|
23
|
+
const o = e.__vccOpts || e;
|
|
24
|
+
for (const [i, s] of t)
|
|
25
|
+
o[i] = s;
|
|
26
|
+
return o;
|
|
27
|
+
}, Ie = /* @__PURE__ */ Mo(bs, [["__scopeId", "data-v-6f50208c"]]), vs = `<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
27
28
|
<g id="Size=4xl" clip-path="url(#clip0_3302_422487)">
|
|
28
29
|
<path id="Vector" d="M24.711 5.66721C25.0149 6.40224 25.5983 6.98649 26.3328 7.29151L28.9086 8.35843C29.6437 8.66292 30.2277 9.24694 30.5322 9.98202C30.8367 10.7171 30.8367 11.543 30.5322 12.2781L29.466 14.8521C29.1614 15.5875 29.161 16.4142 29.467 17.1493L30.5313 19.7224C30.6822 20.0865 30.76 20.4768 30.76 20.8709C30.7601 21.265 30.6825 21.6553 30.5317 22.0194C30.3808 22.3836 30.1597 22.7144 29.881 22.993C29.6023 23.2717 29.2714 23.4927 28.9072 23.6434L26.3333 24.7096C25.5982 25.0135 25.014 25.5968 24.709 26.3314L23.642 28.9072C23.3376 29.6423 22.7535 30.2263 22.0185 30.5308C21.2834 30.8353 20.4574 30.8353 19.7224 30.5308L17.1484 29.4646C16.4133 29.1609 15.5877 29.1615 14.853 29.4663L12.2773 30.5317C11.5426 30.8355 10.7174 30.8353 9.98289 30.531C9.2484 30.2268 8.6647 29.6435 8.36001 28.9092L7.29277 26.3326C6.98885 25.5976 6.40548 25.0133 5.67091 24.7083L3.09514 23.6414C2.36037 23.337 1.77652 22.7534 1.47193 22.0187C1.16734 21.2841 1.16692 20.4585 1.47078 19.7236L2.53694 17.1496C2.84067 16.4145 2.84005 15.5889 2.53521 14.8542L1.47059 12.2766C1.31964 11.9125 1.24192 11.5223 1.24186 11.1282C1.24179 10.734 1.31939 10.3438 1.47022 9.97962C1.62104 9.6155 1.84214 9.28466 2.12088 9.00601C2.39961 8.72737 2.73052 8.50638 3.09469 8.35567L5.66862 7.28951C6.40301 6.98586 6.98691 6.40322 7.29216 5.6695L8.35908 3.09372C8.66357 2.35864 9.24759 1.77461 9.98267 1.47013C10.7178 1.16565 11.5437 1.16565 12.2788 1.47013L14.8527 2.53629C15.5878 2.84002 16.4134 2.8394 17.1481 2.53456L19.7249 1.47178C20.4599 1.16747 21.2857 1.16754 22.0206 1.47196C22.7556 1.77638 23.3395 2.36023 23.644 3.09513L24.7113 5.67167L24.711 5.66721Z" fill="#0788F5"/>
|
|
29
30
|
<path id="Vector_2" fill-rule="evenodd" clip-rule="evenodd" d="M22.2665 11.8058C22.4803 11.4701 22.5519 11.0631 22.4656 10.6746C22.3794 10.286 22.1423 9.94759 21.8065 9.73383C21.4708 9.52006 21.0638 9.44843 20.6753 9.5347C20.2867 9.62097 19.9483 9.85806 19.7345 10.1938L13.8605 19.4238L11.1725 16.0638C10.924 15.753 10.5622 15.5536 10.1667 15.5095C9.77118 15.4655 9.37436 15.5803 9.06352 15.8288C8.75269 16.0773 8.55331 16.4391 8.50923 16.8347C8.46516 17.2302 8.58001 17.627 8.82852 17.9378L12.8285 22.9378C12.9776 23.1244 13.1691 23.2727 13.387 23.3703C13.6049 23.468 13.843 23.5122 14.0815 23.4993C14.32 23.4864 14.5519 23.4167 14.758 23.2961C14.9641 23.1755 15.1385 23.0074 15.2665 22.8058L22.2665 11.8058Z" fill="white"/>
|
|
@@ -34,23 +35,23 @@ const bo = /* @__PURE__ */ H({
|
|
|
34
35
|
</clipPath>
|
|
35
36
|
</defs>
|
|
36
37
|
</svg>
|
|
37
|
-
`,
|
|
38
|
+
`, ws = ["href", "title"], ys = {
|
|
38
39
|
class: "dsg-avatar--image-wrapper",
|
|
39
40
|
tabindex: "0",
|
|
40
41
|
ref: "avatarImageWrapperEl"
|
|
41
|
-
},
|
|
42
|
+
}, ks = ["src", "alt"], Cs = {
|
|
42
43
|
key: 1,
|
|
43
44
|
class: "dsg-avatar--initials"
|
|
44
|
-
},
|
|
45
|
+
}, Es = { class: "dsg-avatar--status" }, Ts = {
|
|
45
46
|
key: 0,
|
|
46
47
|
class: "dsg-avatar--activity"
|
|
47
|
-
},
|
|
48
|
+
}, As = ["innerHTML"], Ss = {
|
|
48
49
|
key: 2,
|
|
49
50
|
class: "dsg-avatar--logo"
|
|
50
|
-
},
|
|
51
|
+
}, Os = ["src", "alt"], $s = {
|
|
51
52
|
key: 0,
|
|
52
53
|
class: "dsg-avatar--info"
|
|
53
|
-
},
|
|
54
|
+
}, Ls = { class: "dsg-avatar--title" }, Is = { class: "dsg-avatar--subtext" }, ot = /* @__PURE__ */ H({
|
|
54
55
|
__name: "DsgAvatar",
|
|
55
56
|
props: {
|
|
56
57
|
profileUri: { default: "" },
|
|
@@ -69,7 +70,7 @@ const bo = /* @__PURE__ */ H({
|
|
|
69
70
|
noFocus: { type: Boolean, default: !1 }
|
|
70
71
|
},
|
|
71
72
|
emits: ["avatar-clicked", "before-change-status", "after-change-status"],
|
|
72
|
-
setup(e, { expose: t, emit:
|
|
73
|
+
setup(e, { expose: t, emit: o }) {
|
|
73
74
|
const i = [
|
|
74
75
|
"dsg-avatar",
|
|
75
76
|
`dsg-avatar--${e.size}`,
|
|
@@ -81,13 +82,13 @@ const bo = /* @__PURE__ */ H({
|
|
|
81
82
|
`dsg-avatar--${["profile-photo", "profile-photo-verified"].indexOf(e.theme) !== -1 ? "profile-photo" : "non-profile-photo"}`,
|
|
82
83
|
e.classes
|
|
83
84
|
].join(" ");
|
|
84
|
-
["profile-photo", "profile-photo-verified"].indexOf(e.theme) !== -1 && (["sm", "md", "lg"].indexOf(e.size) === -1 && new
|
|
85
|
+
["profile-photo", "profile-photo-verified"].indexOf(e.theme) !== -1 && (["sm", "md", "lg"].indexOf(e.size) === -1 && new ne("DsgAvatar: The 'profile-photo' theme only supports the 'sm', 'md', and 'lg' sizes."), (e.fullName || e.title || e.subText) && new ts("DsgAvatar: The 'profile-photo' theme will not display the 'title' or 'subText' props.")), e.theme === "logo" && !e.companyLogoUri && new ne("DsgAvatar: The 'logo' theme requires a 'companyLogoUri' prop."), ["activity", "verified", "logo"].indexOf(e.theme) !== -1 && e.title?.length && e.subText?.length && ["xs", "sm", "md", "lg", "xl", "2xl"].indexOf(e.size) === -1 && new ne(
|
|
85
86
|
"DsgAvatar: The 'activity', 'verified', and 'logo' themes only support the 'xs', 'sm', 'md', 'lg', and 'xl' sizes when 'title' and 'subText' are provided."
|
|
86
|
-
), e.theme === "tile" && !e.title?.length && !e.fullName && new
|
|
87
|
-
const
|
|
87
|
+
), e.theme === "tile" && !e.title?.length && !e.fullName && new ne("DsgAvatar: The 'tile' theme requires either 'title' or 'fullName' prop."), e.size === "xxs" && (e.title?.length || e.subText?.length) && new ne("DsgAvatar: The 'xxs' size does not support the 'title' or 'subText' props.");
|
|
88
|
+
const s = (b) => {
|
|
88
89
|
const m = b.split(" ");
|
|
89
90
|
return (m[0].charAt(0) + m[m.length - 1].charAt(0)).toUpperCase();
|
|
90
|
-
}, n = () => e.fullName ? "Avatar of " + e.fullName : "Avatar", l =
|
|
91
|
+
}, n = () => e.fullName ? "Avatar of " + e.fullName : "Avatar", l = o, a = Y(!1), u = (b) => {
|
|
91
92
|
l("before-change-status", a.value, b), a.value = b, l("after-change-status", a.value);
|
|
92
93
|
}, p = we("avatarImageWrapperEl"), y = (b) => {
|
|
93
94
|
e.preventDefault || (l("avatar-clicked", b), p.value && !e.uri && p.value.focus());
|
|
@@ -98,7 +99,7 @@ const bo = /* @__PURE__ */ H({
|
|
|
98
99
|
p.value && (b ? p.value.focus() : p.value.blur());
|
|
99
100
|
}
|
|
100
101
|
}), (b, m) => (h(), v("div", {
|
|
101
|
-
class: D(
|
|
102
|
+
class: D(ge(i))
|
|
102
103
|
}, [
|
|
103
104
|
T("a", {
|
|
104
105
|
class: "dsg-avatar--link",
|
|
@@ -108,50 +109,50 @@ const bo = /* @__PURE__ */ H({
|
|
|
108
109
|
ref: "avatarLink",
|
|
109
110
|
onClick: y
|
|
110
111
|
}, [
|
|
111
|
-
T("div",
|
|
112
|
+
T("div", ys, [
|
|
112
113
|
M(b.$slots, "dsg-avatar--background", {}, () => [
|
|
113
114
|
b.profileUri ? (h(), v("img", {
|
|
114
115
|
key: 0,
|
|
115
116
|
class: "dsg-avatar--profile-image",
|
|
116
117
|
src: b.profileUri,
|
|
117
118
|
alt: n()
|
|
118
|
-
}, null, 8,
|
|
119
|
-
!b.profileUri && b.fullName ? (h(), v("span",
|
|
119
|
+
}, null, 8, ks)) : w("", !0),
|
|
120
|
+
!b.profileUri && b.fullName ? (h(), v("span", Cs, P(s(b.fullName)), 1)) : w("", !0),
|
|
120
121
|
!b.profileUri && !b.fullName ? (h(), $(G, {
|
|
121
122
|
key: 2,
|
|
122
123
|
class: "dsg-avatar--user-icon",
|
|
123
124
|
icon: "user-01",
|
|
124
|
-
color:
|
|
125
|
+
color: ge(hs).gray[600],
|
|
125
126
|
size: b.size
|
|
126
127
|
}, null, 8, ["color", "size"])) : w("", !0)
|
|
127
128
|
]),
|
|
128
129
|
["tile"].indexOf(b.theme) === -1 ? M(b.$slots, "dsg-avatar--status", { key: 0 }, () => [
|
|
129
|
-
T("div",
|
|
130
|
-
b.theme === "activity" && b.isOnline ? (h(), v("span",
|
|
130
|
+
T("div", Es, [
|
|
131
|
+
b.theme === "activity" && b.isOnline ? (h(), v("span", Ts)) : w("", !0),
|
|
131
132
|
["verified", "profile-photo-verified"].indexOf(b.theme) !== -1 ? (h(), v("span", {
|
|
132
133
|
key: 1,
|
|
133
134
|
class: "dsg-avatar--verified",
|
|
134
|
-
innerHTML:
|
|
135
|
-
}, null, 8,
|
|
136
|
-
b.theme === "logo" ? (h(), v("span",
|
|
135
|
+
innerHTML: ge(vs)
|
|
136
|
+
}, null, 8, As)) : w("", !0),
|
|
137
|
+
b.theme === "logo" ? (h(), v("span", Ss, [
|
|
137
138
|
T("img", {
|
|
138
139
|
src: b.companyLogoUri,
|
|
139
140
|
alt: n(),
|
|
140
141
|
class: "dsg-avatar--company-logo"
|
|
141
|
-
}, null, 8,
|
|
142
|
+
}, null, 8, Os)
|
|
142
143
|
])) : w("", !0)
|
|
143
144
|
])
|
|
144
145
|
]) : w("", !0)
|
|
145
146
|
], 512),
|
|
146
|
-
b.title?.length || b.theme === "tile" && (b.title?.length || b.fullName) ? (h(), v("div", $
|
|
147
|
+
b.title?.length || b.theme === "tile" && (b.title?.length || b.fullName) ? (h(), v("div", $s, [
|
|
147
148
|
b.title?.length || b.theme === "tile" && (b.title?.length || b.fullName) ? M(b.$slots, "dsg-avatar--title", { key: 0 }, () => [
|
|
148
|
-
T("h3",
|
|
149
|
+
T("h3", Ls, P(b.title?.length ? b.title : b.fullName), 1)
|
|
149
150
|
]) : w("", !0),
|
|
150
151
|
b.subText?.length ? M(b.$slots, "dsg-avatar--subtext", { key: 1 }, () => [
|
|
151
|
-
T("p",
|
|
152
|
+
T("p", Is, P(b.subText), 1)
|
|
152
153
|
]) : w("", !0)
|
|
153
154
|
])) : w("", !0)
|
|
154
|
-
], 8,
|
|
155
|
+
], 8, ws)
|
|
155
156
|
], 2));
|
|
156
157
|
}
|
|
157
158
|
}), rt = {
|
|
@@ -161,7 +162,7 @@ const bo = /* @__PURE__ */ H({
|
|
|
161
162
|
BOTTOM_LEFT: "bottom-left",
|
|
162
163
|
BOTTOM_RIGHT: "bottom-right",
|
|
163
164
|
BOTTOM_CENTER: "bottom-center"
|
|
164
|
-
},
|
|
165
|
+
}, Ne = {
|
|
165
166
|
LIGHT: "light",
|
|
166
167
|
DARK: "dark",
|
|
167
168
|
COLORED: "colored",
|
|
@@ -172,13 +173,13 @@ const bo = /* @__PURE__ */ H({
|
|
|
172
173
|
WARNING: "warning",
|
|
173
174
|
ERROR: "error",
|
|
174
175
|
DEFAULT: "default"
|
|
175
|
-
},
|
|
176
|
+
}, _s = {
|
|
176
177
|
BOUNCE: "bounce",
|
|
177
178
|
SLIDE: "slide",
|
|
178
179
|
FLIP: "flip",
|
|
179
180
|
ZOOM: "zoom",
|
|
180
181
|
NONE: "none"
|
|
181
|
-
},
|
|
182
|
+
}, Bs = {
|
|
182
183
|
dangerouslyHTMLString: !1,
|
|
183
184
|
multiple: !0,
|
|
184
185
|
position: rt.TOP_RIGHT,
|
|
@@ -195,86 +196,86 @@ const bo = /* @__PURE__ */ H({
|
|
|
195
196
|
progressStyle: {},
|
|
196
197
|
role: "alert",
|
|
197
198
|
theme: "light"
|
|
198
|
-
},
|
|
199
|
+
}, Ds = {
|
|
199
200
|
rtl: !1,
|
|
200
201
|
newestOnTop: !1,
|
|
201
202
|
toastClassName: ""
|
|
202
|
-
},
|
|
203
|
-
...
|
|
204
|
-
...
|
|
203
|
+
}, xo = {
|
|
204
|
+
...Bs,
|
|
205
|
+
...Ds
|
|
205
206
|
};
|
|
206
207
|
F.DEFAULT;
|
|
207
208
|
var A = /* @__PURE__ */ ((e) => (e[e.COLLAPSE_DURATION = 300] = "COLLAPSE_DURATION", e[e.DEBOUNCE_DURATION = 50] = "DEBOUNCE_DURATION", e.CSS_NAMESPACE = "Toastify", e))(A || {}), jt = /* @__PURE__ */ ((e) => (e.ENTRANCE_ANIMATION_END = "d", e))(jt || {});
|
|
208
|
-
const
|
|
209
|
+
const Ps = {
|
|
209
210
|
enter: "Toastify--animate Toastify__bounce-enter",
|
|
210
211
|
exit: "Toastify--animate Toastify__bounce-exit",
|
|
211
212
|
appendPosition: !0
|
|
212
|
-
},
|
|
213
|
+
}, Ns = {
|
|
213
214
|
enter: "Toastify--animate Toastify__slide-enter",
|
|
214
215
|
exit: "Toastify--animate Toastify__slide-exit",
|
|
215
216
|
appendPosition: !0
|
|
216
|
-
},
|
|
217
|
+
}, Ms = {
|
|
217
218
|
enter: "Toastify--animate Toastify__zoom-enter",
|
|
218
219
|
exit: "Toastify--animate Toastify__zoom-exit"
|
|
219
|
-
},
|
|
220
|
+
}, xs = {
|
|
220
221
|
enter: "Toastify--animate Toastify__flip-enter",
|
|
221
222
|
exit: "Toastify--animate Toastify__flip-exit"
|
|
222
|
-
},
|
|
223
|
-
function
|
|
224
|
-
var
|
|
225
|
-
let i =
|
|
223
|
+
}, lo = "Toastify--animate Toastify__none-enter";
|
|
224
|
+
function Uo(e, t = !1) {
|
|
225
|
+
var o;
|
|
226
|
+
let i = Ps;
|
|
226
227
|
if (!e || typeof e == "string")
|
|
227
228
|
switch (e) {
|
|
228
229
|
case "flip":
|
|
229
|
-
i =
|
|
230
|
+
i = xs;
|
|
230
231
|
break;
|
|
231
232
|
case "zoom":
|
|
232
|
-
i =
|
|
233
|
+
i = Ms;
|
|
233
234
|
break;
|
|
234
235
|
case "slide":
|
|
235
|
-
i =
|
|
236
|
+
i = Ns;
|
|
236
237
|
break;
|
|
237
238
|
}
|
|
238
239
|
else
|
|
239
240
|
i = e;
|
|
240
241
|
if (t)
|
|
241
|
-
i.enter =
|
|
242
|
-
else if (i.enter ===
|
|
243
|
-
const
|
|
244
|
-
i.enter = `Toastify--animate Toastify__${
|
|
242
|
+
i.enter = lo;
|
|
243
|
+
else if (i.enter === lo) {
|
|
244
|
+
const s = (o = i.exit.split("__")[1]) == null ? void 0 : o.split("-")[0];
|
|
245
|
+
i.enter = `Toastify--animate Toastify__${s}-enter`;
|
|
245
246
|
}
|
|
246
247
|
return i;
|
|
247
248
|
}
|
|
248
|
-
function
|
|
249
|
+
function Us(e) {
|
|
249
250
|
return e.containerId || String(e.position);
|
|
250
251
|
}
|
|
251
252
|
const Tt = "will-unmount";
|
|
252
|
-
function
|
|
253
|
+
function Rs(e = rt.TOP_RIGHT) {
|
|
253
254
|
return !!document.querySelector(`.${A.CSS_NAMESPACE}__toast-container--${e}`);
|
|
254
255
|
}
|
|
255
|
-
function
|
|
256
|
+
function zs(e = rt.TOP_RIGHT) {
|
|
256
257
|
return `${A.CSS_NAMESPACE}__toast-container--${e}`;
|
|
257
258
|
}
|
|
258
|
-
function
|
|
259
|
+
function Hs(e, t, o = !1) {
|
|
259
260
|
const i = [
|
|
260
261
|
`${A.CSS_NAMESPACE}__toast-container`,
|
|
261
262
|
`${A.CSS_NAMESPACE}__toast-container--${e}`,
|
|
262
|
-
|
|
263
|
+
o ? `${A.CSS_NAMESPACE}__toast-container--rtl` : null
|
|
263
264
|
].filter(Boolean).join(" ");
|
|
264
265
|
return Be(t) ? t({
|
|
265
266
|
position: e,
|
|
266
|
-
rtl:
|
|
267
|
+
rtl: o,
|
|
267
268
|
defaultClassName: i
|
|
268
269
|
}) : `${i} ${t || ""}`;
|
|
269
270
|
}
|
|
270
|
-
function
|
|
271
|
+
function qs(e) {
|
|
271
272
|
var t;
|
|
272
|
-
const { position:
|
|
273
|
-
b.className =
|
|
274
|
-
|
|
273
|
+
const { position: o, containerClassName: i, rtl: s = !1, style: n = {} } = e, l = A.CSS_NAMESPACE, a = zs(o), u = document.querySelector(`.${l}`), p = document.querySelector(`.${a}`), y = !!p && !((t = p.className) != null && t.includes(Tt)), k = u || document.createElement("div"), b = document.createElement("div");
|
|
274
|
+
b.className = Hs(
|
|
275
|
+
o,
|
|
275
276
|
i,
|
|
276
|
-
|
|
277
|
-
), b.dataset.testid = `${A.CSS_NAMESPACE}__toast-container--${
|
|
277
|
+
s
|
|
278
|
+
), b.dataset.testid = `${A.CSS_NAMESPACE}__toast-container--${o}`, b.id = Us(e);
|
|
278
279
|
for (const m in n)
|
|
279
280
|
if (Object.prototype.hasOwnProperty.call(n, m)) {
|
|
280
281
|
const S = n[m];
|
|
@@ -283,97 +284,97 @@ function qo(e) {
|
|
|
283
284
|
return u || (k.className = A.CSS_NAMESPACE, document.body.appendChild(k)), y || k.appendChild(b), b;
|
|
284
285
|
}
|
|
285
286
|
function Kt(e) {
|
|
286
|
-
var t,
|
|
287
|
-
const
|
|
287
|
+
var t, o, i;
|
|
288
|
+
const s = typeof e == "string" ? e : ((t = e.currentTarget) == null ? void 0 : t.id) || ((o = e.target) == null ? void 0 : o.id), n = document.getElementById(s);
|
|
288
289
|
n && n.removeEventListener("animationend", Kt, !1);
|
|
289
290
|
try {
|
|
290
|
-
|
|
291
|
+
st[s].unmount(), (i = document.getElementById(s)) == null || i.remove(), delete st[s], delete R[s];
|
|
291
292
|
} catch {
|
|
292
293
|
}
|
|
293
294
|
}
|
|
294
|
-
const
|
|
295
|
-
function
|
|
296
|
-
const
|
|
297
|
-
|
|
295
|
+
const st = Se({});
|
|
296
|
+
function Fs(e, t) {
|
|
297
|
+
const o = document.getElementById(String(t));
|
|
298
|
+
o && (st[o.id] = e);
|
|
298
299
|
}
|
|
299
300
|
function Gt(e, t = !0) {
|
|
300
|
-
const
|
|
301
|
-
if (!
|
|
302
|
-
const i = document.getElementById(
|
|
303
|
-
i && i.classList.add(Tt), t ? (
|
|
301
|
+
const o = String(e);
|
|
302
|
+
if (!st[o]) return;
|
|
303
|
+
const i = document.getElementById(o);
|
|
304
|
+
i && i.classList.add(Tt), t ? (js(e), i && i.addEventListener("animationend", Kt, !1)) : Kt(o), le.items = le.items.filter((s) => s.containerId !== e);
|
|
304
305
|
}
|
|
305
|
-
function
|
|
306
|
-
for (const t in
|
|
306
|
+
function Vs(e) {
|
|
307
|
+
for (const t in st)
|
|
307
308
|
Gt(t, e);
|
|
308
|
-
|
|
309
|
+
le.items = [];
|
|
309
310
|
}
|
|
310
|
-
function
|
|
311
|
-
const
|
|
312
|
-
if (
|
|
311
|
+
function Ro(e, t) {
|
|
312
|
+
const o = document.getElementById(e.toastId);
|
|
313
|
+
if (o) {
|
|
313
314
|
let i = e;
|
|
314
315
|
i = {
|
|
315
316
|
...i,
|
|
316
|
-
...
|
|
317
|
+
...Uo(i.transition)
|
|
317
318
|
};
|
|
318
|
-
const
|
|
319
|
-
|
|
319
|
+
const s = i.appendPosition ? `${i.exit}--${i.position}` : i.exit;
|
|
320
|
+
o.className += ` ${s}`, t && t(o);
|
|
320
321
|
}
|
|
321
322
|
}
|
|
322
|
-
function
|
|
323
|
+
function js(e) {
|
|
323
324
|
for (const t in R)
|
|
324
325
|
if (t === e)
|
|
325
|
-
for (const
|
|
326
|
-
|
|
326
|
+
for (const o of R[t] || [])
|
|
327
|
+
Ro(o);
|
|
327
328
|
}
|
|
328
|
-
function
|
|
329
|
-
const t = Me().find((
|
|
329
|
+
function Ks(e) {
|
|
330
|
+
const t = Me().find((o) => o.toastId === e);
|
|
330
331
|
return t?.containerId;
|
|
331
332
|
}
|
|
332
|
-
function
|
|
333
|
+
function oo(e) {
|
|
333
334
|
return document.getElementById(e);
|
|
334
335
|
}
|
|
335
|
-
function
|
|
336
|
-
const t =
|
|
336
|
+
function Gs(e) {
|
|
337
|
+
const t = oo(e.containerId);
|
|
337
338
|
return t && t.classList.contains(Tt);
|
|
338
339
|
}
|
|
339
|
-
function
|
|
340
|
+
function ro(e) {
|
|
340
341
|
var t;
|
|
341
|
-
const
|
|
342
|
-
return
|
|
342
|
+
const o = _o(e.content) ? ee(e.content.props) : null;
|
|
343
|
+
return o ?? ee((t = e.data) != null ? t : {});
|
|
343
344
|
}
|
|
344
|
-
function
|
|
345
|
-
return e ?
|
|
345
|
+
function Ws(e) {
|
|
346
|
+
return e ? le.items.filter((t) => t.containerId === e).length > 0 : le.items.length > 0;
|
|
346
347
|
}
|
|
347
|
-
function
|
|
348
|
-
if (
|
|
349
|
-
const e =
|
|
348
|
+
function Xs() {
|
|
349
|
+
if (le.items.length > 0) {
|
|
350
|
+
const e = le.items.shift();
|
|
350
351
|
mt(e?.toastContent, e?.toastProps);
|
|
351
352
|
}
|
|
352
353
|
}
|
|
353
|
-
const R = Se({}),
|
|
354
|
+
const R = Se({}), le = Se({ items: [] });
|
|
354
355
|
function Me() {
|
|
355
356
|
const e = ee(R);
|
|
356
|
-
return Object.values(e).reduce((t,
|
|
357
|
+
return Object.values(e).reduce((t, o) => [...t, ...o], []);
|
|
357
358
|
}
|
|
358
|
-
function
|
|
359
|
+
function Ys(e) {
|
|
359
360
|
return Me().find((t) => t.toastId === e);
|
|
360
361
|
}
|
|
361
362
|
function mt(e, t = {}) {
|
|
362
|
-
if (
|
|
363
|
-
const
|
|
364
|
-
|
|
363
|
+
if (Gs(t)) {
|
|
364
|
+
const o = oo(t.containerId);
|
|
365
|
+
o && o.addEventListener("animationend", Wt.bind(null, e, t), !1);
|
|
365
366
|
} else
|
|
366
367
|
Wt(e, t);
|
|
367
368
|
}
|
|
368
369
|
function Wt(e, t = {}) {
|
|
369
|
-
const
|
|
370
|
-
|
|
371
|
-
const i = R[t.containerId] || [],
|
|
372
|
-
if (!
|
|
373
|
-
const n =
|
|
374
|
-
t.useHandler && t.useHandler(l), l.mount(n),
|
|
370
|
+
const o = oo(t.containerId);
|
|
371
|
+
o && o.removeEventListener("animationend", Wt.bind(null, e, t), !1);
|
|
372
|
+
const i = R[t.containerId] || [], s = i.length > 0;
|
|
373
|
+
if (!s && !Rs(t.position)) {
|
|
374
|
+
const n = qs(t), l = ls(mi, t);
|
|
375
|
+
t.useHandler && t.useHandler(l), l.mount(n), Fs(l, n.id);
|
|
375
376
|
}
|
|
376
|
-
|
|
377
|
+
s && !t.updateId && (t.position = i[0].position), eo(() => {
|
|
377
378
|
t.updateId ? W.update(t) : W.add(e, t);
|
|
378
379
|
});
|
|
379
380
|
}
|
|
@@ -384,10 +385,10 @@ const W = {
|
|
|
384
385
|
* @param opts toast props
|
|
385
386
|
*/
|
|
386
387
|
add(e, t) {
|
|
387
|
-
const { containerId:
|
|
388
|
-
|
|
389
|
-
var i,
|
|
390
|
-
t.newestOnTop ? (i = R[
|
|
388
|
+
const { containerId: o = "" } = t;
|
|
389
|
+
o && (R[o] = R[o] || [], R[o].find((i) => i.toastId === t.toastId) || setTimeout(() => {
|
|
390
|
+
var i, s;
|
|
391
|
+
t.newestOnTop ? (i = R[o]) == null || i.unshift(t) : (s = R[o]) == null || s.push(t), t.onOpen && t.onOpen(ro(t));
|
|
391
392
|
}, t.delay || 0));
|
|
392
393
|
},
|
|
393
394
|
/**
|
|
@@ -396,12 +397,12 @@ const W = {
|
|
|
396
397
|
*/
|
|
397
398
|
remove(e) {
|
|
398
399
|
if (e) {
|
|
399
|
-
const t =
|
|
400
|
+
const t = Ks(e);
|
|
400
401
|
if (t) {
|
|
401
|
-
const
|
|
402
|
-
let i =
|
|
403
|
-
R[t] =
|
|
404
|
-
i != null && i.onClose && (i.onClose(
|
|
402
|
+
const o = R[t];
|
|
403
|
+
let i = o.find((s) => s.toastId === e);
|
|
404
|
+
R[t] = o.filter((s) => s.toastId !== e), !R[t].length && !Ws(t) && Gt(t, !1), Xs(), eo(() => {
|
|
405
|
+
i != null && i.onClose && (i.onClose(ro(i)), i = void 0);
|
|
405
406
|
});
|
|
406
407
|
}
|
|
407
408
|
}
|
|
@@ -414,13 +415,13 @@ const W = {
|
|
|
414
415
|
const { containerId: t = "" } = e;
|
|
415
416
|
if (t && e.updateId) {
|
|
416
417
|
R[t] = R[t] || [];
|
|
417
|
-
const
|
|
418
|
+
const o = R[t].find((n) => n.toastId === e.toastId), i = o?.position !== e.position || o?.transition !== e.transition, s = {
|
|
418
419
|
...e,
|
|
419
420
|
disabledEnterTransition: !i,
|
|
420
421
|
updateId: void 0
|
|
421
422
|
};
|
|
422
423
|
W.dismissForce(e?.toastId), setTimeout(() => {
|
|
423
|
-
|
|
424
|
+
L(s.content, s);
|
|
424
425
|
}, e.delay || 0);
|
|
425
426
|
}
|
|
426
427
|
},
|
|
@@ -429,21 +430,21 @@ const W = {
|
|
|
429
430
|
* @param containerId container id
|
|
430
431
|
*/
|
|
431
432
|
clear(e, t = !0) {
|
|
432
|
-
e ? Gt(e, t) :
|
|
433
|
+
e ? Gt(e, t) : Vs(t);
|
|
433
434
|
},
|
|
434
435
|
dismissCallback(e) {
|
|
435
436
|
var t;
|
|
436
|
-
const
|
|
437
|
+
const o = (t = e.currentTarget) == null ? void 0 : t.id, i = document.getElementById(o);
|
|
437
438
|
i && (i.removeEventListener("animationend", W.dismissCallback, !1), setTimeout(() => {
|
|
438
|
-
W.remove(
|
|
439
|
+
W.remove(o);
|
|
439
440
|
}));
|
|
440
441
|
},
|
|
441
442
|
dismiss(e) {
|
|
442
443
|
if (e) {
|
|
443
444
|
const t = Me();
|
|
444
|
-
for (const
|
|
445
|
-
if (
|
|
446
|
-
|
|
445
|
+
for (const o of t)
|
|
446
|
+
if (o.toastId === e) {
|
|
447
|
+
Ro(o, (i) => {
|
|
447
448
|
i.addEventListener("animationend", W.dismissCallback, !1);
|
|
448
449
|
});
|
|
449
450
|
break;
|
|
@@ -453,19 +454,19 @@ const W = {
|
|
|
453
454
|
dismissForce(e) {
|
|
454
455
|
if (e) {
|
|
455
456
|
const t = Me();
|
|
456
|
-
for (const
|
|
457
|
-
if (
|
|
457
|
+
for (const o of t)
|
|
458
|
+
if (o.toastId === e) {
|
|
458
459
|
const i = document.getElementById(e);
|
|
459
460
|
i && (i.remove(), i.removeEventListener("animationend", W.dismissCallback, !1), W.remove(e));
|
|
460
461
|
break;
|
|
461
462
|
}
|
|
462
463
|
}
|
|
463
464
|
}
|
|
464
|
-
},
|
|
465
|
-
function
|
|
465
|
+
}, Zs = Se({ useHandler: void 0 }), zo = Se({}), kt = Se({});
|
|
466
|
+
function Ho() {
|
|
466
467
|
return Math.random().toString(36).substring(2, 9);
|
|
467
468
|
}
|
|
468
|
-
function
|
|
469
|
+
function Js(e) {
|
|
469
470
|
return typeof e == "number" && !isNaN(e);
|
|
470
471
|
}
|
|
471
472
|
function Xt(e) {
|
|
@@ -480,18 +481,18 @@ function At(...e) {
|
|
|
480
481
|
function bt(e) {
|
|
481
482
|
return typeof e == "object" && (!!(e != null && e.render) || !!(e != null && e.setup) || typeof e?.type == "object");
|
|
482
483
|
}
|
|
483
|
-
function
|
|
484
|
-
|
|
484
|
+
function Qs(e = {}) {
|
|
485
|
+
zo[`${A.CSS_NAMESPACE}-default-options`] = e;
|
|
485
486
|
}
|
|
486
487
|
function ei() {
|
|
487
|
-
return
|
|
488
|
+
return zo[`${A.CSS_NAMESPACE}-default-options`] || xo;
|
|
488
489
|
}
|
|
489
490
|
function ti() {
|
|
490
491
|
const e = window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
491
492
|
return document.documentElement.classList.contains("dark") || e ? "dark" : "light";
|
|
492
493
|
}
|
|
493
494
|
var vt = /* @__PURE__ */ ((e) => (e[e.Enter = 0] = "Enter", e[e.Exit = 1] = "Exit", e))(vt || {});
|
|
494
|
-
const
|
|
495
|
+
const qo = {
|
|
495
496
|
containerId: {
|
|
496
497
|
type: [String, Number],
|
|
497
498
|
required: !1,
|
|
@@ -599,7 +600,7 @@ const Hs = {
|
|
|
599
600
|
theme: {
|
|
600
601
|
type: String,
|
|
601
602
|
required: !1,
|
|
602
|
-
default:
|
|
603
|
+
default: Ne.AUTO
|
|
603
604
|
},
|
|
604
605
|
content: {
|
|
605
606
|
type: [String, Object, Function],
|
|
@@ -678,7 +679,7 @@ const Hs = {
|
|
|
678
679
|
required: !1,
|
|
679
680
|
default: !1
|
|
680
681
|
}
|
|
681
|
-
},
|
|
682
|
+
}, oi = {
|
|
682
683
|
autoClose: {
|
|
683
684
|
type: [Number, Boolean],
|
|
684
685
|
required: !0
|
|
@@ -696,7 +697,7 @@ const Hs = {
|
|
|
696
697
|
theme: {
|
|
697
698
|
type: String,
|
|
698
699
|
required: !1,
|
|
699
|
-
default:
|
|
700
|
+
default: Ne.AUTO
|
|
700
701
|
},
|
|
701
702
|
hide: {
|
|
702
703
|
type: Boolean,
|
|
@@ -733,33 +734,33 @@ const Hs = {
|
|
|
733
734
|
required: !1,
|
|
734
735
|
default: void 0
|
|
735
736
|
}
|
|
736
|
-
},
|
|
737
|
+
}, si = /* @__PURE__ */ H({
|
|
737
738
|
name: "ProgressBar",
|
|
738
|
-
props:
|
|
739
|
+
props: oi,
|
|
739
740
|
// @ts-ignore
|
|
740
741
|
setup(e, {
|
|
741
742
|
attrs: t
|
|
742
743
|
}) {
|
|
743
|
-
const
|
|
744
|
+
const o = Y(), i = q(() => e.hide ? "true" : "false"), s = q(() => ({
|
|
744
745
|
...t.style || {},
|
|
745
746
|
animationDuration: `${e.autoClose === !0 ? 5e3 : e.autoClose}ms`,
|
|
746
747
|
animationPlayState: e.isRunning ? "running" : "paused",
|
|
747
748
|
opacity: e.hide || e.autoClose === !1 ? 0 : 1,
|
|
748
749
|
transform: e.controlledProgress ? `scaleX(${e.progress})` : "none"
|
|
749
750
|
})), n = q(() => [`${A.CSS_NAMESPACE}__progress-bar`, e.controlledProgress ? `${A.CSS_NAMESPACE}__progress-bar--controlled` : `${A.CSS_NAMESPACE}__progress-bar--animated`, `${A.CSS_NAMESPACE}__progress-bar-theme--${e.theme}`, `${A.CSS_NAMESPACE}__progress-bar--${e.type}`, e.rtl ? `${A.CSS_NAMESPACE}__progress-bar--rtl` : null].filter(Boolean).join(" ")), l = q(() => `${n.value} ${t?.class || ""}`), a = () => {
|
|
750
|
-
|
|
751
|
+
o.value && (o.value.onanimationend = null, o.value.ontransitionend = null);
|
|
751
752
|
}, u = () => {
|
|
752
753
|
e.isIn && e.closeToast && e.autoClose !== !1 && (e.closeToast(), a());
|
|
753
754
|
}, p = q(() => e.controlledProgress ? null : u), y = q(() => e.controlledProgress ? u : null);
|
|
754
755
|
return ht(() => {
|
|
755
|
-
|
|
756
|
-
}), () =>
|
|
757
|
-
ref:
|
|
756
|
+
o.value && (a(), o.value.onanimationend = p.value, o.value.ontransitionend = y.value);
|
|
757
|
+
}), () => I("div", {
|
|
758
|
+
ref: o,
|
|
758
759
|
role: "progressbar",
|
|
759
760
|
"aria-hidden": i.value,
|
|
760
761
|
"aria-label": "notification timer",
|
|
761
762
|
class: l.value,
|
|
762
|
-
style:
|
|
763
|
+
style: s.value
|
|
763
764
|
}, null);
|
|
764
765
|
}
|
|
765
766
|
}), ii = /* @__PURE__ */ H({
|
|
@@ -769,12 +770,12 @@ const Hs = {
|
|
|
769
770
|
theme: {
|
|
770
771
|
type: String,
|
|
771
772
|
required: !1,
|
|
772
|
-
default:
|
|
773
|
+
default: Ne.AUTO
|
|
773
774
|
},
|
|
774
775
|
type: {
|
|
775
776
|
type: String,
|
|
776
777
|
required: !1,
|
|
777
|
-
default:
|
|
778
|
+
default: Ne.LIGHT
|
|
778
779
|
},
|
|
779
780
|
ariaLabel: {
|
|
780
781
|
type: String,
|
|
@@ -788,17 +789,17 @@ const Hs = {
|
|
|
788
789
|
}
|
|
789
790
|
},
|
|
790
791
|
setup(e) {
|
|
791
|
-
return () =>
|
|
792
|
+
return () => I("button", {
|
|
792
793
|
class: `${A.CSS_NAMESPACE}__close-button ${A.CSS_NAMESPACE}__close-button--${e.theme}`,
|
|
793
794
|
type: "button",
|
|
794
795
|
onClick: (t) => {
|
|
795
796
|
t.stopPropagation(), e.closeToast && e.closeToast(t);
|
|
796
797
|
},
|
|
797
798
|
"aria-label": e.ariaLabel
|
|
798
|
-
}, [
|
|
799
|
+
}, [I("svg", {
|
|
799
800
|
"aria-hidden": "true",
|
|
800
801
|
viewBox: "0 0 14 16"
|
|
801
|
-
}, [
|
|
802
|
+
}, [I("path", {
|
|
802
803
|
"fill-rule": "evenodd",
|
|
803
804
|
d: "M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"
|
|
804
805
|
}, null)])]);
|
|
@@ -806,38 +807,38 @@ const Hs = {
|
|
|
806
807
|
}), St = ({
|
|
807
808
|
theme: e,
|
|
808
809
|
type: t,
|
|
809
|
-
path:
|
|
810
|
+
path: o,
|
|
810
811
|
...i
|
|
811
|
-
}) =>
|
|
812
|
+
}) => I("svg", J({
|
|
812
813
|
viewBox: "0 0 24 24",
|
|
813
814
|
width: "100%",
|
|
814
815
|
height: "100%",
|
|
815
816
|
fill: e === "colored" ? "currentColor" : `var(--toastify-icon-color-${t})`
|
|
816
|
-
}, i), [
|
|
817
|
-
d:
|
|
817
|
+
}, i), [I("path", {
|
|
818
|
+
d: o
|
|
818
819
|
}, null)]);
|
|
819
820
|
function ni(e) {
|
|
820
|
-
return
|
|
821
|
+
return I(St, J(e, {
|
|
821
822
|
path: "M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"
|
|
822
823
|
}), null);
|
|
823
824
|
}
|
|
824
825
|
function ai(e) {
|
|
825
|
-
return
|
|
826
|
+
return I(St, J(e, {
|
|
826
827
|
path: "M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"
|
|
827
828
|
}), null);
|
|
828
829
|
}
|
|
829
830
|
function li(e) {
|
|
830
|
-
return
|
|
831
|
+
return I(St, J(e, {
|
|
831
832
|
path: "M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"
|
|
832
833
|
}), null);
|
|
833
834
|
}
|
|
834
835
|
function ri(e) {
|
|
835
|
-
return
|
|
836
|
+
return I(St, J(e, {
|
|
836
837
|
path: "M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"
|
|
837
838
|
}), null);
|
|
838
839
|
}
|
|
839
840
|
function di() {
|
|
840
|
-
return
|
|
841
|
+
return I("div", {
|
|
841
842
|
class: `${A.CSS_NAMESPACE}__spinner`
|
|
842
843
|
}, null);
|
|
843
844
|
}
|
|
@@ -851,37 +852,37 @@ const wt = {
|
|
|
851
852
|
function ci({
|
|
852
853
|
theme: e,
|
|
853
854
|
type: t,
|
|
854
|
-
isLoading:
|
|
855
|
+
isLoading: o,
|
|
855
856
|
icon: i
|
|
856
857
|
}) {
|
|
857
|
-
let
|
|
858
|
-
const n = !!
|
|
858
|
+
let s;
|
|
859
|
+
const n = !!o || t === "loading", l = {
|
|
859
860
|
theme: e,
|
|
860
861
|
type: t
|
|
861
862
|
};
|
|
862
863
|
if (n && (i === void 0 || typeof i == "boolean")) return wt.spinner();
|
|
863
864
|
if (i !== !1) {
|
|
864
865
|
if (bt(i))
|
|
865
|
-
|
|
866
|
+
s = ee(i);
|
|
866
867
|
else if (Be(i)) {
|
|
867
868
|
const a = i;
|
|
868
|
-
l.type = n ? "loading" : t,
|
|
869
|
-
} else
|
|
870
|
-
return
|
|
869
|
+
l.type = n ? "loading" : t, s = a(l), s = !s && n ? wt.spinner() : s;
|
|
870
|
+
} else _o(i) ? s = rs(i, l) : Xt(i) || Js(i) ? s = i : ui(t) && (s = wt[t](l));
|
|
871
|
+
return s;
|
|
871
872
|
}
|
|
872
873
|
}
|
|
873
874
|
const fi = () => {
|
|
874
875
|
};
|
|
875
|
-
function gi(e, t,
|
|
876
|
-
const { scrollHeight: i, style:
|
|
876
|
+
function gi(e, t, o = A.COLLAPSE_DURATION) {
|
|
877
|
+
const { scrollHeight: i, style: s } = e, n = o;
|
|
877
878
|
requestAnimationFrame(() => {
|
|
878
|
-
|
|
879
|
-
|
|
879
|
+
s.minHeight = "initial", s.height = i + "px", s.transition = `all ${n}ms`, requestAnimationFrame(() => {
|
|
880
|
+
s.height = "0", s.padding = "0", s.margin = "0", setTimeout(t, n);
|
|
880
881
|
});
|
|
881
882
|
});
|
|
882
883
|
}
|
|
883
884
|
function pi(e) {
|
|
884
|
-
const t = Y(!1),
|
|
885
|
+
const t = Y(!1), o = Y(!1), i = Y(!1), s = Y(vt.Enter), n = Se({
|
|
885
886
|
...e,
|
|
886
887
|
appendPosition: e.appendPosition || !1,
|
|
887
888
|
collapse: typeof e.collapse > "u" ? !0 : e.collapse,
|
|
@@ -899,7 +900,7 @@ function pi(e) {
|
|
|
899
900
|
);
|
|
900
901
|
const oe = (Oe) => {
|
|
901
902
|
const He = b();
|
|
902
|
-
Oe.target === He && (He.dispatchEvent(new Event(jt.ENTRANCE_ANIMATION_END)), He.removeEventListener("animationend", oe), He.removeEventListener("animationcancel", oe),
|
|
903
|
+
Oe.target === He && (He.dispatchEvent(new Event(jt.ENTRANCE_ANIMATION_END)), He.removeEventListener("animationend", oe), He.removeEventListener("animationcancel", oe), s.value === vt.Enter && Oe.type !== "animationcancel" && He.classList.remove(...x));
|
|
903
904
|
}, he = () => {
|
|
904
905
|
const Oe = b();
|
|
905
906
|
Oe.classList.add(...x), Oe.addEventListener("animationend", oe), Oe.addEventListener("animationcancel", oe);
|
|
@@ -913,9 +914,9 @@ function pi(e) {
|
|
|
913
914
|
he.removeEventListener("animationend", x), n.collapse ? gi(he, l, n.collapseDuration) : l();
|
|
914
915
|
}, oe = () => {
|
|
915
916
|
const he = b();
|
|
916
|
-
|
|
917
|
+
s.value = vt.Exit, he && (he.className += ` ${u.value}`, he.addEventListener("animationend", x));
|
|
917
918
|
};
|
|
918
|
-
|
|
919
|
+
o.value || (i.value ? x() : setTimeout(oe));
|
|
919
920
|
}
|
|
920
921
|
function b() {
|
|
921
922
|
return e.toastRef.value;
|
|
@@ -932,44 +933,44 @@ function pi(e) {
|
|
|
932
933
|
function U() {
|
|
933
934
|
t.value = !1;
|
|
934
935
|
}
|
|
935
|
-
function
|
|
936
|
-
x && (x.stopPropagation(), x.preventDefault()),
|
|
936
|
+
function re(x) {
|
|
937
|
+
x && (x.stopPropagation(), x.preventDefault()), o.value = !1;
|
|
937
938
|
}
|
|
938
939
|
return ht(k), ht(() => {
|
|
939
940
|
const x = Me();
|
|
940
|
-
|
|
941
|
+
o.value = x.findIndex((oe) => oe.toastId === n.toastId) > -1;
|
|
941
942
|
}), ht(() => {
|
|
942
943
|
e.isLoading !== void 0 && (e.loading.value ? U() : C());
|
|
943
|
-
}),
|
|
944
|
+
}), to(y), Io(() => {
|
|
944
945
|
e.pauseOnFocusLoss && S();
|
|
945
946
|
}), {
|
|
946
|
-
isIn:
|
|
947
|
+
isIn: o,
|
|
947
948
|
isRunning: t,
|
|
948
|
-
hideToast:
|
|
949
|
+
hideToast: re,
|
|
949
950
|
eventHandlers: p
|
|
950
951
|
};
|
|
951
952
|
}
|
|
952
953
|
const hi = /* @__PURE__ */ H({
|
|
953
954
|
name: "ToastItem",
|
|
954
955
|
inheritAttrs: !1,
|
|
955
|
-
props:
|
|
956
|
+
props: qo,
|
|
956
957
|
// @ts-ignore
|
|
957
958
|
setup(e) {
|
|
958
|
-
const t = Y(),
|
|
959
|
+
const t = Y(), o = q(() => !!e.isLoading), i = q(() => e.progress !== void 0 && e.progress !== null), s = q(() => ci(e)), n = q(() => [`${A.CSS_NAMESPACE}__toast`, `${A.CSS_NAMESPACE}__toast-theme--${e.theme}`, `${A.CSS_NAMESPACE}__toast--${e.type}`, e.rtl ? `${A.CSS_NAMESPACE}__toast--rtl` : void 0, e.toastClassName || ""].filter(Boolean).join(" ")), {
|
|
959
960
|
isRunning: l,
|
|
960
961
|
isIn: a,
|
|
961
962
|
hideToast: u,
|
|
962
963
|
eventHandlers: p
|
|
963
964
|
} = pi({
|
|
964
965
|
toastRef: t,
|
|
965
|
-
loading:
|
|
966
|
+
loading: o,
|
|
966
967
|
done: () => {
|
|
967
968
|
W.remove(e.toastId);
|
|
968
969
|
},
|
|
969
|
-
...
|
|
970
|
+
...Uo(e.transition, e.disabledEnterTransition),
|
|
970
971
|
...e
|
|
971
972
|
});
|
|
972
|
-
return () =>
|
|
973
|
+
return () => I("div", J({
|
|
973
974
|
id: e.toastId,
|
|
974
975
|
class: n.value,
|
|
975
976
|
style: e.toastStyle || {},
|
|
@@ -978,20 +979,20 @@ const hi = /* @__PURE__ */ H({
|
|
|
978
979
|
onClick: (y) => {
|
|
979
980
|
e.closeOnClick && u(), e.onClick && e.onClick(y);
|
|
980
981
|
}
|
|
981
|
-
}, p.value), [
|
|
982
|
+
}, p.value), [I("div", {
|
|
982
983
|
role: e.role,
|
|
983
984
|
"data-testid": "toast-body",
|
|
984
985
|
class: `${A.CSS_NAMESPACE}__toast-body ${e.bodyClassName || ""}`
|
|
985
|
-
}, [
|
|
986
|
+
}, [s.value != null && I("div", {
|
|
986
987
|
"data-testid": `toast-icon-${e.type}`,
|
|
987
988
|
class: [`${A.CSS_NAMESPACE}__toast-icon`, e.isLoading ? "" : `${A.CSS_NAMESPACE}--animate-icon ${A.CSS_NAMESPACE}__zoom-enter`].join(" ")
|
|
988
|
-
}, [bt(
|
|
989
|
+
}, [bt(s.value) ? ut(ee(s.value), {
|
|
989
990
|
theme: e.theme,
|
|
990
991
|
type: e.type
|
|
991
|
-
}) : Be(
|
|
992
|
+
}) : Be(s.value) ? s.value({
|
|
992
993
|
theme: e.theme,
|
|
993
994
|
type: e.type
|
|
994
|
-
}) :
|
|
995
|
+
}) : s.value]), I("div", {
|
|
995
996
|
"data-testid": "toast-content"
|
|
996
997
|
}, [bt(e.content) ? ut(ee(e.content), {
|
|
997
998
|
toastProps: ee(e),
|
|
@@ -1006,7 +1007,7 @@ const hi = /* @__PURE__ */ H({
|
|
|
1006
1007
|
data: e.data
|
|
1007
1008
|
}) : e.dangerouslyHTMLString ? ut("div", {
|
|
1008
1009
|
innerHTML: e.content
|
|
1009
|
-
}) : e.content])]), (e.closeButton === void 0 || e.closeButton === !0) &&
|
|
1010
|
+
}) : e.content])]), (e.closeButton === void 0 || e.closeButton === !0) && I(ii, {
|
|
1010
1011
|
theme: e.theme,
|
|
1011
1012
|
closeToast: (y) => {
|
|
1012
1013
|
y.stopPropagation(), y.preventDefault(), u();
|
|
@@ -1019,7 +1020,7 @@ const hi = /* @__PURE__ */ H({
|
|
|
1019
1020
|
closeToast: u,
|
|
1020
1021
|
type: e.type,
|
|
1021
1022
|
theme: e.theme
|
|
1022
|
-
}) : null,
|
|
1023
|
+
}) : null, I(si, {
|
|
1023
1024
|
className: e.progressClassName,
|
|
1024
1025
|
style: e.progressStyle,
|
|
1025
1026
|
rtl: e.rtl,
|
|
@@ -1036,196 +1037,196 @@ const hi = /* @__PURE__ */ H({
|
|
|
1036
1037
|
}
|
|
1037
1038
|
});
|
|
1038
1039
|
let et = 0;
|
|
1039
|
-
function
|
|
1040
|
-
typeof window > "u" || (et && window.cancelAnimationFrame(et), et = window.requestAnimationFrame(
|
|
1040
|
+
function Fo() {
|
|
1041
|
+
typeof window > "u" || (et && window.cancelAnimationFrame(et), et = window.requestAnimationFrame(Fo), kt.lastUrl !== window.location.href && (kt.lastUrl = window.location.href, W.clear()));
|
|
1041
1042
|
}
|
|
1042
1043
|
const mi = /* @__PURE__ */ H({
|
|
1043
1044
|
name: "ToastifyContainer",
|
|
1044
1045
|
inheritAttrs: !1,
|
|
1045
|
-
props:
|
|
1046
|
+
props: qo,
|
|
1046
1047
|
// @ts-ignore
|
|
1047
1048
|
setup(e) {
|
|
1048
|
-
const t = q(() => e.containerId),
|
|
1049
|
-
return
|
|
1050
|
-
typeof window < "u" && e.clearOnUrlChange && window.requestAnimationFrame(
|
|
1051
|
-
}),
|
|
1049
|
+
const t = q(() => e.containerId), o = q(() => R[t.value] || []), i = q(() => o.value.filter((s) => s.position === e.position));
|
|
1050
|
+
return to(() => {
|
|
1051
|
+
typeof window < "u" && e.clearOnUrlChange && window.requestAnimationFrame(Fo);
|
|
1052
|
+
}), Io(() => {
|
|
1052
1053
|
typeof window < "u" && et && (window.cancelAnimationFrame(et), kt.lastUrl = "");
|
|
1053
|
-
}), () =>
|
|
1054
|
+
}), () => I(Z, null, [i.value.map((s) => {
|
|
1054
1055
|
const {
|
|
1055
1056
|
toastId: n = ""
|
|
1056
|
-
} =
|
|
1057
|
-
return
|
|
1057
|
+
} = s;
|
|
1058
|
+
return I(hi, J({
|
|
1058
1059
|
key: n
|
|
1059
|
-
},
|
|
1060
|
+
}, s), null);
|
|
1060
1061
|
})]);
|
|
1061
1062
|
}
|
|
1062
1063
|
});
|
|
1063
|
-
let
|
|
1064
|
-
const
|
|
1064
|
+
let Lt = !1;
|
|
1065
|
+
const Vo = {
|
|
1065
1066
|
isLoading: !0,
|
|
1066
1067
|
autoClose: !1,
|
|
1067
1068
|
closeOnClick: !1,
|
|
1068
1069
|
closeButton: !1,
|
|
1069
1070
|
draggable: !1
|
|
1070
1071
|
};
|
|
1071
|
-
function
|
|
1072
|
+
function jo() {
|
|
1072
1073
|
const e = [];
|
|
1073
1074
|
return Me().forEach((t) => {
|
|
1074
|
-
const
|
|
1075
|
-
|
|
1075
|
+
const o = document.getElementById(t.containerId);
|
|
1076
|
+
o && !o.classList.contains(Tt) && e.push(t);
|
|
1076
1077
|
}), e;
|
|
1077
1078
|
}
|
|
1078
1079
|
function bi(e) {
|
|
1079
|
-
const t =
|
|
1080
|
-
return
|
|
1080
|
+
const t = jo().length, o = e ?? 0;
|
|
1081
|
+
return o > 0 && t + le.items.length >= o;
|
|
1081
1082
|
}
|
|
1082
1083
|
function vi(e) {
|
|
1083
|
-
bi(e.limit) && !e.updateId &&
|
|
1084
|
+
bi(e.limit) && !e.updateId && le.items.push({
|
|
1084
1085
|
toastId: e.toastId,
|
|
1085
1086
|
containerId: e.containerId,
|
|
1086
1087
|
toastContent: e.content,
|
|
1087
1088
|
toastProps: e
|
|
1088
1089
|
});
|
|
1089
1090
|
}
|
|
1090
|
-
function Ce(e, t,
|
|
1091
|
-
if (
|
|
1092
|
-
|
|
1091
|
+
function Ce(e, t, o = {}) {
|
|
1092
|
+
if (Lt) return;
|
|
1093
|
+
o = At(ei(), {
|
|
1093
1094
|
type: t
|
|
1094
|
-
}, ee(
|
|
1095
|
-
...
|
|
1096
|
-
...
|
|
1095
|
+
}, ee(o)), (!o.toastId || typeof o.toastId != "string" && typeof o.toastId != "number") && (o.toastId = Ho()), o = {
|
|
1096
|
+
...o,
|
|
1097
|
+
...o.type === "loading" ? Vo : {},
|
|
1097
1098
|
content: e,
|
|
1098
|
-
containerId:
|
|
1099
|
+
containerId: o.containerId || String(o.position)
|
|
1099
1100
|
};
|
|
1100
|
-
const i = Number(
|
|
1101
|
-
return !isNaN(i) && i < 0 && (
|
|
1102
|
-
mt(e,
|
|
1101
|
+
const i = Number(o?.progress);
|
|
1102
|
+
return !isNaN(i) && i < 0 && (o.progress = 0), i > 1 && (o.progress = 1), o.theme === "auto" && (o.theme = ti()), vi(o), kt.lastUrl = window.location.href, o.multiple ? le.items.length ? o.updateId && mt(e, o) : mt(e, o) : (Lt = !0, L.clearAll(void 0, !1), setTimeout(() => {
|
|
1103
|
+
mt(e, o);
|
|
1103
1104
|
}, 0), setTimeout(() => {
|
|
1104
|
-
|
|
1105
|
-
}, 390)),
|
|
1105
|
+
Lt = !1;
|
|
1106
|
+
}, 390)), o.toastId;
|
|
1106
1107
|
}
|
|
1107
|
-
const
|
|
1108
|
-
|
|
1108
|
+
const L = (e, t) => Ce(e, F.DEFAULT, t);
|
|
1109
|
+
L.info = (e, t) => Ce(e, F.DEFAULT, {
|
|
1109
1110
|
...t,
|
|
1110
1111
|
type: F.INFO
|
|
1111
1112
|
});
|
|
1112
|
-
|
|
1113
|
+
L.error = (e, t) => Ce(e, F.DEFAULT, {
|
|
1113
1114
|
...t,
|
|
1114
1115
|
type: F.ERROR
|
|
1115
1116
|
});
|
|
1116
|
-
|
|
1117
|
+
L.warning = (e, t) => Ce(e, F.DEFAULT, {
|
|
1117
1118
|
...t,
|
|
1118
1119
|
type: F.WARNING
|
|
1119
1120
|
});
|
|
1120
|
-
|
|
1121
|
-
|
|
1121
|
+
L.warn = L.warning;
|
|
1122
|
+
L.success = (e, t) => Ce(e, F.DEFAULT, {
|
|
1122
1123
|
...t,
|
|
1123
1124
|
type: F.SUCCESS
|
|
1124
1125
|
});
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
theme:
|
|
1126
|
+
L.loading = (e, t) => Ce(e, F.DEFAULT, At(t, Vo));
|
|
1127
|
+
L.dark = (e, t) => Ce(e, F.DEFAULT, At(t, {
|
|
1128
|
+
theme: Ne.DARK
|
|
1128
1129
|
}));
|
|
1129
|
-
|
|
1130
|
+
L.remove = (e) => {
|
|
1130
1131
|
e ? W.dismiss(e) : W.clear();
|
|
1131
1132
|
};
|
|
1132
|
-
|
|
1133
|
-
|
|
1133
|
+
L.clearAll = (e, t) => {
|
|
1134
|
+
eo(() => {
|
|
1134
1135
|
W.clear(e, t);
|
|
1135
1136
|
});
|
|
1136
1137
|
};
|
|
1137
|
-
|
|
1138
|
+
L.isActive = (e) => {
|
|
1138
1139
|
let t = !1;
|
|
1139
|
-
return t =
|
|
1140
|
+
return t = jo().findIndex((o) => o.toastId === e) > -1, t;
|
|
1140
1141
|
};
|
|
1141
|
-
|
|
1142
|
+
L.update = (e, t = {}) => {
|
|
1142
1143
|
setTimeout(() => {
|
|
1143
|
-
const
|
|
1144
|
-
if (
|
|
1145
|
-
const i = ee(
|
|
1146
|
-
content:
|
|
1144
|
+
const o = Ys(e);
|
|
1145
|
+
if (o) {
|
|
1146
|
+
const i = ee(o), {
|
|
1147
|
+
content: s
|
|
1147
1148
|
} = i, n = {
|
|
1148
1149
|
...i,
|
|
1149
1150
|
...t,
|
|
1150
1151
|
toastId: t.toastId || e,
|
|
1151
|
-
updateId:
|
|
1152
|
-
}, l = n.render ||
|
|
1152
|
+
updateId: Ho()
|
|
1153
|
+
}, l = n.render || s;
|
|
1153
1154
|
delete n.render, Ce(l, n.type, n);
|
|
1154
1155
|
}
|
|
1155
1156
|
}, 0);
|
|
1156
1157
|
};
|
|
1157
|
-
|
|
1158
|
-
|
|
1158
|
+
L.done = (e) => {
|
|
1159
|
+
L.update(e, {
|
|
1159
1160
|
isLoading: !1,
|
|
1160
1161
|
progress: 1
|
|
1161
1162
|
});
|
|
1162
1163
|
};
|
|
1163
|
-
|
|
1164
|
+
L.promise = wi;
|
|
1164
1165
|
function wi(e, {
|
|
1165
1166
|
pending: t,
|
|
1166
|
-
error:
|
|
1167
|
+
error: o,
|
|
1167
1168
|
success: i
|
|
1168
|
-
},
|
|
1169
|
+
}, s) {
|
|
1169
1170
|
var n, l, a;
|
|
1170
1171
|
let u;
|
|
1171
1172
|
const p = {
|
|
1172
|
-
...
|
|
1173
|
+
...s || {},
|
|
1173
1174
|
autoClose: !1
|
|
1174
1175
|
};
|
|
1175
|
-
t && (u = Xt(t) ?
|
|
1176
|
+
t && (u = Xt(t) ? L.loading(t, p) : L.loading(t.render, {
|
|
1176
1177
|
...p,
|
|
1177
1178
|
...t
|
|
1178
1179
|
}));
|
|
1179
1180
|
const y = {
|
|
1180
|
-
autoClose: (n =
|
|
1181
|
-
closeOnClick: (l =
|
|
1182
|
-
closeButton: (a =
|
|
1181
|
+
autoClose: (n = s?.autoClose) != null ? n : !0,
|
|
1182
|
+
closeOnClick: (l = s?.closeOnClick) != null ? l : !0,
|
|
1183
|
+
closeButton: (a = s?.autoClose) != null ? a : null,
|
|
1183
1184
|
isLoading: void 0,
|
|
1184
1185
|
draggable: null,
|
|
1185
1186
|
delay: 100
|
|
1186
1187
|
}, k = (m, S, C) => {
|
|
1187
1188
|
if (S == null) {
|
|
1188
|
-
|
|
1189
|
+
L.remove(u);
|
|
1189
1190
|
return;
|
|
1190
1191
|
}
|
|
1191
1192
|
const U = {
|
|
1192
1193
|
type: m,
|
|
1193
1194
|
...y,
|
|
1194
|
-
...
|
|
1195
|
+
...s,
|
|
1195
1196
|
data: C
|
|
1196
|
-
},
|
|
1197
|
+
}, re = Xt(S) ? {
|
|
1197
1198
|
render: S
|
|
1198
1199
|
} : S;
|
|
1199
|
-
return u ?
|
|
1200
|
+
return u ? L.update(u, {
|
|
1200
1201
|
...U,
|
|
1201
|
-
...
|
|
1202
|
+
...re,
|
|
1202
1203
|
isLoading: !1
|
|
1203
|
-
}) :
|
|
1204
|
+
}) : L(re.render, {
|
|
1204
1205
|
...U,
|
|
1205
|
-
...
|
|
1206
|
+
...re,
|
|
1206
1207
|
isLoading: !1
|
|
1207
1208
|
}), C;
|
|
1208
1209
|
}, b = Be(e) ? e() : e;
|
|
1209
1210
|
return b.then((m) => {
|
|
1210
1211
|
k("success", i, m);
|
|
1211
1212
|
}).catch((m) => {
|
|
1212
|
-
k("error",
|
|
1213
|
+
k("error", o, m);
|
|
1213
1214
|
}), b;
|
|
1214
1215
|
}
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1216
|
+
L.POSITION = rt;
|
|
1217
|
+
L.THEME = Ne;
|
|
1218
|
+
L.TYPE = F;
|
|
1219
|
+
L.TRANSITIONS = _s;
|
|
1219
1220
|
const yi = {
|
|
1220
1221
|
install(e, t = {}) {
|
|
1221
|
-
|
|
1222
|
+
Zs.useHandler = t.useHandler || (() => {
|
|
1222
1223
|
}), ki(t);
|
|
1223
1224
|
}
|
|
1224
1225
|
};
|
|
1225
1226
|
typeof window < "u" && (window.Vue3Toastify = yi);
|
|
1226
1227
|
function ki(e = {}) {
|
|
1227
|
-
const t = At(
|
|
1228
|
-
|
|
1228
|
+
const t = At(xo, e);
|
|
1229
|
+
Qs(t);
|
|
1229
1230
|
}
|
|
1230
1231
|
const Ci = { class: "dsg-alert__wrapper" }, Ei = {
|
|
1231
1232
|
key: 0,
|
|
@@ -1236,34 +1237,34 @@ const Ci = { class: "dsg-alert__wrapper" }, Ei = {
|
|
|
1236
1237
|
contentProps: { default: () => ({ title: "", message: "", type: "gray", hasCloseButton: !0 }) }
|
|
1237
1238
|
},
|
|
1238
1239
|
setup(e) {
|
|
1239
|
-
const t = ["dsg-alert", "dsg-alert--" + e.contentProps.type, e.contentProps.hasCloseButton ? "dsg-alert--has-close" : "dsg-alert--no-close"], i =
|
|
1240
|
+
const t = ["dsg-alert", "dsg-alert--" + e.contentProps.type, e.contentProps.hasCloseButton ? "dsg-alert--has-close" : "dsg-alert--no-close"], i = ds().closeToast, s = () => {
|
|
1240
1241
|
i();
|
|
1241
1242
|
};
|
|
1242
1243
|
return (n, l) => (h(), v("div", {
|
|
1243
1244
|
class: D(t)
|
|
1244
1245
|
}, [
|
|
1245
|
-
n.contentProps.type === "gray" ? (h(), $(
|
|
1246
|
+
n.contentProps.type === "gray" ? (h(), $(Ie, {
|
|
1246
1247
|
key: 0,
|
|
1247
1248
|
icon: { icon: "info-circle" },
|
|
1248
1249
|
type: "outline",
|
|
1249
1250
|
theme: "gray",
|
|
1250
1251
|
size: "lg"
|
|
1251
1252
|
})) : w("", !0),
|
|
1252
|
-
n.contentProps.type === "error" ? (h(), $(
|
|
1253
|
+
n.contentProps.type === "error" ? (h(), $(Ie, {
|
|
1253
1254
|
key: 1,
|
|
1254
1255
|
icon: { icon: "alert-circle" },
|
|
1255
1256
|
type: "outline",
|
|
1256
1257
|
theme: "error",
|
|
1257
1258
|
size: "lg"
|
|
1258
1259
|
})) : w("", !0),
|
|
1259
|
-
n.contentProps.type === "warning" ? (h(), $(
|
|
1260
|
+
n.contentProps.type === "warning" ? (h(), $(Ie, {
|
|
1260
1261
|
key: 2,
|
|
1261
1262
|
icon: { icon: "alert-circle" },
|
|
1262
1263
|
type: "outline",
|
|
1263
1264
|
theme: "warning",
|
|
1264
1265
|
size: "lg"
|
|
1265
1266
|
})) : w("", !0),
|
|
1266
|
-
n.contentProps.type === "success" ? (h(), $(
|
|
1267
|
+
n.contentProps.type === "success" ? (h(), $(Ie, {
|
|
1267
1268
|
key: 3,
|
|
1268
1269
|
icon: { icon: "check-circle" },
|
|
1269
1270
|
type: "outline",
|
|
@@ -1273,15 +1274,15 @@ const Ci = { class: "dsg-alert__wrapper" }, Ei = {
|
|
|
1273
1274
|
T("div", Ci, [
|
|
1274
1275
|
T("p", {
|
|
1275
1276
|
class: D(["dsg-alert__title", { "dsg-alert__title--with-close-button": n.contentProps.hasCloseButton }])
|
|
1276
|
-
},
|
|
1277
|
-
n.contentProps.message ? (h(), v("p", Ei,
|
|
1277
|
+
}, P(n.contentProps.title), 3),
|
|
1278
|
+
n.contentProps.message ? (h(), v("p", Ei, P(n.contentProps.message), 1)) : w("", !0)
|
|
1278
1279
|
]),
|
|
1279
1280
|
n.contentProps.hasCloseButton ? (h(), v("button", {
|
|
1280
1281
|
key: 4,
|
|
1281
|
-
onClick:
|
|
1282
|
+
onClick: s,
|
|
1282
1283
|
class: "dsg-alert__close-button"
|
|
1283
1284
|
}, [
|
|
1284
|
-
|
|
1285
|
+
I(G, {
|
|
1285
1286
|
icon: "x-close",
|
|
1286
1287
|
size: "sm"
|
|
1287
1288
|
})
|
|
@@ -1289,32 +1290,32 @@ const Ci = { class: "dsg-alert__wrapper" }, Ei = {
|
|
|
1289
1290
|
]));
|
|
1290
1291
|
}
|
|
1291
1292
|
}), Ai = new class Ye {
|
|
1292
|
-
info(t = "",
|
|
1293
|
-
Ye.showToast("gray", t,
|
|
1293
|
+
info(t = "", o = "", i = {}) {
|
|
1294
|
+
Ye.showToast("gray", t, o, i);
|
|
1294
1295
|
}
|
|
1295
|
-
error(t = "",
|
|
1296
|
-
Ye.showToast("error", t,
|
|
1296
|
+
error(t = "", o = "", i = {}) {
|
|
1297
|
+
Ye.showToast("error", t, o, i);
|
|
1297
1298
|
}
|
|
1298
|
-
warning(t = "",
|
|
1299
|
-
Ye.showToast("warning", t,
|
|
1299
|
+
warning(t = "", o = "", i = {}) {
|
|
1300
|
+
Ye.showToast("warning", t, o, i);
|
|
1300
1301
|
}
|
|
1301
|
-
success(t = "",
|
|
1302
|
-
Ye.showToast("success", t,
|
|
1302
|
+
success(t = "", o = "", i = {}) {
|
|
1303
|
+
Ye.showToast("success", t, o, i);
|
|
1303
1304
|
}
|
|
1304
|
-
static showToast(t,
|
|
1305
|
+
static showToast(t, o, i, s) {
|
|
1305
1306
|
const n = {
|
|
1306
1307
|
hasCloseButton: !1,
|
|
1307
1308
|
position: "top-right",
|
|
1308
|
-
...
|
|
1309
|
+
...s
|
|
1309
1310
|
};
|
|
1310
|
-
|
|
1311
|
+
L(Ti, {
|
|
1311
1312
|
autoClose: !n.hasCloseButton,
|
|
1312
1313
|
closeButton: !1,
|
|
1313
1314
|
hideProgressBar: !0,
|
|
1314
1315
|
closeOnClick: !n.hasCloseButton,
|
|
1315
1316
|
position: n.position,
|
|
1316
1317
|
contentProps: {
|
|
1317
|
-
title:
|
|
1318
|
+
title: o,
|
|
1318
1319
|
message: i,
|
|
1319
1320
|
type: t,
|
|
1320
1321
|
hasCloseButton: n.hasCloseButton
|
|
@@ -1329,10 +1330,10 @@ const Ci = { class: "dsg-alert__wrapper" }, Ei = {
|
|
|
1329
1330
|
}, $i = {
|
|
1330
1331
|
key: 1,
|
|
1331
1332
|
class: "dsg-badge--label"
|
|
1332
|
-
},
|
|
1333
|
+
}, Li = { class: "dsg-badge--after" }, Ii = {
|
|
1333
1334
|
key: 1,
|
|
1334
1335
|
class: "dsg-badge--close-wrapper"
|
|
1335
|
-
},
|
|
1336
|
+
}, Ko = /* @__PURE__ */ H({
|
|
1336
1337
|
__name: "DsgBadge",
|
|
1337
1338
|
props: {
|
|
1338
1339
|
label: { default: "" },
|
|
@@ -1349,8 +1350,8 @@ const Ci = { class: "dsg-alert__wrapper" }, Ei = {
|
|
|
1349
1350
|
destroyOnClose: { type: Boolean, default: !1 }
|
|
1350
1351
|
},
|
|
1351
1352
|
emits: ["before-hide", "after-hide", "before-destroy", "after-destroy", "on-click"],
|
|
1352
|
-
setup(e, { expose: t, emit:
|
|
1353
|
-
const i = e.iconBefore || e.iconAfter || e.type === "add",
|
|
1353
|
+
setup(e, { expose: t, emit: o }) {
|
|
1354
|
+
const i = e.iconBefore || e.iconAfter || e.type === "add", s = [
|
|
1354
1355
|
"dsg-badge",
|
|
1355
1356
|
`dsg-badge--${e.size}`,
|
|
1356
1357
|
`dsg-badge--${e.type}`,
|
|
@@ -1364,8 +1365,8 @@ const Ci = { class: "dsg-alert__wrapper" }, Ei = {
|
|
|
1364
1365
|
`${e.iconAfter ? "dsg-badge--has-icon-after" : ""}`,
|
|
1365
1366
|
e.classes
|
|
1366
1367
|
].join(" ").replaceAll(/\s+/g, " ").trim();
|
|
1367
|
-
e.type === "add" && (e.label || e.avatarUri || e.hasDot || e.iconBefore || e.iconAfter || e.hasClose) && e.theme !== "badge-modern" && e.themeColor && new
|
|
1368
|
-
const a =
|
|
1368
|
+
e.type === "add" && (e.label || e.avatarUri || e.hasDot || e.iconBefore || e.iconAfter || e.hasClose) && e.theme !== "badge-modern" && e.themeColor && new ne("DsgBadge: 'add' type badges should only be called with 'size', 'theme' and 'themeColor' props. Note that 'themeColor' prop is discarded for theme 'badge-modern'."), [e.avatarUri, e.iconBefore, e.hasDot].filter(Boolean).length > 1 && new ne("DsgBadge: 'avatarUri', 'iconBefore' and 'hasDot' props are mutually exclusive. Please use only one of them."), [e.iconAfter, e.hasClose].filter(Boolean).length > 1 && new ne("DsgBadge: 'iconAfter' and 'hasClose' props are mutually exclusive. Please use only one of them.");
|
|
1369
|
+
const a = o, u = we("dsgBadge"), p = (k) => {
|
|
1369
1370
|
e.destroyOnClose ? (a("before-destroy", u.value), u.value?.remove(), a("after-destroy")) : (a("before-hide", u.value), u.value && (u.value.style.display = "none"), a("after-hide", u.value));
|
|
1370
1371
|
}, y = (k) => {
|
|
1371
1372
|
a("on-click", u.value);
|
|
@@ -1386,13 +1387,13 @@ const Ci = { class: "dsg-alert__wrapper" }, Ei = {
|
|
|
1386
1387
|
*/
|
|
1387
1388
|
clickEvent: y
|
|
1388
1389
|
}), (k, b) => (h(), v("div", {
|
|
1389
|
-
class: D(
|
|
1390
|
+
class: D(ge(s)),
|
|
1390
1391
|
ref: "dsgBadge",
|
|
1391
1392
|
onClick: y
|
|
1392
1393
|
}, [
|
|
1393
1394
|
k.type === "standard" ? M(k.$slots, "dsg-badge--before", { key: 0 }, () => [
|
|
1394
1395
|
T("div", Si, [
|
|
1395
|
-
k.avatarUri ? (h(), $(
|
|
1396
|
+
k.avatarUri ? (h(), $(ot, {
|
|
1396
1397
|
key: 0,
|
|
1397
1398
|
"profile-uri": k.avatarUri,
|
|
1398
1399
|
class: "dsg-badge--avatar",
|
|
@@ -1407,7 +1408,7 @@ const Ci = { class: "dsg-alert__wrapper" }, Ei = {
|
|
|
1407
1408
|
k.hasDot ? (h(), v("span", Oi)) : w("", !0)
|
|
1408
1409
|
])
|
|
1409
1410
|
]) : w("", !0),
|
|
1410
|
-
k.type === "standard" ? (h(), v("label", $i,
|
|
1411
|
+
k.type === "standard" ? (h(), v("label", $i, P(k.label), 1)) : w("", !0),
|
|
1411
1412
|
k.type === "add" ? (h(), $(G, {
|
|
1412
1413
|
key: 2,
|
|
1413
1414
|
icon: "plus",
|
|
@@ -1415,14 +1416,14 @@ const Ci = { class: "dsg-alert__wrapper" }, Ei = {
|
|
|
1415
1416
|
class: "dsg-badge--icon-add dsg-badge--icon"
|
|
1416
1417
|
})) : w("", !0),
|
|
1417
1418
|
k.type === "standard" ? M(k.$slots, "dsg-badge--after", { key: 3 }, () => [
|
|
1418
|
-
T("div",
|
|
1419
|
+
T("div", Li, [
|
|
1419
1420
|
k.iconAfter ? (h(), $(G, {
|
|
1420
1421
|
key: 0,
|
|
1421
1422
|
icon: k.iconAfter,
|
|
1422
1423
|
size: "xxs",
|
|
1423
1424
|
class: "dsg-badge--icon-after dsg-badge--icon"
|
|
1424
1425
|
}, null, 8, ["icon"])) : w("", !0),
|
|
1425
|
-
k.hasClose ? (h(), v("span",
|
|
1426
|
+
k.hasClose ? (h(), v("span", Ii, [
|
|
1426
1427
|
k.hasClose ? (h(), $(G, {
|
|
1427
1428
|
key: 0,
|
|
1428
1429
|
icon: "x-close",
|
|
@@ -1438,9 +1439,9 @@ const Ci = { class: "dsg-alert__wrapper" }, Ei = {
|
|
|
1438
1439
|
}), _i = {
|
|
1439
1440
|
key: 0,
|
|
1440
1441
|
class: "dsg-checkbox-group--form-wrapper"
|
|
1441
|
-
}, Bi = { class: "dsg-checkbox-group--header" }, Di = { class: "dsg-checkbox-group--header-title-wrapper" },
|
|
1442
|
+
}, Bi = { class: "dsg-checkbox-group--header" }, Di = { class: "dsg-checkbox-group--header-title-wrapper" }, Pi = { class: "dsg-checkbox-group--title" }, Ni = ["innerHTML"], Mi = { class: "dsg-checkbox-group--options" }, xi = ["onClick"], Ui = { class: "dsg-checkbox-group--panel-left" }, Ri = ["textContent"], zi = ["innerHTML", "data"], Hi = /* @__PURE__ */ H({
|
|
1442
1443
|
__name: "DsgCheckboxGroup",
|
|
1443
|
-
props: /* @__PURE__ */
|
|
1444
|
+
props: /* @__PURE__ */ Bo({
|
|
1444
1445
|
size: { default: "md" },
|
|
1445
1446
|
theme: { default: "form" },
|
|
1446
1447
|
title: { default: "" },
|
|
@@ -1454,22 +1455,22 @@ const Ci = { class: "dsg-alert__wrapper" }, Ei = {
|
|
|
1454
1455
|
}),
|
|
1455
1456
|
emits: ["update:modelValue"],
|
|
1456
1457
|
setup(e) {
|
|
1457
|
-
const t =
|
|
1458
|
-
|
|
1458
|
+
const t = Do(e, "modelValue"), o = ["dsg-checkbox-group", `dsg-checkbox-group--${e.size}`, `dsg-checkbox-group--theme-${e.theme}`], i = (s, n) => {
|
|
1459
|
+
s.target instanceof HTMLAnchorElement || (t.value = n.value);
|
|
1459
1460
|
};
|
|
1460
|
-
return (
|
|
1461
|
-
const l =
|
|
1461
|
+
return (s, n) => {
|
|
1462
|
+
const l = us("key");
|
|
1462
1463
|
return h(), v("div", {
|
|
1463
|
-
class: D(
|
|
1464
|
+
class: D(o)
|
|
1464
1465
|
}, [
|
|
1465
|
-
["form", "form-radio"].includes(
|
|
1466
|
+
["form", "form-radio"].includes(s.theme) ? (h(), v("div", _i, [
|
|
1466
1467
|
T("div", Bi, [
|
|
1467
|
-
M(
|
|
1468
|
+
M(s.$slots, "dsg-checkbox-group--header", {}, () => [
|
|
1468
1469
|
T("div", Di, [
|
|
1469
|
-
T("h3",
|
|
1470
|
-
|
|
1470
|
+
T("h3", Pi, P(s.title), 1),
|
|
1471
|
+
s.tooltip ? (h(), $($o, {
|
|
1471
1472
|
key: 0,
|
|
1472
|
-
label:
|
|
1473
|
+
label: s.tooltip,
|
|
1473
1474
|
position: "top",
|
|
1474
1475
|
triggers: ["hover"],
|
|
1475
1476
|
"auto-hide": !0,
|
|
@@ -1477,36 +1478,36 @@ const Ci = { class: "dsg-alert__wrapper" }, Ei = {
|
|
|
1477
1478
|
class: "dsg-checkbox-group--tooltip"
|
|
1478
1479
|
}, null, 8, ["label"])) : w("", !0)
|
|
1479
1480
|
]),
|
|
1480
|
-
|
|
1481
|
+
s.subtext ? (h(), v("p", {
|
|
1481
1482
|
key: 0,
|
|
1482
1483
|
class: "dsg-checkbox-group--subtext",
|
|
1483
|
-
innerHTML:
|
|
1484
|
-
}, null, 8,
|
|
1484
|
+
innerHTML: s.subtext
|
|
1485
|
+
}, null, 8, Ni)) : w("", !0)
|
|
1485
1486
|
])
|
|
1486
1487
|
]),
|
|
1487
1488
|
T("div", Mi, [
|
|
1488
|
-
(h(!0), v(Z, null, ke(
|
|
1489
|
+
(h(!0), v(Z, null, ke(s.options, (a, u) => (h(), v("div", {
|
|
1489
1490
|
key: u,
|
|
1490
1491
|
class: "dsg-checkbox-group--option"
|
|
1491
1492
|
}, [
|
|
1492
|
-
|
|
1493
|
+
I(yt, {
|
|
1493
1494
|
label: a.label,
|
|
1494
1495
|
value: a.value,
|
|
1495
1496
|
disabled: a.disabled,
|
|
1496
1497
|
size: "sm",
|
|
1497
|
-
type: ["form", "panel"].includes(
|
|
1498
|
+
type: ["form", "panel"].includes(s.theme) ? "checkbox" : "radio",
|
|
1498
1499
|
modelValue: t.value,
|
|
1499
1500
|
"onUpdate:modelValue": n[0] || (n[0] = (p) => t.value = p)
|
|
1500
1501
|
}, null, 8, ["label", "value", "disabled", "type", "modelValue"])
|
|
1501
1502
|
]))), 128))
|
|
1502
1503
|
])
|
|
1503
1504
|
])) : w("", !0),
|
|
1504
|
-
["panel", "panel-content"].includes(
|
|
1505
|
+
["panel", "panel-content"].includes(s.theme) ? (h(!0), v(Z, { key: 1 }, ke(s.options, (a, u) => Po((h(), v("div", {
|
|
1505
1506
|
class: D(["dsg-checkbox-group--panel", `dsg-checkbox-group--panel-${t.value === a.value ? "selected" : "unselected"}`]),
|
|
1506
1507
|
onClick: (p) => i(p, a)
|
|
1507
1508
|
}, [
|
|
1508
1509
|
T("div", Ui, [
|
|
1509
|
-
M(
|
|
1510
|
+
M(s.$slots, `dsg-checkbox-group--panel-title--${String(a.value).trim().toLowerCase().replace(/[^0-9a-zA-Z]/g, "-").replace(/-+/g, "-")}`, { data: a }, () => [
|
|
1510
1511
|
a.icon ? (h(), $(G, {
|
|
1511
1512
|
key: 0,
|
|
1512
1513
|
icon: a.icon,
|
|
@@ -1514,10 +1515,10 @@ const Ci = { class: "dsg-alert__wrapper" }, Ei = {
|
|
|
1514
1515
|
}, null, 8, ["icon"])) : w("", !0),
|
|
1515
1516
|
T("h3", {
|
|
1516
1517
|
class: "dsg-checkbox-group--panel-title",
|
|
1517
|
-
textContent:
|
|
1518
|
+
textContent: P(a.label)
|
|
1518
1519
|
}, null, 8, Ri)
|
|
1519
1520
|
]),
|
|
1520
|
-
M(
|
|
1521
|
+
M(s.$slots, `dsg-checkbox-group--panel-subtext--${String(a.value).trim().toLowerCase().replace(/[^0-9a-zA-Z]/g, "-").replace(/-+/g, "-")}`, {}, () => [
|
|
1521
1522
|
a.subtext ? (h(), v("p", {
|
|
1522
1523
|
key: 0,
|
|
1523
1524
|
class: "dsg-checkbox-group--panel-subtext",
|
|
@@ -1530,7 +1531,7 @@ const Ci = { class: "dsg-alert__wrapper" }, Ei = {
|
|
|
1530
1531
|
key: u,
|
|
1531
1532
|
class: "dsg-checkbox-group--panel-right"
|
|
1532
1533
|
}, [
|
|
1533
|
-
|
|
1534
|
+
I(yt, {
|
|
1534
1535
|
value: a.value,
|
|
1535
1536
|
disabled: a.disabled,
|
|
1536
1537
|
type: "radio",
|
|
@@ -1545,51 +1546,51 @@ const Ci = { class: "dsg-alert__wrapper" }, Ei = {
|
|
|
1545
1546
|
};
|
|
1546
1547
|
}
|
|
1547
1548
|
});
|
|
1548
|
-
var qi = "2.0.3", Yt = 500,
|
|
1549
|
-
var
|
|
1549
|
+
var qi = "2.0.3", Yt = 500, uo = "user-agent", xe = "", co = "?", Ct = "function", ye = "undefined", Ue = "object", Zt = "string", V = "browser", ue = "cpu", ie = "device", Q = "engine", X = "os", De = "result", f = "name", r = "type", c = "vendor", g = "version", j = "architecture", it = "major", d = "model", Ze = "console", E = "mobile", O = "tablet", N = "smarttv", se = "wearable", It = "xr", Je = "embedded", qe = "inapp", so = "brands", Ae = "formFactors", io = "fullVersionList", Pe = "platform", no = "platformVersion", Ot = "bitness", Ee = "sec-ch-ua", Fi = Ee + "-full-version-list", Vi = Ee + "-arch", ji = Ee + "-" + Ot, Ki = Ee + "-form-factors", Gi = Ee + "-" + E, Wi = Ee + "-" + d, Go = Ee + "-" + Pe, Xi = Go + "-version", Wo = [so, io, E, d, Pe, no, j, Ae, Ot], ct = "Amazon", $e = "Apple", fo = "ASUS", go = "BlackBerry", Te = "Google", po = "Huawei", ho = "Lenovo", mo = "Honor", ft = "LG", _t = "Microsoft", Bt = "Motorola", Dt = "Nvidia", bo = "OnePlus", Pt = "OPPO", Fe = "Samsung", vo = "Sharp", Ve = "Sony", Nt = "Xiaomi", Mt = "Zebra", wo = "Chrome", yo = "Chromium", me = "Chromecast", Yi = "Edge", je = "Firefox", Ke = "Opera", xt = "Facebook", ko = "Sogou", Le = "Mobile ", Ge = " Browser", Jt = "Windows", Zi = typeof window !== ye, K = Zi && window.navigator ? window.navigator : void 0, be = K && K.userAgentData ? K.userAgentData : void 0, Ji = function(e, t) {
|
|
1550
|
+
var o = {}, i = t;
|
|
1550
1551
|
if (!Et(t)) {
|
|
1551
1552
|
i = {};
|
|
1552
|
-
for (var
|
|
1553
|
-
for (var n in t[
|
|
1554
|
-
i[n] = t[
|
|
1553
|
+
for (var s in t)
|
|
1554
|
+
for (var n in t[s])
|
|
1555
|
+
i[n] = t[s][n].concat(i[n] ? i[n] : []);
|
|
1555
1556
|
}
|
|
1556
1557
|
for (var l in e)
|
|
1557
|
-
|
|
1558
|
-
return
|
|
1558
|
+
o[l] = i[l] && i[l].length % 2 === 0 ? i[l].concat(e[l]) : e[l];
|
|
1559
|
+
return o;
|
|
1559
1560
|
}, $t = function(e) {
|
|
1560
|
-
for (var t = {},
|
|
1561
|
-
t[e[
|
|
1561
|
+
for (var t = {}, o = 0; o < e.length; o++)
|
|
1562
|
+
t[e[o].toUpperCase()] = e[o];
|
|
1562
1563
|
return t;
|
|
1563
1564
|
}, Qt = function(e, t) {
|
|
1564
1565
|
if (typeof e === Ue && e.length > 0) {
|
|
1565
|
-
for (var
|
|
1566
|
-
if (
|
|
1566
|
+
for (var o in e)
|
|
1567
|
+
if (ce(e[o]) == ce(t)) return !0;
|
|
1567
1568
|
return !1;
|
|
1568
1569
|
}
|
|
1569
|
-
return ze(e) ?
|
|
1570
|
+
return ze(e) ? ce(t).indexOf(ce(e)) !== -1 : !1;
|
|
1570
1571
|
}, Et = function(e, t) {
|
|
1571
|
-
for (var
|
|
1572
|
-
return /^(browser|cpu|device|engine|os)$/.test(
|
|
1572
|
+
for (var o in e)
|
|
1573
|
+
return /^(browser|cpu|device|engine|os)$/.test(o) || (t ? Et(e[o]) : !1);
|
|
1573
1574
|
}, ze = function(e) {
|
|
1574
1575
|
return typeof e === Zt;
|
|
1575
1576
|
}, Ut = function(e) {
|
|
1576
1577
|
if (e) {
|
|
1577
|
-
for (var t = [],
|
|
1578
|
-
if (
|
|
1579
|
-
var
|
|
1580
|
-
t[i] = { brand:
|
|
1578
|
+
for (var t = [], o = Re(/\\?\"/g, e).split(","), i = 0; i < o.length; i++)
|
|
1579
|
+
if (o[i].indexOf(";") > -1) {
|
|
1580
|
+
var s = nt(o[i]).split(";v=");
|
|
1581
|
+
t[i] = { brand: s[0], version: s[1] };
|
|
1581
1582
|
} else
|
|
1582
|
-
t[i] = nt(
|
|
1583
|
+
t[i] = nt(o[i]);
|
|
1583
1584
|
return t;
|
|
1584
1585
|
}
|
|
1585
|
-
},
|
|
1586
|
+
}, ce = function(e) {
|
|
1586
1587
|
return ze(e) ? e.toLowerCase() : e;
|
|
1587
1588
|
}, Rt = function(e) {
|
|
1588
1589
|
return ze(e) ? Re(/[^\d\.]/g, e).split(".")[0] : void 0;
|
|
1589
|
-
},
|
|
1590
|
+
}, fe = function(e) {
|
|
1590
1591
|
for (var t in e) {
|
|
1591
|
-
var
|
|
1592
|
-
typeof
|
|
1592
|
+
var o = e[t];
|
|
1593
|
+
typeof o == Ue && o.length == 2 ? this[o[0]] = o[1] : this[o] = void 0;
|
|
1593
1594
|
}
|
|
1594
1595
|
return this;
|
|
1595
1596
|
}, Re = function(e, t) {
|
|
@@ -1601,24 +1602,24 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
1601
1602
|
return e = Re(/^\s\s*/, e), typeof t === ye ? e : e.substring(0, Yt);
|
|
1602
1603
|
}, zt = function(e, t) {
|
|
1603
1604
|
if (!(!e || !t))
|
|
1604
|
-
for (var
|
|
1605
|
-
var p = t[
|
|
1606
|
-
for (i =
|
|
1605
|
+
for (var o = 0, i, s, n, l, a, u; o < t.length && !a; ) {
|
|
1606
|
+
var p = t[o], y = t[o + 1];
|
|
1607
|
+
for (i = s = 0; i < p.length && !a && p[i]; )
|
|
1607
1608
|
if (a = p[i++].exec(e), a)
|
|
1608
1609
|
for (n = 0; n < y.length; n++)
|
|
1609
|
-
u = a[++
|
|
1610
|
-
|
|
1610
|
+
u = a[++s], l = y[n], typeof l === Ue && l.length > 0 ? l.length === 2 ? typeof l[1] == Ct ? this[l[0]] = l[1].call(this, u) : this[l[0]] = l[1] : l.length === 3 ? typeof l[1] === Ct && !(l[1].exec && l[1].test) ? this[l[0]] = u ? l[1].call(this, u, l[2]) : void 0 : this[l[0]] = u ? u.replace(l[1], l[2]) : void 0 : l.length === 4 && (this[l[0]] = u ? l[3].call(this, u.replace(l[1], l[2])) : void 0) : this[l] = u || void 0;
|
|
1611
|
+
o += 2;
|
|
1611
1612
|
}
|
|
1612
1613
|
}, ve = function(e, t) {
|
|
1613
|
-
for (var
|
|
1614
|
-
if (typeof t[
|
|
1615
|
-
for (var i = 0; i < t[
|
|
1616
|
-
if (Qt(t[
|
|
1617
|
-
return
|
|
1618
|
-
} else if (Qt(t[
|
|
1619
|
-
return
|
|
1614
|
+
for (var o in t)
|
|
1615
|
+
if (typeof t[o] === Ue && t[o].length > 0) {
|
|
1616
|
+
for (var i = 0; i < t[o].length; i++)
|
|
1617
|
+
if (Qt(t[o][i], e))
|
|
1618
|
+
return o === co ? void 0 : o;
|
|
1619
|
+
} else if (Qt(t[o], e))
|
|
1620
|
+
return o === co ? void 0 : o;
|
|
1620
1621
|
return t.hasOwnProperty("*") ? t["*"] : e;
|
|
1621
|
-
},
|
|
1622
|
+
}, Co = {
|
|
1622
1623
|
ME: "4.90",
|
|
1623
1624
|
"NT 3.11": "NT3.51",
|
|
1624
1625
|
"NT 4.0": "NT4.0",
|
|
@@ -1630,7 +1631,7 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
1630
1631
|
"8.1": "NT 6.3",
|
|
1631
1632
|
10: ["NT 6.4", "NT 10.0"],
|
|
1632
1633
|
RT: "ARM"
|
|
1633
|
-
},
|
|
1634
|
+
}, Eo = {
|
|
1634
1635
|
embedded: "Automotive",
|
|
1635
1636
|
mobile: "Mobile",
|
|
1636
1637
|
tablet: ["Tablet", "EInk"],
|
|
@@ -1639,14 +1640,14 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
1639
1640
|
xr: ["VR", "XR"],
|
|
1640
1641
|
"?": ["Desktop", "Unknown"],
|
|
1641
1642
|
"*": void 0
|
|
1642
|
-
},
|
|
1643
|
+
}, To = {
|
|
1643
1644
|
browser: [
|
|
1644
1645
|
[
|
|
1645
1646
|
// Most common regardless engine
|
|
1646
1647
|
/\b(?:crmo|crios)\/([\w\.]+)/i
|
|
1647
1648
|
// Chrome for Android/iOS
|
|
1648
1649
|
],
|
|
1649
|
-
[g, [f,
|
|
1650
|
+
[g, [f, Le + "Chrome"]],
|
|
1650
1651
|
[
|
|
1651
1652
|
/edg(?:e|ios|a)?\/([\w\.]+)/i
|
|
1652
1653
|
// Microsoft Edge
|
|
@@ -1749,7 +1750,7 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
1749
1750
|
/slbrowser\/([\w\.]+)/i
|
|
1750
1751
|
// Smart Lenovo Browser
|
|
1751
1752
|
],
|
|
1752
|
-
[g, [f, "Smart " +
|
|
1753
|
+
[g, [f, "Smart " + ho + Ge]],
|
|
1753
1754
|
[
|
|
1754
1755
|
/(avast|avg)\/([\w\.]+)/i
|
|
1755
1756
|
// Avast/AVG Secure Browser
|
|
@@ -1789,7 +1790,7 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
1789
1790
|
/fxios\/([\w\.-]+)/i
|
|
1790
1791
|
// Firefox for iOS
|
|
1791
1792
|
],
|
|
1792
|
-
[g, [f,
|
|
1793
|
+
[g, [f, Le + je]],
|
|
1793
1794
|
[
|
|
1794
1795
|
/\bqihoobrowser\/?([\w\.]*)/i
|
|
1795
1796
|
// 360
|
|
@@ -1814,12 +1815,12 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
1814
1815
|
/metasr[\/ ]?([\d\.]+)/i
|
|
1815
1816
|
// Sogou Explorer
|
|
1816
1817
|
],
|
|
1817
|
-
[g, [f,
|
|
1818
|
+
[g, [f, ko + " Explorer"]],
|
|
1818
1819
|
[
|
|
1819
1820
|
/(sogou)mo\w+\/([\d\.]+)/i
|
|
1820
1821
|
// Sogou Mobile
|
|
1821
1822
|
],
|
|
1822
|
-
[[f,
|
|
1823
|
+
[[f, ko + " Mobile"], g],
|
|
1823
1824
|
[
|
|
1824
1825
|
/(electron)\/([\w\.]+) safari/i,
|
|
1825
1826
|
// Electron-based App
|
|
@@ -1892,12 +1893,12 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
1892
1893
|
/headlesschrome(?:\/([\w\.]+)| )/i
|
|
1893
1894
|
// Chrome Headless
|
|
1894
1895
|
],
|
|
1895
|
-
[g, [f,
|
|
1896
|
+
[g, [f, wo + " Headless"]],
|
|
1896
1897
|
[
|
|
1897
1898
|
/ wv\).+(chrome)\/([\w\.]+)/i
|
|
1898
1899
|
// Chrome WebView
|
|
1899
1900
|
],
|
|
1900
|
-
[[f,
|
|
1901
|
+
[[f, wo + " WebView"], g],
|
|
1901
1902
|
[
|
|
1902
1903
|
/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i
|
|
1903
1904
|
// Android Browser
|
|
@@ -1907,7 +1908,7 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
1907
1908
|
/chrome\/([\w\.]+) mobile/i
|
|
1908
1909
|
// Chrome Mobile
|
|
1909
1910
|
],
|
|
1910
|
-
[g, [f,
|
|
1911
|
+
[g, [f, Le + "Chrome"]],
|
|
1911
1912
|
[
|
|
1912
1913
|
/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i
|
|
1913
1914
|
// Chrome/OmniWeb/Arora/Tizen/Nokia
|
|
@@ -1917,11 +1918,11 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
1917
1918
|
/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i
|
|
1918
1919
|
// Safari Mobile
|
|
1919
1920
|
],
|
|
1920
|
-
[g, [f,
|
|
1921
|
+
[g, [f, Le + "Safari"]],
|
|
1921
1922
|
[
|
|
1922
1923
|
/iphone .*mobile(?:\/\w+ | ?)safari/i
|
|
1923
1924
|
],
|
|
1924
|
-
[[f,
|
|
1925
|
+
[[f, Le + "Safari"]],
|
|
1925
1926
|
[
|
|
1926
1927
|
/version\/([\w\.\,]+) .*(safari)/i
|
|
1927
1928
|
// Safari
|
|
@@ -1941,7 +1942,7 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
1941
1942
|
/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i
|
|
1942
1943
|
// Firefox Mobile
|
|
1943
1944
|
],
|
|
1944
|
-
[[f,
|
|
1945
|
+
[[f, Le + je], g],
|
|
1945
1946
|
[
|
|
1946
1947
|
/(navigator|netscape\d?)\/([-\w\.]+)/i
|
|
1947
1948
|
// Netscape
|
|
@@ -2015,7 +2016,7 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
2015
2016
|
/((ppc|powerpc)(64)?)( mac|;|\))/i
|
|
2016
2017
|
// PowerPC
|
|
2017
2018
|
],
|
|
2018
|
-
[[j, /ower/, xe,
|
|
2019
|
+
[[j, /ower/, xe, ce]],
|
|
2019
2020
|
[
|
|
2020
2021
|
/ sun4\w[;\)]/i
|
|
2021
2022
|
// SPARC
|
|
@@ -2025,7 +2026,7 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
2025
2026
|
/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i
|
|
2026
2027
|
// IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
|
|
2027
2028
|
],
|
|
2028
|
-
[[j,
|
|
2029
|
+
[[j, ce]]
|
|
2029
2030
|
],
|
|
2030
2031
|
device: [
|
|
2031
2032
|
[
|
|
@@ -2063,33 +2064,33 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
2063
2064
|
// Sharp
|
|
2064
2065
|
/\b(sh-?[altvz]?\d\d[a-ekm]?)/i
|
|
2065
2066
|
],
|
|
2066
|
-
[d, [c,
|
|
2067
|
+
[d, [c, vo], [r, E]],
|
|
2067
2068
|
[
|
|
2068
2069
|
// Honor
|
|
2069
2070
|
/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i
|
|
2070
2071
|
],
|
|
2071
|
-
[d, [c,
|
|
2072
|
+
[d, [c, mo], [r, O]],
|
|
2072
2073
|
[
|
|
2073
2074
|
/honor([-\w ]+)[;\)]/i
|
|
2074
2075
|
],
|
|
2075
|
-
[d, [c,
|
|
2076
|
+
[d, [c, mo], [r, E]],
|
|
2076
2077
|
[
|
|
2077
2078
|
// Huawei
|
|
2078
2079
|
/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i
|
|
2079
2080
|
],
|
|
2080
|
-
[d, [c,
|
|
2081
|
+
[d, [c, po], [r, O]],
|
|
2081
2082
|
[
|
|
2082
2083
|
/(?:huawei)([-\w ]+)[;\)]/i,
|
|
2083
2084
|
/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
|
|
2084
2085
|
],
|
|
2085
|
-
[d, [c,
|
|
2086
|
+
[d, [c, po], [r, E]],
|
|
2086
2087
|
[
|
|
2087
2088
|
// Xiaomi
|
|
2088
2089
|
/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,
|
|
2089
2090
|
/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i
|
|
2090
2091
|
// Mi Pad tablets
|
|
2091
2092
|
],
|
|
2092
|
-
[[d, /_/g, " "], [c,
|
|
2093
|
+
[[d, /_/g, " "], [c, Nt], [r, O]],
|
|
2093
2094
|
[
|
|
2094
2095
|
/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,
|
|
2095
2096
|
// Xiaomi POCO
|
|
@@ -2105,17 +2106,17 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
2105
2106
|
// Xiaomi Mi
|
|
2106
2107
|
/ ([\w ]+) miui\/v?\d/i
|
|
2107
2108
|
],
|
|
2108
|
-
[[d, /_/g, " "], [c,
|
|
2109
|
+
[[d, /_/g, " "], [c, Nt], [r, E]],
|
|
2109
2110
|
[
|
|
2110
2111
|
// OPPO
|
|
2111
2112
|
/; (\w+) bui.+ oppo/i,
|
|
2112
2113
|
/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i
|
|
2113
2114
|
],
|
|
2114
|
-
[d, [c,
|
|
2115
|
+
[d, [c, Pt], [r, E]],
|
|
2115
2116
|
[
|
|
2116
2117
|
/\b(opd2(\d{3}a?))(?: bui|\))/i
|
|
2117
2118
|
],
|
|
2118
|
-
[d, [c, ve, { OnePlus: ["304", "403", "203"], "*":
|
|
2119
|
+
[d, [c, ve, { OnePlus: ["304", "403", "203"], "*": Pt }], [r, O]],
|
|
2119
2120
|
[
|
|
2120
2121
|
// BLU Vivo Series
|
|
2121
2122
|
/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i
|
|
@@ -2159,7 +2160,7 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
2159
2160
|
/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,
|
|
2160
2161
|
/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i
|
|
2161
2162
|
],
|
|
2162
|
-
[d, [c,
|
|
2163
|
+
[d, [c, ho], [r, O]],
|
|
2163
2164
|
[
|
|
2164
2165
|
// Nokia
|
|
2165
2166
|
/(nokia) (t[12][01])/i
|
|
@@ -2196,7 +2197,7 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
2196
2197
|
/ (kb2005|in20[12]5|be20[12][59])\b/i,
|
|
2197
2198
|
/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i
|
|
2198
2199
|
],
|
|
2199
|
-
[d, [c,
|
|
2200
|
+
[d, [c, bo], [r, E]],
|
|
2200
2201
|
[
|
|
2201
2202
|
// Amazon
|
|
2202
2203
|
/(alexa)webm/i,
|
|
@@ -2222,16 +2223,16 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
2222
2223
|
/\(bb10; (\w+)/i
|
|
2223
2224
|
// BlackBerry 10
|
|
2224
2225
|
],
|
|
2225
|
-
[d, [c,
|
|
2226
|
+
[d, [c, go], [r, E]],
|
|
2226
2227
|
[
|
|
2227
2228
|
// Asus
|
|
2228
2229
|
/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i
|
|
2229
2230
|
],
|
|
2230
|
-
[d, [c,
|
|
2231
|
+
[d, [c, fo], [r, O]],
|
|
2231
2232
|
[
|
|
2232
2233
|
/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i
|
|
2233
2234
|
],
|
|
2234
|
-
[d, [c,
|
|
2235
|
+
[d, [c, fo], [r, E]],
|
|
2235
2236
|
[
|
|
2236
2237
|
// HTC
|
|
2237
2238
|
/(nexus 9)/i
|
|
@@ -2261,7 +2262,7 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
2261
2262
|
// itel
|
|
2262
2263
|
/(itel) ((\w+))/i
|
|
2263
2264
|
],
|
|
2264
|
-
[[c,
|
|
2265
|
+
[[c, ce], d, [r, ve, { tablet: ["p10001l", "w7001"], "*": "mobile" }]],
|
|
2265
2266
|
[
|
|
2266
2267
|
// Acer
|
|
2267
2268
|
/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i
|
|
@@ -2384,97 +2385,97 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
2384
2385
|
/smart-tv.+(samsung)/i
|
|
2385
2386
|
// Samsung
|
|
2386
2387
|
],
|
|
2387
|
-
[c, [r,
|
|
2388
|
+
[c, [r, N]],
|
|
2388
2389
|
[
|
|
2389
2390
|
/hbbtv.+maple;(\d+)/i
|
|
2390
2391
|
],
|
|
2391
|
-
[[d, /^/, "SmartTV"], [c, Fe], [r,
|
|
2392
|
+
[[d, /^/, "SmartTV"], [c, Fe], [r, N]],
|
|
2392
2393
|
[
|
|
2393
2394
|
/tcast.+(lg)e?. ([-\w]+)/i
|
|
2394
2395
|
// LG SmartTV
|
|
2395
2396
|
],
|
|
2396
|
-
[c, d, [r,
|
|
2397
|
+
[c, d, [r, N]],
|
|
2397
2398
|
[
|
|
2398
2399
|
/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
|
|
2399
2400
|
],
|
|
2400
|
-
[[c, ft], [r,
|
|
2401
|
+
[[c, ft], [r, N]],
|
|
2401
2402
|
[
|
|
2402
2403
|
/(apple) ?tv/i
|
|
2403
2404
|
// Apple TV
|
|
2404
2405
|
],
|
|
2405
|
-
[c, [d, $e + " TV"], [r,
|
|
2406
|
+
[c, [d, $e + " TV"], [r, N]],
|
|
2406
2407
|
[
|
|
2407
2408
|
/crkey.*devicetype\/chromecast/i
|
|
2408
2409
|
// Google Chromecast Third Generation
|
|
2409
2410
|
],
|
|
2410
|
-
[[d, me + " Third Generation"], [c, Te], [r,
|
|
2411
|
+
[[d, me + " Third Generation"], [c, Te], [r, N]],
|
|
2411
2412
|
[
|
|
2412
2413
|
/crkey.*devicetype\/([^/]*)/i
|
|
2413
2414
|
// Google Chromecast with specific device type
|
|
2414
2415
|
],
|
|
2415
|
-
[[d, /^/, "Chromecast "], [c, Te], [r,
|
|
2416
|
+
[[d, /^/, "Chromecast "], [c, Te], [r, N]],
|
|
2416
2417
|
[
|
|
2417
2418
|
/fuchsia.*crkey/i
|
|
2418
2419
|
// Google Chromecast Nest Hub
|
|
2419
2420
|
],
|
|
2420
|
-
[[d, me + " Nest Hub"], [c, Te], [r,
|
|
2421
|
+
[[d, me + " Nest Hub"], [c, Te], [r, N]],
|
|
2421
2422
|
[
|
|
2422
2423
|
/crkey/i
|
|
2423
2424
|
// Google Chromecast, Linux-based or unknown
|
|
2424
2425
|
],
|
|
2425
|
-
[[d, me], [c, Te], [r,
|
|
2426
|
+
[[d, me], [c, Te], [r, N]],
|
|
2426
2427
|
[
|
|
2427
2428
|
/(portaltv)/i
|
|
2428
2429
|
// Facebook Portal TV
|
|
2429
2430
|
],
|
|
2430
|
-
[d, [c, xt], [r,
|
|
2431
|
+
[d, [c, xt], [r, N]],
|
|
2431
2432
|
[
|
|
2432
2433
|
/droid.+aft(\w+)( bui|\))/i
|
|
2433
2434
|
// Fire TV
|
|
2434
2435
|
],
|
|
2435
|
-
[d, [c, ct], [r,
|
|
2436
|
+
[d, [c, ct], [r, N]],
|
|
2436
2437
|
[
|
|
2437
2438
|
/(shield \w+ tv)/i
|
|
2438
2439
|
// Nvidia Shield TV
|
|
2439
2440
|
],
|
|
2440
|
-
[d, [c, Dt], [r,
|
|
2441
|
+
[d, [c, Dt], [r, N]],
|
|
2441
2442
|
[
|
|
2442
2443
|
/\(dtv[\);].+(aquos)/i,
|
|
2443
2444
|
/(aquos-tv[\w ]+)\)/i
|
|
2444
2445
|
// Sharp
|
|
2445
2446
|
],
|
|
2446
|
-
[d, [c,
|
|
2447
|
+
[d, [c, vo], [r, N]],
|
|
2447
2448
|
[
|
|
2448
2449
|
/(bravia[\w ]+)( bui|\))/i
|
|
2449
2450
|
// Sony
|
|
2450
2451
|
],
|
|
2451
|
-
[d, [c, Ve], [r,
|
|
2452
|
+
[d, [c, Ve], [r, N]],
|
|
2452
2453
|
[
|
|
2453
2454
|
/(mi(tv|box)-?\w+) bui/i
|
|
2454
2455
|
// Xiaomi
|
|
2455
2456
|
],
|
|
2456
|
-
[d, [c,
|
|
2457
|
+
[d, [c, Nt], [r, N]],
|
|
2457
2458
|
[
|
|
2458
2459
|
/Hbbtv.*(technisat) (.*);/i
|
|
2459
2460
|
// TechniSAT
|
|
2460
2461
|
],
|
|
2461
|
-
[c, d, [r,
|
|
2462
|
+
[c, d, [r, N]],
|
|
2462
2463
|
[
|
|
2463
2464
|
/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,
|
|
2464
2465
|
// Roku
|
|
2465
2466
|
/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i
|
|
2466
2467
|
// HbbTV devices
|
|
2467
2468
|
],
|
|
2468
|
-
[[c, nt], [d, nt], [r,
|
|
2469
|
+
[[c, nt], [d, nt], [r, N]],
|
|
2469
2470
|
[
|
|
2470
2471
|
// SmartTV from Unidentified Vendors
|
|
2471
2472
|
/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i
|
|
2472
2473
|
],
|
|
2473
|
-
[d, [r,
|
|
2474
|
+
[d, [r, N]],
|
|
2474
2475
|
[
|
|
2475
2476
|
/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i
|
|
2476
2477
|
],
|
|
2477
|
-
[[r,
|
|
2478
|
+
[[r, N]],
|
|
2478
2479
|
[
|
|
2479
2480
|
///////////////////
|
|
2480
2481
|
// CONSOLES
|
|
@@ -2507,48 +2508,48 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
2507
2508
|
/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i
|
|
2508
2509
|
// Samsung Galaxy Watch
|
|
2509
2510
|
],
|
|
2510
|
-
[d, [c, Fe], [r,
|
|
2511
|
+
[d, [c, Fe], [r, se]],
|
|
2511
2512
|
[
|
|
2512
2513
|
/((pebble))app/i,
|
|
2513
2514
|
// Pebble
|
|
2514
2515
|
/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i
|
|
2515
2516
|
// Asus ZenWatch / LG Watch / Pixel Watch
|
|
2516
2517
|
],
|
|
2517
|
-
[c, d, [r,
|
|
2518
|
+
[c, d, [r, se]],
|
|
2518
2519
|
[
|
|
2519
2520
|
/(ow(?:19|20)?we?[1-3]{1,3})/i
|
|
2520
2521
|
// Oppo Watch
|
|
2521
2522
|
],
|
|
2522
|
-
[d, [c,
|
|
2523
|
+
[d, [c, Pt], [r, se]],
|
|
2523
2524
|
[
|
|
2524
2525
|
/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i
|
|
2525
2526
|
// Apple Watch
|
|
2526
2527
|
],
|
|
2527
|
-
[d, [c, $e], [r,
|
|
2528
|
+
[d, [c, $e], [r, se]],
|
|
2528
2529
|
[
|
|
2529
2530
|
/(opwwe\d{3})/i
|
|
2530
2531
|
// OnePlus Watch
|
|
2531
2532
|
],
|
|
2532
|
-
[d, [c,
|
|
2533
|
+
[d, [c, bo], [r, se]],
|
|
2533
2534
|
[
|
|
2534
2535
|
/(moto 360)/i
|
|
2535
2536
|
// Motorola 360
|
|
2536
2537
|
],
|
|
2537
|
-
[d, [c, Bt], [r,
|
|
2538
|
+
[d, [c, Bt], [r, se]],
|
|
2538
2539
|
[
|
|
2539
2540
|
/(smartwatch 3)/i
|
|
2540
2541
|
// Sony SmartWatch
|
|
2541
2542
|
],
|
|
2542
|
-
[d, [c, Ve], [r,
|
|
2543
|
+
[d, [c, Ve], [r, se]],
|
|
2543
2544
|
[
|
|
2544
2545
|
/(g watch r)/i
|
|
2545
2546
|
// LG G Watch R
|
|
2546
2547
|
],
|
|
2547
|
-
[d, [c, ft], [r,
|
|
2548
|
+
[d, [c, ft], [r, se]],
|
|
2548
2549
|
[
|
|
2549
2550
|
/droid.+; (wt63?0{2,3})\)/i
|
|
2550
2551
|
],
|
|
2551
|
-
[d, [c, Mt], [r,
|
|
2552
|
+
[d, [c, Mt], [r, se]],
|
|
2552
2553
|
[
|
|
2553
2554
|
///////////////////
|
|
2554
2555
|
// XR
|
|
@@ -2556,17 +2557,17 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
2556
2557
|
/droid.+; (glass) \d/i
|
|
2557
2558
|
// Google Glass
|
|
2558
2559
|
],
|
|
2559
|
-
[d, [c, Te], [r,
|
|
2560
|
+
[d, [c, Te], [r, It]],
|
|
2560
2561
|
[
|
|
2561
2562
|
/(pico) (4|neo3(?: link|pro)?)/i
|
|
2562
2563
|
// Pico
|
|
2563
2564
|
],
|
|
2564
|
-
[c, d, [r,
|
|
2565
|
+
[c, d, [r, It]],
|
|
2565
2566
|
[
|
|
2566
2567
|
/(quest( \d| pro)?s?).+vr/i
|
|
2567
2568
|
// Meta Quest
|
|
2568
2569
|
],
|
|
2569
|
-
[d, [c, xt], [r,
|
|
2570
|
+
[d, [c, xt], [r, It]],
|
|
2570
2571
|
[
|
|
2571
2572
|
///////////////////
|
|
2572
2573
|
// EMBEDDED
|
|
@@ -2664,14 +2665,14 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
2664
2665
|
/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i
|
|
2665
2666
|
// Windows Phone
|
|
2666
2667
|
],
|
|
2667
|
-
[f, [g, ve,
|
|
2668
|
+
[f, [g, ve, Co]],
|
|
2668
2669
|
[
|
|
2669
2670
|
/windows nt 6\.2; (arm)/i,
|
|
2670
2671
|
// Windows RT
|
|
2671
2672
|
/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,
|
|
2672
2673
|
/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
|
|
2673
2674
|
],
|
|
2674
|
-
[[g, ve,
|
|
2675
|
+
[[g, ve, Co], [f, Jt]],
|
|
2675
2676
|
[
|
|
2676
2677
|
// iOS/macOS
|
|
2677
2678
|
/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,
|
|
@@ -2732,7 +2733,7 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
2732
2733
|
/\(bb(10);/i
|
|
2733
2734
|
// BlackBerry 10
|
|
2734
2735
|
],
|
|
2735
|
-
[g, [f,
|
|
2736
|
+
[g, [f, go]],
|
|
2736
2737
|
[
|
|
2737
2738
|
/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i
|
|
2738
2739
|
// Symbian
|
|
@@ -2813,43 +2814,43 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
2813
2814
|
]
|
|
2814
2815
|
}, gt = function() {
|
|
2815
2816
|
var e = { init: {}, isIgnore: {}, isIgnoreRgx: {}, toString: {} };
|
|
2816
|
-
return
|
|
2817
|
+
return fe.call(e.init, [
|
|
2817
2818
|
[V, [f, g, it, r]],
|
|
2818
|
-
[
|
|
2819
|
-
[
|
|
2819
|
+
[ue, [j]],
|
|
2820
|
+
[ie, [r, d, c]],
|
|
2820
2821
|
[Q, [f, g]],
|
|
2821
2822
|
[X, [f, g]]
|
|
2822
|
-
]),
|
|
2823
|
+
]), fe.call(e.isIgnore, [
|
|
2823
2824
|
[V, [g, it]],
|
|
2824
2825
|
[Q, [g]],
|
|
2825
2826
|
[X, [g]]
|
|
2826
|
-
]),
|
|
2827
|
+
]), fe.call(e.isIgnoreRgx, [
|
|
2827
2828
|
[V, / ?browser$/i],
|
|
2828
2829
|
[X, / ?os$/i]
|
|
2829
|
-
]),
|
|
2830
|
+
]), fe.call(e.toString, [
|
|
2830
2831
|
[V, [f, g]],
|
|
2831
|
-
[
|
|
2832
|
-
[
|
|
2832
|
+
[ue, [j]],
|
|
2833
|
+
[ie, [c, d]],
|
|
2833
2834
|
[Q, [f, g]],
|
|
2834
2835
|
[X, [f, g]]
|
|
2835
2836
|
]), e;
|
|
2836
2837
|
}(), Qi = function(e, t) {
|
|
2837
|
-
var
|
|
2838
|
+
var o = gt.init[t], i = gt.isIgnore[t] || 0, s = gt.isIgnoreRgx[t] || 0, n = gt.toString[t] || 0;
|
|
2838
2839
|
function l() {
|
|
2839
|
-
|
|
2840
|
+
fe.call(this, o);
|
|
2840
2841
|
}
|
|
2841
2842
|
return l.prototype.getItem = function() {
|
|
2842
2843
|
return e;
|
|
2843
2844
|
}, l.prototype.withClientHints = function() {
|
|
2844
|
-
return be ? be.getHighEntropyValues(
|
|
2845
|
-
return e.setCH(new
|
|
2845
|
+
return be ? be.getHighEntropyValues(Wo).then(function(a) {
|
|
2846
|
+
return e.setCH(new Xo(a, !1)).parseCH().get();
|
|
2846
2847
|
}) : e.parseCH().get();
|
|
2847
2848
|
}, l.prototype.withFeatureCheck = function() {
|
|
2848
2849
|
return e.detectFeature().get();
|
|
2849
2850
|
}, t != De && (l.prototype.is = function(a) {
|
|
2850
2851
|
var u = !1;
|
|
2851
2852
|
for (var p in this)
|
|
2852
|
-
if (this.hasOwnProperty(p) && !Qt(i, p) &&
|
|
2853
|
+
if (this.hasOwnProperty(p) && !Qt(i, p) && ce(s ? Re(s, this[p]) : this[p]) == ce(s ? Re(s, a) : a)) {
|
|
2853
2854
|
if (u = !0, a != ye) break;
|
|
2854
2855
|
} else if (a == ye && u) {
|
|
2855
2856
|
u = !u;
|
|
@@ -2874,61 +2875,61 @@ var qi = "2.0.3", Yt = 500, ds = "user-agent", xe = "", us = "?", Ct = "function
|
|
|
2874
2875
|
return a(y), y;
|
|
2875
2876
|
}), new l();
|
|
2876
2877
|
};
|
|
2877
|
-
function
|
|
2878
|
-
if (e = e || {},
|
|
2879
|
-
|
|
2880
|
-
[
|
|
2881
|
-
[
|
|
2878
|
+
function Xo(e, t) {
|
|
2879
|
+
if (e = e || {}, fe.call(this, Wo), t)
|
|
2880
|
+
fe.call(this, [
|
|
2881
|
+
[so, Ut(e[Ee])],
|
|
2882
|
+
[io, Ut(e[Fi])],
|
|
2882
2883
|
[E, /\?1/.test(e[Gi])],
|
|
2883
2884
|
[d, We(e[Wi])],
|
|
2884
|
-
[
|
|
2885
|
-
[
|
|
2885
|
+
[Pe, We(e[Go])],
|
|
2886
|
+
[no, We(e[Xi])],
|
|
2886
2887
|
[j, We(e[Vi])],
|
|
2887
2888
|
[Ae, Ut(e[Ki])],
|
|
2888
2889
|
[Ot, We(e[ji])]
|
|
2889
2890
|
]);
|
|
2890
2891
|
else
|
|
2891
|
-
for (var
|
|
2892
|
-
this.hasOwnProperty(
|
|
2893
|
-
}
|
|
2894
|
-
function
|
|
2895
|
-
return this.get = function(
|
|
2896
|
-
return
|
|
2897
|
-
}, this.set = function(
|
|
2898
|
-
return this.data[
|
|
2899
|
-
}, this.setCH = function(
|
|
2900
|
-
return this.uaCH =
|
|
2892
|
+
for (var o in e)
|
|
2893
|
+
this.hasOwnProperty(o) && typeof e[o] !== ye && (this[o] = e[o]);
|
|
2894
|
+
}
|
|
2895
|
+
function Ao(e, t, o, i) {
|
|
2896
|
+
return this.get = function(s) {
|
|
2897
|
+
return s ? this.data.hasOwnProperty(s) ? this.data[s] : void 0 : this.data;
|
|
2898
|
+
}, this.set = function(s, n) {
|
|
2899
|
+
return this.data[s] = n, this;
|
|
2900
|
+
}, this.setCH = function(s) {
|
|
2901
|
+
return this.uaCH = s, this;
|
|
2901
2902
|
}, this.detectFeature = function() {
|
|
2902
2903
|
if (K && K.userAgent == this.ua)
|
|
2903
2904
|
switch (this.itemType) {
|
|
2904
2905
|
case V:
|
|
2905
2906
|
K.brave && typeof K.brave.isBrave == Ct && this.set(f, "Brave");
|
|
2906
2907
|
break;
|
|
2907
|
-
case
|
|
2908
|
+
case ie:
|
|
2908
2909
|
!this.get(r) && be && be[E] && this.set(r, E), this.get(d) == "Macintosh" && K && typeof K.standalone !== ye && K.maxTouchPoints && K.maxTouchPoints > 2 && this.set(d, "iPad").set(r, O);
|
|
2909
2910
|
break;
|
|
2910
2911
|
case X:
|
|
2911
|
-
!this.get(f) && be && be[
|
|
2912
|
+
!this.get(f) && be && be[Pe] && this.set(f, be[Pe]);
|
|
2912
2913
|
break;
|
|
2913
2914
|
case De:
|
|
2914
|
-
var
|
|
2915
|
-
return
|
|
2915
|
+
var s = this.data, n = function(l) {
|
|
2916
|
+
return s[l].getItem().detectFeature().get();
|
|
2916
2917
|
};
|
|
2917
|
-
this.set(V, n(V)).set(
|
|
2918
|
+
this.set(V, n(V)).set(ue, n(ue)).set(ie, n(ie)).set(Q, n(Q)).set(X, n(X));
|
|
2918
2919
|
}
|
|
2919
2920
|
return this;
|
|
2920
2921
|
}, this.parseUA = function() {
|
|
2921
2922
|
return this.itemType != De && zt.call(this.data, this.ua, this.rgxMap), this.itemType == V && this.set(it, Rt(this.get(g))), this;
|
|
2922
2923
|
}, this.parseCH = function() {
|
|
2923
|
-
var
|
|
2924
|
+
var s = this.uaCH, n = this.rgxMap;
|
|
2924
2925
|
switch (this.itemType) {
|
|
2925
2926
|
case V:
|
|
2926
2927
|
case Q:
|
|
2927
|
-
var l =
|
|
2928
|
+
var l = s[io] || s[so], a;
|
|
2928
2929
|
if (l)
|
|
2929
2930
|
for (var u in l) {
|
|
2930
2931
|
var p = l[u].brand || l[u], y = l[u].version;
|
|
2931
|
-
this.itemType == V && !/not.a.brand/i.test(p) && (!a || /chrom/i.test(a) && p !=
|
|
2932
|
+
this.itemType == V && !/not.a.brand/i.test(p) && (!a || /chrom/i.test(a) && p != yo) && (p = ve(p, {
|
|
2932
2933
|
Chrome: "Google Chrome",
|
|
2933
2934
|
Edge: "Microsoft Edge",
|
|
2934
2935
|
"Chrome WebView": "Android WebView",
|
|
@@ -2937,122 +2938,122 @@ function Ts(e, t, s, i) {
|
|
|
2937
2938
|
"MIUI Browser": "Miui Browser",
|
|
2938
2939
|
"Opera Mobi": "OperaMobile",
|
|
2939
2940
|
Yandex: "YaBrowser"
|
|
2940
|
-
}), this.set(f, p).set(g, y).set(it, Rt(y)), a = p), this.itemType == Q && p ==
|
|
2941
|
+
}), this.set(f, p).set(g, y).set(it, Rt(y)), a = p), this.itemType == Q && p == yo && this.set(g, y);
|
|
2941
2942
|
}
|
|
2942
2943
|
break;
|
|
2943
|
-
case
|
|
2944
|
-
var k =
|
|
2945
|
-
k && (k &&
|
|
2944
|
+
case ue:
|
|
2945
|
+
var k = s[j];
|
|
2946
|
+
k && (k && s[Ot] == "64" && (k += "64"), zt.call(this.data, k + ";", n));
|
|
2946
2947
|
break;
|
|
2947
|
-
case
|
|
2948
|
-
if (
|
|
2948
|
+
case ie:
|
|
2949
|
+
if (s[E] && this.set(r, E), s[d] && (this.set(d, s[d]), !this.get(r) || !this.get(c))) {
|
|
2949
2950
|
var b = {};
|
|
2950
|
-
zt.call(b, "droid 9; " +
|
|
2951
|
+
zt.call(b, "droid 9; " + s[d] + ")", n), !this.get(r) && b.type && this.set(r, b.type), !this.get(c) && b.vendor && this.set(c, b.vendor);
|
|
2951
2952
|
}
|
|
2952
|
-
if (
|
|
2953
|
+
if (s[Ae]) {
|
|
2953
2954
|
var m;
|
|
2954
|
-
if (typeof
|
|
2955
|
-
for (var S = 0; !m && S <
|
|
2956
|
-
m = ve(
|
|
2955
|
+
if (typeof s[Ae] != "string")
|
|
2956
|
+
for (var S = 0; !m && S < s[Ae].length; )
|
|
2957
|
+
m = ve(s[Ae][S++], Eo);
|
|
2957
2958
|
else
|
|
2958
|
-
m = ve(
|
|
2959
|
+
m = ve(s[Ae], Eo);
|
|
2959
2960
|
this.set(r, m);
|
|
2960
2961
|
}
|
|
2961
2962
|
break;
|
|
2962
2963
|
case X:
|
|
2963
|
-
var C =
|
|
2964
|
+
var C = s[Pe];
|
|
2964
2965
|
if (C) {
|
|
2965
|
-
var U =
|
|
2966
|
+
var U = s[no];
|
|
2966
2967
|
C == Jt && (U = parseInt(Rt(U), 10) >= 13 ? "11" : "10"), this.set(f, C).set(g, U);
|
|
2967
2968
|
}
|
|
2968
|
-
this.get(f) == Jt &&
|
|
2969
|
+
this.get(f) == Jt && s[d] == "Xbox" && this.set(f, "Xbox").set(g, void 0);
|
|
2969
2970
|
break;
|
|
2970
2971
|
case De:
|
|
2971
|
-
var
|
|
2972
|
-
return
|
|
2972
|
+
var re = this.data, x = function(oe) {
|
|
2973
|
+
return re[oe].getItem().setCH(s).parseCH().get();
|
|
2973
2974
|
};
|
|
2974
|
-
this.set(V, x(V)).set(
|
|
2975
|
+
this.set(V, x(V)).set(ue, x(ue)).set(ie, x(ie)).set(Q, x(Q)).set(X, x(X));
|
|
2975
2976
|
}
|
|
2976
2977
|
return this;
|
|
2977
|
-
},
|
|
2978
|
+
}, fe.call(this, [
|
|
2978
2979
|
["itemType", e],
|
|
2979
2980
|
["ua", t],
|
|
2980
2981
|
["uaCH", i],
|
|
2981
|
-
["rgxMap",
|
|
2982
|
+
["rgxMap", o],
|
|
2982
2983
|
["data", Qi(this, e)]
|
|
2983
2984
|
]), this;
|
|
2984
2985
|
}
|
|
2985
|
-
function pe(e, t,
|
|
2986
|
-
if (typeof e === Ue ? (Et(e, !0) ? (typeof t === Ue && (
|
|
2986
|
+
function pe(e, t, o) {
|
|
2987
|
+
if (typeof e === Ue ? (Et(e, !0) ? (typeof t === Ue && (o = t), t = e) : (o = e, t = void 0), e = void 0) : typeof e === Zt && !Et(t, !0) && (o = t, t = void 0), o && typeof o.append === Ct) {
|
|
2987
2988
|
var i = {};
|
|
2988
|
-
|
|
2989
|
+
o.forEach(function(u, p) {
|
|
2989
2990
|
i[p] = u;
|
|
2990
|
-
}),
|
|
2991
|
+
}), o = i;
|
|
2991
2992
|
}
|
|
2992
2993
|
if (!(this instanceof pe))
|
|
2993
|
-
return new pe(e, t,
|
|
2994
|
-
var
|
|
2994
|
+
return new pe(e, t, o).getResult();
|
|
2995
|
+
var s = typeof e === Zt ? e : (
|
|
2995
2996
|
// Passed user-agent string
|
|
2996
|
-
|
|
2997
|
+
o && o[uo] ? o[uo] : (
|
|
2997
2998
|
// User-Agent from passed headers
|
|
2998
2999
|
K && K.userAgent ? K.userAgent : (
|
|
2999
3000
|
// navigator.userAgent
|
|
3000
3001
|
xe
|
|
3001
3002
|
)
|
|
3002
3003
|
)
|
|
3003
|
-
), n = new
|
|
3004
|
+
), n = new Xo(o, !0), l = t ? Ji(To, t) : To, a = function(u) {
|
|
3004
3005
|
return u == De ? function() {
|
|
3005
|
-
return new
|
|
3006
|
+
return new Ao(u, s, l, n).set("ua", s).set(V, this.getBrowser()).set(ue, this.getCPU()).set(ie, this.getDevice()).set(Q, this.getEngine()).set(X, this.getOS()).get();
|
|
3006
3007
|
} : function() {
|
|
3007
|
-
return new
|
|
3008
|
+
return new Ao(u, s, l[u], n).parseUA().get();
|
|
3008
3009
|
};
|
|
3009
3010
|
};
|
|
3010
|
-
return
|
|
3011
|
+
return fe.call(this, [
|
|
3011
3012
|
["getBrowser", a(V)],
|
|
3012
|
-
["getCPU", a(
|
|
3013
|
-
["getDevice", a(
|
|
3013
|
+
["getCPU", a(ue)],
|
|
3014
|
+
["getDevice", a(ie)],
|
|
3014
3015
|
["getEngine", a(Q)],
|
|
3015
3016
|
["getOS", a(X)],
|
|
3016
3017
|
["getResult", a(De)],
|
|
3017
3018
|
["getUA", function() {
|
|
3018
|
-
return
|
|
3019
|
+
return s;
|
|
3019
3020
|
}],
|
|
3020
3021
|
["setUA", function(u) {
|
|
3021
|
-
return ze(u) && (
|
|
3022
|
+
return ze(u) && (s = u.length > Yt ? nt(u, Yt) : u), this;
|
|
3022
3023
|
}]
|
|
3023
|
-
]).setUA(
|
|
3024
|
+
]).setUA(s), this;
|
|
3024
3025
|
}
|
|
3025
3026
|
pe.VERSION = qi;
|
|
3026
3027
|
pe.BROWSER = $t([f, g, it, r]);
|
|
3027
3028
|
pe.CPU = $t([j]);
|
|
3028
|
-
pe.DEVICE = $t([d, c, r, Ze, E,
|
|
3029
|
+
pe.DEVICE = $t([d, c, r, Ze, E, N, O, se, Je]);
|
|
3029
3030
|
pe.ENGINE = pe.OS = $t([f, g]);
|
|
3030
3031
|
const Ht = typeof navigator < "u" ? navigator.userAgent.toLowerCase().indexOf("firefox") > 0 : !1;
|
|
3031
|
-
function qt(e, t,
|
|
3032
|
-
e.addEventListener ? e.addEventListener(t,
|
|
3032
|
+
function qt(e, t, o, i) {
|
|
3033
|
+
e.addEventListener ? e.addEventListener(t, o, i) : e.attachEvent && e.attachEvent("on".concat(t), o);
|
|
3033
3034
|
}
|
|
3034
|
-
function Xe(e, t,
|
|
3035
|
-
e.removeEventListener ? e.removeEventListener(t,
|
|
3035
|
+
function Xe(e, t, o, i) {
|
|
3036
|
+
e.removeEventListener ? e.removeEventListener(t, o, i) : e.detachEvent && e.detachEvent("on".concat(t), o);
|
|
3036
3037
|
}
|
|
3037
|
-
function
|
|
3038
|
-
const
|
|
3039
|
-
for (let i = 0; i <
|
|
3040
|
-
return
|
|
3038
|
+
function Yo(e, t) {
|
|
3039
|
+
const o = t.slice(0, t.length - 1);
|
|
3040
|
+
for (let i = 0; i < o.length; i++) o[i] = e[o[i].toLowerCase()];
|
|
3041
|
+
return o;
|
|
3041
3042
|
}
|
|
3042
|
-
function
|
|
3043
|
+
function Zo(e) {
|
|
3043
3044
|
typeof e != "string" && (e = ""), e = e.replace(/\s/g, "");
|
|
3044
3045
|
const t = e.split(",");
|
|
3045
|
-
let
|
|
3046
|
-
for (;
|
|
3047
|
-
t[
|
|
3046
|
+
let o = t.lastIndexOf("");
|
|
3047
|
+
for (; o >= 0; )
|
|
3048
|
+
t[o - 1] += ",", t.splice(o, 1), o = t.lastIndexOf("");
|
|
3048
3049
|
return t;
|
|
3049
3050
|
}
|
|
3050
3051
|
function en(e, t) {
|
|
3051
|
-
const
|
|
3052
|
-
let
|
|
3053
|
-
for (let n = 0; n <
|
|
3054
|
-
i.indexOf(
|
|
3055
|
-
return
|
|
3052
|
+
const o = e.length >= t.length ? e : t, i = e.length >= t.length ? t : e;
|
|
3053
|
+
let s = !0;
|
|
3054
|
+
for (let n = 0; n < o.length; n++)
|
|
3055
|
+
i.indexOf(o[n]) === -1 && (s = !1);
|
|
3056
|
+
return s;
|
|
3056
3057
|
}
|
|
3057
3058
|
const at = {
|
|
3058
3059
|
backspace: 8,
|
|
@@ -3106,7 +3107,7 @@ const at = {
|
|
|
3106
3107
|
"[": 219,
|
|
3107
3108
|
"]": 221,
|
|
3108
3109
|
"\\": 220
|
|
3109
|
-
},
|
|
3110
|
+
}, te = {
|
|
3110
3111
|
// shiftKey
|
|
3111
3112
|
"⇧": 16,
|
|
3112
3113
|
shift: 16,
|
|
@@ -3139,32 +3140,32 @@ const at = {
|
|
|
3139
3140
|
}, B = {};
|
|
3140
3141
|
for (let e = 1; e < 20; e++)
|
|
3141
3142
|
at["f".concat(e)] = 111 + e;
|
|
3142
|
-
let _ = [], tt = null,
|
|
3143
|
-
const
|
|
3144
|
-
function
|
|
3145
|
-
|
|
3143
|
+
let _ = [], tt = null, Jo = "all";
|
|
3144
|
+
const de = /* @__PURE__ */ new Map(), dt = (e) => at[e.toLowerCase()] || te[e.toLowerCase()] || e.toUpperCase().charCodeAt(0), tn = (e) => Object.keys(at).find((t) => at[t] === e), on = (e) => Object.keys(te).find((t) => te[t] === e);
|
|
3145
|
+
function Qo(e) {
|
|
3146
|
+
Jo = e || "all";
|
|
3146
3147
|
}
|
|
3147
3148
|
function lt() {
|
|
3148
|
-
return
|
|
3149
|
+
return Jo || "all";
|
|
3149
3150
|
}
|
|
3150
|
-
function
|
|
3151
|
+
function sn() {
|
|
3151
3152
|
return _.slice(0);
|
|
3152
3153
|
}
|
|
3153
3154
|
function nn() {
|
|
3154
|
-
return _.map((e) => tn(e) ||
|
|
3155
|
+
return _.map((e) => tn(e) || on(e) || String.fromCharCode(e));
|
|
3155
3156
|
}
|
|
3156
3157
|
function an() {
|
|
3157
3158
|
const e = [];
|
|
3158
3159
|
return Object.keys(B).forEach((t) => {
|
|
3159
|
-
B[t].forEach((
|
|
3160
|
+
B[t].forEach((o) => {
|
|
3160
3161
|
let {
|
|
3161
3162
|
key: i,
|
|
3162
|
-
scope:
|
|
3163
|
+
scope: s,
|
|
3163
3164
|
mods: n,
|
|
3164
3165
|
shortcut: l
|
|
3165
|
-
} =
|
|
3166
|
+
} = o;
|
|
3166
3167
|
e.push({
|
|
3167
|
-
scope:
|
|
3168
|
+
scope: s,
|
|
3168
3169
|
shortcut: l,
|
|
3169
3170
|
mods: n,
|
|
3170
3171
|
keys: i.split("+").map((a) => dt(a))
|
|
@@ -3174,55 +3175,55 @@ function an() {
|
|
|
3174
3175
|
}
|
|
3175
3176
|
function ln(e) {
|
|
3176
3177
|
const t = e.target || e.srcElement, {
|
|
3177
|
-
tagName:
|
|
3178
|
+
tagName: o
|
|
3178
3179
|
} = t;
|
|
3179
3180
|
let i = !0;
|
|
3180
|
-
const
|
|
3181
|
-
return (t.isContentEditable || (
|
|
3181
|
+
const s = o === "INPUT" && !["checkbox", "radio", "range", "button", "file", "reset", "submit", "color"].includes(t.type);
|
|
3182
|
+
return (t.isContentEditable || (s || o === "TEXTAREA" || o === "SELECT") && !t.readOnly) && (i = !1), i;
|
|
3182
3183
|
}
|
|
3183
3184
|
function rn(e) {
|
|
3184
3185
|
return typeof e == "string" && (e = dt(e)), _.indexOf(e) !== -1;
|
|
3185
3186
|
}
|
|
3186
3187
|
function dn(e, t) {
|
|
3187
|
-
let
|
|
3188
|
+
let o, i;
|
|
3188
3189
|
e || (e = lt());
|
|
3189
|
-
for (const
|
|
3190
|
-
if (Object.prototype.hasOwnProperty.call(B,
|
|
3191
|
-
for (
|
|
3192
|
-
|
|
3190
|
+
for (const s in B)
|
|
3191
|
+
if (Object.prototype.hasOwnProperty.call(B, s))
|
|
3192
|
+
for (o = B[s], i = 0; i < o.length; )
|
|
3193
|
+
o[i].scope === e ? o.splice(i, 1).forEach((l) => {
|
|
3193
3194
|
let {
|
|
3194
3195
|
element: a
|
|
3195
3196
|
} = l;
|
|
3196
|
-
return
|
|
3197
|
+
return ao(a);
|
|
3197
3198
|
}) : i++;
|
|
3198
|
-
lt() === e &&
|
|
3199
|
+
lt() === e && Qo(t || "all");
|
|
3199
3200
|
}
|
|
3200
3201
|
function un(e) {
|
|
3201
3202
|
let t = e.keyCode || e.which || e.charCode;
|
|
3202
|
-
const
|
|
3203
|
-
if (
|
|
3203
|
+
const o = _.indexOf(t);
|
|
3204
|
+
if (o >= 0 && _.splice(o, 1), e.key && e.key.toLowerCase() === "meta" && _.splice(0, _.length), (t === 93 || t === 224) && (t = 91), t in z) {
|
|
3204
3205
|
z[t] = !1;
|
|
3205
|
-
for (const i in
|
|
3206
|
+
for (const i in te) te[i] === t && (ae[i] = !1);
|
|
3206
3207
|
}
|
|
3207
3208
|
}
|
|
3208
|
-
function
|
|
3209
|
+
function es(e) {
|
|
3209
3210
|
if (typeof e > "u")
|
|
3210
|
-
Object.keys(B).forEach((
|
|
3211
|
-
Array.isArray(B[
|
|
3212
|
-
}),
|
|
3211
|
+
Object.keys(B).forEach((s) => {
|
|
3212
|
+
Array.isArray(B[s]) && B[s].forEach((n) => pt(n)), delete B[s];
|
|
3213
|
+
}), ao(null);
|
|
3213
3214
|
else if (Array.isArray(e))
|
|
3214
|
-
e.forEach((
|
|
3215
|
-
|
|
3215
|
+
e.forEach((s) => {
|
|
3216
|
+
s.key && pt(s);
|
|
3216
3217
|
});
|
|
3217
3218
|
else if (typeof e == "object")
|
|
3218
3219
|
e.key && pt(e);
|
|
3219
3220
|
else if (typeof e == "string") {
|
|
3220
|
-
for (var t = arguments.length,
|
|
3221
|
-
|
|
3222
|
-
let [
|
|
3223
|
-
typeof
|
|
3221
|
+
for (var t = arguments.length, o = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++)
|
|
3222
|
+
o[i - 1] = arguments[i];
|
|
3223
|
+
let [s, n] = o;
|
|
3224
|
+
typeof s == "function" && (n = s, s = ""), pt({
|
|
3224
3225
|
key: e,
|
|
3225
|
-
scope:
|
|
3226
|
+
scope: s,
|
|
3226
3227
|
method: n,
|
|
3227
3228
|
splitKey: "+"
|
|
3228
3229
|
});
|
|
@@ -3231,55 +3232,55 @@ function Qs(e) {
|
|
|
3231
3232
|
const pt = (e) => {
|
|
3232
3233
|
let {
|
|
3233
3234
|
key: t,
|
|
3234
|
-
scope:
|
|
3235
|
+
scope: o,
|
|
3235
3236
|
method: i,
|
|
3236
|
-
splitKey:
|
|
3237
|
+
splitKey: s = "+"
|
|
3237
3238
|
} = e;
|
|
3238
|
-
|
|
3239
|
-
const a = l.split(
|
|
3239
|
+
Zo(t).forEach((l) => {
|
|
3240
|
+
const a = l.split(s), u = a.length, p = a[u - 1], y = p === "*" ? "*" : dt(p);
|
|
3240
3241
|
if (!B[y]) return;
|
|
3241
|
-
|
|
3242
|
-
const k = u > 1 ?
|
|
3242
|
+
o || (o = lt());
|
|
3243
|
+
const k = u > 1 ? Yo(te, a) : [], b = [];
|
|
3243
3244
|
B[y] = B[y].filter((m) => {
|
|
3244
|
-
const C = (i ? m.method === i : !0) && m.scope ===
|
|
3245
|
+
const C = (i ? m.method === i : !0) && m.scope === o && en(m.mods, k);
|
|
3245
3246
|
return C && b.push(m.element), !C;
|
|
3246
|
-
}), b.forEach((m) =>
|
|
3247
|
+
}), b.forEach((m) => ao(m));
|
|
3247
3248
|
});
|
|
3248
3249
|
};
|
|
3249
|
-
function
|
|
3250
|
+
function So(e, t, o, i) {
|
|
3250
3251
|
if (t.element !== i)
|
|
3251
3252
|
return;
|
|
3252
|
-
let
|
|
3253
|
-
if (t.scope ===
|
|
3254
|
-
|
|
3253
|
+
let s;
|
|
3254
|
+
if (t.scope === o || t.scope === "all") {
|
|
3255
|
+
s = t.mods.length > 0;
|
|
3255
3256
|
for (const n in z)
|
|
3256
|
-
Object.prototype.hasOwnProperty.call(z, n) && (!z[n] && t.mods.indexOf(+n) > -1 || z[n] && t.mods.indexOf(+n) === -1) && (
|
|
3257
|
-
(t.mods.length === 0 && !z[16] && !z[18] && !z[17] && !z[91] ||
|
|
3257
|
+
Object.prototype.hasOwnProperty.call(z, n) && (!z[n] && t.mods.indexOf(+n) > -1 || z[n] && t.mods.indexOf(+n) === -1) && (s = !1);
|
|
3258
|
+
(t.mods.length === 0 && !z[16] && !z[18] && !z[17] && !z[91] || s || t.shortcut === "*") && (t.keys = [], t.keys = t.keys.concat(_), t.method(e, t) === !1 && (e.preventDefault ? e.preventDefault() : e.returnValue = !1, e.stopPropagation && e.stopPropagation(), e.cancelBubble && (e.cancelBubble = !0)));
|
|
3258
3259
|
}
|
|
3259
3260
|
}
|
|
3260
|
-
function
|
|
3261
|
-
const
|
|
3261
|
+
function Oo(e, t) {
|
|
3262
|
+
const o = B["*"];
|
|
3262
3263
|
let i = e.keyCode || e.which || e.charCode;
|
|
3263
|
-
if (!
|
|
3264
|
+
if (!ae.filter.call(this, e)) return;
|
|
3264
3265
|
if ((i === 93 || i === 224) && (i = 91), _.indexOf(i) === -1 && i !== 229 && _.push(i), ["metaKey", "ctrlKey", "altKey", "shiftKey"].forEach((a) => {
|
|
3265
3266
|
const u = Qe[a];
|
|
3266
3267
|
e[a] && _.indexOf(u) === -1 ? _.push(u) : !e[a] && _.indexOf(u) > -1 ? _.splice(_.indexOf(u), 1) : a === "metaKey" && e[a] && (_ = _.filter((p) => p in Qe || p === i));
|
|
3267
3268
|
}), i in z) {
|
|
3268
3269
|
z[i] = !0;
|
|
3269
|
-
for (const a in
|
|
3270
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
3271
|
-
const u = Qe[
|
|
3272
|
-
|
|
3270
|
+
for (const a in te)
|
|
3271
|
+
if (Object.prototype.hasOwnProperty.call(te, a)) {
|
|
3272
|
+
const u = Qe[te[a]];
|
|
3273
|
+
ae[a] = e[u];
|
|
3273
3274
|
}
|
|
3274
|
-
if (!
|
|
3275
|
+
if (!o) return;
|
|
3275
3276
|
}
|
|
3276
3277
|
for (const a in z)
|
|
3277
3278
|
Object.prototype.hasOwnProperty.call(z, a) && (z[a] = e[Qe[a]]);
|
|
3278
3279
|
e.getModifierState && !(e.altKey && !e.ctrlKey) && e.getModifierState("AltGraph") && (_.indexOf(17) === -1 && _.push(17), _.indexOf(18) === -1 && _.push(18), z[17] = !0, z[18] = !0);
|
|
3279
|
-
const
|
|
3280
|
-
if (
|
|
3281
|
-
for (let a = 0; a <
|
|
3282
|
-
|
|
3280
|
+
const s = lt();
|
|
3281
|
+
if (o)
|
|
3282
|
+
for (let a = 0; a < o.length; a++)
|
|
3283
|
+
o[a].scope === s && (e.type === "keydown" && o[a].keydown || e.type === "keyup" && o[a].keyup) && So(e, o[a], s, t);
|
|
3283
3284
|
if (!(i in B)) return;
|
|
3284
3285
|
const n = B[i], l = n.length;
|
|
3285
3286
|
for (let a = 0; a < l; a++)
|
|
@@ -3289,35 +3290,35 @@ function Ss(e, t) {
|
|
|
3289
3290
|
} = u, y = u.key.split(p), k = [];
|
|
3290
3291
|
for (let b = 0; b < y.length; b++)
|
|
3291
3292
|
k.push(dt(y[b]));
|
|
3292
|
-
k.sort().join("") === _.sort().join("") &&
|
|
3293
|
+
k.sort().join("") === _.sort().join("") && So(e, u, s, t);
|
|
3293
3294
|
}
|
|
3294
3295
|
}
|
|
3295
|
-
function
|
|
3296
|
+
function ae(e, t, o) {
|
|
3296
3297
|
_ = [];
|
|
3297
|
-
const i =
|
|
3298
|
-
let
|
|
3299
|
-
for (
|
|
3300
|
-
e = i[a].split(y),
|
|
3298
|
+
const i = Zo(e);
|
|
3299
|
+
let s = [], n = "all", l = document, a = 0, u = !1, p = !0, y = "+", k = !1, b = !1;
|
|
3300
|
+
for (o === void 0 && typeof t == "function" && (o = t), Object.prototype.toString.call(t) === "[object Object]" && (t.scope && (n = t.scope), t.element && (l = t.element), t.keyup && (u = t.keyup), t.keydown !== void 0 && (p = t.keydown), t.capture !== void 0 && (k = t.capture), typeof t.splitKey == "string" && (y = t.splitKey), t.single === !0 && (b = !0)), typeof t == "string" && (n = t), b && es(e, n); a < i.length; a++)
|
|
3301
|
+
e = i[a].split(y), s = [], e.length > 1 && (s = Yo(te, e)), e = e[e.length - 1], e = e === "*" ? "*" : dt(e), e in B || (B[e] = []), B[e].push({
|
|
3301
3302
|
keyup: u,
|
|
3302
3303
|
keydown: p,
|
|
3303
3304
|
scope: n,
|
|
3304
|
-
mods:
|
|
3305
|
+
mods: s,
|
|
3305
3306
|
shortcut: i[a],
|
|
3306
|
-
method:
|
|
3307
|
+
method: o,
|
|
3307
3308
|
key: i[a],
|
|
3308
3309
|
splitKey: y,
|
|
3309
3310
|
element: l
|
|
3310
3311
|
});
|
|
3311
3312
|
if (typeof l < "u" && window) {
|
|
3312
|
-
if (!
|
|
3313
|
+
if (!de.has(l)) {
|
|
3313
3314
|
const m = function() {
|
|
3314
3315
|
let C = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.event;
|
|
3315
|
-
return
|
|
3316
|
+
return Oo(C, l);
|
|
3316
3317
|
}, S = function() {
|
|
3317
3318
|
let C = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.event;
|
|
3318
|
-
|
|
3319
|
+
Oo(C, l), un(C);
|
|
3319
3320
|
};
|
|
3320
|
-
|
|
3321
|
+
de.set(l, {
|
|
3321
3322
|
keydownListener: m,
|
|
3322
3323
|
keyupListenr: S,
|
|
3323
3324
|
capture: k
|
|
@@ -3336,62 +3337,62 @@ function le(e, t, s) {
|
|
|
3336
3337
|
}
|
|
3337
3338
|
function cn(e) {
|
|
3338
3339
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "all";
|
|
3339
|
-
Object.keys(B).forEach((
|
|
3340
|
-
B[
|
|
3341
|
-
|
|
3340
|
+
Object.keys(B).forEach((o) => {
|
|
3341
|
+
B[o].filter((s) => s.scope === t && s.shortcut === e).forEach((s) => {
|
|
3342
|
+
s && s.method && s.method();
|
|
3342
3343
|
});
|
|
3343
3344
|
});
|
|
3344
3345
|
}
|
|
3345
|
-
function
|
|
3346
|
+
function ao(e) {
|
|
3346
3347
|
const t = Object.values(B).flat();
|
|
3347
3348
|
if (t.findIndex((i) => {
|
|
3348
3349
|
let {
|
|
3349
|
-
element:
|
|
3350
|
+
element: s
|
|
3350
3351
|
} = i;
|
|
3351
|
-
return
|
|
3352
|
+
return s === e;
|
|
3352
3353
|
}) < 0) {
|
|
3353
3354
|
const {
|
|
3354
3355
|
keydownListener: i,
|
|
3355
|
-
keyupListenr:
|
|
3356
|
+
keyupListenr: s,
|
|
3356
3357
|
capture: n
|
|
3357
|
-
} =
|
|
3358
|
-
i &&
|
|
3358
|
+
} = de.get(e) || {};
|
|
3359
|
+
i && s && (Xe(e, "keyup", s, n), Xe(e, "keydown", i, n), de.delete(e));
|
|
3359
3360
|
}
|
|
3360
|
-
if ((t.length <= 0 ||
|
|
3361
|
+
if ((t.length <= 0 || de.size <= 0) && (Object.keys(de).forEach((s) => {
|
|
3361
3362
|
const {
|
|
3362
3363
|
keydownListener: n,
|
|
3363
3364
|
keyupListenr: l,
|
|
3364
3365
|
capture: a
|
|
3365
|
-
} =
|
|
3366
|
-
n && l && (Xe(
|
|
3367
|
-
}),
|
|
3366
|
+
} = de.get(s) || {};
|
|
3367
|
+
n && l && (Xe(s, "keyup", l, a), Xe(s, "keydown", n, a), de.delete(s));
|
|
3368
|
+
}), de.clear(), Object.keys(B).forEach((s) => delete B[s]), tt)) {
|
|
3368
3369
|
const {
|
|
3369
|
-
listener:
|
|
3370
|
+
listener: s,
|
|
3370
3371
|
capture: n
|
|
3371
3372
|
} = tt;
|
|
3372
|
-
Xe(window, "focus",
|
|
3373
|
+
Xe(window, "focus", s, n), tt = null;
|
|
3373
3374
|
}
|
|
3374
3375
|
}
|
|
3375
3376
|
const Ft = {
|
|
3376
3377
|
getPressedKeyString: nn,
|
|
3377
|
-
setScope:
|
|
3378
|
+
setScope: Qo,
|
|
3378
3379
|
getScope: lt,
|
|
3379
3380
|
deleteScope: dn,
|
|
3380
|
-
getPressedKeyCodes:
|
|
3381
|
+
getPressedKeyCodes: sn,
|
|
3381
3382
|
getAllKeyCodes: an,
|
|
3382
3383
|
isPressed: rn,
|
|
3383
3384
|
filter: ln,
|
|
3384
3385
|
trigger: cn,
|
|
3385
|
-
unbind:
|
|
3386
|
+
unbind: es,
|
|
3386
3387
|
keyMap: at,
|
|
3387
|
-
modifier:
|
|
3388
|
+
modifier: te,
|
|
3388
3389
|
modifierMap: Qe
|
|
3389
3390
|
};
|
|
3390
3391
|
for (const e in Ft)
|
|
3391
|
-
Object.prototype.hasOwnProperty.call(Ft, e) && (
|
|
3392
|
+
Object.prototype.hasOwnProperty.call(Ft, e) && (ae[e] = Ft[e]);
|
|
3392
3393
|
if (typeof window < "u") {
|
|
3393
3394
|
const e = window.hotkeys;
|
|
3394
|
-
|
|
3395
|
+
ae.noConflict = (t) => (t && window.hotkeys === ae && (window.hotkeys = e), ae), window.hotkeys = ae;
|
|
3395
3396
|
}
|
|
3396
3397
|
const fn = {
|
|
3397
3398
|
class: "dsg-dropdown--trigger",
|
|
@@ -3432,57 +3433,57 @@ const fn = {
|
|
|
3432
3433
|
distance: { default: 0 }
|
|
3433
3434
|
},
|
|
3434
3435
|
setup(e, { expose: t }) {
|
|
3435
|
-
const
|
|
3436
|
+
const o = Y(e.isOpen), i = new pe().getOS().name;
|
|
3436
3437
|
e.menuItems.forEach((m) => {
|
|
3437
3438
|
});
|
|
3438
|
-
const
|
|
3439
|
+
const s = we("floatingVueDropdownEl"), n = we("dsgDropdownAvatarTriggerEl"), l = we("dsgDropdownButtonTriggerEl"), a = (m) => {
|
|
3439
3440
|
p(), n.value && setTimeout(() => {
|
|
3440
|
-
n?.value?.toggleFocus(
|
|
3441
|
+
n?.value?.toggleFocus(o.value);
|
|
3441
3442
|
}, 100);
|
|
3442
3443
|
}, u = (m) => {
|
|
3443
3444
|
p(), l.value && setTimeout(() => {
|
|
3444
|
-
l?.value?.focusButton(
|
|
3445
|
+
l?.value?.focusButton(o.value);
|
|
3445
3446
|
}, 100);
|
|
3446
3447
|
}, p = () => {
|
|
3447
|
-
|
|
3448
|
+
o.value = !o.value, o.value ? s.value?.show() : s.value?.hide();
|
|
3448
3449
|
}, y = (m, S) => {
|
|
3449
|
-
S.uri || m.preventDefault(), S.action && (S.action(),
|
|
3450
|
+
S.uri || m.preventDefault(), S.action && (S.action(), s.value?.hide());
|
|
3450
3451
|
}, k = we("dsgDropdown"), b = (m) => (m = m.toLowerCase(), m.replace("ctrl", "⌃").replace("shift", "⇧").replace("alt", "⌥").replace("cmd", i === "macOS" ? "⌘" : "⊞").replace("++", "+").replace("+", "").toUpperCase());
|
|
3451
|
-
return
|
|
3452
|
+
return to(() => {
|
|
3452
3453
|
e.menuItems.forEach((m) => {
|
|
3453
|
-
m.hotkey &&
|
|
3454
|
-
m.hotkeyPreventDefault && m.hotkeyPreventDefault === !0 && S.preventDefault(), m.uri && window.open(m.uri, m.uriTarget ?? "_blank"), typeof m.action == "function" && (m.action(),
|
|
3454
|
+
m.hotkey && ae(m.hotkey, (S) => {
|
|
3455
|
+
m.hotkeyPreventDefault && m.hotkeyPreventDefault === !0 && S.preventDefault(), m.uri && window.open(m.uri, m.uriTarget ?? "_blank"), typeof m.action == "function" && (m.action(), s.value?.hide());
|
|
3455
3456
|
});
|
|
3456
3457
|
});
|
|
3457
|
-
}),
|
|
3458
|
-
|
|
3458
|
+
}), cs(() => {
|
|
3459
|
+
ae.deleteScope("dsgDropdown");
|
|
3459
3460
|
}), t({
|
|
3460
3461
|
handleTriggerClick: p
|
|
3461
3462
|
}), (m, S) => (h(), v("div", {
|
|
3462
3463
|
class: D(["dsg-dropdown", m.classes]),
|
|
3463
3464
|
ref: "dsgDropdown"
|
|
3464
3465
|
}, [
|
|
3465
|
-
|
|
3466
|
+
I(ge(os), {
|
|
3466
3467
|
triggers: [],
|
|
3467
3468
|
placement: m.placement,
|
|
3468
3469
|
"handle-resize": !1,
|
|
3469
3470
|
strategy: "absolute",
|
|
3470
|
-
shown:
|
|
3471
|
+
shown: o.value,
|
|
3471
3472
|
flip: !1,
|
|
3472
3473
|
shift: !1,
|
|
3473
|
-
boundary:
|
|
3474
|
-
container:
|
|
3474
|
+
boundary: k.value,
|
|
3475
|
+
container: k.value,
|
|
3475
3476
|
skidding: m.skidding,
|
|
3476
3477
|
distance: m.distance,
|
|
3477
3478
|
class: "dsg-dropdown--popper",
|
|
3478
|
-
onHide: S[0] || (S[0] = (C) =>
|
|
3479
|
+
onHide: S[0] || (S[0] = (C) => o.value = !1),
|
|
3479
3480
|
ref: "floatingVueDropdownEl"
|
|
3480
3481
|
}, {
|
|
3481
3482
|
popper: Vt(() => [
|
|
3482
3483
|
T("div", gn, [
|
|
3483
3484
|
M(m.$slots, "dsg-dropdown-menu--header", {}, () => [
|
|
3484
3485
|
m.headerType === "avatar" ? (h(), v("div", pn, [
|
|
3485
|
-
m.avatarInfo ? (h(), $(
|
|
3486
|
+
m.avatarInfo ? (h(), $(ot, {
|
|
3486
3487
|
key: 0,
|
|
3487
3488
|
size: "md",
|
|
3488
3489
|
profileUri: m.avatarInfo.profileUri,
|
|
@@ -3492,9 +3493,9 @@ const fn = {
|
|
|
3492
3493
|
"sub-text": m.avatarInfo.subText
|
|
3493
3494
|
}, null, 8, ["profileUri", "fullName", "isOnline", "title", "sub-text"])) : w("", !0)
|
|
3494
3495
|
])) : m.headerType === "title" ? (h(), v("div", hn, [
|
|
3495
|
-
T("h3", mn,
|
|
3496
|
+
T("h3", mn, P(m.headerTitle), 1)
|
|
3496
3497
|
])) : m.headerType === "subsection" ? (h(), v("div", bn, [
|
|
3497
|
-
T("h4", vn,
|
|
3498
|
+
T("h4", vn, P(m.headerTitle), 1)
|
|
3498
3499
|
])) : w("", !0)
|
|
3499
3500
|
]),
|
|
3500
3501
|
M(m.$slots, "dsg-dropdown-menu-content", {}, () => [
|
|
@@ -3505,18 +3506,18 @@ const fn = {
|
|
|
3505
3506
|
tabindex: !C.uri && C.type !== "divider" ? 0 : void 0,
|
|
3506
3507
|
title: C.label,
|
|
3507
3508
|
key: U,
|
|
3508
|
-
onClick: (
|
|
3509
|
+
onClick: (re) => y(re, C)
|
|
3509
3510
|
}, [
|
|
3510
3511
|
C.type === "item" || C.type === void 0 ? (h(), v("div", yn, [
|
|
3511
3512
|
C.icon ? (h(), v("div", kn, [
|
|
3512
|
-
|
|
3513
|
+
I(G, {
|
|
3513
3514
|
icon: C.icon,
|
|
3514
3515
|
size: "xs"
|
|
3515
3516
|
}, null, 8, ["icon"])
|
|
3516
3517
|
])) : w("", !0),
|
|
3517
|
-
T("span", Cn,
|
|
3518
|
+
T("span", Cn, P(C.label), 1),
|
|
3518
3519
|
T("div", En, [
|
|
3519
|
-
C.hotkey ? (h(), v("span", Tn,
|
|
3520
|
+
C.hotkey ? (h(), v("span", Tn, P(b(C.hotkey)), 1)) : w("", !0)
|
|
3520
3521
|
])
|
|
3521
3522
|
])) : C.type === "divider" ? (h(), v("div", An, S[1] || (S[1] = [
|
|
3522
3523
|
T("hr", null, null, -1)
|
|
@@ -3529,7 +3530,7 @@ const fn = {
|
|
|
3529
3530
|
T("div", fn, [
|
|
3530
3531
|
M(m.$slots, "dsg-dropdown--trigger", {}, () => [
|
|
3531
3532
|
m.type === "avatar" ? (h(), v(Z, { key: 0 }, [
|
|
3532
|
-
m.avatarInfo ? (h(), $(
|
|
3533
|
+
m.avatarInfo ? (h(), $(ot, {
|
|
3533
3534
|
key: 0,
|
|
3534
3535
|
size: "lg",
|
|
3535
3536
|
profileUri: m.avatarInfo.profileUri,
|
|
@@ -3545,13 +3546,13 @@ const fn = {
|
|
|
3545
3546
|
onClick: u,
|
|
3546
3547
|
ref: "dsgDropdownButtonTriggerEl",
|
|
3547
3548
|
"icon-after": "chevron-down",
|
|
3548
|
-
class: D({ "dropdown-active":
|
|
3549
|
+
class: D({ "dropdown-active": o.value })
|
|
3549
3550
|
}, null, 8, ["theme", "label", "class"])) : m.type === "icon" ? (h(), $(_e, {
|
|
3550
3551
|
key: 2,
|
|
3551
3552
|
"icon-before": m.icon,
|
|
3552
3553
|
size: "sm",
|
|
3553
3554
|
theme: m.buttonTheme,
|
|
3554
|
-
class: D(["dsg-dropdown--trigger-button", { "dropdown-active":
|
|
3555
|
+
class: D(["dsg-dropdown--trigger-button", { "dropdown-active": o.value }]),
|
|
3555
3556
|
onClick: p
|
|
3556
3557
|
}, null, 8, ["icon-before", "theme", "class"])) : w("", !0)
|
|
3557
3558
|
])
|
|
@@ -3561,9 +3562,9 @@ const fn = {
|
|
|
3561
3562
|
}, 8, ["placement", "shown", "boundary", "container", "skidding", "distance"])
|
|
3562
3563
|
], 2));
|
|
3563
3564
|
}
|
|
3564
|
-
}), On = ["name"], $n = ["selected"],
|
|
3565
|
+
}), On = ["name"], $n = ["selected"], Ln = ["value", "selected"], In = /* @__PURE__ */ H({
|
|
3565
3566
|
__name: "DsgInputDropdown",
|
|
3566
|
-
props: /* @__PURE__ */
|
|
3567
|
+
props: /* @__PURE__ */ Bo({
|
|
3567
3568
|
name: { default: "" },
|
|
3568
3569
|
placeholder: { default: "" },
|
|
3569
3570
|
classes: { default: "" },
|
|
@@ -3574,25 +3575,25 @@ const fn = {
|
|
|
3574
3575
|
}),
|
|
3575
3576
|
emits: ["update:modelValue"],
|
|
3576
3577
|
setup(e) {
|
|
3577
|
-
const t =
|
|
3578
|
-
return (
|
|
3579
|
-
class: D(["dsg-input-dropdown",
|
|
3580
|
-
name:
|
|
3581
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
3578
|
+
const t = Do(e, "modelValue");
|
|
3579
|
+
return (o, i) => Po((h(), v("select", {
|
|
3580
|
+
class: D(["dsg-input-dropdown", o.classes]),
|
|
3581
|
+
name: o.name,
|
|
3582
|
+
"onUpdate:modelValue": i[0] || (i[0] = (s) => t.value = s)
|
|
3582
3583
|
}, [
|
|
3583
|
-
|
|
3584
|
+
o.placeholder ? (h(), v("option", {
|
|
3584
3585
|
key: 0,
|
|
3585
3586
|
value: "",
|
|
3586
3587
|
disabled: "",
|
|
3587
3588
|
selected: t.value === ""
|
|
3588
|
-
},
|
|
3589
|
-
(h(!0), v(Z, null, ke(
|
|
3589
|
+
}, P(o.placeholder), 9, $n)) : w("", !0),
|
|
3590
|
+
(h(!0), v(Z, null, ke(o.options, (s, n) => (h(), v("option", {
|
|
3590
3591
|
key: n,
|
|
3591
|
-
value:
|
|
3592
|
-
selected: t.value ===
|
|
3593
|
-
},
|
|
3592
|
+
value: s.value,
|
|
3593
|
+
selected: t.value === s.value
|
|
3594
|
+
}, P(s.label), 9, Ln))), 128))
|
|
3594
3595
|
], 10, On)), [
|
|
3595
|
-
[
|
|
3596
|
+
[fs, t.value]
|
|
3596
3597
|
]);
|
|
3597
3598
|
}
|
|
3598
3599
|
}), _n = ["href", "title", "target"], Bn = {
|
|
@@ -3610,29 +3611,29 @@ const fn = {
|
|
|
3610
3611
|
},
|
|
3611
3612
|
emits: ["link-clicked"],
|
|
3612
3613
|
setup(e, { emit: t }) {
|
|
3613
|
-
const
|
|
3614
|
+
const o = [
|
|
3614
3615
|
"dsg-link",
|
|
3615
3616
|
"dsg-link--" + e.size,
|
|
3616
3617
|
e.classes
|
|
3617
|
-
].join(" "), i = t,
|
|
3618
|
+
].join(" "), i = t, s = (n) => {
|
|
3618
3619
|
e.preventDefault && n.preventDefault(), i("link-clicked", n);
|
|
3619
3620
|
};
|
|
3620
3621
|
return (n, l) => (h(), v("a", {
|
|
3621
3622
|
href: n.href,
|
|
3622
3623
|
title: "Link: " + n.label,
|
|
3623
3624
|
target: n.uriTarget,
|
|
3624
|
-
class: D(
|
|
3625
|
-
onClick:
|
|
3625
|
+
class: D(ge(o)),
|
|
3626
|
+
onClick: s
|
|
3626
3627
|
}, [
|
|
3627
3628
|
M(n.$slots, "dsg-link-content", {}, () => [
|
|
3628
|
-
n.label ? (h(), v("span", Bn,
|
|
3629
|
+
n.label ? (h(), v("span", Bn, P(n.label), 1)) : w("", !0)
|
|
3629
3630
|
])
|
|
3630
3631
|
], 10, _n));
|
|
3631
3632
|
}
|
|
3632
|
-
}),
|
|
3633
|
+
}), Pn = {
|
|
3633
3634
|
key: 1,
|
|
3634
3635
|
class: "dsg-modal__header-text"
|
|
3635
|
-
},
|
|
3636
|
+
}, Nn = {
|
|
3636
3637
|
key: 0,
|
|
3637
3638
|
class: "dsg-modal__header-title"
|
|
3638
3639
|
}, Mn = {
|
|
@@ -3655,23 +3656,23 @@ const fn = {
|
|
|
3655
3656
|
secondaryButton: { type: [Object, Boolean], default: !1 }
|
|
3656
3657
|
},
|
|
3657
3658
|
emits: ["before-open", "after-open", "before-close", "after-close", "secondary-button-clicked", "primary-button-clicked"],
|
|
3658
|
-
setup(e, { expose: t, emit:
|
|
3659
|
-
const i =
|
|
3660
|
-
i("before-open"),
|
|
3659
|
+
setup(e, { expose: t, emit: o }) {
|
|
3660
|
+
const i = o, s = Y(!1), n = () => {
|
|
3661
|
+
i("before-open"), s.value = !0, i("after-open");
|
|
3661
3662
|
}, l = () => {
|
|
3662
|
-
i("before-close"),
|
|
3663
|
+
i("before-close"), s.value = !1, i("after-close");
|
|
3663
3664
|
}, a = () => {
|
|
3664
3665
|
i("secondary-button-clicked");
|
|
3665
3666
|
}, u = () => {
|
|
3666
3667
|
i("primary-button-clicked");
|
|
3667
3668
|
};
|
|
3668
3669
|
return t({ open: n, close: l, secondaryButtonClicked: a, primaryButtonClicked: u }), (p, y) => (h(), v("div", {
|
|
3669
|
-
class: D(["dsg-modal", `dsg-modal--${
|
|
3670
|
+
class: D(["dsg-modal", `dsg-modal--${s.value ? "open" : "closed"}`])
|
|
3670
3671
|
}, [
|
|
3671
3672
|
y[0] || (y[0] = T("div", { class: "dsg-modal__background" }, null, -1)),
|
|
3672
3673
|
T("div", {
|
|
3673
3674
|
class: "dsg-modal__wrapper",
|
|
3674
|
-
style:
|
|
3675
|
+
style: No({ width: p.width })
|
|
3675
3676
|
}, [
|
|
3676
3677
|
p.hasClosedButton ? (h(), $(_e, {
|
|
3677
3678
|
key: 0,
|
|
@@ -3685,10 +3686,10 @@ const fn = {
|
|
|
3685
3686
|
T("div", {
|
|
3686
3687
|
class: D(["dsg-modal__header", [`dsg-modal__header--${p.type}`, `${p.$slots.default ? "dsg-modal__header--with-body" : ""}`].join(" ")])
|
|
3687
3688
|
}, [
|
|
3688
|
-
p.miscIcon ? (h(), $(
|
|
3689
|
-
p.title || p.description ? (h(), v("div",
|
|
3690
|
-
p.title ? (h(), v("h3",
|
|
3691
|
-
p.description ? (h(), v("p", Mn,
|
|
3689
|
+
p.miscIcon ? (h(), $(Ie, Lo(J({ key: 0 }, p.miscIcon)), null, 16)) : w("", !0),
|
|
3690
|
+
p.title || p.description ? (h(), v("div", Pn, [
|
|
3691
|
+
p.title ? (h(), v("h3", Nn, P(p.title), 1)) : w("", !0),
|
|
3692
|
+
p.description ? (h(), v("p", Mn, P(p.description), 1)) : w("", !0)
|
|
3692
3693
|
])) : w("", !0)
|
|
3693
3694
|
], 2)
|
|
3694
3695
|
]),
|
|
@@ -3730,7 +3731,7 @@ const fn = {
|
|
|
3730
3731
|
classes: { default: "" }
|
|
3731
3732
|
},
|
|
3732
3733
|
emits: ["before-checked", "after-checked", "before-hide", "after-hide", "before-destroy", "after-destroy"],
|
|
3733
|
-
setup(e, { expose: t, emit:
|
|
3734
|
+
setup(e, { expose: t, emit: o }) {
|
|
3734
3735
|
const i = [
|
|
3735
3736
|
"dsg-tag",
|
|
3736
3737
|
`dsg-tag--${e.size}`,
|
|
@@ -3739,9 +3740,9 @@ const fn = {
|
|
|
3739
3740
|
`dsg-tag--${e.avatarUri ? "has-avatar" : "no-avatar"}`,
|
|
3740
3741
|
`dsg-tag--${e.hasCheckbox ? "has-checkbox" : "no-checkbox"}`,
|
|
3741
3742
|
e.classes
|
|
3742
|
-
].join(" "),
|
|
3743
|
-
e.hasClose && e.tagCount !== null && new
|
|
3744
|
-
const n =
|
|
3743
|
+
].join(" "), s = () => `tag-${e.size}`;
|
|
3744
|
+
e.hasClose && e.tagCount !== null && new ne("DsgTag: 'hasClose' and 'tagCount' props are mutually exclusive. Please use only one of them."), e.avatarUri && e.dotHex && new ne("DsgTag: 'avatarUri' and 'dotHex' props are mutually exclusive. Please use only one of them.");
|
|
3745
|
+
const n = o, l = we("dsgTag"), a = (C) => {
|
|
3745
3746
|
e.destroyOnClose ? (n("before-destroy", l.value), l.value?.remove(), n("after-destroy")) : (n("before-hide", l.value), l.value && (l.value.style.display = "none"), n("after-hide", l.value));
|
|
3746
3747
|
}, u = (C, U) => {
|
|
3747
3748
|
n("before-checked", C, U);
|
|
@@ -3757,19 +3758,19 @@ const fn = {
|
|
|
3757
3758
|
},
|
|
3758
3759
|
getValue: () => b.value
|
|
3759
3760
|
}), (C, U) => (h(), v("div", {
|
|
3760
|
-
class: D(
|
|
3761
|
+
class: D(ge(i)),
|
|
3761
3762
|
ref: "dsgTag"
|
|
3762
3763
|
}, [
|
|
3763
3764
|
T("div", Rn, [
|
|
3764
3765
|
C.hasCheckbox ? (h(), $(yt, {
|
|
3765
3766
|
key: 0,
|
|
3766
3767
|
class: "dsg-tag--checkbox",
|
|
3767
|
-
size:
|
|
3768
|
+
size: s(),
|
|
3768
3769
|
"no-focus": !0,
|
|
3769
3770
|
onBeforeChecked: u,
|
|
3770
3771
|
onAfterChecked: p
|
|
3771
3772
|
}, null, 8, ["size"])) : w("", !0),
|
|
3772
|
-
C.avatarUri ? (h(), $(
|
|
3773
|
+
C.avatarUri ? (h(), $(ot, {
|
|
3773
3774
|
key: 1,
|
|
3774
3775
|
"profile-uri": C.avatarUri,
|
|
3775
3776
|
size: "xxs",
|
|
@@ -3779,14 +3780,14 @@ const fn = {
|
|
|
3779
3780
|
C.dotHex ? (h(), v("span", {
|
|
3780
3781
|
key: 2,
|
|
3781
3782
|
class: "dsg-tag--dot",
|
|
3782
|
-
style:
|
|
3783
|
+
style: No({ backgroundColor: C.dotHex })
|
|
3783
3784
|
}, null, 4)) : w("", !0)
|
|
3784
3785
|
]),
|
|
3785
3786
|
M(C.$slots, "dsg-tag--label", {}, () => [
|
|
3786
|
-
T("span", zn,
|
|
3787
|
+
T("span", zn, P(C.label), 1)
|
|
3787
3788
|
]),
|
|
3788
3789
|
T("div", Hn, [
|
|
3789
|
-
y.value && y.value > 0 ? (h(), v("div", qn,
|
|
3790
|
+
y.value && y.value > 0 ? (h(), v("div", qn, P(y.value), 1)) : w("", !0),
|
|
3790
3791
|
C.hasClose ? (h(), $(G, {
|
|
3791
3792
|
key: 1,
|
|
3792
3793
|
icon: "x-close",
|
|
@@ -3810,7 +3811,7 @@ const fn = {
|
|
|
3810
3811
|
classes: { default: "" }
|
|
3811
3812
|
},
|
|
3812
3813
|
emits: ["before-toggle", "after-toggle", "update:modelValue"],
|
|
3813
|
-
setup(e, { expose: t, emit:
|
|
3814
|
+
setup(e, { expose: t, emit: o }) {
|
|
3814
3815
|
const i = [
|
|
3815
3816
|
"dsg-toggle",
|
|
3816
3817
|
`dsg-toggle--${e.size}`,
|
|
@@ -3818,24 +3819,24 @@ const fn = {
|
|
|
3818
3819
|
`dsg-toggle--${e.label.length ? "has-label" : "no-label"}`,
|
|
3819
3820
|
`dsg-toggle--${e.subText.length ? "has-subtext" : "no-subtext"}`,
|
|
3820
3821
|
e.classes
|
|
3821
|
-
].join(" "),
|
|
3822
|
-
e.disabled || (u("before-toggle",
|
|
3822
|
+
].join(" "), s = Y(e.modelValue), n = () => {
|
|
3823
|
+
e.disabled || (u("before-toggle", s.value, !s.value), s.value = !s.value, u("after-toggle", s.value), u("update:modelValue", s.value));
|
|
3823
3824
|
}, l = we("toggleCheckbox"), a = () => {
|
|
3824
3825
|
l.value && l.value.focus(), e.disabled || n();
|
|
3825
|
-
}, u =
|
|
3826
|
+
}, u = o;
|
|
3826
3827
|
return t({
|
|
3827
3828
|
set: (y) => {
|
|
3828
|
-
|
|
3829
|
+
s.value = y;
|
|
3829
3830
|
}
|
|
3830
3831
|
}), (y, k) => (h(), v("div", {
|
|
3831
|
-
class: D(
|
|
3832
|
+
class: D(ge(i)),
|
|
3832
3833
|
onClick: a
|
|
3833
3834
|
}, [
|
|
3834
3835
|
T("label", Vn, [
|
|
3835
3836
|
T("input", {
|
|
3836
3837
|
type: "checkbox",
|
|
3837
3838
|
class: "dsg-toggle--checkbox",
|
|
3838
|
-
checked:
|
|
3839
|
+
checked: s.value,
|
|
3839
3840
|
onChange: n,
|
|
3840
3841
|
title: "checkbox",
|
|
3841
3842
|
ref: "toggleCheckbox",
|
|
@@ -3871,20 +3872,20 @@ const fn = {
|
|
|
3871
3872
|
theme: { default: "text" }
|
|
3872
3873
|
},
|
|
3873
3874
|
setup(e) {
|
|
3874
|
-
return (t,
|
|
3875
|
+
return (t, o) => (h(), v("div", {
|
|
3875
3876
|
class: D(["dsg-breadcrumbs", "dsg-breadcrumbs"])
|
|
3876
3877
|
}, [
|
|
3877
|
-
(h(!0), v(Z, null, ke(t.breadcrumbs, (i,
|
|
3878
|
-
key: `breadcrumb-item-${
|
|
3878
|
+
(h(!0), v(Z, null, ke(t.breadcrumbs, (i, s) => (h(), v(Z, {
|
|
3879
|
+
key: `breadcrumb-item-${s}`
|
|
3879
3880
|
}, [
|
|
3880
|
-
(h(), $(
|
|
3881
|
+
(h(), $(gs(i.url ?? !1 ? "a" : "span"), {
|
|
3881
3882
|
href: i.url ?? null,
|
|
3882
3883
|
disabled: i.disabled,
|
|
3883
3884
|
class: D(
|
|
3884
3885
|
[
|
|
3885
3886
|
"dsg-breadcrumbs__button-base",
|
|
3886
3887
|
`dsg-breadcrumbs__button-base--${t.theme}`,
|
|
3887
|
-
`${i.active ??
|
|
3888
|
+
`${i.active ?? s === t.breadcrumbs.length - 1 ? "dsg-breadcrumbs__button-base--active" : ""}`
|
|
3888
3889
|
].join(" ")
|
|
3889
3890
|
)
|
|
3890
3891
|
}, {
|
|
@@ -3894,21 +3895,21 @@ const fn = {
|
|
|
3894
3895
|
icon: i.icon,
|
|
3895
3896
|
size: "sm",
|
|
3896
3897
|
classes: "dsg-breadcrumbs__icon"
|
|
3897
|
-
}, null, 8, ["icon"])) : (h(), v("span", Yn,
|
|
3898
|
+
}, null, 8, ["icon"])) : (h(), v("span", Yn, P(i.label), 1))
|
|
3898
3899
|
]),
|
|
3899
3900
|
_: 2
|
|
3900
3901
|
}, 1032, ["href", "disabled", "class"])),
|
|
3901
|
-
|
|
3902
|
+
s < t.breadcrumbs.length - 1 ? (h(), $(G, J({
|
|
3902
3903
|
key: 0,
|
|
3903
3904
|
ref_for: !0
|
|
3904
3905
|
}, t.divider, { class: "dsg-breadcrumbs__divider" }), null, 16)) : w("", !0)
|
|
3905
3906
|
], 64))), 128))
|
|
3906
3907
|
]));
|
|
3907
3908
|
}
|
|
3908
|
-
}), Jn = /* @__PURE__ */
|
|
3909
|
+
}), Jn = /* @__PURE__ */ Mo(Zn, [["__scopeId", "data-v-8f108e12"]]), Qn = { class: "dsg-tab" }, ea = { class: "dsg-tab--mobile" }, ta = {
|
|
3909
3910
|
"aria-label": "Select a tab",
|
|
3910
3911
|
class: "dsg-tab--mobile-select"
|
|
3911
|
-
},
|
|
3912
|
+
}, oa = ["selected", "textContent"], sa = { class: "dsg-tab--desktop" }, ia = { class: "dsg-tab--desktop-wrapper" }, na = {
|
|
3912
3913
|
class: "dsg-tab--desktop-nav",
|
|
3913
3914
|
"aria-label": "Tabs"
|
|
3914
3915
|
}, aa = ["href", "onClick", "aria-current"], la = ["textContent"], ra = {
|
|
@@ -3920,18 +3921,26 @@ const fn = {
|
|
|
3920
3921
|
tabs: { default: () => [] },
|
|
3921
3922
|
preventVisits: { type: Boolean, default: !0 },
|
|
3922
3923
|
useWindowLocation: { type: Boolean, default: !1 },
|
|
3924
|
+
replaceState: { type: Boolean, default: !1 },
|
|
3925
|
+
replaceStrategy: { default: "window" },
|
|
3923
3926
|
useSlots: { type: Boolean, default: !1 },
|
|
3924
3927
|
selfUpdate: { type: Boolean, default: !0 },
|
|
3925
3928
|
teleportSlotTo: {}
|
|
3926
3929
|
},
|
|
3927
3930
|
emits: ["tab-clicked"],
|
|
3928
3931
|
setup(e, { emit: t }) {
|
|
3929
|
-
const
|
|
3932
|
+
const o = t, i = (n) => {
|
|
3930
3933
|
e.tabs.forEach((l) => {
|
|
3931
3934
|
l.current = n.name === l.name;
|
|
3932
3935
|
});
|
|
3933
|
-
},
|
|
3934
|
-
e.preventVisits &&
|
|
3936
|
+
}, s = (n) => {
|
|
3937
|
+
if (e.preventVisits && o("tab-clicked", n), e.useWindowLocation && (window.location.href = n.href), e.replaceState) {
|
|
3938
|
+
const l = new URL(window.location.href), a = new URLSearchParams(l.search);
|
|
3939
|
+
a.set("tab", n.key);
|
|
3940
|
+
const u = `${l.origin}${l.pathname}?${a.toString()}`;
|
|
3941
|
+
e.replaceStrategy === "window" && window.history.replaceState({}, "", u);
|
|
3942
|
+
}
|
|
3943
|
+
e.selfUpdate && i(n);
|
|
3935
3944
|
};
|
|
3936
3945
|
return (n, l) => (h(), v("div", Qn, [
|
|
3937
3946
|
T("div", ea, [
|
|
@@ -3939,31 +3948,31 @@ const fn = {
|
|
|
3939
3948
|
(h(!0), v(Z, null, ke(n.tabs, (a) => (h(), v("option", {
|
|
3940
3949
|
key: a.name,
|
|
3941
3950
|
selected: a.current,
|
|
3942
|
-
textContent:
|
|
3943
|
-
}, null, 8,
|
|
3951
|
+
textContent: P(a.name)
|
|
3952
|
+
}, null, 8, oa))), 128))
|
|
3944
3953
|
]),
|
|
3945
|
-
|
|
3954
|
+
I(G, {
|
|
3946
3955
|
class: "dsg-tab--mobile-select-icon",
|
|
3947
3956
|
icon: "chevron-down",
|
|
3948
3957
|
"aria-hidden": "true",
|
|
3949
3958
|
size: "sm"
|
|
3950
3959
|
})
|
|
3951
3960
|
]),
|
|
3952
|
-
T("div",
|
|
3961
|
+
T("div", sa, [
|
|
3953
3962
|
T("div", ia, [
|
|
3954
3963
|
T("div", na, [
|
|
3955
3964
|
(h(!0), v(Z, null, ke(n.tabs, (a) => (h(), v("a", {
|
|
3956
3965
|
key: a.name,
|
|
3957
3966
|
href: a.href,
|
|
3958
|
-
onClick:
|
|
3967
|
+
onClick: ps((u) => s(a), ["prevent"]),
|
|
3959
3968
|
class: D(["dsg-tab--desktop-link", a.current ? "link-active" : "link-inactive"]),
|
|
3960
3969
|
"aria-current": a.current ? "page" : void 0
|
|
3961
3970
|
}, [
|
|
3962
3971
|
T("span", {
|
|
3963
3972
|
class: "dsg-tab--desktop-link-label",
|
|
3964
|
-
textContent:
|
|
3973
|
+
textContent: P(a.name)
|
|
3965
3974
|
}, null, 8, la),
|
|
3966
|
-
a.badge ? (h(), $(
|
|
3975
|
+
a.badge ? (h(), $(Ko, {
|
|
3967
3976
|
key: 0,
|
|
3968
3977
|
label: a.badge.label,
|
|
3969
3978
|
"theme-color": a.current ? "brand" : "gray",
|
|
@@ -3984,7 +3993,7 @@ const fn = {
|
|
|
3984
3993
|
])) : w("", !0)
|
|
3985
3994
|
]));
|
|
3986
3995
|
}
|
|
3987
|
-
}), ua = G, ca =
|
|
3996
|
+
}), ua = G, ca = Ie, fa = ss, ga = Ai, pa = ot, ha = Ko, ma = _e, ba = yt, va = Hi, wa = Sn, ya = is, ka = In, Ca = ns, Ea = ms, Ta = Dn, Aa = Un, Sa = Fn, Oa = Xn, $a = $o, La = Jn, Ia = da, Na = {
|
|
3988
3997
|
DsgIcon: ua,
|
|
3989
3998
|
DsgMiscIcon: ca,
|
|
3990
3999
|
DsgCreditCardIcon: fa,
|
|
@@ -4004,14 +4013,14 @@ const fn = {
|
|
|
4004
4013
|
DsgTag: Sa,
|
|
4005
4014
|
DsgToggle: Oa,
|
|
4006
4015
|
DsgTooltip: $a,
|
|
4007
|
-
DsgBreadcrumb:
|
|
4008
|
-
DsgTab:
|
|
4016
|
+
DsgBreadcrumb: La,
|
|
4017
|
+
DsgTab: Ia
|
|
4009
4018
|
};
|
|
4010
4019
|
export {
|
|
4011
4020
|
ga as DsgAlert,
|
|
4012
4021
|
pa as DsgAvatar,
|
|
4013
4022
|
ha as DsgBadge,
|
|
4014
|
-
|
|
4023
|
+
La as DsgBreadcrumb,
|
|
4015
4024
|
ma as DsgButton,
|
|
4016
4025
|
ba as DsgCheckbox,
|
|
4017
4026
|
va as DsgCheckboxGroup,
|
|
@@ -4025,7 +4034,7 @@ export {
|
|
|
4025
4034
|
Ta as DsgLink,
|
|
4026
4035
|
ca as DsgMiscIcon,
|
|
4027
4036
|
Aa as DsgModal,
|
|
4028
|
-
|
|
4037
|
+
Ia as DsgTab,
|
|
4029
4038
|
Sa as DsgTag,
|
|
4030
4039
|
Oa as DsgToggle,
|
|
4031
4040
|
$a as DsgTooltip,
|