god-button-action-button 0.1.0 → 0.1.1

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.js CHANGED
@@ -1,480 +1,8 @@
1
1
  import { useEffect as e, useId as t, useMemo as n, useRef as r, useState as i } from "react";
2
- import { Box as a, ButtonBase as o, Divider as s, Paper as c, Typography as l, useTheme as u } from "@mui/material";
3
- //#region \0rolldown/runtime.js
4
- var d = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), f = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
5
- if (typeof require < "u") return require.apply(this, arguments);
6
- throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
7
- }), p = /* @__PURE__ */ d(((e) => {
8
- var t = f("react"), n = Symbol.for("react.element"), r = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, a = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = {
9
- key: !0,
10
- ref: !0,
11
- __self: !0,
12
- __source: !0
13
- };
14
- function s(e, t, r) {
15
- var s, c = {}, l = null, u = null;
16
- for (s in r !== void 0 && (l = "" + r), t.key !== void 0 && (l = "" + t.key), t.ref !== void 0 && (u = t.ref), t) i.call(t, s) && !o.hasOwnProperty(s) && (c[s] = t[s]);
17
- if (e && e.defaultProps) for (s in t = e.defaultProps, t) c[s] === void 0 && (c[s] = t[s]);
18
- return {
19
- $$typeof: n,
20
- type: e,
21
- key: l,
22
- ref: u,
23
- props: c,
24
- _owner: a.current
25
- };
26
- }
27
- e.Fragment = r, e.jsx = s, e.jsxs = s;
28
- })), m = /* @__PURE__ */ d(((e) => {
29
- process.env.NODE_ENV !== "production" && (function() {
30
- var t = f("react"), n = Symbol.for("react.element"), r = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), c = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), h = Symbol.for("react.offscreen"), g = Symbol.iterator, _ = "@@iterator";
31
- function v(e) {
32
- if (typeof e != "object" || !e) return null;
33
- var t = g && e[g] || e[_];
34
- return typeof t == "function" ? t : null;
35
- }
36
- var y = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
37
- function b(e) {
38
- x("error", e, [...arguments].slice(1));
39
- }
40
- function x(e, t, n) {
41
- var r = y.ReactDebugCurrentFrame.getStackAddendum();
42
- r !== "" && (t += "%s", n = n.concat([r]));
43
- var i = n.map(function(e) {
44
- return String(e);
45
- });
46
- i.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, i);
47
- }
48
- var S = !1, C = !1, w = !1, T = !1, E = !1, D = Symbol.for("react.module.reference");
49
- function ee(e) {
50
- return !!(typeof e == "string" || typeof e == "function" || e === i || e === o || E || e === a || e === u || e === d || T || e === h || S || C || w || typeof e == "object" && e && (e.$$typeof === m || e.$$typeof === p || e.$$typeof === s || e.$$typeof === c || e.$$typeof === l || e.$$typeof === D || e.getModuleId !== void 0));
51
- }
52
- function te(e, t, n) {
53
- var r = e.displayName;
54
- if (r) return r;
55
- var i = t.displayName || t.name || "";
56
- return i === "" ? n : n + "(" + i + ")";
57
- }
58
- function ne(e) {
59
- return e.displayName || "Context";
60
- }
61
- function O(e) {
62
- if (e == null) return null;
63
- if (typeof e.tag == "number" && b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function") return e.displayName || e.name || null;
64
- if (typeof e == "string") return e;
65
- switch (e) {
66
- case i: return "Fragment";
67
- case r: return "Portal";
68
- case o: return "Profiler";
69
- case a: return "StrictMode";
70
- case u: return "Suspense";
71
- case d: return "SuspenseList";
72
- }
73
- if (typeof e == "object") switch (e.$$typeof) {
74
- case c: return ne(e) + ".Consumer";
75
- case s: return ne(e._context) + ".Provider";
76
- case l: return te(e, e.render, "ForwardRef");
77
- case p:
78
- var t = e.displayName || null;
79
- return t === null ? O(e.type) || "Memo" : t;
80
- case m:
81
- var n = e, f = n._payload, h = n._init;
82
- try {
83
- return O(h(f));
84
- } catch {
85
- return null;
86
- }
87
- }
88
- return null;
89
- }
90
- var k = Object.assign, A = 0, j, M, N, P, F, I, L;
91
- function re() {}
92
- re.__reactDisabledLog = !0;
93
- function ie() {
94
- if (A === 0) {
95
- j = console.log, M = console.info, N = console.warn, P = console.error, F = console.group, I = console.groupCollapsed, L = console.groupEnd;
96
- var e = {
97
- configurable: !0,
98
- enumerable: !0,
99
- value: re,
100
- writable: !0
101
- };
102
- Object.defineProperties(console, {
103
- info: e,
104
- log: e,
105
- warn: e,
106
- error: e,
107
- group: e,
108
- groupCollapsed: e,
109
- groupEnd: e
110
- });
111
- }
112
- A++;
113
- }
114
- function R() {
115
- if (A--, A === 0) {
116
- var e = {
117
- configurable: !0,
118
- enumerable: !0,
119
- writable: !0
120
- };
121
- Object.defineProperties(console, {
122
- log: k({}, e, { value: j }),
123
- info: k({}, e, { value: M }),
124
- warn: k({}, e, { value: N }),
125
- error: k({}, e, { value: P }),
126
- group: k({}, e, { value: F }),
127
- groupCollapsed: k({}, e, { value: I }),
128
- groupEnd: k({}, e, { value: L })
129
- });
130
- }
131
- A < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
132
- }
133
- var z = y.ReactCurrentDispatcher, B;
134
- function V(e, t, n) {
135
- if (B === void 0) try {
136
- throw Error();
137
- } catch (e) {
138
- var r = e.stack.trim().match(/\n( *(at )?)/);
139
- B = r && r[1] || "";
140
- }
141
- return "\n" + B + e;
142
- }
143
- var H = !1, U = new (typeof WeakMap == "function" ? WeakMap : Map)();
144
- function W(e, t) {
145
- if (!e || H) return "";
146
- var n = U.get(e);
147
- if (n !== void 0) return n;
148
- var r;
149
- H = !0;
150
- var i = Error.prepareStackTrace;
151
- Error.prepareStackTrace = void 0;
152
- var a = z.current;
153
- z.current = null, ie();
154
- try {
155
- if (t) {
156
- var o = function() {
157
- throw Error();
158
- };
159
- if (Object.defineProperty(o.prototype, "props", { set: function() {
160
- throw Error();
161
- } }), typeof Reflect == "object" && Reflect.construct) {
162
- try {
163
- Reflect.construct(o, []);
164
- } catch (e) {
165
- r = e;
166
- }
167
- Reflect.construct(e, [], o);
168
- } else {
169
- try {
170
- o.call();
171
- } catch (e) {
172
- r = e;
173
- }
174
- e.call(o.prototype);
175
- }
176
- } else {
177
- try {
178
- throw Error();
179
- } catch (e) {
180
- r = e;
181
- }
182
- e();
183
- }
184
- } catch (t) {
185
- if (t && r && typeof t.stack == "string") {
186
- for (var s = t.stack.split("\n"), c = r.stack.split("\n"), l = s.length - 1, u = c.length - 1; l >= 1 && u >= 0 && s[l] !== c[u];) u--;
187
- for (; l >= 1 && u >= 0; l--, u--) if (s[l] !== c[u]) {
188
- if (l !== 1 || u !== 1) do
189
- if (l--, u--, u < 0 || s[l] !== c[u]) {
190
- var d = "\n" + s[l].replace(" at new ", " at ");
191
- return e.displayName && d.includes("<anonymous>") && (d = d.replace("<anonymous>", e.displayName)), typeof e == "function" && U.set(e, d), d;
192
- }
193
- while (l >= 1 && u >= 0);
194
- break;
195
- }
196
- }
197
- } finally {
198
- H = !1, z.current = a, R(), Error.prepareStackTrace = i;
199
- }
200
- var f = e ? e.displayName || e.name : "", p = f ? V(f) : "";
201
- return typeof e == "function" && U.set(e, p), p;
202
- }
203
- function ae(e, t, n) {
204
- return W(e, !1);
205
- }
206
- function oe(e) {
207
- var t = e.prototype;
208
- return !!(t && t.isReactComponent);
209
- }
210
- function G(e, t, n) {
211
- if (e == null) return "";
212
- if (typeof e == "function") return W(e, oe(e));
213
- if (typeof e == "string") return V(e);
214
- switch (e) {
215
- case u: return V("Suspense");
216
- case d: return V("SuspenseList");
217
- }
218
- if (typeof e == "object") switch (e.$$typeof) {
219
- case l: return ae(e.render);
220
- case p: return G(e.type, t, n);
221
- case m:
222
- var r = e, i = r._payload, a = r._init;
223
- try {
224
- return G(a(i), t, n);
225
- } catch {}
226
- }
227
- return "";
228
- }
229
- var K = Object.prototype.hasOwnProperty, q = {}, se = y.ReactDebugCurrentFrame;
230
- function J(e) {
231
- if (e) {
232
- var t = e._owner, n = G(e.type, e._source, t ? t.type : null);
233
- se.setExtraStackFrame(n);
234
- } else se.setExtraStackFrame(null);
235
- }
236
- function Y(e, t, n, r, i) {
237
- var a = Function.call.bind(K);
238
- for (var o in e) if (a(e, o)) {
239
- var s = void 0;
240
- try {
241
- if (typeof e[o] != "function") {
242
- var c = Error((r || "React class") + ": " + n + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
243
- throw c.name = "Invariant Violation", c;
244
- }
245
- s = e[o](t, o, r, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
246
- } catch (e) {
247
- s = e;
248
- }
249
- s && !(s instanceof Error) && (J(i), b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", r || "React class", n, o, typeof s), J(null)), s instanceof Error && !(s.message in q) && (q[s.message] = !0, J(i), b("Failed %s type: %s", n, s.message), J(null));
250
- }
251
- }
252
- var ce = Array.isArray;
253
- function X(e) {
254
- return ce(e);
255
- }
256
- function le(e) {
257
- return typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
258
- }
259
- function Z(e) {
260
- try {
261
- return ue(e), !1;
262
- } catch {
263
- return !0;
264
- }
265
- }
266
- function ue(e) {
267
- return "" + e;
268
- }
269
- function de(e) {
270
- if (Z(e)) return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", le(e)), ue(e);
271
- }
272
- var Q = y.ReactCurrentOwner, fe = {
273
- key: !0,
274
- ref: !0,
275
- __self: !0,
276
- __source: !0
277
- }, pe, me, he = {};
278
- function ge(e) {
279
- if (K.call(e, "ref")) {
280
- var t = Object.getOwnPropertyDescriptor(e, "ref").get;
281
- if (t && t.isReactWarning) return !1;
282
- }
283
- return e.ref !== void 0;
284
- }
285
- function _e(e) {
286
- if (K.call(e, "key")) {
287
- var t = Object.getOwnPropertyDescriptor(e, "key").get;
288
- if (t && t.isReactWarning) return !1;
289
- }
290
- return e.key !== void 0;
291
- }
292
- function ve(e, t) {
293
- if (typeof e.ref == "string" && Q.current && t && Q.current.stateNode !== t) {
294
- var n = O(Q.current.type);
295
- he[n] || (b("Component \"%s\" contains the string ref \"%s\". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref", O(Q.current.type), e.ref), he[n] = !0);
296
- }
297
- }
298
- function ye(e, t) {
299
- var n = function() {
300
- pe || (pe = !0, b("%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://reactjs.org/link/special-props)", t));
301
- };
302
- n.isReactWarning = !0, Object.defineProperty(e, "key", {
303
- get: n,
304
- configurable: !0
305
- });
306
- }
307
- function be(e, t) {
308
- var n = function() {
309
- me || (me = !0, b("%s: `ref` 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://reactjs.org/link/special-props)", t));
310
- };
311
- n.isReactWarning = !0, Object.defineProperty(e, "ref", {
312
- get: n,
313
- configurable: !0
314
- });
315
- }
316
- var xe = function(e, t, r, i, a, o, s) {
317
- var c = {
318
- $$typeof: n,
319
- type: e,
320
- key: t,
321
- ref: r,
322
- props: s,
323
- _owner: o
324
- };
325
- return c._store = {}, Object.defineProperty(c._store, "validated", {
326
- configurable: !1,
327
- enumerable: !1,
328
- writable: !0,
329
- value: !1
330
- }), Object.defineProperty(c, "_self", {
331
- configurable: !1,
332
- enumerable: !1,
333
- writable: !1,
334
- value: i
335
- }), Object.defineProperty(c, "_source", {
336
- configurable: !1,
337
- enumerable: !1,
338
- writable: !1,
339
- value: a
340
- }), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
341
- };
342
- function Se(e, t, n, r, i) {
343
- var a, o = {}, s = null, c = null;
344
- for (a in n !== void 0 && (de(n), s = "" + n), _e(t) && (de(t.key), s = "" + t.key), ge(t) && (c = t.ref, ve(t, i)), t) K.call(t, a) && !fe.hasOwnProperty(a) && (o[a] = t[a]);
345
- if (e && e.defaultProps) {
346
- var l = e.defaultProps;
347
- for (a in l) o[a] === void 0 && (o[a] = l[a]);
348
- }
349
- if (s || c) {
350
- var u = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
351
- s && ye(o, u), c && be(o, u);
352
- }
353
- return xe(e, s, c, i, r, Q.current, o);
354
- }
355
- var Ce = y.ReactCurrentOwner, we = y.ReactDebugCurrentFrame;
356
- function $(e) {
357
- if (e) {
358
- var t = e._owner, n = G(e.type, e._source, t ? t.type : null);
359
- we.setExtraStackFrame(n);
360
- } else we.setExtraStackFrame(null);
361
- }
362
- var Te = !1;
363
- function Ee(e) {
364
- return typeof e == "object" && !!e && e.$$typeof === n;
365
- }
366
- function De() {
367
- if (Ce.current) {
368
- var e = O(Ce.current.type);
369
- if (e) return "\n\nCheck the render method of `" + e + "`.";
370
- }
371
- return "";
372
- }
373
- function Oe(e) {
374
- if (e !== void 0) {
375
- var t = e.fileName.replace(/^.*[\\\/]/, ""), n = e.lineNumber;
376
- return "\n\nCheck your code at " + t + ":" + n + ".";
377
- }
378
- return "";
379
- }
380
- var ke = {};
381
- function Ae(e) {
382
- var t = De();
383
- if (!t) {
384
- var n = typeof e == "string" ? e : e.displayName || e.name;
385
- n && (t = "\n\nCheck the top-level render call using <" + n + ">.");
386
- }
387
- return t;
388
- }
389
- function je(e, t) {
390
- if (!(!e._store || e._store.validated || e.key != null)) {
391
- e._store.validated = !0;
392
- var n = Ae(t);
393
- if (!ke[n]) {
394
- ke[n] = !0;
395
- var r = "";
396
- e && e._owner && e._owner !== Ce.current && (r = " It was passed a child from " + O(e._owner.type) + "."), $(e), b("Each child in a list should have a unique \"key\" prop.%s%s See https://reactjs.org/link/warning-keys for more information.", n, r), $(null);
397
- }
398
- }
399
- }
400
- function Me(e, t) {
401
- if (typeof e == "object") {
402
- if (X(e)) for (var n = 0; n < e.length; n++) {
403
- var r = e[n];
404
- Ee(r) && je(r, t);
405
- }
406
- else if (Ee(e)) e._store && (e._store.validated = !0);
407
- else if (e) {
408
- var i = v(e);
409
- if (typeof i == "function" && i !== e.entries) for (var a = i.call(e), o; !(o = a.next()).done;) Ee(o.value) && je(o.value, t);
410
- }
411
- }
412
- }
413
- function Ne(e) {
414
- var t = e.type;
415
- if (!(t == null || typeof t == "string")) {
416
- var n;
417
- if (typeof t == "function") n = t.propTypes;
418
- else if (typeof t == "object" && (t.$$typeof === l || t.$$typeof === p)) n = t.propTypes;
419
- else return;
420
- if (n) {
421
- var r = O(t);
422
- Y(n, e.props, "prop", r, e);
423
- } else t.PropTypes !== void 0 && !Te && (Te = !0, b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", O(t) || "Unknown"));
424
- typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
425
- }
426
- }
427
- function Pe(e) {
428
- for (var t = Object.keys(e.props), n = 0; n < t.length; n++) {
429
- var r = t[n];
430
- if (r !== "children" && r !== "key") {
431
- $(e), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", r), $(null);
432
- break;
433
- }
434
- }
435
- e.ref !== null && ($(e), b("Invalid attribute `ref` supplied to `React.Fragment`."), $(null));
436
- }
437
- var Fe = {};
438
- function Ie(e, t, r, a, o, s) {
439
- var c = ee(e);
440
- if (!c) {
441
- var l = "";
442
- (e === void 0 || typeof e == "object" && e && Object.keys(e).length === 0) && (l += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
443
- var u = Oe(o);
444
- u ? l += u : l += De();
445
- var d;
446
- e === null ? d = "null" : X(e) ? d = "array" : e !== void 0 && e.$$typeof === n ? (d = "<" + (O(e.type) || "Unknown") + " />", l = " Did you accidentally export a JSX literal instead of a component?") : d = typeof e, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", d, l);
447
- }
448
- var f = Se(e, t, r, o, s);
449
- if (f == null) return f;
450
- if (c) {
451
- var p = t.children;
452
- if (p !== void 0) if (a) if (X(p)) {
453
- for (var m = 0; m < p.length; m++) Me(p[m], e);
454
- Object.freeze && Object.freeze(p);
455
- } else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
456
- else Me(p, e);
457
- }
458
- if (K.call(t, "key")) {
459
- var h = O(e), g = Object.keys(t).filter(function(e) {
460
- return e !== "key";
461
- }), _ = g.length > 0 ? "{key: someKey, " + g.join(": ..., ") + ": ...}" : "{key: someKey}";
462
- Fe[h + _] || (b("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", _, h, g.length > 0 ? "{" + g.join(": ..., ") + ": ...}" : "{}", h), Fe[h + _] = !0);
463
- }
464
- return e === i ? Pe(f) : Ne(f), f;
465
- }
466
- function Le(e, t, n) {
467
- return Ie(e, t, n, !0);
468
- }
469
- function Re(e, t, n) {
470
- return Ie(e, t, n, !1);
471
- }
472
- var ze = Re, Be = Le;
473
- e.Fragment = i, e.jsx = ze, e.jsxs = Be;
474
- })();
475
- })), h = (/* @__PURE__ */ d(((e, t) => {
476
- process.env.NODE_ENV === "production" ? t.exports = p() : t.exports = m();
477
- })))(), g = {
2
+ import { Box as a, ButtonBase as o, Divider as ee, Paper as s, Typography as c, useTheme as te } from "@mui/material";
3
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
4
+ //#region src/components/ActionButton/menuItemIcons.tsx
5
+ var d = {
478
6
  width: 22,
479
7
  height: 22,
480
8
  flexShrink: 0,
@@ -482,35 +10,35 @@ var d = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), f
482
10
  color: "rgba(255,255,255,0.95)",
483
11
  opacity: .98
484
12
  };
485
- function _(e) {
13
+ function ne(e) {
486
14
  let { id: t } = e;
487
15
  switch (t) {
488
- case "messages": return /* @__PURE__ */ (0, h.jsx)(a, {
16
+ case "messages": return /* @__PURE__ */ l(a, {
489
17
  component: "svg",
490
18
  viewBox: "0 0 24 24",
491
19
  "aria-hidden": !0,
492
- sx: g,
493
- children: /* @__PURE__ */ (0, h.jsx)("path", {
20
+ sx: d,
21
+ children: /* @__PURE__ */ l("path", {
494
22
  fill: "currentColor",
495
23
  d: "M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H5.17L4 17.17V4h16v12z"
496
24
  })
497
25
  });
498
- case "gameInfo": return /* @__PURE__ */ (0, h.jsx)(a, {
26
+ case "gameInfo": return /* @__PURE__ */ l(a, {
499
27
  component: "svg",
500
28
  viewBox: "0 0 24 24",
501
29
  "aria-hidden": !0,
502
- sx: g,
503
- children: /* @__PURE__ */ (0, h.jsx)("path", {
30
+ sx: d,
31
+ children: /* @__PURE__ */ l("path", {
504
32
  fill: "currentColor",
505
33
  d: "M13.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM9.5 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm5 8.5c0 2.49-2.01 4.5-4.5 4.5S5.5 18.99 5.5 16.5 7.51 12 10 12s4.5 2.01 4.5 4.5zm4.5-4.5c0 1.38-1.12 2.5-2.5 2.5S14 16.38 14 15s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5z"
506
34
  })
507
35
  });
508
- case "yourRole": return /* @__PURE__ */ (0, h.jsx)(a, {
36
+ case "yourRole": return /* @__PURE__ */ l(a, {
509
37
  component: "svg",
510
38
  viewBox: "0 0 24 24",
511
39
  "aria-hidden": !0,
512
- sx: g,
513
- children: /* @__PURE__ */ (0, h.jsx)("path", {
40
+ sx: d,
41
+ children: /* @__PURE__ */ l("path", {
514
42
  fill: "currentColor",
515
43
  d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"
516
44
  })
@@ -520,171 +48,220 @@ function _(e) {
520
48
  }
521
49
  //#endregion
522
50
  //#region src/components/ActionButton/ActionButton.tsx
523
- var v = [
51
+ var f = [
524
52
  "messages",
525
53
  "gameInfo",
526
54
  "yourRole"
527
- ], y = "پزشک";
528
- function b(d) {
529
- let { yourRoleName: f = y, gameInfoSectionLabels: p, playerNamesContent: m, gameRoleNamesContent: g, onItemClick: b, labels: x, initialPosition: S, homePosition: C, dragBoundsPadding: w = 12, circleSize: T = 64, menuWidth: E = 230, menuItemHeight: D = 44, menuGap: ee = 10, gameInfoPanelMaxHeight: te = 340, className: ne, style: O } = d, k = t().replace(/:/g, ""), A = r(null), j = r(!1), M = r(null), N = r({
55
+ ], re = "پزشک", ie = "linear-gradient(155deg, #6d28d9 0%, #5b21b6 38%, #4c1d95 72%, #1e1b4b 100%)", p = "linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.06)), linear-gradient(140deg, rgba(91,33,182,0.48), rgba(30,27,75,0.58))";
56
+ function m(d) {
57
+ let { yourRoleName: m = re, gameInfoSectionLabels: h, playerNamesContent: ae, gameRoleNamesContent: oe, onItemClick: g, labels: _, initialPosition: v, homePosition: y, dragBoundsPadding: b = 12, circleSize: x = 64, menuWidth: S = 230, menuItemHeight: se = 44, menuGap: ce = 10, gameInfoPanelMaxHeight: le = 340, messages: ue, messagePreviewDurationMs: de = 1e4, accentGradient: fe = ie, menuSurfaceBackground: C = p, className: pe, style: me } = d, w = ue ?? [], he = t().replace(/:/g, ""), T = r(null), E = r(!1), D = r(null), O = r({
530
58
  x: 0,
531
59
  y: 0
532
- }), P = r({
60
+ }), k = r({
533
61
  x: 0,
534
62
  y: 0
535
- }), F = r({
63
+ }), A = r({
536
64
  x: 0,
537
65
  y: 0,
538
66
  t: 0
539
- }), I = r(null), L = r(!1), re = () => typeof window > "u" ? {
540
- x: w + T / 2,
67
+ }), j = r(null), M = r(!1), ge = () => typeof window > "u" ? {
68
+ x: b + x / 2,
541
69
  y: 0
542
70
  } : {
543
- x: w + T / 2,
71
+ x: b + x / 2,
544
72
  y: window.innerHeight * .3
545
- }, ie = n(() => C ? { ...C } : S ? { ...S } : typeof window > "u" ? {
546
- x: w + T / 2,
73
+ }, _e = n(() => y ? { ...y } : v ? { ...v } : typeof window > "u" ? {
74
+ x: b + x / 2,
547
75
  y: 0
548
76
  } : {
549
- x: w + T / 2,
77
+ x: b + x / 2,
550
78
  y: window.innerHeight * .3
551
79
  }, [
552
- C,
553
- S,
554
- w,
555
- T
556
- ]), [R, z] = i(!1), [B, V] = i(!1), [H, U] = i(() => S ? {
557
- x: S.x,
558
- y: S.y
559
- } : C ? {
560
- x: C.x,
561
- y: C.y
562
- } : re()), W = n(() => typeof window > "u" || H.x < window.innerWidth / 2 ? "right" : "left", [H.x]), ae = n(() => {
80
+ y,
81
+ v,
82
+ b,
83
+ x
84
+ ]), [N, P] = i(!1), [F, I] = i(!1), [L, R] = i(!1), [ve, z] = i(0), [B, V] = i(null), H = r(0), U = r(null), [W, ye] = i(() => v ? {
85
+ x: v.x,
86
+ y: v.y
87
+ } : y ? {
88
+ x: y.x,
89
+ y: y.y
90
+ } : ge()), G = n(() => typeof window > "u" || W.x < window.innerWidth / 2 ? "right" : "left", [W.x]), K = n(() => {
563
91
  let e = {
564
92
  messages: "پیام ها",
565
93
  gameInfo: "اطلاعات بازی",
566
- yourRole: `نقش شما ${f}`
94
+ yourRole: `نقش شما ${m}`
567
95
  };
568
- return x ? {
96
+ return _ ? {
569
97
  ...e,
570
- ...x
98
+ ..._
571
99
  } : e;
572
- }, [x, f]), oe = n(() => ({
573
- playerNames: p?.playerNames ?? "نام بازیکنان",
574
- roleNames: p?.roleNames ?? "نام نقش های بازی"
575
- }), [p]), G = B ? "back" : R ? "close" : "action", K = u().direction === "rtl" || typeof document < "u" && document.documentElement.getAttribute("dir") === "rtl", [q, se] = i(() => typeof window < "u" ? window.innerHeight : 800);
100
+ }, [_, m]), be = n(() => ({
101
+ playerNames: h?.playerNames ?? "نام بازیکنان",
102
+ roleNames: h?.roleNames ?? "نام نقش های بازی"
103
+ }), [h]), q = Math.max(0, w.length - ve);
104
+ e(() => {
105
+ if (w.length === 0) {
106
+ H.current = 0, z(0);
107
+ return;
108
+ }
109
+ z((e) => Math.min(e, w.length));
110
+ }, [w.length]), e(() => {
111
+ if (w.length === 0) {
112
+ H.current = 0;
113
+ return;
114
+ }
115
+ if (w.length > H.current) {
116
+ let e = w[w.length - 1];
117
+ V(e), U.current != null && (clearTimeout(U.current), U.current = null), U.current = setTimeout(() => {
118
+ V(null), U.current = null;
119
+ }, de);
120
+ }
121
+ return H.current = w.length, () => {
122
+ U.current != null && (clearTimeout(U.current), U.current = null);
123
+ };
124
+ }, [w, de]), e(() => {
125
+ L && z(w.length);
126
+ }, [w, L]);
127
+ let J = F || L ? "back" : N ? "close" : "action", xe = te().direction === "rtl" || typeof document < "u" && document.documentElement.getAttribute("dir") === "rtl", [Y, Se] = i(() => typeof window < "u" ? window.innerHeight : 800);
576
128
  e(() => {
577
- let e = () => se(window.innerHeight);
129
+ let e = () => Se(window.innerHeight);
578
130
  return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
579
131
  }, []);
580
- let J = n(() => Math.min(te, Math.max(120, q - w * 2)), [
581
- te,
582
- q,
583
- w
584
- ]), [Y, ce] = i(() => {
585
- let e = H.y - T / 2;
132
+ let X = n(() => Math.min(le, Math.max(120, Y - b * 2)), [
133
+ le,
134
+ Y,
135
+ b
136
+ ]), [Z, Ce] = i(() => {
137
+ let e = W.y - x / 2;
586
138
  return {
587
- x: H.x - E / 2,
139
+ x: W.x - S / 2,
588
140
  y: e,
589
141
  gap: 10
590
142
  };
591
- }), X = () => {
592
- let e = H.y - T / 2, t = W === "right" ? H.x + T / 2 + 10 : H.x - T / 2 - 10 - E, n = D * v.length + ee * (v.length - 1), r = B ? J : n, i = Math.min(Math.max(e, w), q - w - r);
593
- ce({
594
- x: Math.min(Math.max(t, w), window.innerWidth - w - E),
143
+ }), we = () => {
144
+ let e = W.y - x / 2, t = G === "right" ? W.x + x / 2 + 10 : W.x - x / 2 - 10 - S, n = se * f.length + ce * (f.length - 1), r = F || L ? X : n, i = Math.min(Math.max(e, b), Y - b - r);
145
+ Ce({
146
+ x: Math.min(Math.max(t, b), window.innerWidth - b - S),
595
147
  y: i,
596
148
  gap: 10
597
149
  });
598
150
  };
599
151
  e(() => {
600
- X();
152
+ we();
601
153
  }, [
602
- H.x,
603
- H.y,
604
- W,
605
- B,
606
- q,
607
- J
154
+ W.x,
155
+ W.y,
156
+ G,
157
+ F,
158
+ L,
159
+ Y,
160
+ X
608
161
  ]), e(() => {
609
- if (!R && !B) return;
162
+ if (!N && !F && !L) return;
610
163
  let e = (e) => {
611
- let t = A.current;
164
+ let t = T.current;
612
165
  if (!t) return;
613
166
  let n = e.target;
614
- n && t.contains(n) || (z(!1), V(!1));
167
+ n && t.contains(n) || (P(!1), I(!1), R(!1));
615
168
  };
616
169
  return window.addEventListener("mousedown", e), window.addEventListener("touchstart", e, { passive: !0 }), () => {
617
170
  window.removeEventListener("mousedown", e), window.removeEventListener("touchstart", e);
618
171
  };
619
- }, [R, B]), e(() => () => {
620
- I.current != null && (clearTimeout(I.current), I.current = null);
172
+ }, [
173
+ N,
174
+ F,
175
+ L
176
+ ]), e(() => () => {
177
+ j.current != null && (clearTimeout(j.current), j.current = null);
621
178
  }, []);
622
- let le = (e) => {
623
- let t = T / 2, n = w + t, r = window.innerWidth - w - t, i = w + t, a = window.innerHeight - w - t;
179
+ let Te = (e) => {
180
+ let t = x / 2, n = b + t, r = window.innerWidth - b - t, i = b + t, a = window.innerHeight - b - t;
624
181
  return {
625
182
  x: Math.min(Math.max(e.x, n), r),
626
183
  y: Math.min(Math.max(e.y, i), a)
627
184
  };
628
- }, Z = () => {
629
- I.current != null && (clearTimeout(I.current), I.current = null);
630
- }, ue = (e) => {
185
+ }, Q = () => {
186
+ j.current != null && (clearTimeout(j.current), j.current = null);
187
+ }, Ee = (e) => {
631
188
  if (e.isPrimary) {
632
- M.current = e.pointerId, j.current = !1, L.current = !1, N.current = {
189
+ D.current = e.pointerId, E.current = !1, M.current = !1, O.current = {
633
190
  x: e.clientX,
634
191
  y: e.clientY
635
- }, P.current = H, F.current = {
192
+ }, k.current = W, A.current = {
636
193
  x: e.clientX,
637
194
  y: e.clientY,
638
195
  t: Date.now()
639
- }, Z(), I.current = setTimeout(() => {
640
- j.current || (L.current = !0, z(!1), V(!1), U(le({
641
- x: ie.x,
642
- y: ie.y
196
+ }, Q(), j.current = setTimeout(() => {
197
+ E.current || (M.current = !0, P(!1), I(!1), R(!1), ye(Te({
198
+ x: _e.x,
199
+ y: _e.y
643
200
  })));
644
201
  }, 500);
645
202
  try {
646
203
  e.currentTarget.setPointerCapture(e.pointerId);
647
204
  } catch {}
648
205
  }
649
- }, de = (e) => {
650
- if (M.current !== e.pointerId) return;
651
- let t = e.clientX - N.current.x, n = e.clientY - N.current.y;
652
- j.current || Math.hypot(t, n) > 6 && (j.current = !0, Z()), U(le({
653
- x: P.current.x + t,
654
- y: P.current.y + n
206
+ }, De = (e) => {
207
+ if (D.current !== e.pointerId) return;
208
+ let t = e.clientX - O.current.x, n = e.clientY - O.current.y;
209
+ E.current || Math.hypot(t, n) > 6 && (E.current = !0, Q()), ye(Te({
210
+ x: k.current.x + t,
211
+ y: k.current.y + n
655
212
  }));
656
- }, Q = (e) => {
657
- if (M.current !== e.pointerId) return;
658
- Z();
659
- let { x: t, y: n, t: r } = F.current, i = Math.hypot(e.clientX - t, e.clientY - n), a = Date.now() - r, o = j.current;
660
- if (M.current = null, j.current = !1, L.current) {
661
- L.current = !1;
213
+ }, Oe = (e) => {
214
+ if (D.current !== e.pointerId) return;
215
+ Q();
216
+ let { x: t, y: n, t: r } = A.current, i = Math.hypot(e.clientX - t, e.clientY - n), a = Date.now() - r, o = E.current;
217
+ if (D.current = null, E.current = !1, M.current) {
218
+ M.current = !1;
662
219
  try {
663
220
  e.currentTarget.releasePointerCapture(e.pointerId);
664
221
  } catch {}
665
222
  return;
666
223
  }
667
- i < 6 && a < 400 && !o && (B ? (V(!1), z(!0)) : z((e) => !e));
224
+ i < 6 && a < 400 && !o && (F ? (I(!1), P(!0)) : L ? (R(!1), P(!0)) : P((e) => !e));
668
225
  try {
669
226
  e.currentTarget.releasePointerCapture(e.pointerId);
670
227
  } catch {}
671
- }, fe = (e) => {
672
- if (Z(), M.current === e.pointerId) {
673
- M.current = null, j.current = !1, L.current = !1;
228
+ }, ke = (e) => {
229
+ if (Q(), D.current === e.pointerId) {
230
+ D.current = null, E.current = !1, M.current = !1;
674
231
  try {
675
232
  e.currentTarget.releasePointerCapture(e.pointerId);
676
233
  } catch {}
677
234
  }
678
- }, pe = (e) => {
235
+ }, Ae = (e) => {
679
236
  if (e === "gameInfo") {
680
- b?.(e), V(!0), z(!1);
237
+ g?.(e), R(!1), I(!0), P(!1);
681
238
  return;
682
239
  }
683
- b?.(e), z(!1);
684
- };
685
- return /* @__PURE__ */ (0, h.jsxs)("div", {
686
- ref: A,
687
- className: ne,
240
+ if (e === "messages") {
241
+ g?.(e), I(!1), R(!0), P(!1), z(w.length), V(null), U.current != null && (clearTimeout(U.current), U.current = null);
242
+ return;
243
+ }
244
+ g?.(e), P(!1);
245
+ }, je = n(() => `linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.05)), ${fe}`, [fe]), $ = n(() => {
246
+ if (!B || typeof window > "u") return null;
247
+ let e = Math.min(S + 24, 280), t = Math.min(Math.max(b, W.x - e / 2), window.innerWidth - b - e), n = W.y - x / 2;
248
+ return {
249
+ left: t,
250
+ width: e,
251
+ bottom: window.innerHeight - n + 5,
252
+ maxBubbleHeight: Math.max(96, n - b - 5)
253
+ };
254
+ }, [
255
+ B,
256
+ W.x,
257
+ W.y,
258
+ x,
259
+ S,
260
+ b
261
+ ]);
262
+ return /* @__PURE__ */ u("div", {
263
+ ref: T,
264
+ className: pe,
688
265
  style: {
689
266
  position: "fixed",
690
267
  zIndex: 1300,
@@ -692,10 +269,10 @@ function b(d) {
692
269
  left: 0,
693
270
  width: 0,
694
271
  height: 0,
695
- ...O
272
+ ...me
696
273
  },
697
274
  children: [
698
- R ? /* @__PURE__ */ (0, h.jsx)(a, {
275
+ N ? /* @__PURE__ */ l(a, {
699
276
  dir: "rtl",
700
277
  onPointerDown: (e) => {
701
278
  e.stopPropagation();
@@ -703,30 +280,30 @@ function b(d) {
703
280
  sx: {
704
281
  position: "fixed",
705
282
  zIndex: 1310,
706
- top: Y.y,
707
- left: Y.x,
708
- width: `${E}px`,
283
+ top: Z.y,
284
+ left: Z.x,
285
+ width: `${S}px`,
709
286
  display: "flex",
710
287
  flexDirection: "column",
711
- gap: `${ee}px`,
712
- transformOrigin: W === "right" ? "left top" : "right top"
288
+ gap: `${ce}px`,
289
+ transformOrigin: G === "right" ? "left top" : "right top"
713
290
  },
714
- children: v.map((e) => {
715
- let t = ae[e];
716
- return /* @__PURE__ */ (0, h.jsx)(o, {
717
- onClick: () => pe(e),
291
+ children: f.map((e) => {
292
+ let t = K[e];
293
+ return /* @__PURE__ */ l(o, {
294
+ onClick: () => Ae(e),
718
295
  sx: {
719
- height: `${D}px`,
296
+ height: `${se}px`,
720
297
  borderRadius: "18px",
721
298
  paddingX: "12px",
722
299
  justifyContent: "flex-start",
723
300
  backdropFilter: "blur(12px)",
724
- background: "rgba(255,255,255,0.10)",
301
+ background: C,
725
302
  border: "1px solid rgba(255,255,255,0.22)",
726
303
  boxShadow: "0 12px 36px rgba(0,0,0,0.35)",
727
- "&:hover": { background: "rgba(255,255,255,0.14)" }
304
+ "&:hover": { filter: "brightness(1.08)" }
728
305
  },
729
- children: /* @__PURE__ */ (0, h.jsxs)(a, {
306
+ children: /* @__PURE__ */ u(a, {
730
307
  sx: {
731
308
  display: "flex",
732
309
  alignItems: "center",
@@ -735,32 +312,46 @@ function b(d) {
735
312
  width: "100%",
736
313
  flexDirection: "row"
737
314
  },
738
- children: [/* @__PURE__ */ (0, h.jsx)(l, {
739
- sx: {
740
- fontSize: "0.95rem",
741
- fontWeight: 700,
742
- letterSpacing: "-0.01em",
743
- flex: 1,
744
- minWidth: 0,
745
- textAlign: "start"
746
- },
747
- children: t
748
- }), /* @__PURE__ */ (0, h.jsx)(_, { id: e })]
315
+ children: [
316
+ /* @__PURE__ */ l(c, {
317
+ sx: {
318
+ fontSize: "0.95rem",
319
+ fontWeight: 700,
320
+ letterSpacing: "-0.01em",
321
+ flex: 1,
322
+ minWidth: 0,
323
+ textAlign: "start"
324
+ },
325
+ children: t
326
+ }),
327
+ e === "messages" && q > 0 ? /* @__PURE__ */ l(a, {
328
+ component: "span",
329
+ "aria-label": String(q),
330
+ sx: {
331
+ minWidth: 22,
332
+ height: 22,
333
+ px: .5,
334
+ borderRadius: "11px",
335
+ bgcolor: "#f43f5e",
336
+ color: "#fff",
337
+ fontSize: "0.72rem",
338
+ fontWeight: 800,
339
+ display: "inline-flex",
340
+ alignItems: "center",
341
+ justifyContent: "center",
342
+ flexShrink: 0,
343
+ lineHeight: 1,
344
+ border: "2px solid rgba(255,255,255,0.2)"
345
+ },
346
+ children: q > 99 ? "99+" : q
347
+ }) : null,
348
+ /* @__PURE__ */ l(ne, { id: e })
349
+ ]
749
350
  })
750
351
  }, e);
751
352
  })
752
353
  }) : null,
753
- B ? /* @__PURE__ */ (0, h.jsxs)(h.Fragment, { children: [/* @__PURE__ */ (0, h.jsx)(a, {
754
- "aria-hidden": !0,
755
- onClick: () => V(!1),
756
- sx: {
757
- position: "fixed",
758
- inset: 0,
759
- zIndex: 1320,
760
- background: "rgba(0,0,0,0.52)",
761
- backdropFilter: "blur(4px)"
762
- }
763
- }), /* @__PURE__ */ (0, h.jsxs)(c, {
354
+ F ? /* @__PURE__ */ u(s, {
764
355
  dir: "rtl",
765
356
  elevation: 0,
766
357
  onPointerDown: (e) => e.stopPropagation(),
@@ -768,23 +359,23 @@ function b(d) {
768
359
  sx: {
769
360
  position: "fixed",
770
361
  zIndex: 1321,
771
- top: Y.y,
772
- left: Y.x,
773
- width: `${E}px`,
774
- height: `${J}px`,
775
- maxHeight: `${J}px`,
362
+ top: Z.y,
363
+ left: Z.x,
364
+ width: `${S}px`,
365
+ height: `${X}px`,
366
+ maxHeight: `${X}px`,
776
367
  display: "flex",
777
368
  flexDirection: "column",
778
369
  overflow: "hidden",
779
370
  borderRadius: "22px",
780
371
  padding: "14px 14px 16px",
781
372
  backdropFilter: "blur(12px)",
782
- background: "rgba(255,255,255,0.10)",
373
+ background: C,
783
374
  border: "1px solid rgba(255,255,255,0.22)",
784
375
  boxShadow: "0 12px 36px rgba(0,0,0,0.35)",
785
- transformOrigin: W === "right" ? "left top" : "right top"
376
+ transformOrigin: G === "right" ? "left top" : "right top"
786
377
  },
787
- children: [/* @__PURE__ */ (0, h.jsx)(l, {
378
+ children: [/* @__PURE__ */ l(c, {
788
379
  sx: {
789
380
  fontSize: "1.02rem",
790
381
  fontWeight: 800,
@@ -792,8 +383,8 @@ function b(d) {
792
383
  marginBottom: "12px",
793
384
  flexShrink: 0
794
385
  },
795
- children: ae.gameInfo
796
- }), /* @__PURE__ */ (0, h.jsxs)(a, {
386
+ children: K.gameInfo
387
+ }), /* @__PURE__ */ u(a, {
797
388
  sx: {
798
389
  display: "flex",
799
390
  flexDirection: "column",
@@ -804,93 +395,248 @@ function b(d) {
804
395
  pr: "2px"
805
396
  },
806
397
  children: [
807
- /* @__PURE__ */ (0, h.jsxs)(a, { children: [/* @__PURE__ */ (0, h.jsx)(l, {
398
+ /* @__PURE__ */ u(a, { children: [/* @__PURE__ */ l(c, {
808
399
  sx: {
809
400
  fontSize: "0.82rem",
810
401
  fontWeight: 700,
811
402
  opacity: .72,
812
403
  marginBottom: "6px"
813
404
  },
814
- children: oe.playerNames
815
- }), /* @__PURE__ */ (0, h.jsx)(l, {
405
+ children: be.playerNames
406
+ }), /* @__PURE__ */ l(c, {
816
407
  sx: {
817
408
  fontSize: "0.95rem",
818
409
  fontWeight: 600,
819
410
  lineHeight: 1.45
820
411
  },
821
- children: m ?? "—"
412
+ children: ae ?? "—"
822
413
  })] }),
823
- /* @__PURE__ */ (0, h.jsx)(s, { sx: { borderColor: "rgba(255,255,255,0.12)" } }),
824
- /* @__PURE__ */ (0, h.jsxs)(a, { children: [/* @__PURE__ */ (0, h.jsx)(l, {
414
+ /* @__PURE__ */ l(ee, { sx: { borderColor: "rgba(255,255,255,0.12)" } }),
415
+ /* @__PURE__ */ u(a, { children: [/* @__PURE__ */ l(c, {
825
416
  sx: {
826
417
  fontSize: "0.82rem",
827
418
  fontWeight: 700,
828
419
  opacity: .72,
829
420
  marginBottom: "6px"
830
421
  },
831
- children: oe.roleNames
832
- }), /* @__PURE__ */ (0, h.jsx)(l, {
422
+ children: be.roleNames
423
+ }), /* @__PURE__ */ l(c, {
833
424
  sx: {
834
425
  fontSize: "0.95rem",
835
426
  fontWeight: 600,
836
427
  lineHeight: 1.45
837
428
  },
838
- children: g ?? "—"
429
+ children: oe ?? "—"
839
430
  })] })
840
431
  ]
841
432
  })]
842
- })] }) : null,
843
- /* @__PURE__ */ (0, h.jsx)(a, {
433
+ }) : null,
434
+ L ? /* @__PURE__ */ u(s, {
435
+ dir: "rtl",
436
+ elevation: 0,
437
+ onPointerDown: (e) => e.stopPropagation(),
438
+ onClick: (e) => e.stopPropagation(),
439
+ sx: {
440
+ position: "fixed",
441
+ zIndex: 1321,
442
+ top: Z.y,
443
+ left: Z.x,
444
+ width: `${S}px`,
445
+ height: `${X}px`,
446
+ maxHeight: `${X}px`,
447
+ display: "flex",
448
+ flexDirection: "column",
449
+ overflow: "hidden",
450
+ borderRadius: "22px",
451
+ padding: "14px 14px 16px",
452
+ backdropFilter: "blur(12px)",
453
+ background: C,
454
+ border: "1px solid rgba(255,255,255,0.22)",
455
+ boxShadow: "0 12px 36px rgba(0,0,0,0.35)",
456
+ transformOrigin: G === "right" ? "left top" : "right top"
457
+ },
458
+ children: [/* @__PURE__ */ l(c, {
459
+ sx: {
460
+ fontSize: "1.02rem",
461
+ fontWeight: 800,
462
+ letterSpacing: "-0.02em",
463
+ marginBottom: "12px",
464
+ flexShrink: 0
465
+ },
466
+ children: K.messages
467
+ }), /* @__PURE__ */ l(a, {
468
+ sx: {
469
+ display: "flex",
470
+ flexDirection: "column",
471
+ gap: 0,
472
+ minHeight: 0,
473
+ flex: 1,
474
+ overflow: "auto",
475
+ pr: "2px"
476
+ },
477
+ children: w.length === 0 ? /* @__PURE__ */ l(c, {
478
+ sx: {
479
+ fontSize: "0.9rem",
480
+ opacity: .75,
481
+ py: 2,
482
+ textAlign: "center"
483
+ },
484
+ children: "پیامی نیست"
485
+ }) : [...w].reverse().map((e) => /* @__PURE__ */ u(a, {
486
+ sx: {
487
+ py: 1.25,
488
+ borderBottom: "1px solid rgba(255,255,255,0.1)",
489
+ "&:last-of-type": { borderBottom: "none" }
490
+ },
491
+ children: [e.at == null ? null : /* @__PURE__ */ l(c, {
492
+ component: "div",
493
+ sx: {
494
+ fontSize: "0.7rem",
495
+ fontWeight: 600,
496
+ opacity: .65,
497
+ marginBottom: "4px"
498
+ },
499
+ children: new Date(e.at).toLocaleString()
500
+ }), /* @__PURE__ */ l(c, {
501
+ sx: {
502
+ fontSize: "0.93rem",
503
+ fontWeight: 600,
504
+ lineHeight: 1.45,
505
+ wordBreak: "break-word"
506
+ },
507
+ children: e.body
508
+ })]
509
+ }, e.id))
510
+ })]
511
+ }) : null,
512
+ B && !L && $ ? /* @__PURE__ */ u(a, {
513
+ dir: "rtl",
514
+ sx: {
515
+ position: "fixed",
516
+ zIndex: 1328,
517
+ left: $.left,
518
+ bottom: $.bottom,
519
+ width: $.width,
520
+ maxHeight: $.maxBubbleHeight,
521
+ display: "flex",
522
+ flexDirection: "column",
523
+ justifyContent: "flex-end",
524
+ pointerEvents: "none"
525
+ },
526
+ children: [/* @__PURE__ */ l(s, {
527
+ elevation: 0,
528
+ sx: {
529
+ p: "10px 12px",
530
+ borderRadius: "14px",
531
+ backdropFilter: "blur(12px)",
532
+ background: C,
533
+ border: "1px solid rgba(255,255,255,0.28)",
534
+ boxShadow: "0 14px 40px rgba(0,0,0,0.4)",
535
+ position: "relative",
536
+ flexShrink: 1,
537
+ minHeight: 0
538
+ },
539
+ children: /* @__PURE__ */ l(c, {
540
+ sx: {
541
+ fontSize: "0.88rem",
542
+ fontWeight: 650,
543
+ lineHeight: 1.45,
544
+ display: "-webkit-box",
545
+ WebkitLineClamp: 4,
546
+ WebkitBoxOrient: "vertical",
547
+ overflow: "hidden",
548
+ wordBreak: "break-word"
549
+ },
550
+ children: B.body
551
+ })
552
+ }), /* @__PURE__ */ l(a, { sx: {
553
+ width: 0,
554
+ height: 0,
555
+ mx: "auto",
556
+ flexShrink: 0,
557
+ borderLeft: "9px solid transparent",
558
+ borderRight: "9px solid transparent",
559
+ borderTop: "9px solid rgba(255,255,255,0.14)",
560
+ filter: "drop-shadow(0 3px 8px rgba(0,0,0,0.22))",
561
+ mt: "-1px"
562
+ } })]
563
+ }) : null,
564
+ /* @__PURE__ */ u(a, {
844
565
  role: "button",
845
- "aria-label": G === "back" ? "بازگشت به منو" : G === "close" ? "بستن منو" : "باز کردن منو",
846
- onPointerDown: ue,
847
- onPointerMove: de,
848
- onPointerUp: Q,
849
- onPointerCancel: fe,
566
+ "aria-label": J === "back" ? "بازگشت به منو" : J === "close" ? "بستن منو" : "باز کردن منو",
567
+ onPointerDown: Ee,
568
+ onPointerMove: De,
569
+ onPointerUp: Oe,
570
+ onPointerCancel: ke,
850
571
  sx: {
851
572
  position: "fixed",
852
- width: `${T}px`,
853
- height: `${T}px`,
573
+ width: `${x}px`,
574
+ height: `${x}px`,
854
575
  borderRadius: "50%",
855
- top: H.y - T / 2,
856
- left: H.x - T / 2,
576
+ top: W.y - x / 2,
577
+ left: W.x - x / 2,
857
578
  zIndex: 1330,
858
579
  display: "flex",
859
580
  alignItems: "center",
860
581
  justifyContent: "center",
861
- cursor: j.current ? "grabbing" : "pointer",
582
+ cursor: E.current ? "grabbing" : "pointer",
862
583
  userSelect: "none",
863
584
  touchAction: "none",
864
- background: "linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06))",
865
- border: "1px solid rgba(255,255,255,0.25)",
585
+ background: je,
586
+ border: "1px solid rgba(255,255,255,0.28)",
866
587
  boxShadow: "0 18px 60px rgba(0,0,0,0.45)"
867
588
  },
868
- children: G === "back" ? /* @__PURE__ */ (0, h.jsx)(a, {
589
+ children: [q > 0 ? /* @__PURE__ */ l(a, {
590
+ component: "span",
591
+ "aria-label": String(q),
592
+ sx: {
593
+ position: "absolute",
594
+ top: -2,
595
+ right: -2,
596
+ minWidth: 22,
597
+ height: 22,
598
+ px: .5,
599
+ borderRadius: "11px",
600
+ bgcolor: "#f43f5e",
601
+ color: "#fff",
602
+ fontSize: "0.72rem",
603
+ fontWeight: 800,
604
+ display: "inline-flex",
605
+ alignItems: "center",
606
+ justifyContent: "center",
607
+ lineHeight: 1,
608
+ border: "2px solid rgba(255,255,255,0.35)",
609
+ boxShadow: "0 4px 12px rgba(0,0,0,0.35)",
610
+ zIndex: 2,
611
+ pointerEvents: "none"
612
+ },
613
+ children: q > 99 ? "99+" : q
614
+ }) : null, J === "back" ? /* @__PURE__ */ l(a, {
869
615
  "aria-hidden": !0,
870
616
  component: "svg",
871
617
  viewBox: "0 0 24 24",
872
618
  sx: {
873
- width: `${T * .48}px`,
874
- height: `${T * .48}px`,
619
+ width: `${x * .48}px`,
620
+ height: `${x * .48}px`,
875
621
  flexShrink: 0,
876
622
  display: "block",
877
623
  color: "#fff",
878
624
  opacity: .98,
879
625
  filter: "drop-shadow(0 2px 8px rgba(0,0,0,0.45))",
880
626
  shapeRendering: "geometricPrecision",
881
- transform: K ? "scaleX(-1)" : "none"
627
+ transform: xe ? "scaleX(-1)" : "none"
882
628
  },
883
- children: /* @__PURE__ */ (0, h.jsx)("path", {
629
+ children: /* @__PURE__ */ l("path", {
884
630
  fill: "currentColor",
885
631
  d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"
886
632
  })
887
- }) : G === "close" ? /* @__PURE__ */ (0, h.jsx)(a, {
633
+ }) : J === "close" ? /* @__PURE__ */ l(a, {
888
634
  "aria-hidden": !0,
889
635
  component: "svg",
890
636
  viewBox: "0 0 24 24",
891
637
  sx: {
892
- width: `${T * .46}px`,
893
- height: `${T * .46}px`,
638
+ width: `${x * .46}px`,
639
+ height: `${x * .46}px`,
894
640
  flexShrink: 0,
895
641
  display: "block",
896
642
  color: "#fff",
@@ -898,17 +644,17 @@ function b(d) {
898
644
  filter: "drop-shadow(0 2px 8px rgba(0,0,0,0.45))",
899
645
  shapeRendering: "geometricPrecision"
900
646
  },
901
- children: /* @__PURE__ */ (0, h.jsx)("path", {
647
+ children: /* @__PURE__ */ l("path", {
902
648
  fill: "currentColor",
903
649
  d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
904
650
  })
905
- }) : /* @__PURE__ */ (0, h.jsxs)(a, {
651
+ }) : /* @__PURE__ */ u(a, {
906
652
  "aria-hidden": !0,
907
653
  component: "svg",
908
654
  viewBox: "0 0 24 24",
909
655
  sx: {
910
- width: `${T * .5}px`,
911
- height: `${T * .5}px`,
656
+ width: `${x * .5}px`,
657
+ height: `${x * .5}px`,
912
658
  flexShrink: 0,
913
659
  display: "block",
914
660
  color: "#fff",
@@ -916,29 +662,29 @@ function b(d) {
916
662
  filter: "drop-shadow(0 2px 8px rgba(0,0,0,0.45))",
917
663
  shapeRendering: "geometricPrecision"
918
664
  },
919
- children: [/* @__PURE__ */ (0, h.jsx)("defs", { children: /* @__PURE__ */ (0, h.jsxs)("linearGradient", {
920
- id: k,
665
+ children: [/* @__PURE__ */ l("defs", { children: /* @__PURE__ */ u("linearGradient", {
666
+ id: he,
921
667
  x1: "0%",
922
668
  y1: "0%",
923
669
  x2: "100%",
924
670
  y2: "100%",
925
- children: [/* @__PURE__ */ (0, h.jsx)("stop", {
671
+ children: [/* @__PURE__ */ l("stop", {
926
672
  offset: "0%",
927
673
  stopColor: "#ffffff",
928
674
  stopOpacity: "1"
929
- }), /* @__PURE__ */ (0, h.jsx)("stop", {
675
+ }), /* @__PURE__ */ l("stop", {
930
676
  offset: "100%",
931
677
  stopColor: "#e8eef8",
932
678
  stopOpacity: "0.95"
933
679
  })]
934
- }) }), /* @__PURE__ */ (0, h.jsx)("path", {
935
- fill: `url(#${k})`,
680
+ }) }), /* @__PURE__ */ l("path", {
681
+ fill: `url(#${he})`,
936
682
  d: "M11 21h-1l1-7H7.5c-.58 0-.57-.32-.38-.66.19-.34.05-.08.07-.12C8.48 10.94 10.42 7.54 13 3h1l-1 7h3.5c.49 0 .56.33.47.51l-.07.15C12.96 17.55 11 21 11 21z"
937
683
  })]
938
- })
684
+ })]
939
685
  })
940
686
  ]
941
687
  });
942
688
  }
943
689
  //#endregion
944
- export { b as ActionButton };
690
+ export { m as ActionButton, ie as DEFAULT_ACCENT_GRADIENT, p as DEFAULT_MENU_SURFACE_BACKGROUND };