@aiquants/menu-bar 1.18.2 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +159 -30
- package/dist/MenuBar.d.ts +2 -29
- package/dist/components/SessionInfo.d.ts +1 -26
- package/dist/contents/MenuContent.d.ts +3 -14
- package/dist/contents/MenuList.d.ts +3 -38
- package/dist/contents/OverlayShadow.d.ts +1 -20
- package/dist/elements/MenuSwitch.d.ts +8 -22
- package/dist/events/pinEvent.d.ts +2 -37
- package/dist/hooks/useMenuPinState.d.ts +1 -16
- package/dist/index.d.ts +11 -21
- package/dist/index.es.js +478 -475
- package/dist/index.umd.js +2 -2
- package/dist/styles/menu-bar.css +1 -1
- package/dist/styles/menu-bar.standalone.css +1 -1
- package/dist/types/user.d.ts +0 -7
- package/dist/types.d.ts +1 -15
- package/package.json +8 -6
- package/dist/__tests__/pinEvent.test.d.ts +0 -1
- package/src/MenuBar.tsx +0 -248
- package/src/__tests__/pinEvent.test.tsx +0 -68
- package/src/components/SessionInfo.tsx +0 -95
- package/src/contents/MenuContent.tsx +0 -79
- package/src/contents/MenuList.tsx +0 -400
- package/src/contents/OverlayShadow.tsx +0 -30
- package/src/elements/MenuSwitch.tsx +0 -134
- package/src/events/pinEvent.ts +0 -129
- package/src/hooks/useMenuPinState.ts +0 -58
- package/src/index.ts +0 -29
- package/src/lucide-icons.d.ts +0 -6
- package/src/styles/components.entry.css +0 -11
- package/src/styles/menu-bar.css +0 -224
- package/src/styles/standalone.entry.css +0 -12
- package/src/types/user.ts +0 -12
- package/src/types.ts +0 -24
package/dist/index.es.js
CHANGED
|
@@ -1,149 +1,149 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useLocation as
|
|
3
|
-
var
|
|
4
|
-
var
|
|
1
|
+
import _e, { forwardRef as be, createElement as ae, useCallback as N, useSyncExternalStore as Se, useMemo as ie, useState as B, useRef as L, useEffect as W, useLayoutEffect as xe } from "react";
|
|
2
|
+
import { useLocation as Pe, Link as ve } from "react-router-dom";
|
|
3
|
+
var J = { exports: {} }, H = {};
|
|
4
|
+
var le;
|
|
5
5
|
function Ce() {
|
|
6
|
-
if (
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
function s
|
|
6
|
+
if (le) return H;
|
|
7
|
+
le = 1;
|
|
8
|
+
var t = /* @__PURE__ */ Symbol.for("react.transitional.element"), n = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
9
|
+
function a(s, l, o) {
|
|
10
10
|
var u = null;
|
|
11
11
|
if (o !== void 0 && (u = "" + o), l.key !== void 0 && (u = "" + l.key), "key" in l) {
|
|
12
12
|
o = {};
|
|
13
|
-
for (var
|
|
14
|
-
|
|
13
|
+
for (var d in l)
|
|
14
|
+
d !== "key" && (o[d] = l[d]);
|
|
15
15
|
} else o = l;
|
|
16
16
|
return l = o.ref, {
|
|
17
|
-
$$typeof:
|
|
18
|
-
type:
|
|
17
|
+
$$typeof: t,
|
|
18
|
+
type: s,
|
|
19
19
|
key: u,
|
|
20
20
|
ref: l !== void 0 ? l : null,
|
|
21
21
|
props: o
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return H.Fragment = n, H.jsx = a, H.jsxs = a, H;
|
|
25
25
|
}
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
return
|
|
30
|
-
function
|
|
26
|
+
var V = {};
|
|
27
|
+
var ce;
|
|
28
|
+
function Te() {
|
|
29
|
+
return ce || (ce = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
30
|
+
function t(e) {
|
|
31
31
|
if (e == null) return null;
|
|
32
32
|
if (typeof e == "function")
|
|
33
|
-
return e.$$typeof ===
|
|
33
|
+
return e.$$typeof === F ? null : e.displayName || e.name || null;
|
|
34
34
|
if (typeof e == "string") return e;
|
|
35
35
|
switch (e) {
|
|
36
|
-
case
|
|
36
|
+
case c:
|
|
37
37
|
return "Fragment";
|
|
38
|
-
case
|
|
38
|
+
case S:
|
|
39
39
|
return "Profiler";
|
|
40
|
-
case
|
|
40
|
+
case p:
|
|
41
41
|
return "StrictMode";
|
|
42
|
-
case
|
|
42
|
+
case $:
|
|
43
43
|
return "Suspense";
|
|
44
|
-
case
|
|
44
|
+
case Q:
|
|
45
45
|
return "SuspenseList";
|
|
46
|
-
case
|
|
46
|
+
case z:
|
|
47
47
|
return "Activity";
|
|
48
48
|
}
|
|
49
49
|
if (typeof e == "object")
|
|
50
50
|
switch (typeof e.tag == "number" && console.error(
|
|
51
51
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
52
52
|
), e.$$typeof) {
|
|
53
|
-
case
|
|
53
|
+
case A:
|
|
54
54
|
return "Portal";
|
|
55
|
-
case
|
|
55
|
+
case P:
|
|
56
56
|
return e.displayName || "Context";
|
|
57
|
-
case
|
|
57
|
+
case w:
|
|
58
58
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
59
|
-
case
|
|
60
|
-
var
|
|
61
|
-
return e = e.displayName, e || (e =
|
|
62
|
-
case
|
|
63
|
-
return
|
|
59
|
+
case I:
|
|
60
|
+
var i = e.render;
|
|
61
|
+
return e = e.displayName, e || (e = i.displayName || i.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
62
|
+
case X:
|
|
63
|
+
return i = e.displayName || null, i !== null ? i : t(e.type) || "Memo";
|
|
64
64
|
case D:
|
|
65
|
-
|
|
65
|
+
i = e._payload, e = e._init;
|
|
66
66
|
try {
|
|
67
|
-
return
|
|
67
|
+
return t(e(i));
|
|
68
68
|
} catch {
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
return null;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function n(e) {
|
|
74
74
|
return "" + e;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function a(e) {
|
|
77
77
|
try {
|
|
78
|
-
|
|
79
|
-
var
|
|
78
|
+
n(e);
|
|
79
|
+
var i = !1;
|
|
80
80
|
} catch {
|
|
81
|
-
|
|
81
|
+
i = !0;
|
|
82
82
|
}
|
|
83
|
-
if (
|
|
84
|
-
|
|
85
|
-
var
|
|
86
|
-
return
|
|
87
|
-
|
|
83
|
+
if (i) {
|
|
84
|
+
i = console;
|
|
85
|
+
var f = i.error, b = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
86
|
+
return f.call(
|
|
87
|
+
i,
|
|
88
88
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
89
|
-
|
|
90
|
-
),
|
|
89
|
+
b
|
|
90
|
+
), n(e);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
if (e ===
|
|
93
|
+
function s(e) {
|
|
94
|
+
if (e === c) return "<>";
|
|
95
95
|
if (typeof e == "object" && e !== null && e.$$typeof === D)
|
|
96
96
|
return "<...>";
|
|
97
97
|
try {
|
|
98
|
-
var
|
|
99
|
-
return
|
|
98
|
+
var i = t(e);
|
|
99
|
+
return i ? "<" + i + ">" : "<...>";
|
|
100
100
|
} catch {
|
|
101
101
|
return "<...>";
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
function l() {
|
|
105
|
-
var e =
|
|
105
|
+
var e = O.A;
|
|
106
106
|
return e === null ? null : e.getOwner();
|
|
107
107
|
}
|
|
108
108
|
function o() {
|
|
109
109
|
return Error("react-stack-top-frame");
|
|
110
110
|
}
|
|
111
111
|
function u(e) {
|
|
112
|
-
if (
|
|
113
|
-
var
|
|
114
|
-
if (
|
|
112
|
+
if (R.call(e, "key")) {
|
|
113
|
+
var i = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
114
|
+
if (i && i.isReactWarning) return !1;
|
|
115
115
|
}
|
|
116
116
|
return e.key !== void 0;
|
|
117
117
|
}
|
|
118
|
-
function
|
|
119
|
-
function
|
|
120
|
-
|
|
118
|
+
function d(e, i) {
|
|
119
|
+
function f() {
|
|
120
|
+
U || (U = !0, console.error(
|
|
121
121
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
122
|
-
|
|
122
|
+
i
|
|
123
123
|
));
|
|
124
124
|
}
|
|
125
|
-
|
|
126
|
-
get:
|
|
125
|
+
f.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
126
|
+
get: f,
|
|
127
127
|
configurable: !0
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
var e =
|
|
132
|
-
return
|
|
130
|
+
function h() {
|
|
131
|
+
var e = t(this.type);
|
|
132
|
+
return G[e] || (G[e] = !0, console.error(
|
|
133
133
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
134
134
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
var
|
|
136
|
+
function v(e, i, f, b, Z, ee) {
|
|
137
|
+
var x = f.ref;
|
|
138
138
|
return e = {
|
|
139
|
-
$$typeof:
|
|
139
|
+
$$typeof: C,
|
|
140
140
|
type: e,
|
|
141
|
-
key:
|
|
142
|
-
props:
|
|
143
|
-
_owner:
|
|
144
|
-
}, (
|
|
141
|
+
key: i,
|
|
142
|
+
props: f,
|
|
143
|
+
_owner: b
|
|
144
|
+
}, (x !== void 0 ? x : null) !== null ? Object.defineProperty(e, "ref", {
|
|
145
145
|
enumerable: !1,
|
|
146
|
-
get:
|
|
146
|
+
get: h
|
|
147
147
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
148
148
|
configurable: !1,
|
|
149
149
|
enumerable: !1,
|
|
@@ -158,7 +158,7 @@ function Pe() {
|
|
|
158
158
|
configurable: !1,
|
|
159
159
|
enumerable: !1,
|
|
160
160
|
writable: !0,
|
|
161
|
-
value:
|
|
161
|
+
value: Z
|
|
162
162
|
}), Object.defineProperty(e, "_debugTask", {
|
|
163
163
|
configurable: !1,
|
|
164
164
|
enumerable: !1,
|
|
@@ -166,112 +166,112 @@ function Pe() {
|
|
|
166
166
|
value: ee
|
|
167
167
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
168
168
|
}
|
|
169
|
-
function
|
|
170
|
-
var
|
|
171
|
-
if (
|
|
172
|
-
if (
|
|
173
|
-
if (K(
|
|
174
|
-
for (
|
|
175
|
-
|
|
176
|
-
Object.freeze && Object.freeze(
|
|
169
|
+
function y(e, i, f, b, Z, ee) {
|
|
170
|
+
var x = i.children;
|
|
171
|
+
if (x !== void 0)
|
|
172
|
+
if (b)
|
|
173
|
+
if (K(x)) {
|
|
174
|
+
for (b = 0; b < x.length; b++)
|
|
175
|
+
j(x[b]);
|
|
176
|
+
Object.freeze && Object.freeze(x);
|
|
177
177
|
} else
|
|
178
178
|
console.error(
|
|
179
179
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
180
180
|
);
|
|
181
|
-
else
|
|
182
|
-
if (
|
|
183
|
-
|
|
184
|
-
var q = Object.keys(
|
|
185
|
-
return
|
|
181
|
+
else j(x);
|
|
182
|
+
if (R.call(i, "key")) {
|
|
183
|
+
x = t(e);
|
|
184
|
+
var q = Object.keys(i).filter(function(Ee) {
|
|
185
|
+
return Ee !== "key";
|
|
186
186
|
});
|
|
187
|
-
|
|
187
|
+
b = 0 < q.length ? "{key: someKey, " + q.join(": ..., ") + ": ...}" : "{key: someKey}", m[x + b] || (q = 0 < q.length ? "{" + q.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
188
188
|
`A props object containing a "key" prop is being spread into JSX:
|
|
189
189
|
let props = %s;
|
|
190
190
|
<%s {...props} />
|
|
191
191
|
React keys must be passed directly to JSX without using spread:
|
|
192
192
|
let props = %s;
|
|
193
193
|
<%s key={someKey} {...props} />`,
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
b,
|
|
195
|
+
x,
|
|
196
196
|
q,
|
|
197
|
-
|
|
198
|
-
),
|
|
197
|
+
x
|
|
198
|
+
), m[x + b] = !0);
|
|
199
199
|
}
|
|
200
|
-
if (
|
|
201
|
-
|
|
202
|
-
for (var te in
|
|
203
|
-
te !== "key" && (
|
|
204
|
-
} else
|
|
205
|
-
return
|
|
206
|
-
|
|
200
|
+
if (x = null, f !== void 0 && (a(f), x = "" + f), u(i) && (a(i.key), x = "" + i.key), "key" in i) {
|
|
201
|
+
f = {};
|
|
202
|
+
for (var te in i)
|
|
203
|
+
te !== "key" && (f[te] = i[te]);
|
|
204
|
+
} else f = i;
|
|
205
|
+
return x && d(
|
|
206
|
+
f,
|
|
207
207
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
208
|
-
),
|
|
208
|
+
), v(
|
|
209
209
|
e,
|
|
210
|
-
|
|
211
|
-
|
|
210
|
+
x,
|
|
211
|
+
f,
|
|
212
212
|
l(),
|
|
213
|
-
|
|
213
|
+
Z,
|
|
214
214
|
ee
|
|
215
215
|
);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
218
|
-
|
|
217
|
+
function j(e) {
|
|
218
|
+
k(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === D && (e._payload.status === "fulfilled" ? k(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
220
|
+
function k(e) {
|
|
221
|
+
return typeof e == "object" && e !== null && e.$$typeof === C;
|
|
222
222
|
}
|
|
223
|
-
var
|
|
223
|
+
var E = _e, C = /* @__PURE__ */ Symbol.for("react.transitional.element"), A = /* @__PURE__ */ Symbol.for("react.portal"), c = /* @__PURE__ */ Symbol.for("react.fragment"), p = /* @__PURE__ */ Symbol.for("react.strict_mode"), S = /* @__PURE__ */ Symbol.for("react.profiler"), w = /* @__PURE__ */ Symbol.for("react.consumer"), P = /* @__PURE__ */ Symbol.for("react.context"), I = /* @__PURE__ */ Symbol.for("react.forward_ref"), $ = /* @__PURE__ */ Symbol.for("react.suspense"), Q = /* @__PURE__ */ Symbol.for("react.suspense_list"), X = /* @__PURE__ */ Symbol.for("react.memo"), D = /* @__PURE__ */ Symbol.for("react.lazy"), z = /* @__PURE__ */ Symbol.for("react.activity"), F = /* @__PURE__ */ Symbol.for("react.client.reference"), O = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, R = Object.prototype.hasOwnProperty, K = Array.isArray, T = console.createTask ? console.createTask : function() {
|
|
224
224
|
return null;
|
|
225
225
|
};
|
|
226
|
-
|
|
226
|
+
E = {
|
|
227
227
|
react_stack_bottom_frame: function(e) {
|
|
228
228
|
return e();
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
|
-
var
|
|
232
|
-
|
|
231
|
+
var U, G = {}, M = E.react_stack_bottom_frame.bind(
|
|
232
|
+
E,
|
|
233
233
|
o
|
|
234
|
-
)(),
|
|
235
|
-
|
|
236
|
-
var
|
|
237
|
-
return
|
|
234
|
+
)(), Y = T(s(o)), m = {};
|
|
235
|
+
V.Fragment = c, V.jsx = function(e, i, f) {
|
|
236
|
+
var b = 1e4 > O.recentlyCreatedOwnerStacks++;
|
|
237
|
+
return y(
|
|
238
238
|
e,
|
|
239
|
-
|
|
240
|
-
|
|
239
|
+
i,
|
|
240
|
+
f,
|
|
241
241
|
!1,
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
b ? Error("react-stack-top-frame") : M,
|
|
243
|
+
b ? T(s(e)) : Y
|
|
244
244
|
);
|
|
245
|
-
},
|
|
246
|
-
var
|
|
247
|
-
return
|
|
245
|
+
}, V.jsxs = function(e, i, f) {
|
|
246
|
+
var b = 1e4 > O.recentlyCreatedOwnerStacks++;
|
|
247
|
+
return y(
|
|
248
248
|
e,
|
|
249
|
-
|
|
250
|
-
|
|
249
|
+
i,
|
|
250
|
+
f,
|
|
251
251
|
!0,
|
|
252
|
-
|
|
253
|
-
|
|
252
|
+
b ? Error("react-stack-top-frame") : M,
|
|
253
|
+
b ? T(s(e)) : Y
|
|
254
254
|
);
|
|
255
255
|
};
|
|
256
|
-
})()),
|
|
256
|
+
})()), V;
|
|
257
257
|
}
|
|
258
|
-
var
|
|
259
|
-
function
|
|
260
|
-
return
|
|
258
|
+
var ue;
|
|
259
|
+
function Re() {
|
|
260
|
+
return ue || (ue = 1, process.env.NODE_ENV === "production" ? J.exports = Ce() : J.exports = Te()), J.exports;
|
|
261
261
|
}
|
|
262
|
-
var r =
|
|
263
|
-
const
|
|
262
|
+
var r = Re();
|
|
263
|
+
const Me = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Ae = (t) => t.replace(
|
|
264
264
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
265
|
-
(
|
|
266
|
-
),
|
|
267
|
-
const
|
|
268
|
-
return
|
|
269
|
-
},
|
|
270
|
-
for (const
|
|
271
|
-
if (
|
|
265
|
+
(n, a, s) => s ? s.toUpperCase() : a.toLowerCase()
|
|
266
|
+
), de = (t) => {
|
|
267
|
+
const n = Ae(t);
|
|
268
|
+
return n.charAt(0).toUpperCase() + n.slice(1);
|
|
269
|
+
}, ge = (...t) => t.filter((n, a, s) => !!n && n.trim() !== "" && s.indexOf(n) === a).join(" ").trim(), Ie = (t) => {
|
|
270
|
+
for (const n in t)
|
|
271
|
+
if (n.startsWith("aria-") || n === "role" || n === "title")
|
|
272
272
|
return !0;
|
|
273
273
|
};
|
|
274
|
-
var
|
|
274
|
+
var Oe = {
|
|
275
275
|
xmlns: "http://www.w3.org/2000/svg",
|
|
276
276
|
width: 24,
|
|
277
277
|
height: 24,
|
|
@@ -282,74 +282,74 @@ var Ae = {
|
|
|
282
282
|
strokeLinecap: "round",
|
|
283
283
|
strokeLinejoin: "round"
|
|
284
284
|
};
|
|
285
|
-
const
|
|
285
|
+
const qe = be(
|
|
286
286
|
({
|
|
287
|
-
color:
|
|
288
|
-
size:
|
|
289
|
-
strokeWidth:
|
|
290
|
-
absoluteStrokeWidth:
|
|
287
|
+
color: t = "currentColor",
|
|
288
|
+
size: n = 24,
|
|
289
|
+
strokeWidth: a = 2,
|
|
290
|
+
absoluteStrokeWidth: s,
|
|
291
291
|
className: l = "",
|
|
292
292
|
children: o,
|
|
293
293
|
iconNode: u,
|
|
294
|
-
...
|
|
295
|
-
},
|
|
294
|
+
...d
|
|
295
|
+
}, h) => ae(
|
|
296
296
|
"svg",
|
|
297
297
|
{
|
|
298
|
-
ref:
|
|
299
|
-
...
|
|
300
|
-
width:
|
|
301
|
-
height:
|
|
302
|
-
stroke:
|
|
303
|
-
strokeWidth:
|
|
304
|
-
className:
|
|
305
|
-
...!o && !
|
|
306
|
-
...
|
|
298
|
+
ref: h,
|
|
299
|
+
...Oe,
|
|
300
|
+
width: n,
|
|
301
|
+
height: n,
|
|
302
|
+
stroke: t,
|
|
303
|
+
strokeWidth: s ? Number(a) * 24 / Number(n) : a,
|
|
304
|
+
className: ge("lucide", l),
|
|
305
|
+
...!o && !Ie(d) && { "aria-hidden": "true" },
|
|
306
|
+
...d
|
|
307
307
|
},
|
|
308
308
|
[
|
|
309
|
-
...u.map(([
|
|
309
|
+
...u.map(([v, y]) => ae(v, y)),
|
|
310
310
|
...Array.isArray(o) ? o : [o]
|
|
311
311
|
]
|
|
312
312
|
)
|
|
313
313
|
);
|
|
314
|
-
const
|
|
315
|
-
const
|
|
316
|
-
({ className:
|
|
314
|
+
const _ = (t, n) => {
|
|
315
|
+
const a = be(
|
|
316
|
+
({ className: s, ...l }, o) => ae(qe, {
|
|
317
317
|
ref: o,
|
|
318
|
-
iconNode:
|
|
319
|
-
className:
|
|
320
|
-
`lucide-${
|
|
321
|
-
`lucide-${
|
|
322
|
-
|
|
318
|
+
iconNode: n,
|
|
319
|
+
className: ge(
|
|
320
|
+
`lucide-${Me(de(t))}`,
|
|
321
|
+
`lucide-${t}`,
|
|
322
|
+
s
|
|
323
323
|
),
|
|
324
324
|
...l
|
|
325
325
|
})
|
|
326
326
|
);
|
|
327
|
-
return
|
|
327
|
+
return a.displayName = de(t), a;
|
|
328
328
|
};
|
|
329
329
|
const Le = [
|
|
330
330
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
331
331
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
332
332
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
333
|
-
],
|
|
334
|
-
const
|
|
333
|
+
], $e = _("external-link", Le);
|
|
334
|
+
const De = [
|
|
335
335
|
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
336
336
|
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
337
|
-
], ze =
|
|
338
|
-
const { user:
|
|
339
|
-
return /* @__PURE__ */ r.jsx("div", { className: "w-full", children:
|
|
337
|
+
], ze = _("user", De), Ye = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iI2NiZDVlMSI+PHBhdGggZD0iTTEyIDEyYzIuMjEgMCA0LTEuNzkgNC00cy0xLjc5LTQtNC00LTQgMS43OS00IDQgMS43OSA0IDQgNHptMCAyYy0yLjY3IDAtOCAxLjM0LTggNHYyaDE2di0yYzAtMi42Ni01LjMzLTQtOC00eiIvPjwvc3ZnPg==", He = ({ to: t, className: n, children: a }) => /* @__PURE__ */ r.jsx("a", { href: t, className: n, children: a }), xt = (t) => {
|
|
338
|
+
const { user: n, LinkComponent: a = He } = t;
|
|
339
|
+
return /* @__PURE__ */ r.jsx("div", { className: "w-full", children: n ? /* @__PURE__ */ r.jsxs("div", { className: "aiquants-session-card group relative flex flex-col gap-2 rounded-xl border border-white/20 bg-white/10 p-2.5 shadow-sm backdrop-blur-md transition-all duration-200 hover:border-white/30 hover:bg-white/15 dark:border-slate-700/60 dark:bg-slate-800/60 dark:hover:border-slate-600/80 dark:hover:bg-slate-800/90", children: [
|
|
340
340
|
/* @__PURE__ */ r.jsxs("div", { className: "flex min-w-0 items-center gap-2.5", children: [
|
|
341
341
|
/* @__PURE__ */ r.jsxs("div", { className: "relative shrink-0", children: [
|
|
342
|
-
/* @__PURE__ */ r.jsx("div", { className: "h-8 w-8 overflow-hidden rounded-full border border-white/40 shadow-xs dark:border-slate-500", children: /* @__PURE__ */ r.jsx("img", { className: "h-full w-full rounded-full object-cover", src:
|
|
342
|
+
/* @__PURE__ */ r.jsx("div", { className: "h-8 w-8 overflow-hidden rounded-full border border-white/40 shadow-xs dark:border-slate-500", children: /* @__PURE__ */ r.jsx("img", { className: "h-full w-full rounded-full object-cover", src: n.photo || Ye, alt: n.displayName || "user profile" }) }),
|
|
343
343
|
/* @__PURE__ */ r.jsx("span", { className: "absolute -right-0.5 -bottom-0.5 h-2.5 w-2.5 rounded-full border-2 border-slate-900 bg-emerald-400", title: "Online" })
|
|
344
344
|
] }),
|
|
345
345
|
/* @__PURE__ */ r.jsxs("div", { className: "min-w-0 flex-1 leading-tight", children: [
|
|
346
|
-
/* @__PURE__ */ r.jsx("div", { className: "truncate font-semibold text-white text-xs tracking-tight dark:text-slate-100", title:
|
|
346
|
+
/* @__PURE__ */ r.jsx("div", { className: "truncate font-semibold text-white text-xs tracking-tight dark:text-slate-100", title: n.displayName, children: n.displayName }),
|
|
347
347
|
/* @__PURE__ */ r.jsx("div", { className: "mt-0.5 font-medium text-[10px] text-white/75 tracking-tight dark:text-slate-400", children: "Google Account" })
|
|
348
348
|
] })
|
|
349
349
|
] }),
|
|
350
350
|
/* @__PURE__ */ r.jsxs("div", { className: "grid grid-cols-2 gap-1.5 border-white/15 border-t pt-1.5 dark:border-slate-700/50", children: [
|
|
351
351
|
/* @__PURE__ */ r.jsxs(
|
|
352
|
-
|
|
352
|
+
a,
|
|
353
353
|
{
|
|
354
354
|
className: "flex items-center justify-center gap-1 rounded-md border border-white/15 bg-white/10 px-2 py-1 font-medium text-[11px] text-white transition-all duration-150 hover:bg-white/25 active:scale-95 dark:border-slate-600/50 dark:bg-slate-700/50 dark:text-slate-200 dark:hover:bg-slate-600/80",
|
|
355
355
|
to: "/",
|
|
@@ -360,12 +360,12 @@ const $e = [
|
|
|
360
360
|
}
|
|
361
361
|
),
|
|
362
362
|
/* @__PURE__ */ r.jsxs(
|
|
363
|
-
|
|
363
|
+
a,
|
|
364
364
|
{
|
|
365
365
|
className: "flex items-center justify-center gap-1 rounded-md border border-white/15 bg-white/10 px-2 py-1 font-medium text-[11px] text-white transition-all duration-150 hover:bg-white/25 active:scale-95 dark:border-slate-600/50 dark:bg-slate-700/50 dark:text-slate-200 dark:hover:bg-slate-600/80",
|
|
366
366
|
to: "https://myaccount.google.com/",
|
|
367
367
|
children: [
|
|
368
|
-
/* @__PURE__ */ r.jsx(
|
|
368
|
+
/* @__PURE__ */ r.jsx($e, { size: 11, className: "shrink-0 opacity-80" }),
|
|
369
369
|
/* @__PURE__ */ r.jsx("span", { className: "truncate", children: "Google" })
|
|
370
370
|
]
|
|
371
371
|
}
|
|
@@ -373,71 +373,71 @@ const $e = [
|
|
|
373
373
|
] })
|
|
374
374
|
] }) : /* @__PURE__ */ r.jsx("div", { className: "aiquants-session-card flex items-center justify-between rounded-xl border border-white/20 bg-white/10 p-2.5 shadow-xs dark:border-slate-700/60 dark:bg-slate-800/60", children: /* @__PURE__ */ r.jsx("span", { className: "font-medium text-white/90 text-xs dark:text-slate-200", children: "ログインしてください" }) }) });
|
|
375
375
|
}, se = "aiquants-menu-pin-change";
|
|
376
|
-
let
|
|
377
|
-
const
|
|
376
|
+
let g = { pinned: !1, width: 0, active: !1 };
|
|
377
|
+
const we = (t = 240) => {
|
|
378
378
|
if (typeof window > "u" || typeof document > "u")
|
|
379
|
-
return { pinned: !1, width: 0 };
|
|
379
|
+
return { pinned: !1, width: 0, active: !1 };
|
|
380
380
|
try {
|
|
381
|
-
const
|
|
382
|
-
if (
|
|
383
|
-
const
|
|
384
|
-
if (!Number.isNaN(
|
|
385
|
-
const
|
|
386
|
-
return
|
|
381
|
+
const n = getComputedStyle(document.documentElement).getPropertyValue("--aiquants-menu-pinned-width").trim();
|
|
382
|
+
if (n) {
|
|
383
|
+
const u = Number.parseInt(n, 10);
|
|
384
|
+
if (!Number.isNaN(u)) {
|
|
385
|
+
const d = u > 0, h = d ? u || t : 0, v = g.active ?? d;
|
|
386
|
+
return g.pinned === d && g.width === h && g.active === v || (g = { pinned: d, width: h, active: v }), g;
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
|
-
const
|
|
390
|
-
return
|
|
389
|
+
const s = localStorage.getItem("aiquants-menu-pinned") === "true", l = s ? t : 0, o = g.active ?? s;
|
|
390
|
+
return g.pinned === s && g.width === l && g.active === o || (g = { pinned: s, width: l, active: o }), g;
|
|
391
391
|
} catch {
|
|
392
|
-
return { pinned: !1, width: 0 };
|
|
392
|
+
return { pinned: !1, width: 0, active: !1 };
|
|
393
393
|
}
|
|
394
|
-
},
|
|
394
|
+
}, fe = (t, n, a) => {
|
|
395
395
|
if (typeof window > "u") return;
|
|
396
|
-
const s = { pinned:
|
|
397
|
-
(
|
|
398
|
-
const
|
|
399
|
-
detail:
|
|
396
|
+
const s = a ?? t, l = { pinned: t, width: n, active: s };
|
|
397
|
+
(g.pinned !== t || g.width !== n || g.active !== s) && (g = l);
|
|
398
|
+
const o = new CustomEvent(se, {
|
|
399
|
+
detail: l,
|
|
400
400
|
bubbles: !0,
|
|
401
401
|
cancelable: !1
|
|
402
402
|
});
|
|
403
|
-
window.dispatchEvent(
|
|
404
|
-
},
|
|
403
|
+
window.dispatchEvent(o);
|
|
404
|
+
}, Ve = (t, n) => {
|
|
405
405
|
if (typeof window > "u")
|
|
406
406
|
return () => {
|
|
407
407
|
};
|
|
408
|
-
const { immediate:
|
|
409
|
-
if (
|
|
410
|
-
const o =
|
|
411
|
-
|
|
408
|
+
const { immediate: a = !0, defaultPinnedWidth: s = 240 } = n ?? {};
|
|
409
|
+
if (a) {
|
|
410
|
+
const o = we(s);
|
|
411
|
+
t(o);
|
|
412
412
|
}
|
|
413
413
|
const l = (o) => {
|
|
414
414
|
const u = o;
|
|
415
|
-
u.detail &&
|
|
415
|
+
u.detail && t(u.detail);
|
|
416
416
|
};
|
|
417
417
|
return window.addEventListener(se, l, { passive: !0 }), () => {
|
|
418
418
|
window.removeEventListener(se, l);
|
|
419
419
|
};
|
|
420
|
-
},
|
|
421
|
-
const
|
|
422
|
-
(u) =>
|
|
420
|
+
}, vt = (t) => {
|
|
421
|
+
const n = t?.defaultPinnedWidth ?? 240, a = t?.initialPinned ?? !1, s = N(
|
|
422
|
+
(u) => Ve(
|
|
423
423
|
() => {
|
|
424
424
|
u();
|
|
425
425
|
},
|
|
426
|
-
{ immediate: !1, defaultPinnedWidth:
|
|
426
|
+
{ immediate: !1, defaultPinnedWidth: n }
|
|
427
427
|
),
|
|
428
|
-
[
|
|
429
|
-
), l =
|
|
430
|
-
pinned:
|
|
431
|
-
width:
|
|
432
|
-
}), [
|
|
433
|
-
return
|
|
428
|
+
[n]
|
|
429
|
+
), l = N(() => we(n), [n]), o = N(() => ({
|
|
430
|
+
pinned: a,
|
|
431
|
+
width: a ? n : 0
|
|
432
|
+
}), [a, n]);
|
|
433
|
+
return Se(s, l, o);
|
|
434
434
|
};
|
|
435
|
-
const
|
|
435
|
+
const We = [
|
|
436
436
|
["path", { d: "m16 17 5-5-5-5", key: "1bji2h" }],
|
|
437
437
|
["path", { d: "M21 12H9", key: "dn1m92" }],
|
|
438
438
|
["path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4", key: "1uf3rs" }]
|
|
439
|
-
],
|
|
440
|
-
const
|
|
439
|
+
], Fe = _("log-out", We);
|
|
440
|
+
const Ue = [
|
|
441
441
|
["path", { d: "M12 17v5", key: "bb1du9" }],
|
|
442
442
|
[
|
|
443
443
|
"path",
|
|
@@ -446,8 +446,8 @@ const Fe = [
|
|
|
446
446
|
key: "1nkz8b"
|
|
447
447
|
}
|
|
448
448
|
]
|
|
449
|
-
], ke =
|
|
450
|
-
const
|
|
449
|
+
], ke = _("pin", Ue);
|
|
450
|
+
const Ge = [
|
|
451
451
|
["path", { d: "M12 17v5", key: "bb1du9" }],
|
|
452
452
|
["path", { d: "M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89", key: "znwnzq" }],
|
|
453
453
|
["path", { d: "m2 2 20 20", key: "1ooewy" }],
|
|
@@ -458,18 +458,18 @@ const Ue = [
|
|
|
458
458
|
key: "c9qhm2"
|
|
459
459
|
}
|
|
460
460
|
]
|
|
461
|
-
],
|
|
462
|
-
const
|
|
461
|
+
], ye = _("pin-off", Ge);
|
|
462
|
+
const Ze = [
|
|
463
463
|
["path", { d: "M5 21v-6", key: "1hz6c0" }],
|
|
464
464
|
["path", { d: "M12 21V9", key: "uvy0l4" }],
|
|
465
465
|
["path", { d: "M19 21V3", key: "11j9sm" }]
|
|
466
|
-
],
|
|
467
|
-
const
|
|
466
|
+
], Je = _("chart-no-axes-column-increasing", Ze);
|
|
467
|
+
const Be = [
|
|
468
468
|
["path", { d: "M12 15V3", key: "m9g1x1" }],
|
|
469
469
|
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
470
470
|
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
471
|
-
],
|
|
472
|
-
const
|
|
471
|
+
], Qe = _("download", Be);
|
|
472
|
+
const Xe = [
|
|
473
473
|
[
|
|
474
474
|
"path",
|
|
475
475
|
{
|
|
@@ -481,368 +481,371 @@ const Qe = [
|
|
|
481
481
|
["path", { d: "M10 9H8", key: "b1mrlr" }],
|
|
482
482
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
483
483
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
484
|
-
],
|
|
485
|
-
const
|
|
484
|
+
], he = _("file-text", Xe);
|
|
485
|
+
const Ke = [
|
|
486
486
|
["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", key: "1cjeqo" }],
|
|
487
487
|
["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }]
|
|
488
|
-
],
|
|
489
|
-
const
|
|
488
|
+
], et = _("link", Ke);
|
|
489
|
+
const tt = [
|
|
490
490
|
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
491
491
|
["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
|
|
492
|
-
],
|
|
493
|
-
const
|
|
492
|
+
], nt = _("lock", tt);
|
|
493
|
+
const rt = [
|
|
494
494
|
["path", { d: "M12 3v18", key: "108xh3" }],
|
|
495
495
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
496
496
|
["path", { d: "M3 9h18", key: "1pudct" }],
|
|
497
497
|
["path", { d: "M3 15h18", key: "5xshup" }]
|
|
498
|
-
],
|
|
499
|
-
report:
|
|
500
|
-
slip:
|
|
501
|
-
table:
|
|
502
|
-
chart:
|
|
503
|
-
download:
|
|
504
|
-
lock:
|
|
505
|
-
href:
|
|
506
|
-
},
|
|
507
|
-
const
|
|
508
|
-
return
|
|
509
|
-
/* @__PURE__ */ r.jsx(
|
|
510
|
-
/* @__PURE__ */ r.jsx("div", { className: "aiquants-menu-link mx-1 hover:underline", children:
|
|
511
|
-
] }) : /* @__PURE__ */ r.jsx("span", { className: "mx-1 text-sky-600 hover:underline dark:text-sky-400", children:
|
|
512
|
-
},
|
|
498
|
+
], at = _("table", rt), st = typeof window < "u" ? xe : W, me = "aiquants-menu-scroll", je = new RegExp(/(^https?:\/\/)|(\.(html|htm)?$)/), ot = {
|
|
499
|
+
report: he,
|
|
500
|
+
slip: he,
|
|
501
|
+
table: at,
|
|
502
|
+
chart: Je,
|
|
503
|
+
download: Qe,
|
|
504
|
+
lock: nt,
|
|
505
|
+
href: et
|
|
506
|
+
}, it = ({ mark: t, children: n }) => {
|
|
507
|
+
const a = t ? ot[t] : void 0;
|
|
508
|
+
return a ? /* @__PURE__ */ r.jsxs("div", { className: "flex flex-nowrap items-center", children: [
|
|
509
|
+
/* @__PURE__ */ r.jsx(a, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
510
|
+
/* @__PURE__ */ r.jsx("div", { className: "aiquants-menu-link mx-1 hover:underline", children: n })
|
|
511
|
+
] }) : /* @__PURE__ */ r.jsx("span", { className: "mx-1 text-sky-600 hover:underline dark:text-sky-400", children: n });
|
|
512
|
+
}, oe = (t, n) => n ? {
|
|
513
513
|
menu: {
|
|
514
|
-
id:
|
|
515
|
-
title:
|
|
516
|
-
href:
|
|
514
|
+
id: t.id,
|
|
515
|
+
title: t.title,
|
|
516
|
+
href: t.href
|
|
517
517
|
},
|
|
518
518
|
submenu: {
|
|
519
|
-
subid:
|
|
520
|
-
title:
|
|
521
|
-
href:
|
|
522
|
-
mark:
|
|
523
|
-
new:
|
|
519
|
+
subid: n.subid,
|
|
520
|
+
title: n.title,
|
|
521
|
+
href: n.href,
|
|
522
|
+
mark: n.mark,
|
|
523
|
+
new: n.new
|
|
524
524
|
}
|
|
525
525
|
} : {
|
|
526
526
|
menu: {
|
|
527
|
-
id:
|
|
528
|
-
title:
|
|
529
|
-
href:
|
|
527
|
+
id: t.id,
|
|
528
|
+
title: t.title,
|
|
529
|
+
href: t.href
|
|
530
530
|
}
|
|
531
|
-
},
|
|
532
|
-
if (
|
|
531
|
+
}, lt = ({ item: t, parentMenu: n, isCurrent: a, onMenuSelected: s }) => {
|
|
532
|
+
if (t.href === "separator")
|
|
533
533
|
return /* @__PURE__ */ r.jsx("hr", { className: "aiquants-menu-separator mx-2 my-1 h-px" });
|
|
534
|
-
const
|
|
534
|
+
const l = /* @__PURE__ */ r.jsx(it, { mark: t.mark, children: t.title }), o = {
|
|
535
|
+
"aria-current": a ? "page" : void 0,
|
|
535
536
|
onClick: () => {
|
|
536
|
-
s && s(
|
|
537
|
+
s && s(oe(n, t));
|
|
537
538
|
}
|
|
538
539
|
};
|
|
539
|
-
return
|
|
540
|
-
},
|
|
541
|
-
const s =
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
540
|
+
return t.new ? /* @__PURE__ */ r.jsx("a", { href: t.href, rel: "noopener noreferrer", target: "_blank", ...o, children: l }) : je.test(t.href) ? /* @__PURE__ */ r.jsx("a", { href: t.href, ...o, children: l }) : /* @__PURE__ */ r.jsx(ve, { to: t.href, ...o, children: l });
|
|
541
|
+
}, Ne = (t) => t ? t.split(/[?#]/)[0].replace(/(?!^\/)\/$/, "") : "", pe = (t, n, a) => {
|
|
542
|
+
const s = Ne(t);
|
|
543
|
+
return s === "" ? -1 : s === a || n === "prefix" && s !== "/" && a.startsWith(`${s}/`) ? s.length : -1;
|
|
544
|
+
}, ct = (t, n) => {
|
|
545
|
+
const a = Ne(n);
|
|
546
|
+
let s = null, l = -1;
|
|
547
|
+
for (const o of t) {
|
|
548
|
+
const u = pe(o.href, o.match, a);
|
|
549
|
+
if (u > l && (s = { menuId: o.id, subid: null }, l = u), o.submenu)
|
|
550
|
+
for (const d of o.submenu) {
|
|
551
|
+
const h = pe(d.href, d.match, a);
|
|
552
|
+
h > l && (s = { menuId: o.id, subid: d.subid }, l = h);
|
|
553
|
+
}
|
|
550
554
|
}
|
|
551
|
-
return
|
|
552
|
-
},
|
|
553
|
-
const { menuList:
|
|
555
|
+
return s;
|
|
556
|
+
}, ne = (t, n, a) => t !== null && t.menuId === n && t.subid === a, ut = (t) => {
|
|
557
|
+
const { menuList: n, onMenuSelected: a, pinnedSubmenuIds: s = [], onToggleSubmenuPin: l } = t;
|
|
554
558
|
let o = "";
|
|
555
559
|
try {
|
|
556
|
-
o =
|
|
560
|
+
o = Pe().pathname;
|
|
557
561
|
} catch {
|
|
558
562
|
typeof window < "u" && (o = window.location.pathname);
|
|
559
563
|
}
|
|
560
|
-
const u =
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
const w = E(
|
|
568
|
-
(i) => {
|
|
569
|
-
a.includes(i) || y((P) => P === i ? null : i);
|
|
564
|
+
const u = ie(() => ct(n, o), [n, o]), d = u === null ? null : u.menuId, [h, v] = B(d), y = L(o), j = L(d !== null);
|
|
565
|
+
W(() => {
|
|
566
|
+
y.current !== o && (y.current = o, j.current = !1), !j.current && d !== null && (v(d), j.current = !0);
|
|
567
|
+
}, [o, d]);
|
|
568
|
+
const k = N(
|
|
569
|
+
(c) => {
|
|
570
|
+
s.includes(c) || v((S) => S === c ? null : c);
|
|
570
571
|
},
|
|
571
|
-
[
|
|
572
|
-
),
|
|
572
|
+
[s]
|
|
573
|
+
), E = L(null);
|
|
573
574
|
st(() => {
|
|
574
|
-
const
|
|
575
|
-
if (
|
|
575
|
+
const c = E.current;
|
|
576
|
+
if (c)
|
|
576
577
|
try {
|
|
577
|
-
const
|
|
578
|
-
if (
|
|
579
|
-
const
|
|
580
|
-
Number.isNaN(
|
|
578
|
+
const p = sessionStorage.getItem(me);
|
|
579
|
+
if (p !== null) {
|
|
580
|
+
const S = Number.parseFloat(p);
|
|
581
|
+
Number.isNaN(S) || (c.scrollTop = S);
|
|
581
582
|
}
|
|
582
583
|
} catch {
|
|
583
584
|
}
|
|
584
585
|
}, []);
|
|
585
|
-
const
|
|
586
|
-
const
|
|
587
|
-
if (
|
|
586
|
+
const C = N(() => {
|
|
587
|
+
const c = E.current;
|
|
588
|
+
if (c)
|
|
588
589
|
try {
|
|
589
|
-
sessionStorage.setItem(
|
|
590
|
+
sessionStorage.setItem(me, String(c.scrollTop));
|
|
590
591
|
} catch {
|
|
591
592
|
}
|
|
592
|
-
}, []),
|
|
593
|
+
}, []), A = ie(() => /* @__PURE__ */ r.jsx(r.Fragment, { children: n.map((c) => /* @__PURE__ */ r.jsx("div", { children: c.href ? /* @__PURE__ */ r.jsx("div", { className: "aiquants-menu-list-item relative mb-0.5 ml-1 flex items-center rounded-l-xl px-2.5 py-1 text-xs before:mr-2 before:inline-block before:h-2 before:w-2 before:shrink-0 before:rounded-full before:content-[''] sm:text-sm", children: je.test(c.href) ? /* @__PURE__ */ r.jsx(
|
|
593
594
|
"a",
|
|
594
595
|
{
|
|
595
|
-
href:
|
|
596
|
+
href: c.href,
|
|
597
|
+
"aria-current": ne(u, c.id, null) ? "page" : void 0,
|
|
596
598
|
onClick: () => {
|
|
597
|
-
|
|
599
|
+
a && a(oe(c));
|
|
598
600
|
},
|
|
599
|
-
children: /* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-link hover:underline", children:
|
|
601
|
+
children: /* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-link hover:underline", children: c.title })
|
|
600
602
|
}
|
|
601
603
|
) : /* @__PURE__ */ r.jsx(
|
|
602
|
-
|
|
604
|
+
ve,
|
|
603
605
|
{
|
|
604
|
-
to:
|
|
606
|
+
to: c.href,
|
|
607
|
+
"aria-current": ne(u, c.id, null) ? "page" : void 0,
|
|
605
608
|
onClick: () => {
|
|
606
|
-
|
|
609
|
+
a && a(oe(c));
|
|
607
610
|
},
|
|
608
|
-
children: /* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-link hover:underline", children:
|
|
611
|
+
children: /* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-link hover:underline", children: c.title })
|
|
609
612
|
}
|
|
610
|
-
) }) : /* @__PURE__ */ r.jsxs("details", { className: "aiquants-menu-accordion-details", open:
|
|
613
|
+
) }) : /* @__PURE__ */ r.jsxs("details", { className: "aiquants-menu-accordion-details", open: c.id === h || s.includes(c.id), children: [
|
|
611
614
|
/* @__PURE__ */ r.jsxs(
|
|
612
615
|
"summary",
|
|
613
616
|
{
|
|
614
|
-
className: "aiquants-menu-list-item aiquants-menu-accordion-summary relative mb-0.5 ml-1 list-none rounded-l-xl px-2.5 py-1 text-xs
|
|
615
|
-
onClick: (
|
|
616
|
-
|
|
617
|
+
className: "aiquants-menu-list-item aiquants-menu-accordion-summary relative mb-0.5 ml-1 list-none rounded-l-xl px-2.5 py-1 text-xs before:mr-2 before:inline-block before:h-2 before:w-2 before:shrink-0 before:rounded-full before:content-[''] focus-visible:outline-2 focus-visible:outline-current focus-visible:-outline-offset-2 sm:text-sm",
|
|
618
|
+
onClick: (p) => {
|
|
619
|
+
p.preventDefault(), k(c.id);
|
|
617
620
|
},
|
|
618
|
-
onKeyDown: (
|
|
619
|
-
(
|
|
621
|
+
onKeyDown: (p) => {
|
|
622
|
+
(p.key === "Enter" || p.key === " ") && (p.preventDefault(), k(c.id));
|
|
620
623
|
},
|
|
621
624
|
children: [
|
|
622
|
-
/* @__PURE__ */ r.jsx("span", { children:
|
|
625
|
+
/* @__PURE__ */ r.jsx("span", { children: c.title }),
|
|
623
626
|
/* @__PURE__ */ r.jsx(
|
|
624
627
|
"button",
|
|
625
628
|
{
|
|
626
629
|
type: "button",
|
|
627
|
-
|
|
628
|
-
|
|
630
|
+
"data-aqmb-submenu-pin-button": !0,
|
|
631
|
+
onClick: (p) => {
|
|
632
|
+
p.stopPropagation(), p.preventDefault(), l && l(c.id);
|
|
629
633
|
},
|
|
630
|
-
className: `aiquants-submenu-pin-button ${
|
|
631
|
-
title:
|
|
632
|
-
children:
|
|
634
|
+
className: `aiquants-submenu-pin-button ${s.includes(c.id) ? "pinned" : ""}`,
|
|
635
|
+
title: s.includes(c.id) ? "ピン留め解除" : "ピン留め",
|
|
636
|
+
children: s.includes(c.id) ? /* @__PURE__ */ r.jsx(ke, { size: 13 }) : /* @__PURE__ */ r.jsx(ye, { size: 13 })
|
|
633
637
|
}
|
|
634
638
|
)
|
|
635
639
|
]
|
|
636
640
|
}
|
|
637
641
|
),
|
|
638
|
-
/* @__PURE__ */ r.jsx("div", { className: "aiquants-menu-submenu pointer-events-auto my-0.5 mr-1 ml-3.5 rounded-lg px-2 py-1 shadow-sm", children:
|
|
639
|
-
] }) },
|
|
640
|
-
return /* @__PURE__ */ r.jsx("div", { ref:
|
|
641
|
-
},
|
|
642
|
-
const { menuList:
|
|
643
|
-
return /* @__PURE__ */ r.jsxs("div", { className: `aiquants-menu-content fixed top-0 right-0 z-2147483642 flex min-h-dvh w-[240px] select-none flex-col transition-transform duration-500 ${a ? "aiquants-menu-translate-x-0" : "aiquants-menu-translate-x-250"}`, children: [
|
|
644
|
-
/* @__PURE__ */ r.jsx("div", { className: "flex shrink-0 flex-col justify-center border-white/15 border-b px-2.5 py-2 dark:border-slate-700/60", children: s }),
|
|
645
|
-
/* @__PURE__ */ r.jsx("div", { className: "flex grow flex-col overflow-y-auto", children: /* @__PURE__ */ r.jsx(lt, { menuList: t, onMenuSelected: l, pinnedSubmenuIds: d, onToggleSubmenuPin: w }) }),
|
|
646
|
-
/* @__PURE__ */ r.jsx("div", { className: "border-white/15 border-t px-2.5 py-1.5 dark:border-slate-700/60", children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-center justify-between gap-1.5", children: [
|
|
647
|
-
/* @__PURE__ */ r.jsx(
|
|
648
|
-
"button",
|
|
649
|
-
{
|
|
650
|
-
type: "button",
|
|
651
|
-
onClick: k,
|
|
652
|
-
"data-aqmb-pin-button": !0,
|
|
653
|
-
className: `flex h-7 items-center justify-center rounded-md px-2 text-[11px] text-white shadow-2xs transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-amber-300/60 ${y ? "bg-amber-500 hover:bg-amber-600 dark:bg-amber-600 dark:hover:bg-amber-500" : "border border-white/20 bg-white/10 hover:bg-white/20 dark:border-slate-600/60 dark:bg-slate-700/60 dark:hover:bg-slate-600"}`,
|
|
654
|
-
title: y ? "ピン留め解除" : "ピン留め",
|
|
655
|
-
"aria-label": y ? "ピン留め解除" : "ピン留め",
|
|
656
|
-
children: y ? /* @__PURE__ */ r.jsx(ke, { size: 12 }) : /* @__PURE__ */ r.jsx(we, { size: 12 })
|
|
657
|
-
}
|
|
658
|
-
),
|
|
659
|
-
/* @__PURE__ */ r.jsx(
|
|
660
|
-
"button",
|
|
661
|
-
{
|
|
662
|
-
type: "button",
|
|
663
|
-
onClick: g,
|
|
664
|
-
"data-aqmb-theme-button": !0,
|
|
665
|
-
className: "group relative flex h-7 items-center justify-center rounded-md border border-white/20 bg-white/10 px-2 text-[11px] text-white shadow-2xs backdrop-blur-xs transition-all duration-200 hover:bg-white/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 dark:border-slate-600/60 dark:bg-slate-700/60 dark:hover:bg-slate-600",
|
|
666
|
-
title: u === "dark" ? "ライトモードに切り替え" : "ダークモードに切り替え",
|
|
667
|
-
"aria-label": u === "dark" ? "ライトモードに切り替え" : "ダークモードに切り替え",
|
|
668
|
-
children: /* @__PURE__ */ r.jsx("span", { className: "text-xs transition-transform duration-200 group-hover:scale-110", children: u === "dark" ? "🌞" : "🌙" })
|
|
669
|
-
}
|
|
670
|
-
),
|
|
671
|
-
/* @__PURE__ */ r.jsxs(
|
|
672
|
-
"button",
|
|
673
|
-
{
|
|
674
|
-
type: "button",
|
|
675
|
-
"data-aqmb-signout-button": !0,
|
|
676
|
-
className: "aiquants-signout-button flex h-7 flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-md bg-red-500/90 px-2.5 font-medium text-[11px] text-white shadow-2xs transition-colors duration-200 hover:bg-red-600 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-red-300/60 dark:bg-red-600/90 dark:hover:bg-red-500",
|
|
677
|
-
onClick: o,
|
|
678
|
-
children: [
|
|
679
|
-
/* @__PURE__ */ r.jsx(We, { size: 11, className: "shrink-0" }),
|
|
680
|
-
/* @__PURE__ */ r.jsx("span", { children: "サインアウト" })
|
|
681
|
-
]
|
|
682
|
-
}
|
|
683
|
-
)
|
|
684
|
-
] }) })
|
|
685
|
-
] });
|
|
686
|
-
}, ut = (n) => {
|
|
687
|
-
const { isOverlay: t, onOverlayClick: s } = n;
|
|
688
|
-
return /* @__PURE__ */ r.jsx("button", { type: "button", className: `fixed inset-0 z-2147483640 cursor-default bg-black/50 transition-opacity duration-500 ${t ? "opacity-100" : "pointer-events-none opacity-0"}`, onClick: s });
|
|
689
|
-
}, dt = (n) => {
|
|
690
|
-
const { open: t, isOpen: s, onMenuOpen: a, onMenuClose: l, onToggle: o, theme: u = "light", className: g } = n, y = t ?? (s !== void 0 ? !s : !0), k = M(y), d = M(null), w = M(null), v = M(null), p = M(null), h = M(null), i = E(() => {
|
|
691
|
-
if (d.current && w.current && v.current && p.current && h.current) {
|
|
692
|
-
const b = u === "dark" ? "#fff" : "#000";
|
|
693
|
-
d.current.style.backgroundColor = b, d.current.style.width = "100%", d.current.style.height = "3px", d.current.style.transform = "none", w.current.style.opacity = "1", w.current.style.backgroundColor = b, v.current.style.opacity = "1", v.current.style.backgroundColor = b, p.current.style.backgroundColor = b, p.current.style.width = "100%", p.current.style.height = "3px", p.current.style.transform = "none", h.current.style.color = b, h.current.classList.remove("after:content-['close']"), h.current.classList.remove("after:ml-0.5"), h.current.classList.add("after:content-['menu']"), h.current.classList.add("after:-ml-0.5"), k.current = !0;
|
|
694
|
-
}
|
|
695
|
-
}, [u]), f = E(() => {
|
|
696
|
-
d.current && w.current && v.current && p.current && h.current && (d.current.style.backgroundColor = "#fff", d.current.style.width = "32px", d.current.style.height = "4px", d.current.style.transform = "translateY(9px) rotate(-45deg)", w.current.style.opacity = "0", v.current.style.opacity = "0", p.current.style.backgroundColor = "#fff", p.current.style.width = "32px", p.current.style.height = "4px", p.current.style.transform = "translateY(-9px) rotate(45deg)", h.current.style.color = "#fff", h.current.classList.remove("after:content-['menu']"), h.current.classList.remove("after:-ml-0.5"), h.current.classList.add("after:content-['close']"), h.current.classList.add("after:ml-0.5"), k.current = !1);
|
|
697
|
-
}, []);
|
|
698
|
-
$(() => {
|
|
699
|
-
y ? i() : f();
|
|
700
|
-
}, [y, i, f]);
|
|
701
|
-
const P = E(() => {
|
|
702
|
-
k.current ? (f(), a?.(), o?.(!0)) : (i(), l?.(), o?.(!1));
|
|
703
|
-
}, [f, i, a, l, o]), A = !y;
|
|
642
|
+
/* @__PURE__ */ r.jsx("div", { className: "aiquants-menu-submenu pointer-events-auto my-0.5 mr-1 ml-3.5 rounded-lg px-2 py-1 shadow-sm", children: c.submenu.map((p) => /* @__PURE__ */ r.jsx("div", { className: "aiquants-menu-accordion-container block w-full whitespace-nowrap py-0.5 text-xs", children: /* @__PURE__ */ r.jsx(lt, { item: p, parentMenu: c, isCurrent: ne(u, c.id, p.subid), onMenuSelected: a }) }, p.subid)) })
|
|
643
|
+
] }) }, c.id)) }), [n, a, h, k, s, u]);
|
|
644
|
+
return /* @__PURE__ */ r.jsx("div", { ref: E, onScroll: C, "data-aqmb-menu-list": !0, className: "hidden-scrollbar h-0 grow overflow-y-scroll", children: A });
|
|
645
|
+
}, dt = (t) => {
|
|
646
|
+
const { menuList: n, menuHeader: a, open: s, onMenuSelected: l, onClickSignout: o, theme: u, toggleTheme: d, isPinned: h, onTogglePin: v, pinnedSubmenuIds: y, onToggleSubmenuPin: j, ref: k } = t;
|
|
704
647
|
return /* @__PURE__ */ r.jsxs(
|
|
705
|
-
"
|
|
648
|
+
"div",
|
|
706
649
|
{
|
|
707
|
-
|
|
708
|
-
"data-aqmb-menu-
|
|
709
|
-
|
|
710
|
-
"
|
|
711
|
-
className: `aiquants-menu-switch z-[2147483647] inline-block h-[27px] w-[27px] cursor-pointer align-middle outline-hidden ${g || ""}`,
|
|
712
|
-
onClick: P,
|
|
650
|
+
ref: k,
|
|
651
|
+
"data-aqmb-menu-content": !0,
|
|
652
|
+
inert: !s,
|
|
653
|
+
className: `aiquants-menu-content fixed top-0 right-0 z-2147483642 flex min-h-dvh w-[240px] select-none flex-col motion-safe:transition-transform motion-safe:duration-500 ${s ? "aiquants-menu-translate-x-0" : "aiquants-menu-translate-x-250"}`,
|
|
713
654
|
children: [
|
|
714
|
-
/* @__PURE__ */ r.jsx("
|
|
715
|
-
/* @__PURE__ */ r.jsx("
|
|
716
|
-
/* @__PURE__ */ r.jsx("
|
|
717
|
-
|
|
718
|
-
|
|
655
|
+
/* @__PURE__ */ r.jsx("div", { className: "flex shrink-0 flex-col justify-center border-white/15 border-b px-2.5 py-2 dark:border-slate-700/60", children: a }),
|
|
656
|
+
/* @__PURE__ */ r.jsx("div", { className: "flex grow flex-col overflow-y-auto", children: /* @__PURE__ */ r.jsx(ut, { menuList: n, onMenuSelected: l, pinnedSubmenuIds: y, onToggleSubmenuPin: j }) }),
|
|
657
|
+
/* @__PURE__ */ r.jsx("div", { className: "border-white/15 border-t px-2.5 py-1.5 dark:border-slate-700/60", children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-center justify-between gap-1.5", children: [
|
|
658
|
+
/* @__PURE__ */ r.jsx(
|
|
659
|
+
"button",
|
|
660
|
+
{
|
|
661
|
+
type: "button",
|
|
662
|
+
onClick: v,
|
|
663
|
+
"data-aqmb-pin-button": !0,
|
|
664
|
+
className: `flex h-7 items-center justify-center rounded-md px-2 text-[11px] text-white shadow-2xs transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-amber-300/60 ${h ? "bg-amber-500 hover:bg-amber-600 dark:bg-amber-600 dark:hover:bg-amber-500" : "border border-white/20 bg-white/10 hover:bg-white/20 dark:border-slate-600/60 dark:bg-slate-700/60 dark:hover:bg-slate-600"}`,
|
|
665
|
+
title: h ? "ピン留め解除" : "ピン留め",
|
|
666
|
+
"aria-label": h ? "ピン留め解除" : "ピン留め",
|
|
667
|
+
children: h ? /* @__PURE__ */ r.jsx(ke, { size: 12 }) : /* @__PURE__ */ r.jsx(ye, { size: 12 })
|
|
668
|
+
}
|
|
669
|
+
),
|
|
670
|
+
/* @__PURE__ */ r.jsx(
|
|
671
|
+
"button",
|
|
672
|
+
{
|
|
673
|
+
type: "button",
|
|
674
|
+
onClick: d,
|
|
675
|
+
"data-aqmb-theme-button": !0,
|
|
676
|
+
className: "group relative flex h-7 items-center justify-center rounded-md border border-white/20 bg-white/10 px-2 text-[11px] text-white shadow-2xs backdrop-blur-xs transition-all duration-200 hover:bg-white/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 dark:border-slate-600/60 dark:bg-slate-700/60 dark:hover:bg-slate-600",
|
|
677
|
+
title: u === "dark" ? "ライトモードに切り替え" : "ダークモードに切り替え",
|
|
678
|
+
"aria-label": u === "dark" ? "ライトモードに切り替え" : "ダークモードに切り替え",
|
|
679
|
+
children: /* @__PURE__ */ r.jsx("span", { className: "text-xs transition-transform duration-200 group-hover:scale-110", children: u === "dark" ? "🌞" : "🌙" })
|
|
680
|
+
}
|
|
681
|
+
),
|
|
682
|
+
/* @__PURE__ */ r.jsxs(
|
|
683
|
+
"button",
|
|
684
|
+
{
|
|
685
|
+
type: "button",
|
|
686
|
+
"data-aqmb-signout-button": !0,
|
|
687
|
+
className: "aiquants-signout-button flex h-7 flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-md bg-red-500/90 px-2.5 font-medium text-[11px] text-white shadow-2xs transition-colors duration-200 hover:bg-red-600 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-red-300/60 dark:bg-red-600/90 dark:hover:bg-red-500",
|
|
688
|
+
onClick: o,
|
|
689
|
+
children: [
|
|
690
|
+
/* @__PURE__ */ r.jsx(Fe, { size: 11, className: "shrink-0" }),
|
|
691
|
+
/* @__PURE__ */ r.jsx("span", { children: "サインアウト" })
|
|
692
|
+
]
|
|
693
|
+
}
|
|
694
|
+
)
|
|
695
|
+
] }) })
|
|
719
696
|
]
|
|
720
697
|
}
|
|
721
698
|
);
|
|
722
|
-
},
|
|
699
|
+
}, ft = (t) => {
|
|
700
|
+
t.preventDefault();
|
|
701
|
+
}, ht = (t) => {
|
|
702
|
+
const { isOverlay: n, onOverlayClick: a } = t;
|
|
703
|
+
return /* @__PURE__ */ r.jsx(
|
|
704
|
+
"div",
|
|
705
|
+
{
|
|
706
|
+
"aria-hidden": "true",
|
|
707
|
+
"data-aqmb-menu-overlay": !0,
|
|
708
|
+
inert: !n,
|
|
709
|
+
className: `fixed inset-0 z-2147483640 bg-black/50 motion-safe:transition-opacity motion-safe:duration-500 ${n ? "opacity-100" : "pointer-events-none opacity-0"}`,
|
|
710
|
+
onMouseDown: ft,
|
|
711
|
+
onClick: a
|
|
712
|
+
}
|
|
713
|
+
);
|
|
714
|
+
}, mt = ({ isMenuOpen: t, onMenuOpen: n, onMenuClose: a, ref: s }) => /* @__PURE__ */ r.jsxs("button", { ref: s, type: "button", "data-aqmb-menu-switch": "true", "aria-label": t ? "Close menu" : "Open menu", "aria-expanded": t, className: "aiquants-menu-switch", onClick: t ? a : n, children: [
|
|
715
|
+
/* @__PURE__ */ r.jsxs("span", { className: "aiquants-menu-switch-bars", children: [
|
|
716
|
+
/* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-switch-bar" }),
|
|
717
|
+
/* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-switch-bar" }),
|
|
718
|
+
/* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-switch-bar" }),
|
|
719
|
+
/* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-switch-bar" })
|
|
720
|
+
] }),
|
|
721
|
+
/* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-switch-caption", "aria-hidden": "true", children: t ? "close" : "menu" })
|
|
722
|
+
] }), re = typeof window < "u" ? xe : W, gt = (t) => {
|
|
723
723
|
const {
|
|
724
|
-
menuList:
|
|
725
|
-
menuHeader:
|
|
726
|
-
onClickSignout:
|
|
724
|
+
menuList: n,
|
|
725
|
+
menuHeader: a,
|
|
726
|
+
onClickSignout: s,
|
|
727
727
|
isMenuhide: l,
|
|
728
728
|
isMenuHide: o,
|
|
729
729
|
theme: u,
|
|
730
|
-
toggleTheme:
|
|
731
|
-
onMenuNavigate:
|
|
732
|
-
isPinned:
|
|
733
|
-
pinnedWidth:
|
|
734
|
-
onPinChange:
|
|
735
|
-
pinnedSubmenuIds:
|
|
736
|
-
initialPinnedSubmenuIds:
|
|
737
|
-
onSubmenuPinChange:
|
|
738
|
-
closeOnEscape:
|
|
739
|
-
} =
|
|
730
|
+
toggleTheme: d,
|
|
731
|
+
onMenuNavigate: h,
|
|
732
|
+
isPinned: v,
|
|
733
|
+
pinnedWidth: y = 240,
|
|
734
|
+
onPinChange: j,
|
|
735
|
+
pinnedSubmenuIds: k,
|
|
736
|
+
initialPinnedSubmenuIds: E,
|
|
737
|
+
onSubmenuPinChange: C,
|
|
738
|
+
closeOnEscape: A = "auto"
|
|
739
|
+
} = t, c = o ?? l ?? !1, [p, S] = B(() => {
|
|
740
740
|
try {
|
|
741
741
|
return localStorage.getItem("aiquants-menu-pinned") === "true";
|
|
742
742
|
} catch {
|
|
743
743
|
return !1;
|
|
744
744
|
}
|
|
745
|
-
}),
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
}, [
|
|
749
|
-
const [
|
|
750
|
-
if (
|
|
751
|
-
return
|
|
745
|
+
}), w = v !== void 0 ? v : p, [P, I] = B(w);
|
|
746
|
+
W(() => {
|
|
747
|
+
w && I(!0);
|
|
748
|
+
}, [w]);
|
|
749
|
+
const [$, Q] = B(() => {
|
|
750
|
+
if (E)
|
|
751
|
+
return E;
|
|
752
752
|
try {
|
|
753
|
-
const
|
|
754
|
-
if (
|
|
755
|
-
const
|
|
756
|
-
if (Array.isArray(
|
|
757
|
-
return
|
|
753
|
+
const m = localStorage.getItem("aiquants-submenu-pinned");
|
|
754
|
+
if (m) {
|
|
755
|
+
const e = JSON.parse(m);
|
|
756
|
+
if (Array.isArray(e))
|
|
757
|
+
return e.filter((i) => typeof i == "number");
|
|
758
758
|
}
|
|
759
759
|
} catch {
|
|
760
760
|
}
|
|
761
761
|
return [];
|
|
762
|
-
}),
|
|
763
|
-
(
|
|
764
|
-
const
|
|
765
|
-
if (
|
|
766
|
-
|
|
762
|
+
}), X = k !== void 0 ? k : $, D = N(
|
|
763
|
+
(m) => {
|
|
764
|
+
const e = k !== void 0 ? k : $, i = e.includes(m) ? e.filter((f) => f !== m) : [...e, m];
|
|
765
|
+
if (k === void 0) {
|
|
766
|
+
Q(i);
|
|
767
767
|
try {
|
|
768
|
-
localStorage.setItem("aiquants-submenu-pinned", JSON.stringify(
|
|
768
|
+
localStorage.setItem("aiquants-submenu-pinned", JSON.stringify(i));
|
|
769
769
|
} catch {
|
|
770
770
|
}
|
|
771
771
|
}
|
|
772
|
-
|
|
772
|
+
C && C(i);
|
|
773
773
|
},
|
|
774
|
-
[
|
|
775
|
-
),
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
}, [
|
|
779
|
-
const
|
|
780
|
-
document.documentElement.style.setProperty("--aiquants-menu-pinned-width",
|
|
781
|
-
}, [
|
|
782
|
-
document.documentElement.style.setProperty("--aiquants-menu-pinned-width", "0px"),
|
|
774
|
+
[k, $, C]
|
|
775
|
+
), z = L(j);
|
|
776
|
+
re(() => {
|
|
777
|
+
z.current = j;
|
|
778
|
+
}, [j]), re(() => {
|
|
779
|
+
const m = w ? y : 0, e = `${m}px`;
|
|
780
|
+
document.documentElement.style.setProperty("--aiquants-menu-pinned-width", e), fe(w, m, P || w);
|
|
781
|
+
}, [w, y, P]), re(() => () => {
|
|
782
|
+
document.documentElement.style.setProperty("--aiquants-menu-pinned-width", "0px"), fe(!1, 0);
|
|
783
783
|
}, []);
|
|
784
|
-
const
|
|
785
|
-
|
|
786
|
-
}, []),
|
|
787
|
-
|
|
788
|
-
|
|
784
|
+
const F = L(null), O = L(null), R = N(() => {
|
|
785
|
+
O.current?.contains(document.activeElement) && F.current?.focus();
|
|
786
|
+
}, []), K = N(() => {
|
|
787
|
+
I(!0);
|
|
788
|
+
}, []), T = N(() => {
|
|
789
|
+
if (R(), I(!1), v === void 0) {
|
|
790
|
+
S(!1);
|
|
789
791
|
try {
|
|
790
792
|
localStorage.removeItem("aiquants-menu-pinned");
|
|
791
793
|
} catch {
|
|
792
794
|
}
|
|
793
795
|
}
|
|
794
|
-
|
|
795
|
-
}, [
|
|
796
|
-
const
|
|
797
|
-
if (
|
|
798
|
-
|
|
796
|
+
z.current?.(!1, 0);
|
|
797
|
+
}, [v, R]), U = N(() => {
|
|
798
|
+
const m = !w, e = m ? y : 0;
|
|
799
|
+
if (v === void 0) {
|
|
800
|
+
S(m);
|
|
799
801
|
try {
|
|
800
|
-
|
|
802
|
+
m ? localStorage.setItem("aiquants-menu-pinned", "true") : localStorage.removeItem("aiquants-menu-pinned");
|
|
801
803
|
} catch {
|
|
802
804
|
}
|
|
803
805
|
}
|
|
804
|
-
|
|
805
|
-
}, [
|
|
806
|
-
(
|
|
807
|
-
|
|
806
|
+
z.current?.(m, e);
|
|
807
|
+
}, [w, v, y]), G = N(
|
|
808
|
+
(m) => {
|
|
809
|
+
h && h(m), w || (R(), I(!1));
|
|
808
810
|
},
|
|
809
|
-
[
|
|
810
|
-
),
|
|
811
|
-
(
|
|
812
|
-
|
|
811
|
+
[h, w, R]
|
|
812
|
+
), M = N(
|
|
813
|
+
(m) => {
|
|
814
|
+
m.key === "Escape" && T();
|
|
813
815
|
},
|
|
814
816
|
[T]
|
|
815
|
-
),
|
|
816
|
-
return
|
|
817
|
-
window.removeEventListener("keydown",
|
|
818
|
-
}), [
|
|
819
|
-
/* @__PURE__ */ r.jsx(
|
|
817
|
+
), Y = A === !0 || A === "auto" && !w;
|
|
818
|
+
return W(() => (P && Y ? window.addEventListener("keydown", M) : window.removeEventListener("keydown", M), () => {
|
|
819
|
+
window.removeEventListener("keydown", M);
|
|
820
|
+
}), [P, Y, M]), c ? null : /* @__PURE__ */ r.jsxs("div", { className: `aiquants-menu-bar ${u}`, children: [
|
|
821
|
+
/* @__PURE__ */ r.jsx(mt, { ref: F, isMenuOpen: P, onMenuOpen: K, onMenuClose: T }),
|
|
820
822
|
/* @__PURE__ */ r.jsx(
|
|
821
|
-
|
|
823
|
+
dt,
|
|
822
824
|
{
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
825
|
+
ref: O,
|
|
826
|
+
menuList: n,
|
|
827
|
+
menuHeader: a,
|
|
828
|
+
onClickSignout: s,
|
|
829
|
+
onMenuSelected: G,
|
|
830
|
+
open: P,
|
|
828
831
|
theme: u,
|
|
829
|
-
toggleTheme:
|
|
830
|
-
isPinned:
|
|
831
|
-
onTogglePin:
|
|
832
|
-
pinnedSubmenuIds:
|
|
832
|
+
toggleTheme: d,
|
|
833
|
+
isPinned: w,
|
|
834
|
+
onTogglePin: U,
|
|
835
|
+
pinnedSubmenuIds: X,
|
|
833
836
|
onToggleSubmenuPin: D
|
|
834
837
|
}
|
|
835
838
|
),
|
|
836
|
-
/* @__PURE__ */ r.jsx(
|
|
839
|
+
/* @__PURE__ */ r.jsx(ht, { isOverlay: P && !w, onOverlayClick: T })
|
|
837
840
|
] });
|
|
838
841
|
};
|
|
839
842
|
export {
|
|
840
|
-
|
|
843
|
+
He as DefaultLink,
|
|
841
844
|
se as MENU_PIN_CHANGE_EVENT,
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
845
|
+
gt as MenuBar,
|
|
846
|
+
xt as SessionInfo,
|
|
847
|
+
fe as dispatchMenuPinChange,
|
|
848
|
+
we as getInitialPinState,
|
|
849
|
+
Ve as subscribeMenuPinChange,
|
|
850
|
+
vt as useMenuPinState
|
|
848
851
|
};
|