image-beautifier 1.0.2 → 1.0.3

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.
@@ -1,29 +1,31 @@
1
- var si = Object.defineProperty;
2
- var ni = (o, t, n) => t in o ? si(o, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : o[t] = n;
3
- var k = (o, t, n) => ni(o, typeof t != "symbol" ? t + "" : t, n);
4
- import yt, { useState as O, useMemo as me, useEffect as M, Children as it, cloneElement as ot, useRef as ue } from "react";
5
- import { ColorPicker as ai, Button as T, Dropdown as vt, Popover as ge, Divider as li, InputNumber as rt, Tooltip as F, Modal as ci, Switch as st, Input as di, Radio as L, Segmented as nt, ConfigProvider as fi, Popconfirm as pi, Drawer as ui, Slider as de, Upload as hi, message as mi } from "antd";
6
- import { observer as Y } from "mobx-react-lite";
7
- import { Camera as gi, Check as xi, Square as bi, Circle as wi, Slash as yi, MoveDownLeft as vi, Pencil as ji, Smile as Mi, Undo as Ci, Redo as Ai, ChevronRight as Ti, ChevronDown as Ni, ChevronUp as Si, RotateCcw as ki, ZoomIn as Ri, ZoomOut as Di, Hand as Hi, Crop as zi, FlipHorizontal2 as Ei, FlipVertical2 as Oi, Sunset as _i, Box as Yi, LayoutGrid as Ii, ImagePlus as Bi, Type as Pi, CodeXml as Wi, ClipboardPaste as Zi, ImagePlay as Gi, Maximize as Fi, ListCollapse as Li, ArrowUpRight as Ui, ArrowDownRight as Vi, ImageDown as Ji, Copy as qi, Settings2 as Xi, ChevronLeft as Qi, Pipette as $i, Trash2 as Ki, icons as at } from "lucide-react";
8
- import { TinyColor as eo } from "@ctrl/tinycolor";
9
- import { clsx as to } from "clsx";
10
- import { twMerge as io } from "tailwind-merge";
11
- import { makeAutoObservable as jt, toJS as Mt, action as oo } from "mobx";
12
- import ro from "@emoji-mart/data";
13
- import so from "@emoji-mart/react";
14
- import { Frame as no, Image as ao, Box as lo, Rect as De, Ellipse as co, Line as lt, Text as fo, Cursor as po, App as uo, ZoomEvent as ho, ResizeEvent as mo, DragEvent as ke } from "leafer-ui";
15
- import { addListener as go, removeListener as xo } from "resize-detector";
16
- import { Arrow as bo } from "@leafer-in/arrow";
17
- import { ScrollBar as wo } from "@leafer-in/scroll";
18
- import { tinykeys as Ct } from "tinykeys";
1
+ var hr = Object.defineProperty;
2
+ var pr = (o, t, n) => t in o ? hr(o, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : o[t] = n;
3
+ var R = (o, t, n) => pr(o, typeof t != "symbol" ? t + "" : t, n);
4
+ import kt, { useState as O, useMemo as le, useEffect as N, Children as it, cloneElement as st, useRef as ne } from "react";
5
+ import { ColorPicker as ur, Button as k, Dropdown as At, Popover as xe, Divider as mr, InputNumber as nt, Tooltip as L, Modal as gr, Switch as at, Input as xr, Radio as P, Segmented as lt, ConfigProvider as Nt, Popconfirm as br, Drawer as wr, Slider as pe, Upload as yr, message as vr, theme as ct } from "antd";
6
+ import { observer as B } from "mobx-react-lite";
7
+ import { Camera as jr, Check as Mr, Square as Cr, Circle as kr, Slash as Ar, MoveDownLeft as Nr, Pencil as Tr, Smile as Sr, Undo as Rr, Redo as Dr, ChevronRight as Hr, ChevronDown as zr, ChevronUp as _r, RotateCcw as Er, ZoomIn as Or, ZoomOut as Br, Hand as Yr, Crop as Ir, FlipHorizontal2 as Pr, FlipVertical2 as Wr, Sunset as Zr, Box as Gr, LayoutGrid as Fr, ImagePlus as Lr, Type as Ur, CodeXml as Vr, ClipboardPaste as Jr, ImagePlay as qr, Maximize as Xr, ListCollapse as Qr, ArrowUpRight as $r, ArrowDownRight as Kr, ImageDown as eo, Copy as to, Settings2 as ro, ChevronLeft as oo, Pipette as io, Trash2 as so, Sun as no, Moon as ao, icons as dt } from "lucide-react";
8
+ import { TinyColor as lo } from "@ctrl/tinycolor";
9
+ import { clsx as co } from "clsx";
10
+ import { twMerge as fo } from "tailwind-merge";
11
+ import { makeAutoObservable as Tt, toJS as St, runInAction as ho, action as po } from "mobx";
12
+ import { maxBy as uo } from "lodash";
13
+ import mo from "@emoji-mart/data";
14
+ import go from "@emoji-mart/react";
15
+ import { Frame as xo, Rect as ae, Box as ft, Ellipse as ht, Line as pt, Text as bo, Cursor as wo, App as yo, ZoomEvent as vo, ResizeEvent as jo, PointerEvent as Mo, DragEvent as De } from "leafer-ui";
16
+ import { addListener as Co, removeListener as ko } from "resize-detector";
17
+ import { Arrow as Ao } from "@leafer-in/arrow";
18
+ import { ScrollBar as No } from "@leafer-in/scroll";
19
+ import { tinykeys as Rt } from "tinykeys";
19
20
  import "@leafer-in/editor";
20
21
  import "@leafer-in/view";
21
- import yo from "react-cropper";
22
- var fe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
23
- function vo(o) {
22
+ import { StyleProvider as To } from "@ant-design/cssinjs";
23
+ import So from "react-cropper";
24
+ var ue = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
25
+ function Ro(o) {
24
26
  return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
25
27
  }
26
- var He = { exports: {} }, oe = {};
28
+ var ze = { exports: {} }, oe = {};
27
29
  /**
28
30
  * @license React
29
31
  * react-jsx-runtime.production.min.js
@@ -33,21 +35,21 @@ var He = { exports: {} }, oe = {};
33
35
  * This source code is licensed under the MIT license found in the
34
36
  * LICENSE file in the root directory of this source tree.
35
37
  */
36
- var ct;
37
- function jo() {
38
- if (ct) return oe;
39
- ct = 1;
40
- var o = yt, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, a = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
41
- function d(f, u, h) {
42
- var g, y = {}, S = null, N = null;
43
- h !== void 0 && (S = "" + h), u.key !== void 0 && (S = "" + u.key), u.ref !== void 0 && (N = u.ref);
44
- for (g in u) s.call(u, g) && !l.hasOwnProperty(g) && (y[g] = u[g]);
45
- if (f && f.defaultProps) for (g in u = f.defaultProps, u) y[g] === void 0 && (y[g] = u[g]);
46
- return { $$typeof: t, type: f, key: S, ref: N, props: y, _owner: a.current };
38
+ var ut;
39
+ function Do() {
40
+ if (ut) return oe;
41
+ ut = 1;
42
+ var o = kt, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, a = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
43
+ function h(f, d, p) {
44
+ var m, b = {}, C = null, A = null;
45
+ p !== void 0 && (C = "" + p), d.key !== void 0 && (C = "" + d.key), d.ref !== void 0 && (A = d.ref);
46
+ for (m in d) s.call(d, m) && !l.hasOwnProperty(m) && (b[m] = d[m]);
47
+ if (f && f.defaultProps) for (m in d = f.defaultProps, d) b[m] === void 0 && (b[m] = d[m]);
48
+ return { $$typeof: t, type: f, key: C, ref: A, props: b, _owner: a.current };
47
49
  }
48
- return oe.Fragment = n, oe.jsx = d, oe.jsxs = d, oe;
50
+ return oe.Fragment = n, oe.jsx = h, oe.jsxs = h, oe;
49
51
  }
50
- var re = {};
52
+ var ie = {};
51
53
  /**
52
54
  * @license React
53
55
  * react-jsx-runtime.development.js
@@ -57,61 +59,61 @@ var re = {};
57
59
  * This source code is licensed under the MIT license found in the
58
60
  * LICENSE file in the root directory of this source tree.
59
61
  */
60
- var dt;
61
- function Mo() {
62
- return dt || (dt = 1, process.env.NODE_ENV !== "production" && function() {
63
- var o = yt, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), f = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), N = Symbol.for("react.offscreen"), x = Symbol.iterator, v = "@@iterator";
64
- function H(i) {
65
- if (i === null || typeof i != "object")
62
+ var mt;
63
+ function Ho() {
64
+ return mt || (mt = 1, process.env.NODE_ENV !== "production" && function() {
65
+ var o = kt, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), f = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), A = Symbol.for("react.offscreen"), x = Symbol.iterator, w = "@@iterator";
66
+ function S(r) {
67
+ if (r === null || typeof r != "object")
66
68
  return null;
67
- var c = x && i[x] || i[v];
69
+ var c = x && r[x] || r[w];
68
70
  return typeof c == "function" ? c : null;
69
71
  }
70
72
  var _ = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
71
- function E(i) {
73
+ function E(r) {
72
74
  {
73
- for (var c = arguments.length, p = new Array(c > 1 ? c - 1 : 0), m = 1; m < c; m++)
74
- p[m - 1] = arguments[m];
75
- be("error", i, p);
75
+ for (var c = arguments.length, u = new Array(c > 1 ? c - 1 : 0), g = 1; g < c; g++)
76
+ u[g - 1] = arguments[g];
77
+ ye("error", r, u);
76
78
  }
77
79
  }
78
- function be(i, c, p) {
80
+ function ye(r, c, u) {
79
81
  {
80
- var m = _.ReactDebugCurrentFrame, j = m.getStackAddendum();
81
- j !== "" && (c += "%s", p = p.concat([j]));
82
- var C = p.map(function(w) {
83
- return String(w);
82
+ var g = _.ReactDebugCurrentFrame, j = g.getStackAddendum();
83
+ j !== "" && (c += "%s", u = u.concat([j]));
84
+ var T = u.map(function(v) {
85
+ return String(v);
84
86
  });
85
- C.unshift("Warning: " + c), Function.prototype.apply.call(console[i], console, C);
87
+ T.unshift("Warning: " + c), Function.prototype.apply.call(console[r], console, T);
86
88
  }
87
89
  }
88
- var we = !1, $ = !1, R = !1, W = !1, U = !1, K;
90
+ var ve = !1, $ = !1, D = !1, G = !1, U = !1, K;
89
91
  K = Symbol.for("react.module.reference");
90
- function Rt(i) {
91
- return !!(typeof i == "string" || typeof i == "function" || i === s || i === l || U || i === a || i === h || i === g || W || i === N || we || $ || R || typeof i == "object" && i !== null && (i.$$typeof === S || i.$$typeof === y || i.$$typeof === d || i.$$typeof === f || i.$$typeof === u || // This needs to include all possible module reference object
92
+ function Bt(r) {
93
+ return !!(typeof r == "string" || typeof r == "function" || r === s || r === l || U || r === a || r === p || r === m || G || r === A || ve || $ || D || typeof r == "object" && r !== null && (r.$$typeof === C || r.$$typeof === b || r.$$typeof === h || r.$$typeof === f || r.$$typeof === d || // This needs to include all possible module reference object
92
94
  // types supported by any Flight configuration anywhere since
93
95
  // we don't know which Flight build this will end up being used
94
96
  // with.
95
- i.$$typeof === K || i.getModuleId !== void 0));
97
+ r.$$typeof === K || r.getModuleId !== void 0));
96
98
  }
97
- function Dt(i, c, p) {
98
- var m = i.displayName;
99
- if (m)
100
- return m;
99
+ function Yt(r, c, u) {
100
+ var g = r.displayName;
101
+ if (g)
102
+ return g;
101
103
  var j = c.displayName || c.name || "";
102
- return j !== "" ? p + "(" + j + ")" : p;
104
+ return j !== "" ? u + "(" + j + ")" : u;
103
105
  }
104
- function ze(i) {
105
- return i.displayName || "Context";
106
+ function Ee(r) {
107
+ return r.displayName || "Context";
106
108
  }
107
- function Z(i) {
108
- if (i == null)
109
+ function F(r) {
110
+ if (r == null)
109
111
  return null;
110
- if (typeof i.tag == "number" && E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof i == "function")
111
- return i.displayName || i.name || null;
112
- if (typeof i == "string")
113
- return i;
114
- switch (i) {
112
+ if (typeof r.tag == "number" && E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
113
+ return r.displayName || r.name || null;
114
+ if (typeof r == "string")
115
+ return r;
116
+ switch (r) {
115
117
  case s:
116
118
  return "Fragment";
117
119
  case n:
@@ -120,28 +122,28 @@ function Mo() {
120
122
  return "Profiler";
121
123
  case a:
122
124
  return "StrictMode";
123
- case h:
125
+ case p:
124
126
  return "Suspense";
125
- case g:
127
+ case m:
126
128
  return "SuspenseList";
127
129
  }
128
- if (typeof i == "object")
129
- switch (i.$$typeof) {
130
+ if (typeof r == "object")
131
+ switch (r.$$typeof) {
130
132
  case f:
131
- var c = i;
132
- return ze(c) + ".Consumer";
133
+ var c = r;
134
+ return Ee(c) + ".Consumer";
135
+ case h:
136
+ var u = r;
137
+ return Ee(u._context) + ".Provider";
133
138
  case d:
134
- var p = i;
135
- return ze(p._context) + ".Provider";
136
- case u:
137
- return Dt(i, i.render, "ForwardRef");
138
- case y:
139
- var m = i.displayName || null;
140
- return m !== null ? m : Z(i.type) || "Memo";
141
- case S: {
142
- var j = i, C = j._payload, w = j._init;
139
+ return Yt(r, r.render, "ForwardRef");
140
+ case b:
141
+ var g = r.displayName || null;
142
+ return g !== null ? g : F(r.type) || "Memo";
143
+ case C: {
144
+ var j = r, T = j._payload, v = j._init;
143
145
  try {
144
- return Z(w(C));
146
+ return F(v(T));
145
147
  } catch {
146
148
  return null;
147
149
  }
@@ -149,570 +151,572 @@ function Mo() {
149
151
  }
150
152
  return null;
151
153
  }
152
- var V = Object.assign, ee = 0, Ee, Oe, _e, Ye, Ie, Be, Pe;
153
- function We() {
154
+ var V = Object.assign, ee = 0, Oe, Be, Ye, Ie, Pe, We, Ze;
155
+ function Ge() {
154
156
  }
155
- We.__reactDisabledLog = !0;
156
- function Ht() {
157
+ Ge.__reactDisabledLog = !0;
158
+ function It() {
157
159
  {
158
160
  if (ee === 0) {
159
- Ee = console.log, Oe = console.info, _e = console.warn, Ye = console.error, Ie = console.group, Be = console.groupCollapsed, Pe = console.groupEnd;
160
- var i = {
161
+ Oe = console.log, Be = console.info, Ye = console.warn, Ie = console.error, Pe = console.group, We = console.groupCollapsed, Ze = console.groupEnd;
162
+ var r = {
161
163
  configurable: !0,
162
164
  enumerable: !0,
163
- value: We,
165
+ value: Ge,
164
166
  writable: !0
165
167
  };
166
168
  Object.defineProperties(console, {
167
- info: i,
168
- log: i,
169
- warn: i,
170
- error: i,
171
- group: i,
172
- groupCollapsed: i,
173
- groupEnd: i
169
+ info: r,
170
+ log: r,
171
+ warn: r,
172
+ error: r,
173
+ group: r,
174
+ groupCollapsed: r,
175
+ groupEnd: r
174
176
  });
175
177
  }
176
178
  ee++;
177
179
  }
178
180
  }
179
- function zt() {
181
+ function Pt() {
180
182
  {
181
183
  if (ee--, ee === 0) {
182
- var i = {
184
+ var r = {
183
185
  configurable: !0,
184
186
  enumerable: !0,
185
187
  writable: !0
186
188
  };
187
189
  Object.defineProperties(console, {
188
- log: V({}, i, {
189
- value: Ee
190
- }),
191
- info: V({}, i, {
190
+ log: V({}, r, {
192
191
  value: Oe
193
192
  }),
194
- warn: V({}, i, {
195
- value: _e
193
+ info: V({}, r, {
194
+ value: Be
196
195
  }),
197
- error: V({}, i, {
196
+ warn: V({}, r, {
198
197
  value: Ye
199
198
  }),
200
- group: V({}, i, {
199
+ error: V({}, r, {
201
200
  value: Ie
202
201
  }),
203
- groupCollapsed: V({}, i, {
204
- value: Be
205
- }),
206
- groupEnd: V({}, i, {
202
+ group: V({}, r, {
207
203
  value: Pe
204
+ }),
205
+ groupCollapsed: V({}, r, {
206
+ value: We
207
+ }),
208
+ groupEnd: V({}, r, {
209
+ value: Ze
208
210
  })
209
211
  });
210
212
  }
211
213
  ee < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
212
214
  }
213
215
  }
214
- var ye = _.ReactCurrentDispatcher, ve;
215
- function ne(i, c, p) {
216
+ var je = _.ReactCurrentDispatcher, Me;
217
+ function ce(r, c, u) {
216
218
  {
217
- if (ve === void 0)
219
+ if (Me === void 0)
218
220
  try {
219
221
  throw Error();
220
222
  } catch (j) {
221
- var m = j.stack.trim().match(/\n( *(at )?)/);
222
- ve = m && m[1] || "";
223
+ var g = j.stack.trim().match(/\n( *(at )?)/);
224
+ Me = g && g[1] || "";
223
225
  }
224
226
  return `
225
- ` + ve + i;
227
+ ` + Me + r;
226
228
  }
227
229
  }
228
- var je = !1, ae;
230
+ var Ce = !1, de;
229
231
  {
230
- var Et = typeof WeakMap == "function" ? WeakMap : Map;
231
- ae = new Et();
232
+ var Wt = typeof WeakMap == "function" ? WeakMap : Map;
233
+ de = new Wt();
232
234
  }
233
- function Ze(i, c) {
234
- if (!i || je)
235
+ function Fe(r, c) {
236
+ if (!r || Ce)
235
237
  return "";
236
238
  {
237
- var p = ae.get(i);
238
- if (p !== void 0)
239
- return p;
239
+ var u = de.get(r);
240
+ if (u !== void 0)
241
+ return u;
240
242
  }
241
- var m;
242
- je = !0;
243
+ var g;
244
+ Ce = !0;
243
245
  var j = Error.prepareStackTrace;
244
246
  Error.prepareStackTrace = void 0;
245
- var C;
246
- C = ye.current, ye.current = null, Ht();
247
+ var T;
248
+ T = je.current, je.current = null, It();
247
249
  try {
248
250
  if (c) {
249
- var w = function() {
251
+ var v = function() {
250
252
  throw Error();
251
253
  };
252
- if (Object.defineProperty(w.prototype, "props", {
254
+ if (Object.defineProperty(v.prototype, "props", {
253
255
  set: function() {
254
256
  throw Error();
255
257
  }
256
258
  }), typeof Reflect == "object" && Reflect.construct) {
257
259
  try {
258
- Reflect.construct(w, []);
259
- } catch (B) {
260
- m = B;
260
+ Reflect.construct(v, []);
261
+ } catch (I) {
262
+ g = I;
261
263
  }
262
- Reflect.construct(i, [], w);
264
+ Reflect.construct(r, [], v);
263
265
  } else {
264
266
  try {
265
- w.call();
266
- } catch (B) {
267
- m = B;
267
+ v.call();
268
+ } catch (I) {
269
+ g = I;
268
270
  }
269
- i.call(w.prototype);
271
+ r.call(v.prototype);
270
272
  }
271
273
  } else {
272
274
  try {
273
275
  throw Error();
274
- } catch (B) {
275
- m = B;
276
+ } catch (I) {
277
+ g = I;
276
278
  }
277
- i();
279
+ r();
278
280
  }
279
- } catch (B) {
280
- if (B && m && typeof B.stack == "string") {
281
- for (var b = B.stack.split(`
282
- `), I = m.stack.split(`
283
- `), D = b.length - 1, z = I.length - 1; D >= 1 && z >= 0 && b[D] !== I[z]; )
281
+ } catch (I) {
282
+ if (I && g && typeof I.stack == "string") {
283
+ for (var y = I.stack.split(`
284
+ `), Y = g.stack.split(`
285
+ `), H = y.length - 1, z = Y.length - 1; H >= 1 && z >= 0 && y[H] !== Y[z]; )
284
286
  z--;
285
- for (; D >= 1 && z >= 0; D--, z--)
286
- if (b[D] !== I[z]) {
287
- if (D !== 1 || z !== 1)
287
+ for (; H >= 1 && z >= 0; H--, z--)
288
+ if (y[H] !== Y[z]) {
289
+ if (H !== 1 || z !== 1)
288
290
  do
289
- if (D--, z--, z < 0 || b[D] !== I[z]) {
290
- var P = `
291
- ` + b[D].replace(" at new ", " at ");
292
- return i.displayName && P.includes("<anonymous>") && (P = P.replace("<anonymous>", i.displayName)), typeof i == "function" && ae.set(i, P), P;
291
+ if (H--, z--, z < 0 || y[H] !== Y[z]) {
292
+ var W = `
293
+ ` + y[H].replace(" at new ", " at ");
294
+ return r.displayName && W.includes("<anonymous>") && (W = W.replace("<anonymous>", r.displayName)), typeof r == "function" && de.set(r, W), W;
293
295
  }
294
- while (D >= 1 && z >= 0);
296
+ while (H >= 1 && z >= 0);
295
297
  break;
296
298
  }
297
299
  }
298
300
  } finally {
299
- je = !1, ye.current = C, zt(), Error.prepareStackTrace = j;
301
+ Ce = !1, je.current = T, Pt(), Error.prepareStackTrace = j;
300
302
  }
301
- var X = i ? i.displayName || i.name : "", J = X ? ne(X) : "";
302
- return typeof i == "function" && ae.set(i, J), J;
303
+ var X = r ? r.displayName || r.name : "", J = X ? ce(X) : "";
304
+ return typeof r == "function" && de.set(r, J), J;
303
305
  }
304
- function Ot(i, c, p) {
305
- return Ze(i, !1);
306
+ function Zt(r, c, u) {
307
+ return Fe(r, !1);
306
308
  }
307
- function _t(i) {
308
- var c = i.prototype;
309
+ function Gt(r) {
310
+ var c = r.prototype;
309
311
  return !!(c && c.isReactComponent);
310
312
  }
311
- function le(i, c, p) {
312
- if (i == null)
313
+ function fe(r, c, u) {
314
+ if (r == null)
313
315
  return "";
314
- if (typeof i == "function")
315
- return Ze(i, _t(i));
316
- if (typeof i == "string")
317
- return ne(i);
318
- switch (i) {
319
- case h:
320
- return ne("Suspense");
321
- case g:
322
- return ne("SuspenseList");
316
+ if (typeof r == "function")
317
+ return Fe(r, Gt(r));
318
+ if (typeof r == "string")
319
+ return ce(r);
320
+ switch (r) {
321
+ case p:
322
+ return ce("Suspense");
323
+ case m:
324
+ return ce("SuspenseList");
323
325
  }
324
- if (typeof i == "object")
325
- switch (i.$$typeof) {
326
- case u:
327
- return Ot(i.render);
328
- case y:
329
- return le(i.type, c, p);
330
- case S: {
331
- var m = i, j = m._payload, C = m._init;
326
+ if (typeof r == "object")
327
+ switch (r.$$typeof) {
328
+ case d:
329
+ return Zt(r.render);
330
+ case b:
331
+ return fe(r.type, c, u);
332
+ case C: {
333
+ var g = r, j = g._payload, T = g._init;
332
334
  try {
333
- return le(C(j), c, p);
335
+ return fe(T(j), c, u);
334
336
  } catch {
335
337
  }
336
338
  }
337
339
  }
338
340
  return "";
339
341
  }
340
- var te = Object.prototype.hasOwnProperty, Ge = {}, Fe = _.ReactDebugCurrentFrame;
341
- function ce(i) {
342
- if (i) {
343
- var c = i._owner, p = le(i.type, i._source, c ? c.type : null);
344
- Fe.setExtraStackFrame(p);
342
+ var te = Object.prototype.hasOwnProperty, Le = {}, Ue = _.ReactDebugCurrentFrame;
343
+ function he(r) {
344
+ if (r) {
345
+ var c = r._owner, u = fe(r.type, r._source, c ? c.type : null);
346
+ Ue.setExtraStackFrame(u);
345
347
  } else
346
- Fe.setExtraStackFrame(null);
348
+ Ue.setExtraStackFrame(null);
347
349
  }
348
- function Yt(i, c, p, m, j) {
350
+ function Ft(r, c, u, g, j) {
349
351
  {
350
- var C = Function.call.bind(te);
351
- for (var w in i)
352
- if (C(i, w)) {
353
- var b = void 0;
352
+ var T = Function.call.bind(te);
353
+ for (var v in r)
354
+ if (T(r, v)) {
355
+ var y = void 0;
354
356
  try {
355
- if (typeof i[w] != "function") {
356
- var I = Error((m || "React class") + ": " + p + " type `" + w + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[w] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
357
- throw I.name = "Invariant Violation", I;
357
+ if (typeof r[v] != "function") {
358
+ var Y = Error((g || "React class") + ": " + u + " type `" + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[v] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
359
+ throw Y.name = "Invariant Violation", Y;
358
360
  }
359
- b = i[w](c, w, m, p, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
360
- } catch (D) {
361
- b = D;
361
+ y = r[v](c, v, g, u, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
362
+ } catch (H) {
363
+ y = H;
362
364
  }
363
- b && !(b instanceof Error) && (ce(j), E("%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).", m || "React class", p, w, typeof b), ce(null)), b instanceof Error && !(b.message in Ge) && (Ge[b.message] = !0, ce(j), E("Failed %s type: %s", p, b.message), ce(null));
365
+ y && !(y instanceof Error) && (he(j), E("%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).", g || "React class", u, v, typeof y), he(null)), y instanceof Error && !(y.message in Le) && (Le[y.message] = !0, he(j), E("Failed %s type: %s", u, y.message), he(null));
364
366
  }
365
367
  }
366
368
  }
367
- var It = Array.isArray;
368
- function Me(i) {
369
- return It(i);
369
+ var Lt = Array.isArray;
370
+ function ke(r) {
371
+ return Lt(r);
370
372
  }
371
- function Bt(i) {
373
+ function Ut(r) {
372
374
  {
373
- var c = typeof Symbol == "function" && Symbol.toStringTag, p = c && i[Symbol.toStringTag] || i.constructor.name || "Object";
374
- return p;
375
+ var c = typeof Symbol == "function" && Symbol.toStringTag, u = c && r[Symbol.toStringTag] || r.constructor.name || "Object";
376
+ return u;
375
377
  }
376
378
  }
377
- function Pt(i) {
379
+ function Vt(r) {
378
380
  try {
379
- return Le(i), !1;
381
+ return Ve(r), !1;
380
382
  } catch {
381
383
  return !0;
382
384
  }
383
385
  }
384
- function Le(i) {
385
- return "" + i;
386
+ function Ve(r) {
387
+ return "" + r;
386
388
  }
387
- function Ue(i) {
388
- if (Pt(i))
389
- return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Bt(i)), Le(i);
389
+ function Je(r) {
390
+ if (Vt(r))
391
+ return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ut(r)), Ve(r);
390
392
  }
391
- var ie = _.ReactCurrentOwner, Wt = {
393
+ var re = _.ReactCurrentOwner, Jt = {
392
394
  key: !0,
393
395
  ref: !0,
394
396
  __self: !0,
395
397
  __source: !0
396
- }, Ve, Je, Ce;
397
- Ce = {};
398
- function Zt(i) {
399
- if (te.call(i, "ref")) {
400
- var c = Object.getOwnPropertyDescriptor(i, "ref").get;
398
+ }, qe, Xe, Ae;
399
+ Ae = {};
400
+ function qt(r) {
401
+ if (te.call(r, "ref")) {
402
+ var c = Object.getOwnPropertyDescriptor(r, "ref").get;
401
403
  if (c && c.isReactWarning)
402
404
  return !1;
403
405
  }
404
- return i.ref !== void 0;
406
+ return r.ref !== void 0;
405
407
  }
406
- function Gt(i) {
407
- if (te.call(i, "key")) {
408
- var c = Object.getOwnPropertyDescriptor(i, "key").get;
408
+ function Xt(r) {
409
+ if (te.call(r, "key")) {
410
+ var c = Object.getOwnPropertyDescriptor(r, "key").get;
409
411
  if (c && c.isReactWarning)
410
412
  return !1;
411
413
  }
412
- return i.key !== void 0;
414
+ return r.key !== void 0;
413
415
  }
414
- function Ft(i, c) {
415
- if (typeof i.ref == "string" && ie.current && c && ie.current.stateNode !== c) {
416
- var p = Z(ie.current.type);
417
- Ce[p] || (E('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', Z(ie.current.type), i.ref), Ce[p] = !0);
416
+ function Qt(r, c) {
417
+ if (typeof r.ref == "string" && re.current && c && re.current.stateNode !== c) {
418
+ var u = F(re.current.type);
419
+ Ae[u] || (E('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', F(re.current.type), r.ref), Ae[u] = !0);
418
420
  }
419
421
  }
420
- function Lt(i, c) {
422
+ function $t(r, c) {
421
423
  {
422
- var p = function() {
423
- Ve || (Ve = !0, E("%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)", c));
424
+ var u = function() {
425
+ qe || (qe = !0, E("%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)", c));
424
426
  };
425
- p.isReactWarning = !0, Object.defineProperty(i, "key", {
426
- get: p,
427
+ u.isReactWarning = !0, Object.defineProperty(r, "key", {
428
+ get: u,
427
429
  configurable: !0
428
430
  });
429
431
  }
430
432
  }
431
- function Ut(i, c) {
433
+ function Kt(r, c) {
432
434
  {
433
- var p = function() {
434
- Je || (Je = !0, E("%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)", c));
435
+ var u = function() {
436
+ Xe || (Xe = !0, E("%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)", c));
435
437
  };
436
- p.isReactWarning = !0, Object.defineProperty(i, "ref", {
437
- get: p,
438
+ u.isReactWarning = !0, Object.defineProperty(r, "ref", {
439
+ get: u,
438
440
  configurable: !0
439
441
  });
440
442
  }
441
443
  }
442
- var Vt = function(i, c, p, m, j, C, w) {
443
- var b = {
444
+ var er = function(r, c, u, g, j, T, v) {
445
+ var y = {
444
446
  // This tag allows us to uniquely identify this as a React Element
445
447
  $$typeof: t,
446
448
  // Built-in properties that belong on the element
447
- type: i,
449
+ type: r,
448
450
  key: c,
449
- ref: p,
450
- props: w,
451
+ ref: u,
452
+ props: v,
451
453
  // Record the component responsible for creating this element.
452
- _owner: C
454
+ _owner: T
453
455
  };
454
- return b._store = {}, Object.defineProperty(b._store, "validated", {
456
+ return y._store = {}, Object.defineProperty(y._store, "validated", {
455
457
  configurable: !1,
456
458
  enumerable: !1,
457
459
  writable: !0,
458
460
  value: !1
459
- }), Object.defineProperty(b, "_self", {
461
+ }), Object.defineProperty(y, "_self", {
460
462
  configurable: !1,
461
463
  enumerable: !1,
462
464
  writable: !1,
463
- value: m
464
- }), Object.defineProperty(b, "_source", {
465
+ value: g
466
+ }), Object.defineProperty(y, "_source", {
465
467
  configurable: !1,
466
468
  enumerable: !1,
467
469
  writable: !1,
468
470
  value: j
469
- }), Object.freeze && (Object.freeze(b.props), Object.freeze(b)), b;
471
+ }), Object.freeze && (Object.freeze(y.props), Object.freeze(y)), y;
470
472
  };
471
- function Jt(i, c, p, m, j) {
473
+ function tr(r, c, u, g, j) {
472
474
  {
473
- var C, w = {}, b = null, I = null;
474
- p !== void 0 && (Ue(p), b = "" + p), Gt(c) && (Ue(c.key), b = "" + c.key), Zt(c) && (I = c.ref, Ft(c, j));
475
- for (C in c)
476
- te.call(c, C) && !Wt.hasOwnProperty(C) && (w[C] = c[C]);
477
- if (i && i.defaultProps) {
478
- var D = i.defaultProps;
479
- for (C in D)
480
- w[C] === void 0 && (w[C] = D[C]);
475
+ var T, v = {}, y = null, Y = null;
476
+ u !== void 0 && (Je(u), y = "" + u), Xt(c) && (Je(c.key), y = "" + c.key), qt(c) && (Y = c.ref, Qt(c, j));
477
+ for (T in c)
478
+ te.call(c, T) && !Jt.hasOwnProperty(T) && (v[T] = c[T]);
479
+ if (r && r.defaultProps) {
480
+ var H = r.defaultProps;
481
+ for (T in H)
482
+ v[T] === void 0 && (v[T] = H[T]);
481
483
  }
482
- if (b || I) {
483
- var z = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
484
- b && Lt(w, z), I && Ut(w, z);
484
+ if (y || Y) {
485
+ var z = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
486
+ y && $t(v, z), Y && Kt(v, z);
485
487
  }
486
- return Vt(i, b, I, j, m, ie.current, w);
488
+ return er(r, y, Y, j, g, re.current, v);
487
489
  }
488
490
  }
489
- var Ae = _.ReactCurrentOwner, qe = _.ReactDebugCurrentFrame;
490
- function q(i) {
491
- if (i) {
492
- var c = i._owner, p = le(i.type, i._source, c ? c.type : null);
493
- qe.setExtraStackFrame(p);
491
+ var Ne = _.ReactCurrentOwner, Qe = _.ReactDebugCurrentFrame;
492
+ function q(r) {
493
+ if (r) {
494
+ var c = r._owner, u = fe(r.type, r._source, c ? c.type : null);
495
+ Qe.setExtraStackFrame(u);
494
496
  } else
495
- qe.setExtraStackFrame(null);
497
+ Qe.setExtraStackFrame(null);
496
498
  }
497
499
  var Te;
498
500
  Te = !1;
499
- function Ne(i) {
500
- return typeof i == "object" && i !== null && i.$$typeof === t;
501
+ function Se(r) {
502
+ return typeof r == "object" && r !== null && r.$$typeof === t;
501
503
  }
502
- function Xe() {
504
+ function $e() {
503
505
  {
504
- if (Ae.current) {
505
- var i = Z(Ae.current.type);
506
- if (i)
506
+ if (Ne.current) {
507
+ var r = F(Ne.current.type);
508
+ if (r)
507
509
  return `
508
510
 
509
- Check the render method of \`` + i + "`.";
511
+ Check the render method of \`` + r + "`.";
510
512
  }
511
513
  return "";
512
514
  }
513
515
  }
514
- function qt(i) {
516
+ function rr(r) {
515
517
  return "";
516
518
  }
517
- var Qe = {};
518
- function Xt(i) {
519
+ var Ke = {};
520
+ function or(r) {
519
521
  {
520
- var c = Xe();
522
+ var c = $e();
521
523
  if (!c) {
522
- var p = typeof i == "string" ? i : i.displayName || i.name;
523
- p && (c = `
524
+ var u = typeof r == "string" ? r : r.displayName || r.name;
525
+ u && (c = `
524
526
 
525
- Check the top-level render call using <` + p + ">.");
527
+ Check the top-level render call using <` + u + ">.");
526
528
  }
527
529
  return c;
528
530
  }
529
531
  }
530
- function $e(i, c) {
532
+ function et(r, c) {
531
533
  {
532
- if (!i._store || i._store.validated || i.key != null)
534
+ if (!r._store || r._store.validated || r.key != null)
533
535
  return;
534
- i._store.validated = !0;
535
- var p = Xt(c);
536
- if (Qe[p])
536
+ r._store.validated = !0;
537
+ var u = or(c);
538
+ if (Ke[u])
537
539
  return;
538
- Qe[p] = !0;
539
- var m = "";
540
- i && i._owner && i._owner !== Ae.current && (m = " It was passed a child from " + Z(i._owner.type) + "."), q(i), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', p, m), q(null);
540
+ Ke[u] = !0;
541
+ var g = "";
542
+ r && r._owner && r._owner !== Ne.current && (g = " It was passed a child from " + F(r._owner.type) + "."), q(r), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', u, g), q(null);
541
543
  }
542
544
  }
543
- function Ke(i, c) {
545
+ function tt(r, c) {
544
546
  {
545
- if (typeof i != "object")
547
+ if (typeof r != "object")
546
548
  return;
547
- if (Me(i))
548
- for (var p = 0; p < i.length; p++) {
549
- var m = i[p];
550
- Ne(m) && $e(m, c);
549
+ if (ke(r))
550
+ for (var u = 0; u < r.length; u++) {
551
+ var g = r[u];
552
+ Se(g) && et(g, c);
551
553
  }
552
- else if (Ne(i))
553
- i._store && (i._store.validated = !0);
554
- else if (i) {
555
- var j = H(i);
556
- if (typeof j == "function" && j !== i.entries)
557
- for (var C = j.call(i), w; !(w = C.next()).done; )
558
- Ne(w.value) && $e(w.value, c);
554
+ else if (Se(r))
555
+ r._store && (r._store.validated = !0);
556
+ else if (r) {
557
+ var j = S(r);
558
+ if (typeof j == "function" && j !== r.entries)
559
+ for (var T = j.call(r), v; !(v = T.next()).done; )
560
+ Se(v.value) && et(v.value, c);
559
561
  }
560
562
  }
561
563
  }
562
- function Qt(i) {
564
+ function ir(r) {
563
565
  {
564
- var c = i.type;
566
+ var c = r.type;
565
567
  if (c == null || typeof c == "string")
566
568
  return;
567
- var p;
569
+ var u;
568
570
  if (typeof c == "function")
569
- p = c.propTypes;
570
- else if (typeof c == "object" && (c.$$typeof === u || // Note: Memo only checks outer props here.
571
+ u = c.propTypes;
572
+ else if (typeof c == "object" && (c.$$typeof === d || // Note: Memo only checks outer props here.
571
573
  // Inner props are checked in the reconciler.
572
- c.$$typeof === y))
573
- p = c.propTypes;
574
+ c.$$typeof === b))
575
+ u = c.propTypes;
574
576
  else
575
577
  return;
576
- if (p) {
577
- var m = Z(c);
578
- Yt(p, i.props, "prop", m, i);
578
+ if (u) {
579
+ var g = F(c);
580
+ Ft(u, r.props, "prop", g, r);
579
581
  } else if (c.PropTypes !== void 0 && !Te) {
580
582
  Te = !0;
581
- var j = Z(c);
583
+ var j = F(c);
582
584
  E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", j || "Unknown");
583
585
  }
584
586
  typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved && E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
585
587
  }
586
588
  }
587
- function $t(i) {
589
+ function sr(r) {
588
590
  {
589
- for (var c = Object.keys(i.props), p = 0; p < c.length; p++) {
590
- var m = c[p];
591
- if (m !== "children" && m !== "key") {
592
- q(i), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", m), q(null);
591
+ for (var c = Object.keys(r.props), u = 0; u < c.length; u++) {
592
+ var g = c[u];
593
+ if (g !== "children" && g !== "key") {
594
+ q(r), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", g), q(null);
593
595
  break;
594
596
  }
595
597
  }
596
- i.ref !== null && (q(i), E("Invalid attribute `ref` supplied to `React.Fragment`."), q(null));
598
+ r.ref !== null && (q(r), E("Invalid attribute `ref` supplied to `React.Fragment`."), q(null));
597
599
  }
598
600
  }
599
- var et = {};
600
- function tt(i, c, p, m, j, C) {
601
+ var rt = {};
602
+ function ot(r, c, u, g, j, T) {
601
603
  {
602
- var w = Rt(i);
603
- if (!w) {
604
- var b = "";
605
- (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (b += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
606
- var I = qt();
607
- I ? b += I : b += Xe();
608
- var D;
609
- i === null ? D = "null" : Me(i) ? D = "array" : i !== void 0 && i.$$typeof === t ? (D = "<" + (Z(i.type) || "Unknown") + " />", b = " Did you accidentally export a JSX literal instead of a component?") : D = typeof i, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, b);
604
+ var v = Bt(r);
605
+ if (!v) {
606
+ var y = "";
607
+ (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (y += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
608
+ var Y = rr();
609
+ Y ? y += Y : y += $e();
610
+ var H;
611
+ r === null ? H = "null" : ke(r) ? H = "array" : r !== void 0 && r.$$typeof === t ? (H = "<" + (F(r.type) || "Unknown") + " />", y = " Did you accidentally export a JSX literal instead of a component?") : H = typeof r, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", H, y);
610
612
  }
611
- var z = Jt(i, c, p, j, C);
613
+ var z = tr(r, c, u, j, T);
612
614
  if (z == null)
613
615
  return z;
614
- if (w) {
615
- var P = c.children;
616
- if (P !== void 0)
617
- if (m)
618
- if (Me(P)) {
619
- for (var X = 0; X < P.length; X++)
620
- Ke(P[X], i);
621
- Object.freeze && Object.freeze(P);
616
+ if (v) {
617
+ var W = c.children;
618
+ if (W !== void 0)
619
+ if (g)
620
+ if (ke(W)) {
621
+ for (var X = 0; X < W.length; X++)
622
+ tt(W[X], r);
623
+ Object.freeze && Object.freeze(W);
622
624
  } else
623
625
  E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
624
626
  else
625
- Ke(P, i);
627
+ tt(W, r);
626
628
  }
627
629
  if (te.call(c, "key")) {
628
- var J = Z(i), B = Object.keys(c).filter(function(ri) {
629
- return ri !== "key";
630
- }), Se = B.length > 0 ? "{key: someKey, " + B.join(": ..., ") + ": ...}" : "{key: someKey}";
631
- if (!et[J + Se]) {
632
- var oi = B.length > 0 ? "{" + B.join(": ..., ") + ": ...}" : "{}";
630
+ var J = F(r), I = Object.keys(c).filter(function(fr) {
631
+ return fr !== "key";
632
+ }), Re = I.length > 0 ? "{key: someKey, " + I.join(": ..., ") + ": ...}" : "{key: someKey}";
633
+ if (!rt[J + Re]) {
634
+ var dr = I.length > 0 ? "{" + I.join(": ..., ") + ": ...}" : "{}";
633
635
  E(`A props object containing a "key" prop is being spread into JSX:
634
636
  let props = %s;
635
637
  <%s {...props} />
636
638
  React keys must be passed directly to JSX without using spread:
637
639
  let props = %s;
638
- <%s key={someKey} {...props} />`, Se, J, oi, J), et[J + Se] = !0;
640
+ <%s key={someKey} {...props} />`, Re, J, dr, J), rt[J + Re] = !0;
639
641
  }
640
642
  }
641
- return i === s ? $t(z) : Qt(z), z;
643
+ return r === s ? sr(z) : ir(z), z;
642
644
  }
643
645
  }
644
- function Kt(i, c, p) {
645
- return tt(i, c, p, !0);
646
+ function nr(r, c, u) {
647
+ return ot(r, c, u, !0);
646
648
  }
647
- function ei(i, c, p) {
648
- return tt(i, c, p, !1);
649
+ function ar(r, c, u) {
650
+ return ot(r, c, u, !1);
649
651
  }
650
- var ti = ei, ii = Kt;
651
- re.Fragment = s, re.jsx = ti, re.jsxs = ii;
652
- }()), re;
652
+ var lr = ar, cr = nr;
653
+ ie.Fragment = s, ie.jsx = lr, ie.jsxs = cr;
654
+ }()), ie;
653
655
  }
654
- process.env.NODE_ENV === "production" ? He.exports = jo() : He.exports = Mo();
655
- var e = He.exports;
656
- const A = {
657
- Camera: gi,
658
- Check: xi,
659
- Square: bi,
660
- Circle: wi,
661
- Slash: yi,
662
- MoveDownLeft: vi,
663
- Pencil: ji,
664
- Smile: Mi,
665
- Undo: Ci,
666
- Redo: Ai,
667
- ChevronRight: Ti,
668
- ChevronDown: Ni,
669
- ChevronUp: Si,
670
- RotateCcw: ki,
671
- ZoomIn: Ri,
672
- ZoomOut: Di,
673
- Hand: Hi,
674
- Crop: zi,
675
- FlipHorizontal2: Ei,
676
- FlipVertical2: Oi,
677
- Sunset: _i,
678
- Box: Yi,
679
- LayoutGrid: Ii,
680
- ImagePlus: Bi,
681
- Type: Pi,
682
- CodeXml: Wi,
683
- ClipboardPaste: Zi,
684
- ImagePlay: Gi,
685
- Maximize: Fi,
686
- ListCollapse: Li,
687
- ArrowUpRight: Ui,
688
- ArrowDownRight: Vi,
689
- ImageDown: Ji,
690
- Copy: qi,
691
- Settings2: Xi,
692
- ChevronLeft: Qi,
693
- Pipette: $i,
694
- Trash2: Ki
695
- }, xe = (o) => {
656
+ process.env.NODE_ENV === "production" ? ze.exports = Do() : ze.exports = Ho();
657
+ var e = ze.exports;
658
+ const M = {
659
+ Camera: jr,
660
+ Check: Mr,
661
+ Square: Cr,
662
+ Circle: kr,
663
+ Slash: Ar,
664
+ MoveDownLeft: Nr,
665
+ Pencil: Tr,
666
+ Smile: Sr,
667
+ Undo: Rr,
668
+ Redo: Dr,
669
+ ChevronRight: Hr,
670
+ ChevronDown: zr,
671
+ ChevronUp: _r,
672
+ RotateCcw: Er,
673
+ ZoomIn: Or,
674
+ ZoomOut: Br,
675
+ Hand: Yr,
676
+ Crop: Ir,
677
+ FlipHorizontal2: Pr,
678
+ FlipVertical2: Wr,
679
+ Sunset: Zr,
680
+ Box: Gr,
681
+ LayoutGrid: Fr,
682
+ ImagePlus: Lr,
683
+ Type: Ur,
684
+ CodeXml: Vr,
685
+ ClipboardPaste: Jr,
686
+ ImagePlay: qr,
687
+ Maximize: Xr,
688
+ ListCollapse: Qr,
689
+ ArrowUpRight: $r,
690
+ ArrowDownRight: Kr,
691
+ ImageDown: eo,
692
+ Copy: to,
693
+ Settings2: ro,
694
+ ChevronLeft: oo,
695
+ Pipette: io,
696
+ Trash2: so,
697
+ Sun: no,
698
+ Moon: ao
699
+ }, be = (o) => {
696
700
  const t = () => {
697
701
  if (!window.EyeDropper) return;
698
702
  new EyeDropper().open().then((s) => {
699
703
  const a = s.sRGBHex;
700
- o != null && o.onChange && o.onChange(new eo(a));
704
+ o != null && o.onChange && o.onChange(new lo(a));
701
705
  }).catch((s) => {
702
706
  console.log(s);
703
707
  });
704
708
  };
705
709
  return /* @__PURE__ */ e.jsx(
706
- ai,
710
+ ur,
707
711
  {
708
712
  ...o,
709
713
  panelRender: (n) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
710
- window.EyeDropper && /* @__PURE__ */ e.jsx("div", { className: "mb-1", children: /* @__PURE__ */ e.jsx(T, { type: "text", shape: "circle", size: "small", icon: /* @__PURE__ */ e.jsx(A.Pipette, { size: 16 }), onClick: t }) }),
714
+ window.EyeDropper && /* @__PURE__ */ e.jsx("div", { className: "mb-1", children: /* @__PURE__ */ e.jsx(k, { type: "text", shape: "circle", size: "small", icon: /* @__PURE__ */ e.jsx(M.Pipette, { size: 16 }), onClick: t }) }),
711
715
  n
712
716
  ] })
713
717
  }
714
718
  );
715
- }, Co = [
719
+ }, zo = [
716
720
  {
717
721
  label: /* @__PURE__ */ e.jsx("div", { className: "w-4 h-3 mt-1.5 items-center cursor-pointer", children: /* @__PURE__ */ e.jsx("i", { className: "block w-full origin-center rounded-lg bg-slate-600 -rotate-45 h-[1px]" }) }),
718
722
  key: 1
@@ -733,18 +737,18 @@ const A = {
733
737
  label: /* @__PURE__ */ e.jsx("div", { className: "w-4 h-3 mt-1.5 items-center cursor-pointer", children: /* @__PURE__ */ e.jsx("i", { className: "block w-full origin-center rounded-lg bg-slate-600 -rotate-45 h-[8px]" }) }),
734
738
  key: 8
735
739
  }
736
- ], Ao = ({ defaultValue: o, onChange: t }) => {
740
+ ], _o = ({ defaultValue: o, onChange: t }) => {
737
741
  const n = ({ key: s }) => {
738
742
  t(s);
739
743
  };
740
744
  return /* @__PURE__ */ e.jsx(
741
- vt,
745
+ At,
742
746
  {
743
- menu: { items: Co, onClick: n, selectedKeys: [o] },
747
+ menu: { items: zo, onClick: n, selectedKeys: [o] },
744
748
  trigger: ["click"],
745
749
  placement: "bottom",
746
750
  children: /* @__PURE__ */ e.jsx(
747
- T,
751
+ k,
748
752
  {
749
753
  type: "text",
750
754
  shape: "circle",
@@ -763,35 +767,35 @@ const A = {
763
767
  }
764
768
  );
765
769
  };
766
- let To = (o, t = 21) => (n = t) => {
770
+ let Eo = (o, t = 21) => (n = t) => {
767
771
  let s = "", a = n;
768
772
  for (; a--; )
769
773
  s += o[Math.random() * o.length | 0];
770
774
  return s;
771
775
  };
772
- const No = () => {
776
+ const Oo = () => {
773
777
  const o = typeof navigator == "object" ? navigator.platform : "";
774
778
  return /Mac|iPod|iPhone|iPad/.test(o);
775
- }, ft = No() ? "⌘" : "Ctrl", At = [
779
+ }, gt = Oo() ? "⌘" : "Ctrl", Dt = [
776
780
  "image/jpeg",
777
781
  "image/png",
778
782
  "image/bmp",
779
783
  "image/gif",
780
784
  "image/webp"
781
785
  ];
782
- function G(...o) {
783
- return io(to(o));
786
+ function Z(...o) {
787
+ return fo(co(o));
784
788
  }
785
- const he = To(
789
+ const ge = Eo(
786
790
  "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
787
791
  7
788
- ), So = (o, t) => {
792
+ ), Bo = (o, t) => {
789
793
  let n = document.createElement("a");
790
794
  n.href = o, n.download = t, n.style = "position: absolute; z-index: -111; visibility: none;", document.body.appendChild(n), n.click(), document.body.removeChild(n), n = null;
791
- }, ko = (o, t, n = 950, s = 450) => {
795
+ }, Yo = (o, t, n = 950, s = 450) => {
792
796
  let a = o, l = t;
793
- return a > n && (l *= n / a, a = n), l > s && (a *= s / l, l = s), { width: a, height: l };
794
- }, Ro = (o) => {
797
+ return a > n && (l *= n / a, a = n), l > s && (a *= s / l, l = s), { width: Math.round(a), height: Math.round(l) };
798
+ }, Io = (o) => {
795
799
  const t = new Image();
796
800
  return o.startsWith("data") || (t.crossOrigin = "Anonymous"), new Promise(function(n, s) {
797
801
  t.onload = function() {
@@ -804,7 +808,10 @@ const he = To(
804
808
  };
805
809
  t.onerror = a, t.onabort = a, t.src = o;
806
810
  });
807
- }, Do = (o, t, n) => o === "top-left" ? {
811
+ }, we = (o, t, n = 0.15) => {
812
+ const s = Math.min(o, t);
813
+ return Math.round(s * n);
814
+ }, Po = (o, t, n) => o === "top-left" ? {
808
815
  x: 0,
809
816
  y: 0
810
817
  } : o === "top" ? {
@@ -828,45 +835,55 @@ const he = To(
828
835
  } : o === "bottom-right" ? {
829
836
  x: t,
830
837
  y: n
831
- } : { x: t / 2, y: n / 2 }, Ho = (o, t, n) => {
838
+ } : { x: t / 2, y: n / 2 }, Wo = (o, t, n) => {
832
839
  const s = n * (Math.PI / 180), a = Math.abs(o * Math.cos(s)) + Math.abs(t * Math.sin(s)), l = Math.abs(o * Math.sin(s)) + Math.abs(t * Math.cos(s));
833
840
  return {
834
841
  width: Math.round(a),
835
842
  height: Math.round(l)
836
843
  };
837
- }, zo = ({ text: o, color: t, angleDegrees: n }) => {
844
+ }, _e = (o) => "data:image/svg+xml," + encodeURIComponent(o).replace(/'/g, "%27").replace(/"/g, "%22"), Zo = ({ text: o, color: t, angleDegrees: n }) => {
838
845
  const s = document.createElement("div");
839
846
  s.style = `text-align:center;white-space:nowrap;line-height:100px;transform: rotate(${n}deg);position: absolute;top:0;left:0;opacity: 0;`;
840
847
  const a = document.createElement("span");
841
848
  a.style.color = t, a.style.fontSize = "36px", a.innerText = o, s.append(a), document.body.append(s);
842
- const { width: l, height: d } = s.getBoundingClientRect();
849
+ const { width: l, height: h } = s.getBoundingClientRect();
843
850
  document.body.removeChild(s);
844
- const f = Ho(l, d, n), u = `
851
+ const f = Wo(l, h, n), d = `
845
852
  <div xmlns="http://www.w3.org/1999/xhtml" style="text-align:center;white-space:nowrap;line-height:${f.height}px;transform:rotate(${n}deg);">
846
853
  <span style="color:${t};font-size:36px;">${o}</span>
847
854
  </div>
848
- `, h = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${f.width} ${f.height}" width="${f.width}" height="${f.height}">
855
+ `, p = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${f.width} ${f.height}" width="${f.width}" height="${f.height}">
849
856
  <foreignObject width="100%" height="100%">
850
- ${u}
857
+ ${d}
851
858
  </foreignObject>
852
- </svg>`, g = new Blob([h], { type: "image/svg+xml;charset=utf-8" });
853
- return (window.URL || window.webkitURL || window).createObjectURL(g);
859
+ </svg>`;
860
+ return _e(p);
861
+ }, Go = (o) => {
862
+ const t = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32">
863
+ <foreignObject width="100%" height="100%">
864
+ <div xmlns="http://www.w3.org/1999/xhtml" style="text-align:center;white-space:nowrap;line-height:32px;">
865
+ <span style="color:#ffffff;font-size:18px;">${o}</span>
866
+ </div>
867
+ </foreignObject>
868
+ </svg>`;
869
+ return _e(t);
854
870
  };
855
- let pt, Eo = class {
871
+ let xt, Fo = class {
856
872
  constructor() {
857
- k(this, "img", {});
858
- k(this, "invalid", !1);
859
- k(this, "app", null);
860
- k(this, "scale", 100);
861
- k(this, "useTool", null);
862
- k(this, "annotateColor", "#ff0000");
863
- k(this, "strokeWidth", 4);
864
- k(this, "shapes", /* @__PURE__ */ new Map());
865
- k(this, "message", null);
866
- jt(this);
873
+ R(this, "img", {});
874
+ R(this, "invalid", !1);
875
+ R(this, "app", null);
876
+ R(this, "scale", 100);
877
+ R(this, "useTool", null);
878
+ R(this, "annotateColor", "#ff0000");
879
+ R(this, "strokeWidth", 4);
880
+ R(this, "shapes", /* @__PURE__ */ new Map());
881
+ R(this, "message", null);
882
+ R(this, "theme", "light");
883
+ Tt(this);
867
884
  }
868
885
  get shapesList() {
869
- return Array.from(Mt(this.shapes).values());
886
+ return Array.from(St(this.shapes).values());
870
887
  }
871
888
  get cursor() {
872
889
  return this.useTool === "Pencil" ? "pencil" : this.useTool ? "crosshair" : "auto";
@@ -876,8 +893,20 @@ let pt, Eo = class {
876
893
  const t = !!((n = this.app) != null && n.tree);
877
894
  return t || (this.message.info("Please add a image"), this.setInvalid()), t;
878
895
  }
896
+ get nextStep() {
897
+ const t = this.shapesList.filter((s) => s.type === "Step"), n = uo(t, (s) => Number(s.text));
898
+ return n != null && n.text ? Number(n.text) + 1 : 1;
899
+ }
900
+ get isDark() {
901
+ return this.theme === "dark";
902
+ }
903
+ setTheme(t) {
904
+ t !== this.theme && ho(() => {
905
+ t ? this.theme = t : this.theme = this.isDark ? "light" : "dark";
906
+ });
907
+ }
879
908
  setInvalid() {
880
- clearTimeout(pt), this.invalid = !0, pt = setTimeout(oo(() => {
909
+ clearTimeout(xt), this.invalid = !0, xt = setTimeout(po(() => {
881
910
  this.invalid = !1;
882
911
  }), 200);
883
912
  }
@@ -919,10 +948,10 @@ let pt, Eo = class {
919
948
  }
920
949
  destroy() {
921
950
  var t;
922
- (t = this.app) == null || t.destroy(), this.app = null;
951
+ (t = this.app) == null || t.destroy(!0), this.app = null, this.shapes.clear(), this.setUseTool(null);
923
952
  }
924
953
  };
925
- const Oo = new Eo(), Q = {
954
+ const Lo = new Fo(), Q = {
926
955
  default_1: {
927
956
  class: "bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500",
928
957
  fill: {
@@ -1309,25 +1338,25 @@ const Oo = new Eo(), Q = {
1309
1338
  }
1310
1339
  }
1311
1340
  };
1312
- class _o {
1341
+ class Uo {
1313
1342
  constructor() {
1314
- k(this, "scale", 1);
1315
- k(this, "scaleX", !1);
1316
- k(this, "scaleY", !1);
1317
- k(this, "padding", 0);
1318
- k(this, "paddingBg", "rgba(255,255,255, 100)");
1319
- k(this, "round", 10);
1320
- k(this, "shadow", 3);
1321
- k(this, "frame", "none");
1322
- k(this, "background", "default_1");
1323
- k(this, "align", "center");
1324
- k(this, "waterImg", null);
1325
- k(this, "waterIndex", 1);
1326
- k(this, "size", {
1343
+ R(this, "scale", 1);
1344
+ R(this, "scaleX", !1);
1345
+ R(this, "scaleY", !1);
1346
+ R(this, "padding", 0);
1347
+ R(this, "paddingBg", "rgba(255,255,255, 100)");
1348
+ R(this, "round", 10);
1349
+ R(this, "shadow", 3);
1350
+ R(this, "frame", "none");
1351
+ R(this, "background", "default_1");
1352
+ R(this, "align", "center");
1353
+ R(this, "waterImg", null);
1354
+ R(this, "waterIndex", 1);
1355
+ R(this, "size", {
1327
1356
  type: "auto",
1328
1357
  title: "Auto"
1329
1358
  });
1330
- k(this, "frameConf", {
1359
+ R(this, "frameConf", {
1331
1360
  width: 800,
1332
1361
  height: 600,
1333
1362
  background: {
@@ -1337,10 +1366,10 @@ class _o {
1337
1366
  stops: ["#6366f1", "#a855f7", "#ec4899"]
1338
1367
  }
1339
1368
  });
1340
- jt(this);
1369
+ Tt(this);
1341
1370
  }
1342
1371
  get waterSvg() {
1343
- return Mt(this.waterImg);
1372
+ return St(this.waterImg);
1344
1373
  }
1345
1374
  setScale(t) {
1346
1375
  this.scale = t;
@@ -1357,6 +1386,9 @@ class _o {
1357
1386
  setShadow(t) {
1358
1387
  this.shadow = t;
1359
1388
  }
1389
+ setFrame(t) {
1390
+ this.frame = t;
1391
+ }
1360
1392
  setFrameSize(t, n) {
1361
1393
  !t || !n || (this.frameConf.width = t, this.frameConf.height = n);
1362
1394
  }
@@ -1379,37 +1411,37 @@ class _o {
1379
1411
  this.waterIndex = t;
1380
1412
  }
1381
1413
  }
1382
- const Yo = new _o(), r = {
1383
- editor: Oo,
1384
- option: Yo
1385
- }, Io = ({ disabled: o = !1, toSelect: t, locale: n = "en" }) => {
1386
- const [s, a] = O(!1), l = () => {
1387
- a(!1);
1388
- }, d = (u) => {
1389
- a(u);
1390
- }, f = (u) => {
1391
- t(u.native), l();
1414
+ const Vo = new Uo(), i = {
1415
+ editor: Lo,
1416
+ option: Vo
1417
+ }, Jo = ({ disabled: o = !1, toSelect: t, locale: n = "en", theme: s = "auto" }) => {
1418
+ const [a, l] = O(!1), h = () => {
1419
+ l(!1);
1420
+ }, f = (p) => {
1421
+ l(p);
1422
+ }, d = (p) => {
1423
+ t(p.native), h();
1392
1424
  };
1393
1425
  return /* @__PURE__ */ e.jsx(
1394
- ge,
1426
+ xe,
1395
1427
  {
1396
- content: /* @__PURE__ */ e.jsx(so, { data: ro, locale: n, onEmojiSelect: f, previewPosition: "none" }),
1428
+ content: /* @__PURE__ */ e.jsx(go, { data: mo, locale: n, onEmojiSelect: d, previewPosition: "none", theme: s }),
1397
1429
  title: "",
1398
1430
  trigger: "click",
1399
- open: s,
1400
- onOpenChange: d,
1431
+ open: a,
1432
+ onOpenChange: f,
1401
1433
  children: /* @__PURE__ */ e.jsx(
1402
- T,
1434
+ k,
1403
1435
  {
1404
1436
  type: "text",
1405
1437
  shape: "circle",
1406
1438
  disabled: o,
1407
- icon: /* @__PURE__ */ e.jsx(A.Smile, { size: 16 })
1439
+ icon: /* @__PURE__ */ e.jsx(M.Smile, { size: 16 })
1408
1440
  }
1409
1441
  )
1410
1442
  }
1411
1443
  );
1412
- }, Bo = () => /* @__PURE__ */ e.jsx("h1", { children: /* @__PURE__ */ e.jsxs("a", { href: "https://shoteasy.fun", target: "_blank", "aria-label": "ShotEasy", className: "flex gap-1 text-gray-700 items-center text-xs font-semibold", children: [
1444
+ }, qo = () => /* @__PURE__ */ e.jsx("h1", { children: /* @__PURE__ */ e.jsxs("a", { href: "https://shoteasy.fun", target: "_blank", "aria-label": "ShotEasy", className: "flex gap-1 text-gray-700 dark:text-gray-300 items-center text-xs font-semibold", children: [
1413
1445
  /* @__PURE__ */ e.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 510 510", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1414
1446
  /* @__PURE__ */ e.jsxs("g", { filter: "url(#filter0_i_40_60)", children: [
1415
1447
  /* @__PURE__ */ e.jsx("path", { d: "M60.1774 83.172C64.1232 61.4358 84.9426 47.0139 106.679 50.9598L271.777 80.9308C293.513 84.8767 307.935 105.696 303.989 127.432L247.462 438.817C243.516 460.553 222.696 474.975 200.96 471.029L35.8623 441.058C14.1261 437.112 -0.295702 416.293 3.65017 394.557L60.1774 83.172Z", fill: "#812BED" }),
@@ -1429,59 +1461,64 @@ const Yo = new _o(), r = {
1429
1461
  ] }) })
1430
1462
  ] }),
1431
1463
  /* @__PURE__ */ e.jsx("span", { children: "ShotEasy" })
1432
- ] }) }), Po = () => /* @__PURE__ */ e.jsxs("div", { className: "flex-1 flex justify-end items-end gap-2", children: [
1433
- /* @__PURE__ */ e.jsx("a", { href: "https://github.com/CH563/image-beautifier", target: "_blank", "aria-label": "GitHub", className: "block rounded-full p-1.5 hover:bg-slate-100", children: /* @__PURE__ */ e.jsx("svg", { viewBox: "64 64 896 896", focusable: "false", "data-icon": "github", width: "16", height: "16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx("path", { d: "M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0138.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z" }) }) }),
1434
- /* @__PURE__ */ e.jsx("a", { href: "https://twitter.com/LiWen563", target: "_blank", "aria-label": "twitter:@LiWen563", className: "block rounded-full p-1.5 hover:bg-slate-100", children: /* @__PURE__ */ e.jsx("svg", { fill: "currentColor", viewBox: "0 0 24 24", width: "16", height: "16", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx("g", { children: /* @__PURE__ */ e.jsx("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" }) }) }) })
1435
- ] }), Wo = ["Square", "SquareFill", "Circle", "Slash", "MoveDownLeft", "Pencil", "Smile"], Zo = Y(() => {
1436
- const [o, t] = O(!1), n = (l) => {
1437
- if (!r.editor.isEditing) return;
1438
- const { useTool: d } = r.editor;
1439
- r.editor.setUseTool(d === l ? null : l), t(!1);
1440
- }, s = (l) => {
1441
- if (!r.editor.isEditing) return;
1442
- const d = r.option.frameConf.width / 2 - 24, f = r.option.frameConf.height / 2 - 24;
1443
- r.editor.setUseTool(null), t(!1), r.editor.addShape({
1444
- id: he(),
1464
+ ] }) }), Xo = ({ children: o }) => /* @__PURE__ */ e.jsxs("div", { className: "flex-1 flex justify-end items-end gap-2 dark:text-gray-300", children: [
1465
+ o,
1466
+ /* @__PURE__ */ e.jsx("a", { href: "https://github.com/CH563/image-beautifier", target: "_blank", "aria-label": "GitHub", className: "block rounded-full p-2 hover:bg-slate-100 dark:hover:bg-slate-700", children: /* @__PURE__ */ e.jsx("svg", { viewBox: "64 64 896 896", focusable: "false", "data-icon": "github", width: "16", height: "16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx("path", { d: "M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0138.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z" }) }) }),
1467
+ /* @__PURE__ */ e.jsx("a", { href: "https://twitter.com/LiWen563", target: "_blank", "aria-label": "twitter:@LiWen563", className: "block rounded-full p-2 dark:hover:bg-slate-700", children: /* @__PURE__ */ e.jsx("svg", { fill: "currentColor", viewBox: "0 0 24 24", width: "16", height: "16", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx("g", { children: /* @__PURE__ */ e.jsx("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" }) }) }) })
1468
+ ] }), Qo = ["Square", "SquareFill", "Circle", "Slash", "MoveDownLeft", "Pencil", "Step", "Smile"], $o = B(({ headLeft: o, headRight: t }) => {
1469
+ const [n, s] = O(!1), a = (d) => {
1470
+ if (!i.editor.isEditing) return;
1471
+ const { useTool: p } = i.editor;
1472
+ i.editor.setUseTool(p === d ? null : d), s(!1);
1473
+ }, l = (d) => {
1474
+ if (!i.editor.isEditing) return;
1475
+ const p = i.option.frameConf.width / 2 - 24, m = i.option.frameConf.height / 2 - 24;
1476
+ i.editor.setUseTool(null), s(!1), i.editor.addShape({
1477
+ id: ge(),
1445
1478
  type: "emoji",
1446
- text: l,
1447
- zIndex: r.editor.shapes.size + 1,
1448
- x: d,
1449
- y: f,
1479
+ text: d,
1480
+ zIndex: i.editor.shapes.size + 1,
1481
+ x: p,
1482
+ y: m,
1450
1483
  editable: !0
1451
1484
  });
1452
- }, a = () => {
1453
- if (!r.editor.isEditing) return;
1454
- const l = !o;
1455
- r.editor.setUseTool(null), t(l), r.editor.app.config.move.drag = l;
1485
+ }, h = () => {
1486
+ if (!i.editor.isEditing) return;
1487
+ const d = !n;
1488
+ i.editor.setUseTool(null), s(d), i.editor.app.config.move.drag = d;
1489
+ }, f = () => {
1490
+ i.editor.setTheme(), localStorage.setItem("SHOTEASY_BEAUTIFIER_THEME", i.editor.theme);
1456
1491
  };
1457
- return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center shrink-0 gap-3 bg-white py-2 px-5 border-b border-b-gray-50 shadow-sm relative z-[11] select-none", children: [
1458
- /* @__PURE__ */ e.jsx("div", { className: "flex-1", children: /* @__PURE__ */ e.jsx(Bo, {}) }),
1459
- /* @__PURE__ */ e.jsx("div", { className: "flex gap-1 justify-center items-center", children: Wo.map((l) => {
1460
- if (l === "Smile") return /* @__PURE__ */ e.jsx(Io, { disabled: !1, toSelect: s }, l);
1461
- let d;
1462
- if (l.includes("Fill")) {
1463
- const f = l.replace("Fill", ""), u = at[f];
1464
- d = /* @__PURE__ */ e.jsx(u, { size: 16, fill: "currentColor" });
1465
- } else {
1466
- const f = at[l];
1467
- d = /* @__PURE__ */ e.jsx(f, { name: l, size: 16 });
1492
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center shrink-0 gap-3 bg-white dark:bg-black py-2 px-5 border-b border-b-gray-50 dark:border-b-gray-700 shadow-sm relative z-[11] select-none", children: [
1493
+ /* @__PURE__ */ e.jsx("div", { className: "flex-1", children: o || /* @__PURE__ */ e.jsx(qo, {}) }),
1494
+ /* @__PURE__ */ e.jsx("div", { className: "flex gap-1 justify-center items-center", children: Qo.map((d) => {
1495
+ if (d === "Smile") return /* @__PURE__ */ e.jsx(Jo, { disabled: !1, theme: i.editor.isDark ? "dark" : "light", toSelect: l }, d);
1496
+ let p;
1497
+ if (d.includes("Fill")) {
1498
+ const m = d.replace("Fill", ""), b = dt[m];
1499
+ p = /* @__PURE__ */ e.jsx(b, { size: 16, fill: "currentColor" });
1500
+ } else if (d === "Step")
1501
+ p = /* @__PURE__ */ e.jsx("div", { className: "border text-xs border-black dark:border-white w-4 h-4 rounded-full text-center leading-4", children: i.editor.nextStep }, d);
1502
+ else {
1503
+ const m = dt[d];
1504
+ p = /* @__PURE__ */ e.jsx(m, { name: d, size: 16 });
1468
1505
  }
1469
1506
  return /* @__PURE__ */ e.jsx(
1470
- T,
1507
+ k,
1471
1508
  {
1472
1509
  type: "text",
1473
1510
  shape: "circle",
1474
- icon: d,
1475
- className: r.editor.useTool === l && "text-[#1677ff] bg-sky-100/50 hover:bg-sky-100 hover:text-[#1677ff]",
1476
- onClick: () => n(l)
1511
+ icon: p,
1512
+ className: i.editor.useTool === d && "text-[#1a79ff] [&_.border]:border-[#1a79ff] bg-sky-100/50 hover:bg-sky-100 hover:text-[#1a79ff] [&_.border]:hover:text-[#1a79ff]",
1513
+ onClick: () => a(d)
1477
1514
  },
1478
- l
1515
+ d
1479
1516
  );
1480
1517
  }) }),
1481
- /* @__PURE__ */ e.jsx(li, { type: "vertical" }),
1518
+ /* @__PURE__ */ e.jsx(mr, { type: "vertical" }),
1482
1519
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1 justify-center items-center", children: [
1483
1520
  /* @__PURE__ */ e.jsx(
1484
- xe,
1521
+ be,
1485
1522
  {
1486
1523
  size: "small",
1487
1524
  presets: [
@@ -1500,140 +1537,148 @@ const Yo = new _o(), r = {
1500
1537
  ]
1501
1538
  }
1502
1539
  ],
1503
- value: r.editor.annotateColor,
1504
- onChange: (l) => r.editor.setAnnotateColor(l.toHexString())
1540
+ value: i.editor.annotateColor,
1541
+ onChange: (d) => i.editor.setAnnotateColor(d.toHexString())
1505
1542
  }
1506
1543
  ),
1507
- /* @__PURE__ */ e.jsx(Ao, { defaultValue: r.editor.strokeWidth, onChange: (l) => r.editor.setStrokeWidth(l) }),
1544
+ /* @__PURE__ */ e.jsx(_o, { defaultValue: i.editor.strokeWidth, onChange: (d) => i.editor.setStrokeWidth(d) }),
1508
1545
  /* @__PURE__ */ e.jsx(
1509
- T,
1546
+ k,
1510
1547
  {
1511
1548
  type: "text",
1512
1549
  shape: "circle",
1513
- className: o && "text-[#1677ff] bg-sky-100/50 hover:bg-sky-100 hover:text-[#1677ff]",
1514
- icon: /* @__PURE__ */ e.jsx(A.Hand, { size: 16 }),
1515
- onClick: a
1550
+ className: n && "text-[#1677ff] bg-sky-100/50 hover:bg-sky-100 hover:text-[#1677ff]",
1551
+ icon: /* @__PURE__ */ e.jsx(M.Hand, { size: 16 }),
1552
+ onClick: h
1516
1553
  }
1517
1554
  )
1518
1555
  ] }),
1519
- /* @__PURE__ */ e.jsx(Po, {})
1556
+ t || /* @__PURE__ */ e.jsx(Xo, { children: /* @__PURE__ */ e.jsx(
1557
+ k,
1558
+ {
1559
+ type: "text",
1560
+ shape: "circle",
1561
+ icon: i.editor.isDark ? /* @__PURE__ */ e.jsx(M.Sun, { size: 16 }) : /* @__PURE__ */ e.jsx(M.Moon, { size: 16 }),
1562
+ onClick: f
1563
+ }
1564
+ ) })
1520
1565
  ] });
1521
1566
  });
1522
- function Go(o) {
1567
+ function Ko(o) {
1523
1568
  var t = typeof o;
1524
1569
  return o != null && (t == "object" || t == "function");
1525
1570
  }
1526
- var Tt = Go, Fo = typeof fe == "object" && fe && fe.Object === Object && fe, Lo = Fo, Uo = Lo, Vo = typeof self == "object" && self && self.Object === Object && self, Jo = Uo || Vo || Function("return this")(), Nt = Jo, qo = Nt, Xo = function() {
1527
- return qo.Date.now();
1528
- }, Qo = Xo, $o = /\s/;
1529
- function Ko(o) {
1530
- for (var t = o.length; t-- && $o.test(o.charAt(t)); )
1571
+ var Ht = Ko, ei = typeof ue == "object" && ue && ue.Object === Object && ue, ti = ei, ri = ti, oi = typeof self == "object" && self && self.Object === Object && self, ii = ri || oi || Function("return this")(), zt = ii, si = zt, ni = function() {
1572
+ return si.Date.now();
1573
+ }, ai = ni, li = /\s/;
1574
+ function ci(o) {
1575
+ for (var t = o.length; t-- && li.test(o.charAt(t)); )
1531
1576
  ;
1532
1577
  return t;
1533
1578
  }
1534
- var er = Ko, tr = er, ir = /^\s+/;
1535
- function or(o) {
1536
- return o && o.slice(0, tr(o) + 1).replace(ir, "");
1579
+ var di = ci, fi = di, hi = /^\s+/;
1580
+ function pi(o) {
1581
+ return o && o.slice(0, fi(o) + 1).replace(hi, "");
1537
1582
  }
1538
- var rr = or, sr = Nt, nr = sr.Symbol, St = nr, ut = St, kt = Object.prototype, ar = kt.hasOwnProperty, lr = kt.toString, se = ut ? ut.toStringTag : void 0;
1539
- function cr(o) {
1540
- var t = ar.call(o, se), n = o[se];
1583
+ var ui = pi, mi = zt, gi = mi.Symbol, _t = gi, bt = _t, Et = Object.prototype, xi = Et.hasOwnProperty, bi = Et.toString, se = bt ? bt.toStringTag : void 0;
1584
+ function wi(o) {
1585
+ var t = xi.call(o, se), n = o[se];
1541
1586
  try {
1542
1587
  o[se] = void 0;
1543
1588
  var s = !0;
1544
1589
  } catch {
1545
1590
  }
1546
- var a = lr.call(o);
1591
+ var a = bi.call(o);
1547
1592
  return s && (t ? o[se] = n : delete o[se]), a;
1548
1593
  }
1549
- var dr = cr, fr = Object.prototype, pr = fr.toString;
1550
- function ur(o) {
1551
- return pr.call(o);
1594
+ var yi = wi, vi = Object.prototype, ji = vi.toString;
1595
+ function Mi(o) {
1596
+ return ji.call(o);
1552
1597
  }
1553
- var hr = ur, ht = St, mr = dr, gr = hr, xr = "[object Null]", br = "[object Undefined]", mt = ht ? ht.toStringTag : void 0;
1554
- function wr(o) {
1555
- return o == null ? o === void 0 ? br : xr : mt && mt in Object(o) ? mr(o) : gr(o);
1598
+ var Ci = Mi, wt = _t, ki = yi, Ai = Ci, Ni = "[object Null]", Ti = "[object Undefined]", yt = wt ? wt.toStringTag : void 0;
1599
+ function Si(o) {
1600
+ return o == null ? o === void 0 ? Ti : Ni : yt && yt in Object(o) ? ki(o) : Ai(o);
1556
1601
  }
1557
- var yr = wr;
1558
- function vr(o) {
1602
+ var Ri = Si;
1603
+ function Di(o) {
1559
1604
  return o != null && typeof o == "object";
1560
1605
  }
1561
- var jr = vr, Mr = yr, Cr = jr, Ar = "[object Symbol]";
1562
- function Tr(o) {
1563
- return typeof o == "symbol" || Cr(o) && Mr(o) == Ar;
1606
+ var Hi = Di, zi = Ri, _i = Hi, Ei = "[object Symbol]";
1607
+ function Oi(o) {
1608
+ return typeof o == "symbol" || _i(o) && zi(o) == Ei;
1564
1609
  }
1565
- var Nr = Tr, Sr = rr, gt = Tt, kr = Nr, xt = NaN, Rr = /^[-+]0x[0-9a-f]+$/i, Dr = /^0b[01]+$/i, Hr = /^0o[0-7]+$/i, zr = parseInt;
1566
- function Er(o) {
1610
+ var Bi = Oi, Yi = ui, vt = Ht, Ii = Bi, jt = NaN, Pi = /^[-+]0x[0-9a-f]+$/i, Wi = /^0b[01]+$/i, Zi = /^0o[0-7]+$/i, Gi = parseInt;
1611
+ function Fi(o) {
1567
1612
  if (typeof o == "number")
1568
1613
  return o;
1569
- if (kr(o))
1570
- return xt;
1571
- if (gt(o)) {
1614
+ if (Ii(o))
1615
+ return jt;
1616
+ if (vt(o)) {
1572
1617
  var t = typeof o.valueOf == "function" ? o.valueOf() : o;
1573
- o = gt(t) ? t + "" : t;
1618
+ o = vt(t) ? t + "" : t;
1574
1619
  }
1575
1620
  if (typeof o != "string")
1576
1621
  return o === 0 ? o : +o;
1577
- o = Sr(o);
1578
- var n = Dr.test(o);
1579
- return n || Hr.test(o) ? zr(o.slice(2), n ? 2 : 8) : Rr.test(o) ? xt : +o;
1622
+ o = Yi(o);
1623
+ var n = Wi.test(o);
1624
+ return n || Zi.test(o) ? Gi(o.slice(2), n ? 2 : 8) : Pi.test(o) ? jt : +o;
1580
1625
  }
1581
- var Or = Er, _r = Tt, Re = Qo, bt = Or, Yr = "Expected a function", Ir = Math.max, Br = Math.min;
1582
- function Pr(o, t, n) {
1583
- var s, a, l, d, f, u, h = 0, g = !1, y = !1, S = !0;
1626
+ var Li = Fi, Ui = Ht, He = ai, Mt = Li, Vi = "Expected a function", Ji = Math.max, qi = Math.min;
1627
+ function Xi(o, t, n) {
1628
+ var s, a, l, h, f, d, p = 0, m = !1, b = !1, C = !0;
1584
1629
  if (typeof o != "function")
1585
- throw new TypeError(Yr);
1586
- t = bt(t) || 0, _r(n) && (g = !!n.leading, y = "maxWait" in n, l = y ? Ir(bt(n.maxWait) || 0, t) : l, S = "trailing" in n ? !!n.trailing : S);
1587
- function N(R) {
1588
- var W = s, U = a;
1589
- return s = a = void 0, h = R, d = o.apply(U, W), d;
1630
+ throw new TypeError(Vi);
1631
+ t = Mt(t) || 0, Ui(n) && (m = !!n.leading, b = "maxWait" in n, l = b ? Ji(Mt(n.maxWait) || 0, t) : l, C = "trailing" in n ? !!n.trailing : C);
1632
+ function A(D) {
1633
+ var G = s, U = a;
1634
+ return s = a = void 0, p = D, h = o.apply(U, G), h;
1590
1635
  }
1591
- function x(R) {
1592
- return h = R, f = setTimeout(_, t), g ? N(R) : d;
1636
+ function x(D) {
1637
+ return p = D, f = setTimeout(_, t), m ? A(D) : h;
1593
1638
  }
1594
- function v(R) {
1595
- var W = R - u, U = R - h, K = t - W;
1596
- return y ? Br(K, l - U) : K;
1639
+ function w(D) {
1640
+ var G = D - d, U = D - p, K = t - G;
1641
+ return b ? qi(K, l - U) : K;
1597
1642
  }
1598
- function H(R) {
1599
- var W = R - u, U = R - h;
1600
- return u === void 0 || W >= t || W < 0 || y && U >= l;
1643
+ function S(D) {
1644
+ var G = D - d, U = D - p;
1645
+ return d === void 0 || G >= t || G < 0 || b && U >= l;
1601
1646
  }
1602
1647
  function _() {
1603
- var R = Re();
1604
- if (H(R))
1605
- return E(R);
1606
- f = setTimeout(_, v(R));
1648
+ var D = He();
1649
+ if (S(D))
1650
+ return E(D);
1651
+ f = setTimeout(_, w(D));
1607
1652
  }
1608
- function E(R) {
1609
- return f = void 0, S && s ? N(R) : (s = a = void 0, d);
1653
+ function E(D) {
1654
+ return f = void 0, C && s ? A(D) : (s = a = void 0, h);
1610
1655
  }
1611
- function be() {
1612
- f !== void 0 && clearTimeout(f), h = 0, s = u = a = f = void 0;
1656
+ function ye() {
1657
+ f !== void 0 && clearTimeout(f), p = 0, s = d = a = f = void 0;
1613
1658
  }
1614
- function we() {
1615
- return f === void 0 ? d : E(Re());
1659
+ function ve() {
1660
+ return f === void 0 ? h : E(He());
1616
1661
  }
1617
1662
  function $() {
1618
- var R = Re(), W = H(R);
1619
- if (s = arguments, a = this, u = R, W) {
1663
+ var D = He(), G = S(D);
1664
+ if (s = arguments, a = this, d = D, G) {
1620
1665
  if (f === void 0)
1621
- return x(u);
1622
- if (y)
1623
- return clearTimeout(f), f = setTimeout(_, t), N(u);
1666
+ return x(d);
1667
+ if (b)
1668
+ return clearTimeout(f), f = setTimeout(_, t), A(d);
1624
1669
  }
1625
- return f === void 0 && (f = setTimeout(_, t)), d;
1670
+ return f === void 0 && (f = setTimeout(_, t)), h;
1626
1671
  }
1627
- return $.cancel = be, $.flush = we, $;
1672
+ return $.cancel = ye, $.flush = ve, $;
1628
1673
  }
1629
- var Wr = Pr;
1630
- const Zr = /* @__PURE__ */ vo(Wr), Gr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDI0LTA0LTE1VDEyOjUwOjI3KzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyNC0wNC0xNVQxMjo1MzowOSswODowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyNC0wNC0xNVQxMjo1MzowOSswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxNTY3NDQxZC1lYmQxLWIwNGUtOWUwOS0yMWQ1Mjk3NzAxNzMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MTU2NzQ0MWQtZWJkMS1iMDRlLTllMDktMjFkNTI5NzcwMTczIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6MTU2NzQ0MWQtZWJkMS1iMDRlLTllMDktMjFkNTI5NzcwMTczIj4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDoxNTY3NDQxZC1lYmQxLWIwNGUtOWUwOS0yMWQ1Mjk3NzAxNzMiIHN0RXZ0OndoZW49IjIwMjQtMDQtMTVUMTI6NTA6MjcrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7YEaJEAAAFqUlEQVRoge2Z709TVxjHT2kpFMpCLdSWdiWYFVK0IAV0yBqNYQ2CI062ie4PcJq9QZAfmRq0UwQmIRjjFBeXOJfAYHEYZ81ixQUmJhbkBb9aSotcpHDbYltbU0t69+LqXQPa9Nyit0v6zXlx2p7v8zyfe0977jmlYRgG/s+KorqAUBUBoFoRAKoVAaBaEQCqFQGgWhEAqsUIfqjZbG5parI7HLV1dRKJZPUAt9uNoqhucvKfgQGTyYRaLAtmMwBAIpGkpqbKsrJy5PLU1NS4uLg1Kx8AgAWtcy0tdADoANTX1vp8Pv+PrFZrT3f3gf37JRs24GPe2AQ83tcHDvx6/brFYgk+b2BBABytqsLr+PbwYY/Hg7/pdDp/6+r6rLQ0hsEIUPqKVlpc/HtPj9frDR0AYgpFRb36wtBoNBqNBgAYGhpSNTTcvn17eXmZGCaRSKRS6YdisSAlZR2HgyCI0WhEEGTk8WOHw4GPUavVmnv3KioqVKdPC4XC9zSF6mpq8OtXVVmJYVhXZ+dHaWnERWUxmV+Vl/9y7dro6OjS0tLy8jJhdLlc8/Pz9/v6TjY05GRn+9+Kop07dTpdKHeADMA3Bw+ebWzkJibiLxk02u6Skr6+PqfTGTiCz+czm82qU6dEKSkEw+asrIeDg+8VQMDjxcfG4v342NiWpqYXL15AZR0YGMiTy/0ZDAYDZOWvRAaAaHExMa3nzpFLPDo6qigsJEJ9vmePy+UiEYc8ADcx8ceLF0mkJDQ9Pb01Px+PxqTTz7e3kwhCHqCstPTp06cGg2HqtfR6/bNnz6DSa7VakUCAB9wklZpMJsj6YQBqqqv9AVLWr5dt3JiZkUE0aXr67pKSmZkZqArOnjlDxGxpboasHwbgu/r6YBapjsuXoSqw2Wxb8vJwr3zzZgRBoOwQD3OFCkVSUlJCQsIHb1duXt6OHTugFiIOh1N55Ai+Mk7p9dPT01B2iJVYqVT+pdHMPnlCrMT+wjCMwWBIMzNFIhFUBQCAjwsKxGLxzMyMy+XS6XQKhQLCDHW/3pGcTmfFvn34LDp86BCUNyz2A2w2WyaT4X2DXg/lDQsAAACfz8c7iygKZQwXgOTkZBaLBQBAFxehjOECwGazmUwmAOD58+dQxnABWFxcdLvdAIB1XC6UMVwAUBT1er0AAF5yMpQxLABevnw5OTGB95PeHQCGYT9duVJYUHD50iVsTf9ZW1hY0Ny9i/ezs7PhzMEvGWNjY2KhkA4Aj8vVarVQy01g/XHjBvEo1dPdDeWFuANxLFYihwMAsFqt59vb8SkbuhwOx4ULF/C+QCBIz8iA80Ph/vD6aIjFZN5Rq6G8b9PZxkb/PYbD4YCywwGYTCZZZiaeLE8un52dhbKv1uPhYWJDw2axujo7YSNAP8y1t7VFR0XhKUt27VpaWoKNQMhsNn+ybRtx+b/cu9ftdsMGgQaw2+3KoiIia7FSqdfrYYNgGIYgyJ6ysv/2dzzePY2GRBwyj9PDQ0NpYjGRe2t+/t/370NF6O/v35Kb63+60dbauuK8NUiR3A/c7O0V8fn+p7Ynjh+fn5/3P5BbLa/Xq9PpGk6cEItEhJdJpx8/doxcGRhpAAzDBh88WHFOmC2T1dfW3lGrjUaj1Wr1eDw+n8/tdttsNsPU1M3e3qrKSuIrizeRQNDS3BwYO7BoWAhr6uTExNHq6j9v3fJ/k8FgbJLJ+AKBSChMSEhAUdRms80hyMjIyAq7QqFoUKm2b99OugAAQt5S2u32n69e9f8xCaZlSCTfq1SwBxBv1Nrsiefm5q50dHxRXr4+KSlw6bk5OadOnhwfH1+TvFiIU2iFXC6X0Wh8ODioffTIYrFYLBar1RodHR0fH89ms3Pk8k+VyvT0dD6fv/pQg7TWEoAShcV+IBRFAKhWBIBqRQCoVgSAakUAqFYEgGr9C1O6hDD/uqSdAAAAAElFTkSuQmCC", Fr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAPqSURBVFiFxdZ/TFVlGMDx7/seLnjFewE3B1xwM62tlGJYSCIBBbv2g8JMakaptZpzi2T2Y/lPqzblnzYG/cVG2tJ+mavl1qZm05rSykEO0QDBgIvA5e4yvRe4F7ic0x90b5d7D4JwWM9f55w9z57P+7xn7zmkHRj4Ie3AQBH/U8SgUrPCohx/97z3aFqiqQ20YdCGhSpvTSqqB5ThSx3t7oOl9zsXAyAAPrkwUptqlRV6CT6fv6dye1HqePL63d6G+sNGAySAzapc023u9/dWbtuY7u5sMo00Hfs09a0L+YsC0ITm0W1elmdz97RKACVppVCWrzmRfnAgx3iApnl1m3ddkcFn5nvtAAlonDISMbU6ZAjg8/t7K5/bOK05QGx6VvDSUMTUBFTVG2q+bVNo7NMSLSnht4YhpgAxije08u6rUc1zcvN446kMMm0mwxESoKWt1bX3hUeT9Vaek5vHiVPn2FOYwqGyJErXmSMRJ1dW9WcvCPDB1szBMVvOTmlO0CITHil4DCmnXFLA+8WWSESipoqf5juJ0IpHztd9Zc4q2yGXWKchfjl7BlVV/yvQR8x7O5TwmwlHU/PSh3e1T7o6tmqBMQHQ1+vgRq+DzU8+gxACACGgYE0cQ6MqV52BYPkSoMxa/PZZz88f35gXAGCip7ElEtHSfIn+oWHsdjv/GhBA3l0LR0QBQogNL3dOujqeDSIuN/6G954yCteuMBShCwD97bjS2o5n9RYKVscZhpgRANHbEXBfp2vZQ7hi0g1D3BYQQoRtx7ijEUd6KU5frCGIWQEwfTsmPf1iou8yDlsJzhHIj0BsWhXHX4MBem5OzgkxJ0DkJCYG20XA/TfdywtxjsrpCAGxMYLT7WPh5TMioo7e28VIQ/3RZdnlO6Q5QRtt/p7BuhK+a+jkozNe1LDjq9Md0CtPQOPkkeoj68MfijsBBCM+b/d2X+PXX6i+W0KaE7DkV/BEeQVbMq1cdweovzjKeCDqVKdeOX5us7iWhWSzeKfm93kDAOJzX3vJ13Tsc9XvEQBKYhrxD76I+b7HMaWui8r/TPn21yLREfylu4mqFYv9tY3zBughgqEkphFrewDFmoqIXcqXhSl/lMS7NkSU96GOZ8z5JdQLvcMKQPN7Cbg6GO/9kzp7RtfzKYHokYAFIX0LAoD+tyMYh19/tWvX3ZZVMxYLEb9gwEyIWZtPhWYIIBJx6JXy7jk0B0Hbgl5CvXhvZ4W9aq38BkicPVt8aDgAQKvam43k9CyIfkwy445OwrmG2F9zEVUrBvpmbK5qT4t91UOLMoFgaFV7kpCmN0GUAMmAE8SPmESt2Fc9BPAP1KEkwmzcLhwAAAAASUVORK5CYII=", Lr = (o, t) => t instanceof Array ? t.map((n) => it.toArray(n).map(
1631
- (s) => ot(s, { ...o })
1674
+ var Qi = Xi;
1675
+ const $i = /* @__PURE__ */ Ro(Qi), Ki = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDI0LTA0LTE1VDEyOjUwOjI3KzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyNC0wNC0xNVQxMjo1MzowOSswODowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyNC0wNC0xNVQxMjo1MzowOSswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxNTY3NDQxZC1lYmQxLWIwNGUtOWUwOS0yMWQ1Mjk3NzAxNzMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MTU2NzQ0MWQtZWJkMS1iMDRlLTllMDktMjFkNTI5NzcwMTczIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6MTU2NzQ0MWQtZWJkMS1iMDRlLTllMDktMjFkNTI5NzcwMTczIj4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDoxNTY3NDQxZC1lYmQxLWIwNGUtOWUwOS0yMWQ1Mjk3NzAxNzMiIHN0RXZ0OndoZW49IjIwMjQtMDQtMTVUMTI6NTA6MjcrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7YEaJEAAAFqUlEQVRoge2Z709TVxjHT2kpFMpCLdSWdiWYFVK0IAV0yBqNYQ2CI062ie4PcJq9QZAfmRq0UwQmIRjjFBeXOJfAYHEYZ81ixQUmJhbkBb9aSotcpHDbYltbU0t69+LqXQPa9Nyit0v6zXlx2p7v8zyfe0977jmlYRgG/s+KorqAUBUBoFoRAKoVAaBaEQCqFQGgWhEAqsUIfqjZbG5parI7HLV1dRKJZPUAt9uNoqhucvKfgQGTyYRaLAtmMwBAIpGkpqbKsrJy5PLU1NS4uLg1Kx8AgAWtcy0tdADoANTX1vp8Pv+PrFZrT3f3gf37JRs24GPe2AQ83tcHDvx6/brFYgk+b2BBABytqsLr+PbwYY/Hg7/pdDp/6+r6rLQ0hsEIUPqKVlpc/HtPj9frDR0AYgpFRb36wtBoNBqNBgAYGhpSNTTcvn17eXmZGCaRSKRS6YdisSAlZR2HgyCI0WhEEGTk8WOHw4GPUavVmnv3KioqVKdPC4XC9zSF6mpq8OtXVVmJYVhXZ+dHaWnERWUxmV+Vl/9y7dro6OjS0tLy8jJhdLlc8/Pz9/v6TjY05GRn+9+Kop07dTpdKHeADMA3Bw+ebWzkJibiLxk02u6Skr6+PqfTGTiCz+czm82qU6dEKSkEw+asrIeDg+8VQMDjxcfG4v342NiWpqYXL15AZR0YGMiTy/0ZDAYDZOWvRAaAaHExMa3nzpFLPDo6qigsJEJ9vmePy+UiEYc8ADcx8ceLF0mkJDQ9Pb01Px+PxqTTz7e3kwhCHqCstPTp06cGg2HqtfR6/bNnz6DSa7VakUCAB9wklZpMJsj6YQBqqqv9AVLWr5dt3JiZkUE0aXr67pKSmZkZqArOnjlDxGxpboasHwbgu/r6YBapjsuXoSqw2Wxb8vJwr3zzZgRBoOwQD3OFCkVSUlJCQsIHb1duXt6OHTugFiIOh1N55Ai+Mk7p9dPT01B2iJVYqVT+pdHMPnlCrMT+wjCMwWBIMzNFIhFUBQCAjwsKxGLxzMyMy+XS6XQKhQLCDHW/3pGcTmfFvn34LDp86BCUNyz2A2w2WyaT4X2DXg/lDQsAAACfz8c7iygKZQwXgOTkZBaLBQBAFxehjOECwGazmUwmAOD58+dQxnABWFxcdLvdAIB1XC6UMVwAUBT1er0AAF5yMpQxLABevnw5OTGB95PeHQCGYT9duVJYUHD50iVsTf9ZW1hY0Ny9i/ezs7PhzMEvGWNjY2KhkA4Aj8vVarVQy01g/XHjBvEo1dPdDeWFuANxLFYihwMAsFqt59vb8SkbuhwOx4ULF/C+QCBIz8iA80Ph/vD6aIjFZN5Rq6G8b9PZxkb/PYbD4YCywwGYTCZZZiaeLE8un52dhbKv1uPhYWJDw2axujo7YSNAP8y1t7VFR0XhKUt27VpaWoKNQMhsNn+ybRtx+b/cu9ftdsMGgQaw2+3KoiIia7FSqdfrYYNgGIYgyJ6ysv/2dzzePY2GRBwyj9PDQ0NpYjGRe2t+/t/370NF6O/v35Kb63+60dbauuK8NUiR3A/c7O0V8fn+p7Ynjh+fn5/3P5BbLa/Xq9PpGk6cEItEhJdJpx8/doxcGRhpAAzDBh88WHFOmC2T1dfW3lGrjUaj1Wr1eDw+n8/tdttsNsPU1M3e3qrKSuIrizeRQNDS3BwYO7BoWAhr6uTExNHq6j9v3fJ/k8FgbJLJ+AKBSChMSEhAUdRms80hyMjIyAq7QqFoUKm2b99OugAAQt5S2u32n69e9f8xCaZlSCTfq1SwBxBv1Nrsiefm5q50dHxRXr4+KSlw6bk5OadOnhwfH1+TvFiIU2iFXC6X0Wh8ODioffTIYrFYLBar1RodHR0fH89ms3Pk8k+VyvT0dD6fv/pQg7TWEoAShcV+IBRFAKhWBIBqRQCoVgSAakUAqFYEgGr9C1O6hDD/uqSdAAAAAElFTkSuQmCC", es = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAPqSURBVFiFxdZ/TFVlGMDx7/seLnjFewE3B1xwM62tlGJYSCIBBbv2g8JMakaptZpzi2T2Y/lPqzblnzYG/cVG2tJ+mavl1qZm05rSykEO0QDBgIvA5e4yvRe4F7ic0x90b5d7D4JwWM9f55w9z57P+7xn7zmkHRj4Ie3AQBH/U8SgUrPCohx/97z3aFqiqQ20YdCGhSpvTSqqB5ThSx3t7oOl9zsXAyAAPrkwUptqlRV6CT6fv6dye1HqePL63d6G+sNGAySAzapc023u9/dWbtuY7u5sMo00Hfs09a0L+YsC0ITm0W1elmdz97RKACVppVCWrzmRfnAgx3iApnl1m3ddkcFn5nvtAAlonDISMbU6ZAjg8/t7K5/bOK05QGx6VvDSUMTUBFTVG2q+bVNo7NMSLSnht4YhpgAxije08u6rUc1zcvN446kMMm0mwxESoKWt1bX3hUeT9Vaek5vHiVPn2FOYwqGyJErXmSMRJ1dW9WcvCPDB1szBMVvOTmlO0CITHil4DCmnXFLA+8WWSESipoqf5juJ0IpHztd9Zc4q2yGXWKchfjl7BlVV/yvQR8x7O5TwmwlHU/PSh3e1T7o6tmqBMQHQ1+vgRq+DzU8+gxACACGgYE0cQ6MqV52BYPkSoMxa/PZZz88f35gXAGCip7ElEtHSfIn+oWHsdjv/GhBA3l0LR0QBQogNL3dOujqeDSIuN/6G954yCteuMBShCwD97bjS2o5n9RYKVscZhpgRANHbEXBfp2vZQ7hi0g1D3BYQQoRtx7ijEUd6KU5frCGIWQEwfTsmPf1iou8yDlsJzhHIj0BsWhXHX4MBem5OzgkxJ0DkJCYG20XA/TfdywtxjsrpCAGxMYLT7WPh5TMioo7e28VIQ/3RZdnlO6Q5QRtt/p7BuhK+a+jkozNe1LDjq9Md0CtPQOPkkeoj68MfijsBBCM+b/d2X+PXX6i+W0KaE7DkV/BEeQVbMq1cdweovzjKeCDqVKdeOX5us7iWhWSzeKfm93kDAOJzX3vJ13Tsc9XvEQBKYhrxD76I+b7HMaWui8r/TPn21yLREfylu4mqFYv9tY3zBughgqEkphFrewDFmoqIXcqXhSl/lMS7NkSU96GOZ8z5JdQLvcMKQPN7Cbg6GO/9kzp7RtfzKYHokYAFIX0LAoD+tyMYh19/tWvX3ZZVMxYLEb9gwEyIWZtPhWYIIBJx6JXy7jk0B0Hbgl5CvXhvZ4W9aq38BkicPVt8aDgAQKvam43k9CyIfkwy445OwrmG2F9zEVUrBvpmbK5qT4t91UOLMoFgaFV7kpCmN0GUAMmAE8SPmESt2Fc9BPAP1KEkwmzcLhwAAAAASUVORK5CYII=", ts = (o, t) => t instanceof Array ? t.map((n) => it.toArray(n).map(
1676
+ (s) => st(s, { ...o })
1632
1677
  )) : it.toArray(t).map(
1633
- (s) => ot(s, { ...o })
1634
- ), Ur = ({ width: o, height: t, background: n, parent: s, children: a, cursor: l }) => {
1635
- const d = me(() => {
1636
- const f = new no({
1678
+ (s) => st(s, { ...o })
1679
+ ), rs = ({ width: o, height: t, background: n, parent: s, children: a, cursor: l }) => {
1680
+ const h = le(() => {
1681
+ const f = new xo({
1637
1682
  width: o,
1638
1683
  height: t,
1639
1684
  overflow: "hide",
@@ -1642,145 +1687,213 @@ const Zr = /* @__PURE__ */ vo(Wr), Gr = "data:image/png;base64,iVBORw0KGgoAAAANS
1642
1687
  });
1643
1688
  return f.name = "frame", f;
1644
1689
  }, []);
1645
- return M(() => {
1646
- d.width = o, d.height = t, d.fill = n;
1647
- }, [o, t, n]), M(() => {
1648
- d.cursor = l || "auto";
1649
- }, [l]), M(() => (s.add(d), () => {
1650
- d.remove();
1651
- }), [s]), /* @__PURE__ */ e.jsx(e.Fragment, { children: Lr({ parent: d }, a) });
1652
- }, Vr = Y(({ parent: o }) => {
1653
- const [t, n] = me(() => {
1654
- const s = new ao({
1655
- url: r.editor.img.src,
1656
- origin: "center"
1657
- }), a = new lo({
1690
+ return N(() => {
1691
+ h.width = o, h.height = t, h.fill = n;
1692
+ }, [o, t, n]), N(() => {
1693
+ h.cursor = l || "auto";
1694
+ }, [l]), N(() => (s.add(h), () => {
1695
+ h.remove();
1696
+ }), [s]), /* @__PURE__ */ e.jsx(e.Fragment, { children: ts({ parent: h }, a) });
1697
+ }, os = `
1698
+ <svg width="43" height="32" viewBox="0 0 52 38" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 24.75C9.17564 24.75 11.75 22.1756 11.75 19C11.75 15.8244 9.17564 13.25 6 13.25C2.82436 13.25 0.25 15.8244 0.25 19C0.25 22.1756 2.82436 24.75 6 24.75Z" fill="#FF5F57" stroke="black" stroke-opacity="0.2" stroke-width="0.5"></path><path d="M26 24.75C29.1756 24.75 31.75 22.1756 31.75 19C31.75 15.8244 29.1756 13.25 26 13.25C22.8244 13.25 20.25 15.8244 20.25 19C20.25 22.1756 22.8244 24.75 26 24.75Z" fill="#FEBC2E" stroke="black" stroke-opacity="0.2" stroke-width="0.5"></path><path d="M46 24.75C49.1756 24.75 51.75 22.1756 51.75 19C51.75 15.8244 49.1756 13.25 46 13.25C42.8244 13.25 40.25 15.8244 40.25 19C40.25 22.1756 42.8244 24.75 46 24.75Z" fill="#28C840" stroke="black" stroke-opacity="0.2" stroke-width="0.5"></path></svg>
1699
+ `, is = _e(os), ss = B(({ parent: o }) => {
1700
+ const t = ne(null), [n, s, a] = le(() => {
1701
+ const l = new ae({
1702
+ origin: "center",
1703
+ fill: {
1704
+ type: "image",
1705
+ url: i.editor.img.src
1706
+ }
1707
+ }), h = new ft({
1708
+ overflow: "hide",
1709
+ children: [l]
1710
+ }), f = new ft({
1658
1711
  overflow: "hide",
1712
+ strokeAlign: "outside",
1659
1713
  scale: 1,
1660
- children: [s]
1714
+ fill: "#ffffff00",
1715
+ children: [h]
1661
1716
  });
1662
- return [s, a];
1717
+ return [l, h, f];
1663
1718
  }, [o]);
1664
- return M(() => {
1665
- r.option.padding === 0 ? n.fill = "#ffffff00" : n.fill = r.option.paddingBg;
1666
- }, [r.option.paddingBg, r.option.padding]), M(() => {
1667
- n.cornerRadius = r.option.round, t.cornerRadius = r.option.round - 2;
1668
- }, [r.option.round]), M(() => {
1669
- const { shadow: s } = r.option;
1670
- s === 0 ? n.shadow = null : n.shadow = {
1671
- x: s * 4,
1672
- y: s * 4,
1673
- blur: s * 3,
1719
+ return N(() => {
1720
+ i.option.padding === 0 ? s.fill = "#ffffff00" : s.fill = i.option.paddingBg;
1721
+ }, [i.option.paddingBg, i.option.padding]), N(() => {
1722
+ const { round: l } = i.option;
1723
+ a.cornerRadius = l, t.current ? (t.current.cornerRadius = [l, l, 0, 0], s.cornerRadius = [0, 0, l, l], n.cornerRadius = [0, 0, l, l]) : (s.cornerRadius = l, n.cornerRadius = l);
1724
+ }, [i.option.round]), N(() => {
1725
+ const { shadow: l } = i.option;
1726
+ l === 0 ? a.shadow = null : a.shadow = {
1727
+ x: l * 4,
1728
+ y: l * 4,
1729
+ blur: l * 3,
1674
1730
  color: "#00000045",
1675
1731
  box: !0
1676
1732
  };
1677
- }, [r.option.shadow]), M(() => {
1678
- n.scale = r.option.scale;
1679
- }, [r.option.scale]), M(() => {
1680
- t.url = r.editor.img.src;
1681
- }, [r.editor.img.src]), M(() => {
1682
- t.scaleX = r.option.scaleX ? -1 : 1;
1683
- }, [r.option.scaleX]), M(() => {
1684
- t.scaleY = r.option.scaleY ? -1 : 1;
1685
- }, [r.option.scaleY]), M(() => {
1686
- const s = Math.round(r.option.frameConf.width * 0.2), { width: a, height: l } = ko(r.editor.img.width, r.editor.img.height, r.option.frameConf.width - s, r.option.frameConf.height - s);
1687
- t.width = a - r.option.padding, t.height = l - r.option.padding, n.width = a, n.height = l, n.origin = r.option.align;
1688
- const { x: d, y: f } = Do(r.option.align, r.option.frameConf.width - a, r.option.frameConf.height - l);
1689
- n.x = d, n.y = f, r.option.padding > 0 && (t.x = r.option.padding / 2, t.y = r.option.padding / 2);
1690
- }, [r.option.frameConf.width, r.option.frameConf.height, r.option.padding, r.option.align]), M(() => (o.add(n), () => {
1691
- n.remove();
1733
+ }, [i.option.shadow]), N(() => {
1734
+ a.scale = i.option.scale;
1735
+ }, [i.option.scale]), N(() => {
1736
+ n.url = i.editor.img.src;
1737
+ }, [i.editor.img.src]), N(() => {
1738
+ n.scaleX = i.option.scaleX ? -1 : 1;
1739
+ }, [i.option.scaleX]), N(() => {
1740
+ n.scaleY = i.option.scaleY ? -1 : 1;
1741
+ }, [i.option.scaleY]), N(() => {
1742
+ const { align: l, round: h, frame: f, frameConf: d } = i.option, p = we(d.width, d.height), { width: m, height: b } = Yo(i.editor.img.width, i.editor.img.height, d.width - p, d.height - p);
1743
+ let C = b;
1744
+ switch (f) {
1745
+ case "light":
1746
+ a.strokeWidth = 8, a.stroke = "#ffffff80";
1747
+ break;
1748
+ case "dark":
1749
+ a.strokeWidth = 8, a.stroke = "#00000050";
1750
+ break;
1751
+ case "macosBarLight":
1752
+ case "macosBarDark":
1753
+ C += 32, t.current = new ae({
1754
+ x: 0,
1755
+ y: 0,
1756
+ height: 32,
1757
+ width: m,
1758
+ cornerRadius: [h, h, 0, 0],
1759
+ draggable: !0,
1760
+ fill: [
1761
+ { type: "solid", color: f.includes("Dark") ? "#3a3a3b" : "#ffffff" },
1762
+ { type: "image", url: is, format: "svg", mode: "clip", offset: { x: 10, y: 0 } }
1763
+ ]
1764
+ }), a.addAfter(t.current, s), s.cornerRadius = [0, 0, h, h], n.cornerRadius = [0, 0, h, h];
1765
+ break;
1766
+ default:
1767
+ a.strokeWidth = null, a.stroke = null;
1768
+ }
1769
+ const { x: A, y: x } = Po(l, d.width - m, d.height - C);
1770
+ a.width = m, a.height = C, a.origin = l, a.x = A, a.y = x, s.width = m, s.height = b, s.x = 0, s.y = C - b;
1771
+ const w = m - i.option.padding, S = Math.round(w * b / m);
1772
+ return n.width = w + 2, n.height = S + 2, n.x = i.option.padding / 2 - 1, n.y = (b - S) / 2 - 1, () => {
1773
+ var _;
1774
+ a.strokeWidth = null, a.stroke = null, (_ = t.current) == null || _.remove(), t.current = null, s.cornerRadius = i.option.round, n.cornerRadius = i.option.round;
1775
+ };
1776
+ }, [i.option.frameConf.width, i.option.frameConf.height, i.option.padding, i.option.align, i.option.frame]), N(() => (o.add(a), () => {
1777
+ a.remove();
1692
1778
  }), [o]), null;
1693
- }), Jr = Y(({ parent: o }) => {
1694
- const t = me(() => new De({
1779
+ }), ns = B(({ parent: o }) => {
1780
+ const t = le(() => new ae({
1695
1781
  x: 0,
1696
1782
  y: 0
1697
1783
  }), [o]);
1698
- return M(() => {
1699
- t.width = r.option.frameConf.width, t.height = r.option.frameConf.height;
1700
- }, [r.option.frameConf.width, r.option.frameConf.height]), M(() => {
1701
- t.zIndex = r.option.waterIndex;
1702
- }, [r.option.waterIndex]), M(() => {
1784
+ return N(() => {
1785
+ t.width = i.option.frameConf.width, t.height = i.option.frameConf.height;
1786
+ }, [i.option.frameConf.width, i.option.frameConf.height]), N(() => {
1787
+ t.zIndex = i.option.waterIndex;
1788
+ }, [i.option.waterIndex]), N(() => {
1703
1789
  t.fill = {
1704
1790
  type: "image",
1705
- url: r.option.waterSvg,
1791
+ url: i.option.waterSvg,
1706
1792
  mode: "repeat",
1707
1793
  format: "svg",
1708
- size: Math.round(r.option.frameConf.width / 6)
1794
+ size: Math.round(i.option.frameConf.width / 6)
1709
1795
  };
1710
- }, [r.option.waterSvg, r.option.frameConf.width]), M(() => (o.add(t), () => {
1796
+ }, [i.option.waterSvg, i.option.frameConf.width]), N(() => (o.add(t), () => {
1711
1797
  t.remove();
1712
1798
  }), []), null;
1713
- }), qr = ({ parent: o, type: t, id: n, width: s, height: a, x: l, y: d, fill: f, strokeWidth: u, zIndex: h, points: g, editable: y, text: S }) => {
1714
- const N = me(() => {
1715
- const x = { id: n, x: l, y: d, zIndex: h };
1716
- return t === "SquareFill" ? new De({
1799
+ }), as = ({ parent: o, type: t, id: n, width: s, height: a, x: l, y: h, fill: f, strokeWidth: d, zIndex: p, points: m, editable: b, text: C }) => {
1800
+ const A = le(() => {
1801
+ const x = { id: n, x: l, y: h, zIndex: p };
1802
+ return t === "SquareFill" ? new ae({
1717
1803
  cornerRadius: 8,
1718
1804
  width: s,
1719
1805
  height: a,
1720
1806
  fill: f,
1721
1807
  ...x
1722
- }) : t === "Circle" ? new co({
1808
+ }) : t === "Circle" ? new ht({
1723
1809
  stroke: f,
1724
- strokeWidth: u,
1810
+ strokeWidth: d,
1725
1811
  width: s,
1726
1812
  height: a,
1727
1813
  ...x
1728
- }) : t === "Slash" ? new lt({
1814
+ }) : t === "Slash" ? new pt({
1729
1815
  id: n,
1730
- points: g,
1731
- zIndex: h,
1816
+ points: m,
1817
+ zIndex: p,
1732
1818
  stroke: f,
1733
- strokeWidth: u
1734
- }) : t === "MoveDownLeft" ? new bo({
1819
+ strokeWidth: d
1820
+ }) : t === "MoveDownLeft" ? new Ao({
1735
1821
  id: n,
1736
- points: g,
1737
- zIndex: h,
1822
+ points: m,
1823
+ zIndex: p,
1738
1824
  strokeCap: "round",
1739
1825
  strokeJoin: "round",
1740
1826
  stroke: f,
1741
- strokeWidth: u
1742
- }) : t === "Pencil" ? new lt({
1827
+ strokeWidth: d
1828
+ }) : t === "Pencil" ? new pt({
1743
1829
  id: n,
1744
- points: g,
1745
- zIndex: h,
1830
+ points: m,
1831
+ zIndex: p,
1746
1832
  curve: !0,
1747
1833
  stroke: f,
1748
- strokeWidth: u
1749
- }) : t === "emoji" ? new fo({
1834
+ strokeWidth: d
1835
+ }) : t === "Step" ? new ht({
1836
+ ...x,
1837
+ width: 32,
1838
+ height: 32,
1839
+ stroke: "#ffffff90",
1840
+ strokeWidth: 2,
1841
+ strokeAlign: "outside",
1842
+ lockRatio: !0,
1843
+ shadow: {
1844
+ x: 1,
1845
+ y: 1,
1846
+ blur: 2,
1847
+ color: "#00000045",
1848
+ box: !0
1849
+ },
1850
+ fill: [
1851
+ {
1852
+ type: "solid",
1853
+ color: f
1854
+ },
1855
+ {
1856
+ type: "image",
1857
+ url: Go(C),
1858
+ format: "svg",
1859
+ align: "center"
1860
+ }
1861
+ ]
1862
+ }) : t === "emoji" ? new bo({
1750
1863
  id: n,
1751
- zIndex: h,
1752
- text: S,
1864
+ zIndex: p,
1865
+ text: C,
1753
1866
  resizeFontSize: !0,
1754
1867
  fontSize: 48
1755
- }) : new De({
1868
+ }) : new ae({
1756
1869
  cornerRadius: 8,
1757
1870
  stroke: f,
1758
- strokeWidth: u,
1871
+ strokeWidth: d,
1759
1872
  width: s,
1760
1873
  height: a,
1761
1874
  ...x
1762
1875
  });
1763
1876
  }, [o]);
1764
- return M(() => {
1765
- ["Slash", "MoveDownLeft", "Pencil"].includes(t) ? N.points = g : (N.x = l, N.y = d, N.width = s, N.height = a);
1766
- }, [l, d, s, a]), M(() => {
1767
- N.editable = !!y;
1768
- }, [y]), M(() => (o.add(N), () => {
1769
- N.remove();
1877
+ return N(() => {
1878
+ ["Slash", "MoveDownLeft", "Pencil"].includes(t) ? A.points = m : t === "Step" || (A.x = l, A.y = h, A.width = s, A.height = a);
1879
+ }, [l, h, s, a]), N(() => {
1880
+ A.editable = !!b;
1881
+ }, [b]), N(() => (o.add(A), () => {
1882
+ A.remove();
1770
1883
  }), [o]), null;
1771
- }, Xr = Y(() => (M(() => {
1884
+ }, ls = B(() => (N(() => {
1772
1885
  const o = (s) => {
1773
1886
  var l;
1774
- const { list: a } = (l = r.editor.app) == null ? void 0 : l.editor;
1887
+ const { list: a } = (l = i.editor.app) == null ? void 0 : l.editor;
1775
1888
  if (a != null && a.length) {
1776
- for (let d of a)
1777
- d.remove(), r.editor.removeShape(d);
1778
- r.editor.app.editor.cancel();
1889
+ for (let h of a)
1890
+ h.remove(), i.editor.removeShape(h);
1891
+ i.editor.app.editor.cancel();
1779
1892
  }
1780
1893
  }, t = (s) => {
1781
1894
  var a, l;
1782
- s === "fit" ? (a = r.editor.app) == null || a.tree.zoom(s, 100) : (l = r.editor.app) == null || l.tree.zoom(s), r.editor.setScale(r.editor.app.tree.scale);
1783
- }, n = Ct(window, {
1895
+ s === "fit" ? (a = i.editor.app) == null || a.tree.zoom(s, 100) : (l = i.editor.app) == null || l.tree.zoom(s), i.editor.setScale(i.editor.app.tree.scale);
1896
+ }, n = Rt(window, {
1784
1897
  Backspace: o,
1785
1898
  Delete: o,
1786
1899
  "$mod+Minus": (s) => {
@@ -1797,11 +1910,11 @@ const Zr = /* @__PURE__ */ vo(Wr), Gr = "data:image/png;base64,iVBORw0KGgoAAAANS
1797
1910
  n();
1798
1911
  };
1799
1912
  }, [window]), null));
1800
- po.set("pencil", { url: Fr });
1801
- const Qr = Y(({ target: o }) => {
1913
+ wo.set("pencil", { url: es });
1914
+ const cs = B(({ target: o }) => {
1802
1915
  var t, n;
1803
- return M(() => {
1804
- const s = new uo({
1916
+ return N(() => {
1917
+ const s = new yo({
1805
1918
  view: o,
1806
1919
  editor: {
1807
1920
  lockRatio: "corner",
@@ -1814,7 +1927,7 @@ const Qr = Y(({ target: o }) => {
1814
1927
  height: 20,
1815
1928
  fill: {
1816
1929
  type: "image",
1817
- url: Gr
1930
+ url: Ki
1818
1931
  }
1819
1932
  }
1820
1933
  },
@@ -1826,65 +1939,75 @@ const Qr = Y(({ target: o }) => {
1826
1939
  usePartRender: !0
1827
1940
  }
1828
1941
  });
1829
- new wo(s), r.editor.setApp(s), s.tree.on(ho.ZOOM, () => {
1830
- r.editor.setScale(s.tree.scale);
1831
- }), s.tree.on(mo.RESIZE, () => {
1832
- r.editor.setScale(s.tree.scale);
1942
+ new No(s), i.editor.setApp(s), s.tree.on(vo.ZOOM, () => {
1943
+ i.editor.setScale(s.tree.scale);
1944
+ }), s.tree.on(jo.RESIZE, () => {
1945
+ i.editor.setScale(s.tree.scale);
1833
1946
  });
1834
1947
  let a = null;
1835
- s.tree.on(ke.START, (d) => {
1836
- if (!r.editor.useTool) return;
1837
- const { target: f } = d;
1838
- if (r.editor.getShape(f.id)) return;
1839
- a = he();
1840
- const h = d.getPageBounds(), g = r.editor.useTool, y = {
1948
+ const l = (f) => {
1949
+ if (!i.editor.useTool) return;
1950
+ const { target: d } = f;
1951
+ if (i.editor.getShape(d.id)) return;
1952
+ a = ge();
1953
+ const m = f.getPageBounds ? f.getPageBounds() : f.getPage(), b = i.editor.useTool;
1954
+ return {
1841
1955
  id: a,
1842
- type: g,
1843
- fill: r.editor.annotateColor,
1844
- strokeWidth: r.editor.strokeWidth,
1845
- zIndex: r.editor.shapes.size + 1,
1846
- ...h
1956
+ type: b,
1957
+ fill: i.editor.annotateColor,
1958
+ strokeWidth: i.editor.strokeWidth,
1959
+ zIndex: i.editor.shapes.size + 1,
1960
+ ...m
1847
1961
  };
1848
- ["Slash", "MoveDownLeft", "Pencil"].includes(g) && (y.points = [h.x, h.y]), r.editor.addShape(y);
1849
- }), s.tree.on(ke.DRAG, (d) => {
1850
- if (!r.editor.useTool || !a) return;
1851
- const f = r.editor.getShape(a);
1852
- if (!f) return;
1853
- const u = d.getPageBounds(), h = Object.assign({}, f, u), { points: g, type: y } = h;
1854
- if (g && g.length) {
1855
- const { x: S, y: N } = d.getInnerTotal(), x = S > 0 ? u.x + S : u.x, v = N > 0 ? u.y + N : u.y;
1856
- y === "Pencil" ? h.points = [...g, x, v] : h.points = [g[0], g[1], x, v];
1962
+ };
1963
+ s.tree.on(Mo.DOWN, (f) => {
1964
+ if (i.editor.useTool !== "Step") return;
1965
+ const p = l(f);
1966
+ p && (p.text = i.editor.nextStep, p.editable = !0, i.editor.addShape(p), a = null, i.editor.setUseTool(null));
1967
+ }), s.tree.on(De.START, (f) => {
1968
+ const d = i.editor.useTool;
1969
+ if (d === "Step") return;
1970
+ const p = l(f);
1971
+ p && (["Slash", "MoveDownLeft", "Pencil"].includes(d) && (p.points = [p.x, p.y]), i.editor.addShape(p));
1972
+ }), s.tree.on(De.DRAG, (f) => {
1973
+ if (!i.editor.useTool || !a) return;
1974
+ const d = i.editor.getShape(a);
1975
+ if (!d) return;
1976
+ const p = f.getPageBounds(), m = Object.assign({}, d, p), { points: b, type: C } = m;
1977
+ if (b && b.length) {
1978
+ const { x: A, y: x } = f.getInnerTotal(), w = A > 0 ? p.x + A : p.x, S = x > 0 ? p.y + x : p.y;
1979
+ C === "Pencil" ? m.points = [...b, w, S] : m.points = [b[0], b[1], w, S];
1857
1980
  }
1858
- r.editor.addShape(h);
1859
- }), s.tree.on(ke.END, () => {
1860
- if (!r.editor.useTool || !a) return;
1861
- const d = r.editor.getShape(a);
1862
- d && ((d.width === 0 || d.height === 0) && !["Slash", "MoveDownLeft", "Pencil"].includes(d.type) ? r.editor.removeShape(d) : r.editor.addShape(Object.assign({}, d, { editable: !0 }))), a = null, r.editor.useTool !== "Pencil" && r.editor.setUseTool(null);
1981
+ i.editor.addShape(m);
1982
+ }), s.tree.on(De.END, () => {
1983
+ if (!i.editor.useTool || !a) return;
1984
+ const f = i.editor.getShape(a);
1985
+ f && ((f.width === 0 || f.height === 0) && !["Slash", "MoveDownLeft", "Pencil"].includes(f.type) ? i.editor.removeShape(f) : i.editor.addShape(Object.assign({}, f, { editable: !0 }))), a = null, i.editor.useTool !== "Pencil" && i.editor.setUseTool(null);
1863
1986
  });
1864
- const l = Zr(() => {
1865
- const { width: d, height: f } = o.getBoundingClientRect();
1866
- s.tree.zoom("fit", 100), r.option.frameConf.width < d && r.option.frameConf.height < f && s.tree.zoom(1);
1987
+ const h = $i(() => {
1988
+ const { width: f, height: d } = o.getBoundingClientRect();
1989
+ s.tree.zoom("fit", 100), i.option.frameConf.width < f && i.option.frameConf.height < d && s.tree.zoom(1);
1867
1990
  }, 10);
1868
- return go(o, l), () => {
1869
- xo(o, l), r.editor.destroy();
1991
+ return Co(o, h), () => {
1992
+ ko(o, h), i.editor.destroy();
1870
1993
  };
1871
- }, [o]), M(() => {
1994
+ }, [o]), N(() => {
1872
1995
  const s = setTimeout(() => {
1873
1996
  const { width: a, height: l } = o.getBoundingClientRect();
1874
- r.editor.app.tree.zoom("fit", 100), r.option.frameConf.width < a && r.option.frameConf.height < l && r.editor.app.tree.zoom(1), r.editor.setScale(r.editor.app.tree.scale);
1997
+ i.editor.app.tree.zoom("fit", 100), i.option.frameConf.width < a && i.option.frameConf.height < l && i.editor.app.tree.zoom(1), i.editor.setScale(i.editor.app.tree.scale);
1875
1998
  }, 20);
1876
1999
  return () => {
1877
2000
  clearTimeout(s);
1878
2001
  };
1879
- }, [r.option.frameConf.width, r.option.frameConf.height]), (t = r.editor.app) != null && t.tree ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1880
- /* @__PURE__ */ e.jsxs(Ur, { parent: r.editor.app.tree, cursor: r.editor.cursor, ...r.option.frameConf, children: [
1881
- r.editor.shapesList.map((s) => /* @__PURE__ */ e.jsx(qr, { ...s }, s.id)),
1882
- ((n = r.editor.img) == null ? void 0 : n.src) && /* @__PURE__ */ e.jsx(Vr, {}),
1883
- r.option.waterImg && /* @__PURE__ */ e.jsx(Jr, {})
2002
+ }, [i.option.frameConf.width, i.option.frameConf.height]), (t = i.editor.app) != null && t.tree ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2003
+ /* @__PURE__ */ e.jsxs(rs, { parent: i.editor.app.tree, cursor: i.editor.cursor, ...i.option.frameConf, children: [
2004
+ i.editor.shapesList.map((s) => /* @__PURE__ */ e.jsx(as, { ...s }, s.id)),
2005
+ ((n = i.editor.img) == null ? void 0 : n.src) && /* @__PURE__ */ e.jsx(ss, {}),
2006
+ i.option.waterImg && /* @__PURE__ */ e.jsx(ns, {})
1884
2007
  ] }),
1885
- /* @__PURE__ */ e.jsx(Xr, {})
2008
+ /* @__PURE__ */ e.jsx(ls, {})
1886
2009
  ] }) : null;
1887
- }), $r = [
2010
+ }), ds = [
1888
2011
  {
1889
2012
  key: 0.5,
1890
2013
  label: "50%"
@@ -1901,33 +2024,33 @@ const Qr = Y(({ target: o }) => {
1901
2024
  key: 2,
1902
2025
  label: "200%"
1903
2026
  }
1904
- ], Kr = Y(() => {
2027
+ ], fs = B(() => {
1905
2028
  const o = (n) => {
1906
2029
  var s;
1907
- (s = r.editor.app) == null || s.tree.zoom(n), r.editor.setScale(r.editor.app.tree.scale);
2030
+ (s = i.editor.app) == null || s.tree.zoom(n), i.editor.setScale(i.editor.app.tree.scale);
1908
2031
  }, t = (n) => {
1909
2032
  var a, l;
1910
2033
  const s = Number(n.key);
1911
- s === 4 ? (a = r.editor.app) == null || a.tree.zoom("fit", 100) : (l = r.editor.app) == null || l.tree.zoom(s), r.editor.setScale(r.editor.app.tree.scale);
2034
+ s === 4 ? (a = i.editor.app) == null || a.tree.zoom("fit", 100) : (l = i.editor.app) == null || l.tree.zoom(s), i.editor.setScale(i.editor.app.tree.scale);
1912
2035
  };
1913
2036
  return /* @__PURE__ */ e.jsxs("div", { className: "absolute z-10 bottom-4 gap-2 right-4 flex items-center ", children: [
1914
- /* @__PURE__ */ e.jsxs("div", { className: "flex bg-white overflow-hidden rounded-full shadow-md", children: [
1915
- /* @__PURE__ */ e.jsx(T, { type: "text", icon: /* @__PURE__ */ e.jsx(A.ZoomIn, { size: 16 }), onClick: () => o("in") }),
1916
- /* @__PURE__ */ e.jsx(vt, { menu: { items: $r, onClick: t }, placement: "top", children: /* @__PURE__ */ e.jsxs(T, { type: "text", children: [
1917
- r.editor.scale,
2037
+ /* @__PURE__ */ e.jsxs("div", { className: "flex bg-white dark:bg-black overflow-hidden rounded-full shadow-md", children: [
2038
+ /* @__PURE__ */ e.jsx(k, { type: "text", icon: /* @__PURE__ */ e.jsx(M.ZoomIn, { size: 16 }), onClick: () => o("in") }),
2039
+ /* @__PURE__ */ e.jsx(At, { menu: { items: ds, onClick: t }, placement: "top", children: /* @__PURE__ */ e.jsxs(k, { type: "text", children: [
2040
+ i.editor.scale,
1918
2041
  "%"
1919
2042
  ] }) }),
1920
- /* @__PURE__ */ e.jsx(T, { type: "text", icon: /* @__PURE__ */ e.jsx(A.ZoomOut, { size: 16 }), onClick: () => o("out") })
2043
+ /* @__PURE__ */ e.jsx(k, { type: "text", icon: /* @__PURE__ */ e.jsx(M.ZoomOut, { size: 16 }), onClick: () => o("out") })
1921
2044
  ] }),
1922
- /* @__PURE__ */ e.jsx("div", { className: "rounded-full bg-white shadow-md overflow-hidden", children: /* @__PURE__ */ e.jsx(T, { type: "text", icon: /* @__PURE__ */ e.jsx(A.Maximize, { size: 16 }), onClick: () => t({ key: 4 }) }) })
2045
+ /* @__PURE__ */ e.jsx("div", { className: "rounded-full bg-white dark:bg-black shadow-md overflow-hidden", children: /* @__PURE__ */ e.jsx(k, { type: "text", icon: /* @__PURE__ */ e.jsx(M.Maximize, { size: 16 }), onClick: () => t({ key: 4 }) }) })
1923
2046
  ] });
1924
- }), es = Y(() => {
2047
+ }), hs = B(() => {
1925
2048
  const [o, t] = O(null);
1926
2049
  return /* @__PURE__ */ e.jsxs("div", { className: "md:w-0 md:flex-1 overflow-hidden select-none relative", children: [
1927
- /* @__PURE__ */ e.jsx("div", { className: "w-full h-full relative z-0", ref: (n) => t(n), children: o && /* @__PURE__ */ e.jsx(Qr, { target: o }) }),
1928
- /* @__PURE__ */ e.jsx(Kr, {})
2050
+ /* @__PURE__ */ e.jsx("div", { className: "w-full h-full relative z-0", ref: (n) => t(n), children: o && /* @__PURE__ */ e.jsx(cs, { target: o }) }),
2051
+ /* @__PURE__ */ e.jsx(fs, {})
1929
2052
  ] });
1930
- }), ts = [
2053
+ }), ps = [
1931
2054
  {
1932
2055
  key: "default",
1933
2056
  title: "Default",
@@ -2089,17 +2212,17 @@ const Qr = Y(({ target: o }) => {
2089
2212
  }
2090
2213
  ]
2091
2214
  }
2092
- ], is = ({ frameWidth: o, frameHeight: t, type: n, onSet: s }) => {
2093
- const [a, l] = O(""), [d, f] = O(""), u = () => {
2215
+ ], us = ({ frameWidth: o, frameHeight: t, type: n, onSet: s }) => {
2216
+ const [a, l] = O(""), [h, f] = O(""), d = () => {
2094
2217
  s({ type: "auto", title: "Auto" });
2095
- }, h = () => {
2096
- s({ type: "custom", title: "Custom", width: a, height: d });
2218
+ }, p = () => {
2219
+ s({ type: "custom", title: "Custom", width: a, height: h });
2097
2220
  };
2098
- return M(() => {
2221
+ return N(() => {
2099
2222
  n === "custom" ? (l(o), f(t)) : (l(""), f(""));
2100
2223
  }, [n]), /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center py-2 font-normal", children: [
2101
2224
  /* @__PURE__ */ e.jsx(
2102
- rt,
2225
+ nt,
2103
2226
  {
2104
2227
  min: 1,
2105
2228
  value: a,
@@ -2111,10 +2234,10 @@ const Qr = Y(({ target: o }) => {
2111
2234
  ),
2112
2235
  /* @__PURE__ */ e.jsx("span", { className: "text-xs opacity-50", children: "x" }),
2113
2236
  /* @__PURE__ */ e.jsx(
2114
- rt,
2237
+ nt,
2115
2238
  {
2116
2239
  min: 1,
2117
- value: d,
2240
+ value: h,
2118
2241
  onChange: f,
2119
2242
  placeholder: t,
2120
2243
  prefix: /* @__PURE__ */ e.jsx("span", { className: "opacity-60 mx-1", children: "H" }),
@@ -2122,135 +2245,135 @@ const Qr = Y(({ target: o }) => {
2122
2245
  }
2123
2246
  ),
2124
2247
  /* @__PURE__ */ e.jsx(
2125
- T,
2248
+ k,
2126
2249
  {
2127
2250
  type: "primary",
2128
2251
  shape: "circle",
2129
- icon: /* @__PURE__ */ e.jsx(A.Check, { size: 18 }),
2130
- disabled: !a || !d,
2131
- onClick: h
2252
+ icon: /* @__PURE__ */ e.jsx(M.Check, { size: 18 }),
2253
+ disabled: !a || !h,
2254
+ onClick: p
2132
2255
  }
2133
2256
  ),
2134
- /* @__PURE__ */ e.jsx(F, { title: "Auto size", children: /* @__PURE__ */ e.jsx(
2135
- T,
2257
+ /* @__PURE__ */ e.jsx(L, { title: "Auto size", children: /* @__PURE__ */ e.jsx(
2258
+ k,
2136
2259
  {
2137
2260
  type: "primary",
2138
2261
  shape: "circle",
2139
- icon: /* @__PURE__ */ e.jsx(A.Maximize, { size: 18 }),
2262
+ icon: /* @__PURE__ */ e.jsx(M.Maximize, { size: 18 }),
2140
2263
  disabled: n === "auto",
2141
- onClick: u
2264
+ onClick: d
2142
2265
  }
2143
2266
  ) })
2144
2267
  ] });
2145
- }, os = Y(() => {
2146
- var N;
2147
- const o = ue(null), [t, n] = O(!1), [s, a] = O(500), l = () => {
2268
+ }, ms = B(() => {
2269
+ var A;
2270
+ const o = ne(null), [t, n] = O(!1), [s, a] = O(500), l = () => {
2148
2271
  n(!1);
2149
- }, d = (x) => {
2272
+ }, h = (x) => {
2150
2273
  if (n(x), x && o.current) {
2151
- const { height: v, y: H } = o.current.getBoundingClientRect(), _ = document.body.clientHeight - v - H - 80;
2274
+ const { height: w, y: S } = o.current.getBoundingClientRect(), _ = document.body.clientHeight - w - S - 80;
2152
2275
  a(_);
2153
2276
  }
2154
- }, f = (x, v) => !(x !== r.option.size.type || v.height !== r.option.frameConf.height || v.width !== r.option.frameConf.width), u = (x) => {
2155
- if (l(), x.type === "auto" && r.editor.img.width) {
2156
- const v = Math.round(r.editor.img.width * 0.2);
2157
- r.option.setSize({ ...x, width: r.editor.img.width + v, height: r.editor.img.height + v });
2277
+ }, f = (x, w) => !(x !== i.option.size.type || w.height !== i.option.frameConf.height || w.width !== i.option.frameConf.width), d = (x) => {
2278
+ if (l(), x.type === "auto" && i.editor.img.width) {
2279
+ const w = we(i.editor.img.width, i.editor.img.height);
2280
+ i.option.setSize({ ...x, width: i.editor.img.width + w, height: i.editor.img.height + w });
2158
2281
  return;
2159
2282
  }
2160
- r.option.setSize(x);
2161
- }, h = (x, v, H) => {
2162
- l(), r.option.setSize({
2283
+ i.option.setSize(x);
2284
+ }, p = (x, w, S) => {
2285
+ l(), i.option.setSize({
2163
2286
  type: x,
2164
- title: `${v}${H.title ? ` ${H.title} ` : " "}${H.w} : ${H.h}`,
2165
- width: H.width,
2166
- height: H.height
2287
+ title: `${w}${S.title ? ` ${S.title} ` : " "}${S.w} : ${S.h}`,
2288
+ width: S.width,
2289
+ height: S.height
2167
2290
  });
2168
- }, g = ((N = r.editor.img) == null ? void 0 : N.src) || r.option.size.type !== "auto", y = /* @__PURE__ */ e.jsx(is, { type: r.option.size.type, frameWidth: r.option.frameConf.width, frameHeight: r.option.frameConf.height, onSet: u }), S = /* @__PURE__ */ e.jsx("div", { className: "border-t border-gray-200 py-2 divide-y", children: ts.map((x) => /* @__PURE__ */ e.jsxs("div", { children: [
2291
+ }, m = ((A = i.editor.img) == null ? void 0 : A.src) || i.option.size.type !== "auto", b = /* @__PURE__ */ e.jsx(us, { type: i.option.size.type, frameWidth: i.option.frameConf.width, frameHeight: i.option.frameConf.height, onSet: d }), C = /* @__PURE__ */ e.jsx("div", { className: "border-t border-gray-200 dark:border-gray-800 py-2 divide-y dark:divide-gray-700", "data-mode": i.editor.isDark ? "dark" : "light", children: ps.map((x) => /* @__PURE__ */ e.jsxs("div", { children: [
2169
2292
  x.key !== "default" && /* @__PURE__ */ e.jsx("div", { className: "font-semibold pt-2", children: x.title }),
2170
- /* @__PURE__ */ e.jsx("section", { className: "flex flex-wrap items-end pb-2", children: x.lists.map((v, H) => /* @__PURE__ */ e.jsxs(
2171
- T,
2293
+ /* @__PURE__ */ e.jsx("section", { className: "flex flex-wrap items-end pb-2", children: x.lists.map((w, S) => /* @__PURE__ */ e.jsxs(
2294
+ k,
2172
2295
  {
2173
2296
  type: "text",
2174
2297
  className: "flex-[33%] p-3 h-auto flex-col gap-0 disabled:bg-blue-500/5 disabled:border-blue-500 disabled:cursor-default disabled:text-black",
2175
- disabled: f(x.key, v),
2176
- onClick: () => h(x.key, x.title, v),
2298
+ disabled: f(x.key, w),
2299
+ onClick: () => p(x.key, x.title, w),
2177
2300
  children: [
2178
2301
  /* @__PURE__ */ e.jsx("div", { className: "py-2 px-3 w-full", children: /* @__PURE__ */ e.jsx(
2179
2302
  "div",
2180
2303
  {
2181
- className: "border border-black/50 bg-black/10 w-full flex items-center justify-center rounded-md opacity-75",
2182
- style: { aspectRatio: v.w / v.h },
2304
+ className: "border border-black/50 bg-black/10 dark:bg-white/20 dark:border-white/40 w-full flex items-center justify-center rounded-md opacity-75",
2305
+ style: { aspectRatio: w.w / w.h },
2183
2306
  children: /* @__PURE__ */ e.jsxs("span", { children: [
2184
- v.w,
2307
+ w.w,
2185
2308
  " : ",
2186
- v.h
2309
+ w.h
2187
2310
  ] })
2188
2311
  }
2189
2312
  ) }),
2190
- v.title && /* @__PURE__ */ e.jsx("div", { className: "text-xs", children: v.title }),
2313
+ w.title && /* @__PURE__ */ e.jsx("div", { className: "text-xs", children: w.title }),
2191
2314
  /* @__PURE__ */ e.jsxs("div", { className: "text-xs overflow-hidden text-gray-500", children: [
2192
- v.width,
2315
+ w.width,
2193
2316
  " x ",
2194
- v.height
2317
+ w.height
2195
2318
  ] })
2196
2319
  ]
2197
2320
  },
2198
- H
2321
+ S
2199
2322
  )) })
2200
2323
  ] }, x.key)) });
2201
2324
  return /* @__PURE__ */ e.jsx(
2202
- ge,
2325
+ xe,
2203
2326
  {
2204
- content: S,
2205
- title: y,
2327
+ content: C,
2328
+ title: b,
2206
2329
  trigger: "click",
2207
2330
  arrow: !1,
2208
2331
  placement: "bottomRight",
2209
2332
  open: t,
2210
- overlayClassName: "[&_.ant-popover-inner]:h-full [&_.ant-popover-inner]:overflow-x-hidden [&_.ant-popover-inner]:overflow-y-auto [&_.ant-popover-content]:h-full",
2333
+ overlayClassName: Z("shoteasy-components [&_.ant-popover-inner]:h-full [&_.ant-popover-inner]:overflow-x-hidden [&_.ant-popover-inner]:overflow-y-auto [&_.ant-popover-content]:h-full", i.editor.isDark && "dark-mode"),
2211
2334
  overlayStyle: {
2212
2335
  width: "400px",
2213
2336
  height: `${s}px`
2214
2337
  },
2215
- onOpenChange: d,
2216
- children: /* @__PURE__ */ e.jsxs("div", { className: G("px-3 py-1.5 border shrink-0 border-gray-200 gap-3 shadow-sm overflow-hidden max-h-12 rounded-md hover:border-blue-500 [&_svg]:hover:text-blue-500 cursor-pointer flex items-center", t && "shadow-md"), ref: o, children: [
2338
+ onOpenChange: h,
2339
+ children: /* @__PURE__ */ e.jsxs("div", { className: Z("px-3 py-1.5 border shrink-0 border-gray-200 dark:border-gray-700 gap-3 shadow-sm overflow-hidden max-h-12 rounded-md hover:border-blue-500 [&_svg]:hover:text-blue-500 cursor-pointer flex items-center", t && "shadow-md"), ref: o, children: [
2217
2340
  /* @__PURE__ */ e.jsx(
2218
2341
  "div",
2219
2342
  {
2220
- className: "border border-black/50 bg-black/10 w-4 rounded-sm",
2221
- style: { aspectRatio: r.option.frameConf.width / r.option.frameConf.height }
2343
+ className: "border border-black/50 bg-black/10 dark:bg-white/20 dark:border-white/40 w-4 rounded-sm",
2344
+ style: { aspectRatio: i.option.frameConf.width / i.option.frameConf.height }
2222
2345
  }
2223
2346
  ),
2224
2347
  /* @__PURE__ */ e.jsxs("div", { className: "text-xs", children: [
2225
- /* @__PURE__ */ e.jsx("div", { className: "font-semibold leading-3 mb-0.5", children: r.option.size.title }),
2226
- g ? /* @__PURE__ */ e.jsxs("div", { className: "text-gray-500 leading-3", children: [
2227
- r.option.frameConf.width,
2348
+ /* @__PURE__ */ e.jsx("div", { className: "font-semibold leading-3 mb-0.5", children: i.option.size.title }),
2349
+ m ? /* @__PURE__ */ e.jsxs("div", { className: "text-gray-500 leading-3", children: [
2350
+ i.option.frameConf.width,
2228
2351
  " x ",
2229
- r.option.frameConf.height,
2352
+ i.option.frameConf.height,
2230
2353
  " px"
2231
2354
  ] }) : /* @__PURE__ */ e.jsx("div", { className: "text-gray-500 leading-3", children: "Adaptive screenshot size" })
2232
2355
  ] }),
2233
2356
  /* @__PURE__ */ e.jsx("div", { className: "flex-1" }),
2234
- t ? /* @__PURE__ */ e.jsx(A.ChevronUp, { size: 16 }) : /* @__PURE__ */ e.jsx(A.ChevronDown, { size: 16 })
2357
+ t ? /* @__PURE__ */ e.jsx(M.ChevronUp, { size: 16 }) : /* @__PURE__ */ e.jsx(M.ChevronDown, { size: 16 })
2235
2358
  ] })
2236
2359
  }
2237
2360
  );
2238
- }), rs = Y(() => {
2239
- const o = ue(null), [t, n] = O(!1), s = () => {
2361
+ }), gs = B(() => {
2362
+ const o = ne(null), [t, n] = O(!1), s = () => {
2240
2363
  n(!0);
2241
2364
  }, a = () => {
2242
- var d, f;
2243
- if (typeof ((d = o.current) == null ? void 0 : d.cropper) < "u") {
2244
- const u = (f = o.current) == null ? void 0 : f.cropper.getCroppedCanvas();
2245
- if (u) {
2246
- const { width: h, height: g } = u, y = u.toDataURL();
2247
- if (r.editor.setImg(Object.assign({}, r.editor.img, {
2248
- src: y,
2249
- width: h,
2250
- height: g
2251
- })), r.option.size.type === "auto") {
2252
- const S = Math.round(h * 0.2);
2253
- r.option.setFrameSize(h + S, g + S);
2365
+ var h, f;
2366
+ if (typeof ((h = o.current) == null ? void 0 : h.cropper) < "u") {
2367
+ const d = (f = o.current) == null ? void 0 : f.cropper.getCroppedCanvas();
2368
+ if (d) {
2369
+ const { width: p, height: m } = d, b = d.toDataURL();
2370
+ if (i.editor.setImg(Object.assign({}, i.editor.img, {
2371
+ src: b,
2372
+ width: p,
2373
+ height: m
2374
+ })), i.option.size.type === "auto") {
2375
+ const C = we(p, m);
2376
+ i.option.setFrameSize(p + C, m + C);
2254
2377
  }
2255
2378
  }
2256
2379
  }
@@ -2259,17 +2382,17 @@ const Qr = Y(({ target: o }) => {
2259
2382
  n(!1);
2260
2383
  };
2261
2384
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2262
- /* @__PURE__ */ e.jsx(F, { title: "Crop Image", children: /* @__PURE__ */ e.jsx(
2263
- T,
2385
+ /* @__PURE__ */ e.jsx(L, { title: "Crop Image", children: /* @__PURE__ */ e.jsx(
2386
+ k,
2264
2387
  {
2265
2388
  type: "text",
2266
2389
  shape: "circle",
2267
- icon: /* @__PURE__ */ e.jsx(A.Crop, { size: 18 }),
2390
+ icon: /* @__PURE__ */ e.jsx(M.Crop, { size: 18 }),
2268
2391
  onClick: s
2269
2392
  }
2270
2393
  ) }),
2271
2394
  /* @__PURE__ */ e.jsx(
2272
- ci,
2395
+ gr,
2273
2396
  {
2274
2397
  title: "Cropper",
2275
2398
  open: t,
@@ -2277,13 +2400,13 @@ const Qr = Y(({ target: o }) => {
2277
2400
  onCancel: l,
2278
2401
  destroyOnClose: !0,
2279
2402
  children: /* @__PURE__ */ e.jsx(
2280
- yo,
2403
+ So,
2281
2404
  {
2282
2405
  ref: o,
2283
2406
  style: { height: 400, width: "100%" },
2284
2407
  zoomTo: 0.5,
2285
- initialAspectRatio: r.editor.img.width / r.editor.img.height,
2286
- src: r.editor.img.src,
2408
+ initialAspectRatio: i.editor.img.width / i.editor.img.height,
2409
+ src: i.editor.img.src,
2287
2410
  dragMode: "move",
2288
2411
  viewMode: 1,
2289
2412
  minCropBoxHeight: 10,
@@ -2298,82 +2421,83 @@ const Qr = Y(({ target: o }) => {
2298
2421
  }
2299
2422
  )
2300
2423
  ] });
2301
- }), ss = ["top-left", "top", "top-right", "left", "center", "right", "bottom-left", "bottom", "bottom-right"], ns = Y(() => {
2424
+ }), xs = ["top-left", "top", "top-right", "left", "center", "right", "bottom-left", "bottom", "bottom-right"], bs = B(() => {
2302
2425
  const [o, t] = O(!1), n = (l) => {
2303
2426
  t(l);
2304
2427
  }, s = (l) => {
2305
- r.option.setAlign(l);
2306
- }, a = /* @__PURE__ */ e.jsx("div", { className: G("flex flex-wrap w-24 position-block", r.option.align), children: ss.map((l) => /* @__PURE__ */ e.jsx("div", { className: "w-8 h-8 border border-gray-200 rounded-sm hover:bg-gray-100 cursor-pointer", onClick: () => s(l) }, l)) });
2428
+ i.option.setAlign(l);
2429
+ }, a = /* @__PURE__ */ e.jsx("div", { className: Z("flex flex-wrap w-24 position-block", i.option.align), children: xs.map((l) => /* @__PURE__ */ e.jsx("div", { className: "w-8 h-8 border border-[var(--c-br)] rounded-sm hover:bg-[var(--c-wb)] cursor-pointer", onClick: () => s(l) }, l)) });
2307
2430
  return /* @__PURE__ */ e.jsx(
2308
- ge,
2431
+ xe,
2309
2432
  {
2310
2433
  content: a,
2311
2434
  trigger: "click",
2312
2435
  arrow: !1,
2313
2436
  placement: "bottomRight",
2437
+ overlayClassName: Z("shoteasy-components", i.editor.isDark && "dark-mode"),
2314
2438
  open: o,
2315
2439
  onOpenChange: n,
2316
2440
  children: /* @__PURE__ */ e.jsx(
2317
- T,
2441
+ k,
2318
2442
  {
2319
2443
  type: "text",
2320
2444
  shape: "circle",
2321
- className: G(o && "shadow-md"),
2322
- icon: /* @__PURE__ */ e.jsx(A.LayoutGrid, { size: 18 })
2445
+ className: Z(o && "shadow-md"),
2446
+ icon: /* @__PURE__ */ e.jsx(M.LayoutGrid, { size: 18 })
2323
2447
  }
2324
2448
  )
2325
2449
  }
2326
2450
  );
2327
- }), as = Y(() => {
2328
- const [o, t] = O(!1), [n, s] = O("ShotEasy"), [a, l] = O("#00000030"), [d, f] = O(45), u = (h) => {
2329
- l(typeof h == "string" ? h : h.toRgbString());
2451
+ }), ws = B(() => {
2452
+ const [o, t] = O(!1), [n, s] = O("ShotEasy"), [a, l] = O("#00000030"), [h, f] = O(45), d = (p) => {
2453
+ l(typeof p == "string" ? p : p.toRgbString());
2330
2454
  };
2331
- return M(() => {
2455
+ return N(() => {
2332
2456
  if (o && n.trim()) {
2333
- const h = zo({
2457
+ const p = Zo({
2334
2458
  text: n,
2335
2459
  color: a,
2336
- angleDegrees: d
2460
+ angleDegrees: h
2337
2461
  });
2338
- r.option.setWaterImg(h);
2462
+ i.option.setWaterImg(p);
2339
2463
  } else
2340
- r.option.setWaterImg(null);
2341
- }, [o, n, a, d]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2464
+ i.option.setWaterImg(null);
2465
+ }, [o, n, a, h]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2342
2466
  /* @__PURE__ */ e.jsxs("div", { className: "[&_label]:font-semibold [&_label]:text-sm flex gap-4 items-center justify-between", children: [
2343
2467
  /* @__PURE__ */ e.jsx("label", { children: "Watermark" }),
2344
- /* @__PURE__ */ e.jsx(st, { defaultChecked: o, onChange: t, size: "small", className: "bg-slate-200" })
2468
+ /* @__PURE__ */ e.jsx(at, { defaultChecked: o, onChange: t, size: "small", className: "bg-slate-200" })
2345
2469
  ] }),
2346
2470
  o && /* @__PURE__ */ e.jsxs("div", { className: "[&_label]:font-semibold [&_label]:text-xs grid gap-3 pl-2 pt-2", children: [
2347
- /* @__PURE__ */ e.jsx(di, { defaultValue: n, placeholder: "Watermark content", onChange: (h) => s(h.target.value) }),
2471
+ /* @__PURE__ */ e.jsx(xr, { defaultValue: n, placeholder: "Watermark content", onChange: (p) => s(p.target.value) }),
2348
2472
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
2349
2473
  /* @__PURE__ */ e.jsx("label", { children: "Color" }),
2350
- /* @__PURE__ */ e.jsx(xe, { value: a, onChange: u, size: "small" })
2474
+ /* @__PURE__ */ e.jsx(be, { value: a, onChange: d, size: "small" })
2351
2475
  ] }),
2352
2476
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
2353
2477
  /* @__PURE__ */ e.jsx("label", { children: "Direction" }),
2354
- /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs(L.Group, { defaultValue: d, onChange: (h) => f(h.target.value), size: "small", children: [
2355
- /* @__PURE__ */ e.jsx(L.Button, { value: -45, children: /* @__PURE__ */ e.jsx(A.ArrowUpRight, { size: 16, className: "mt-[3px]" }) }),
2356
- /* @__PURE__ */ e.jsx(L.Button, { value: 45, children: /* @__PURE__ */ e.jsx(A.ArrowDownRight, { size: 16, className: "mt-[3px]" }) })
2478
+ /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs(P.Group, { defaultValue: h, onChange: (p) => f(p.target.value), size: "small", children: [
2479
+ /* @__PURE__ */ e.jsx(P.Button, { value: -45, children: /* @__PURE__ */ e.jsx(M.ArrowUpRight, { size: 16, className: "mt-[3px]" }) }),
2480
+ /* @__PURE__ */ e.jsx(P.Button, { value: 45, children: /* @__PURE__ */ e.jsx(M.ArrowDownRight, { size: 16, className: "mt-[3px]" }) })
2357
2481
  ] }) })
2358
2482
  ] }),
2359
2483
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
2360
2484
  /* @__PURE__ */ e.jsx("label", { children: "Only Background" }),
2361
- /* @__PURE__ */ e.jsx(st, { size: "small", onChange: (h) => r.option.setWaterIndex(h ? -1 : 1), className: "bg-slate-200" })
2485
+ /* @__PURE__ */ e.jsx(at, { size: "small", onChange: (p) => i.option.setWaterIndex(p ? -1 : 1), className: "bg-slate-200" })
2362
2486
  ] })
2363
2487
  ] })
2364
2488
  ] });
2365
2489
  });
2366
- function ls(o, t, n) {
2367
- const s = ue(o), a = ue(t);
2368
- M(() => {
2490
+ function ys(o, t, n) {
2491
+ const s = ne(o), a = ne(t);
2492
+ N(() => {
2369
2493
  s.current = o, a.current = t;
2370
- }, [...n]), M(() => {
2371
- const l = Ct(window, {
2372
- "$mod+KeyS": (d) => {
2373
- d.preventDefault(), s.current && s.current();
2494
+ }, [...n]), N(() => {
2495
+ const l = Rt(window, {
2496
+ "$mod+KeyS": (h) => {
2497
+ h.preventDefault(), s.current && s.current();
2374
2498
  },
2375
- "$mod+KeyC": (d) => {
2376
- d.preventDefault(), a && a.current();
2499
+ "$mod+KeyC": (h) => {
2500
+ h.preventDefault(), a && a.current();
2377
2501
  }
2378
2502
  });
2379
2503
  return () => {
@@ -2381,68 +2505,68 @@ function ls(o, t, n) {
2381
2505
  };
2382
2506
  }, [window]);
2383
2507
  }
2384
- const cs = Y(() => {
2385
- var N;
2386
- const [o, t] = O(!1), [n, s] = O(!1), [a, l] = O("png"), [d, f] = O(1), u = (x) => {
2508
+ const vs = B(() => {
2509
+ var A;
2510
+ const [o, t] = O(!1), [n, s] = O(!1), [a, l] = O("png"), [h, f] = O(1), d = (x) => {
2387
2511
  s(x);
2388
- }, h = async () => {
2389
- if (!r.editor.isEditing || o) return;
2512
+ }, p = async () => {
2513
+ if (!i.editor.isEditing || o) return;
2390
2514
  const x = {
2391
- pixelRatio: d
2515
+ pixelRatio: h
2392
2516
  };
2393
2517
  ["jpg", "webp"].includes(a) && (x.quality = 0.9, x.fill = "#ffffff");
2394
- const v = he();
2395
- t(!0), r.editor.message.open({
2396
- key: v,
2518
+ const w = ge();
2519
+ t(!0), i.editor.message.open({
2520
+ key: w,
2397
2521
  type: "loading",
2398
2522
  content: "Downloading..."
2399
- }), await r.editor.app.tree.export(a, x).then((H) => {
2523
+ }), await i.editor.app.tree.export(a, x).then((S) => {
2400
2524
  let _ = "ShotEasy";
2401
- d > 1 && (_ += `@${d}`), So(H.data, `${_}.${a}`), r.editor.message.open({
2402
- key: v,
2525
+ h > 1 && (_ += `@${h}`), Bo(S.data, `${_}.${a}`), i.editor.message.open({
2526
+ key: w,
2403
2527
  type: "success",
2404
2528
  content: "Download Success!"
2405
2529
  });
2406
2530
  }).catch(() => {
2407
- r.editor.message.open({
2408
- key: v,
2531
+ i.editor.message.open({
2532
+ key: w,
2409
2533
  type: "error",
2410
2534
  content: "Download failed!"
2411
2535
  });
2412
2536
  }), t(!1);
2413
- }, g = async () => {
2414
- if (!r.editor.isEditing || o) return;
2415
- const x = he();
2416
- t(!0), r.editor.message.open({
2537
+ }, m = async () => {
2538
+ if (!i.editor.isEditing || o) return;
2539
+ const x = ge();
2540
+ t(!0), i.editor.message.open({
2417
2541
  key: x,
2418
2542
  type: "loading",
2419
2543
  content: "Copying..."
2420
- }), await r.editor.app.tree.export("png", { blob: !0, pixelRatio: d }).then(async (v) => {
2421
- const { data: H } = v;
2544
+ }), await i.editor.app.tree.export("png", { blob: !0, pixelRatio: h }).then(async (w) => {
2545
+ const { data: S } = w;
2422
2546
  await navigator.clipboard.write([
2423
2547
  new ClipboardItem({
2424
- [H.type]: H
2548
+ [S.type]: S
2425
2549
  })
2426
- ]), r.editor.message.open({
2550
+ ]), i.editor.message.open({
2427
2551
  key: x,
2428
2552
  type: "success",
2429
2553
  content: "Copy Success!"
2430
2554
  });
2431
2555
  }).catch(() => {
2432
- r.editor.message.open({
2556
+ i.editor.message.open({
2433
2557
  key: x,
2434
2558
  type: "error",
2435
2559
  content: "Copy failed!"
2436
2560
  });
2437
2561
  }), t(!1);
2438
- }, y = () => {
2439
- r.editor.clearImg();
2562
+ }, b = () => {
2563
+ i.editor.destroy(), i.editor.clearImg();
2440
2564
  };
2441
- ls(() => h(), () => g(), [h, g]);
2442
- const S = /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs("div", { className: "p-2 [&_.ant-segmented]:w-full [&_.ant-segmented-item]:w-[33%]", children: [
2565
+ ys(() => p(), () => m(), [p, m]);
2566
+ const C = /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs("div", { className: "p-2 [&_.ant-segmented]:w-full [&_.ant-segmented-item]:w-[33%]", children: [
2443
2567
  /* @__PURE__ */ e.jsx("div", { className: "text-xs text-gray-400 mb-2", children: "Format" }),
2444
2568
  /* @__PURE__ */ e.jsx(
2445
- nt,
2569
+ lt,
2446
2570
  {
2447
2571
  options: ["png", "jpg", "webp"],
2448
2572
  size: "middle",
@@ -2451,72 +2575,72 @@ const cs = Y(() => {
2451
2575
  ),
2452
2576
  /* @__PURE__ */ e.jsx("div", { className: "text-xs text-gray-400 mt-2 mb-2", children: "Pixel Ratio" }),
2453
2577
  /* @__PURE__ */ e.jsx(
2454
- nt,
2578
+ lt,
2455
2579
  {
2456
2580
  options: [{ value: 1, icon: "1x" }, { value: 2, icon: "2x" }, { value: 3, icon: "3x" }],
2457
2581
  size: "middle",
2458
2582
  onChange: f
2459
2583
  }
2460
2584
  ),
2461
- r.option.frameConf.width && /* @__PURE__ */ e.jsxs("div", { className: "text-xs p-3 mt-4 flex justify-between bg-black/5 rounded-md", children: [
2585
+ i.option.frameConf.width && /* @__PURE__ */ e.jsxs("div", { className: "text-xs p-3 mt-4 flex justify-between bg-black/5 rounded-md", children: [
2462
2586
  /* @__PURE__ */ e.jsx("span", { className: "text-gray-400", children: "Download Size" }),
2463
2587
  /* @__PURE__ */ e.jsxs("span", { className: "text-gray-700", children: [
2464
- r.option.frameConf.width * d,
2588
+ i.option.frameConf.width * h,
2465
2589
  " x ",
2466
- r.option.frameConf.height * d
2590
+ i.option.frameConf.height * h
2467
2591
  ] })
2468
2592
  ] })
2469
2593
  ] }) });
2470
2594
  return /* @__PURE__ */ e.jsxs("div", { className: "shrink-0 py-4 px-6 flex gap-2 justify-center items-center", children: [
2471
2595
  /* @__PURE__ */ e.jsx(
2472
- fi,
2596
+ Nt,
2473
2597
  {
2474
2598
  theme: {
2475
2599
  components: {
2476
2600
  Button: {
2477
- colorPrimary: "#000",
2601
+ colorPrimary: i.editor.isDark ? "#2b4acb" : "#000",
2478
2602
  algorithm: !0
2479
2603
  // 启用算法
2480
2604
  }
2481
2605
  }
2482
2606
  },
2483
2607
  children: /* @__PURE__ */ e.jsxs("div", { className: "ant-space-compact flex flex-1", children: [
2484
- /* @__PURE__ */ e.jsx(F, { placement: "top", title: /* @__PURE__ */ e.jsxs("span", { children: [
2608
+ /* @__PURE__ */ e.jsx(L, { placement: "top", title: /* @__PURE__ */ e.jsxs("span", { children: [
2485
2609
  "Download ",
2486
- ft,
2610
+ gt,
2487
2611
  " + S"
2488
2612
  ] }), children: /* @__PURE__ */ e.jsx(
2489
- T,
2613
+ k,
2490
2614
  {
2491
2615
  type: "primary",
2492
2616
  size: "large",
2493
2617
  loading: o,
2494
- icon: /* @__PURE__ */ e.jsx(A.ImageDown, { size: 18 }),
2618
+ icon: /* @__PURE__ */ e.jsx(M.ImageDown, { size: 18 }),
2495
2619
  className: "rounded-se-none flex-1 rounded-ee-none me-[-1px] hover:z-[1] border-r-white/30",
2496
- onClick: h,
2620
+ onClick: p,
2497
2621
  children: /* @__PURE__ */ e.jsxs("div", { className: "leading-4 px-2", children: [
2498
2622
  /* @__PURE__ */ e.jsx("div", { className: "text-sm leading-4 font-semibold", children: "Download" }),
2499
2623
  /* @__PURE__ */ e.jsxs("div", { className: "text-xs", children: [
2500
- d,
2624
+ h,
2501
2625
  "x as ",
2502
2626
  a.toLocaleUpperCase()
2503
2627
  ] })
2504
2628
  ] })
2505
2629
  }
2506
2630
  ) }),
2507
- /* @__PURE__ */ e.jsx(F, { placement: "top", title: /* @__PURE__ */ e.jsxs("span", { children: [
2631
+ /* @__PURE__ */ e.jsx(L, { placement: "top", title: /* @__PURE__ */ e.jsxs("span", { children: [
2508
2632
  "Copy ",
2509
- ft,
2633
+ gt,
2510
2634
  " + C"
2511
2635
  ] }), children: /* @__PURE__ */ e.jsx(
2512
- T,
2636
+ k,
2513
2637
  {
2514
2638
  type: "primary",
2515
2639
  size: "large",
2516
- icon: /* @__PURE__ */ e.jsx(A.Copy, { size: 18 }),
2640
+ icon: /* @__PURE__ */ e.jsx(M.Copy, { size: 18 }),
2517
2641
  loading: o,
2518
2642
  className: "rounded-ss-none rounded-es-none border-l-white/30",
2519
- onClick: g
2643
+ onClick: m
2520
2644
  }
2521
2645
  ) })
2522
2646
  ] })
@@ -2524,9 +2648,9 @@ const cs = Y(() => {
2524
2648
  ),
2525
2649
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1", children: [
2526
2650
  /* @__PURE__ */ e.jsx(
2527
- ge,
2651
+ xe,
2528
2652
  {
2529
- content: S,
2653
+ content: C,
2530
2654
  trigger: "click",
2531
2655
  arrow: !1,
2532
2656
  placement: "topRight",
@@ -2534,70 +2658,71 @@ const cs = Y(() => {
2534
2658
  overlayStyle: {
2535
2659
  width: "320px"
2536
2660
  },
2537
- onOpenChange: u,
2538
- children: /* @__PURE__ */ e.jsx(T, { size: "large", icon: /* @__PURE__ */ e.jsx(A.Settings2, { size: 18 }) })
2661
+ onOpenChange: d,
2662
+ children: /* @__PURE__ */ e.jsx(k, { size: "large", icon: /* @__PURE__ */ e.jsx(M.Settings2, { size: 18 }) })
2539
2663
  }
2540
2664
  ),
2541
- ((N = r.editor.img) == null ? void 0 : N.src) && /* @__PURE__ */ e.jsx(
2542
- pi,
2665
+ ((A = i.editor.img) == null ? void 0 : A.src) && /* @__PURE__ */ e.jsx(
2666
+ br,
2543
2667
  {
2544
2668
  title: "Delete the screenshot",
2545
2669
  description: "Are you sure to delete this screenshot?",
2546
- onConfirm: y,
2670
+ placement: "topRight",
2671
+ onConfirm: b,
2547
2672
  okText: "Yes",
2548
2673
  cancelText: "No",
2549
- children: /* @__PURE__ */ e.jsx(T, { size: "large", icon: /* @__PURE__ */ e.jsx(A.Trash2, { size: 18 }) })
2674
+ children: /* @__PURE__ */ e.jsx(k, { size: "large", icon: /* @__PURE__ */ e.jsx(M.Trash2, { size: 18 }) })
2550
2675
  }
2551
2676
  )
2552
2677
  ] })
2553
2678
  ] });
2554
- }), ds = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20width='22'%20height='22'%3e%3cpath%20d='M311.296%20428.544V40.96C186.368%2094.208%2087.552%20195.072%2036.864%20321.024l274.432%20274.432V428.544z'%20fill='%2337C15C'%3e%3c/path%3e%3cpath%20d='M428.544%20311.296l274.432-274.432C642.048%2012.288%20577.536%200%20512%200%20440.832%200%20372.736%2014.848%20311.296%2040.96v387.584l117.248-117.248z'%20fill='%23A9E247'%3e%3c/path%3e%3cpath%20d='M983.04%20311.296h-387.584l117.248%20117.248%20274.432%20274.432c24.576-60.416%2036.864-125.44%2036.864-190.976%200-71.168-14.848-139.264-40.96-200.704z'%20fill='%23FF7D12'%3e%3c/path%3e%3cpath%20d='M712.704%20595.456V983.04c124.928-53.248%20223.744-154.112%20274.432-280.064l-274.432-274.432v166.912z'%20fill='%23F93B21'%3e%3c/path%3e%3cpath%20d='M595.456%20712.704l-274.432%20274.432c60.928%2024.576%20125.44%2036.864%20190.976%2036.864%2071.168%200%20139.264-14.848%20200.704-40.96v-387.584l-117.248%20117.248z'%20fill='%23846FEF'%3e%3c/path%3e%3cpath%20d='M428.544%20712.704H40.96c53.248%20124.928%20154.112%20223.744%20280.064%20274.432l274.432-274.432H428.544z'%20fill='%231E95FF'%3e%3c/path%3e%3cpath%20d='M311.296%20595.456L36.864%20321.024C12.288%20381.952%200%20446.464%200%20512c0%2071.168%2014.848%20139.264%2040.96%20200.704h387.584l-117.248-117.248z'%20fill='%2314EFEF'%3e%3c/path%3e%3cpath%20d='M595.456%20311.296H983.04c-53.248-124.928-154.112-223.744-280.064-274.432L428.544%20311.296h166.912z'%20fill='%23FFC931'%3e%3c/path%3e%3c/svg%3e", wt = ["cosmic", "desktop"], pe = ({ type: o, options: t, onChange: n, value: s }) => {
2679
+ }), js = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20width='22'%20height='22'%3e%3cpath%20d='M311.296%20428.544V40.96C186.368%2094.208%2087.552%20195.072%2036.864%20321.024l274.432%20274.432V428.544z'%20fill='%2337C15C'%3e%3c/path%3e%3cpath%20d='M428.544%20311.296l274.432-274.432C642.048%2012.288%20577.536%200%20512%200%20440.832%200%20372.736%2014.848%20311.296%2040.96v387.584l117.248-117.248z'%20fill='%23A9E247'%3e%3c/path%3e%3cpath%20d='M983.04%20311.296h-387.584l117.248%20117.248%20274.432%20274.432c24.576-60.416%2036.864-125.44%2036.864-190.976%200-71.168-14.848-139.264-40.96-200.704z'%20fill='%23FF7D12'%3e%3c/path%3e%3cpath%20d='M712.704%20595.456V983.04c124.928-53.248%20223.744-154.112%20274.432-280.064l-274.432-274.432v166.912z'%20fill='%23F93B21'%3e%3c/path%3e%3cpath%20d='M595.456%20712.704l-274.432%20274.432c60.928%2024.576%20125.44%2036.864%20190.976%2036.864%2071.168%200%20139.264-14.848%20200.704-40.96v-387.584l-117.248%20117.248z'%20fill='%23846FEF'%3e%3c/path%3e%3cpath%20d='M428.544%20712.704H40.96c53.248%20124.928%20154.112%20223.744%20280.064%20274.432l274.432-274.432H428.544z'%20fill='%231E95FF'%3e%3c/path%3e%3cpath%20d='M311.296%20595.456L36.864%20321.024C12.288%20381.952%200%20446.464%200%20512c0%2071.168%2014.848%20139.264%2040.96%20200.704h387.584l-117.248-117.248z'%20fill='%2314EFEF'%3e%3c/path%3e%3cpath%20d='M595.456%20311.296H983.04c-53.248-124.928-154.112-223.744-280.064-274.432L428.544%20311.296h166.912z'%20fill='%23FFC931'%3e%3c/path%3e%3c/svg%3e", Ct = ["cosmic", "desktop"], me = ({ type: o, options: t, onChange: n, value: s }) => {
2555
2680
  let a = [];
2556
2681
  if (t && t.length)
2557
2682
  a = t;
2558
2683
  else {
2559
2684
  const l = [];
2560
- Object.keys(Q).map((d) => {
2561
- d.includes(o) && l.push({
2562
- key: d,
2563
- value: Q[d]
2685
+ Object.keys(Q).map((h) => {
2686
+ h.includes(o) && l.push({
2687
+ key: h,
2688
+ value: Q[h]
2564
2689
  });
2565
2690
  }), a = l;
2566
2691
  }
2567
2692
  return /* @__PURE__ */ e.jsx(
2568
- L.Group,
2693
+ P.Group,
2569
2694
  {
2570
2695
  onChange: (l) => n(l.target.value),
2571
2696
  value: s,
2572
- rootClassName: G(
2697
+ rootClassName: Z(
2573
2698
  "grid [&_span]:ps-0",
2574
- wt.includes(o) ? "grid-cols-5 gap-y-1.5" : "grid-cols-7 gap-y-3"
2699
+ Ct.includes(o) ? "grid-cols-5 gap-y-1.5" : "grid-cols-7 gap-y-3"
2575
2700
  ),
2576
- children: a.map((l, d) => /* @__PURE__ */ e.jsx(
2577
- L,
2701
+ children: a.map((l, h) => /* @__PURE__ */ e.jsx(
2702
+ P,
2578
2703
  {
2579
2704
  className: "[&_.ant-radio]:hidden [&_span]:p-0 mr-0",
2580
2705
  value: l.key,
2581
- children: wt.includes(o) ? /* @__PURE__ */ e.jsx("div", { className: G("w-12 h-8 rounded-md overflow-hidden"), children: /* @__PURE__ */ e.jsx("img", { src: `${l.value.class}&w=48`, className: "w-full h-full object-cover object-center" }) }) : /* @__PURE__ */ e.jsx("div", { className: G("w-8 h-8 rounded-full overflow-hidden", l.value.class) })
2706
+ children: Ct.includes(o) ? /* @__PURE__ */ e.jsx("div", { className: Z("w-12 h-8 rounded-md overflow-hidden"), children: /* @__PURE__ */ e.jsx("img", { src: `${l.value.class}&w=48`, className: "w-full h-full object-cover object-center" }) }) : /* @__PURE__ */ e.jsx("div", { className: Z("w-8 h-8 rounded-full overflow-hidden", l.value.class) })
2582
2707
  },
2583
- d
2708
+ h
2584
2709
  ))
2585
2710
  }
2586
2711
  );
2587
- }, fs = Y(({ showMore: o, onChange: t }) => {
2712
+ }, Ms = B(({ showMore: o, onChange: t }) => {
2588
2713
  const n = () => {
2589
2714
  t(!1);
2590
2715
  }, s = (l) => {
2591
- const d = l.toHexString();
2592
- r.option.frameConf.background = {
2716
+ const h = l.toHexString();
2717
+ i.option.frameConf.background = {
2593
2718
  type: "solid",
2594
- color: d
2719
+ color: h
2595
2720
  };
2596
2721
  }, a = (l) => {
2597
- r.option.setBackground(l);
2722
+ i.option.setBackground(l);
2598
2723
  };
2599
2724
  return /* @__PURE__ */ e.jsx(
2600
- ui,
2725
+ wr,
2601
2726
  {
2602
2727
  title: "",
2603
2728
  placement: "right",
@@ -2610,121 +2735,173 @@ const cs = Y(() => {
2610
2735
  className: "[&_.ant-drawer-body]:p-0",
2611
2736
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 h-full overflow-hidden", children: [
2612
2737
  /* @__PURE__ */ e.jsx("div", { className: "shrink-0 pt-4 px-4", children: /* @__PURE__ */ e.jsx(
2613
- T,
2738
+ k,
2614
2739
  {
2615
2740
  type: "text",
2616
2741
  size: "small",
2617
2742
  className: "text-xs flex items-center opacity-80 m-0",
2618
- icon: /* @__PURE__ */ e.jsx(A.ChevronLeft, { size: 16 }),
2743
+ icon: /* @__PURE__ */ e.jsx(M.ChevronRight, { size: 16 }),
2744
+ iconPosition: "end",
2619
2745
  onClick: () => t(!1),
2620
2746
  children: "Back"
2621
2747
  }
2622
2748
  ) }),
2623
2749
  /* @__PURE__ */ e.jsxs("div", { className: "h-0 flex-1 overflow-y-auto px-4 py-2", children: [
2624
2750
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-bold py-2", children: "Custom" }),
2625
- /* @__PURE__ */ e.jsx("div", { className: "py-1", children: /* @__PURE__ */ e.jsx(xe, { onChange: s, children: /* @__PURE__ */ e.jsx(T, { type: "default", size: "small", shape: "circle", icon: /* @__PURE__ */ e.jsx("img", { src: ds, width: 18 }) }) }) }),
2751
+ /* @__PURE__ */ e.jsx("div", { className: "py-1", children: /* @__PURE__ */ e.jsx(be, { onChange: s, children: /* @__PURE__ */ e.jsx(k, { type: "default", size: "small", shape: "circle", icon: /* @__PURE__ */ e.jsx("img", { src: js, width: 18 }) }) }) }),
2626
2752
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-bold py-2", children: "Solid Colors" }),
2627
- /* @__PURE__ */ e.jsx(pe, { type: "solid", onChange: a, value: r.option.background }),
2753
+ /* @__PURE__ */ e.jsx(me, { type: "solid", onChange: a, value: i.option.background }),
2628
2754
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-bold py-2", children: "Gradients" }),
2629
- /* @__PURE__ */ e.jsx(pe, { type: "gradient", onChange: a, value: r.option.background }),
2755
+ /* @__PURE__ */ e.jsx(me, { type: "gradient", onChange: a, value: i.option.background }),
2630
2756
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-bold py-2", children: "Cosmic Gradients" }),
2631
- /* @__PURE__ */ e.jsx(pe, { type: "cosmic", onChange: a, value: r.option.background }),
2757
+ /* @__PURE__ */ e.jsx(me, { type: "cosmic", onChange: a, value: i.option.background }),
2632
2758
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-bold py-2", children: "Desktop" }),
2633
- /* @__PURE__ */ e.jsx(pe, { type: "desktop", onChange: a, value: r.option.background })
2759
+ /* @__PURE__ */ e.jsx(me, { type: "desktop", onChange: a, value: i.option.background })
2634
2760
  ] })
2635
2761
  ] })
2636
2762
  }
2637
2763
  );
2638
- }), ps = Y(() => {
2764
+ }), Cs = B(() => {
2765
+ const [o, t] = O(!1), n = (s) => {
2766
+ i.option.setFrame(s.target.value);
2767
+ };
2768
+ return /* @__PURE__ */ e.jsxs("div", { className: "[&_label]:font-semibold [&_label]:text-sm", children: [
2769
+ /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-center", children: [
2770
+ /* @__PURE__ */ e.jsx("label", { children: "Frame" }),
2771
+ /* @__PURE__ */ e.jsxs(
2772
+ k,
2773
+ {
2774
+ type: "text",
2775
+ size: "small",
2776
+ className: "text-xs flex items-center opacity-80 m-0",
2777
+ disabled: !0,
2778
+ onClick: () => t(!0),
2779
+ children: [
2780
+ "More ",
2781
+ /* @__PURE__ */ e.jsx(M.ChevronRight, { size: 16 })
2782
+ ]
2783
+ }
2784
+ )
2785
+ ] }),
2786
+ /* @__PURE__ */ e.jsx("div", { className: "py-3 [&_.ant-radio-wrapper_span]:p-0 [&_.ant-radio-wrapper_span]:px-1", children: /* @__PURE__ */ e.jsxs(
2787
+ P.Group,
2788
+ {
2789
+ rootClassName: "grid grid-cols-5",
2790
+ onChange: n,
2791
+ value: i.option.frame,
2792
+ children: [
2793
+ /* @__PURE__ */ e.jsx(P, { className: "[&_.ant-radio]:hidden [&_span]:mr-0 [&_span]:block [&_span]:w-full", value: "none", children: /* @__PURE__ */ e.jsx("div", { className: "bg-gray-300/30 rounded-md h-8 overflow-hidden", children: /* @__PURE__ */ e.jsx("div", { className: "bg-slate-300/40 h-7 w-[85%] rounded-md shadow-md -mt-1 -ml-1" }) }) }),
2794
+ /* @__PURE__ */ e.jsx(P, { className: "[&_.ant-radio]:hidden [&_span]:mr-0 [&_span]:block [&_span]:w-full", value: "light", children: /* @__PURE__ */ e.jsx("div", { className: "bg-gray-300/30 rounded-md h-8 overflow-hidden", children: /* @__PURE__ */ e.jsx("div", { className: "bg-slate-300/40 border-2 border-white/80 h-7 w-[85%] rounded-md shadow-md -mt-1 -ml-1" }) }) }),
2795
+ /* @__PURE__ */ e.jsx(P, { className: "[&_.ant-radio]:hidden [&_span]:mr-0 [&_span]:block [&_span]:w-full", value: "dark", children: /* @__PURE__ */ e.jsx("div", { className: "bg-gray-300/30 rounded-md h-8 overflow-hidden", children: /* @__PURE__ */ e.jsx("div", { className: "bg-slate-300/40 border-2 border-black/40 h-7 w-[85%] rounded-md shadow-md -mt-1 -ml-1" }) }) }),
2796
+ /* @__PURE__ */ e.jsx(P, { className: "[&_.ant-radio]:hidden [&_span]:mr-0 [&_span]:block [&_span]:w-full", value: "macosBarLight", children: /* @__PURE__ */ e.jsx("div", { className: "bg-gray-300/30 rounded-md h-8 overflow-hidden", children: /* @__PURE__ */ e.jsx("div", { className: "bg-slate-300/40 h-7 w-[85%] rounded-sm shadow-md mt-2 ml-3 overflow-hidden", children: /* @__PURE__ */ e.jsx(
2797
+ "div",
2798
+ {
2799
+ className: "h-1.5 bg-white/90 px-0.5 flex items-center gap-[1px] before:block before:rounded-full before:w-0.5 before:h-0.5 before:bg-red-500 after:w-0.5 after:h-0.5 after:bg-green-500",
2800
+ children: /* @__PURE__ */ e.jsx("i", { className: "block w-0.5 h-0.5 bg-yellow-500" })
2801
+ }
2802
+ ) }) }) }),
2803
+ /* @__PURE__ */ e.jsx(P, { className: "[&_.ant-radio]:hidden [&_span]:mr-0 [&_span]:block [&_span]:w-full", value: "macosBarDark", children: /* @__PURE__ */ e.jsx("div", { className: "bg-gray-300/30 rounded-md h-8 overflow-hidden", children: /* @__PURE__ */ e.jsx("div", { className: "bg-slate-300/40 h-7 w-[85%] rounded-sm shadow-md mt-2 ml-3 overflow-hidden", children: /* @__PURE__ */ e.jsx(
2804
+ "div",
2805
+ {
2806
+ className: "h-1.5 bg-black/90 px-0.5 flex items-center gap-[1px] before:block before:rounded-full before:w-0.5 before:h-0.5 before:bg-red-500 after:w-0.5 after:h-0.5 after:bg-green-500",
2807
+ children: /* @__PURE__ */ e.jsx("i", { className: "block w-0.5 h-0.5 bg-yellow-500" })
2808
+ }
2809
+ ) }) }) })
2810
+ ]
2811
+ }
2812
+ ) })
2813
+ ] });
2814
+ }), ks = B(() => {
2639
2815
  const [o, t] = O(!1), n = (s) => {
2640
2816
  const a = s.target.value;
2641
- r.option.setBackground(a);
2817
+ i.option.setBackground(a);
2642
2818
  };
2643
- return /* @__PURE__ */ e.jsxs("div", { className: "bg-white flex flex-col md:w-[340px] border-l border-l-gray-50 shadow-lg relative z-10 select-none", children: [
2819
+ return /* @__PURE__ */ e.jsxs("div", { className: "bg-white dark:bg-black flex flex-col md:w-[340px] border-l border-l-gray-50 dark:border-l-gray-700 dark:text-gray-400 shadow-lg relative z-10 select-none", children: [
2644
2820
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1 flex-col gap-2 p-4 overflow-y-auto overflow-x-hidden", children: [
2645
- /* @__PURE__ */ e.jsx(os, {}),
2821
+ /* @__PURE__ */ e.jsx(ms, {}),
2646
2822
  /* @__PURE__ */ e.jsxs("div", { className: "[&_label]:font-semibold pt-2 [&_label]:text-sm", children: [
2647
2823
  /* @__PURE__ */ e.jsx("label", { children: "Quick" }),
2648
2824
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-4 items-center py-2", children: [
2649
- /* @__PURE__ */ e.jsx(rs, {}),
2825
+ /* @__PURE__ */ e.jsx(gs, {}),
2650
2826
  /* @__PURE__ */ e.jsx(
2651
- T,
2827
+ k,
2652
2828
  {
2653
2829
  type: "text",
2654
2830
  shape: "circle",
2655
- onClick: () => r.option.toggleFlip("x"),
2656
- icon: /* @__PURE__ */ e.jsx(A.FlipHorizontal2, { size: 18 })
2831
+ onClick: () => i.option.toggleFlip("x"),
2832
+ icon: /* @__PURE__ */ e.jsx(M.FlipHorizontal2, { size: 18 })
2657
2833
  }
2658
2834
  ),
2659
2835
  /* @__PURE__ */ e.jsx(
2660
- T,
2836
+ k,
2661
2837
  {
2662
2838
  type: "text",
2663
2839
  shape: "circle",
2664
- onClick: () => r.option.toggleFlip("y"),
2665
- icon: /* @__PURE__ */ e.jsx(A.FlipVertical2, { size: 18 })
2840
+ onClick: () => i.option.toggleFlip("y"),
2841
+ icon: /* @__PURE__ */ e.jsx(M.FlipVertical2, { size: 18 })
2666
2842
  }
2667
2843
  ),
2668
- /* @__PURE__ */ e.jsx(ns, {})
2844
+ /* @__PURE__ */ e.jsx(bs, {})
2669
2845
  ] })
2670
2846
  ] }),
2671
2847
  /* @__PURE__ */ e.jsxs("div", { className: "[&_label]:font-semibold [&_label]:text-sm", children: [
2672
2848
  /* @__PURE__ */ e.jsx("label", { children: "Scale" }),
2673
2849
  /* @__PURE__ */ e.jsx(
2674
- de,
2850
+ pe,
2675
2851
  {
2676
2852
  min: 0.1,
2677
2853
  max: 2,
2678
2854
  step: 0.1,
2679
- onChange: (s) => r.option.setScale(s),
2680
- value: typeof r.option.scale == "number" ? r.option.scale : 1
2855
+ onChange: (s) => i.option.setScale(s),
2856
+ value: typeof i.option.scale == "number" ? i.option.scale : 1
2681
2857
  }
2682
2858
  )
2683
2859
  ] }),
2684
2860
  /* @__PURE__ */ e.jsxs("div", { className: "[&_label]:font-semibold [&_label]:text-sm", children: [
2685
2861
  /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between", children: [
2686
2862
  /* @__PURE__ */ e.jsx("label", { children: "Padding" }),
2687
- /* @__PURE__ */ e.jsx(xe, { value: r.option.paddingBg, onChange: (s) => r.option.setPaddingBg(s.toRgbString()), size: "small" })
2863
+ /* @__PURE__ */ e.jsx(be, { value: i.option.paddingBg, onChange: (s) => i.option.setPaddingBg(s.toRgbString()), size: "small" })
2688
2864
  ] }),
2689
2865
  /* @__PURE__ */ e.jsx(
2690
- de,
2866
+ pe,
2691
2867
  {
2692
2868
  min: 0,
2693
2869
  max: 60,
2694
- onChange: (s) => r.option.setPadding(s),
2695
- value: typeof r.option.padding == "number" ? r.option.padding : 0
2870
+ onChange: (s) => i.option.setPadding(s),
2871
+ value: typeof i.option.padding == "number" ? i.option.padding : 0
2696
2872
  }
2697
2873
  )
2698
2874
  ] }),
2699
2875
  /* @__PURE__ */ e.jsxs("div", { className: "[&_label]:font-semibold [&_label]:text-sm", children: [
2700
2876
  /* @__PURE__ */ e.jsx("label", { children: "Rounded" }),
2701
2877
  /* @__PURE__ */ e.jsx(
2702
- de,
2878
+ pe,
2703
2879
  {
2704
2880
  min: 0,
2705
2881
  max: 20,
2706
- onChange: (s) => r.option.setRound(s),
2707
- value: typeof r.option.round == "number" ? r.option.round : 0
2882
+ onChange: (s) => i.option.setRound(s),
2883
+ value: typeof i.option.round == "number" ? i.option.round : 0
2708
2884
  }
2709
2885
  )
2710
2886
  ] }),
2711
2887
  /* @__PURE__ */ e.jsxs("div", { className: "[&_label]:font-semibold [&_label]:text-sm", children: [
2712
2888
  /* @__PURE__ */ e.jsx("label", { children: "Shadow" }),
2713
2889
  /* @__PURE__ */ e.jsx(
2714
- de,
2890
+ pe,
2715
2891
  {
2716
2892
  min: 0,
2717
2893
  max: 6,
2718
- onChange: (s) => r.option.setShadow(s),
2719
- value: typeof r.option.shadow == "number" ? r.option.shadow : 0
2894
+ onChange: (s) => i.option.setShadow(s),
2895
+ value: typeof i.option.shadow == "number" ? i.option.shadow : 0
2720
2896
  }
2721
2897
  )
2722
2898
  ] }),
2899
+ /* @__PURE__ */ e.jsx(Cs, {}),
2723
2900
  /* @__PURE__ */ e.jsxs("div", { className: "[&_label]:font-semibold [&_label]:text-sm", children: [
2724
2901
  /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-center", children: [
2725
2902
  /* @__PURE__ */ e.jsx("label", { children: "Background" }),
2726
2903
  /* @__PURE__ */ e.jsxs(
2727
- T,
2904
+ k,
2728
2905
  {
2729
2906
  type: "text",
2730
2907
  size: "small",
@@ -2732,48 +2909,60 @@ const cs = Y(() => {
2732
2909
  onClick: () => t(!0),
2733
2910
  children: [
2734
2911
  "More ",
2735
- /* @__PURE__ */ e.jsx(A.ChevronRight, { size: 16 })
2912
+ /* @__PURE__ */ e.jsx(M.ChevronRight, { size: 16 })
2736
2913
  ]
2737
2914
  }
2738
2915
  )
2739
2916
  ] }),
2740
2917
  /* @__PURE__ */ e.jsx("div", { className: "py-3", children: /* @__PURE__ */ e.jsxs(
2741
- L.Group,
2918
+ P.Group,
2742
2919
  {
2743
2920
  onChange: n,
2744
- value: r.option.background,
2921
+ value: i.option.background,
2745
2922
  rootClassName: "grid grid-cols-7 [&_span]:ps-0",
2746
2923
  children: [
2747
- /* @__PURE__ */ e.jsx(L, { className: "[&_.ant-radio]:hidden [&_span]:p-0 mr-0", value: "default_1", children: /* @__PURE__ */ e.jsx("div", { className: G("w-8 h-8 rounded-full", Q.default_1.class) }) }),
2924
+ /* @__PURE__ */ e.jsx(P, { className: "[&_.ant-radio]:hidden [&_span]:p-0 mr-0", value: "default_1", children: /* @__PURE__ */ e.jsx("div", { className: Z("w-8 h-8 rounded-full", Q.default_1.class) }) }),
2748
2925
  Object.keys(Q).map((s) => {
2749
- if (s.includes("default") && s !== "default_1") return /* @__PURE__ */ e.jsx(L, { className: "[&_.ant-radio]:hidden [&_span]:p-0 mr-0", value: s, children: /* @__PURE__ */ e.jsx("div", { className: G("w-8 h-8 rounded-full", Q[s].class) }) }, s);
2926
+ if (s.includes("default") && s !== "default_1") return /* @__PURE__ */ e.jsx(P, { className: "[&_.ant-radio]:hidden [&_span]:p-0 mr-0", value: s, children: /* @__PURE__ */ e.jsx("div", { className: Z("w-8 h-8 rounded-full", Q[s].class) }) }, s);
2750
2927
  })
2751
2928
  ]
2752
2929
  }
2753
2930
  ) })
2754
2931
  ] }),
2755
- /* @__PURE__ */ e.jsx(as, {})
2932
+ /* @__PURE__ */ e.jsx(ws, {})
2756
2933
  ] }),
2757
- /* @__PURE__ */ e.jsx(cs, {}),
2758
- /* @__PURE__ */ e.jsx(fs, { showMore: o, onChange: t })
2934
+ /* @__PURE__ */ e.jsx(vs, {}),
2935
+ /* @__PURE__ */ e.jsx(Ms, { showMore: o, onChange: t })
2759
2936
  ] });
2760
- }), us = (o, t = []) => {
2761
- M(() => {
2937
+ }), As = (o, t = []) => {
2938
+ N(() => {
2762
2939
  const n = async (s) => {
2763
2940
  const a = s.clipboardData;
2764
2941
  if (!a || !a.items) return;
2765
2942
  const l = Array.from(a.items).filter(
2766
- (f) => At.includes(f.type)
2943
+ (f) => Dt.includes(f.type)
2767
2944
  );
2768
2945
  if (!l.length) return;
2769
- const d = l[0].getAsFile();
2770
- o && o(d);
2946
+ const h = l[0].getAsFile();
2947
+ o && o(h);
2771
2948
  };
2772
2949
  return document.addEventListener("paste", n, !1), () => {
2773
2950
  document.removeEventListener("paste", n);
2774
2951
  };
2775
2952
  }, [...t]);
2776
- }, hs = async () => {
2953
+ }, Ot = (o) => async (n, s = "blob") => {
2954
+ const a = window.URL || window.webkitURL || window, l = s === "blob" ? a.createObjectURL(n) : n, h = await Io(l), f = Math.round(h.width), d = Math.round(h.height);
2955
+ if (o.editor.setImg({
2956
+ src: l,
2957
+ width: f,
2958
+ height: d,
2959
+ type: s === "blob" ? n.type : "image/png",
2960
+ name: s === "blob" ? n.name : "ShotEasy.png"
2961
+ }), o.option.size.type === "auto") {
2962
+ const p = we(f, d);
2963
+ o.option.setFrameSize(f + p, d + p);
2964
+ }
2965
+ }, Ns = async () => {
2777
2966
  try {
2778
2967
  const o = await navigator.mediaDevices.getDisplayMedia(), t = document.createElement("video");
2779
2968
  t.srcObject = o, t.play(), await new Promise((l) => t.onplaying = l);
@@ -2784,38 +2973,26 @@ const cs = Y(() => {
2784
2973
  } catch (o) {
2785
2974
  console.log("Error capturing screen:", o);
2786
2975
  }
2787
- }, { Dragger: ms } = hi, gs = Y(() => {
2788
- const o = async (a, l = "blob") => {
2789
- const d = window.URL || window.webkitURL || window, f = l === "blob" ? d.createObjectURL(a) : a, u = await Ro(f), h = Math.round(u.width), g = Math.round(u.height);
2790
- if (r.editor.setImg({
2791
- src: f,
2792
- width: h,
2793
- height: g,
2794
- type: l === "blob" ? a.type : "image/png",
2795
- name: l === "blob" ? a.name : "ShotEasy.png"
2796
- }), r.option.size.type === "auto") {
2797
- const y = Math.round(h * 0.2);
2798
- r.option.setFrameSize(h + y, g + y);
2799
- }
2800
- }, t = async (a) => (await o(a), Promise.reject()), n = async () => {
2801
- const a = await hs();
2976
+ }, { Dragger: Ts } = yr, Ss = B(() => {
2977
+ const o = Ot(i), t = async (a) => (await o(a), Promise.reject()), n = async () => {
2978
+ const a = await Ns();
2802
2979
  a && o(a, "dataURL");
2803
2980
  }, s = () => {
2804
- r.editor.message.info("Developing, Coming soon!");
2981
+ i.editor.message.info("Developing, Coming soon!");
2805
2982
  };
2806
- return us((a) => {
2983
+ return As((a) => {
2807
2984
  o(a);
2808
- }), /* @__PURE__ */ e.jsx("div", { className: "md:w-0 md:flex-1 flex flex-col justify-center items-center overflow-hidden select-none relative", children: /* @__PURE__ */ e.jsxs("div", { className: G("max-w-[600px]", r.editor.invalid && "invalid"), children: [
2985
+ }), /* @__PURE__ */ e.jsx("div", { className: "md:w-0 md:flex-1 flex flex-col justify-center items-center overflow-hidden select-none relative", children: /* @__PURE__ */ e.jsxs("div", { className: Z("max-w-[600px]", i.editor.invalid && "invalid"), children: [
2809
2986
  /* @__PURE__ */ e.jsx(
2810
- ms,
2987
+ Ts,
2811
2988
  {
2812
- accept: At.join(","),
2989
+ accept: Dt.join(","),
2813
2990
  name: "file",
2814
2991
  showUploadList: !1,
2815
2992
  beforeUpload: t,
2816
- rootClassName: "p-4 rounded-md bg-white block shadow-sm",
2993
+ rootClassName: "p-4 rounded-md bg-white dark:bg-black dark:text-gray-400 block shadow-sm",
2817
2994
  children: /* @__PURE__ */ e.jsxs("div", { className: "text-center p-10", children: [
2818
- /* @__PURE__ */ e.jsx("p", { className: "text-2xl my-2 opacity-60", children: /* @__PURE__ */ e.jsx(A.ImagePlus, { className: "mx-auto", size: 36 }) }),
2995
+ /* @__PURE__ */ e.jsx("p", { className: "text-2xl my-2 opacity-60", children: /* @__PURE__ */ e.jsx(M.ImagePlus, { className: "mx-auto", size: 36 }) }),
2819
2996
  /* @__PURE__ */ e.jsxs("p", { className: "text-sm px-4", children: [
2820
2997
  "Click or Drag image to this area",
2821
2998
  /* @__PURE__ */ e.jsx("br", {}),
@@ -2824,29 +3001,40 @@ const cs = Y(() => {
2824
3001
  ] })
2825
3002
  }
2826
3003
  ),
2827
- /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between mt-4 py-4 px-6 rounded-md bg-white shadow-sm", children: [
2828
- /* @__PURE__ */ e.jsx(F, { placement: "top", arrow: !1, title: "Take a screenshot of desktop windows", children: /* @__PURE__ */ e.jsx(T, { shape: "round", type: "default", size: "large", icon: /* @__PURE__ */ e.jsx(A.Camera, { size: 20 }), onClick: n }) }),
2829
- /* @__PURE__ */ e.jsx(F, { placement: "top", arrow: !1, title: "Beautify text", children: /* @__PURE__ */ e.jsx(T, { shape: "round", type: "default", size: "large", icon: /* @__PURE__ */ e.jsx(A.Type, { size: 20 }), onClick: s }) }),
2830
- /* @__PURE__ */ e.jsx(F, { placement: "top", arrow: !1, title: "Beautify Code", children: /* @__PURE__ */ e.jsx(T, { shape: "round", type: "default", size: "large", icon: /* @__PURE__ */ e.jsx(A.CodeXml, { size: 20, onClick: s }) }) }),
2831
- /* @__PURE__ */ e.jsx(F, { placement: "top", arrow: !1, title: "Create gif animate", children: /* @__PURE__ */ e.jsx(T, { shape: "round", type: "default", size: "large", icon: /* @__PURE__ */ e.jsx(A.ImagePlay, { size: 20, onClick: s }) }) })
3004
+ /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between mt-2 py-4 px-6 rounded-md bg-white dark:bg-black shadow-sm", children: [
3005
+ /* @__PURE__ */ e.jsx(L, { placement: "top", arrow: !1, title: "Take a screenshot of desktop windows", children: /* @__PURE__ */ e.jsx(k, { shape: "round", type: "default", size: "large", icon: /* @__PURE__ */ e.jsx(M.Camera, { size: 20 }), onClick: n }) }),
3006
+ /* @__PURE__ */ e.jsx(L, { placement: "top", arrow: !1, title: "Beautify text", children: /* @__PURE__ */ e.jsx(k, { shape: "round", type: "default", size: "large", icon: /* @__PURE__ */ e.jsx(M.Type, { size: 20 }), onClick: s }) }),
3007
+ /* @__PURE__ */ e.jsx(L, { placement: "top", arrow: !1, title: "Beautify Code", children: /* @__PURE__ */ e.jsx(k, { shape: "round", type: "default", size: "large", icon: /* @__PURE__ */ e.jsx(M.CodeXml, { size: 20, onClick: s }) }) }),
3008
+ /* @__PURE__ */ e.jsx(L, { placement: "top", arrow: !1, title: "Create gif animate", children: /* @__PURE__ */ e.jsx(k, { shape: "round", type: "default", size: "large", icon: /* @__PURE__ */ e.jsx(M.ImagePlay, { size: 20, onClick: s }) }) })
2832
3009
  ] })
2833
3010
  ] }) });
2834
- }), Ys = Y(() => {
2835
- var s;
2836
- const o = (s = r.editor.img) != null && s.src ? /* @__PURE__ */ e.jsx(es, {}) : /* @__PURE__ */ e.jsx(gs, {}), [t, n] = mi.useMessage();
2837
- return M(() => {
2838
- r.editor.setMessage(t);
2839
- }, [t]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2840
- n,
2841
- /* @__PURE__ */ e.jsxs("div", { className: "polka flex flex-col overflow-hidden antialiased w-full h-[100vh]", children: [
2842
- /* @__PURE__ */ e.jsx(Zo, {}),
2843
- /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col flex-1 h-0 md:flex-row md:items-stretch", children: [
2844
- o,
2845
- /* @__PURE__ */ e.jsx(ps, {})
2846
- ] })
2847
- ] })
2848
- ] });
3011
+ }), $s = B(({ defaultImg: o, headLeft: t, headRight: n, isDark: s, boxClassName: a = "" }) => {
3012
+ var p;
3013
+ const l = Ot(i), h = (p = i.editor.img) != null && p.src ? /* @__PURE__ */ e.jsx(hs, {}) : /* @__PURE__ */ e.jsx(Ss, {}), [f, d] = vr.useMessage();
3014
+ return i.editor.setMessage(f), le(() => {
3015
+ const m = s || localStorage.getItem("SHOTEASY_BEAUTIFIER_THEME") === "dark" ? "dark" : "light";
3016
+ i.editor.setTheme(m);
3017
+ }, [s]), N(() => {
3018
+ o && l(o, "dataURL");
3019
+ }, [o]), /* @__PURE__ */ e.jsx(To, { children: /* @__PURE__ */ e.jsxs(
3020
+ Nt,
3021
+ {
3022
+ theme: {
3023
+ algorithm: i.editor.isDark ? ct.darkAlgorithm : ct.defaultAlgorithm
3024
+ },
3025
+ children: [
3026
+ d,
3027
+ /* @__PURE__ */ e.jsxs("div", { id: "shoteasy-container", className: Z("polka flex flex-col overflow-hidden antialiased w-full h-[100vh] dark:bg-black", a), "data-mode": i.editor.isDark ? "dark" : "light", children: [
3028
+ /* @__PURE__ */ e.jsx($o, { headLeft: t, headRight: n }),
3029
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col flex-1 h-0 md:flex-row md:items-stretch", children: [
3030
+ h,
3031
+ /* @__PURE__ */ e.jsx(ks, {})
3032
+ ] })
3033
+ ] })
3034
+ ]
3035
+ }
3036
+ ) });
2849
3037
  });
2850
3038
  export {
2851
- Ys as ImageBeautifier
3039
+ $s as ImageBeautifier
2852
3040
  };