@aiquants/menu-bar 1.23.0 → 1.25.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/CHANGELOG.md +110 -0
- package/README.md +126 -22
- package/dist/MenuBar.d.ts +3 -0
- package/dist/contents/MenuContent.d.ts +2 -0
- package/dist/contents/TabBar.d.ts +32 -0
- package/dist/contents/menuEntries.d.ts +18 -0
- package/dist/hooks/useHydrated.d.ts +6 -0
- package/dist/hooks/useMediaQueryMatches.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +615 -515
- package/dist/index.umd.js +2 -2
- package/dist/storage/pinStorage.d.ts +6 -0
- package/dist/styles/menu-bar.css +1 -1
- package/dist/styles/menu-bar.standalone.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,277 +1,277 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useLocation as
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
if (
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
function a(s,
|
|
10
|
-
var
|
|
11
|
-
if (
|
|
12
|
-
|
|
13
|
-
for (var d in
|
|
14
|
-
d !== "key" && (
|
|
15
|
-
} else
|
|
16
|
-
return
|
|
17
|
-
$$typeof:
|
|
1
|
+
import We, { forwardRef as Oe, createElement as be, useCallback as _, useSyncExternalStore as xe, useMemo as U, useState as le, useRef as C, useEffect as ee, useLayoutEffect as Ie, useId as Ue } from "react";
|
|
2
|
+
import { useLocation as Ge, Link as ye } from "react-router-dom";
|
|
3
|
+
var oe = { exports: {} }, Q = {};
|
|
4
|
+
var ke;
|
|
5
|
+
function Je() {
|
|
6
|
+
if (ke) return Q;
|
|
7
|
+
ke = 1;
|
|
8
|
+
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
9
|
+
function a(s, o, i) {
|
|
10
|
+
var c = null;
|
|
11
|
+
if (i !== void 0 && (c = "" + i), o.key !== void 0 && (c = "" + o.key), "key" in o) {
|
|
12
|
+
i = {};
|
|
13
|
+
for (var d in o)
|
|
14
|
+
d !== "key" && (i[d] = o[d]);
|
|
15
|
+
} else i = o;
|
|
16
|
+
return o = i.ref, {
|
|
17
|
+
$$typeof: e,
|
|
18
18
|
type: s,
|
|
19
|
-
key:
|
|
20
|
-
ref:
|
|
21
|
-
props:
|
|
19
|
+
key: c,
|
|
20
|
+
ref: o !== void 0 ? o : null,
|
|
21
|
+
props: i
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return Q.Fragment = t, Q.jsx = a, Q.jsxs = a, Q;
|
|
25
25
|
}
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
return
|
|
30
|
-
function
|
|
31
|
-
if (
|
|
32
|
-
if (typeof
|
|
33
|
-
return
|
|
34
|
-
if (typeof
|
|
35
|
-
switch (
|
|
36
|
-
case
|
|
26
|
+
var K = {};
|
|
27
|
+
var Ne;
|
|
28
|
+
function Ze() {
|
|
29
|
+
return Ne || (Ne = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
30
|
+
function e(n) {
|
|
31
|
+
if (n == null) return null;
|
|
32
|
+
if (typeof n == "function")
|
|
33
|
+
return n.$$typeof === M ? null : n.displayName || n.name || null;
|
|
34
|
+
if (typeof n == "string") return n;
|
|
35
|
+
switch (n) {
|
|
36
|
+
case u:
|
|
37
37
|
return "Fragment";
|
|
38
|
-
case
|
|
38
|
+
case P:
|
|
39
39
|
return "Profiler";
|
|
40
|
-
case
|
|
40
|
+
case v:
|
|
41
41
|
return "StrictMode";
|
|
42
|
-
case
|
|
42
|
+
case z:
|
|
43
43
|
return "Suspense";
|
|
44
|
-
case
|
|
44
|
+
case G:
|
|
45
45
|
return "SuspenseList";
|
|
46
|
-
case
|
|
46
|
+
case Z:
|
|
47
47
|
return "Activity";
|
|
48
48
|
}
|
|
49
|
-
if (typeof
|
|
50
|
-
switch (typeof
|
|
49
|
+
if (typeof n == "object")
|
|
50
|
+
switch (typeof n.tag == "number" && console.error(
|
|
51
51
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
52
|
-
),
|
|
53
|
-
case
|
|
52
|
+
), n.$$typeof) {
|
|
53
|
+
case L:
|
|
54
54
|
return "Portal";
|
|
55
|
-
case
|
|
56
|
-
return
|
|
57
|
-
case
|
|
58
|
-
return (
|
|
59
|
-
case
|
|
60
|
-
var
|
|
61
|
-
return
|
|
62
|
-
case
|
|
63
|
-
return
|
|
64
|
-
case
|
|
65
|
-
|
|
55
|
+
case te:
|
|
56
|
+
return n.displayName || "Context";
|
|
57
|
+
case me:
|
|
58
|
+
return (n._context.displayName || "Context") + ".Consumer";
|
|
59
|
+
case R:
|
|
60
|
+
var l = n.render;
|
|
61
|
+
return n = n.displayName, n || (n = l.displayName || l.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n;
|
|
62
|
+
case J:
|
|
63
|
+
return l = n.displayName || null, l !== null ? l : e(n.type) || "Memo";
|
|
64
|
+
case D:
|
|
65
|
+
l = n._payload, n = n._init;
|
|
66
66
|
try {
|
|
67
|
-
return
|
|
67
|
+
return e(n(l));
|
|
68
68
|
} catch {
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
return null;
|
|
72
72
|
}
|
|
73
|
-
function n
|
|
74
|
-
return "" +
|
|
73
|
+
function t(n) {
|
|
74
|
+
return "" + n;
|
|
75
75
|
}
|
|
76
|
-
function a(
|
|
76
|
+
function a(n) {
|
|
77
77
|
try {
|
|
78
|
-
n
|
|
79
|
-
var
|
|
78
|
+
t(n);
|
|
79
|
+
var l = !1;
|
|
80
80
|
} catch {
|
|
81
|
-
|
|
81
|
+
l = !0;
|
|
82
82
|
}
|
|
83
|
-
if (
|
|
84
|
-
|
|
85
|
-
var
|
|
86
|
-
return
|
|
87
|
-
|
|
83
|
+
if (l) {
|
|
84
|
+
l = console;
|
|
85
|
+
var m = l.error, f = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object";
|
|
86
|
+
return m.call(
|
|
87
|
+
l,
|
|
88
88
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
89
|
-
|
|
90
|
-
), n
|
|
89
|
+
f
|
|
90
|
+
), t(n);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
function s(
|
|
94
|
-
if (
|
|
95
|
-
if (typeof
|
|
93
|
+
function s(n) {
|
|
94
|
+
if (n === u) return "<>";
|
|
95
|
+
if (typeof n == "object" && n !== null && n.$$typeof === D)
|
|
96
96
|
return "<...>";
|
|
97
97
|
try {
|
|
98
|
-
var
|
|
99
|
-
return
|
|
98
|
+
var l = e(n);
|
|
99
|
+
return l ? "<" + l + ">" : "<...>";
|
|
100
100
|
} catch {
|
|
101
101
|
return "<...>";
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
function l() {
|
|
105
|
-
var e = O.A;
|
|
106
|
-
return e === null ? null : e.getOwner();
|
|
107
|
-
}
|
|
108
104
|
function o() {
|
|
105
|
+
var n = N.A;
|
|
106
|
+
return n === null ? null : n.getOwner();
|
|
107
|
+
}
|
|
108
|
+
function i() {
|
|
109
109
|
return Error("react-stack-top-frame");
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
if (
|
|
113
|
-
var
|
|
114
|
-
if (
|
|
111
|
+
function c(n) {
|
|
112
|
+
if (S.call(n, "key")) {
|
|
113
|
+
var l = Object.getOwnPropertyDescriptor(n, "key").get;
|
|
114
|
+
if (l && l.isReactWarning) return !1;
|
|
115
115
|
}
|
|
116
|
-
return
|
|
116
|
+
return n.key !== void 0;
|
|
117
117
|
}
|
|
118
|
-
function d(
|
|
119
|
-
function
|
|
120
|
-
|
|
118
|
+
function d(n, l) {
|
|
119
|
+
function m() {
|
|
120
|
+
ne || (ne = !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
|
+
l
|
|
123
123
|
));
|
|
124
124
|
}
|
|
125
|
-
|
|
126
|
-
get:
|
|
125
|
+
m.isReactWarning = !0, Object.defineProperty(n, "key", {
|
|
126
|
+
get: m,
|
|
127
127
|
configurable: !0
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
var
|
|
132
|
-
return
|
|
130
|
+
function x() {
|
|
131
|
+
var n = e(this.type);
|
|
132
|
+
return re[n] || (re[n] = !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
|
+
)), n = this.props.ref, n !== void 0 ? n : null;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
var
|
|
138
|
-
return
|
|
139
|
-
$$typeof:
|
|
140
|
-
type:
|
|
141
|
-
key:
|
|
142
|
-
props:
|
|
143
|
-
_owner:
|
|
144
|
-
}, (
|
|
136
|
+
function b(n, l, m, f, I, B) {
|
|
137
|
+
var h = m.ref;
|
|
138
|
+
return n = {
|
|
139
|
+
$$typeof: T,
|
|
140
|
+
type: n,
|
|
141
|
+
key: l,
|
|
142
|
+
props: m,
|
|
143
|
+
_owner: f
|
|
144
|
+
}, (h !== void 0 ? h : null) !== null ? Object.defineProperty(n, "ref", {
|
|
145
145
|
enumerable: !1,
|
|
146
|
-
get:
|
|
147
|
-
}) : Object.defineProperty(
|
|
146
|
+
get: x
|
|
147
|
+
}) : Object.defineProperty(n, "ref", { enumerable: !1, value: null }), n._store = {}, Object.defineProperty(n._store, "validated", {
|
|
148
148
|
configurable: !1,
|
|
149
149
|
enumerable: !1,
|
|
150
150
|
writable: !0,
|
|
151
151
|
value: 0
|
|
152
|
-
}), Object.defineProperty(
|
|
152
|
+
}), Object.defineProperty(n, "_debugInfo", {
|
|
153
153
|
configurable: !1,
|
|
154
154
|
enumerable: !1,
|
|
155
155
|
writable: !0,
|
|
156
156
|
value: null
|
|
157
|
-
}), Object.defineProperty(
|
|
157
|
+
}), Object.defineProperty(n, "_debugStack", {
|
|
158
158
|
configurable: !1,
|
|
159
159
|
enumerable: !1,
|
|
160
160
|
writable: !0,
|
|
161
|
-
value:
|
|
162
|
-
}), Object.defineProperty(
|
|
161
|
+
value: I
|
|
162
|
+
}), Object.defineProperty(n, "_debugTask", {
|
|
163
163
|
configurable: !1,
|
|
164
164
|
enumerable: !1,
|
|
165
165
|
writable: !0,
|
|
166
|
-
value:
|
|
167
|
-
}), Object.freeze && (Object.freeze(
|
|
166
|
+
value: B
|
|
167
|
+
}), Object.freeze && (Object.freeze(n.props), Object.freeze(n)), n;
|
|
168
168
|
}
|
|
169
|
-
function
|
|
170
|
-
var
|
|
171
|
-
if (
|
|
172
|
-
if (
|
|
173
|
-
if (
|
|
174
|
-
for (
|
|
175
|
-
|
|
176
|
-
Object.freeze && Object.freeze(
|
|
169
|
+
function w(n, l, m, f, I, B) {
|
|
170
|
+
var h = l.children;
|
|
171
|
+
if (h !== void 0)
|
|
172
|
+
if (f)
|
|
173
|
+
if (q(h)) {
|
|
174
|
+
for (f = 0; f < h.length; f++)
|
|
175
|
+
y(h[f]);
|
|
176
|
+
Object.freeze && Object.freeze(h);
|
|
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
|
|
185
|
-
return
|
|
181
|
+
else y(h);
|
|
182
|
+
if (S.call(l, "key")) {
|
|
183
|
+
h = e(n);
|
|
184
|
+
var A = Object.keys(l).filter(function(V) {
|
|
185
|
+
return V !== "key";
|
|
186
186
|
});
|
|
187
|
-
|
|
187
|
+
f = 0 < A.length ? "{key: someKey, " + A.join(": ..., ") + ": ...}" : "{key: someKey}", X[h + f] || (A = 0 < A.length ? "{" + A.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
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
), h
|
|
194
|
+
f,
|
|
195
|
+
h,
|
|
196
|
+
A,
|
|
197
|
+
h
|
|
198
|
+
), X[h + f] = !0);
|
|
199
199
|
}
|
|
200
|
-
if (
|
|
201
|
-
|
|
202
|
-
for (var
|
|
203
|
-
|
|
204
|
-
} else
|
|
205
|
-
return
|
|
206
|
-
|
|
207
|
-
typeof
|
|
208
|
-
),
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
200
|
+
if (h = null, m !== void 0 && (a(m), h = "" + m), c(l) && (a(l.key), h = "" + l.key), "key" in l) {
|
|
201
|
+
m = {};
|
|
202
|
+
for (var Y in l)
|
|
203
|
+
Y !== "key" && (m[Y] = l[Y]);
|
|
204
|
+
} else m = l;
|
|
205
|
+
return h && d(
|
|
206
|
+
m,
|
|
207
|
+
typeof n == "function" ? n.displayName || n.name || "Unknown" : n
|
|
208
|
+
), b(
|
|
209
|
+
n,
|
|
210
|
+
h,
|
|
211
|
+
m,
|
|
212
|
+
o(),
|
|
213
|
+
I,
|
|
214
|
+
B
|
|
215
215
|
);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
218
|
-
|
|
217
|
+
function y(n) {
|
|
218
|
+
k(n) ? n._store && (n._store.validated = 1) : typeof n == "object" && n !== null && n.$$typeof === D && (n._payload.status === "fulfilled" ? k(n._payload.value) && n._payload.value._store && (n._payload.value._store.validated = 1) : n._store && (n._store.validated = 1));
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
return typeof
|
|
220
|
+
function k(n) {
|
|
221
|
+
return typeof n == "object" && n !== null && n.$$typeof === T;
|
|
222
222
|
}
|
|
223
|
-
var
|
|
223
|
+
var E = We, T = /* @__PURE__ */ Symbol.for("react.transitional.element"), L = /* @__PURE__ */ Symbol.for("react.portal"), u = /* @__PURE__ */ Symbol.for("react.fragment"), v = /* @__PURE__ */ Symbol.for("react.strict_mode"), P = /* @__PURE__ */ Symbol.for("react.profiler"), me = /* @__PURE__ */ Symbol.for("react.consumer"), te = /* @__PURE__ */ Symbol.for("react.context"), R = /* @__PURE__ */ Symbol.for("react.forward_ref"), z = /* @__PURE__ */ Symbol.for("react.suspense"), G = /* @__PURE__ */ Symbol.for("react.suspense_list"), J = /* @__PURE__ */ Symbol.for("react.memo"), D = /* @__PURE__ */ Symbol.for("react.lazy"), Z = /* @__PURE__ */ Symbol.for("react.activity"), M = /* @__PURE__ */ Symbol.for("react.client.reference"), N = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, S = Object.prototype.hasOwnProperty, q = Array.isArray, O = console.createTask ? console.createTask : function() {
|
|
224
224
|
return null;
|
|
225
225
|
};
|
|
226
|
-
|
|
227
|
-
react_stack_bottom_frame: function(
|
|
228
|
-
return
|
|
226
|
+
E = {
|
|
227
|
+
react_stack_bottom_frame: function(n) {
|
|
228
|
+
return n();
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
|
-
var
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
)(),
|
|
235
|
-
|
|
236
|
-
var
|
|
237
|
-
return
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
231
|
+
var ne, re = {}, ae = E.react_stack_bottom_frame.bind(
|
|
232
|
+
E,
|
|
233
|
+
i
|
|
234
|
+
)(), H = O(s(i)), X = {};
|
|
235
|
+
K.Fragment = u, K.jsx = function(n, l, m) {
|
|
236
|
+
var f = 1e4 > N.recentlyCreatedOwnerStacks++;
|
|
237
|
+
return w(
|
|
238
|
+
n,
|
|
239
|
+
l,
|
|
240
|
+
m,
|
|
241
241
|
!1,
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
f ? Error("react-stack-top-frame") : ae,
|
|
243
|
+
f ? O(s(n)) : H
|
|
244
244
|
);
|
|
245
|
-
},
|
|
246
|
-
var
|
|
247
|
-
return
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
245
|
+
}, K.jsxs = function(n, l, m) {
|
|
246
|
+
var f = 1e4 > N.recentlyCreatedOwnerStacks++;
|
|
247
|
+
return w(
|
|
248
|
+
n,
|
|
249
|
+
l,
|
|
250
|
+
m,
|
|
251
251
|
!0,
|
|
252
|
-
|
|
253
|
-
|
|
252
|
+
f ? Error("react-stack-top-frame") : ae,
|
|
253
|
+
f ? O(s(n)) : H
|
|
254
254
|
);
|
|
255
255
|
};
|
|
256
|
-
})()),
|
|
256
|
+
})()), K;
|
|
257
257
|
}
|
|
258
|
-
var
|
|
259
|
-
function
|
|
260
|
-
return
|
|
258
|
+
var _e;
|
|
259
|
+
function Xe() {
|
|
260
|
+
return _e || (_e = 1, process.env.NODE_ENV === "production" ? oe.exports = Je() : oe.exports = Ze()), oe.exports;
|
|
261
261
|
}
|
|
262
|
-
var r =
|
|
263
|
-
const
|
|
262
|
+
var r = Xe();
|
|
263
|
+
const Qe = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Ke = (e) => e.replace(
|
|
264
264
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
265
|
-
(
|
|
266
|
-
),
|
|
267
|
-
const
|
|
268
|
-
return
|
|
269
|
-
},
|
|
270
|
-
for (const
|
|
271
|
-
if (
|
|
265
|
+
(t, a, s) => s ? s.toUpperCase() : a.toLowerCase()
|
|
266
|
+
), Ee = (e) => {
|
|
267
|
+
const t = Ke(e);
|
|
268
|
+
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
269
|
+
}, $e = (...e) => e.filter((t, a, s) => !!t && t.trim() !== "" && s.indexOf(t) === a).join(" ").trim(), et = (e) => {
|
|
270
|
+
for (const t in e)
|
|
271
|
+
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
272
272
|
return !0;
|
|
273
273
|
};
|
|
274
|
-
var
|
|
274
|
+
var tt = {
|
|
275
275
|
xmlns: "http://www.w3.org/2000/svg",
|
|
276
276
|
width: 24,
|
|
277
277
|
height: 24,
|
|
@@ -282,155 +282,182 @@ var He = {
|
|
|
282
282
|
strokeLinecap: "round",
|
|
283
283
|
strokeLinejoin: "round"
|
|
284
284
|
};
|
|
285
|
-
const
|
|
285
|
+
const nt = Oe(
|
|
286
286
|
({
|
|
287
|
-
color:
|
|
288
|
-
size:
|
|
287
|
+
color: e = "currentColor",
|
|
288
|
+
size: t = 24,
|
|
289
289
|
strokeWidth: a = 2,
|
|
290
290
|
absoluteStrokeWidth: s,
|
|
291
|
-
className:
|
|
292
|
-
children:
|
|
293
|
-
iconNode:
|
|
291
|
+
className: o = "",
|
|
292
|
+
children: i,
|
|
293
|
+
iconNode: c,
|
|
294
294
|
...d
|
|
295
|
-
},
|
|
295
|
+
}, x) => be(
|
|
296
296
|
"svg",
|
|
297
297
|
{
|
|
298
|
-
ref:
|
|
299
|
-
...
|
|
300
|
-
width:
|
|
301
|
-
height:
|
|
302
|
-
stroke:
|
|
303
|
-
strokeWidth: s ? Number(a) * 24 / Number(
|
|
304
|
-
className:
|
|
305
|
-
...!
|
|
298
|
+
ref: x,
|
|
299
|
+
...tt,
|
|
300
|
+
width: t,
|
|
301
|
+
height: t,
|
|
302
|
+
stroke: e,
|
|
303
|
+
strokeWidth: s ? Number(a) * 24 / Number(t) : a,
|
|
304
|
+
className: $e("lucide", o),
|
|
305
|
+
...!i && !et(d) && { "aria-hidden": "true" },
|
|
306
306
|
...d
|
|
307
307
|
},
|
|
308
308
|
[
|
|
309
|
-
...
|
|
310
|
-
...Array.isArray(
|
|
309
|
+
...c.map(([b, w]) => be(b, w)),
|
|
310
|
+
...Array.isArray(i) ? i : [i]
|
|
311
311
|
]
|
|
312
312
|
)
|
|
313
313
|
);
|
|
314
|
-
const
|
|
315
|
-
const a =
|
|
316
|
-
({ className: s, ...
|
|
317
|
-
ref:
|
|
318
|
-
iconNode:
|
|
319
|
-
className:
|
|
320
|
-
`lucide-${
|
|
321
|
-
`lucide-${
|
|
314
|
+
const j = (e, t) => {
|
|
315
|
+
const a = Oe(
|
|
316
|
+
({ className: s, ...o }, i) => be(nt, {
|
|
317
|
+
ref: i,
|
|
318
|
+
iconNode: t,
|
|
319
|
+
className: $e(
|
|
320
|
+
`lucide-${Qe(Ee(e))}`,
|
|
321
|
+
`lucide-${e}`,
|
|
322
322
|
s
|
|
323
323
|
),
|
|
324
|
-
...
|
|
324
|
+
...o
|
|
325
325
|
})
|
|
326
326
|
);
|
|
327
|
-
return a.displayName =
|
|
327
|
+
return a.displayName = Ee(e), a;
|
|
328
328
|
};
|
|
329
|
-
const
|
|
329
|
+
const rt = [
|
|
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
|
+
], at = j("external-link", rt);
|
|
334
|
+
const st = [
|
|
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
|
-
],
|
|
338
|
-
const { user:
|
|
339
|
-
return /* @__PURE__ */ r.jsx("div", { className: "w-full", children:
|
|
337
|
+
], ot = j("user", st), F = "text-[length:var(--aqmb-font-size-body,0.8125rem)] leading-[var(--aqmb-line-height-body,1.25rem)]", fe = "text-[length:var(--aqmb-font-size-caption,0.6875rem)] leading-[var(--aqmb-line-height-caption,1.25rem)]", it = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iI2NiZDVlMSI+PHBhdGggZD0iTTEyIDEyYzIuMjEgMCA0LTEuNzkgNC00cy0xLjc5LTQtNC00LTQgMS43OS00IDQgMS43OSA0IDQgNHptMCAyYy0yLjY3IDAtOCAxLjM0LTggNHYyaDE2di0yYzAtMi42Ni01LjMzLTQtOC00eiIvPjwvc3ZnPg==", ct = ({ to: e, className: t, children: a }) => /* @__PURE__ */ r.jsx("a", { href: e, className: t, children: a }), je = `flex min-h-11 items-center justify-center gap-1 rounded-md border border-white/15 bg-sky-800 px-1 py-1 font-medium ${fe} text-white transition duration-150 hover:bg-sky-950 active:scale-95 dark:border-slate-600/50 dark:bg-slate-700/50 dark:text-slate-100 dark:hover:bg-slate-600/80`, rn = (e) => {
|
|
338
|
+
const { user: t, LinkComponent: a = ct } = e;
|
|
339
|
+
return /* @__PURE__ */ r.jsx("div", { className: "w-full", children: t ? /* @__PURE__ */ r.jsxs(
|
|
340
340
|
"div",
|
|
341
341
|
{
|
|
342
342
|
"data-aqmb-session-card": !0,
|
|
343
|
-
className: "aiquants-session-card group relative flex flex-col gap-2 rounded-xl border border-white/20 bg-
|
|
343
|
+
className: "aiquants-session-card group relative flex flex-col gap-2 rounded-xl border border-white/20 bg-sky-900 p-2.5 shadow-sm backdrop-blur-md transition-colors duration-200 hover:border-white/30 hover:bg-sky-950 dark:border-slate-700/60 dark:bg-slate-800/60 dark:hover:border-slate-600/80 dark:hover:bg-slate-800/90",
|
|
344
344
|
children: [
|
|
345
345
|
/* @__PURE__ */ r.jsxs("div", { className: "flex min-w-0 items-center gap-2.5", children: [
|
|
346
346
|
/* @__PURE__ */ r.jsxs("div", { className: "relative shrink-0", children: [
|
|
347
|
-
/* @__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:
|
|
347
|
+
/* @__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: t.photo || it, alt: t.displayName || "user profile" }) }),
|
|
348
348
|
/* @__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" })
|
|
349
349
|
] }),
|
|
350
350
|
/* @__PURE__ */ r.jsxs("div", { className: "min-w-0 flex-1 leading-tight", children: [
|
|
351
|
-
/* @__PURE__ */ r.jsx("div", { className: "font-semibold text-white text-xs tracking-tight dark:text-slate-100", children:
|
|
352
|
-
/* @__PURE__ */ r.jsx("div", { className: `mt-0.5 font-medium ${
|
|
351
|
+
/* @__PURE__ */ r.jsx("div", { className: "font-semibold text-white text-xs tracking-tight dark:text-slate-100", children: t.displayName }),
|
|
352
|
+
/* @__PURE__ */ r.jsx("div", { className: `mt-0.5 font-medium ${fe} text-sky-100 tracking-tight dark:text-slate-300`, children: "Google Account" })
|
|
353
353
|
] })
|
|
354
354
|
] }),
|
|
355
355
|
/* @__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: [
|
|
356
|
-
/* @__PURE__ */ r.jsxs(a, { className:
|
|
357
|
-
/* @__PURE__ */ r.jsx(
|
|
356
|
+
/* @__PURE__ */ r.jsxs(a, { className: je, to: "/", children: [
|
|
357
|
+
/* @__PURE__ */ r.jsx(ot, { size: 11, className: "shrink-0 opacity-80" }),
|
|
358
358
|
/* @__PURE__ */ r.jsx("span", { className: "min-w-0 text-center", children: "プロフィール" })
|
|
359
359
|
] }),
|
|
360
|
-
/* @__PURE__ */ r.jsxs(a, { className:
|
|
361
|
-
/* @__PURE__ */ r.jsx(
|
|
360
|
+
/* @__PURE__ */ r.jsxs(a, { className: je, to: "https://myaccount.google.com/", children: [
|
|
361
|
+
/* @__PURE__ */ r.jsx(at, { size: 11, className: "shrink-0 opacity-80" }),
|
|
362
362
|
/* @__PURE__ */ r.jsx("span", { className: "min-w-0 text-center", children: "Google" })
|
|
363
363
|
] })
|
|
364
364
|
] })
|
|
365
365
|
]
|
|
366
366
|
}
|
|
367
|
-
) : /* @__PURE__ */ r.jsx("div", { "data-aqmb-session-card": !0, className: "aiquants-session-card flex items-center justify-between rounded-xl border border-white/20 bg-
|
|
368
|
-
},
|
|
367
|
+
) : /* @__PURE__ */ r.jsx("div", { "data-aqmb-session-card": !0, className: "aiquants-session-card flex items-center justify-between rounded-xl border border-white/20 bg-sky-900 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 text-xs dark:text-slate-200", children: "ログインしてください" }) }) });
|
|
368
|
+
}, ue = "aiquants-menu-pinned", lt = () => {
|
|
369
|
+
try {
|
|
370
|
+
return localStorage.getItem(ue) === "true";
|
|
371
|
+
} catch {
|
|
372
|
+
return !1;
|
|
373
|
+
}
|
|
374
|
+
}, Se = (e) => {
|
|
375
|
+
try {
|
|
376
|
+
e ? localStorage.setItem(ue, "true") : localStorage.removeItem(ue);
|
|
377
|
+
} catch {
|
|
378
|
+
}
|
|
379
|
+
}, Le = "aiquants-submenu-pinned", ut = () => {
|
|
380
|
+
try {
|
|
381
|
+
const e = localStorage.getItem(Le);
|
|
382
|
+
if (e) {
|
|
383
|
+
const t = JSON.parse(e);
|
|
384
|
+
if (Array.isArray(t))
|
|
385
|
+
return t.filter((a) => typeof a == "number");
|
|
386
|
+
}
|
|
387
|
+
} catch {
|
|
388
|
+
}
|
|
389
|
+
return [];
|
|
390
|
+
}, dt = (e) => {
|
|
391
|
+
try {
|
|
392
|
+
localStorage.setItem(Le, JSON.stringify(e));
|
|
393
|
+
} catch {
|
|
394
|
+
}
|
|
395
|
+
}, pe = "aiquants-menu-pin-change";
|
|
369
396
|
let g = { pinned: !1, width: 0, active: !1 };
|
|
370
|
-
const
|
|
397
|
+
const ze = (e = 240) => {
|
|
371
398
|
if (typeof window > "u" || typeof document > "u")
|
|
372
399
|
return { pinned: !1, width: 0, active: !1 };
|
|
373
400
|
try {
|
|
374
|
-
const
|
|
375
|
-
if (
|
|
376
|
-
const
|
|
377
|
-
if (!Number.isNaN(
|
|
378
|
-
const d =
|
|
379
|
-
return g.pinned === d && g.width ===
|
|
401
|
+
const t = getComputedStyle(document.documentElement).getPropertyValue("--aiquants-menu-pinned-width").trim();
|
|
402
|
+
if (t) {
|
|
403
|
+
const c = Number.parseInt(t, 10);
|
|
404
|
+
if (!Number.isNaN(c)) {
|
|
405
|
+
const d = c > 0, x = d ? c || e : 0, b = g.active ?? d;
|
|
406
|
+
return g.pinned === d && g.width === x && g.active === b || (g = { pinned: d, width: x, active: b }), g;
|
|
380
407
|
}
|
|
381
408
|
}
|
|
382
|
-
const s = localStorage.getItem(
|
|
383
|
-
return g.pinned === s && g.width ===
|
|
409
|
+
const s = localStorage.getItem(ue) === "true", o = s ? e : 0, i = g.active ?? s;
|
|
410
|
+
return g.pinned === s && g.width === o && g.active === i || (g = { pinned: s, width: o, active: i }), g;
|
|
384
411
|
} catch {
|
|
385
412
|
return { pinned: !1, width: 0, active: !1 };
|
|
386
413
|
}
|
|
387
|
-
},
|
|
414
|
+
}, Te = (e, t, a) => {
|
|
388
415
|
if (typeof window > "u") return;
|
|
389
|
-
const s = a ??
|
|
390
|
-
(g.pinned !==
|
|
391
|
-
const
|
|
392
|
-
detail:
|
|
416
|
+
const s = a ?? e, o = { pinned: e, width: t, active: s };
|
|
417
|
+
(g.pinned !== e || g.width !== t || g.active !== s) && (g = o);
|
|
418
|
+
const i = new CustomEvent(pe, {
|
|
419
|
+
detail: o,
|
|
393
420
|
bubbles: !0,
|
|
394
421
|
cancelable: !1
|
|
395
422
|
});
|
|
396
|
-
window.dispatchEvent(
|
|
397
|
-
},
|
|
423
|
+
window.dispatchEvent(i);
|
|
424
|
+
}, ft = (e, t) => {
|
|
398
425
|
if (typeof window > "u")
|
|
399
426
|
return () => {
|
|
400
427
|
};
|
|
401
|
-
const { immediate: a = !0, defaultPinnedWidth: s = 240 } =
|
|
428
|
+
const { immediate: a = !0, defaultPinnedWidth: s = 240 } = t ?? {};
|
|
402
429
|
if (a) {
|
|
403
|
-
const
|
|
404
|
-
|
|
430
|
+
const i = ze(s);
|
|
431
|
+
e(i);
|
|
405
432
|
}
|
|
406
|
-
const
|
|
407
|
-
const
|
|
408
|
-
|
|
433
|
+
const o = (i) => {
|
|
434
|
+
const c = i;
|
|
435
|
+
c.detail && e(c.detail);
|
|
409
436
|
};
|
|
410
|
-
return window.addEventListener(
|
|
411
|
-
window.removeEventListener(
|
|
437
|
+
return window.addEventListener(pe, o, { passive: !0 }), () => {
|
|
438
|
+
window.removeEventListener(pe, o);
|
|
412
439
|
};
|
|
413
|
-
},
|
|
414
|
-
const
|
|
415
|
-
(
|
|
440
|
+
}, an = (e) => {
|
|
441
|
+
const t = e?.defaultPinnedWidth ?? 240, a = e?.initialPinned ?? !1, s = _(
|
|
442
|
+
(c) => ft(
|
|
416
443
|
() => {
|
|
417
|
-
|
|
444
|
+
c();
|
|
418
445
|
},
|
|
419
|
-
{ immediate: !1, defaultPinnedWidth:
|
|
446
|
+
{ immediate: !1, defaultPinnedWidth: t }
|
|
420
447
|
),
|
|
421
|
-
[
|
|
422
|
-
),
|
|
448
|
+
[t]
|
|
449
|
+
), o = _(() => ze(t), [t]), i = _(() => ({
|
|
423
450
|
pinned: a,
|
|
424
|
-
width: a ?
|
|
425
|
-
}), [a,
|
|
426
|
-
return
|
|
451
|
+
width: a ? t : 0
|
|
452
|
+
}), [a, t]);
|
|
453
|
+
return xe(s, o, i);
|
|
427
454
|
};
|
|
428
|
-
const
|
|
455
|
+
const mt = [
|
|
429
456
|
["path", { d: "m16 17 5-5-5-5", key: "1bji2h" }],
|
|
430
457
|
["path", { d: "M21 12H9", key: "dn1m92" }],
|
|
431
458
|
["path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4", key: "1uf3rs" }]
|
|
432
|
-
],
|
|
433
|
-
const
|
|
459
|
+
], ht = j("log-out", mt);
|
|
460
|
+
const bt = [
|
|
434
461
|
["path", { d: "M12 17v5", key: "bb1du9" }],
|
|
435
462
|
[
|
|
436
463
|
"path",
|
|
@@ -439,8 +466,8 @@ const Qe = [
|
|
|
439
466
|
key: "1nkz8b"
|
|
440
467
|
}
|
|
441
468
|
]
|
|
442
|
-
],
|
|
443
|
-
const
|
|
469
|
+
], De = j("pin", bt);
|
|
470
|
+
const pt = [
|
|
444
471
|
["path", { d: "M12 17v5", key: "bb1du9" }],
|
|
445
472
|
["path", { d: "M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89", key: "znwnzq" }],
|
|
446
473
|
["path", { d: "m2 2 20 20", key: "1ooewy" }],
|
|
@@ -451,18 +478,18 @@ const Ke = [
|
|
|
451
478
|
key: "c9qhm2"
|
|
452
479
|
}
|
|
453
480
|
]
|
|
454
|
-
],
|
|
455
|
-
const
|
|
481
|
+
], He = j("pin-off", pt);
|
|
482
|
+
const vt = [
|
|
456
483
|
["path", { d: "M5 21v-6", key: "1hz6c0" }],
|
|
457
484
|
["path", { d: "M12 21V9", key: "uvy0l4" }],
|
|
458
485
|
["path", { d: "M19 21V3", key: "11j9sm" }]
|
|
459
|
-
],
|
|
460
|
-
const
|
|
486
|
+
], xt = j("chart-no-axes-column-increasing", vt);
|
|
487
|
+
const yt = [
|
|
461
488
|
["path", { d: "M12 15V3", key: "m9g1x1" }],
|
|
462
489
|
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
463
490
|
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
464
|
-
],
|
|
465
|
-
const
|
|
491
|
+
], gt = j("download", yt);
|
|
492
|
+
const wt = [
|
|
466
493
|
[
|
|
467
494
|
"path",
|
|
468
495
|
{
|
|
@@ -474,205 +501,219 @@ const at = [
|
|
|
474
501
|
["path", { d: "M10 9H8", key: "b1mrlr" }],
|
|
475
502
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
476
503
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
477
|
-
],
|
|
478
|
-
const
|
|
504
|
+
], Me = j("file-text", wt);
|
|
505
|
+
const kt = [
|
|
479
506
|
["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" }],
|
|
480
507
|
["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" }]
|
|
481
|
-
],
|
|
482
|
-
const
|
|
508
|
+
], Nt = j("link", kt);
|
|
509
|
+
const _t = [
|
|
483
510
|
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
484
511
|
["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
|
|
485
|
-
],
|
|
486
|
-
const
|
|
512
|
+
], Et = j("lock", _t);
|
|
513
|
+
const jt = [
|
|
487
514
|
["path", { d: "M12 3v18", key: "108xh3" }],
|
|
488
515
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
489
516
|
["path", { d: "M3 9h18", key: "1pudct" }],
|
|
490
517
|
["path", { d: "M3 15h18", key: "5xshup" }]
|
|
491
|
-
],
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
518
|
+
], St = j("table", jt), Be = "separator", Tt = /(^https?:\/\/)|(\.(html|htm)?$)/, ge = (e) => Tt.test(e), W = (e) => e ? e.split(/[?#]/)[0].replace(/(?!^\/)\/$/, "") : "", Pe = (e, t, a) => {
|
|
519
|
+
const s = W(e);
|
|
520
|
+
return s === "" ? -1 : s === a || t === "prefix" && s !== "/" && a.startsWith(`${s}/`) ? s.length : -1;
|
|
521
|
+
}, Ye = (e, t) => {
|
|
522
|
+
const a = W(t);
|
|
523
|
+
let s = null, o = -1;
|
|
524
|
+
for (const i of e) {
|
|
525
|
+
const c = Pe(i.href, i.match, a);
|
|
526
|
+
if (c > o && (s = { menuId: i.id, subid: null }, o = c), i.submenu)
|
|
527
|
+
for (const d of i.submenu) {
|
|
528
|
+
const x = Pe(d.href, d.match, a);
|
|
529
|
+
x > o && (s = { menuId: i.id, subid: d.subid }, o = x);
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
return s;
|
|
533
|
+
}, Mt = (e, t) => {
|
|
534
|
+
const a = W(t);
|
|
535
|
+
if (a === "")
|
|
536
|
+
return null;
|
|
537
|
+
for (const s of e) {
|
|
538
|
+
if (s.href !== void 0 && W(s.href) === a)
|
|
539
|
+
return { menu: s, submenu: null, href: s.href };
|
|
540
|
+
if (s.submenu) {
|
|
541
|
+
for (const o of s.submenu)
|
|
542
|
+
if (o.href !== Be && W(o.href) === a)
|
|
543
|
+
return { menu: s, submenu: o, href: o.href };
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
return null;
|
|
547
|
+
}, ce = (e, t, a) => e !== null && e.menuId === t && e.subid === a, de = (e, t) => t ? {
|
|
506
548
|
menu: {
|
|
507
|
-
id:
|
|
508
|
-
title:
|
|
509
|
-
href:
|
|
549
|
+
id: e.id,
|
|
550
|
+
title: e.title,
|
|
551
|
+
href: e.href
|
|
510
552
|
},
|
|
511
553
|
submenu: {
|
|
512
|
-
subid:
|
|
513
|
-
title:
|
|
514
|
-
href:
|
|
515
|
-
mark:
|
|
516
|
-
new:
|
|
554
|
+
subid: t.subid,
|
|
555
|
+
title: t.title,
|
|
556
|
+
href: t.href,
|
|
557
|
+
mark: t.mark,
|
|
558
|
+
new: t.new
|
|
517
559
|
}
|
|
518
560
|
} : {
|
|
519
561
|
menu: {
|
|
520
|
-
id:
|
|
521
|
-
title:
|
|
522
|
-
href:
|
|
562
|
+
id: e.id,
|
|
563
|
+
title: e.title,
|
|
564
|
+
href: e.href
|
|
565
|
+
}
|
|
566
|
+
}, Ve = () => {
|
|
567
|
+
try {
|
|
568
|
+
return Ge().pathname;
|
|
569
|
+
} catch {
|
|
570
|
+
return typeof window > "u" ? "" : window.location.pathname;
|
|
523
571
|
}
|
|
524
|
-
},
|
|
525
|
-
|
|
572
|
+
}, ve = "flex min-h-9 flex-1 items-center", Pt = "min-h-9 min-w-9", At = typeof window < "u" ? Ie : ee, Ae = "aiquants-menu-scroll", Ct = {
|
|
573
|
+
report: Me,
|
|
574
|
+
slip: Me,
|
|
575
|
+
table: St,
|
|
576
|
+
chart: xt,
|
|
577
|
+
download: gt,
|
|
578
|
+
lock: Et,
|
|
579
|
+
href: Nt
|
|
580
|
+
}, Rt = ({ mark: e, children: t }) => {
|
|
581
|
+
const a = e ? Ct[e] : void 0;
|
|
582
|
+
return a ? /* @__PURE__ */ r.jsxs("div", { className: "aiquants-menu-link flex flex-nowrap items-center", children: [
|
|
583
|
+
/* @__PURE__ */ r.jsx(a, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
584
|
+
/* @__PURE__ */ r.jsx("div", { className: "mx-1 hover:underline", children: t })
|
|
585
|
+
] }) : /* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-link mx-1 hover:underline", children: t });
|
|
586
|
+
}, qt = ({ item: e, parentMenu: t, isCurrent: a, onMenuSelected: s }) => {
|
|
587
|
+
if (e.href === Be)
|
|
526
588
|
return /* @__PURE__ */ r.jsx("hr", { className: "aiquants-menu-separator mx-2 my-1 h-px" });
|
|
527
|
-
const
|
|
528
|
-
className:
|
|
589
|
+
const o = /* @__PURE__ */ r.jsx(Rt, { mark: e.mark, children: e.title }), i = {
|
|
590
|
+
className: ve,
|
|
529
591
|
"aria-current": a ? "page" : void 0,
|
|
530
592
|
onClick: () => {
|
|
531
|
-
s && s(
|
|
593
|
+
s && s(de(t, e));
|
|
532
594
|
}
|
|
533
595
|
};
|
|
534
|
-
return
|
|
535
|
-
},
|
|
536
|
-
const s =
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
if (u > l && (s = { menuId: o.id, subid: null }, l = u), o.submenu)
|
|
544
|
-
for (const d of o.submenu) {
|
|
545
|
-
const m = ge(d.href, d.match, a);
|
|
546
|
-
m > l && (s = { menuId: o.id, subid: d.subid }, l = m);
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
return s;
|
|
550
|
-
}, re = (t, n, a) => t !== null && t.menuId === n && t.subid === a, vt = (t) => {
|
|
551
|
-
const { menuList: n, onMenuSelected: a, pinnedSubmenuIds: s = [], onToggleSubmenuPin: l } = t;
|
|
552
|
-
let o = "";
|
|
553
|
-
try {
|
|
554
|
-
o = Ie().pathname;
|
|
555
|
-
} catch {
|
|
556
|
-
typeof window < "u" && (o = window.location.pathname);
|
|
557
|
-
}
|
|
558
|
-
const u = ue(() => bt(n, o), [n, o]), d = u === null ? null : u.menuId, [m, x] = X(d), y = L(o), N = L(d !== null);
|
|
559
|
-
F(() => {
|
|
560
|
-
y.current !== o && (y.current = o, N.current = !1), !N.current && d !== null && (x(d), N.current = !0);
|
|
561
|
-
}, [o, d]);
|
|
562
|
-
const w = _(
|
|
563
|
-
(c) => {
|
|
564
|
-
s.includes(c) || x((S) => S === c ? null : c);
|
|
596
|
+
return e.new ? /* @__PURE__ */ r.jsx("a", { href: e.href, rel: "noopener noreferrer", target: "_blank", ...i, children: o }) : ge(e.href) ? /* @__PURE__ */ r.jsx("a", { href: e.href, ...i, children: o }) : /* @__PURE__ */ r.jsx(ye, { to: e.href, ...i, children: o });
|
|
597
|
+
}, Ot = (e) => {
|
|
598
|
+
const { menuList: t, onMenuSelected: a, pinnedSubmenuIds: s = [], onToggleSubmenuPin: o } = e, i = Ve(), c = U(() => Ye(t, i), [t, i]), d = c === null ? null : c.menuId, [x, b] = le(d), w = C(i), y = C(d !== null);
|
|
599
|
+
ee(() => {
|
|
600
|
+
w.current !== i && (w.current = i, y.current = !1), !y.current && d !== null && (b(d), y.current = !0);
|
|
601
|
+
}, [i, d]);
|
|
602
|
+
const k = _(
|
|
603
|
+
(u) => {
|
|
604
|
+
s.includes(u) || b((P) => P === u ? null : u);
|
|
565
605
|
},
|
|
566
606
|
[s]
|
|
567
|
-
),
|
|
568
|
-
|
|
569
|
-
const
|
|
570
|
-
if (
|
|
607
|
+
), E = C(null);
|
|
608
|
+
At(() => {
|
|
609
|
+
const u = E.current;
|
|
610
|
+
if (u)
|
|
571
611
|
try {
|
|
572
|
-
const
|
|
573
|
-
if (
|
|
574
|
-
const
|
|
575
|
-
Number.isNaN(
|
|
612
|
+
const v = sessionStorage.getItem(Ae);
|
|
613
|
+
if (v !== null) {
|
|
614
|
+
const P = Number.parseFloat(v);
|
|
615
|
+
Number.isNaN(P) || (u.scrollTop = P);
|
|
576
616
|
}
|
|
577
617
|
} catch {
|
|
578
618
|
}
|
|
579
619
|
}, []);
|
|
580
|
-
const
|
|
581
|
-
const
|
|
582
|
-
if (
|
|
620
|
+
const T = _(() => {
|
|
621
|
+
const u = E.current;
|
|
622
|
+
if (u)
|
|
583
623
|
try {
|
|
584
|
-
sessionStorage.setItem(
|
|
624
|
+
sessionStorage.setItem(Ae, String(u.scrollTop));
|
|
585
625
|
} catch {
|
|
586
626
|
}
|
|
587
|
-
}, []),
|
|
627
|
+
}, []), L = U(() => /* @__PURE__ */ r.jsx(r.Fragment, { children: t.map((u) => /* @__PURE__ */ r.jsx("div", { children: u.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 ${F} before:mr-2 before:inline-block before:h-2 before:w-2 before:shrink-0 before:rounded-full before:content-[''] sm:text-sm`, children: ge(u.href) ? /* @__PURE__ */ r.jsx(
|
|
588
628
|
"a",
|
|
589
629
|
{
|
|
590
|
-
href:
|
|
591
|
-
className:
|
|
592
|
-
"aria-current":
|
|
630
|
+
href: u.href,
|
|
631
|
+
className: ve,
|
|
632
|
+
"aria-current": ce(c, u.id, null) ? "page" : void 0,
|
|
593
633
|
onClick: () => {
|
|
594
|
-
a && a(
|
|
634
|
+
a && a(de(u));
|
|
595
635
|
},
|
|
596
|
-
children: /* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-link hover:underline", children:
|
|
636
|
+
children: /* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-link hover:underline", children: u.title })
|
|
597
637
|
}
|
|
598
638
|
) : /* @__PURE__ */ r.jsx(
|
|
599
|
-
|
|
639
|
+
ye,
|
|
600
640
|
{
|
|
601
|
-
to:
|
|
602
|
-
className:
|
|
603
|
-
"aria-current":
|
|
641
|
+
to: u.href,
|
|
642
|
+
className: ve,
|
|
643
|
+
"aria-current": ce(c, u.id, null) ? "page" : void 0,
|
|
604
644
|
onClick: () => {
|
|
605
|
-
a && a(
|
|
645
|
+
a && a(de(u));
|
|
606
646
|
},
|
|
607
|
-
children: /* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-link hover:underline", children:
|
|
647
|
+
children: /* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-link hover:underline", children: u.title })
|
|
608
648
|
}
|
|
609
|
-
) }) : /* @__PURE__ */ r.jsxs("details", { className: "aiquants-menu-accordion-details", open:
|
|
649
|
+
) }) : /* @__PURE__ */ r.jsxs("details", { className: "aiquants-menu-accordion-details", open: u.id === x || s.includes(u.id), children: [
|
|
610
650
|
/* @__PURE__ */ r.jsxs(
|
|
611
651
|
"summary",
|
|
612
652
|
{
|
|
613
|
-
className: `aiquants-menu-list-item aiquants-menu-accordion-summary relative mb-0.5 ml-1 min-h-9 list-none rounded-l-xl px-2.5 ${
|
|
614
|
-
onClick: (
|
|
615
|
-
|
|
653
|
+
className: `aiquants-menu-list-item aiquants-menu-accordion-summary relative mb-0.5 ml-1 min-h-9 list-none rounded-l-xl px-2.5 ${F} 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`,
|
|
654
|
+
onClick: (v) => {
|
|
655
|
+
v.preventDefault(), k(u.id);
|
|
616
656
|
},
|
|
617
|
-
onKeyDown: (
|
|
618
|
-
(
|
|
657
|
+
onKeyDown: (v) => {
|
|
658
|
+
(v.key === "Enter" || v.key === " ") && (v.preventDefault(), k(u.id));
|
|
619
659
|
},
|
|
620
660
|
children: [
|
|
621
|
-
/* @__PURE__ */ r.jsx("span", { children:
|
|
661
|
+
/* @__PURE__ */ r.jsx("span", { children: u.title }),
|
|
622
662
|
/* @__PURE__ */ r.jsx(
|
|
623
663
|
"button",
|
|
624
664
|
{
|
|
625
665
|
type: "button",
|
|
626
666
|
"data-aqmb-submenu-pin-button": !0,
|
|
627
|
-
onClick: (
|
|
628
|
-
|
|
667
|
+
onClick: (v) => {
|
|
668
|
+
v.stopPropagation(), v.preventDefault(), o && o(u.id);
|
|
629
669
|
},
|
|
630
|
-
className: `aiquants-submenu-pin-button ${
|
|
631
|
-
title: s.includes(
|
|
632
|
-
children: s.includes(
|
|
670
|
+
className: `aiquants-submenu-pin-button ${Pt} ${s.includes(u.id) ? "pinned" : ""}`,
|
|
671
|
+
title: s.includes(u.id) ? "ピン留め解除" : "ピン留め",
|
|
672
|
+
children: s.includes(u.id) ? /* @__PURE__ */ r.jsx(De, { size: 13 }) : /* @__PURE__ */ r.jsx(He, { size: 13 })
|
|
633
673
|
}
|
|
634
674
|
)
|
|
635
675
|
]
|
|
636
676
|
}
|
|
637
677
|
),
|
|
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:
|
|
678
|
+
/* @__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: u.submenu.map((v) => /* @__PURE__ */ r.jsx("div", { className: `aiquants-menu-accordion-container block w-full ${F}`, children: /* @__PURE__ */ r.jsx(qt, { item: v, parentMenu: u, isCurrent: ce(c, u.id, v.subid), onMenuSelected: a }) }, v.subid)) })
|
|
679
|
+
] }) }, u.id)) }), [t, a, x, k, s, c]);
|
|
680
|
+
return /* @__PURE__ */ r.jsx("div", { ref: E, onScroll: T, "data-aqmb-menu-list": !0, className: "aiquants-menu-list-scroller hidden-scrollbar", children: L });
|
|
681
|
+
}, he = "min-h-11", Ce = "min-w-11", It = (e) => {
|
|
682
|
+
const { menuList: t, menuHeader: a, open: s, onMenuSelected: o, onClickSignout: i, theme: c, toggleTheme: d, canPin: x, isPinned: b, onTogglePin: w, pinnedSubmenuIds: y, onToggleSubmenuPin: k, id: E, ref: T } = e;
|
|
643
683
|
return /* @__PURE__ */ r.jsxs(
|
|
644
684
|
"div",
|
|
645
685
|
{
|
|
646
|
-
ref:
|
|
686
|
+
ref: T,
|
|
687
|
+
id: E,
|
|
647
688
|
"data-aqmb-menu-content": !0,
|
|
648
689
|
inert: !s,
|
|
649
|
-
className: `aiquants-menu-content fixed top-0 right-0 z-2147483642 flex
|
|
690
|
+
className: `aiquants-menu-content fixed top-0 right-0 z-2147483642 flex 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"}`,
|
|
650
691
|
children: [
|
|
651
692
|
/* @__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 }),
|
|
652
|
-
/* @__PURE__ */ r.jsx("div", { className: "aiquants-menu-list-region", children: /* @__PURE__ */ r.jsx(
|
|
693
|
+
/* @__PURE__ */ r.jsx("div", { className: "aiquants-menu-list-region", children: /* @__PURE__ */ r.jsx(Ot, { menuList: t, onMenuSelected: o, pinnedSubmenuIds: y, onToggleSubmenuPin: k }) }),
|
|
653
694
|
/* @__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 flex-wrap items-center justify-between gap-1.5", children: [
|
|
654
|
-
/* @__PURE__ */ r.jsx(
|
|
695
|
+
x ? /* @__PURE__ */ r.jsx(
|
|
655
696
|
"button",
|
|
656
697
|
{
|
|
657
698
|
type: "button",
|
|
658
|
-
onClick:
|
|
699
|
+
onClick: w,
|
|
659
700
|
"data-aqmb-pin-button": !0,
|
|
660
|
-
className: `flex ${
|
|
661
|
-
title:
|
|
662
|
-
"aria-label":
|
|
663
|
-
children:
|
|
701
|
+
className: `flex ${he} ${Ce} items-center justify-center rounded-md px-2 ${F} text-white shadow-2xs transition-colors duration-200 focus-visible:outline-2 focus-visible:outline-current focus-visible:outline-offset-2 ${b ? "bg-amber-700 hover:bg-amber-800" : "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"}`,
|
|
702
|
+
title: b ? "ピン留め解除" : "ピン留め",
|
|
703
|
+
"aria-label": b ? "ピン留め解除" : "ピン留め",
|
|
704
|
+
children: b ? /* @__PURE__ */ r.jsx(De, { size: 12 }) : /* @__PURE__ */ r.jsx(He, { size: 12 })
|
|
664
705
|
}
|
|
665
|
-
),
|
|
706
|
+
) : null,
|
|
666
707
|
/* @__PURE__ */ r.jsx(
|
|
667
708
|
"button",
|
|
668
709
|
{
|
|
669
710
|
type: "button",
|
|
670
711
|
onClick: d,
|
|
671
712
|
"data-aqmb-theme-button": !0,
|
|
672
|
-
className: `group relative flex ${
|
|
673
|
-
title:
|
|
674
|
-
"aria-label":
|
|
675
|
-
children: /* @__PURE__ */ r.jsx("span", { className: "transition-transform duration-200 group-hover:scale-110", children:
|
|
713
|
+
className: `group relative flex ${he} ${Ce} items-center justify-center rounded-md border border-white/20 bg-white/10 px-2 ${F} text-white shadow-2xs backdrop-blur-xs transition-colors duration-200 hover:bg-white/20 focus-visible:outline-2 focus-visible:outline-current focus-visible:outline-offset-2 dark:border-slate-600/60 dark:bg-slate-700/60 dark:hover:bg-slate-600`,
|
|
714
|
+
title: c === "dark" ? "ライトモードに切り替え" : "ダークモードに切り替え",
|
|
715
|
+
"aria-label": c === "dark" ? "ライトモードに切り替え" : "ダークモードに切り替え",
|
|
716
|
+
children: /* @__PURE__ */ r.jsx("span", { className: "transition-transform duration-200 group-hover:scale-110", children: c === "dark" ? "🌞" : "🌙" })
|
|
676
717
|
}
|
|
677
718
|
),
|
|
678
719
|
/* @__PURE__ */ r.jsxs(
|
|
@@ -680,10 +721,10 @@ const ct = [
|
|
|
680
721
|
{
|
|
681
722
|
type: "button",
|
|
682
723
|
"data-aqmb-signout-button": !0,
|
|
683
|
-
className: `aiquants-signout-button flex ${
|
|
684
|
-
onClick:
|
|
724
|
+
className: `aiquants-signout-button flex ${he} flex-1 items-center justify-center gap-1.5 rounded-md bg-red-800 px-2.5 font-medium ${F} text-white shadow-2xs transition-colors duration-200 hover:bg-red-900 focus-visible:outline-2 focus-visible:outline-current focus-visible:outline-offset-2`,
|
|
725
|
+
onClick: i,
|
|
685
726
|
children: [
|
|
686
|
-
/* @__PURE__ */ r.jsx(
|
|
727
|
+
/* @__PURE__ */ r.jsx(ht, { size: 11, className: "shrink-0" }),
|
|
687
728
|
/* @__PURE__ */ r.jsx("span", { className: "text-center", children: "サインアウト" })
|
|
688
729
|
]
|
|
689
730
|
}
|
|
@@ -692,156 +733,215 @@ const ct = [
|
|
|
692
733
|
]
|
|
693
734
|
}
|
|
694
735
|
);
|
|
695
|
-
},
|
|
696
|
-
|
|
697
|
-
},
|
|
698
|
-
const { isOverlay:
|
|
736
|
+
}, $t = (e) => {
|
|
737
|
+
e.preventDefault();
|
|
738
|
+
}, Lt = (e) => {
|
|
739
|
+
const { isOverlay: t, onOverlayClick: a } = e;
|
|
699
740
|
return /* @__PURE__ */ r.jsx(
|
|
700
741
|
"div",
|
|
701
742
|
{
|
|
702
743
|
"aria-hidden": "true",
|
|
703
744
|
"data-aqmb-menu-overlay": !0,
|
|
704
|
-
inert: !
|
|
705
|
-
className: `fixed inset-0 z-2147483640 overflow-hidden overscroll-contain bg-black/50 motion-safe:transition-opacity motion-safe:duration-500 ${
|
|
706
|
-
onMouseDown:
|
|
745
|
+
inert: !t,
|
|
746
|
+
className: `fixed inset-0 z-2147483640 overflow-hidden overscroll-contain bg-black/50 motion-safe:transition-opacity motion-safe:duration-500 ${t ? "opacity-100" : "pointer-events-none opacity-0"}`,
|
|
747
|
+
onMouseDown: $t,
|
|
707
748
|
onClick: a
|
|
708
749
|
}
|
|
709
750
|
);
|
|
710
|
-
}
|
|
751
|
+
};
|
|
752
|
+
const zt = [
|
|
753
|
+
["path", { d: "M4 5h16", key: "1tepv9" }],
|
|
754
|
+
["path", { d: "M4 12h16", key: "1lakjw" }],
|
|
755
|
+
["path", { d: "M4 19h16", key: "1djgab" }]
|
|
756
|
+
], Dt = j("menu", zt);
|
|
757
|
+
const Ht = [
|
|
758
|
+
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
759
|
+
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
760
|
+
], Bt = j("x", Ht), Re = 4, Yt = /^[A-Za-z0-9\s(),:.+\-*/<>=_]+$/, Vt = (e, t) => {
|
|
761
|
+
if (t.length < 1 || t.length > Re)
|
|
762
|
+
throw new Error(`@aiquants/menu-bar: tabBar.tabs must hold 1 to ${Re} tabs; got ${t.length}`);
|
|
763
|
+
const a = [];
|
|
764
|
+
for (const s of t) {
|
|
765
|
+
if (s.label.trim() === "")
|
|
766
|
+
throw new Error(`@aiquants/menu-bar: the tab for ${JSON.stringify(s.href)} needs a label`);
|
|
767
|
+
const o = Mt(e, s.href);
|
|
768
|
+
if (o === null)
|
|
769
|
+
throw new Error(`@aiquants/menu-bar: the tab href ${JSON.stringify(s.href)} names no entry of the menu`);
|
|
770
|
+
const i = a.find((c) => c.entry.menu === o.menu && c.entry.submenu === o.submenu);
|
|
771
|
+
if (i !== void 0)
|
|
772
|
+
throw new Error(`@aiquants/menu-bar: the tab hrefs ${JSON.stringify(i.tab.href)} and ${JSON.stringify(s.href)} name the same entry`);
|
|
773
|
+
a.push({ tab: s, entry: o });
|
|
774
|
+
}
|
|
775
|
+
return a;
|
|
776
|
+
}, Ft = (e) => {
|
|
777
|
+
if (e.trim() === "" || !Yt.test(e) || e.includes("/*") || e.includes("*/") || e.includes("</"))
|
|
778
|
+
throw new Error(`@aiquants/menu-bar: tabBar.media must be a media query of letters, digits, white space and ( ) , : . + - * / < > = _ without a comment or </; got ${JSON.stringify(e)}`);
|
|
779
|
+
return [
|
|
780
|
+
`@media ${e}{`,
|
|
781
|
+
":root{--_aqmb-tab-bar-display:flex;--_aqmb-switch-display:none;--aqmb-tab-bar-block-size:var(--_aqmb-tab-bar-drawn-block-size);--aqmb-switch-clearance-inline-end:0px;--aqmb-switch-clearance-block-start:0px}",
|
|
782
|
+
":root:has(:read-write:focus){--_aqmb-tab-bar-display:none;--aqmb-tab-bar-block-size:0px}",
|
|
783
|
+
".aiquants-menu-content{block-size:calc(100dvh - var(--aqmb-tab-bar-block-size))}",
|
|
784
|
+
"}"
|
|
785
|
+
].join("");
|
|
786
|
+
}, Wt = ({ resolved: e, current: t, onTabSelected: a }) => {
|
|
787
|
+
const { tab: s, entry: o } = e, i = /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
788
|
+
/* @__PURE__ */ r.jsx("span", { className: "aiquants-tab-bar-icon", "aria-hidden": "true", children: s.icon }),
|
|
789
|
+
/* @__PURE__ */ r.jsx("span", { className: `aiquants-tab-bar-label ${fe}`, children: s.label })
|
|
790
|
+
] }), c = {
|
|
791
|
+
className: "aiquants-tab-bar-tab",
|
|
792
|
+
"data-aqmb-tab": !0,
|
|
793
|
+
"data-aqmb-current": t ? !0 : void 0,
|
|
794
|
+
"aria-current": t ? "page" : void 0,
|
|
795
|
+
onClick: () => a(de(o.menu, o.submenu === null ? void 0 : o.submenu))
|
|
796
|
+
};
|
|
797
|
+
return o.submenu?.new ? /* @__PURE__ */ r.jsx("a", { href: o.href, rel: "noopener noreferrer", target: "_blank", ...c, children: i }) : ge(o.href) ? /* @__PURE__ */ r.jsx("a", { href: o.href, ...c, children: i }) : /* @__PURE__ */ r.jsx(ye, { to: o.href, ...c, children: i });
|
|
798
|
+
}, Ut = ({ tabs: e, menuList: t, menuOpen: a, drawerId: s, onMenuOpen: o, onMenuClose: i, onTabSelected: c, menuTabRef: d }) => {
|
|
799
|
+
const x = Ve(), b = U(() => Ye(t, x), [t, x]), w = e.findIndex(({ entry: y }) => ce(b, y.menu.id, y.submenu === null ? null : y.submenu.subid));
|
|
800
|
+
return /* @__PURE__ */ r.jsxs("nav", { "data-aqmb-tab-bar": !0, "aria-label": "Tab bar", className: "aiquants-tab-bar", children: [
|
|
801
|
+
e.map((y, k) => /* @__PURE__ */ r.jsx(Wt, { resolved: y, current: k === w, onTabSelected: c }, W(y.tab.href))),
|
|
802
|
+
/* @__PURE__ */ r.jsxs(
|
|
803
|
+
"button",
|
|
804
|
+
{
|
|
805
|
+
ref: d,
|
|
806
|
+
type: "button",
|
|
807
|
+
"data-aqmb-tab-menu": !0,
|
|
808
|
+
"data-aqmb-current": w === -1 ? !0 : void 0,
|
|
809
|
+
"aria-label": a ? "Close menu" : "Open menu",
|
|
810
|
+
"aria-expanded": a,
|
|
811
|
+
"aria-controls": s,
|
|
812
|
+
className: "aiquants-tab-bar-tab aiquants-tab-bar-menu",
|
|
813
|
+
onClick: a ? i : o,
|
|
814
|
+
children: [
|
|
815
|
+
/* @__PURE__ */ r.jsx("span", { className: "aiquants-tab-bar-icon", "aria-hidden": "true", children: a ? /* @__PURE__ */ r.jsx(Bt, {}) : /* @__PURE__ */ r.jsx(Dt, {}) }),
|
|
816
|
+
/* @__PURE__ */ r.jsx("span", { className: `aiquants-tab-bar-label ${fe}`, "aria-hidden": "true", children: a ? "close" : "menu" })
|
|
817
|
+
]
|
|
818
|
+
}
|
|
819
|
+
)
|
|
820
|
+
] });
|
|
821
|
+
}, Gt = ({ isMenuOpen: e, onMenuOpen: t, onMenuClose: a, ref: s }) => /* @__PURE__ */ r.jsxs("button", { ref: s, type: "button", "data-aqmb-menu-switch": "true", "aria-label": e ? "Close menu" : "Open menu", "aria-expanded": e, className: "aiquants-menu-switch", onClick: e ? a : t, children: [
|
|
711
822
|
/* @__PURE__ */ r.jsxs("span", { className: "aiquants-menu-switch-bars", children: [
|
|
712
823
|
/* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-switch-bar" }),
|
|
713
824
|
/* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-switch-bar" }),
|
|
714
825
|
/* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-switch-bar" }),
|
|
715
826
|
/* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-switch-bar" })
|
|
716
827
|
] }),
|
|
717
|
-
/* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-switch-caption", "aria-hidden": "true", children:
|
|
718
|
-
] }),
|
|
828
|
+
/* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-switch-caption", "aria-hidden": "true", children: e ? "close" : "menu" })
|
|
829
|
+
] }), Jt = () => () => {
|
|
830
|
+
}, Zt = () => !0, Xt = () => !1, Qt = () => xe(Jt, Zt, Xt), qe = (e, t) => {
|
|
831
|
+
const a = Qt(), [s, o] = le(() => a ? e() : t), [i, c] = le(a);
|
|
832
|
+
return a && !i && (c(!0), o(e())), [s, o];
|
|
833
|
+
}, Kt = () => !1, en = (e) => {
|
|
834
|
+
const t = U(() => e === void 0 || typeof window > "u" ? null : window.matchMedia(e), [e]), a = _(
|
|
835
|
+
(o) => t === null ? () => {
|
|
836
|
+
} : (t.addEventListener("change", o), () => t.removeEventListener("change", o)),
|
|
837
|
+
[t]
|
|
838
|
+
), s = _(() => t === null ? !1 : t.matches, [t]);
|
|
839
|
+
return xe(a, s, Kt);
|
|
840
|
+
}, ie = typeof window < "u" ? Ie : ee, sn = (e) => {
|
|
719
841
|
const {
|
|
720
|
-
menuList:
|
|
842
|
+
menuList: t,
|
|
721
843
|
menuHeader: a,
|
|
722
844
|
onClickSignout: s,
|
|
723
|
-
isMenuhide:
|
|
724
|
-
isMenuHide:
|
|
725
|
-
theme:
|
|
845
|
+
isMenuhide: o,
|
|
846
|
+
isMenuHide: i,
|
|
847
|
+
theme: c,
|
|
726
848
|
toggleTheme: d,
|
|
727
|
-
onMenuNavigate:
|
|
728
|
-
isPinned:
|
|
729
|
-
pinnedWidth:
|
|
730
|
-
onPinChange:
|
|
731
|
-
pinnedSubmenuIds:
|
|
732
|
-
initialPinnedSubmenuIds:
|
|
733
|
-
onSubmenuPinChange:
|
|
734
|
-
closeOnEscape:
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
const [D, Q] = X(() => {
|
|
746
|
-
if (j)
|
|
747
|
-
return j;
|
|
748
|
-
try {
|
|
749
|
-
const h = localStorage.getItem("aiquants-submenu-pinned");
|
|
750
|
-
if (h) {
|
|
751
|
-
const e = JSON.parse(h);
|
|
752
|
-
if (Array.isArray(e))
|
|
753
|
-
return e.filter((i) => typeof i == "number");
|
|
754
|
-
}
|
|
755
|
-
} catch {
|
|
756
|
-
}
|
|
757
|
-
return [];
|
|
758
|
-
}), K = w !== void 0 ? w : D, z = _(
|
|
759
|
-
(h) => {
|
|
760
|
-
const e = w !== void 0 ? w : D, i = e.includes(h) ? e.filter((f) => f !== h) : [...e, h];
|
|
761
|
-
if (w === void 0) {
|
|
762
|
-
Q(i);
|
|
763
|
-
try {
|
|
764
|
-
localStorage.setItem("aiquants-submenu-pinned", JSON.stringify(i));
|
|
765
|
-
} catch {
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
C && C(i);
|
|
849
|
+
onMenuNavigate: x,
|
|
850
|
+
isPinned: b,
|
|
851
|
+
pinnedWidth: w = 240,
|
|
852
|
+
onPinChange: y,
|
|
853
|
+
pinnedSubmenuIds: k,
|
|
854
|
+
initialPinnedSubmenuIds: E,
|
|
855
|
+
onSubmenuPinChange: T,
|
|
856
|
+
closeOnEscape: L = "auto",
|
|
857
|
+
pinnable: u = !0,
|
|
858
|
+
tabBar: v
|
|
859
|
+
} = e, P = i ?? o ?? !1, [me, te] = qe(lt, !1), R = b !== void 0 ? b : me, z = v?.media, G = v?.tabs, J = U(() => G === void 0 ? null : Vt(t, G), [t, G]), D = U(() => z === void 0 ? null : Ft(z), [z]), Z = en(z), M = u && !Z, N = M && R, [S, q] = le(N);
|
|
860
|
+
ee(() => {
|
|
861
|
+
N && q(!0);
|
|
862
|
+
}, [N]);
|
|
863
|
+
const [O, ne] = qe(() => E ?? ut(), E ?? []), re = k !== void 0 ? k : O, ae = _(
|
|
864
|
+
(p) => {
|
|
865
|
+
const $ = k !== void 0 ? k : O, se = $.includes(p) ? $.filter((Fe) => Fe !== p) : [...$, p];
|
|
866
|
+
k === void 0 && (ne(se), dt(se)), T && T(se);
|
|
769
867
|
},
|
|
770
|
-
[
|
|
771
|
-
), H =
|
|
772
|
-
|
|
773
|
-
H.current =
|
|
774
|
-
}, [
|
|
775
|
-
const
|
|
776
|
-
document.documentElement.style.setProperty("--aiquants-menu-pinned-width",
|
|
777
|
-
}, [
|
|
778
|
-
document.documentElement.style.setProperty("--aiquants-menu-pinned-width", "0px"),
|
|
868
|
+
[k, O, T]
|
|
869
|
+
), H = C(y);
|
|
870
|
+
ie(() => {
|
|
871
|
+
H.current = y;
|
|
872
|
+
}, [y]), ie(() => {
|
|
873
|
+
const p = N ? w : 0, $ = `${p}px`;
|
|
874
|
+
document.documentElement.style.setProperty("--aiquants-menu-pinned-width", $), Te(N, p, S || N);
|
|
875
|
+
}, [N, w, S]), ie(() => () => {
|
|
876
|
+
document.documentElement.style.setProperty("--aiquants-menu-pinned-width", "0px"), Te(!1, 0);
|
|
779
877
|
}, []);
|
|
780
|
-
const
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
S(!1);
|
|
787
|
-
try {
|
|
788
|
-
localStorage.removeItem("aiquants-menu-pinned");
|
|
789
|
-
} catch {
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
H.current?.(!1, 0);
|
|
793
|
-
}, [x, P]), G = _(() => {
|
|
794
|
-
const h = !k, e = h ? y : 0;
|
|
795
|
-
if (x === void 0) {
|
|
796
|
-
S(h);
|
|
797
|
-
try {
|
|
798
|
-
h ? localStorage.setItem("aiquants-menu-pinned", "true") : localStorage.removeItem("aiquants-menu-pinned");
|
|
799
|
-
} catch {
|
|
878
|
+
const X = C(null), n = C(null), l = C(null), m = Ue(), f = _(() => {
|
|
879
|
+
const p = document.activeElement;
|
|
880
|
+
if (!(p === null || !l.current?.contains(p))) {
|
|
881
|
+
if (!Z) {
|
|
882
|
+
X.current?.focus();
|
|
883
|
+
return;
|
|
800
884
|
}
|
|
885
|
+
(p instanceof HTMLElement || p instanceof SVGElement) && p.blur(), n.current?.focus();
|
|
801
886
|
}
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
887
|
+
}, [Z]), I = C(M);
|
|
888
|
+
ie(() => {
|
|
889
|
+
const p = I.current;
|
|
890
|
+
I.current = M, p && !M && R && (f(), q(!1));
|
|
891
|
+
}, [M, R, f]);
|
|
892
|
+
const B = _(() => {
|
|
893
|
+
q(!0);
|
|
894
|
+
}, []), h = _(() => {
|
|
895
|
+
f(), q(!1), M && (b === void 0 && (te(!1), Se(!1)), H.current?.(!1, 0));
|
|
896
|
+
}, [M, b, f]), A = _(() => {
|
|
897
|
+
const p = !R, $ = p ? w : 0;
|
|
898
|
+
b === void 0 && (te(p), Se(p)), H.current?.(p, $);
|
|
899
|
+
}, [R, b, w]), Y = _(
|
|
900
|
+
(p) => {
|
|
901
|
+
x && x(p), N || (f(), q(!1));
|
|
806
902
|
},
|
|
807
|
-
[
|
|
808
|
-
),
|
|
809
|
-
(
|
|
810
|
-
|
|
903
|
+
[x, N, f]
|
|
904
|
+
), V = _(
|
|
905
|
+
(p) => {
|
|
906
|
+
p.key === "Escape" && h();
|
|
811
907
|
},
|
|
812
|
-
[
|
|
813
|
-
),
|
|
814
|
-
return
|
|
815
|
-
window.removeEventListener("keydown",
|
|
816
|
-
}), [
|
|
817
|
-
/* @__PURE__ */ r.jsx(
|
|
908
|
+
[h]
|
|
909
|
+
), we = L === !0 || L === "auto" && !N;
|
|
910
|
+
return ee(() => (S && we ? window.addEventListener("keydown", V) : window.removeEventListener("keydown", V), () => {
|
|
911
|
+
window.removeEventListener("keydown", V);
|
|
912
|
+
}), [S, we, V]), P ? null : /* @__PURE__ */ r.jsxs("div", { className: `aiquants-menu-bar ${c}`, children: [
|
|
913
|
+
D === null ? null : /* @__PURE__ */ r.jsx("style", { nonce: v?.nonce, suppressHydrationWarning: !0, children: D }),
|
|
914
|
+
/* @__PURE__ */ r.jsx(Gt, { ref: X, isMenuOpen: S, onMenuOpen: B, onMenuClose: h }),
|
|
915
|
+
J === null ? null : /* @__PURE__ */ r.jsx(Ut, { tabs: J, menuList: t, menuOpen: S, drawerId: m, onMenuOpen: B, onMenuClose: h, onTabSelected: Y, menuTabRef: n }),
|
|
818
916
|
/* @__PURE__ */ r.jsx(
|
|
819
|
-
|
|
917
|
+
It,
|
|
820
918
|
{
|
|
821
|
-
ref:
|
|
822
|
-
|
|
919
|
+
ref: l,
|
|
920
|
+
id: J === null ? void 0 : m,
|
|
921
|
+
menuList: t,
|
|
823
922
|
menuHeader: a,
|
|
824
923
|
onClickSignout: s,
|
|
825
|
-
onMenuSelected:
|
|
826
|
-
open:
|
|
827
|
-
theme:
|
|
924
|
+
onMenuSelected: Y,
|
|
925
|
+
open: S,
|
|
926
|
+
theme: c,
|
|
828
927
|
toggleTheme: d,
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
928
|
+
canPin: M,
|
|
929
|
+
isPinned: N,
|
|
930
|
+
onTogglePin: A,
|
|
931
|
+
pinnedSubmenuIds: re,
|
|
932
|
+
onToggleSubmenuPin: ae
|
|
833
933
|
}
|
|
834
934
|
),
|
|
835
|
-
/* @__PURE__ */ r.jsx(
|
|
935
|
+
/* @__PURE__ */ r.jsx(Lt, { isOverlay: S && !N, onOverlayClick: h })
|
|
836
936
|
] });
|
|
837
937
|
};
|
|
838
938
|
export {
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
939
|
+
ct as DefaultLink,
|
|
940
|
+
pe as MENU_PIN_CHANGE_EVENT,
|
|
941
|
+
sn as MenuBar,
|
|
942
|
+
rn as SessionInfo,
|
|
943
|
+
Te as dispatchMenuPinChange,
|
|
944
|
+
ze as getInitialPinState,
|
|
945
|
+
ft as subscribeMenuPinChange,
|
|
946
|
+
an as useMenuPinState
|
|
847
947
|
};
|