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