@mcp-use/inspector 20.0.0-beta.13 → 20.0.0-beta.15
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/README.md +4 -4
- package/dist/cdn/inspector.js +76858 -9272
- package/dist/cli.js +69 -24
- package/dist/server/asset-urls.d.ts +1 -4
- package/dist/server/asset-urls.d.ts.map +1 -1
- package/dist/server/asset-urls.js +3 -7
- package/dist/server/cdn-shell.d.ts.map +1 -1
- package/dist/server/cdn-shell.js +3 -3
- package/dist/server/{chunk-H6ZCIKBS.js → chunk-JZT7N2BJ.js} +10 -15
- package/dist/server/{chunk-YAYRN4DW.js → chunk-WNQGHIZ3.js} +61 -15
- package/dist/server/{chunk-QQP554HG.js → chunk-XKCUJ6ZJ.js} +1 -1
- package/dist/server/{chunk-2XQWLYOZ.js → chunk-ZPGABKXL.js} +1 -1
- package/dist/server/cli.js +3 -3
- package/dist/server/index.js +4 -4
- package/dist/server/middleware.js +4 -4
- package/dist/server/version.js +1 -1
- package/dist/web/assets/index-Bqfsh_Rp.js +643 -0
- package/dist/web/index.html +2 -10
- package/package.json +2 -2
- package/dist/cdn/AnimatePresence-D1bZ5_-l.js +0 -394
- package/dist/cdn/ChatTab-CokP5UlL.js +0 -6811
- package/dist/cdn/CheckboxIndicator-BjF73mGX.js +0 -252
- package/dist/cdn/ConnectionSettingsForm-CXCKdMZh.js +0 -929
- package/dist/cdn/ConnectionSettingsTab-Ag4WD55h.js +0 -151
- package/dist/cdn/ElicitationTab-PEmEDvC5.js +0 -655
- package/dist/cdn/FormContext-NtUiZclE.js +0 -135
- package/dist/cdn/InspectorContext-BBKCdfmK.js +0 -123
- package/dist/cdn/JSONDisplay-BJqMz7Ny.js +0 -324
- package/dist/cdn/ListTabHeader-DzmTtN1e.js +0 -89
- package/dist/cdn/MCPAppsDebugControls-C01DPDJv.js +0 -2174
- package/dist/cdn/ManufactOAuthCallback-ChbbjFIT.js +0 -31
- package/dist/cdn/MarkdownRenderer-CrG5JHAZ.js +0 -3610
- package/dist/cdn/McpAppsViewPanel-07_iHrne.js +0 -56
- package/dist/cdn/NotificationsTab-B7uebqMV.js +0 -290
- package/dist/cdn/OAuthCallback-Cku-R2uM.js +0 -58
- package/dist/cdn/PromptsTab-98ugje_q.js +0 -902
- package/dist/cdn/ResourcesTab-CxHilZjd.js +0 -566
- package/dist/cdn/SamplingTab-gOUjg7bt.js +0 -659
- package/dist/cdn/ServerMetadataTab-BM3VhSLf.js +0 -244
- package/dist/cdn/StatusIcon-Q3n3YRtE.js +0 -65
- package/dist/cdn/ToolsTab-Dm6n5OxE.js +0 -2045
- package/dist/cdn/ViewPreview-CCKWd8Qt.js +0 -238
- package/dist/cdn/WidgetDebugContext-B6yoOVVV.js +0 -314
- package/dist/cdn/WidgetWrapper-BlbQAh_X.js +0 -12
- package/dist/cdn/basePath-B8HuhIMu.js +0 -25
- package/dist/cdn/bell-GrTZcnD2.js +0 -10
- package/dist/cdn/browser-DG2Z8392.js +0 -42
- package/dist/cdn/brush-CelVvMGp.js +0 -17
- package/dist/cdn/button-CB4uOoUV.js +0 -2509
- package/dist/cdn/card-BA-DQk-G.js +0 -41
- package/dist/cdn/cfWorker-Bxcs9rNe.js +0 -10799
- package/dist/cdn/checkbox-kwVa4gRX.js +0 -20
- package/dist/cdn/chunk-QUQL4437-XnDcYQEx.js +0 -1508
- package/dist/cdn/clock-YMF8Gtw5.js +0 -12
- package/dist/cdn/code-C8sN2OGR.js +0 -10
- package/dist/cdn/createLucideIcon-BONxC1L5.js +0 -213
- package/dist/cdn/dialog-CJGnC5Ag.js +0 -1028
- package/dist/cdn/dist-C-AJLM5q.js +0 -2307
- package/dist/cdn/dist-CTJnCYmk.js +0 -616
- package/dist/cdn/external-link-Bo4lQxr1.js +0 -17
- package/dist/cdn/eye-pSGG7nvf.js +0 -29
- package/dist/cdn/folder-open-aM8CPtBO.js +0 -7
- package/dist/cdn/hash-DDs2vE1k.js +0 -33
- package/dist/cdn/history-BfUFpL1d.js +0 -17
- package/dist/cdn/index-browser-CCygKh3z.js +0 -1853
- package/dist/cdn/info-BMkB68mB.js +0 -19
- package/dist/cdn/input-BCpgLXU1.js +0 -9654
- package/dist/cdn/inspector-settings-layout-0VDsjeqb.js +0 -4
- package/dist/cdn/label-A0UGV8FE.js +0 -60
- package/dist/cdn/loader-circle-BKRHJEB7.js +0 -7
- package/dist/cdn/manufact-auth-BQMHhbLV.js +0 -423
- package/dist/cdn/maximize-2-DdrB_spi.js +0 -21
- package/dist/cdn/maximize-hSOCz133.js +0 -21
- package/dist/cdn/message-square-D3tKB3uJ.js +0 -7
- package/dist/cdn/not-found-BajFyZpp.js +0 -32
- package/dist/cdn/play-B1leulYf.js +0 -7
- package/dist/cdn/providerMeta-CjGU4rID.js +0 -436
- package/dist/cdn/react-BIs9pQ3H.js +0 -926
- package/dist/cdn/react-BiVEwoxA.js +0 -5421
- package/dist/cdn/refresh-cw-CyvXrS91.js +0 -21
- package/dist/cdn/save-CmdEPUAm.js +0 -34
- package/dist/cdn/schemaHelpers-DTV38jGq.js +0 -16
- package/dist/cdn/select-CCFHjOGk.js +0 -2595
- package/dist/cdn/servers-Dd0Vcp81.js +0 -30
- package/dist/cdn/shared-CJVHJhag.js +0 -1700
- package/dist/cdn/sheet-oyq1mIyg.js +0 -2078
- package/dist/cdn/sparkles-CxeZpVtX.js +0 -23
- package/dist/cdn/spinner-Be1GlSGX.js +0 -15
- package/dist/cdn/square-check-big-C_4wbfwF.js +0 -10
- package/dist/cdn/switch-DHXEA_N5.js +0 -665
- package/dist/cdn/tabs-subtle-Dubd6Kj8.js +0 -788
- package/dist/cdn/telemetry-DyrOzsAR.js +0 -208
- package/dist/cdn/textarea-CwmI8_uI.js +0 -14
- package/dist/cdn/trash-2-BhumJAFE.js +0 -25
- package/dist/cdn/useAriaLabelledBy-Cra6w3YY.js +0 -30
- package/dist/cdn/useCompositeItem-Dhnm-7el.js +0 -26
- package/dist/cdn/useConfig-BTDwEhra.js +0 -235
- package/dist/cdn/useSavedRequests-mSIsDd4c.js +0 -51
- package/dist/cdn/useViewHostProps-C5NRGTzJ.js +0 -364
- package/dist/cdn/wrench-DvK20LUT.js +0 -7
- package/dist/cdn/x-EilKPiCX.js +0 -10
- package/dist/cdn/zap-0Wr9QO7N.js +0 -10
- package/dist/web/assets/AnimatePresence-FfDQQNFJ.js +0 -9
- package/dist/web/assets/ChatTab-BEfFVccY.js +0 -18
- package/dist/web/assets/ConnectionSettingsTab-Bb_6a0Iv.js +0 -1
- package/dist/web/assets/ElicitationTab-BP4GKiyX.js +0 -1
- package/dist/web/assets/FormContext-sV-yByKz.js +0 -1
- package/dist/web/assets/ListTabHeader-CrGae306.js +0 -1
- package/dist/web/assets/MCPAppsDebugControls-BIyFdqol.js +0 -34
- package/dist/web/assets/ManufactOAuthCallback-C7FmBqhm.js +0 -1
- package/dist/web/assets/MarkdownRenderer-Dh79xxF3.js +0 -47
- package/dist/web/assets/McpAppsViewPanel-eC3j1-Vq.js +0 -1
- package/dist/web/assets/NotificationsTab-BiZcGnsE.js +0 -1
- package/dist/web/assets/OAuthCallback-0QMKMr_h.js +0 -1
- package/dist/web/assets/PromptsTab-DP25ApgP.js +0 -15
- package/dist/web/assets/ResourcesTab-CptaN3NT.js +0 -2
- package/dist/web/assets/SamplingTab-BcdnfiwQ.js +0 -1
- package/dist/web/assets/ServerMetadataTab-DfM-a-Kp.js +0 -1
- package/dist/web/assets/ToolsTab-hSGwy5-P.js +0 -8
- package/dist/web/assets/ViewPreview-r5Me72Dm.js +0 -1
- package/dist/web/assets/WidgetWrapper-cv_BM1bY.js +0 -1
- package/dist/web/assets/brush-DX0UZ_pI.js +0 -1
- package/dist/web/assets/button-C8Xa2k4x.js +0 -1
- package/dist/web/assets/checkbox-CiCqaf9B.js +0 -1
- package/dist/web/assets/code-B14rVdNt.js +0 -1
- package/dist/web/assets/createLucideIcon-BEHeJH0M.js +0 -1
- package/dist/web/assets/dist-igO5zKmw.js +0 -21
- package/dist/web/assets/index-lCF-0iyi.js +0 -499
- package/dist/web/assets/input-C0OQCUZy.js +0 -1
- package/dist/web/assets/inspector-settings-layout-yjKRJDai.js +0 -1
- package/dist/web/assets/label-CI7JWQOo.js +0 -1
- package/dist/web/assets/maximize-2-Br1WQzT2.js +0 -1
- package/dist/web/assets/maximize-CJNgRe6S.js +0 -1
- package/dist/web/assets/react-CU_d2d5K.js +0 -1
- package/dist/web/assets/refresh-cw-B5iaAZKn.js +0 -1
- package/dist/web/assets/save-TM6fvNrt.js +0 -1
- package/dist/web/assets/schemaHelpers-DLNTQr_6.js +0 -1
- package/dist/web/assets/select-D6jzbLJn.js +0 -1
- package/dist/web/assets/shared-ChslWC1c.js +0 -1
- package/dist/web/assets/sparkles-BGYTDThM.js +0 -1
- package/dist/web/assets/tabs-subtle-BqKfSXAk.js +0 -1
- package/dist/web/assets/textarea-CRTXuRmE.js +0 -1
- package/dist/web/assets/useConfig-BoaEj10z.js +0 -1
- package/dist/web/assets/useViewHostProps-BUcH84Z-.js +0 -1
- package/dist/web/assets/zap-BDWHCVHU.js +0 -1
|
@@ -1,665 +0,0 @@
|
|
|
1
|
-
import { s as e, t } from "./react-BIs9pQ3H.js";
|
|
2
|
-
import { A as n, B as r, D as i, E as a, F as o, I as s, L as c, M as l, Mn as u, N as d, Nn as f, O as p, P as m, R as h, S as g, T as _, U as v, Yn as y, _ as b, an as x, b as S, f as C, g as w, h as T, in as E, j as D, k as O, m as k, s as A, v as j, w as M, x as ee, y as N, z as P } from "./input-BCpgLXU1.js";
|
|
3
|
-
import { n as te } from "./createLucideIcon-BONxC1L5.js";
|
|
4
|
-
import { U as F, a as ne, d as re, g as ie, h as ae, k as oe, m as I, s as se, u as ce } from "./button-CB4uOoUV.js";
|
|
5
|
-
import { n as le } from "./label-A0UGV8FE.js";
|
|
6
|
-
import { c as ue } from "./select-CCFHjOGk.js";
|
|
7
|
-
import { c as L, i as de, l as fe, o as pe, r as me, t as he } from "./FormContext-NtUiZclE.js";
|
|
8
|
-
import { t as ge } from "./useAriaLabelledBy-Cra6w3YY.js";
|
|
9
|
-
//#region ../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/wrap.mjs
|
|
10
|
-
var _e = (e, t, n) => {
|
|
11
|
-
let r = t - e;
|
|
12
|
-
return ((n - e) % r + r) % r + e;
|
|
13
|
-
};
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region ../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/get-easing-for-segment.mjs
|
|
16
|
-
/*#__NO_SIDE_EFFECTS__*/
|
|
17
|
-
function R(e, t) {
|
|
18
|
-
return m(e) ? e[_e(0, e.length, t)] : e;
|
|
19
|
-
}
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region ../../node_modules/.pnpm/motion-dom@12.42.2/node_modules/motion-dom/dist/es/animation/GroupAnimation.mjs
|
|
22
|
-
var z = class {
|
|
23
|
-
constructor(e) {
|
|
24
|
-
this.stop = () => this.runAll("stop"), this.animations = e.filter(Boolean);
|
|
25
|
-
}
|
|
26
|
-
get finished() {
|
|
27
|
-
return Promise.all(this.animations.map((e) => e.finished));
|
|
28
|
-
}
|
|
29
|
-
getAll(e) {
|
|
30
|
-
return this.animations[0][e];
|
|
31
|
-
}
|
|
32
|
-
setAll(e, t) {
|
|
33
|
-
for (let n = 0; n < this.animations.length; n++) this.animations[n][e] = t;
|
|
34
|
-
}
|
|
35
|
-
attachTimeline(e) {
|
|
36
|
-
let t = this.animations.map((t) => t.attachTimeline(e));
|
|
37
|
-
return () => {
|
|
38
|
-
t.forEach((e, t) => {
|
|
39
|
-
e && e(), this.animations[t].stop();
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
get time() {
|
|
44
|
-
return this.getAll("time");
|
|
45
|
-
}
|
|
46
|
-
set time(e) {
|
|
47
|
-
this.setAll("time", e);
|
|
48
|
-
}
|
|
49
|
-
get speed() {
|
|
50
|
-
return this.getAll("speed");
|
|
51
|
-
}
|
|
52
|
-
set speed(e) {
|
|
53
|
-
this.setAll("speed", e);
|
|
54
|
-
}
|
|
55
|
-
get state() {
|
|
56
|
-
return this.getAll("state");
|
|
57
|
-
}
|
|
58
|
-
get startTime() {
|
|
59
|
-
return this.getAll("startTime");
|
|
60
|
-
}
|
|
61
|
-
get duration() {
|
|
62
|
-
return B(this.animations, "duration");
|
|
63
|
-
}
|
|
64
|
-
get iterationDuration() {
|
|
65
|
-
return B(this.animations, "iterationDuration");
|
|
66
|
-
}
|
|
67
|
-
runAll(e) {
|
|
68
|
-
this.animations.forEach((t) => t[e]());
|
|
69
|
-
}
|
|
70
|
-
play() {
|
|
71
|
-
this.runAll("play");
|
|
72
|
-
}
|
|
73
|
-
pause() {
|
|
74
|
-
this.runAll("pause");
|
|
75
|
-
}
|
|
76
|
-
cancel() {
|
|
77
|
-
this.runAll("cancel");
|
|
78
|
-
}
|
|
79
|
-
complete() {
|
|
80
|
-
this.runAll("complete");
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
function B(e, t) {
|
|
84
|
-
let n = 0;
|
|
85
|
-
for (let r = 0; r < e.length; r++) {
|
|
86
|
-
let i = e[r][t];
|
|
87
|
-
i !== null && i > n && (n = i);
|
|
88
|
-
}
|
|
89
|
-
return n;
|
|
90
|
-
}
|
|
91
|
-
//#endregion
|
|
92
|
-
//#region ../../node_modules/.pnpm/motion-dom@12.42.2/node_modules/motion-dom/dist/es/animation/GroupAnimationWithThen.mjs
|
|
93
|
-
var V = class extends z {
|
|
94
|
-
then(e, t) {
|
|
95
|
-
return this.finished.finally(e).then(() => {});
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
//#endregion
|
|
99
|
-
//#region ../../node_modules/.pnpm/motion-dom@12.42.2/node_modules/motion-dom/dist/es/render/object/ObjectVisualElement.mjs
|
|
100
|
-
function H(e, t) {
|
|
101
|
-
return e in t;
|
|
102
|
-
}
|
|
103
|
-
var ve = class extends j {
|
|
104
|
-
constructor() {
|
|
105
|
-
super(...arguments), this.type = "object";
|
|
106
|
-
}
|
|
107
|
-
readValueFromInstance(e, t) {
|
|
108
|
-
if (H(t, e)) {
|
|
109
|
-
let n = e[t];
|
|
110
|
-
if (typeof n == "string" || typeof n == "number") return n;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
getBaseTargetFromProps() {}
|
|
114
|
-
removeValueFromRenderState(e, t) {
|
|
115
|
-
delete t.output[e];
|
|
116
|
-
}
|
|
117
|
-
measureInstanceViewportBox() {
|
|
118
|
-
return S();
|
|
119
|
-
}
|
|
120
|
-
build(e, t) {
|
|
121
|
-
Object.assign(e.output, t);
|
|
122
|
-
}
|
|
123
|
-
renderInstance(e, { output: t }) {
|
|
124
|
-
Object.assign(e, t);
|
|
125
|
-
}
|
|
126
|
-
sortInstanceNodePosition() {
|
|
127
|
-
return 0;
|
|
128
|
-
}
|
|
129
|
-
}, U = /* @__PURE__ */ e(t(), 1);
|
|
130
|
-
function ye(e) {
|
|
131
|
-
let t = v(() => i(e)), { isStatic: n } = (0, U.useContext)(k);
|
|
132
|
-
if (n) {
|
|
133
|
-
let [, n] = (0, U.useState)(e);
|
|
134
|
-
(0, U.useEffect)(() => t.on("change", n), []);
|
|
135
|
-
}
|
|
136
|
-
return t;
|
|
137
|
-
}
|
|
138
|
-
//#endregion
|
|
139
|
-
//#region ../../node_modules/.pnpm/framer-motion@12.42.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs
|
|
140
|
-
function W(e) {
|
|
141
|
-
return typeof e == "object" && !Array.isArray(e);
|
|
142
|
-
}
|
|
143
|
-
//#endregion
|
|
144
|
-
//#region ../../node_modules/.pnpm/framer-motion@12.42.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/framer-motion/dist/es/animation/animate/resolve-subjects.mjs
|
|
145
|
-
function G(e, t, n, r) {
|
|
146
|
-
return e == null ? [] : typeof e == "string" && W(t) ? M(e, n, r) : e instanceof NodeList ? Array.from(e) : Array.isArray(e) ? e.filter((e) => e != null) : [e];
|
|
147
|
-
}
|
|
148
|
-
//#endregion
|
|
149
|
-
//#region ../../node_modules/.pnpm/framer-motion@12.42.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs
|
|
150
|
-
function be(e, t, n) {
|
|
151
|
-
return e * (t + 1) + n * t;
|
|
152
|
-
}
|
|
153
|
-
//#endregion
|
|
154
|
-
//#region ../../node_modules/.pnpm/framer-motion@12.42.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs
|
|
155
|
-
function K(e, t, n, r) {
|
|
156
|
-
return typeof t == "number" ? t : t.startsWith("-") || t.startsWith("+") ? Math.max(0, e + parseFloat(t)) : t === "<" ? n : t.startsWith("<") ? Math.max(0, n + parseFloat(t.slice(1))) : r.get(t) ?? e;
|
|
157
|
-
}
|
|
158
|
-
//#endregion
|
|
159
|
-
//#region ../../node_modules/.pnpm/framer-motion@12.42.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/framer-motion/dist/es/animation/sequence/utils/edit.mjs
|
|
160
|
-
function q(e, t, n) {
|
|
161
|
-
for (let i = 0; i < e.length; i++) {
|
|
162
|
-
let a = e[i];
|
|
163
|
-
a.at > t && a.at < n && (r(e, a), i--);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
function xe(e, t, n, r, i, a) {
|
|
167
|
-
q(e, i, a);
|
|
168
|
-
for (let o = 0; o < t.length; o++) e.push({
|
|
169
|
-
value: t[o],
|
|
170
|
-
at: d(i, a, r[o]),
|
|
171
|
-
easing: /* @__PURE__ */ R(n, o)
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
//#endregion
|
|
175
|
-
//#region ../../node_modules/.pnpm/framer-motion@12.42.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs
|
|
176
|
-
function Se(e, t, n = 0) {
|
|
177
|
-
let r = t + 1 + t * n;
|
|
178
|
-
for (let t = 0; t < e.length; t++) e[t] = e[t] / r;
|
|
179
|
-
}
|
|
180
|
-
//#endregion
|
|
181
|
-
//#region ../../node_modules/.pnpm/framer-motion@12.42.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/framer-motion/dist/es/animation/sequence/utils/sort.mjs
|
|
182
|
-
function Ce(e, t) {
|
|
183
|
-
return e.at === t.at ? e.value === null ? 1 : t.value === null ? -1 : 0 : e.at - t.at;
|
|
184
|
-
}
|
|
185
|
-
//#endregion
|
|
186
|
-
//#region ../../node_modules/.pnpm/framer-motion@12.42.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/framer-motion/dist/es/animation/sequence/create.mjs
|
|
187
|
-
var we = "easeInOut", J = 20;
|
|
188
|
-
function Te(e, { defaultTransition: t = {}, ...r } = {}, i, u) {
|
|
189
|
-
let d = t.duration || .3, f = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(), h = {}, g = /* @__PURE__ */ new Map(), _ = 0, v = 0, y = 0;
|
|
190
|
-
for (let r = 0; r < e.length; r++) {
|
|
191
|
-
let c = e[r];
|
|
192
|
-
if (typeof c == "string") {
|
|
193
|
-
g.set(c, v);
|
|
194
|
-
continue;
|
|
195
|
-
} else if (!Array.isArray(c)) {
|
|
196
|
-
g.set(c.name, K(v, c.at, _, g));
|
|
197
|
-
continue;
|
|
198
|
-
}
|
|
199
|
-
let [f, b, x = {}] = c;
|
|
200
|
-
x.at !== void 0 && (v = K(v, x.at, _, g));
|
|
201
|
-
let S = 0, C = (e, r, i, a = 0, c = 0) => {
|
|
202
|
-
let f = Oe(e), { delay: m = 0, times: h = O(f), type: g = t.type || "keyframes", repeat: _, repeatType: b, repeatDelay: x = 0, ...C } = r, { ease: w = t.ease || "easeOut", duration: T } = r, E = typeof m == "function" ? m(a, c) : m, D = f.length, k = p(g) ? g : u?.[g || "keyframes"];
|
|
203
|
-
if (D <= 2 && k) {
|
|
204
|
-
let e = 100;
|
|
205
|
-
if (D === 2 && je(f)) {
|
|
206
|
-
let t = f[1] - f[0];
|
|
207
|
-
e = Math.abs(t);
|
|
208
|
-
}
|
|
209
|
-
let n = {
|
|
210
|
-
...t,
|
|
211
|
-
...C
|
|
212
|
-
};
|
|
213
|
-
T !== void 0 && (n.duration = s(T));
|
|
214
|
-
let r = l(n, e, k);
|
|
215
|
-
w = r.ease, T = r.duration;
|
|
216
|
-
}
|
|
217
|
-
T ??= d;
|
|
218
|
-
let A = v + E;
|
|
219
|
-
h.length === 1 && h[0] === 0 && (h[1] = 1);
|
|
220
|
-
let j = h.length - f.length;
|
|
221
|
-
if (j > 0 && n(h, j), f.length === 1 && f.unshift(null), _ && P(_ < J, `Sequence segments can't repeat ${_} times — ignoring repeat option. Use a value below ${J} or apply repeat at the sequence level instead.`), _ && _ < J) {
|
|
222
|
-
let e = T > 0 ? x / T : 0;
|
|
223
|
-
T = be(T, _, x);
|
|
224
|
-
let t = [...f], n = [...h];
|
|
225
|
-
w = Array.isArray(w) ? [...w] : [w];
|
|
226
|
-
let r = [...w], i = b === "reverse" || b === "mirror", a = t, s = r;
|
|
227
|
-
i && (a = [...t].reverse(), b === "reverse" && (s = [...r].reverse().map((e) => typeof e == "function" ? o(e) : e)));
|
|
228
|
-
for (let o = 0; o < _; o++) {
|
|
229
|
-
let c = i && o % 2 == 0, l = c ? a : t, u = c ? s : r, d = (o + 1) * (1 + e);
|
|
230
|
-
e > 0 && (f.push(f[f.length - 1]), h.push(d), w.push("linear")), f.push(...l);
|
|
231
|
-
for (let e = 0; e < l.length; e++) h.push(n[e] + d), w.push(e === 0 ? "linear" : /* @__PURE__ */ R(u, e - 1));
|
|
232
|
-
}
|
|
233
|
-
Se(h, _, e);
|
|
234
|
-
}
|
|
235
|
-
let M = A + T;
|
|
236
|
-
xe(i, f, w, h, A, M), S = Math.max(E + T, S), y = Math.max(M, y);
|
|
237
|
-
};
|
|
238
|
-
if (a(f)) {
|
|
239
|
-
let e = Ee(f, m);
|
|
240
|
-
C(b, x, De("default", e));
|
|
241
|
-
} else {
|
|
242
|
-
let e = G(f, b, i, h), t = e.length;
|
|
243
|
-
for (let n = 0; n < t; n++) {
|
|
244
|
-
b = b, x = x;
|
|
245
|
-
let r = e[n], i = Ee(r, m);
|
|
246
|
-
for (let e in b) C(b[e], ke(x, e), De(e, i), n, t);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
_ = v, v += S;
|
|
250
|
-
}
|
|
251
|
-
return m.forEach((e, n) => {
|
|
252
|
-
for (let i in e) {
|
|
253
|
-
let a = e[i];
|
|
254
|
-
a.sort(Ce);
|
|
255
|
-
let o = [], s = [], l = [];
|
|
256
|
-
for (let e = 0; e < a.length; e++) {
|
|
257
|
-
let { at: t, value: n, easing: r } = a[e];
|
|
258
|
-
o.push(n), s.push(c(0, y, t)), l.push(r || "easeOut");
|
|
259
|
-
}
|
|
260
|
-
s[0] !== 0 && (s.unshift(0), o.unshift(o[0]), l.unshift(we)), s[s.length - 1] !== 1 && (s.push(1), o.push(null)), f.has(n) || f.set(n, {
|
|
261
|
-
keyframes: {},
|
|
262
|
-
transition: {}
|
|
263
|
-
});
|
|
264
|
-
let u = f.get(n);
|
|
265
|
-
u.keyframes[i] = o;
|
|
266
|
-
let { type: d, ...p } = t;
|
|
267
|
-
u.transition[i] = {
|
|
268
|
-
...p,
|
|
269
|
-
duration: y,
|
|
270
|
-
ease: l,
|
|
271
|
-
times: s,
|
|
272
|
-
...r
|
|
273
|
-
};
|
|
274
|
-
}
|
|
275
|
-
}), f;
|
|
276
|
-
}
|
|
277
|
-
function Ee(e, t) {
|
|
278
|
-
return !t.has(e) && t.set(e, {}), t.get(e);
|
|
279
|
-
}
|
|
280
|
-
function De(e, t) {
|
|
281
|
-
return t[e] || (t[e] = []), t[e];
|
|
282
|
-
}
|
|
283
|
-
function Oe(e) {
|
|
284
|
-
return Array.isArray(e) ? e : [e];
|
|
285
|
-
}
|
|
286
|
-
function ke(e, t) {
|
|
287
|
-
return e && e[t] ? {
|
|
288
|
-
...e,
|
|
289
|
-
...e[t]
|
|
290
|
-
} : { ...e };
|
|
291
|
-
}
|
|
292
|
-
var Ae = (e) => typeof e == "number", je = (e) => e.every(Ae);
|
|
293
|
-
//#endregion
|
|
294
|
-
//#region ../../node_modules/.pnpm/framer-motion@12.42.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/framer-motion/dist/es/animation/utils/create-visual-element.mjs
|
|
295
|
-
function Me(e) {
|
|
296
|
-
let t = {
|
|
297
|
-
presenceContext: null,
|
|
298
|
-
props: {},
|
|
299
|
-
visualState: {
|
|
300
|
-
renderState: {
|
|
301
|
-
transform: {},
|
|
302
|
-
transformOrigin: {},
|
|
303
|
-
style: {},
|
|
304
|
-
vars: {},
|
|
305
|
-
attrs: {}
|
|
306
|
-
},
|
|
307
|
-
latestValues: {}
|
|
308
|
-
}
|
|
309
|
-
}, n = g(e) && !ee(e) ? new w(t) : new b(t);
|
|
310
|
-
n.mount(e), N.set(e, n);
|
|
311
|
-
}
|
|
312
|
-
function Ne(e) {
|
|
313
|
-
let t = new ve({
|
|
314
|
-
presenceContext: null,
|
|
315
|
-
props: {},
|
|
316
|
-
visualState: {
|
|
317
|
-
renderState: { output: {} },
|
|
318
|
-
latestValues: {}
|
|
319
|
-
}
|
|
320
|
-
});
|
|
321
|
-
t.mount(e), N.set(e, t);
|
|
322
|
-
}
|
|
323
|
-
//#endregion
|
|
324
|
-
//#region ../../node_modules/.pnpm/framer-motion@12.42.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/framer-motion/dist/es/animation/animate/subject.mjs
|
|
325
|
-
function Pe(e, t) {
|
|
326
|
-
return a(e) || typeof e == "number" || typeof e == "string" && !W(t);
|
|
327
|
-
}
|
|
328
|
-
function Fe(e, t, n, r) {
|
|
329
|
-
let i = [];
|
|
330
|
-
if (Pe(e, t)) i.push(T(e, W(t) && t.default || t, n && (n.default || n)));
|
|
331
|
-
else {
|
|
332
|
-
if (e == null) return i;
|
|
333
|
-
let a = G(e, t, r), o = a.length;
|
|
334
|
-
h(!!o, "No valid elements provided.", "no-valid-elements");
|
|
335
|
-
for (let e = 0; e < o; e++) {
|
|
336
|
-
let r = a[e], s = r instanceof Element ? Me : Ne;
|
|
337
|
-
N.has(r) || s(r);
|
|
338
|
-
let c = N.get(r), l = { ...n };
|
|
339
|
-
"delay" in l && typeof l.delay == "function" && (l.delay = l.delay(e, o)), i.push(..._(c, {
|
|
340
|
-
...t,
|
|
341
|
-
transition: l
|
|
342
|
-
}, {}));
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
return i;
|
|
346
|
-
}
|
|
347
|
-
//#endregion
|
|
348
|
-
//#region ../../node_modules/.pnpm/framer-motion@12.42.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/framer-motion/dist/es/animation/animate/sequence.mjs
|
|
349
|
-
function Ie(e, t, n) {
|
|
350
|
-
let r = [];
|
|
351
|
-
return Te(e.map((e) => {
|
|
352
|
-
if (Array.isArray(e) && typeof e[0] == "function") {
|
|
353
|
-
let t = e[0], n = i(0);
|
|
354
|
-
return n.on("change", t), e.length === 1 ? [n, [0, 1]] : e.length === 2 ? [
|
|
355
|
-
n,
|
|
356
|
-
[0, 1],
|
|
357
|
-
e[1]
|
|
358
|
-
] : [
|
|
359
|
-
n,
|
|
360
|
-
e[1],
|
|
361
|
-
e[2]
|
|
362
|
-
];
|
|
363
|
-
}
|
|
364
|
-
return e;
|
|
365
|
-
}), t, n, { spring: D }).forEach(({ keyframes: e, transition: t }, n) => {
|
|
366
|
-
r.push(...Fe(n, e, t));
|
|
367
|
-
}), r;
|
|
368
|
-
}
|
|
369
|
-
//#endregion
|
|
370
|
-
//#region ../../node_modules/.pnpm/framer-motion@12.42.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/framer-motion/dist/es/animation/animate/index.mjs
|
|
371
|
-
function Le(e) {
|
|
372
|
-
return Array.isArray(e) && e.some(Array.isArray);
|
|
373
|
-
}
|
|
374
|
-
function Re(e = {}) {
|
|
375
|
-
let { scope: t, reduceMotion: n, skipAnimations: i } = e;
|
|
376
|
-
function a(e, a, o) {
|
|
377
|
-
let s = [], c, l = {};
|
|
378
|
-
if (n !== void 0 && (l.reduceMotion = n), i !== void 0 && (l.skipAnimations = i), Le(e)) {
|
|
379
|
-
let { onComplete: n, ...r } = a || {};
|
|
380
|
-
typeof n == "function" && (c = n), s = Ie(e, {
|
|
381
|
-
...l,
|
|
382
|
-
...r
|
|
383
|
-
}, t);
|
|
384
|
-
} else {
|
|
385
|
-
let { onComplete: n, ...r } = o || {};
|
|
386
|
-
typeof n == "function" && (c = n), s = Fe(e, a, {
|
|
387
|
-
...l,
|
|
388
|
-
...r
|
|
389
|
-
}, t);
|
|
390
|
-
}
|
|
391
|
-
let u = new V(s);
|
|
392
|
-
return c && u.finished.then(c), t && (t.animations.push(u), u.finished.then(() => {
|
|
393
|
-
r(t.animations, u);
|
|
394
|
-
})), u;
|
|
395
|
-
}
|
|
396
|
-
return a;
|
|
397
|
-
}
|
|
398
|
-
var Y = Re(), ze = /*#__PURE__*/ U.createContext(void 0);
|
|
399
|
-
process.env.NODE_ENV !== "production" && (ze.displayName = "SwitchRootContext");
|
|
400
|
-
function Be() {
|
|
401
|
-
let e = U.useContext(ze);
|
|
402
|
-
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? I(63) : "Base UI: SwitchRootContext is missing. Switch parts must be placed within <Switch.Root>.");
|
|
403
|
-
return e;
|
|
404
|
-
}
|
|
405
|
-
//#endregion
|
|
406
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/switch/root/SwitchRootDataAttributes.mjs
|
|
407
|
-
var Ve = /*#__PURE__*/ function(e) {
|
|
408
|
-
return e.checked = "data-checked", e.unchecked = "data-unchecked", e.disabled = "data-disabled", e.readonly = "data-readonly", e.required = "data-required", e.valid = "data-valid", e.invalid = "data-invalid", e.touched = "data-touched", e.dirty = "data-dirty", e.filled = "data-filled", e.focused = "data-focused", e;
|
|
409
|
-
}({}), He = {
|
|
410
|
-
...L,
|
|
411
|
-
checked(e) {
|
|
412
|
-
return e ? { [Ve.checked]: "" } : { [Ve.unchecked]: "" };
|
|
413
|
-
}
|
|
414
|
-
}, X = te(), Ue = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
415
|
-
let { checked: n, className: r, defaultChecked: i, "aria-labelledby": a, form: o, id: s, inputRef: c, name: l, nativeButton: d = !1, onCheckedChange: p, readOnly: m = !1, required: h = !1, disabled: g = !1, render: _, uncheckedValue: v, value: b, style: S, ...C } = e, { clearErrors: w } = he(), { state: T, setTouched: D, setDirty: O, validityData: k, setFilled: A, setFocused: j, validationMode: M, disabled: ee, name: N, validation: P } = pe(), { labelId: te } = me(), F = ee || g, I = N ?? l, L = U.useRef(null), _e = ce(L, c, P.inputRef), R = U.useRef(null), z = f(), B = ue({
|
|
416
|
-
id: s,
|
|
417
|
-
implicit: !1,
|
|
418
|
-
controlRef: R
|
|
419
|
-
}), V = d ? void 0 : B, [H, ve] = le({
|
|
420
|
-
controlled: n,
|
|
421
|
-
default: !!i,
|
|
422
|
-
name: "Switch",
|
|
423
|
-
state: "checked"
|
|
424
|
-
});
|
|
425
|
-
de(R, z, H, void 0, !F, l), ie(() => {
|
|
426
|
-
L.current && A(L.current.checked);
|
|
427
|
-
}, [L, A]), fe(H, () => {
|
|
428
|
-
w(I), O(H !== k.initialValue), A(H), P.change(H);
|
|
429
|
-
});
|
|
430
|
-
let { getButtonProps: ye, buttonRef: W } = re({
|
|
431
|
-
disabled: F,
|
|
432
|
-
native: d
|
|
433
|
-
}), G = ge(a, te, L, !d, V), be = {
|
|
434
|
-
id: d ? B : z,
|
|
435
|
-
role: "switch",
|
|
436
|
-
"aria-checked": H,
|
|
437
|
-
"aria-readonly": m || void 0,
|
|
438
|
-
"aria-required": h || void 0,
|
|
439
|
-
"aria-labelledby": G,
|
|
440
|
-
onFocus() {
|
|
441
|
-
F || j(!0);
|
|
442
|
-
},
|
|
443
|
-
onBlur() {
|
|
444
|
-
let e = L.current;
|
|
445
|
-
!e || F || (D(!0), j(!1), M === "onBlur" && P.commit(e.checked));
|
|
446
|
-
},
|
|
447
|
-
onClick(e) {
|
|
448
|
-
if (m || F) return;
|
|
449
|
-
e.preventDefault();
|
|
450
|
-
let t = L.current;
|
|
451
|
-
t && t.dispatchEvent(new (oe(t)).PointerEvent("click", {
|
|
452
|
-
bubbles: !0,
|
|
453
|
-
shiftKey: e.shiftKey,
|
|
454
|
-
ctrlKey: e.ctrlKey,
|
|
455
|
-
altKey: e.altKey,
|
|
456
|
-
metaKey: e.metaKey
|
|
457
|
-
}));
|
|
458
|
-
}
|
|
459
|
-
}, K = ae({
|
|
460
|
-
checked: H,
|
|
461
|
-
disabled: F,
|
|
462
|
-
form: o,
|
|
463
|
-
id: V,
|
|
464
|
-
name: I,
|
|
465
|
-
required: h,
|
|
466
|
-
style: I ? x : E,
|
|
467
|
-
tabIndex: -1,
|
|
468
|
-
type: "checkbox",
|
|
469
|
-
"aria-hidden": !0,
|
|
470
|
-
ref: _e,
|
|
471
|
-
onChange(e) {
|
|
472
|
-
if (e.nativeEvent.defaultPrevented) return;
|
|
473
|
-
if (m) {
|
|
474
|
-
e.preventDefault();
|
|
475
|
-
return;
|
|
476
|
-
}
|
|
477
|
-
let t = e.currentTarget.checked, n = u(y, e.nativeEvent);
|
|
478
|
-
p?.(t, n), !n.isCanceled && ve(t);
|
|
479
|
-
},
|
|
480
|
-
onFocus() {
|
|
481
|
-
R.current?.focus();
|
|
482
|
-
}
|
|
483
|
-
}, (e) => P.getValidationProps(F, e), b === void 0 ? se : { value: b }), q = U.useMemo(() => ({
|
|
484
|
-
...T,
|
|
485
|
-
checked: H,
|
|
486
|
-
disabled: F,
|
|
487
|
-
readOnly: m,
|
|
488
|
-
required: h
|
|
489
|
-
}), [
|
|
490
|
-
T,
|
|
491
|
-
H,
|
|
492
|
-
F,
|
|
493
|
-
m,
|
|
494
|
-
h
|
|
495
|
-
]), xe = ne("span", e, {
|
|
496
|
-
state: q,
|
|
497
|
-
ref: [
|
|
498
|
-
t,
|
|
499
|
-
R,
|
|
500
|
-
W
|
|
501
|
-
],
|
|
502
|
-
props: [
|
|
503
|
-
be,
|
|
504
|
-
C,
|
|
505
|
-
ye,
|
|
506
|
-
(e) => P.getValidationProps(F, e)
|
|
507
|
-
],
|
|
508
|
-
stateAttributesMapping: He
|
|
509
|
-
});
|
|
510
|
-
return /*#__PURE__*/ (0, X.jsxs)(ze.Provider, {
|
|
511
|
-
value: q,
|
|
512
|
-
children: [
|
|
513
|
-
xe,
|
|
514
|
-
!H && I && v !== void 0 && /*#__PURE__*/ (0, X.jsx)("input", {
|
|
515
|
-
type: "hidden",
|
|
516
|
-
form: o,
|
|
517
|
-
name: I,
|
|
518
|
-
value: v,
|
|
519
|
-
disabled: F
|
|
520
|
-
}),
|
|
521
|
-
/*#__PURE__*/ (0, X.jsx)("input", {
|
|
522
|
-
...K,
|
|
523
|
-
suppressHydrationWarning: !0
|
|
524
|
-
})
|
|
525
|
-
]
|
|
526
|
-
});
|
|
527
|
-
});
|
|
528
|
-
process.env.NODE_ENV !== "production" && (Ue.displayName = "SwitchRoot");
|
|
529
|
-
//#endregion
|
|
530
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/switch/thumb/SwitchThumb.mjs
|
|
531
|
-
var Z = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
532
|
-
let { render: n, className: r, style: i, ...a } = e;
|
|
533
|
-
return ne("span", e, {
|
|
534
|
-
state: Be(),
|
|
535
|
-
ref: t,
|
|
536
|
-
stateAttributesMapping: He,
|
|
537
|
-
props: a
|
|
538
|
-
});
|
|
539
|
-
});
|
|
540
|
-
process.env.NODE_ENV !== "production" && (Z.displayName = "SwitchThumb");
|
|
541
|
-
//#endregion
|
|
542
|
-
//#region src/client/components/ui/switch.tsx
|
|
543
|
-
var We = 34, Ge = 20, Q = 16, $ = 2, Ke = 4, qe = 2;
|
|
544
|
-
function Je(e) {
|
|
545
|
-
return "label" in e && typeof e.label == "string";
|
|
546
|
-
}
|
|
547
|
-
var Ye = (0, U.forwardRef)(({ label: e, checked: t, onToggle: n, disabled: r = !1, thumbTransition: i, uncheckedTrackColor: a, uncheckedTrackColorHovered: o, className: s, ...c }, l) => {
|
|
548
|
-
let u = (0, U.useId)(), d = (0, U.useRef)(!1), [f, p] = (0, U.useState)(!1), [m, h] = (0, U.useState)(!1), g = (0, U.useRef)(!1), _ = (0, U.useRef)(!1), v = (0, U.useRef)(null), y = ye(t ? 16 : $);
|
|
549
|
-
(0, U.useEffect)(() => {
|
|
550
|
-
d.current = !0;
|
|
551
|
-
}, []);
|
|
552
|
-
let b = m ? 20 : f ? 18 : Q, x = m ? Q - Ke : Q, S = m ? 4 : $, w = b - Q, T = t ? 16 - w : $;
|
|
553
|
-
(0, U.useEffect)(() => {
|
|
554
|
-
g.current || (d.current ? Y(y, T, i ?? A.moderate) : y.set(T));
|
|
555
|
-
}, [
|
|
556
|
-
T,
|
|
557
|
-
y,
|
|
558
|
-
i
|
|
559
|
-
]);
|
|
560
|
-
let E = (0, U.useCallback)((e) => {
|
|
561
|
-
r || e.pointerType === "mouse" && e.button !== 0 || (h(!0), g.current = !1, _.current = !1, v.current = {
|
|
562
|
-
clientX: e.clientX,
|
|
563
|
-
originX: y.get()
|
|
564
|
-
}, e.currentTarget.setPointerCapture(e.pointerId));
|
|
565
|
-
}, [r, y]), D = (0, U.useCallback)((e) => {
|
|
566
|
-
if (!v.current) return;
|
|
567
|
-
let t = e.clientX - v.current.clientX;
|
|
568
|
-
if (!g.current) {
|
|
569
|
-
if (Math.abs(t) < qe) return;
|
|
570
|
-
g.current = !0;
|
|
571
|
-
}
|
|
572
|
-
let n = $, r = We - $ - 20, i = v.current.originX + t;
|
|
573
|
-
y.set(Math.max(n, Math.min(r, i)));
|
|
574
|
-
}, [y]), O = (0, U.useCallback)((e) => {
|
|
575
|
-
v.current &&= (h(!1), g.current && (_.current = !0, g.current = !1, e && (y.get() > 14 / 2 === t ? Y(y, t ? 16 : $, i ?? A.moderate) : n()), requestAnimationFrame(() => {
|
|
576
|
-
_.current = !1;
|
|
577
|
-
})), null);
|
|
578
|
-
}, [
|
|
579
|
-
t,
|
|
580
|
-
n,
|
|
581
|
-
y,
|
|
582
|
-
i
|
|
583
|
-
]);
|
|
584
|
-
return /* @__PURE__ */ (0, X.jsxs)("div", {
|
|
585
|
-
ref: l,
|
|
586
|
-
className: F("relative z-10 flex items-center gap-2.5 px-3 py-2 cursor-pointer select-none touch-none", r && "opacity-50 pointer-events-none", s),
|
|
587
|
-
onPointerEnter: (e) => {
|
|
588
|
-
e.pointerType === "mouse" && p(!0);
|
|
589
|
-
},
|
|
590
|
-
onPointerLeave: () => p(!1),
|
|
591
|
-
onPointerDown: E,
|
|
592
|
-
onPointerMove: D,
|
|
593
|
-
onPointerUp: () => O(!0),
|
|
594
|
-
onPointerCancel: () => {
|
|
595
|
-
v.current &&= (h(!1), g.current && (g.current = !1, Y(y, t ? 16 : $, i ?? A.moderate)), null);
|
|
596
|
-
},
|
|
597
|
-
onClick: () => {
|
|
598
|
-
r || _.current || n();
|
|
599
|
-
},
|
|
600
|
-
...c,
|
|
601
|
-
children: [/* @__PURE__ */ (0, X.jsx)(Ue, {
|
|
602
|
-
checked: t,
|
|
603
|
-
"aria-labelledby": u,
|
|
604
|
-
onCheckedChange: () => {
|
|
605
|
-
_.current || n();
|
|
606
|
-
},
|
|
607
|
-
disabled: r,
|
|
608
|
-
tabIndex: 0,
|
|
609
|
-
className: F("relative shrink-0 rounded-full outline-none cursor-pointer", "transition-colors duration-80", "focus-visible:ring-1 focus-visible:ring-[color:var(--focus-ring,#6B97FF)] focus-visible:ring-offset-2 focus-visible:ring-offset-background"),
|
|
610
|
-
style: {
|
|
611
|
-
width: We,
|
|
612
|
-
height: Ge,
|
|
613
|
-
backgroundColor: t ? f ? "color-mix(in oklab, var(--primary) 88%, black)" : "var(--primary)" : f ? o ?? "color-mix(in oklab, var(--accent), rgb(var(--overlay)) 10%)" : a ?? "var(--accent)"
|
|
614
|
-
},
|
|
615
|
-
onClick: (e) => e.stopPropagation(),
|
|
616
|
-
children: /* @__PURE__ */ (0, X.jsx)(Z, { render: (e) => {
|
|
617
|
-
let { style: t, onDrag: n, onDragStart: r, onDragEnd: a, onAnimationStart: o, onAnimationEnd: s, onAnimationIteration: c, ...l } = e;
|
|
618
|
-
return /* @__PURE__ */ (0, X.jsx)(C.span, {
|
|
619
|
-
...l,
|
|
620
|
-
className: "absolute top-0 left-0 block rounded-full bg-white shadow-sm",
|
|
621
|
-
initial: !1,
|
|
622
|
-
style: {
|
|
623
|
-
...t,
|
|
624
|
-
x: y
|
|
625
|
-
},
|
|
626
|
-
animate: {
|
|
627
|
-
y: S,
|
|
628
|
-
width: b,
|
|
629
|
-
height: x
|
|
630
|
-
},
|
|
631
|
-
transition: d.current ? i ?? A.moderate : { duration: 0 }
|
|
632
|
-
});
|
|
633
|
-
} })
|
|
634
|
-
}), /* @__PURE__ */ (0, X.jsx)("span", {
|
|
635
|
-
id: u,
|
|
636
|
-
className: F("text-[13px] [text-box:trim-both_cap_alphabetic] transition-[color] duration-80", t ? "text-foreground" : "text-muted-foreground"),
|
|
637
|
-
children: e
|
|
638
|
-
})]
|
|
639
|
-
});
|
|
640
|
-
});
|
|
641
|
-
Ye.displayName = "FluidSwitch";
|
|
642
|
-
var Xe = (0, U.forwardRef)(({ checked: e, defaultChecked: t = !1, onCheckedChange: n, disabled: r = !1, className: i }, a) => {
|
|
643
|
-
let [o, s] = (0, U.useState)(t), c = e ?? o;
|
|
644
|
-
return /* @__PURE__ */ (0, X.jsx)(Ue, {
|
|
645
|
-
ref: a,
|
|
646
|
-
checked: c,
|
|
647
|
-
disabled: r,
|
|
648
|
-
onCheckedChange: (t) => {
|
|
649
|
-
e === void 0 && s(t), n?.(t);
|
|
650
|
-
},
|
|
651
|
-
className: F("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-xs transition-colors duration-80", "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[color:var(--focus-ring,#6B97FF)]", "disabled:cursor-not-allowed disabled:opacity-50", "data-checked:bg-primary data-unchecked:bg-input", i),
|
|
652
|
-
children: /* @__PURE__ */ (0, X.jsx)(Z, { className: F("pointer-events-none block size-4 rounded-full bg-background shadow-sm ring-0 transition-transform duration-80", "data-checked:translate-x-4 data-unchecked:translate-x-0") })
|
|
653
|
-
});
|
|
654
|
-
});
|
|
655
|
-
Xe.displayName = "ShadcnSwitch";
|
|
656
|
-
var Ze = (0, U.forwardRef)((e, t) => Je(e) ? /* @__PURE__ */ (0, X.jsx)(Ye, {
|
|
657
|
-
ref: t,
|
|
658
|
-
...e
|
|
659
|
-
}) : /* @__PURE__ */ (0, X.jsx)(Xe, {
|
|
660
|
-
ref: t,
|
|
661
|
-
...e
|
|
662
|
-
}));
|
|
663
|
-
Ze.displayName = "Switch";
|
|
664
|
-
//#endregion
|
|
665
|
-
export { Ze as t };
|