@aiquants/menu-bar 1.13.1 → 1.15.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,150 @@
1
- import fe, { useMemo as Z, useState as Y, useRef as E, useEffect as A, useCallback as y, useLayoutEffect as me } from "react";
2
- import { Link as he, Lock as pe, Download as xe, BarChart as be, Table as ge, FileText as G, Pin as ve, PinOff as ye } from "lucide-react";
3
- import { useLocation as ke, Link as re } from "react-router-dom";
4
- var P = { exports: {} }, R = {};
5
- var J;
1
+ import pe, { useMemo as ee, useState as D, useRef as T, useEffect as Y, useCallback as w, useLayoutEffect as he } from "react";
2
+ import { Pin as ie, PinOff as ce, Link as xe, Lock as be, Download as ge, BarChart as ve, Table as ye, FileText as ne } from "lucide-react";
3
+ import { useLocation as ke, Link as ue } from "react-router-dom";
4
+ var q = { exports: {} }, I = {};
5
+ var re;
6
6
  function we() {
7
- if (J) return R;
8
- J = 1;
9
- var t = /* @__PURE__ */ Symbol.for("react.transitional.element"), n = /* @__PURE__ */ Symbol.for("react.fragment");
10
- function s(l, c, d) {
7
+ if (re) return I;
8
+ re = 1;
9
+ var r = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
10
+ function a(l, c, i) {
11
11
  var u = null;
12
- if (d !== void 0 && (u = "" + d), c.key !== void 0 && (u = "" + c.key), "key" in c) {
13
- d = {};
12
+ if (i !== void 0 && (u = "" + i), c.key !== void 0 && (u = "" + c.key), "key" in c) {
13
+ i = {};
14
14
  for (var h in c)
15
- h !== "key" && (d[h] = c[h]);
16
- } else d = c;
17
- return c = d.ref, {
18
- $$typeof: t,
15
+ h !== "key" && (i[h] = c[h]);
16
+ } else i = c;
17
+ return c = i.ref, {
18
+ $$typeof: r,
19
19
  type: l,
20
20
  key: u,
21
21
  ref: c !== void 0 ? c : null,
22
- props: d
22
+ props: i
23
23
  };
24
24
  }
25
- return R.Fragment = n, R.jsx = s, R.jsxs = s, R;
25
+ return I.Fragment = t, I.jsx = a, I.jsxs = a, I;
26
26
  }
27
- var C = {};
28
- var B;
27
+ var M = {};
28
+ var te;
29
29
  function je() {
30
- return B || (B = 1, process.env.NODE_ENV !== "production" && (function() {
31
- function t(e) {
30
+ return te || (te = 1, process.env.NODE_ENV !== "production" && (function() {
31
+ function r(e) {
32
32
  if (e == null) return null;
33
33
  if (typeof e == "function")
34
- return e.$$typeof === ce ? null : e.displayName || e.name || null;
34
+ return e.$$typeof === _ ? null : e.displayName || e.name || null;
35
35
  if (typeof e == "string") return e;
36
36
  switch (e) {
37
- case N:
37
+ case S:
38
38
  return "Fragment";
39
- case b:
40
- return "Profiler";
41
39
  case j:
40
+ return "Profiler";
41
+ case O:
42
42
  return "StrictMode";
43
- case se:
43
+ case F:
44
44
  return "Suspense";
45
- case ae:
45
+ case W:
46
46
  return "SuspenseList";
47
- case ie:
47
+ case E:
48
48
  return "Activity";
49
49
  }
50
50
  if (typeof e == "object")
51
51
  switch (typeof e.tag == "number" && console.error(
52
52
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
53
53
  ), e.$$typeof) {
54
- case T:
54
+ case N:
55
55
  return "Portal";
56
- case ne:
56
+ case z:
57
57
  return e.displayName || "Context";
58
- case S:
58
+ case $:
59
59
  return (e._context.displayName || "Context") + ".Consumer";
60
- case oe:
60
+ case R:
61
61
  var o = e.render;
62
62
  return e = e.displayName, e || (e = o.displayName || o.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
63
- case le:
64
- return o = e.displayName || null, o !== null ? o : t(e.type) || "Memo";
65
- case M:
63
+ case P:
64
+ return o = e.displayName || null, o !== null ? o : r(e.type) || "Memo";
65
+ case y:
66
66
  o = e._payload, e = e._init;
67
67
  try {
68
- return t(e(o));
68
+ return r(e(o));
69
69
  } catch {
70
70
  }
71
71
  }
72
72
  return null;
73
73
  }
74
- function n(e) {
74
+ function t(e) {
75
75
  return "" + e;
76
76
  }
77
- function s(e) {
77
+ function a(e) {
78
78
  try {
79
- n(e);
79
+ t(e);
80
80
  var o = !1;
81
81
  } catch {
82
82
  o = !0;
83
83
  }
84
84
  if (o) {
85
85
  o = console;
86
- var m = o.error, g = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
87
- return m.call(
86
+ var p = o.error, x = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
87
+ return p.call(
88
88
  o,
89
89
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
90
- g
91
- ), n(e);
90
+ x
91
+ ), t(e);
92
92
  }
93
93
  }
94
94
  function l(e) {
95
- if (e === N) return "<>";
96
- if (typeof e == "object" && e !== null && e.$$typeof === M)
95
+ if (e === S) return "<>";
96
+ if (typeof e == "object" && e !== null && e.$$typeof === y)
97
97
  return "<...>";
98
98
  try {
99
- var o = t(e);
99
+ var o = r(e);
100
100
  return o ? "<" + o + ">" : "<...>";
101
101
  } catch {
102
102
  return "<...>";
103
103
  }
104
104
  }
105
105
  function c() {
106
- var e = L.A;
106
+ var e = A.A;
107
107
  return e === null ? null : e.getOwner();
108
108
  }
109
- function d() {
109
+ function i() {
110
110
  return Error("react-stack-top-frame");
111
111
  }
112
112
  function u(e) {
113
- if (z.call(e, "key")) {
113
+ if (Z.call(e, "key")) {
114
114
  var o = Object.getOwnPropertyDescriptor(e, "key").get;
115
115
  if (o && o.isReactWarning) return !1;
116
116
  }
117
117
  return e.key !== void 0;
118
118
  }
119
119
  function h(e, o) {
120
- function m() {
121
- F || (F = !0, console.error(
120
+ function p() {
121
+ G || (G = !0, console.error(
122
122
  "%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
123
  o
124
124
  ));
125
125
  }
126
- m.isReactWarning = !0, Object.defineProperty(e, "key", {
127
- get: m,
126
+ p.isReactWarning = !0, Object.defineProperty(e, "key", {
127
+ get: p,
128
128
  configurable: !0
129
129
  });
130
130
  }
131
- function x() {
132
- var e = t(this.type);
133
- return W[e] || (W[e] = !0, console.error(
131
+ function g() {
132
+ var e = r(this.type);
133
+ return B[e] || (B[e] = !0, console.error(
134
134
  "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
135
  )), e = this.props.ref, e !== void 0 ? e : null;
136
136
  }
137
- function i(e, o, m, g, O, q) {
138
- var v = m.ref;
137
+ function d(e, o, p, x, L, H) {
138
+ var b = p.ref;
139
139
  return e = {
140
- $$typeof: k,
140
+ $$typeof: m,
141
141
  type: e,
142
142
  key: o,
143
- props: m,
144
- _owner: g
145
- }, (v !== void 0 ? v : null) !== null ? Object.defineProperty(e, "ref", {
143
+ props: p,
144
+ _owner: x
145
+ }, (b !== void 0 ? b : null) !== null ? Object.defineProperty(e, "ref", {
146
146
  enumerable: !1,
147
- get: x
147
+ get: g
148
148
  }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
149
149
  configurable: !1,
150
150
  enumerable: !1,
@@ -159,324 +159,367 @@ function je() {
159
159
  configurable: !1,
160
160
  enumerable: !1,
161
161
  writable: !0,
162
- value: O
162
+ value: L
163
163
  }), Object.defineProperty(e, "_debugTask", {
164
164
  configurable: !1,
165
165
  enumerable: !1,
166
166
  writable: !0,
167
- value: q
167
+ value: H
168
168
  }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
169
169
  }
170
- function p(e, o, m, g, O, q) {
171
- var v = o.children;
172
- if (v !== void 0)
173
- if (g)
174
- if (ue(v)) {
175
- for (g = 0; g < v.length; g++)
176
- a(v[g]);
177
- Object.freeze && Object.freeze(v);
170
+ function f(e, o, p, x, L, H) {
171
+ var b = o.children;
172
+ if (b !== void 0)
173
+ if (x)
174
+ if (fe(b)) {
175
+ for (x = 0; x < b.length; x++)
176
+ k(b[x]);
177
+ Object.freeze && Object.freeze(b);
178
178
  } else
179
179
  console.error(
180
180
  "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
181
  );
182
- else a(v);
183
- if (z.call(o, "key")) {
184
- v = t(e);
185
- var _ = Object.keys(o).filter(function(de) {
186
- return de !== "key";
182
+ else k(b);
183
+ if (Z.call(o, "key")) {
184
+ b = r(e);
185
+ var C = Object.keys(o).filter(function(me) {
186
+ return me !== "key";
187
187
  });
188
- g = 0 < _.length ? "{key: someKey, " + _.join(": ..., ") + ": ...}" : "{key: someKey}", V[v + g] || (_ = 0 < _.length ? "{" + _.join(": ..., ") + ": ...}" : "{}", console.error(
188
+ x = 0 < C.length ? "{key: someKey, " + C.join(": ..., ") + ": ...}" : "{key: someKey}", K[b + x] || (C = 0 < C.length ? "{" + C.join(": ..., ") + ": ...}" : "{}", console.error(
189
189
  `A props object containing a "key" prop is being spread into JSX:
190
190
  let props = %s;
191
191
  <%s {...props} />
192
192
  React keys must be passed directly to JSX without using spread:
193
193
  let props = %s;
194
194
  <%s key={someKey} {...props} />`,
195
- g,
196
- v,
197
- _,
198
- v
199
- ), V[v + g] = !0);
195
+ x,
196
+ b,
197
+ C,
198
+ b
199
+ ), K[b + x] = !0);
200
200
  }
201
- if (v = null, m !== void 0 && (s(m), v = "" + m), u(o) && (s(o.key), v = "" + o.key), "key" in o) {
202
- m = {};
203
- for (var D in o)
204
- D !== "key" && (m[D] = o[D]);
205
- } else m = o;
206
- return v && h(
207
- m,
201
+ if (b = null, p !== void 0 && (a(p), b = "" + p), u(o) && (a(o.key), b = "" + o.key), "key" in o) {
202
+ p = {};
203
+ for (var J in o)
204
+ J !== "key" && (p[J] = o[J]);
205
+ } else p = o;
206
+ return b && h(
207
+ p,
208
208
  typeof e == "function" ? e.displayName || e.name || "Unknown" : e
209
- ), i(
209
+ ), d(
210
210
  e,
211
- v,
212
- m,
211
+ b,
212
+ p,
213
213
  c(),
214
- O,
215
- q
214
+ L,
215
+ H
216
216
  );
217
217
  }
218
- function a(e) {
219
- f(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === M && (e._payload.status === "fulfilled" ? f(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
218
+ function k(e) {
219
+ v(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === y && (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
220
  }
221
- function f(e) {
222
- return typeof e == "object" && e !== null && e.$$typeof === k;
221
+ function v(e) {
222
+ return typeof e == "object" && e !== null && e.$$typeof === m;
223
223
  }
224
- var w = fe, k = /* @__PURE__ */ Symbol.for("react.transitional.element"), T = /* @__PURE__ */ Symbol.for("react.portal"), N = /* @__PURE__ */ Symbol.for("react.fragment"), j = /* @__PURE__ */ Symbol.for("react.strict_mode"), b = /* @__PURE__ */ Symbol.for("react.profiler"), S = /* @__PURE__ */ Symbol.for("react.consumer"), ne = /* @__PURE__ */ Symbol.for("react.context"), oe = /* @__PURE__ */ Symbol.for("react.forward_ref"), se = /* @__PURE__ */ Symbol.for("react.suspense"), ae = /* @__PURE__ */ Symbol.for("react.suspense_list"), le = /* @__PURE__ */ Symbol.for("react.memo"), M = /* @__PURE__ */ Symbol.for("react.lazy"), ie = /* @__PURE__ */ Symbol.for("react.activity"), ce = /* @__PURE__ */ Symbol.for("react.client.reference"), L = w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, z = Object.prototype.hasOwnProperty, ue = Array.isArray, I = console.createTask ? console.createTask : function() {
224
+ var s = pe, m = /* @__PURE__ */ Symbol.for("react.transitional.element"), N = /* @__PURE__ */ Symbol.for("react.portal"), S = /* @__PURE__ */ Symbol.for("react.fragment"), O = /* @__PURE__ */ Symbol.for("react.strict_mode"), j = /* @__PURE__ */ Symbol.for("react.profiler"), $ = /* @__PURE__ */ Symbol.for("react.consumer"), z = /* @__PURE__ */ Symbol.for("react.context"), R = /* @__PURE__ */ Symbol.for("react.forward_ref"), F = /* @__PURE__ */ Symbol.for("react.suspense"), W = /* @__PURE__ */ Symbol.for("react.suspense_list"), P = /* @__PURE__ */ Symbol.for("react.memo"), y = /* @__PURE__ */ Symbol.for("react.lazy"), E = /* @__PURE__ */ Symbol.for("react.activity"), _ = /* @__PURE__ */ Symbol.for("react.client.reference"), A = s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Z = Object.prototype.hasOwnProperty, fe = Array.isArray, U = console.createTask ? console.createTask : function() {
225
225
  return null;
226
226
  };
227
- w = {
227
+ s = {
228
228
  react_stack_bottom_frame: function(e) {
229
229
  return e();
230
230
  }
231
231
  };
232
- var F, W = {}, U = w.react_stack_bottom_frame.bind(
233
- w,
234
- d
235
- )(), H = I(l(d)), V = {};
236
- C.Fragment = N, C.jsx = function(e, o, m) {
237
- var g = 1e4 > L.recentlyCreatedOwnerStacks++;
238
- return p(
232
+ var G, B = {}, Q = s.react_stack_bottom_frame.bind(
233
+ s,
234
+ i
235
+ )(), X = U(l(i)), K = {};
236
+ M.Fragment = S, M.jsx = function(e, o, p) {
237
+ var x = 1e4 > A.recentlyCreatedOwnerStacks++;
238
+ return f(
239
239
  e,
240
240
  o,
241
- m,
241
+ p,
242
242
  !1,
243
- g ? Error("react-stack-top-frame") : U,
244
- g ? I(l(e)) : H
243
+ x ? Error("react-stack-top-frame") : Q,
244
+ x ? U(l(e)) : X
245
245
  );
246
- }, C.jsxs = function(e, o, m) {
247
- var g = 1e4 > L.recentlyCreatedOwnerStacks++;
248
- return p(
246
+ }, M.jsxs = function(e, o, p) {
247
+ var x = 1e4 > A.recentlyCreatedOwnerStacks++;
248
+ return f(
249
249
  e,
250
250
  o,
251
- m,
251
+ p,
252
252
  !0,
253
- g ? Error("react-stack-top-frame") : U,
254
- g ? I(l(e)) : H
253
+ x ? Error("react-stack-top-frame") : Q,
254
+ x ? U(l(e)) : X
255
255
  );
256
256
  };
257
- })()), C;
257
+ })()), M;
258
258
  }
259
- var Q;
259
+ var se;
260
260
  function Ee() {
261
- return Q || (Q = 1, process.env.NODE_ENV === "production" ? P.exports = we() : P.exports = je()), P.exports;
261
+ return se || (se = 1, process.env.NODE_ENV === "production" ? q.exports = we() : q.exports = je()), q.exports;
262
262
  }
263
- var r = Ee();
264
- const Ne = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iI2NiZDVlMSI+PHBhdGggZD0iTTEyIDEyYzIuMjEgMCA0LTEuNzkgNC00cy0xLjc5LTQtNC00LTQgMS43OS00IDQgMS43OSA0IDQgNHptMCAyYy0yLjY3IDAtOCAxLjM0LTggNHYyaDE2di0yYzAtMi42Ni01LjMzLTQtOC00eiIvPjwvc3ZnPg==", _e = ({ to: t, className: n, children: s }) => /* @__PURE__ */ r.jsx("a", { href: t, className: n, children: s }), qe = (t) => {
265
- const { user: n, LinkComponent: s = _e } = t;
266
- return /* @__PURE__ */ r.jsx("div", { className: "max-h-20 max-w-52", children: /* @__PURE__ */ r.jsx("div", { className: "flex grow flex-col", children: n ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
267
- /* @__PURE__ */ r.jsxs("div", { className: "flex flex-row", children: [
268
- /* @__PURE__ */ r.jsx("div", { className: "aiquants-session-photo m-1 h-14 w-14 p-0.5", children: /* @__PURE__ */ r.jsx("img", { className: "object-contain", src: n.photo || Ne, "aria-label": "profile photo" }) }),
269
- /* @__PURE__ */ r.jsxs("div", { className: "mx-1 flex flex-col", children: [
270
- /* @__PURE__ */ r.jsx(s, { className: "aiquants-session-link my-1 rounded-lg px-2 text-center text-xs", to: "/", children: "プロフィールを編集" }),
271
- /* @__PURE__ */ r.jsx(s, { className: "aiquants-session-link rounded-lg px-2 text-center text-xs", to: "/", children: "プロフィール" }),
272
- /* @__PURE__ */ r.jsx(s, { className: "aiquants-session-link my-1 rounded-lg px-2 text-center text-xs", to: "https://myaccount.google.com/", children: "Google Account" })
263
+ var n = Ee();
264
+ const Ne = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iI2NiZDVlMSI+PHBhdGggZD0iTTEyIDEyYzIuMjEgMCA0LTEuNzkgNC00cy0xLjc5LTQtNC00LTQgMS43OS00IDQgMS43OSA0IDQgNHptMCAyYy0yLjY3IDAtOCAxLjM0LTggNHYyaDE2di0yYzAtMi42Ni01LjMzLTQtOC00eiIvPjwvc3ZnPg==", Se = ({ to: r, className: t, children: a }) => /* @__PURE__ */ n.jsx("a", { href: r, className: t, children: a }), qe = (r) => {
265
+ const { user: t, LinkComponent: a = Se } = r;
266
+ return /* @__PURE__ */ n.jsx("div", { className: "max-h-20 max-w-52", children: /* @__PURE__ */ n.jsx("div", { className: "flex grow flex-col", children: t ? /* @__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: t.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" })
273
273
  ] })
274
274
  ] }),
275
- /* @__PURE__ */ r.jsx("div", { className: "aiquants-session-info mb-1 min-h-[1em] w-full rounded-r-lg px-2 py-0.5 text-xs", children: n.displayName })
276
- ] }) : /* @__PURE__ */ r.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
- }, te = new RegExp(/(^https?:\/\/)|(\.(html|htm)?$)/), Te = {
278
- report: G,
279
- slip: G,
280
- table: ge,
281
- chart: be,
282
- download: xe,
283
- lock: pe,
284
- href: he
285
- }, Re = ({ mark: t, children: n }) => {
286
- const s = t ? Te[t] : void 0;
287
- return s ? /* @__PURE__ */ r.jsxs("div", { className: "flex flex-nowrap items-center", children: [
288
- /* @__PURE__ */ r.jsx(s, { className: "h-4 w-4" }),
289
- /* @__PURE__ */ r.jsx("div", { className: "aiquants-menu-link mx-1 hover:underline", children: n })
290
- ] }) : /* @__PURE__ */ r.jsx("span", { className: "mx-1 text-sky-600 hover:underline dark:text-sky-400", children: n });
291
- }, $ = (t, n) => n ? {
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: t.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
+ }, de = new RegExp(/(^https?:\/\/)|(\.(html|htm)?$)/), Te = {
278
+ report: ne,
279
+ slip: ne,
280
+ table: ye,
281
+ chart: ve,
282
+ download: ge,
283
+ lock: be,
284
+ href: xe
285
+ }, _e = ({ mark: r, children: t }) => {
286
+ const a = r ? Te[r] : 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: t })
290
+ ] }) : /* @__PURE__ */ n.jsx("span", { className: "mx-1 text-sky-600 hover:underline dark:text-sky-400", children: t });
291
+ }, V = (r, t) => t ? {
292
292
  menu: {
293
- id: t.id,
294
- title: t.title,
295
- href: t.href
293
+ id: r.id,
294
+ title: r.title,
295
+ href: r.href
296
296
  },
297
297
  submenu: {
298
- subid: n.subid,
299
- title: n.title,
300
- href: n.href,
301
- mark: n.mark,
302
- new: n.new
298
+ subid: t.subid,
299
+ title: t.title,
300
+ href: t.href,
301
+ mark: t.mark,
302
+ new: t.new
303
303
  }
304
304
  } : {
305
305
  menu: {
306
- id: t.id,
307
- title: t.title,
308
- href: t.href
306
+ id: r.id,
307
+ title: r.title,
308
+ href: r.href
309
309
  }
310
- }, Ce = ({ item: t, parentMenu: n, onMenuSelected: s }) => {
311
- if (t.href === "separator")
312
- return /* @__PURE__ */ r.jsx("hr", { className: "aiquants-menu-separator mx-2 my-1 h-px" });
313
- const l = /* @__PURE__ */ r.jsx(Re, { mark: t.mark, children: t.title }), c = {
310
+ }, Re = ({ item: r, parentMenu: t, onMenuSelected: a }) => {
311
+ if (r.href === "separator")
312
+ return /* @__PURE__ */ n.jsx("hr", { className: "aiquants-menu-separator mx-2 my-1 h-px" });
313
+ const l = /* @__PURE__ */ n.jsx(_e, { mark: r.mark, children: r.title }), c = {
314
314
  onClick: () => {
315
- s && s($(n, t));
315
+ a && a(V(t, r));
316
316
  }
317
317
  };
318
- return t.new ? /* @__PURE__ */ r.jsx("a", { href: t.href, rel: "noopener noreferrer", target: "_blank", ...c, children: l }) : te.test(t.href) ? /* @__PURE__ */ r.jsx("a", { href: t.href, ...c, children: l }) : /* @__PURE__ */ r.jsx(re, { to: t.href, ...c, children: l });
319
- }, X = (t) => t ? t.split(/[?#]/)[0].replace(/(?!^\/)\/$/, "") : "", K = (t, n) => {
320
- const s = n !== "/" && n.endsWith("/") ? n.slice(0, -1) : n;
321
- for (const l of t) {
322
- if (X(l.href) === s)
318
+ return r.new ? /* @__PURE__ */ n.jsx("a", { href: r.href, rel: "noopener noreferrer", target: "_blank", ...c, children: l }) : de.test(r.href) ? /* @__PURE__ */ n.jsx("a", { href: r.href, ...c, children: l }) : /* @__PURE__ */ n.jsx(ue, { to: r.href, ...c, children: l });
319
+ }, oe = (r) => r ? r.split(/[?#]/)[0].replace(/(?!^\/)\/$/, "") : "", ae = (r, t) => {
320
+ const a = t !== "/" && t.endsWith("/") ? t.slice(0, -1) : t;
321
+ for (const l of r) {
322
+ if (oe(l.href) === a)
323
323
  return l.id;
324
324
  if (l.submenu) {
325
325
  for (const c of l.submenu)
326
- if (X(c.href) === s)
326
+ if (oe(c.href) === a)
327
327
  return l.id;
328
328
  }
329
329
  }
330
330
  return null;
331
- }, Se = (t) => {
332
- const { menuList: n, onMenuSelected: s } = t;
333
- let l = "";
331
+ }, Pe = (r) => {
332
+ const { menuList: t, onMenuSelected: a, pinnedSubmenuIds: l = [], onToggleSubmenuPin: c } = r;
333
+ let i = "";
334
334
  try {
335
- l = ke().pathname;
335
+ i = ke().pathname;
336
336
  } catch {
337
- typeof window < "u" && (l = window.location.pathname);
337
+ typeof window < "u" && (i = window.location.pathname);
338
338
  }
339
- const c = Z(() => K(n, l), [n, l]), [d, u] = Y(c), h = E(l), x = E(c !== null);
340
- A(() => {
341
- if (h.current !== l && (h.current = l, x.current = !1), !x.current) {
342
- const a = K(n, l);
343
- a !== null && (u(a), x.current = !0);
339
+ const u = ee(() => ae(t, i), [t, i]), [h, g] = D(u), d = T(i), f = T(u !== null);
340
+ Y(() => {
341
+ if (d.current !== i && (d.current = i, f.current = !1), !f.current) {
342
+ const s = ae(t, i);
343
+ s !== null && (g(s), f.current = !0);
344
344
  }
345
- }, [l, n]);
346
- const i = y((a) => {
347
- u((f) => f === a ? null : a);
348
- }, []), p = Z(() => /* @__PURE__ */ r.jsx(r.Fragment, { children: n.map((a) => /* @__PURE__ */ r.jsx("div", { children: a.href ? /* @__PURE__ */ r.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: te.test(a.href) ? /* @__PURE__ */ r.jsx(
345
+ }, [i, t]);
346
+ const k = w(
347
+ (s) => {
348
+ l.includes(s) || g((N) => N === s ? null : s);
349
+ },
350
+ [l]
351
+ ), v = ee(() => /* @__PURE__ */ n.jsx(n.Fragment, { children: t.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: de.test(s.href) ? /* @__PURE__ */ n.jsx(
349
352
  "a",
350
353
  {
351
- href: a.href,
354
+ href: s.href,
352
355
  onClick: () => {
353
- s && s($(a));
356
+ a && a(V(s));
354
357
  },
355
- children: /* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-link hover:underline", children: a.title })
358
+ children: /* @__PURE__ */ n.jsx("span", { className: "aiquants-menu-link hover:underline", children: s.title })
356
359
  }
357
- ) : /* @__PURE__ */ r.jsx(
358
- re,
360
+ ) : /* @__PURE__ */ n.jsx(
361
+ ue,
359
362
  {
360
- to: a.href,
363
+ to: s.href,
361
364
  onClick: () => {
362
- s && s($(a));
365
+ a && a(V(s));
363
366
  },
364
- children: /* @__PURE__ */ r.jsx("span", { className: "aiquants-menu-link hover:underline", children: a.title })
367
+ children: /* @__PURE__ */ n.jsx("span", { className: "aiquants-menu-link hover:underline", children: s.title })
365
368
  }
366
- ) }) : /* @__PURE__ */ r.jsxs("details", { className: "menu-accordion-details", open: a.id === d, children: [
367
- /* @__PURE__ */ r.jsx(
369
+ ) }) : /* @__PURE__ */ n.jsxs("details", { className: "aiquants-menu-accordion-details", open: s.id === h || l.includes(s.id), children: [
370
+ /* @__PURE__ */ n.jsxs(
368
371
  "summary",
369
372
  {
370
- className: "aiquants-menu-list-item menu-accordion-summary relative mb-1 ml-1 h-full list-none rounded-l-2xl p-2 align-middle text-sm outline-none before:-mt-1 before:mr-2 before:inline-block before:h-4 before:w-4 before:rounded-full before:align-middle before:content-['']",
371
- onClick: (f) => {
372
- f.preventDefault(), i(a.id);
373
+ 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-['']",
374
+ onClick: (m) => {
375
+ m.preventDefault(), k(s.id);
373
376
  },
374
- onKeyDown: (f) => {
375
- (f.key === "Enter" || f.key === " ") && (f.preventDefault(), i(a.id));
377
+ onKeyDown: (m) => {
378
+ (m.key === "Enter" || m.key === " ") && (m.preventDefault(), k(s.id));
376
379
  },
377
- children: /* @__PURE__ */ r.jsx("span", { children: a.title })
380
+ children: [
381
+ /* @__PURE__ */ n.jsx("span", { children: s.title }),
382
+ /* @__PURE__ */ n.jsx(
383
+ "button",
384
+ {
385
+ type: "button",
386
+ onClick: (m) => {
387
+ m.stopPropagation(), m.preventDefault(), c && c(s.id);
388
+ },
389
+ className: `aiquants-submenu-pin-button ${l.includes(s.id) ? "pinned" : ""}`,
390
+ title: l.includes(s.id) ? "ピン留め解除" : "ピン留め",
391
+ children: l.includes(s.id) ? /* @__PURE__ */ n.jsx(ie, { size: 14 }) : /* @__PURE__ */ n.jsx(ce, { size: 14 })
392
+ }
393
+ )
394
+ ]
378
395
  }
379
396
  ),
380
- /* @__PURE__ */ r.jsx("div", { className: "aiquants-menu-submenu pointer-events-auto my-1 mr-1 ml-4 rounded p-2 shadow-md", children: a.submenu.map((f) => /* @__PURE__ */ r.jsx("div", { className: "menu-accordion-container block w-full whitespace-nowrap text-sm", children: /* @__PURE__ */ r.jsx(Ce, { item: f, parentMenu: a, onMenuSelected: s }) }, f.subid)) })
381
- ] }) }, a.id)) }), [n, s, d, i]);
382
- return /* @__PURE__ */ r.jsx("div", { className: "hidden-scrollbar h-0 grow overflow-y-scroll", children: p });
383
- }, Oe = (t) => {
384
- const { menuList: n, menuHeader: s, open: l, onMenuSelected: c, onClickSignout: d, theme: u, toggleTheme: h, isPinned: x, onTogglePin: i } = t;
385
- return /* @__PURE__ */ r.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: [
386
- /* @__PURE__ */ r.jsx("div", { className: "flex h-[100px] flex-col", children: s }),
387
- /* @__PURE__ */ r.jsx("div", { className: "flex grow flex-col", children: /* @__PURE__ */ r.jsx(Se, { menuList: n, onMenuSelected: c }) }),
388
- /* @__PURE__ */ r.jsx("div", { className: "px-4 pt-2 pb-4", children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
389
- /* @__PURE__ */ r.jsx(
397
+ /* @__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(Re, { item: m, parentMenu: s, onMenuSelected: a }) }, m.subid)) })
398
+ ] }) }, s.id)) }), [t, a, h, k, l]);
399
+ return /* @__PURE__ */ n.jsx("div", { className: "hidden-scrollbar h-0 grow overflow-y-scroll", children: v });
400
+ }, Ce = (r) => {
401
+ const { menuList: t, menuHeader: a, open: l, onMenuSelected: c, onClickSignout: i, theme: u, toggleTheme: h, isPinned: g, onTogglePin: d, pinnedSubmenuIds: f, onToggleSubmenuPin: k } = r;
402
+ 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: [
403
+ /* @__PURE__ */ n.jsx("div", { className: "flex h-[100px] flex-col", children: a }),
404
+ /* @__PURE__ */ n.jsx("div", { className: "flex grow flex-col", children: /* @__PURE__ */ n.jsx(Pe, { menuList: t, onMenuSelected: c, pinnedSubmenuIds: f, onToggleSubmenuPin: k }) }),
405
+ /* @__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: [
406
+ /* @__PURE__ */ n.jsx(
390
407
  "button",
391
408
  {
392
409
  type: "button",
393
- onClick: i,
394
- 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 ${x ? "bg-amber-500/90 hover:bg-amber-600" : "border border-white/15 bg-white/10 hover:bg-white/20"}`,
395
- title: x ? "ピン留め解除" : "ピン留め",
396
- children: x ? /* @__PURE__ */ r.jsx(ve, { size: 14 }) : /* @__PURE__ */ r.jsx(ye, { size: 14 })
410
+ onClick: d,
411
+ 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 ${g ? "bg-amber-500/90 hover:bg-amber-600" : "border border-white/15 bg-white/10 hover:bg-white/20"}`,
412
+ title: g ? "ピン留め解除" : "ピン留め",
413
+ children: g ? /* @__PURE__ */ n.jsx(ie, { size: 14 }) : /* @__PURE__ */ n.jsx(ce, { size: 14 })
397
414
  }
398
415
  ),
399
- /* @__PURE__ */ r.jsxs(
416
+ /* @__PURE__ */ n.jsxs(
400
417
  "button",
401
418
  {
402
419
  type: "button",
403
420
  onClick: h,
404
421
  className: "group relative flex flex-1 items-center gap-2 rounded-lg border border-white/15 bg-white/10 px-3 py-2 font-medium 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",
405
422
  children: [
406
- /* @__PURE__ */ r.jsx("div", { className: "flex h-5 w-5 items-center justify-center rounded-full bg-white/20 backdrop-blur-sm transition-all duration-300 group-hover:scale-110 group-hover:bg-white/30 dark:bg-gray-600/60 dark:group-hover:bg-gray-500/70", children: /* @__PURE__ */ r.jsx("span", { className: "text-sm transition-transform duration-300 group-hover:scale-110", children: u === "dark" ? "🌞" : "🌙" }) }),
407
- /* @__PURE__ */ r.jsx("span", { className: "text-white transition-colors duration-300 group-hover:text-white/90 dark:text-gray-200 dark:group-hover:text-white", children: u === "dark" ? "Light" : "Dark" }),
408
- /* @__PURE__ */ r.jsx("div", { className: "absolute inset-0 rounded-lg bg-gradient-to-r from-transparent via-white/5 to-transparent opacity-0 transition-opacity duration-300 group-hover:opacity-100 dark:via-gray-400/10" })
423
+ /* @__PURE__ */ n.jsx("div", { className: "flex h-5 w-5 items-center justify-center rounded-full bg-white/20 backdrop-blur-sm transition-all duration-300 group-hover:scale-110 group-hover:bg-white/30 dark:bg-gray-600/60 dark:group-hover:bg-gray-500/70", children: /* @__PURE__ */ n.jsx("span", { className: "text-sm transition-transform duration-300 group-hover:scale-110", children: u === "dark" ? "🌞" : "🌙" }) }),
424
+ /* @__PURE__ */ n.jsx("span", { className: "text-white transition-colors duration-300 group-hover:text-white/90 dark:text-gray-200 dark:group-hover:text-white", children: u === "dark" ? "Light" : "Dark" }),
425
+ /* @__PURE__ */ n.jsx("div", { className: "absolute inset-0 rounded-lg bg-gradient-to-r from-transparent via-white/5 to-transparent opacity-0 transition-opacity duration-300 group-hover:opacity-100 dark:via-gray-400/10" })
409
426
  ]
410
427
  }
411
428
  ),
412
- /* @__PURE__ */ r.jsx(
429
+ /* @__PURE__ */ n.jsx(
413
430
  "button",
414
431
  {
415
432
  type: "button",
416
433
  className: "aiquants-signout-button flex items-center justify-center 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",
417
- onClick: d,
434
+ onClick: i,
418
435
  children: "サインアウト"
419
436
  }
420
437
  )
421
438
  ] }) })
422
439
  ] });
423
- }, Pe = (t) => {
424
- const { isOverlay: n, onOverlayClick: s } = t;
425
- return /* @__PURE__ */ r.jsx("button", { type: "button", className: `fixed inset-0 z-2147483640 cursor-default bg-black/50 transition-opacity duration-500 ${n ? "opacity-100" : "pointer-events-none opacity-0"}`, onClick: s });
426
- }, Ae = (t) => {
427
- const { open: n, onMenuOpen: s, onMenuClose: l, theme: c } = t, d = E(n), u = E(null), h = E(null), x = E(null), i = E(null), p = E(null), a = y(() => {
428
- if (u.current && h.current && x.current && i.current && p.current) {
429
- const b = c === "dark" ? "#fff" : "#000";
430
- u.current.style.backgroundColor = b, u.current.style.width = "100%", u.current.style.height = "3px", u.current.style.transform = "", h.current.style.opacity = "1", h.current.style.backgroundColor = b, x.current.style.opacity = "1", x.current.style.backgroundColor = b, i.current.style.backgroundColor = b, i.current.style.width = "100%", i.current.style.height = "3px", i.current.style.transform = "", p.current.style.color = b, p.current.classList.remove("after:content-['close']"), p.current.classList.remove("after:ml-0.5"), p.current.classList.add("after:content-['menu']"), p.current.classList.add("after:-ml-0.5"), d.current = !0;
440
+ }, Oe = (r) => {
441
+ const { isOverlay: t, onOverlayClick: a } = r;
442
+ return /* @__PURE__ */ n.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: a });
443
+ }, Ae = (r) => {
444
+ const { open: t, onMenuOpen: a, onMenuClose: l, theme: c } = r, i = T(t), u = T(null), h = T(null), g = T(null), d = T(null), f = T(null), k = w(() => {
445
+ if (u.current && h.current && g.current && d.current && f.current) {
446
+ const j = c === "dark" ? "#fff" : "#000";
447
+ u.current.style.backgroundColor = j, u.current.style.width = "100%", u.current.style.height = "3px", u.current.style.transform = "", h.current.style.opacity = "1", h.current.style.backgroundColor = j, g.current.style.opacity = "1", g.current.style.backgroundColor = j, d.current.style.backgroundColor = j, d.current.style.width = "100%", d.current.style.height = "3px", d.current.style.transform = "", f.current.style.color = j, 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;
431
448
  }
432
- }, [c]), f = y(() => {
433
- u.current && h.current && x.current && i.current && p.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", x.current.style.opacity = "0", i.current.style.backgroundColor = "#fff", i.current.style.width = "32px", i.current.style.height = "4px", i.current.style.transform = "translateY(-9px) rotate(45deg)", p.current.style.color = "#fff", p.current.classList.remove("after:content-['menu']"), p.current.classList.remove("after:-ml-0.5"), p.current.classList.add("after:content-['close']"), p.current.classList.add("after:ml-0.5"), d.current = !1);
434
- }, []), w = y(() => {
435
- a(), l && l();
436
- }, [a, l]), k = y(() => {
437
- f(), s && s();
438
- }, [f, s]), T = y(() => {
439
- d.current ? k() : w();
440
- }, [w, k]), N = y((b) => {
441
- b.currentTarget.blur();
442
- }, []), j = y((b) => {
443
- b.preventDefault();
449
+ }, [c]), v = w(() => {
450
+ u.current && h.current && g.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", g.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);
451
+ }, []), s = w(() => {
452
+ k(), l && l();
453
+ }, [k, l]), m = w(() => {
454
+ v(), a && a();
455
+ }, [v, a]), N = w(() => {
456
+ i.current ? m() : s();
457
+ }, [s, m]), S = w((j) => {
458
+ j.currentTarget.blur();
459
+ }, []), O = w((j) => {
460
+ j.preventDefault();
444
461
  }, []);
445
- return A(() => {
446
- n ? a() : f();
447
- }, [n, a, f]), /* @__PURE__ */ r.jsxs("button", { type: "button", className: "aiquants-menu-switch fixed z-2147483647 inline-block h-[27px] w-[27px] cursor-pointer align-middle outline-hidden", onClick: T, onFocus: N, onMouseDown: j, tabIndex: -1, children: [
448
- /* @__PURE__ */ r.jsx("span", { className: "absolute top-0 left-0 box-border inline-block h-[3px] w-full select-none", ref: u }),
449
- /* @__PURE__ */ r.jsx("span", { className: "absolute top-1.5 left-0 box-border inline-block h-[3px] w-full select-none", ref: h }),
450
- /* @__PURE__ */ r.jsx("span", { className: "absolute top-3 left-0 box-border inline-block h-[3px] w-full select-none", ref: x }),
451
- /* @__PURE__ */ r.jsx("span", { className: "absolute top-[18px] left-0 box-border inline-block h-[3px] w-full select-none", ref: i }),
452
- /* @__PURE__ */ r.jsx("div", { className: "absolute w-full text-xs after:mt-2 after:block", ref: p })
462
+ return Y(() => {
463
+ t ? k() : v();
464
+ }, [t, k, v]), /* @__PURE__ */ n.jsxs("button", { type: "button", className: "aiquants-menu-switch fixed z-2147483647 inline-block h-[27px] w-[27px] cursor-pointer align-middle outline-hidden", onClick: N, onFocus: S, onMouseDown: O, tabIndex: -1, children: [
465
+ /* @__PURE__ */ n.jsx("span", { className: "absolute top-0 left-0 box-border inline-block h-[3px] w-full select-none", ref: u }),
466
+ /* @__PURE__ */ n.jsx("span", { className: "absolute top-1.5 left-0 box-border inline-block h-[3px] w-full select-none", ref: h }),
467
+ /* @__PURE__ */ n.jsx("span", { className: "absolute top-3 left-0 box-border inline-block h-[3px] w-full select-none", ref: g }),
468
+ /* @__PURE__ */ n.jsx("span", { className: "absolute top-[18px] left-0 box-border inline-block h-[3px] w-full select-none", ref: d }),
469
+ /* @__PURE__ */ n.jsx("div", { className: "absolute w-full text-xs after:mt-2 after:block", ref: f })
453
470
  ] });
454
- }, ee = typeof window < "u" ? me : A, De = (t) => {
455
- const { menuList: n, menuHeader: s, onClickSignout: l, isMenuhide: c, theme: d, toggleTheme: u, onMenuNavigate: h, onPinChange: x } = t, [i, p] = Y(() => {
471
+ }, le = typeof window < "u" ? he : Y, De = (r) => {
472
+ const { menuList: t, menuHeader: a, onClickSignout: l, isMenuhide: c, theme: i, toggleTheme: u, onMenuNavigate: h, onPinChange: g, pinnedSubmenuIds: d, initialPinnedSubmenuIds: f, onSubmenuPinChange: k } = r, [v, s] = D(() => {
456
473
  try {
457
474
  return localStorage.getItem("aiquants-menu-pinned") === "true";
458
475
  } catch {
459
476
  return !1;
460
477
  }
461
- }), [a, f] = Y(i);
462
- ee(() => {
463
- const b = i ? "250px" : "0px";
464
- document.documentElement.style.setProperty("--aiquants-menu-pinned-width", b), x?.(i);
465
- }, [i, x]), ee(() => () => {
478
+ }), [m, N] = D(v), [S, O] = D(() => {
479
+ if (f)
480
+ return f;
481
+ try {
482
+ const y = localStorage.getItem("aiquants-submenu-pinned");
483
+ if (y) {
484
+ const E = JSON.parse(y);
485
+ if (Array.isArray(E))
486
+ return E.filter((_) => typeof _ == "number");
487
+ }
488
+ } catch {
489
+ }
490
+ return [];
491
+ }), j = d !== void 0 ? d : S, $ = w(
492
+ (y) => {
493
+ const E = d !== void 0 ? d : S, _ = E.includes(y) ? E.filter((A) => A !== y) : [...E, y];
494
+ if (d === void 0) {
495
+ O(_);
496
+ try {
497
+ localStorage.setItem("aiquants-submenu-pinned", JSON.stringify(_));
498
+ } catch {
499
+ }
500
+ }
501
+ k && k(_);
502
+ },
503
+ [d, S, k]
504
+ );
505
+ le(() => {
506
+ const y = v ? "250px" : "0px";
507
+ document.documentElement.style.setProperty("--aiquants-menu-pinned-width", y), g?.(v);
508
+ }, [v, g]), le(() => () => {
466
509
  document.documentElement.style.setProperty("--aiquants-menu-pinned-width", "0px");
467
510
  }, []);
468
- const w = y(() => {
469
- f(!0);
470
- }, []), k = y(() => {
471
- f(!1), p(!1);
511
+ const z = w(() => {
512
+ N(!0);
513
+ }, []), R = w(() => {
514
+ N(!1), s(!1);
472
515
  try {
473
516
  localStorage.removeItem("aiquants-menu-pinned");
474
517
  } catch {
475
518
  }
476
- }, []), T = y(() => {
477
- p((b) => {
478
- const S = !b;
479
- if (S)
519
+ }, []), F = w(() => {
520
+ s((y) => {
521
+ const E = !y;
522
+ if (E)
480
523
  try {
481
524
  localStorage.setItem("aiquants-menu-pinned", "true");
482
525
  } catch {
@@ -486,30 +529,45 @@ const Ne = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMj
486
529
  localStorage.removeItem("aiquants-menu-pinned");
487
530
  } catch {
488
531
  }
489
- return S;
532
+ return E;
490
533
  });
491
- }, []), N = y(
492
- (b) => {
493
- h && h(b), i || f(!1);
534
+ }, []), W = w(
535
+ (y) => {
536
+ h && h(y), v || N(!1);
494
537
  },
495
- [h, i]
496
- ), j = y(
497
- (b) => {
498
- if (b.key === "Escape")
499
- return k(), !1;
538
+ [h, v]
539
+ ), P = w(
540
+ (y) => {
541
+ if (y.key === "Escape")
542
+ return R(), !1;
500
543
  },
501
- [k]
544
+ [R]
502
545
  );
503
- return A(() => (a ? window.addEventListener("keydown", j, { passive: !0 }) : window.removeEventListener("keydown", j), () => {
504
- window.removeEventListener("keydown", j);
505
- }), [a, j]), c ? null : /* @__PURE__ */ r.jsxs("div", { className: `aiquants-menu-bar ${d}`, children: [
506
- /* @__PURE__ */ r.jsx(Ae, { onMenuClose: k, onMenuOpen: w, open: !a, theme: d }),
507
- /* @__PURE__ */ r.jsx(Oe, { menuList: n, menuHeader: s, onClickSignout: l, onMenuSelected: N, open: a, theme: d, toggleTheme: u, isPinned: i, onTogglePin: T }),
508
- /* @__PURE__ */ r.jsx(Pe, { isOverlay: a && !i, onOverlayClick: k })
546
+ return Y(() => (m ? window.addEventListener("keydown", P, { passive: !0 }) : window.removeEventListener("keydown", P), () => {
547
+ window.removeEventListener("keydown", P);
548
+ }), [m, P]), c ? null : /* @__PURE__ */ n.jsxs("div", { className: `aiquants-menu-bar ${i}`, children: [
549
+ /* @__PURE__ */ n.jsx(Ae, { onMenuClose: R, onMenuOpen: z, open: !m, theme: i }),
550
+ /* @__PURE__ */ n.jsx(
551
+ Ce,
552
+ {
553
+ menuList: t,
554
+ menuHeader: a,
555
+ onClickSignout: l,
556
+ onMenuSelected: W,
557
+ open: m,
558
+ theme: i,
559
+ toggleTheme: u,
560
+ isPinned: v,
561
+ onTogglePin: F,
562
+ pinnedSubmenuIds: j,
563
+ onToggleSubmenuPin: $
564
+ }
565
+ ),
566
+ /* @__PURE__ */ n.jsx(Oe, { isOverlay: m && !v, onOverlayClick: R })
509
567
  ] });
510
568
  };
511
569
  export {
512
- _e as DefaultLink,
570
+ Se as DefaultLink,
513
571
  De as MenuBar,
514
572
  qe as SessionInfo
515
573
  };