@carandesign/drawui 0.2.1 → 0.2.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.
package/dist/drawui.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import st, { createContext as nt, useContext as rt, useRef as E, useState as Q, useEffect as C } from "react";
1
+ import st, { createContext as nt, useContext as rt, useRef as O, useState as Q, useEffect as R } from "react";
2
2
  var ce = { exports: {} }, B = {};
3
3
  var je;
4
4
  function ot() {
@@ -6,16 +6,16 @@ function ot() {
6
6
  je = 1;
7
7
  var o = /* @__PURE__ */ Symbol.for("react.transitional.element"), e = /* @__PURE__ */ Symbol.for("react.fragment");
8
8
  function s(t, n, r) {
9
- var i = null;
10
- if (r !== void 0 && (i = "" + r), n.key !== void 0 && (i = "" + n.key), "key" in n) {
9
+ var a = null;
10
+ if (r !== void 0 && (a = "" + r), n.key !== void 0 && (a = "" + n.key), "key" in n) {
11
11
  r = {};
12
- for (var a in n)
13
- a !== "key" && (r[a] = n[a]);
12
+ for (var i in n)
13
+ i !== "key" && (r[i] = n[i]);
14
14
  } else r = n;
15
15
  return n = r.ref, {
16
16
  $$typeof: o,
17
17
  type: t,
18
- key: i,
18
+ key: a,
19
19
  ref: n !== void 0 ? n : null,
20
20
  props: r
21
21
  };
@@ -24,7 +24,7 @@ function ot() {
24
24
  }
25
25
  var Z = {};
26
26
  var $e;
27
- function at() {
27
+ function it() {
28
28
  return $e || ($e = 1, process.env.NODE_ENV !== "production" && (function() {
29
29
  function o(p) {
30
30
  if (p == null) return null;
@@ -32,7 +32,7 @@ function at() {
32
32
  return p.$$typeof === re ? null : p.displayName || p.name || null;
33
33
  if (typeof p == "string") return p;
34
34
  switch (p) {
35
- case b:
35
+ case k:
36
36
  return "Fragment";
37
37
  case y:
38
38
  return "Profiler";
@@ -51,19 +51,19 @@ function at() {
51
51
  ), p.$$typeof) {
52
52
  case m:
53
53
  return "Portal";
54
- case F:
54
+ case H:
55
55
  return p.displayName || "Context";
56
- case N:
56
+ case D:
57
57
  return (p._context.displayName || "Context") + ".Consumer";
58
- case H:
59
- var M = p.render;
60
- return p = p.displayName, p || (p = M.displayName || M.name || "", p = p !== "" ? "ForwardRef(" + p + ")" : "ForwardRef"), p;
58
+ case F:
59
+ var w = p.render;
60
+ return p = p.displayName, p || (p = w.displayName || w.name || "", p = p !== "" ? "ForwardRef(" + p + ")" : "ForwardRef"), p;
61
61
  case se:
62
- return M = p.displayName || null, M !== null ? M : o(p.type) || "Memo";
62
+ return w = p.displayName || null, w !== null ? w : o(p.type) || "Memo";
63
63
  case $:
64
- M = p._payload, p = p._init;
64
+ w = p._payload, p = p._init;
65
65
  try {
66
- return o(p(M));
66
+ return o(p(w));
67
67
  } catch {
68
68
  }
69
69
  }
@@ -75,27 +75,27 @@ function at() {
75
75
  function s(p) {
76
76
  try {
77
77
  e(p);
78
- var M = !1;
78
+ var w = !1;
79
79
  } catch {
80
- M = !0;
80
+ w = !0;
81
81
  }
82
- if (M) {
83
- M = console;
84
- var _ = M.error, P = typeof Symbol == "function" && Symbol.toStringTag && p[Symbol.toStringTag] || p.constructor.name || "Object";
82
+ if (w) {
83
+ w = console;
84
+ var _ = w.error, P = typeof Symbol == "function" && Symbol.toStringTag && p[Symbol.toStringTag] || p.constructor.name || "Object";
85
85
  return _.call(
86
- M,
86
+ w,
87
87
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
88
88
  P
89
89
  ), e(p);
90
90
  }
91
91
  }
92
92
  function t(p) {
93
- if (p === b) return "<>";
93
+ if (p === k) return "<>";
94
94
  if (typeof p == "object" && p !== null && p.$$typeof === $)
95
95
  return "<...>";
96
96
  try {
97
- var M = o(p);
98
- return M ? "<" + M + ">" : "<...>";
97
+ var w = o(p);
98
+ return w ? "<" + w + ">" : "<...>";
99
99
  } catch {
100
100
  return "<...>";
101
101
  }
@@ -107,18 +107,18 @@ function at() {
107
107
  function r() {
108
108
  return Error("react-stack-top-frame");
109
109
  }
110
- function i(p) {
110
+ function a(p) {
111
111
  if (S.call(p, "key")) {
112
- var M = Object.getOwnPropertyDescriptor(p, "key").get;
113
- if (M && M.isReactWarning) return !1;
112
+ var w = Object.getOwnPropertyDescriptor(p, "key").get;
113
+ if (w && w.isReactWarning) return !1;
114
114
  }
115
115
  return p.key !== void 0;
116
116
  }
117
- function a(p, M) {
117
+ function i(p, w) {
118
118
  function _() {
119
- D || (D = !0, console.error(
119
+ z || (z = !0, console.error(
120
120
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
121
- M
121
+ w
122
122
  ));
123
123
  }
124
124
  _.isReactWarning = !0, Object.defineProperty(p, "key", {
@@ -132,12 +132,12 @@ function at() {
132
132
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
133
133
  )), p = this.props.ref, p !== void 0 ? p : null;
134
134
  }
135
- function u(p, M, _, P, ie, we) {
135
+ function u(p, w, _, P, ae, Me) {
136
136
  var T = _.ref;
137
137
  return p = {
138
138
  $$typeof: g,
139
139
  type: p,
140
- key: M,
140
+ key: w,
141
141
  props: _,
142
142
  _owner: P
143
143
  }, (T !== void 0 ? T : null) !== null ? Object.defineProperty(p, "ref", {
@@ -157,16 +157,16 @@ function at() {
157
157
  configurable: !1,
158
158
  enumerable: !1,
159
159
  writable: !0,
160
- value: ie
160
+ value: ae
161
161
  }), Object.defineProperty(p, "_debugTask", {
162
162
  configurable: !1,
163
163
  enumerable: !1,
164
164
  writable: !0,
165
- value: we
165
+ value: Me
166
166
  }), Object.freeze && (Object.freeze(p.props), Object.freeze(p)), p;
167
167
  }
168
- function l(p, M, _, P, ie, we) {
169
- var T = M.children;
168
+ function l(p, w, _, P, ae, Me) {
169
+ var T = w.children;
170
170
  if (T !== void 0)
171
171
  if (P)
172
172
  if (j(T)) {
@@ -178,9 +178,9 @@ function at() {
178
178
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
179
179
  );
180
180
  else h(T);
181
- if (S.call(M, "key")) {
181
+ if (S.call(w, "key")) {
182
182
  T = o(p);
183
- var G = Object.keys(M).filter(function(tt) {
183
+ var G = Object.keys(w).filter(function(tt) {
184
184
  return tt !== "key";
185
185
  });
186
186
  P = 0 < G.length ? "{key: someKey, " + G.join(": ..., ") + ": ...}" : "{key: someKey}", Y[T + P] || (G = 0 < G.length ? "{" + G.join(": ..., ") + ": ...}" : "{}", console.error(
@@ -196,12 +196,12 @@ React keys must be passed directly to JSX without using spread:
196
196
  T
197
197
  ), Y[T + P] = !0);
198
198
  }
199
- if (T = null, _ !== void 0 && (s(_), T = "" + _), i(M) && (s(M.key), T = "" + M.key), "key" in M) {
199
+ if (T = null, _ !== void 0 && (s(_), T = "" + _), a(w) && (s(w.key), T = "" + w.key), "key" in w) {
200
200
  _ = {};
201
- for (var ye in M)
202
- ye !== "key" && (_[ye] = M[ye]);
203
- } else _ = M;
204
- return T && a(
201
+ for (var ye in w)
202
+ ye !== "key" && (_[ye] = w[ye]);
203
+ } else _ = w;
204
+ return T && i(
205
205
  _,
206
206
  typeof p == "function" ? p.displayName || p.name || "Unknown" : p
207
207
  ), u(
@@ -209,8 +209,8 @@ React keys must be passed directly to JSX without using spread:
209
209
  T,
210
210
  _,
211
211
  n(),
212
- ie,
213
- we
212
+ ae,
213
+ Me
214
214
  );
215
215
  }
216
216
  function h(p) {
@@ -219,7 +219,7 @@ React keys must be passed directly to JSX without using spread:
219
219
  function f(p) {
220
220
  return typeof p == "object" && p !== null && p.$$typeof === g;
221
221
  }
222
- var d = st, g = /* @__PURE__ */ Symbol.for("react.transitional.element"), m = /* @__PURE__ */ Symbol.for("react.portal"), b = /* @__PURE__ */ Symbol.for("react.fragment"), v = /* @__PURE__ */ Symbol.for("react.strict_mode"), y = /* @__PURE__ */ Symbol.for("react.profiler"), N = /* @__PURE__ */ Symbol.for("react.consumer"), F = /* @__PURE__ */ Symbol.for("react.context"), H = /* @__PURE__ */ Symbol.for("react.forward_ref"), ee = /* @__PURE__ */ Symbol.for("react.suspense"), te = /* @__PURE__ */ Symbol.for("react.suspense_list"), se = /* @__PURE__ */ Symbol.for("react.memo"), $ = /* @__PURE__ */ Symbol.for("react.lazy"), ne = /* @__PURE__ */ Symbol.for("react.activity"), re = /* @__PURE__ */ Symbol.for("react.client.reference"), x = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, S = Object.prototype.hasOwnProperty, j = Array.isArray, z = console.createTask ? console.createTask : function() {
222
+ var d = st, g = /* @__PURE__ */ Symbol.for("react.transitional.element"), m = /* @__PURE__ */ Symbol.for("react.portal"), k = /* @__PURE__ */ Symbol.for("react.fragment"), v = /* @__PURE__ */ Symbol.for("react.strict_mode"), y = /* @__PURE__ */ Symbol.for("react.profiler"), D = /* @__PURE__ */ Symbol.for("react.consumer"), H = /* @__PURE__ */ Symbol.for("react.context"), F = /* @__PURE__ */ Symbol.for("react.forward_ref"), ee = /* @__PURE__ */ Symbol.for("react.suspense"), te = /* @__PURE__ */ Symbol.for("react.suspense_list"), se = /* @__PURE__ */ Symbol.for("react.memo"), $ = /* @__PURE__ */ Symbol.for("react.lazy"), ne = /* @__PURE__ */ Symbol.for("react.activity"), re = /* @__PURE__ */ Symbol.for("react.client.reference"), x = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, S = Object.prototype.hasOwnProperty, j = Array.isArray, I = console.createTask ? console.createTask : function() {
223
223
  return null;
224
224
  };
225
225
  d = {
@@ -227,44 +227,44 @@ React keys must be passed directly to JSX without using spread:
227
227
  return p();
228
228
  }
229
229
  };
230
- var D, q = {}, oe = d.react_stack_bottom_frame.bind(
230
+ var z, q = {}, oe = d.react_stack_bottom_frame.bind(
231
231
  d,
232
232
  r
233
- )(), ae = z(t(r)), Y = {};
234
- Z.Fragment = b, Z.jsx = function(p, M, _) {
233
+ )(), ie = I(t(r)), Y = {};
234
+ Z.Fragment = k, Z.jsx = function(p, w, _) {
235
235
  var P = 1e4 > x.recentlyCreatedOwnerStacks++;
236
236
  return l(
237
237
  p,
238
- M,
238
+ w,
239
239
  _,
240
240
  !1,
241
241
  P ? Error("react-stack-top-frame") : oe,
242
- P ? z(t(p)) : ae
242
+ P ? I(t(p)) : ie
243
243
  );
244
- }, Z.jsxs = function(p, M, _) {
244
+ }, Z.jsxs = function(p, w, _) {
245
245
  var P = 1e4 > x.recentlyCreatedOwnerStacks++;
246
246
  return l(
247
247
  p,
248
- M,
248
+ w,
249
249
  _,
250
250
  !0,
251
251
  P ? Error("react-stack-top-frame") : oe,
252
- P ? z(t(p)) : ae
252
+ P ? I(t(p)) : ie
253
253
  );
254
254
  };
255
255
  })()), Z;
256
256
  }
257
257
  var De;
258
- function it() {
259
- return De || (De = 1, process.env.NODE_ENV === "production" ? ce.exports = ot() : ce.exports = at()), ce.exports;
258
+ function at() {
259
+ return De || (De = 1, process.env.NODE_ENV === "production" ? ce.exports = ot() : ce.exports = it()), ce.exports;
260
260
  }
261
- var w = it();
261
+ var M = at();
262
262
  function Te(o, e, s) {
263
263
  if (o && o.length) {
264
- const [t, n] = e, r = Math.PI / 180 * s, i = Math.cos(r), a = Math.sin(r);
264
+ const [t, n] = e, r = Math.PI / 180 * s, a = Math.cos(r), i = Math.sin(r);
265
265
  for (const c of o) {
266
266
  const [u, l] = c;
267
- c[0] = (u - t) * i - (l - n) * a + t, c[1] = (u - t) * a + (l - n) * i + n;
267
+ c[0] = (u - t) * a - (l - n) * i + t, c[1] = (u - t) * i + (l - n) * a + n;
268
268
  }
269
269
  }
270
270
  }
@@ -276,15 +276,15 @@ function lt(o, e) {
276
276
  return o[0] === e[0] && o[1] === e[1];
277
277
  }
278
278
  function ut(o, e, s, t = 1) {
279
- const n = s, r = Math.max(e, 0.1), i = o[0] && o[0][0] && typeof o[0][0] == "number" ? [o] : o, a = [0, 0];
279
+ const n = s, r = Math.max(e, 0.1), a = o[0] && o[0][0] && typeof o[0][0] == "number" ? [o] : o, i = [0, 0];
280
280
  if (n)
281
- for (const u of i)
282
- Te(u, a, n);
283
- const c = ht(i, r, t);
281
+ for (const u of a)
282
+ Te(u, i, n);
283
+ const c = ht(a, r, t);
284
284
  if (n) {
285
- for (const u of i)
286
- Te(u, a, -n);
287
- ct(c, a, -n);
285
+ for (const u of a)
286
+ Te(u, i, -n);
287
+ ct(c, i, -n);
288
288
  }
289
289
  return c;
290
290
  }
@@ -312,28 +312,28 @@ function ht(o, e, s) {
312
312
  }
313
313
  if (r.sort((u, l) => u.ymin < l.ymin ? -1 : u.ymin > l.ymin ? 1 : u.x < l.x ? -1 : u.x > l.x ? 1 : u.ymax === l.ymax ? 0 : (u.ymax - l.ymax) / Math.abs(u.ymax - l.ymax)), !r.length)
314
314
  return n;
315
- let i = [], a = r[0].ymin, c = 0;
316
- for (; i.length || r.length; ) {
315
+ let a = [], i = r[0].ymin, c = 0;
316
+ for (; a.length || r.length; ) {
317
317
  if (r.length) {
318
318
  let u = -1;
319
- for (let h = 0; h < r.length && !(r[h].ymin > a); h++)
319
+ for (let h = 0; h < r.length && !(r[h].ymin > i); h++)
320
320
  u = h;
321
321
  r.splice(0, u + 1).forEach((h) => {
322
- i.push({ s: a, edge: h });
322
+ a.push({ s: i, edge: h });
323
323
  });
324
324
  }
325
- if (i = i.filter((u) => !(u.edge.ymax <= a)), i.sort((u, l) => u.edge.x === l.edge.x ? 0 : (u.edge.x - l.edge.x) / Math.abs(u.edge.x - l.edge.x)), (s !== 1 || c % e === 0) && i.length > 1)
326
- for (let u = 0; u < i.length; u = u + 2) {
325
+ if (a = a.filter((u) => !(u.edge.ymax <= i)), a.sort((u, l) => u.edge.x === l.edge.x ? 0 : (u.edge.x - l.edge.x) / Math.abs(u.edge.x - l.edge.x)), (s !== 1 || c % e === 0) && a.length > 1)
326
+ for (let u = 0; u < a.length; u = u + 2) {
327
327
  const l = u + 1;
328
- if (l >= i.length)
328
+ if (l >= a.length)
329
329
  break;
330
- const h = i[u].edge, f = i[l].edge;
330
+ const h = a[u].edge, f = a[l].edge;
331
331
  n.push([
332
- [Math.round(h.x), a],
333
- [Math.round(f.x), a]
332
+ [Math.round(h.x), i],
333
+ [Math.round(f.x), i]
334
334
  ]);
335
335
  }
336
- a += s, i.forEach((u) => {
336
+ i += s, a.forEach((u) => {
337
337
  u.edge.x = u.edge.x + s * u.edge.islope;
338
338
  }), c++;
339
339
  }
@@ -365,7 +365,7 @@ class Le {
365
365
  return t;
366
366
  }
367
367
  }
368
- function Me(o) {
368
+ function we(o) {
369
369
  const e = o[0], s = o[1];
370
370
  return Math.sqrt(Math.pow(e[0] - s[0], 2) + Math.pow(e[1] - s[1], 2));
371
371
  }
@@ -373,16 +373,16 @@ class ft extends Le {
373
373
  fillPolygons(e, s) {
374
374
  let t = s.hachureGap;
375
375
  t < 0 && (t = s.strokeWidth * 4), t = Math.max(t, 0.1);
376
- const n = Object.assign({}, s, { hachureGap: t }), r = J(e, n), i = Math.PI / 180 * s.hachureAngle, a = [], c = t * 0.5 * Math.cos(i), u = t * 0.5 * Math.sin(i);
376
+ const n = Object.assign({}, s, { hachureGap: t }), r = J(e, n), a = Math.PI / 180 * s.hachureAngle, i = [], c = t * 0.5 * Math.cos(a), u = t * 0.5 * Math.sin(a);
377
377
  for (const [h, f] of r)
378
- Me([h, f]) && a.push([
378
+ we([h, f]) && i.push([
379
379
  [h[0] - c, h[1] + u],
380
380
  [...f]
381
381
  ], [
382
382
  [h[0] + c, h[1] - u],
383
383
  [...f]
384
384
  ]);
385
- return { type: "fillSketch", ops: this.renderLines(a, s) };
385
+ return { type: "fillSketch", ops: this.renderLines(i, s) };
386
386
  }
387
387
  }
388
388
  class dt extends Le {
@@ -406,11 +406,11 @@ class pt {
406
406
  n < 0 && (n = s.strokeWidth * 4), n = Math.max(n, 0.1);
407
407
  let r = s.fillWeight;
408
408
  r < 0 && (r = s.strokeWidth / 2);
409
- const i = n / 4;
410
- for (const a of e) {
411
- const c = Me(a), u = c / n, l = Math.ceil(u) - 1, h = c - l * n, f = (a[0][0] + a[1][0]) / 2 - n / 4, d = Math.min(a[0][1], a[1][1]);
409
+ const a = n / 4;
410
+ for (const i of e) {
411
+ const c = we(i), u = c / n, l = Math.ceil(u) - 1, h = c - l * n, f = (i[0][0] + i[1][0]) / 2 - n / 4, d = Math.min(i[0][1], i[1][1]);
412
412
  for (let g = 0; g < l; g++) {
413
- const m = d + h + g * n, b = f - i + Math.random() * 2 * i, v = m - i + Math.random() * 2 * i, y = this.helper.ellipse(b, v, r, r, s);
413
+ const m = d + h + g * n, k = f - a + Math.random() * 2 * a, v = m - a + Math.random() * 2 * a, y = this.helper.ellipse(k, v, r, r, s);
414
414
  t.push(...y.ops);
415
415
  }
416
416
  }
@@ -427,14 +427,14 @@ class gt {
427
427
  }
428
428
  dashedLine(e, s) {
429
429
  const t = s.dashOffset < 0 ? s.hachureGap < 0 ? s.strokeWidth * 4 : s.hachureGap : s.dashOffset, n = s.dashGap < 0 ? s.hachureGap < 0 ? s.strokeWidth * 4 : s.hachureGap : s.dashGap, r = [];
430
- return e.forEach((i) => {
431
- const a = Me(i), c = Math.floor(a / (t + n)), u = (a + n - c * (t + n)) / 2;
432
- let l = i[0], h = i[1];
433
- l[0] > h[0] && (l = i[1], h = i[0]);
430
+ return e.forEach((a) => {
431
+ const i = we(a), c = Math.floor(i / (t + n)), u = (i + n - c * (t + n)) / 2;
432
+ let l = a[0], h = a[1];
433
+ l[0] > h[0] && (l = a[1], h = a[0]);
434
434
  const f = Math.atan((h[1] - l[1]) / (h[0] - l[0]));
435
435
  for (let d = 0; d < c; d++) {
436
- const g = d * (t + n), m = g + t, b = [l[0] + g * Math.cos(f) + u * Math.cos(f), l[1] + g * Math.sin(f) + u * Math.sin(f)], v = [l[0] + m * Math.cos(f) + u * Math.cos(f), l[1] + m * Math.sin(f) + u * Math.sin(f)];
437
- r.push(...this.helper.doubleLineOps(b[0], b[1], v[0], v[1], s));
436
+ const g = d * (t + n), m = g + t, k = [l[0] + g * Math.cos(f) + u * Math.cos(f), l[1] + g * Math.sin(f) + u * Math.sin(f)], v = [l[0] + m * Math.cos(f) + u * Math.cos(f), l[1] + m * Math.sin(f) + u * Math.sin(f)];
437
+ r.push(...this.helper.doubleLineOps(k[0], k[1], v[0], v[1], s));
438
438
  }
439
439
  }), r;
440
440
  }
@@ -452,42 +452,42 @@ class mt {
452
452
  zigzagLines(e, s, t) {
453
453
  const n = [];
454
454
  return e.forEach((r) => {
455
- const i = Me(r), a = Math.round(i / (2 * s));
455
+ const a = we(r), i = Math.round(a / (2 * s));
456
456
  let c = r[0], u = r[1];
457
457
  c[0] > u[0] && (c = r[1], u = r[0]);
458
458
  const l = Math.atan((u[1] - c[1]) / (u[0] - c[0]));
459
- for (let h = 0; h < a; h++) {
460
- const f = h * 2 * s, d = (h + 1) * 2 * s, g = Math.sqrt(2 * Math.pow(s, 2)), m = [c[0] + f * Math.cos(l), c[1] + f * Math.sin(l)], b = [c[0] + d * Math.cos(l), c[1] + d * Math.sin(l)], v = [m[0] + g * Math.cos(l + Math.PI / 4), m[1] + g * Math.sin(l + Math.PI / 4)];
461
- n.push(...this.helper.doubleLineOps(m[0], m[1], v[0], v[1], t), ...this.helper.doubleLineOps(v[0], v[1], b[0], b[1], t));
459
+ for (let h = 0; h < i; h++) {
460
+ const f = h * 2 * s, d = (h + 1) * 2 * s, g = Math.sqrt(2 * Math.pow(s, 2)), m = [c[0] + f * Math.cos(l), c[1] + f * Math.sin(l)], k = [c[0] + d * Math.cos(l), c[1] + d * Math.sin(l)], v = [m[0] + g * Math.cos(l + Math.PI / 4), m[1] + g * Math.sin(l + Math.PI / 4)];
461
+ n.push(...this.helper.doubleLineOps(m[0], m[1], v[0], v[1], t), ...this.helper.doubleLineOps(v[0], v[1], k[0], k[1], t));
462
462
  }
463
463
  }), n;
464
464
  }
465
465
  }
466
- const O = {};
466
+ const E = {};
467
467
  function kt(o, e) {
468
468
  let s = o.fillStyle || "hachure";
469
- if (!O[s])
469
+ if (!E[s])
470
470
  switch (s) {
471
471
  case "zigzag":
472
- O[s] || (O[s] = new ft(e));
472
+ E[s] || (E[s] = new ft(e));
473
473
  break;
474
474
  case "cross-hatch":
475
- O[s] || (O[s] = new dt(e));
475
+ E[s] || (E[s] = new dt(e));
476
476
  break;
477
477
  case "dots":
478
- O[s] || (O[s] = new pt(e));
478
+ E[s] || (E[s] = new pt(e));
479
479
  break;
480
480
  case "dashed":
481
- O[s] || (O[s] = new gt(e));
481
+ E[s] || (E[s] = new gt(e));
482
482
  break;
483
483
  case "zigzag-line":
484
- O[s] || (O[s] = new mt(e));
484
+ E[s] || (E[s] = new mt(e));
485
485
  break;
486
486
  default:
487
- s = "hachure", O[s] || (O[s] = new Le(e));
487
+ s = "hachure", E[s] || (E[s] = new Le(e));
488
488
  break;
489
489
  }
490
- return O[s];
490
+ return E[s];
491
491
  }
492
492
  function bt() {
493
493
  return Math.floor(Math.random() * 2 ** 31);
@@ -500,14 +500,14 @@ class vt {
500
500
  return this.seed ? (2 ** 31 - 1 & (this.seed = Math.imul(48271, this.seed))) / 2 ** 31 : Math.random();
501
501
  }
502
502
  }
503
- const Mt = 0, xe = 1, Be = 2, le = { A: 7, a: 7, C: 6, c: 6, H: 1, h: 1, L: 2, l: 2, M: 2, m: 2, Q: 4, q: 4, S: 4, s: 4, T: 2, t: 2, V: 1, v: 1, Z: 0, z: 0 };
504
- function wt(o) {
503
+ const wt = 0, xe = 1, Be = 2, le = { A: 7, a: 7, C: 6, c: 6, H: 1, h: 1, L: 2, l: 2, M: 2, m: 2, Q: 4, q: 4, S: 4, s: 4, T: 2, t: 2, V: 1, v: 1, Z: 0, z: 0 };
504
+ function Mt(o) {
505
505
  const e = new Array();
506
506
  for (; o !== ""; )
507
507
  if (o.match(/^([ \t\r\n,]+)/))
508
508
  o = o.substr(RegExp.$1.length);
509
509
  else if (o.match(/^([aAcChHlLmMqQsStTvVzZ])/))
510
- e[e.length] = { type: Mt, text: RegExp.$1 }, o = o.substr(RegExp.$1.length);
510
+ e[e.length] = { type: wt, text: RegExp.$1 }, o = o.substr(RegExp.$1.length);
511
511
  else if (o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))
512
512
  e[e.length] = { type: xe, text: `${parseFloat(RegExp.$1)}` }, o = o.substr(RegExp.$1.length);
513
513
  else
@@ -518,28 +518,28 @@ function _e(o, e) {
518
518
  return o.type === e;
519
519
  }
520
520
  function Ae(o) {
521
- const e = [], s = wt(o);
521
+ const e = [], s = Mt(o);
522
522
  let t = "BOD", n = 0, r = s[n];
523
523
  for (; !_e(r, Be); ) {
524
- let i = 0;
525
- const a = [];
524
+ let a = 0;
525
+ const i = [];
526
526
  if (t === "BOD")
527
527
  if (r.text === "M" || r.text === "m")
528
- n++, i = le[r.text], t = r.text;
528
+ n++, a = le[r.text], t = r.text;
529
529
  else
530
530
  return Ae("M0,0" + o);
531
- else _e(r, xe) ? i = le[t] : (n++, i = le[r.text], t = r.text);
532
- if (n + i < s.length) {
533
- for (let c = n; c < n + i; c++) {
531
+ else _e(r, xe) ? a = le[t] : (n++, a = le[r.text], t = r.text);
532
+ if (n + a < s.length) {
533
+ for (let c = n; c < n + a; c++) {
534
534
  const u = s[c];
535
535
  if (_e(u, xe))
536
- a[a.length] = +u.text;
536
+ i[i.length] = +u.text;
537
537
  else
538
538
  throw new Error("Param not a number: " + t + "," + u.text);
539
539
  }
540
540
  if (typeof le[t] == "number") {
541
- const c = { key: t, data: a };
542
- e.push(c), n += i, r = s[n], t === "M" && (t = "L"), t === "m" && (t = "l");
541
+ const c = { key: t, data: i };
542
+ e.push(c), n += a, r = s[n], t === "M" && (t = "L"), t === "m" && (t = "l");
543
543
  } else
544
544
  throw new Error("Bad segment: " + t);
545
545
  } else
@@ -550,67 +550,67 @@ function Ae(o) {
550
550
  function Ze(o) {
551
551
  let e = 0, s = 0, t = 0, n = 0;
552
552
  const r = [];
553
- for (const { key: i, data: a } of o)
554
- switch (i) {
553
+ for (const { key: a, data: i } of o)
554
+ switch (a) {
555
555
  case "M":
556
- r.push({ key: "M", data: [...a] }), [e, s] = a, [t, n] = a;
556
+ r.push({ key: "M", data: [...i] }), [e, s] = i, [t, n] = i;
557
557
  break;
558
558
  case "m":
559
- e += a[0], s += a[1], r.push({ key: "M", data: [e, s] }), t = e, n = s;
559
+ e += i[0], s += i[1], r.push({ key: "M", data: [e, s] }), t = e, n = s;
560
560
  break;
561
561
  case "L":
562
- r.push({ key: "L", data: [...a] }), [e, s] = a;
562
+ r.push({ key: "L", data: [...i] }), [e, s] = i;
563
563
  break;
564
564
  case "l":
565
- e += a[0], s += a[1], r.push({ key: "L", data: [e, s] });
565
+ e += i[0], s += i[1], r.push({ key: "L", data: [e, s] });
566
566
  break;
567
567
  case "C":
568
- r.push({ key: "C", data: [...a] }), e = a[4], s = a[5];
568
+ r.push({ key: "C", data: [...i] }), e = i[4], s = i[5];
569
569
  break;
570
570
  case "c": {
571
- const c = a.map((u, l) => l % 2 ? u + s : u + e);
571
+ const c = i.map((u, l) => l % 2 ? u + s : u + e);
572
572
  r.push({ key: "C", data: c }), e = c[4], s = c[5];
573
573
  break;
574
574
  }
575
575
  case "Q":
576
- r.push({ key: "Q", data: [...a] }), e = a[2], s = a[3];
576
+ r.push({ key: "Q", data: [...i] }), e = i[2], s = i[3];
577
577
  break;
578
578
  case "q": {
579
- const c = a.map((u, l) => l % 2 ? u + s : u + e);
579
+ const c = i.map((u, l) => l % 2 ? u + s : u + e);
580
580
  r.push({ key: "Q", data: c }), e = c[2], s = c[3];
581
581
  break;
582
582
  }
583
583
  case "A":
584
- r.push({ key: "A", data: [...a] }), e = a[5], s = a[6];
584
+ r.push({ key: "A", data: [...i] }), e = i[5], s = i[6];
585
585
  break;
586
586
  case "a":
587
- e += a[5], s += a[6], r.push({ key: "A", data: [a[0], a[1], a[2], a[3], a[4], e, s] });
587
+ e += i[5], s += i[6], r.push({ key: "A", data: [i[0], i[1], i[2], i[3], i[4], e, s] });
588
588
  break;
589
589
  case "H":
590
- r.push({ key: "H", data: [...a] }), e = a[0];
590
+ r.push({ key: "H", data: [...i] }), e = i[0];
591
591
  break;
592
592
  case "h":
593
- e += a[0], r.push({ key: "H", data: [e] });
593
+ e += i[0], r.push({ key: "H", data: [e] });
594
594
  break;
595
595
  case "V":
596
- r.push({ key: "V", data: [...a] }), s = a[0];
596
+ r.push({ key: "V", data: [...i] }), s = i[0];
597
597
  break;
598
598
  case "v":
599
- s += a[0], r.push({ key: "V", data: [s] });
599
+ s += i[0], r.push({ key: "V", data: [s] });
600
600
  break;
601
601
  case "S":
602
- r.push({ key: "S", data: [...a] }), e = a[2], s = a[3];
602
+ r.push({ key: "S", data: [...i] }), e = i[2], s = i[3];
603
603
  break;
604
604
  case "s": {
605
- const c = a.map((u, l) => l % 2 ? u + s : u + e);
605
+ const c = i.map((u, l) => l % 2 ? u + s : u + e);
606
606
  r.push({ key: "S", data: c }), e = c[2], s = c[3];
607
607
  break;
608
608
  }
609
609
  case "T":
610
- r.push({ key: "T", data: [...a] }), e = a[0], s = a[1];
610
+ r.push({ key: "T", data: [...i] }), e = i[0], s = i[1];
611
611
  break;
612
612
  case "t":
613
- e += a[0], s += a[1], r.push({ key: "T", data: [e, s] });
613
+ e += i[0], s += i[1], r.push({ key: "T", data: [e, s] });
614
614
  break;
615
615
  case "Z":
616
616
  case "z":
@@ -621,14 +621,14 @@ function Ze(o) {
621
621
  }
622
622
  function Xe(o) {
623
623
  const e = [];
624
- let s = "", t = 0, n = 0, r = 0, i = 0, a = 0, c = 0;
624
+ let s = "", t = 0, n = 0, r = 0, a = 0, i = 0, c = 0;
625
625
  for (const { key: u, data: l } of o) {
626
626
  switch (u) {
627
627
  case "M":
628
- e.push({ key: "M", data: [...l] }), [t, n] = l, [r, i] = l;
628
+ e.push({ key: "M", data: [...l] }), [t, n] = l, [r, a] = l;
629
629
  break;
630
630
  case "C":
631
- e.push({ key: "C", data: [...l] }), t = l[4], n = l[5], a = l[2], c = l[3];
631
+ e.push({ key: "C", data: [...l] }), t = l[4], n = l[5], i = l[2], c = l[3];
632
632
  break;
633
633
  case "L":
634
634
  e.push({ key: "L", data: [...l] }), [t, n] = l;
@@ -641,31 +641,31 @@ function Xe(o) {
641
641
  break;
642
642
  case "S": {
643
643
  let h = 0, f = 0;
644
- s === "C" || s === "S" ? (h = t + (t - a), f = n + (n - c)) : (h = t, f = n), e.push({ key: "C", data: [h, f, ...l] }), a = l[0], c = l[1], t = l[2], n = l[3];
644
+ s === "C" || s === "S" ? (h = t + (t - i), f = n + (n - c)) : (h = t, f = n), e.push({ key: "C", data: [h, f, ...l] }), i = l[0], c = l[1], t = l[2], n = l[3];
645
645
  break;
646
646
  }
647
647
  case "T": {
648
648
  const [h, f] = l;
649
649
  let d = 0, g = 0;
650
- s === "Q" || s === "T" ? (d = t + (t - a), g = n + (n - c)) : (d = t, g = n);
651
- const m = t + 2 * (d - t) / 3, b = n + 2 * (g - n) / 3, v = h + 2 * (d - h) / 3, y = f + 2 * (g - f) / 3;
652
- e.push({ key: "C", data: [m, b, v, y, h, f] }), a = d, c = g, t = h, n = f;
650
+ s === "Q" || s === "T" ? (d = t + (t - i), g = n + (n - c)) : (d = t, g = n);
651
+ const m = t + 2 * (d - t) / 3, k = n + 2 * (g - n) / 3, v = h + 2 * (d - h) / 3, y = f + 2 * (g - f) / 3;
652
+ e.push({ key: "C", data: [m, k, v, y, h, f] }), i = d, c = g, t = h, n = f;
653
653
  break;
654
654
  }
655
655
  case "Q": {
656
- const [h, f, d, g] = l, m = t + 2 * (h - t) / 3, b = n + 2 * (f - n) / 3, v = d + 2 * (h - d) / 3, y = g + 2 * (f - g) / 3;
657
- e.push({ key: "C", data: [m, b, v, y, d, g] }), a = h, c = f, t = d, n = g;
656
+ const [h, f, d, g] = l, m = t + 2 * (h - t) / 3, k = n + 2 * (f - n) / 3, v = d + 2 * (h - d) / 3, y = g + 2 * (f - g) / 3;
657
+ e.push({ key: "C", data: [m, k, v, y, d, g] }), i = h, c = f, t = d, n = g;
658
658
  break;
659
659
  }
660
660
  case "A": {
661
- const h = Math.abs(l[0]), f = Math.abs(l[1]), d = l[2], g = l[3], m = l[4], b = l[5], v = l[6];
662
- h === 0 || f === 0 ? (e.push({ key: "C", data: [t, n, b, v, b, v] }), t = b, n = v) : (t !== b || n !== v) && (Ue(t, n, b, v, h, f, d, g, m).forEach(function(N) {
663
- e.push({ key: "C", data: N });
664
- }), t = b, n = v);
661
+ const h = Math.abs(l[0]), f = Math.abs(l[1]), d = l[2], g = l[3], m = l[4], k = l[5], v = l[6];
662
+ h === 0 || f === 0 ? (e.push({ key: "C", data: [t, n, k, v, k, v] }), t = k, n = v) : (t !== k || n !== v) && (Ue(t, n, k, v, h, f, d, g, m).forEach(function(D) {
663
+ e.push({ key: "C", data: D });
664
+ }), t = k, n = v);
665
665
  break;
666
666
  }
667
667
  case "Z":
668
- e.push({ key: "Z", data: [] }), t = r, n = i;
668
+ e.push({ key: "Z", data: [] }), t = r, n = a;
669
669
  break;
670
670
  }
671
671
  s = u;
@@ -679,8 +679,8 @@ function X(o, e, s) {
679
679
  const t = o * Math.cos(s) - e * Math.sin(s), n = o * Math.sin(s) + e * Math.cos(s);
680
680
  return [t, n];
681
681
  }
682
- function Ue(o, e, s, t, n, r, i, a, c, u) {
683
- const l = yt(i);
682
+ function Ue(o, e, s, t, n, r, a, i, c, u) {
683
+ const l = yt(a);
684
684
  let h = [], f = 0, d = 0, g = 0, m = 0;
685
685
  if (u)
686
686
  [f, d, g, m] = u;
@@ -689,44 +689,44 @@ function Ue(o, e, s, t, n, r, i, a, c, u) {
689
689
  const x = (o - s) / 2, S = (e - t) / 2;
690
690
  let j = x * x / (n * n) + S * S / (r * r);
691
691
  j > 1 && (j = Math.sqrt(j), n = j * n, r = j * r);
692
- const z = a === c ? -1 : 1, D = n * n, q = r * r, oe = D * q - D * S * S - q * x * x, ae = D * S * S + q * x * x, Y = z * Math.sqrt(Math.abs(oe / ae));
692
+ const I = i === c ? -1 : 1, z = n * n, q = r * r, oe = z * q - z * S * S - q * x * x, ie = z * S * S + q * x * x, Y = I * Math.sqrt(Math.abs(oe / ie));
693
693
  g = Y * n * S / r + (o + s) / 2, m = Y * -r * x / n + (e + t) / 2, f = Math.asin(parseFloat(((e - m) / r).toFixed(9))), d = Math.asin(parseFloat(((t - m) / r).toFixed(9))), o < g && (f = Math.PI - f), s < g && (d = Math.PI - d), f < 0 && (f = Math.PI * 2 + f), d < 0 && (d = Math.PI * 2 + d), c && f > d && (f = f - Math.PI * 2), !c && d > f && (d = d - Math.PI * 2);
694
694
  }
695
- let b = d - f;
696
- if (Math.abs(b) > Math.PI * 120 / 180) {
695
+ let k = d - f;
696
+ if (Math.abs(k) > Math.PI * 120 / 180) {
697
697
  const x = d, S = s, j = t;
698
- c && d > f ? d = f + Math.PI * 120 / 180 * 1 : d = f + Math.PI * 120 / 180 * -1, s = g + n * Math.cos(d), t = m + r * Math.sin(d), h = Ue(s, t, S, j, n, r, i, 0, c, [d, x, g, m]);
698
+ c && d > f ? d = f + Math.PI * 120 / 180 * 1 : d = f + Math.PI * 120 / 180 * -1, s = g + n * Math.cos(d), t = m + r * Math.sin(d), h = Ue(s, t, S, j, n, r, a, 0, c, [d, x, g, m]);
699
699
  }
700
- b = d - f;
701
- const v = Math.cos(f), y = Math.sin(f), N = Math.cos(d), F = Math.sin(d), H = Math.tan(b / 4), ee = 4 / 3 * n * H, te = 4 / 3 * r * H, se = [o, e], $ = [o + ee * y, e - te * v], ne = [s + ee * F, t - te * N], re = [s, t];
700
+ k = d - f;
701
+ const v = Math.cos(f), y = Math.sin(f), D = Math.cos(d), H = Math.sin(d), F = Math.tan(k / 4), ee = 4 / 3 * n * F, te = 4 / 3 * r * F, se = [o, e], $ = [o + ee * y, e - te * v], ne = [s + ee * H, t - te * D], re = [s, t];
702
702
  if ($[0] = 2 * se[0] - $[0], $[1] = 2 * se[1] - $[1], u)
703
703
  return [$, ne, re].concat(h);
704
704
  {
705
705
  h = [$, ne, re].concat(h);
706
706
  const x = [];
707
707
  for (let S = 0; S < h.length; S += 3) {
708
- const j = X(h[S][0], h[S][1], l), z = X(h[S + 1][0], h[S + 1][1], l), D = X(h[S + 2][0], h[S + 2][1], l);
709
- x.push([j[0], j[1], z[0], z[1], D[0], D[1]]);
708
+ const j = X(h[S][0], h[S][1], l), I = X(h[S + 1][0], h[S + 1][1], l), z = X(h[S + 2][0], h[S + 2][1], l);
709
+ x.push([j[0], j[1], I[0], I[1], z[0], z[1]]);
710
710
  }
711
711
  return x;
712
712
  }
713
713
  }
714
714
  const _t = {
715
715
  randOffset: Ot,
716
- randOffsetWithRange: Et,
716
+ randOffsetWithRange: Rt,
717
717
  ellipse: Tt,
718
- doubleLineOps: Rt
718
+ doubleLineOps: Et
719
719
  };
720
720
  function Qe(o, e, s, t, n) {
721
- return { type: "path", ops: I(o, e, s, t, n) };
721
+ return { type: "path", ops: N(o, e, s, t, n) };
722
722
  }
723
723
  function de(o, e, s) {
724
724
  const t = (o || []).length;
725
725
  if (t > 2) {
726
726
  const n = [];
727
727
  for (let r = 0; r < t - 1; r++)
728
- n.push(...I(o[r][0], o[r][1], o[r + 1][0], o[r + 1][1], s));
729
- return e && n.push(...I(o[t - 1][0], o[t - 1][1], o[0][0], o[0][1], s)), { type: "path", ops: n };
728
+ n.push(...N(o[r][0], o[r][1], o[r + 1][0], o[r + 1][1], s));
729
+ return e && n.push(...N(o[t - 1][0], o[t - 1][1], o[0][0], o[0][1], s)), { type: "path", ops: n };
730
730
  } else if (t === 2)
731
731
  return Qe(o[0][0], o[0][1], o[1][0], o[1][1], s);
732
732
  return { type: "path", ops: [] };
@@ -746,10 +746,10 @@ function Pt(o, e, s, t, n) {
746
746
  function ze(o, e) {
747
747
  if (o.length) {
748
748
  const t = typeof o[0][0] == "number" ? [o] : o, n = ue(t[0], 1 * (1 + e.roughness * 0.2), e), r = e.disableMultiStroke ? [] : ue(t[0], 1.5 * (1 + e.roughness * 0.22), We(e));
749
- for (let i = 1; i < t.length; i++) {
750
- const a = t[i];
751
- if (a.length) {
752
- const c = ue(a, 1 * (1 + e.roughness * 0.2), e), u = e.disableMultiStroke ? [] : ue(a, 1.5 * (1 + e.roughness * 0.22), We(e));
749
+ for (let a = 1; a < t.length; a++) {
750
+ const i = t[a];
751
+ if (i.length) {
752
+ const c = ue(i, 1 * (1 + e.roughness * 0.2), e), u = e.disableMultiStroke ? [] : ue(i, 1.5 * (1 + e.roughness * 0.22), We(e));
753
753
  for (const l of c)
754
754
  l.op !== "move" && n.push(l);
755
755
  for (const l of u)
@@ -766,56 +766,56 @@ function Tt(o, e, s, t, n) {
766
766
  }
767
767
  function Je(o, e, s) {
768
768
  const t = Math.sqrt(Math.PI * 2 * Math.sqrt((Math.pow(o / 2, 2) + Math.pow(e / 2, 2)) / 2)), n = Math.ceil(Math.max(s.curveStepCount, s.curveStepCount / Math.sqrt(200) * t)), r = Math.PI * 2 / n;
769
- let i = Math.abs(o / 2), a = Math.abs(e / 2);
769
+ let a = Math.abs(o / 2), i = Math.abs(e / 2);
770
770
  const c = 1 - s.curveFitting;
771
- return i += k(i * c, s), a += k(a * c, s), { increment: r, rx: i, ry: a };
771
+ return a += b(a * c, s), i += b(i * c, s), { increment: r, rx: a, ry: i };
772
772
  }
773
773
  function Oe(o, e, s, t) {
774
- const [n, r] = Fe(t.increment, o, e, t.rx, t.ry, 1, t.increment * me(0.1, me(0.4, 1, s), s), s);
775
- let i = ke(n, null, s);
774
+ const [n, r] = He(t.increment, o, e, t.rx, t.ry, 1, t.increment * me(0.1, me(0.4, 1, s), s), s);
775
+ let a = ke(n, null, s);
776
776
  if (!s.disableMultiStroke && s.roughness !== 0) {
777
- const [a] = Fe(t.increment, o, e, t.rx, t.ry, 1.5, 0, s), c = ke(a, null, s);
778
- i = i.concat(c);
777
+ const [i] = He(t.increment, o, e, t.rx, t.ry, 1.5, 0, s), c = ke(i, null, s);
778
+ a = a.concat(c);
779
779
  }
780
780
  return {
781
781
  estimatedPoints: r,
782
- opset: { type: "path", ops: i }
782
+ opset: { type: "path", ops: a }
783
783
  };
784
784
  }
785
- function Ie(o, e, s, t, n, r, i, a, c) {
785
+ function Ie(o, e, s, t, n, r, a, i, c) {
786
786
  const u = o, l = e;
787
787
  let h = Math.abs(s / 2), f = Math.abs(t / 2);
788
- h += k(h * 0.01, c), f += k(f * 0.01, c);
788
+ h += b(h * 0.01, c), f += b(f * 0.01, c);
789
789
  let d = n, g = r;
790
790
  for (; d < 0; )
791
791
  d += Math.PI * 2, g += Math.PI * 2;
792
792
  g - d > Math.PI * 2 && (d = 0, g = Math.PI * 2);
793
- const m = Math.PI * 2 / c.curveStepCount, b = Math.min(m / 2, (g - d) / 2), v = He(b, u, l, h, f, d, g, 1, c);
793
+ const m = Math.PI * 2 / c.curveStepCount, k = Math.min(m / 2, (g - d) / 2), v = Fe(k, u, l, h, f, d, g, 1, c);
794
794
  if (!c.disableMultiStroke) {
795
- const y = He(b, u, l, h, f, d, g, 1.5, c);
795
+ const y = Fe(k, u, l, h, f, d, g, 1.5, c);
796
796
  v.push(...y);
797
797
  }
798
- return i && (a ? v.push(...I(u, l, u + h * Math.cos(d), l + f * Math.sin(d), c), ...I(u, l, u + h * Math.cos(g), l + f * Math.sin(g), c)) : v.push({ op: "lineTo", data: [u, l] }, { op: "lineTo", data: [u + h * Math.cos(d), l + f * Math.sin(d)] })), { type: "path", ops: v };
798
+ return a && (i ? v.push(...N(u, l, u + h * Math.cos(d), l + f * Math.sin(d), c), ...N(u, l, u + h * Math.cos(g), l + f * Math.sin(g), c)) : v.push({ op: "lineTo", data: [u, l] }, { op: "lineTo", data: [u + h * Math.cos(d), l + f * Math.sin(d)] })), { type: "path", ops: v };
799
799
  }
800
800
  function Ne(o, e) {
801
801
  const s = Xe(Ze(Ae(o))), t = [];
802
802
  let n = [0, 0], r = [0, 0];
803
- for (const { key: i, data: a } of s)
804
- switch (i) {
803
+ for (const { key: a, data: i } of s)
804
+ switch (a) {
805
805
  case "M": {
806
- r = [a[0], a[1]], n = [a[0], a[1]];
806
+ r = [i[0], i[1]], n = [i[0], i[1]];
807
807
  break;
808
808
  }
809
809
  case "L":
810
- t.push(...I(r[0], r[1], a[0], a[1], e)), r = [a[0], a[1]];
810
+ t.push(...N(r[0], r[1], i[0], i[1], e)), r = [i[0], i[1]];
811
811
  break;
812
812
  case "C": {
813
- const [c, u, l, h, f, d] = a;
813
+ const [c, u, l, h, f, d] = i;
814
814
  t.push(...Ct(c, u, l, h, f, d, r, e)), r = [f, d];
815
815
  break;
816
816
  }
817
817
  case "Z":
818
- t.push(...I(r[0], r[1], n[0], n[1], e)), r = [n[0], n[1]];
818
+ t.push(...N(r[0], r[1], n[0], n[1], e)), r = [n[0], n[1]];
819
819
  break;
820
820
  }
821
821
  return { type: "path", ops: t };
@@ -826,9 +826,9 @@ function Se(o, e) {
826
826
  if (t.length) {
827
827
  const n = e.maxRandomnessOffset || 0, r = t.length;
828
828
  if (r > 2) {
829
- s.push({ op: "move", data: [t[0][0] + k(n, e), t[0][1] + k(n, e)] });
830
- for (let i = 1; i < r; i++)
831
- s.push({ op: "lineTo", data: [t[i][0] + k(n, e), t[i][1] + k(n, e)] });
829
+ s.push({ op: "move", data: [t[0][0] + b(n, e), t[0][1] + b(n, e)] });
830
+ for (let a = 1; a < r; a++)
831
+ s.push({ op: "lineTo", data: [t[a][0] + b(n, e), t[a][1] + b(n, e)] });
832
832
  }
833
833
  }
834
834
  return { type: "fillPath", ops: s };
@@ -836,27 +836,27 @@ function Se(o, e) {
836
836
  function V(o, e) {
837
837
  return kt(e, _t).fillPolygons(o, e);
838
838
  }
839
- function xt(o, e, s, t, n, r, i) {
840
- const a = o, c = e;
839
+ function xt(o, e, s, t, n, r, a) {
840
+ const i = o, c = e;
841
841
  let u = Math.abs(s / 2), l = Math.abs(t / 2);
842
- u += k(u * 0.01, i), l += k(l * 0.01, i);
842
+ u += b(u * 0.01, a), l += b(l * 0.01, a);
843
843
  let h = n, f = r;
844
844
  for (; h < 0; )
845
845
  h += Math.PI * 2, f += Math.PI * 2;
846
846
  f - h > Math.PI * 2 && (h = 0, f = Math.PI * 2);
847
- const d = (f - h) / i.curveStepCount, g = [];
847
+ const d = (f - h) / a.curveStepCount, g = [];
848
848
  for (let m = h; m <= f; m = m + d)
849
- g.push([a + u * Math.cos(m), c + l * Math.sin(m)]);
850
- return g.push([a + u * Math.cos(f), c + l * Math.sin(f)]), g.push([a, c]), V([g], i);
849
+ g.push([i + u * Math.cos(m), c + l * Math.sin(m)]);
850
+ return g.push([i + u * Math.cos(f), c + l * Math.sin(f)]), g.push([i, c]), V([g], a);
851
851
  }
852
852
  function Ot(o, e) {
853
- return k(o, e);
853
+ return b(o, e);
854
854
  }
855
- function Et(o, e, s) {
855
+ function Rt(o, e, s) {
856
856
  return me(o, e, s);
857
857
  }
858
- function Rt(o, e, s, t, n) {
859
- return I(o, e, s, t, n, !0);
858
+ function Et(o, e, s, t, n) {
859
+ return N(o, e, s, t, n, !0);
860
860
  }
861
861
  function We(o) {
862
862
  const e = Object.assign({}, o);
@@ -868,47 +868,47 @@ function Ke(o) {
868
868
  function me(o, e, s, t = 1) {
869
869
  return s.roughness * t * (Ke(s) * (e - o) + o);
870
870
  }
871
- function k(o, e, s = 1) {
871
+ function b(o, e, s = 1) {
872
872
  return me(-o, o, e, s);
873
873
  }
874
- function I(o, e, s, t, n, r = !1) {
875
- const i = r ? n.disableMultiStrokeFill : n.disableMultiStroke, a = Ee(o, e, s, t, n, !0, !1);
876
- if (i)
877
- return a;
878
- const c = Ee(o, e, s, t, n, !0, !0);
879
- return a.concat(c);
874
+ function N(o, e, s, t, n, r = !1) {
875
+ const a = r ? n.disableMultiStrokeFill : n.disableMultiStroke, i = Re(o, e, s, t, n, !0, !1);
876
+ if (a)
877
+ return i;
878
+ const c = Re(o, e, s, t, n, !0, !0);
879
+ return i.concat(c);
880
880
  }
881
- function Ee(o, e, s, t, n, r, i) {
882
- const a = Math.pow(o - s, 2) + Math.pow(e - t, 2), c = Math.sqrt(a);
881
+ function Re(o, e, s, t, n, r, a) {
882
+ const i = Math.pow(o - s, 2) + Math.pow(e - t, 2), c = Math.sqrt(i);
883
883
  let u = 1;
884
884
  c < 200 ? u = 1 : c > 500 ? u = 0.4 : u = -16668e-7 * c + 1.233334;
885
885
  let l = n.maxRandomnessOffset || 0;
886
- l * l * 100 > a && (l = c / 10);
886
+ l * l * 100 > i && (l = c / 10);
887
887
  const h = l / 2, f = 0.2 + Ke(n) * 0.2;
888
888
  let d = n.bowing * n.maxRandomnessOffset * (t - e) / 200, g = n.bowing * n.maxRandomnessOffset * (o - s) / 200;
889
- d = k(d, n, u), g = k(g, n, u);
890
- const m = [], b = () => k(h, n, u), v = () => k(l, n, u), y = n.preserveVertices;
891
- return i ? m.push({
889
+ d = b(d, n, u), g = b(g, n, u);
890
+ const m = [], k = () => b(h, n, u), v = () => b(l, n, u), y = n.preserveVertices;
891
+ return a ? m.push({
892
892
  op: "move",
893
893
  data: [
894
- o + (y ? 0 : b()),
895
- e + (y ? 0 : b())
894
+ o + (y ? 0 : k()),
895
+ e + (y ? 0 : k())
896
896
  ]
897
897
  }) : m.push({
898
898
  op: "move",
899
899
  data: [
900
- o + (y ? 0 : k(l, n, u)),
901
- e + (y ? 0 : k(l, n, u))
900
+ o + (y ? 0 : b(l, n, u)),
901
+ e + (y ? 0 : b(l, n, u))
902
902
  ]
903
- }), i ? m.push({
903
+ }), a ? m.push({
904
904
  op: "bcurveTo",
905
905
  data: [
906
- d + o + (s - o) * f + b(),
907
- g + e + (t - e) * f + b(),
908
- d + o + 2 * (s - o) * f + b(),
909
- g + e + 2 * (t - e) * f + b(),
910
- s + (y ? 0 : b()),
911
- t + (y ? 0 : b())
906
+ d + o + (s - o) * f + k(),
907
+ g + e + (t - e) * f + k(),
908
+ d + o + 2 * (s - o) * f + k(),
909
+ g + e + 2 * (t - e) * f + k(),
910
+ s + (y ? 0 : k()),
911
+ t + (y ? 0 : k())
912
912
  ]
913
913
  }) : m.push({
914
914
  op: "bcurveTo",
@@ -927,30 +927,30 @@ function ue(o, e, s) {
927
927
  return [];
928
928
  const t = [];
929
929
  t.push([
930
- o[0][0] + k(e, s),
931
- o[0][1] + k(e, s)
930
+ o[0][0] + b(e, s),
931
+ o[0][1] + b(e, s)
932
932
  ]), t.push([
933
- o[0][0] + k(e, s),
934
- o[0][1] + k(e, s)
933
+ o[0][0] + b(e, s),
934
+ o[0][1] + b(e, s)
935
935
  ]);
936
936
  for (let n = 1; n < o.length; n++)
937
937
  t.push([
938
- o[n][0] + k(e, s),
939
- o[n][1] + k(e, s)
938
+ o[n][0] + b(e, s),
939
+ o[n][1] + b(e, s)
940
940
  ]), n === o.length - 1 && t.push([
941
- o[n][0] + k(e, s),
942
- o[n][1] + k(e, s)
941
+ o[n][0] + b(e, s),
942
+ o[n][1] + b(e, s)
943
943
  ]);
944
944
  return ke(t, null, s);
945
945
  }
946
946
  function ke(o, e, s) {
947
947
  const t = o.length, n = [];
948
948
  if (t > 3) {
949
- const r = [], i = 1 - s.curveTightness;
949
+ const r = [], a = 1 - s.curveTightness;
950
950
  n.push({ op: "move", data: [o[1][0], o[1][1]] });
951
- for (let a = 1; a + 2 < t; a++) {
952
- const c = o[a];
953
- r[0] = [c[0], c[1]], r[1] = [c[0] + (i * o[a + 1][0] - i * o[a - 1][0]) / 6, c[1] + (i * o[a + 1][1] - i * o[a - 1][1]) / 6], r[2] = [o[a + 1][0] + (i * o[a][0] - i * o[a + 2][0]) / 6, o[a + 1][1] + (i * o[a][1] - i * o[a + 2][1]) / 6], r[3] = [o[a + 1][0], o[a + 1][1]], n.push({ op: "bcurveTo", data: [r[1][0], r[1][1], r[2][0], r[2][1], r[3][0], r[3][1]] });
951
+ for (let i = 1; i + 2 < t; i++) {
952
+ const c = o[i];
953
+ r[0] = [c[0], c[1]], r[1] = [c[0] + (a * o[i + 1][0] - a * o[i - 1][0]) / 6, c[1] + (a * o[i + 1][1] - a * o[i - 1][1]) / 6], r[2] = [o[i + 1][0] + (a * o[i][0] - a * o[i + 2][0]) / 6, o[i + 1][1] + (a * o[i][1] - a * o[i + 2][1]) / 6], r[3] = [o[i + 1][0], o[i + 1][1]], n.push({ op: "bcurveTo", data: [r[1][0], r[1][1], r[2][0], r[2][1], r[3][0], r[3][1]] });
954
954
  }
955
955
  } else t === 3 ? (n.push({ op: "move", data: [o[1][0], o[1][1]] }), n.push({
956
956
  op: "bcurveTo",
@@ -962,11 +962,11 @@ function ke(o, e, s) {
962
962
  o[2][0],
963
963
  o[2][1]
964
964
  ]
965
- })) : t === 2 && n.push(...Ee(o[0][0], o[0][1], o[1][0], o[1][1], s, !0, !0));
965
+ })) : t === 2 && n.push(...Re(o[0][0], o[0][1], o[1][0], o[1][1], s, !0, !0));
966
966
  return n;
967
967
  }
968
- function Fe(o, e, s, t, n, r, i, a) {
969
- const c = a.roughness === 0, u = [], l = [];
968
+ function He(o, e, s, t, n, r, a, i) {
969
+ const c = i.roughness === 0, u = [], l = [];
970
970
  if (c) {
971
971
  o = o / 4, l.push([
972
972
  e + t * Math.cos(-o),
@@ -987,63 +987,63 @@ function Fe(o, e, s, t, n, r, i, a) {
987
987
  s + n * Math.sin(o)
988
988
  ]);
989
989
  } else {
990
- const h = k(0.5, a) - Math.PI / 2;
990
+ const h = b(0.5, i) - Math.PI / 2;
991
991
  l.push([
992
- k(r, a) + e + 0.9 * t * Math.cos(h - o),
993
- k(r, a) + s + 0.9 * n * Math.sin(h - o)
992
+ b(r, i) + e + 0.9 * t * Math.cos(h - o),
993
+ b(r, i) + s + 0.9 * n * Math.sin(h - o)
994
994
  ]);
995
995
  const f = Math.PI * 2 + h - 0.01;
996
996
  for (let d = h; d < f; d = d + o) {
997
997
  const g = [
998
- k(r, a) + e + t * Math.cos(d),
999
- k(r, a) + s + n * Math.sin(d)
998
+ b(r, i) + e + t * Math.cos(d),
999
+ b(r, i) + s + n * Math.sin(d)
1000
1000
  ];
1001
1001
  u.push(g), l.push(g);
1002
1002
  }
1003
1003
  l.push([
1004
- k(r, a) + e + t * Math.cos(h + Math.PI * 2 + i * 0.5),
1005
- k(r, a) + s + n * Math.sin(h + Math.PI * 2 + i * 0.5)
1004
+ b(r, i) + e + t * Math.cos(h + Math.PI * 2 + a * 0.5),
1005
+ b(r, i) + s + n * Math.sin(h + Math.PI * 2 + a * 0.5)
1006
1006
  ]), l.push([
1007
- k(r, a) + e + 0.98 * t * Math.cos(h + i),
1008
- k(r, a) + s + 0.98 * n * Math.sin(h + i)
1007
+ b(r, i) + e + 0.98 * t * Math.cos(h + a),
1008
+ b(r, i) + s + 0.98 * n * Math.sin(h + a)
1009
1009
  ]), l.push([
1010
- k(r, a) + e + 0.9 * t * Math.cos(h + i * 0.5),
1011
- k(r, a) + s + 0.9 * n * Math.sin(h + i * 0.5)
1010
+ b(r, i) + e + 0.9 * t * Math.cos(h + a * 0.5),
1011
+ b(r, i) + s + 0.9 * n * Math.sin(h + a * 0.5)
1012
1012
  ]);
1013
1013
  }
1014
1014
  return [l, u];
1015
1015
  }
1016
- function He(o, e, s, t, n, r, i, a, c) {
1017
- const u = r + k(0.1, c), l = [];
1016
+ function Fe(o, e, s, t, n, r, a, i, c) {
1017
+ const u = r + b(0.1, c), l = [];
1018
1018
  l.push([
1019
- k(a, c) + e + 0.9 * t * Math.cos(u - o),
1020
- k(a, c) + s + 0.9 * n * Math.sin(u - o)
1019
+ b(i, c) + e + 0.9 * t * Math.cos(u - o),
1020
+ b(i, c) + s + 0.9 * n * Math.sin(u - o)
1021
1021
  ]);
1022
- for (let h = u; h <= i; h = h + o)
1022
+ for (let h = u; h <= a; h = h + o)
1023
1023
  l.push([
1024
- k(a, c) + e + t * Math.cos(h),
1025
- k(a, c) + s + n * Math.sin(h)
1024
+ b(i, c) + e + t * Math.cos(h),
1025
+ b(i, c) + s + n * Math.sin(h)
1026
1026
  ]);
1027
1027
  return l.push([
1028
- e + t * Math.cos(i),
1029
- s + n * Math.sin(i)
1028
+ e + t * Math.cos(a),
1029
+ s + n * Math.sin(a)
1030
1030
  ]), l.push([
1031
- e + t * Math.cos(i),
1032
- s + n * Math.sin(i)
1031
+ e + t * Math.cos(a),
1032
+ s + n * Math.sin(a)
1033
1033
  ]), ke(l, null, c);
1034
1034
  }
1035
- function Ct(o, e, s, t, n, r, i, a) {
1036
- const c = [], u = [a.maxRandomnessOffset || 1, (a.maxRandomnessOffset || 1) + 0.3];
1035
+ function Ct(o, e, s, t, n, r, a, i) {
1036
+ const c = [], u = [i.maxRandomnessOffset || 1, (i.maxRandomnessOffset || 1) + 0.3];
1037
1037
  let l = [0, 0];
1038
- const h = a.disableMultiStroke ? 1 : 2, f = a.preserveVertices;
1038
+ const h = i.disableMultiStroke ? 1 : 2, f = i.preserveVertices;
1039
1039
  for (let d = 0; d < h; d++)
1040
- d === 0 ? c.push({ op: "move", data: [i[0], i[1]] }) : c.push({ op: "move", data: [i[0] + (f ? 0 : k(u[0], a)), i[1] + (f ? 0 : k(u[0], a))] }), l = f ? [n, r] : [n + k(u[d], a), r + k(u[d], a)], c.push({
1040
+ d === 0 ? c.push({ op: "move", data: [a[0], a[1]] }) : c.push({ op: "move", data: [a[0] + (f ? 0 : b(u[0], i)), a[1] + (f ? 0 : b(u[0], i))] }), l = f ? [n, r] : [n + b(u[d], i), r + b(u[d], i)], c.push({
1041
1041
  op: "bcurveTo",
1042
1042
  data: [
1043
- o + k(u[d], a),
1044
- e + k(u[d], a),
1045
- s + k(u[d], a),
1046
- t + k(u[d], a),
1043
+ o + b(u[d], i),
1044
+ e + b(u[d], i),
1045
+ s + b(u[d], i),
1046
+ t + b(u[d], i),
1047
1047
  l[0],
1048
1048
  l[1]
1049
1049
  ]
@@ -1063,13 +1063,13 @@ function qe(o, e = 0) {
1063
1063
  else {
1064
1064
  const n = [];
1065
1065
  n.push(o[0], o[0]);
1066
- for (let a = 1; a < o.length; a++)
1067
- n.push(o[a]), a === o.length - 1 && n.push(o[a]);
1068
- const r = [], i = 1 - e;
1066
+ for (let i = 1; i < o.length; i++)
1067
+ n.push(o[i]), i === o.length - 1 && n.push(o[i]);
1068
+ const r = [], a = 1 - e;
1069
1069
  t.push(U(n[0]));
1070
- for (let a = 1; a + 2 < n.length; a++) {
1071
- const c = n[a];
1072
- r[0] = [c[0], c[1]], r[1] = [c[0] + (i * n[a + 1][0] - i * n[a - 1][0]) / 6, c[1] + (i * n[a + 1][1] - i * n[a - 1][1]) / 6], r[2] = [n[a + 1][0] + (i * n[a][0] - i * n[a + 2][0]) / 6, n[a + 1][1] + (i * n[a][1] - i * n[a + 2][1]) / 6], r[3] = [n[a + 1][0], n[a + 1][1]], t.push(r[1], r[2], r[3]);
1070
+ for (let i = 1; i + 2 < n.length; i++) {
1071
+ const c = n[i];
1072
+ r[0] = [c[0], c[1]], r[1] = [c[0] + (a * n[i + 1][0] - a * n[i - 1][0]) / 6, c[1] + (a * n[i + 1][1] - a * n[i - 1][1]) / 6], r[2] = [n[i + 1][0] + (a * n[i][0] - a * n[i + 2][0]) / 6, n[i + 1][1] + (a * n[i][1] - a * n[i + 2][1]) / 6], r[3] = [n[i + 1][0], n[i + 1][1]], t.push(r[1], r[2], r[3]);
1073
1073
  }
1074
1074
  }
1075
1075
  return t;
@@ -1095,23 +1095,23 @@ function W(o, e, s) {
1095
1095
  }
1096
1096
  function jt(o, e) {
1097
1097
  const s = o[e + 0], t = o[e + 1], n = o[e + 2], r = o[e + 3];
1098
- let i = 3 * t[0] - 2 * s[0] - r[0];
1099
- i *= i;
1100
- let a = 3 * t[1] - 2 * s[1] - r[1];
1098
+ let a = 3 * t[0] - 2 * s[0] - r[0];
1101
1099
  a *= a;
1100
+ let i = 3 * t[1] - 2 * s[1] - r[1];
1101
+ i *= i;
1102
1102
  let c = 3 * n[0] - 2 * r[0] - s[0];
1103
1103
  c *= c;
1104
1104
  let u = 3 * n[1] - 2 * r[1] - s[1];
1105
- return u *= u, i < c && (i = c), a < u && (a = u), i + a;
1105
+ return u *= u, a < c && (a = c), i < u && (i = u), a + i;
1106
1106
  }
1107
- function Re(o, e, s, t) {
1107
+ function Ee(o, e, s, t) {
1108
1108
  const n = t || [];
1109
1109
  if (jt(o, e) < s) {
1110
1110
  const r = o[e + 0];
1111
1111
  n.length ? Lt(n[n.length - 1], r) > 1 && n.push(r) : n.push(r), n.push(o[e + 3]);
1112
1112
  } else {
1113
- const i = o[e + 0], a = o[e + 1], c = o[e + 2], u = o[e + 3], l = W(i, a, 0.5), h = W(a, c, 0.5), f = W(c, u, 0.5), d = W(l, h, 0.5), g = W(h, f, 0.5), m = W(d, g, 0.5);
1114
- Re([i, l, d, m], 0, s, n), Re([m, g, f, u], 0, s, n);
1113
+ const a = o[e + 0], i = o[e + 1], c = o[e + 2], u = o[e + 3], l = W(a, i, 0.5), h = W(i, c, 0.5), f = W(c, u, 0.5), d = W(l, h, 0.5), g = W(h, f, 0.5), m = W(d, g, 0.5);
1114
+ Ee([a, l, d, m], 0, s, n), Ee([m, g, f, u], 0, s, n);
1115
1115
  }
1116
1116
  return n;
1117
1117
  }
@@ -1119,47 +1119,47 @@ function $t(o, e) {
1119
1119
  return be(o, 0, o.length, e);
1120
1120
  }
1121
1121
  function be(o, e, s, t, n) {
1122
- const r = n || [], i = o[e], a = o[s - 1];
1122
+ const r = n || [], a = o[e], i = o[s - 1];
1123
1123
  let c = 0, u = 1;
1124
1124
  for (let l = e + 1; l < s - 1; ++l) {
1125
- const h = At(o[l], i, a);
1125
+ const h = At(o[l], a, i);
1126
1126
  h > c && (c = h, u = l);
1127
1127
  }
1128
- return Math.sqrt(c) > t ? (be(o, e, u + 1, t, r), be(o, u, s, t, r)) : (r.length || r.push(i), r.push(a)), r;
1128
+ return Math.sqrt(c) > t ? (be(o, e, u + 1, t, r), be(o, u, s, t, r)) : (r.length || r.push(a), r.push(i)), r;
1129
1129
  }
1130
1130
  function Ce(o, e = 0.15, s) {
1131
1131
  const t = [], n = (o.length - 1) / 3;
1132
1132
  for (let r = 0; r < n; r++) {
1133
- const i = r * 3;
1134
- Re(o, i, e, t);
1133
+ const a = r * 3;
1134
+ Ee(o, a, e, t);
1135
1135
  }
1136
1136
  return s && s > 0 ? be(t, 0, t.length, s) : t;
1137
1137
  }
1138
1138
  function Dt(o, e, s) {
1139
1139
  const t = Ae(o), n = Xe(Ze(t)), r = [];
1140
- let i = [], a = [0, 0], c = [];
1140
+ let a = [], i = [0, 0], c = [];
1141
1141
  const u = () => {
1142
- c.length >= 4 && i.push(...Ce(c, e)), c = [];
1142
+ c.length >= 4 && a.push(...Ce(c, e)), c = [];
1143
1143
  }, l = () => {
1144
- u(), i.length && (r.push(i), i = []);
1144
+ u(), a.length && (r.push(a), a = []);
1145
1145
  };
1146
1146
  for (const { key: f, data: d } of n)
1147
1147
  switch (f) {
1148
1148
  case "M":
1149
- l(), a = [d[0], d[1]], i.push(a);
1149
+ l(), i = [d[0], d[1]], a.push(i);
1150
1150
  break;
1151
1151
  case "L":
1152
- u(), i.push([d[0], d[1]]);
1152
+ u(), a.push([d[0], d[1]]);
1153
1153
  break;
1154
1154
  case "C":
1155
1155
  if (!c.length) {
1156
- const g = i.length ? i[i.length - 1] : a;
1156
+ const g = a.length ? a[a.length - 1] : i;
1157
1157
  c.push([g[0], g[1]]);
1158
1158
  }
1159
1159
  c.push([d[0], d[1]]), c.push([d[2], d[3]]), c.push([d[4], d[5]]);
1160
1160
  break;
1161
1161
  case "Z":
1162
- u(), i.push([a[0], a[1]]);
1162
+ u(), a.push([i[0], i[1]]);
1163
1163
  break;
1164
1164
  }
1165
1165
  if (l(), !s)
@@ -1171,7 +1171,7 @@ function Dt(o, e, s) {
1171
1171
  }
1172
1172
  return h;
1173
1173
  }
1174
- const R = "none";
1174
+ const A = "none";
1175
1175
  class ve {
1176
1176
  constructor(e) {
1177
1177
  this.defaultOptions = {
@@ -1207,26 +1207,26 @@ class ve {
1207
1207
  return { shape: e, sets: s || [], options: t || this.defaultOptions };
1208
1208
  }
1209
1209
  line(e, s, t, n, r) {
1210
- const i = this._o(r);
1211
- return this._d("line", [Qe(e, s, t, n, i)], i);
1210
+ const a = this._o(r);
1211
+ return this._d("line", [Qe(e, s, t, n, a)], a);
1212
1212
  }
1213
1213
  rectangle(e, s, t, n, r) {
1214
- const i = this._o(r), a = [], c = Pt(e, s, t, n, i);
1215
- if (i.fill) {
1214
+ const a = this._o(r), i = [], c = Pt(e, s, t, n, a);
1215
+ if (a.fill) {
1216
1216
  const u = [[e, s], [e + t, s], [e + t, s + n], [e, s + n]];
1217
- i.fillStyle === "solid" ? a.push(Se([u], i)) : a.push(V([u], i));
1217
+ a.fillStyle === "solid" ? i.push(Se([u], a)) : i.push(V([u], a));
1218
1218
  }
1219
- return i.stroke !== R && a.push(c), this._d("rectangle", a, i);
1219
+ return a.stroke !== A && i.push(c), this._d("rectangle", i, a);
1220
1220
  }
1221
1221
  ellipse(e, s, t, n, r) {
1222
- const i = this._o(r), a = [], c = Je(t, n, i), u = Oe(e, s, i, c);
1223
- if (i.fill)
1224
- if (i.fillStyle === "solid") {
1225
- const l = Oe(e, s, i, c).opset;
1226
- l.type = "fillPath", a.push(l);
1222
+ const a = this._o(r), i = [], c = Je(t, n, a), u = Oe(e, s, a, c);
1223
+ if (a.fill)
1224
+ if (a.fillStyle === "solid") {
1225
+ const l = Oe(e, s, a, c).opset;
1226
+ l.type = "fillPath", i.push(l);
1227
1227
  } else
1228
- a.push(V([u.estimatedPoints], i));
1229
- return i.stroke !== R && a.push(u.opset), this._d("ellipse", a, i);
1228
+ i.push(V([u.estimatedPoints], a));
1229
+ return a.stroke !== A && i.push(u.opset), this._d("ellipse", i, a);
1230
1230
  }
1231
1231
  circle(e, s, t, n) {
1232
1232
  const r = this.ellipse(e, s, t, t, n);
@@ -1236,53 +1236,53 @@ class ve {
1236
1236
  const t = this._o(s);
1237
1237
  return this._d("linearPath", [de(e, !1, t)], t);
1238
1238
  }
1239
- arc(e, s, t, n, r, i, a = !1, c) {
1240
- const u = this._o(c), l = [], h = Ie(e, s, t, n, r, i, a, !0, u);
1241
- if (a && u.fill)
1239
+ arc(e, s, t, n, r, a, i = !1, c) {
1240
+ const u = this._o(c), l = [], h = Ie(e, s, t, n, r, a, i, !0, u);
1241
+ if (i && u.fill)
1242
1242
  if (u.fillStyle === "solid") {
1243
1243
  const f = Object.assign({}, u);
1244
1244
  f.disableMultiStroke = !0;
1245
- const d = Ie(e, s, t, n, r, i, !0, !1, f);
1245
+ const d = Ie(e, s, t, n, r, a, !0, !1, f);
1246
1246
  d.type = "fillPath", l.push(d);
1247
1247
  } else
1248
- l.push(xt(e, s, t, n, r, i, u));
1249
- return u.stroke !== R && l.push(h), this._d("arc", l, u);
1248
+ l.push(xt(e, s, t, n, r, a, u));
1249
+ return u.stroke !== A && l.push(h), this._d("arc", l, u);
1250
1250
  }
1251
1251
  curve(e, s) {
1252
1252
  const t = this._o(s), n = [], r = ze(e, t);
1253
- if (t.fill && t.fill !== R)
1253
+ if (t.fill && t.fill !== A)
1254
1254
  if (t.fillStyle === "solid") {
1255
- const i = ze(e, Object.assign(Object.assign({}, t), { disableMultiStroke: !0, roughness: t.roughness ? t.roughness + t.fillShapeRoughnessGain : 0 }));
1255
+ const a = ze(e, Object.assign(Object.assign({}, t), { disableMultiStroke: !0, roughness: t.roughness ? t.roughness + t.fillShapeRoughnessGain : 0 }));
1256
1256
  n.push({
1257
1257
  type: "fillPath",
1258
- ops: this._mergedShape(i.ops)
1258
+ ops: this._mergedShape(a.ops)
1259
1259
  });
1260
1260
  } else {
1261
- const i = [], a = e;
1262
- if (a.length) {
1263
- const u = typeof a[0][0] == "number" ? [a] : a;
1261
+ const a = [], i = e;
1262
+ if (i.length) {
1263
+ const u = typeof i[0][0] == "number" ? [i] : i;
1264
1264
  for (const l of u)
1265
- l.length < 3 ? i.push(...l) : l.length === 3 ? i.push(...Ce(qe([
1265
+ l.length < 3 ? a.push(...l) : l.length === 3 ? a.push(...Ce(qe([
1266
1266
  l[0],
1267
1267
  l[0],
1268
1268
  l[1],
1269
1269
  l[2]
1270
- ]), 10, (1 + t.roughness) / 2)) : i.push(...Ce(qe(l), 10, (1 + t.roughness) / 2));
1270
+ ]), 10, (1 + t.roughness) / 2)) : a.push(...Ce(qe(l), 10, (1 + t.roughness) / 2));
1271
1271
  }
1272
- i.length && n.push(V([i], t));
1272
+ a.length && n.push(V([a], t));
1273
1273
  }
1274
- return t.stroke !== R && n.push(r), this._d("curve", n, t);
1274
+ return t.stroke !== A && n.push(r), this._d("curve", n, t);
1275
1275
  }
1276
1276
  polygon(e, s) {
1277
1277
  const t = this._o(s), n = [], r = de(e, !0, t);
1278
- return t.fill && (t.fillStyle === "solid" ? n.push(Se([e], t)) : n.push(V([e], t))), t.stroke !== R && n.push(r), this._d("polygon", n, t);
1278
+ return t.fill && (t.fillStyle === "solid" ? n.push(Se([e], t)) : n.push(V([e], t))), t.stroke !== A && n.push(r), this._d("polygon", n, t);
1279
1279
  }
1280
1280
  path(e, s) {
1281
1281
  const t = this._o(s), n = [];
1282
1282
  if (!e)
1283
1283
  return this._d("path", n, t);
1284
1284
  e = (e || "").replace(/\n/g, " ").replace(/(-\s)/g, "-").replace("/(ss)/g", " ");
1285
- const r = t.fill && t.fill !== "transparent" && t.fill !== R, i = t.stroke !== R, a = !!(t.simplification && t.simplification < 1), c = a ? 4 - 4 * (t.simplification || 1) : (1 + t.roughness) / 2, u = Dt(e, 1, c), l = Ne(e, t);
1285
+ const r = t.fill && t.fill !== "transparent" && t.fill !== A, a = t.stroke !== A, i = !!(t.simplification && t.simplification < 1), c = i ? 4 - 4 * (t.simplification || 1) : (1 + t.roughness) / 2, u = Dt(e, 1, c), l = Ne(e, t);
1286
1286
  if (r)
1287
1287
  if (t.fillStyle === "solid")
1288
1288
  if (u.length === 1) {
@@ -1295,14 +1295,14 @@ class ve {
1295
1295
  n.push(Se(u, t));
1296
1296
  else
1297
1297
  n.push(V(u, t));
1298
- return i && (a ? u.forEach((h) => {
1298
+ return a && (i ? u.forEach((h) => {
1299
1299
  n.push(de(h, !1, t));
1300
1300
  }) : n.push(l)), this._d("path", n, t);
1301
1301
  }
1302
1302
  opsToPath(e, s) {
1303
1303
  let t = "";
1304
1304
  for (const n of e.ops) {
1305
- const r = typeof s == "number" && s >= 0 ? n.data.map((i) => +i.toFixed(s)) : n.data;
1305
+ const r = typeof s == "number" && s >= 0 ? n.data.map((a) => +a.toFixed(s)) : n.data;
1306
1306
  switch (n.op) {
1307
1307
  case "move":
1308
1308
  t += `M${r[0]} ${r[1]} `;
@@ -1320,29 +1320,29 @@ class ve {
1320
1320
  toPaths(e) {
1321
1321
  const s = e.sets || [], t = e.options || this.defaultOptions, n = [];
1322
1322
  for (const r of s) {
1323
- let i = null;
1323
+ let a = null;
1324
1324
  switch (r.type) {
1325
1325
  case "path":
1326
- i = {
1326
+ a = {
1327
1327
  d: this.opsToPath(r),
1328
1328
  stroke: t.stroke,
1329
1329
  strokeWidth: t.strokeWidth,
1330
- fill: R
1330
+ fill: A
1331
1331
  };
1332
1332
  break;
1333
1333
  case "fillPath":
1334
- i = {
1334
+ a = {
1335
1335
  d: this.opsToPath(r),
1336
- stroke: R,
1336
+ stroke: A,
1337
1337
  strokeWidth: 0,
1338
- fill: t.fill || R
1338
+ fill: t.fill || A
1339
1339
  };
1340
1340
  break;
1341
1341
  case "fillSketch":
1342
- i = this.fillSketch(r, t);
1342
+ a = this.fillSketch(r, t);
1343
1343
  break;
1344
1344
  }
1345
- i && n.push(i);
1345
+ a && n.push(a);
1346
1346
  }
1347
1347
  return n;
1348
1348
  }
@@ -1350,9 +1350,9 @@ class ve {
1350
1350
  let t = s.fillWeight;
1351
1351
  return t < 0 && (t = s.strokeWidth / 2), {
1352
1352
  d: this.opsToPath(e),
1353
- stroke: s.fill || R,
1353
+ stroke: s.fill || A,
1354
1354
  strokeWidth: t,
1355
- fill: R
1355
+ fill: A
1356
1356
  };
1357
1357
  }
1358
1358
  _mergedShape(e) {
@@ -1365,19 +1365,19 @@ class zt {
1365
1365
  }
1366
1366
  draw(e) {
1367
1367
  const s = e.sets || [], t = e.options || this.getDefaultOptions(), n = this.ctx, r = e.options.fixedDecimalPlaceDigits;
1368
- for (const i of s)
1369
- switch (i.type) {
1368
+ for (const a of s)
1369
+ switch (a.type) {
1370
1370
  case "path":
1371
- n.save(), n.strokeStyle = t.stroke === "none" ? "transparent" : t.stroke, n.lineWidth = t.strokeWidth, t.strokeLineDash && n.setLineDash(t.strokeLineDash), t.strokeLineDashOffset && (n.lineDashOffset = t.strokeLineDashOffset), this._drawToContext(n, i, r), n.restore();
1371
+ n.save(), n.strokeStyle = t.stroke === "none" ? "transparent" : t.stroke, n.lineWidth = t.strokeWidth, t.strokeLineDash && n.setLineDash(t.strokeLineDash), t.strokeLineDashOffset && (n.lineDashOffset = t.strokeLineDashOffset), this._drawToContext(n, a, r), n.restore();
1372
1372
  break;
1373
1373
  case "fillPath": {
1374
1374
  n.save(), n.fillStyle = t.fill || "";
1375
- const a = e.shape === "curve" || e.shape === "polygon" || e.shape === "path" ? "evenodd" : "nonzero";
1376
- this._drawToContext(n, i, r, a), n.restore();
1375
+ const i = e.shape === "curve" || e.shape === "polygon" || e.shape === "path" ? "evenodd" : "nonzero";
1376
+ this._drawToContext(n, a, r, i), n.restore();
1377
1377
  break;
1378
1378
  }
1379
1379
  case "fillSketch":
1380
- this.fillSketch(n, i, t);
1380
+ this.fillSketch(n, a, t);
1381
1381
  break;
1382
1382
  }
1383
1383
  }
@@ -1388,16 +1388,16 @@ class zt {
1388
1388
  _drawToContext(e, s, t, n = "nonzero") {
1389
1389
  e.beginPath();
1390
1390
  for (const r of s.ops) {
1391
- const i = typeof t == "number" && t >= 0 ? r.data.map((a) => +a.toFixed(t)) : r.data;
1391
+ const a = typeof t == "number" && t >= 0 ? r.data.map((i) => +i.toFixed(t)) : r.data;
1392
1392
  switch (r.op) {
1393
1393
  case "move":
1394
- e.moveTo(i[0], i[1]);
1394
+ e.moveTo(a[0], a[1]);
1395
1395
  break;
1396
1396
  case "bcurveTo":
1397
- e.bezierCurveTo(i[0], i[1], i[2], i[3], i[4], i[5]);
1397
+ e.bezierCurveTo(a[0], a[1], a[2], a[3], a[4], a[5]);
1398
1398
  break;
1399
1399
  case "lineTo":
1400
- e.lineTo(i[0], i[1]);
1400
+ e.lineTo(a[0], a[1]);
1401
1401
  break;
1402
1402
  }
1403
1403
  }
@@ -1410,16 +1410,16 @@ class zt {
1410
1410
  return this.gen.defaultOptions;
1411
1411
  }
1412
1412
  line(e, s, t, n, r) {
1413
- const i = this.gen.line(e, s, t, n, r);
1414
- return this.draw(i), i;
1413
+ const a = this.gen.line(e, s, t, n, r);
1414
+ return this.draw(a), a;
1415
1415
  }
1416
1416
  rectangle(e, s, t, n, r) {
1417
- const i = this.gen.rectangle(e, s, t, n, r);
1418
- return this.draw(i), i;
1417
+ const a = this.gen.rectangle(e, s, t, n, r);
1418
+ return this.draw(a), a;
1419
1419
  }
1420
1420
  ellipse(e, s, t, n, r) {
1421
- const i = this.gen.ellipse(e, s, t, n, r);
1422
- return this.draw(i), i;
1421
+ const a = this.gen.ellipse(e, s, t, n, r);
1422
+ return this.draw(a), a;
1423
1423
  }
1424
1424
  circle(e, s, t, n) {
1425
1425
  const r = this.gen.circle(e, s, t, n);
@@ -1433,8 +1433,8 @@ class zt {
1433
1433
  const t = this.gen.polygon(e, s);
1434
1434
  return this.draw(t), t;
1435
1435
  }
1436
- arc(e, s, t, n, r, i, a = !1, c) {
1437
- const u = this.gen.arc(e, s, t, n, r, i, a, c);
1436
+ arc(e, s, t, n, r, a, i = !1, c) {
1437
+ const u = this.gen.arc(e, s, t, n, r, a, i, c);
1438
1438
  return this.draw(u), u;
1439
1439
  }
1440
1440
  curve(e, s) {
@@ -1452,20 +1452,20 @@ class It {
1452
1452
  this.svg = e, this.gen = new ve(s);
1453
1453
  }
1454
1454
  draw(e) {
1455
- const s = e.sets || [], t = e.options || this.getDefaultOptions(), n = this.svg.ownerDocument || window.document, r = n.createElementNS(he, "g"), i = e.options.fixedDecimalPlaceDigits;
1456
- for (const a of s) {
1455
+ const s = e.sets || [], t = e.options || this.getDefaultOptions(), n = this.svg.ownerDocument || window.document, r = n.createElementNS(he, "g"), a = e.options.fixedDecimalPlaceDigits;
1456
+ for (const i of s) {
1457
1457
  let c = null;
1458
- switch (a.type) {
1458
+ switch (i.type) {
1459
1459
  case "path": {
1460
- c = n.createElementNS(he, "path"), c.setAttribute("d", this.opsToPath(a, i)), c.setAttribute("stroke", t.stroke), c.setAttribute("stroke-width", t.strokeWidth + ""), c.setAttribute("fill", "none"), t.strokeLineDash && c.setAttribute("stroke-dasharray", t.strokeLineDash.join(" ").trim()), t.strokeLineDashOffset && c.setAttribute("stroke-dashoffset", `${t.strokeLineDashOffset}`);
1460
+ c = n.createElementNS(he, "path"), c.setAttribute("d", this.opsToPath(i, a)), c.setAttribute("stroke", t.stroke), c.setAttribute("stroke-width", t.strokeWidth + ""), c.setAttribute("fill", "none"), t.strokeLineDash && c.setAttribute("stroke-dasharray", t.strokeLineDash.join(" ").trim()), t.strokeLineDashOffset && c.setAttribute("stroke-dashoffset", `${t.strokeLineDashOffset}`);
1461
1461
  break;
1462
1462
  }
1463
1463
  case "fillPath": {
1464
- c = n.createElementNS(he, "path"), c.setAttribute("d", this.opsToPath(a, i)), c.setAttribute("stroke", "none"), c.setAttribute("stroke-width", "0"), c.setAttribute("fill", t.fill || ""), (e.shape === "curve" || e.shape === "polygon") && c.setAttribute("fill-rule", "evenodd");
1464
+ c = n.createElementNS(he, "path"), c.setAttribute("d", this.opsToPath(i, a)), c.setAttribute("stroke", "none"), c.setAttribute("stroke-width", "0"), c.setAttribute("fill", t.fill || ""), (e.shape === "curve" || e.shape === "polygon") && c.setAttribute("fill-rule", "evenodd");
1465
1465
  break;
1466
1466
  }
1467
1467
  case "fillSketch": {
1468
- c = this.fillSketch(n, a, t);
1468
+ c = this.fillSketch(n, i, t);
1469
1469
  break;
1470
1470
  }
1471
1471
  }
@@ -1489,16 +1489,16 @@ class It {
1489
1489
  return this.gen.opsToPath(e, s);
1490
1490
  }
1491
1491
  line(e, s, t, n, r) {
1492
- const i = this.gen.line(e, s, t, n, r);
1493
- return this.draw(i);
1492
+ const a = this.gen.line(e, s, t, n, r);
1493
+ return this.draw(a);
1494
1494
  }
1495
1495
  rectangle(e, s, t, n, r) {
1496
- const i = this.gen.rectangle(e, s, t, n, r);
1497
- return this.draw(i);
1496
+ const a = this.gen.rectangle(e, s, t, n, r);
1497
+ return this.draw(a);
1498
1498
  }
1499
1499
  ellipse(e, s, t, n, r) {
1500
- const i = this.gen.ellipse(e, s, t, n, r);
1501
- return this.draw(i);
1500
+ const a = this.gen.ellipse(e, s, t, n, r);
1501
+ return this.draw(a);
1502
1502
  }
1503
1503
  circle(e, s, t, n) {
1504
1504
  const r = this.gen.circle(e, s, t, n);
@@ -1512,8 +1512,8 @@ class It {
1512
1512
  const t = this.gen.polygon(e, s);
1513
1513
  return this.draw(t);
1514
1514
  }
1515
- arc(e, s, t, n, r, i, a = !1, c) {
1516
- const u = this.gen.arc(e, s, t, n, r, i, a, c);
1515
+ arc(e, s, t, n, r, a, i = !1, c) {
1516
+ const u = this.gen.arc(e, s, t, n, r, a, i, c);
1517
1517
  return this.draw(u);
1518
1518
  }
1519
1519
  curve(e, s) {
@@ -1525,7 +1525,7 @@ class It {
1525
1525
  return this.draw(t);
1526
1526
  }
1527
1527
  }
1528
- const L = {
1528
+ const C = {
1529
1529
  canvas(o, e) {
1530
1530
  return new zt(o, e);
1531
1531
  },
@@ -1635,40 +1635,40 @@ const L = {
1635
1635
  ...o?.radius
1636
1636
  }
1637
1637
  };
1638
- return /* @__PURE__ */ w.jsx(et.Provider, { value: s, children: e });
1639
- }, A = () => rt(et), Vt = ({
1638
+ return /* @__PURE__ */ M.jsx(et.Provider, { value: s, children: e });
1639
+ }, L = () => rt(et), Vt = ({
1640
1640
  strokeWeight: o = "medium",
1641
1641
  radius: e = "md",
1642
1642
  size: s = "sm",
1643
1643
  backgroundColor: t,
1644
1644
  children: n,
1645
1645
  fillStyle: r,
1646
- ...i
1646
+ ...a
1647
1647
  }) => {
1648
- const a = A(), c = E(null), [u, l] = Q(!1), h = a.buttonSize[s].width, f = a.buttonSize[s].height, d = a.buttonSize[s].fontSize;
1649
- return C(() => {
1648
+ const i = L(), c = O(null), [u, l] = Q(!1), h = i.buttonSize[s].width, f = i.buttonSize[s].height, d = i.buttonSize[s].fontSize;
1649
+ return R(() => {
1650
1650
  if (!c.current) return;
1651
- const g = L.svg(c.current);
1651
+ const g = C.svg(c.current);
1652
1652
  c.current.innerHTML = "";
1653
- const m = a.stroke[o], b = g.path(
1654
- K(0, 0, h, f, a.radius[e]),
1653
+ const m = i.stroke[o], k = g.path(
1654
+ K(0, 0, h, f, i.radius[e]),
1655
1655
  {
1656
1656
  stroke: m.color,
1657
1657
  strokeWidth: m.width,
1658
- fill: t ?? a.fill.background,
1658
+ fill: t ?? i.fill.background,
1659
1659
  fillStyle: r,
1660
- roughness: u ? a.roughness.roughness + 1 : a.roughness.roughness,
1661
- bowing: a.roughness.bowing
1660
+ roughness: u ? i.roughness.roughness + 1 : i.roughness.roughness,
1661
+ bowing: i.roughness.bowing
1662
1662
  }
1663
1663
  );
1664
- c.current.appendChild(b);
1665
- }, [u, o, e, a]), /* @__PURE__ */ w.jsxs(
1664
+ c.current.appendChild(k);
1665
+ }, [u, o, e, i]), /* @__PURE__ */ M.jsxs(
1666
1666
  "button",
1667
1667
  {
1668
- ...i,
1668
+ ...a,
1669
1669
  onMouseEnter: () => l(!0),
1670
1670
  onMouseLeave: () => l(!1),
1671
- className: `${Nt["drawui-button"]} ${i.className ?? ""}`,
1671
+ className: `${Nt["drawui-button"]} ${a.className ?? ""}`,
1672
1672
  style: {
1673
1673
  position: "relative",
1674
1674
  width: h,
@@ -1678,7 +1678,7 @@ const L = {
1678
1678
  cursor: "pointer"
1679
1679
  },
1680
1680
  children: [
1681
- /* @__PURE__ */ w.jsx(
1681
+ /* @__PURE__ */ M.jsx(
1682
1682
  "svg",
1683
1683
  {
1684
1684
  ref: c,
@@ -1687,7 +1687,7 @@ const L = {
1687
1687
  style: { position: "absolute", inset: 0 }
1688
1688
  }
1689
1689
  ),
1690
- /* @__PURE__ */ w.jsx(
1690
+ /* @__PURE__ */ M.jsx(
1691
1691
  "span",
1692
1692
  {
1693
1693
  style: {
@@ -1706,10 +1706,10 @@ const L = {
1706
1706
  "drawui-card-header": "_drawui-card-header_vhoat_7",
1707
1707
  "drawui-card-body": "_drawui-card-body_vhoat_12",
1708
1708
  "drawui-card-footer": "_drawui-card-footer_vhoat_17"
1709
- }, Wt = "_vertical_1tdom_6", Ft = "_horizontal_1tdom_11", Pe = {
1709
+ }, Wt = "_vertical_1tdom_6", Ht = "_horizontal_1tdom_11", Pe = {
1710
1710
  "drawui-divider": "_drawui-divider_1tdom_1",
1711
1711
  vertical: Wt,
1712
- horizontal: Ft
1712
+ horizontal: Ht
1713
1713
  }, Ge = ({
1714
1714
  strokeWeight: o = "medium",
1715
1715
  width: e = "100%",
@@ -1717,38 +1717,38 @@ const L = {
1717
1717
  className: t,
1718
1718
  fillStyle: n
1719
1719
  }) => {
1720
- const r = A(), i = E(null);
1721
- return C(() => {
1722
- if (!i.current) return;
1723
- i.current.innerHTML = "";
1724
- const a = L.svg(i.current), c = r.stroke[o];
1720
+ const r = L(), a = O(null);
1721
+ return R(() => {
1722
+ if (!a.current) return;
1723
+ a.current.innerHTML = "";
1724
+ const i = C.svg(a.current), c = r.stroke[o];
1725
1725
  if (s) {
1726
- const u = typeof e == "number" ? e : 100, l = a.line(0, 0, 0, u, {
1726
+ const u = typeof e == "number" ? e : 100, l = i.line(0, 0, 0, u, {
1727
1727
  stroke: c.color,
1728
1728
  strokeWidth: c.width,
1729
1729
  roughness: r.roughness.roughness,
1730
1730
  bowing: r.roughness.bowing
1731
1731
  });
1732
- i.current.appendChild(l);
1732
+ a.current.appendChild(l);
1733
1733
  } else {
1734
- const u = typeof e == "number" ? e : 300, l = a.line(0, 0, u, 0, {
1734
+ const u = typeof e == "number" ? e : 300, l = i.line(0, 0, u, 0, {
1735
1735
  stroke: c.color,
1736
1736
  strokeWidth: c.width,
1737
1737
  roughness: r.roughness.roughness,
1738
1738
  bowing: r.roughness.bowing,
1739
1739
  fillStyle: n
1740
1740
  });
1741
- i.current.appendChild(l);
1741
+ a.current.appendChild(l);
1742
1742
  }
1743
- }, [r, o, e, s]), /* @__PURE__ */ w.jsx(
1743
+ }, [r, o, e, s]), /* @__PURE__ */ M.jsx(
1744
1744
  "div",
1745
1745
  {
1746
1746
  className: `${Pe["drawui-divider"]} ${s ? Pe.vertical : Pe.horizontal} ${t ?? ""}`,
1747
1747
  style: { width: s ? void 0 : e },
1748
- children: /* @__PURE__ */ w.jsx(
1748
+ children: /* @__PURE__ */ M.jsx(
1749
1749
  "svg",
1750
1750
  {
1751
- ref: i,
1751
+ ref: a,
1752
1752
  width: s ? 2 : e,
1753
1753
  height: s ? e : 2,
1754
1754
  style: { display: "block" }
@@ -1760,59 +1760,82 @@ const L = {
1760
1760
  strokeWeight: o = "medium",
1761
1761
  radius: e = "md",
1762
1762
  width: s = 300,
1763
- height: t = 200,
1763
+ height: t,
1764
+ //optional, card adjust height itself by content
1764
1765
  backgroundColor: n,
1765
1766
  header: r,
1766
- footer: i,
1767
- fillStyle: a,
1767
+ footer: a,
1768
+ fillStyle: i,
1768
1769
  children: c,
1769
1770
  ...u
1770
1771
  }) => {
1771
- const l = A(), h = E(null), [f, d] = Q(!1);
1772
- return C(() => {
1772
+ const l = L(), h = O(null), f = O(null), [d, g] = Q(t ?? 200);
1773
+ R(() => {
1774
+ if (!f.current || t) return;
1775
+ const k = () => {
1776
+ if (f.current) {
1777
+ const y = f.current.scrollHeight;
1778
+ g(y);
1779
+ }
1780
+ };
1781
+ k();
1782
+ const v = new ResizeObserver(k);
1783
+ return v.observe(f.current), () => v.disconnect();
1784
+ }, [c, r, a, t]), R(() => {
1773
1785
  if (!h.current) return;
1774
- const g = L.svg(h.current);
1786
+ const k = C.svg(h.current);
1775
1787
  h.current.innerHTML = "";
1776
- const m = l.stroke[o], b = g.path(
1777
- K(0, 0, s, t, l.radius[e]),
1788
+ const v = l.stroke[o], y = t ?? d, D = k.path(
1789
+ K(0, 0, s, y, l.radius[e]),
1778
1790
  {
1779
- stroke: m.color,
1780
- strokeWidth: m.width,
1791
+ stroke: v.color,
1792
+ strokeWidth: v.width,
1781
1793
  fill: n ?? l.fill.background,
1782
- roughness: f ? l.roughness.roughness + 1 : l.roughness.roughness,
1794
+ roughness: l.roughness.roughness,
1783
1795
  bowing: l.roughness.bowing,
1784
- fillStyle: a
1796
+ fillStyle: i
1785
1797
  }
1786
1798
  );
1787
- h.current.appendChild(b);
1788
- }, [o, e, s, t, n, l]), /* @__PURE__ */ w.jsxs(
1799
+ h.current.appendChild(D);
1800
+ }, [
1801
+ o,
1802
+ e,
1803
+ s,
1804
+ d,
1805
+ t,
1806
+ n,
1807
+ l,
1808
+ i
1809
+ ]);
1810
+ const m = t ?? d;
1811
+ return /* @__PURE__ */ M.jsxs(
1789
1812
  "div",
1790
1813
  {
1791
1814
  ...u,
1815
+ ref: f,
1792
1816
  className: `${fe["drawui-card"]} ${u.className ?? ""}`,
1793
- onMouseEnter: () => d(!0),
1794
- onMouseLeave: () => d(!1),
1795
1817
  style: {
1796
1818
  position: "relative",
1797
1819
  width: s,
1798
- height: t,
1820
+ minHeight: t || "auto",
1821
+ height: t || "auto",
1799
1822
  cursor: "default",
1800
1823
  display: "flex",
1801
1824
  flexDirection: "column",
1802
1825
  overflow: "hidden"
1803
1826
  },
1804
1827
  children: [
1805
- /* @__PURE__ */ w.jsx(
1828
+ /* @__PURE__ */ M.jsx(
1806
1829
  "svg",
1807
1830
  {
1808
1831
  ref: h,
1809
1832
  width: s,
1810
- height: t,
1833
+ height: m,
1811
1834
  style: { position: "absolute", inset: 0, pointerEvents: "none" }
1812
1835
  }
1813
1836
  ),
1814
- r && /* @__PURE__ */ w.jsxs(w.Fragment, { children: [
1815
- /* @__PURE__ */ w.jsx(
1837
+ r && /* @__PURE__ */ M.jsxs(M.Fragment, { children: [
1838
+ /* @__PURE__ */ M.jsx(
1816
1839
  "div",
1817
1840
  {
1818
1841
  className: fe["drawui-card-header"],
@@ -1820,9 +1843,9 @@ const L = {
1820
1843
  children: r
1821
1844
  }
1822
1845
  ),
1823
- /* @__PURE__ */ w.jsx(Ge, { width: s, strokeWeight: "thick" })
1846
+ /* @__PURE__ */ M.jsx(Ge, { width: s, strokeWeight: "thick" })
1824
1847
  ] }),
1825
- /* @__PURE__ */ w.jsx(
1848
+ /* @__PURE__ */ M.jsx(
1826
1849
  "div",
1827
1850
  {
1828
1851
  className: fe["drawui-card-body"],
@@ -1830,14 +1853,14 @@ const L = {
1830
1853
  children: c
1831
1854
  }
1832
1855
  ),
1833
- i && /* @__PURE__ */ w.jsxs(w.Fragment, { children: [
1834
- /* @__PURE__ */ w.jsx(Ge, { width: s, strokeWeight: "thick" }),
1835
- /* @__PURE__ */ w.jsx(
1856
+ a && /* @__PURE__ */ M.jsxs(M.Fragment, { children: [
1857
+ /* @__PURE__ */ M.jsx(Ge, { width: s, strokeWeight: "thick" }),
1858
+ /* @__PURE__ */ M.jsx(
1836
1859
  "div",
1837
1860
  {
1838
1861
  className: fe["drawui-card-footer"],
1839
1862
  style: { position: "relative", zIndex: 1 },
1840
- children: i
1863
+ children: a
1841
1864
  }
1842
1865
  )
1843
1866
  ] })
@@ -1854,28 +1877,28 @@ const L = {
1854
1877
  radius: t = "md",
1855
1878
  width: n = 300,
1856
1879
  fillStyle: r,
1857
- className: i
1880
+ className: a
1858
1881
  }) => {
1859
- const a = A(), c = E(null);
1860
- return C(() => {
1882
+ const i = L(), c = O(null);
1883
+ return R(() => {
1861
1884
  if (!c.current) return;
1862
- const u = L.svg(c.current);
1885
+ const u = C.svg(c.current);
1863
1886
  c.current.innerHTML = "";
1864
- const l = a.stroke[s], h = u.path(
1865
- K(0, 0, n, 40, a.radius[t]),
1887
+ const l = i.stroke[s], h = u.path(
1888
+ K(0, 0, n, 40, i.radius[t]),
1866
1889
  {
1867
1890
  stroke: l.color,
1868
1891
  strokeWidth: l.width,
1869
1892
  fill: "transparent",
1870
- roughness: a.roughness.roughness,
1871
- bowing: a.roughness.bowing,
1893
+ roughness: i.roughness.roughness,
1894
+ bowing: i.roughness.bowing,
1872
1895
  fillStyle: r
1873
1896
  }
1874
1897
  );
1875
1898
  c.current.appendChild(h);
1876
- }, [a, s, t, n]), /* @__PURE__ */ w.jsx("div", { className: `${Ve["drawui-collapse"]} ${i ?? ""}`, style: { width: n }, children: /* @__PURE__ */ w.jsxs("details", { children: [
1877
- /* @__PURE__ */ w.jsxs("summary", { style: { position: "relative" }, children: [
1878
- /* @__PURE__ */ w.jsx(
1899
+ }, [i, s, t, n]), /* @__PURE__ */ M.jsx("div", { className: `${Ve["drawui-collapse"]} ${a ?? ""}`, style: { width: n }, children: /* @__PURE__ */ M.jsxs("details", { children: [
1900
+ /* @__PURE__ */ M.jsxs("summary", { style: { position: "relative" }, children: [
1901
+ /* @__PURE__ */ M.jsx(
1879
1902
  "svg",
1880
1903
  {
1881
1904
  ref: c,
@@ -1884,43 +1907,43 @@ const L = {
1884
1907
  style: { position: "absolute", inset: 0, pointerEvents: "none" }
1885
1908
  }
1886
1909
  ),
1887
- /* @__PURE__ */ w.jsx("span", { style: { position: "relative", zIndex: 1 }, children: o })
1910
+ /* @__PURE__ */ M.jsx("span", { style: { position: "relative", zIndex: 1 }, children: o })
1888
1911
  ] }),
1889
- /* @__PURE__ */ w.jsx("div", { className: Ve["drawui-collapse-content"], children: e })
1912
+ /* @__PURE__ */ M.jsx("div", { className: Ve["drawui-collapse-content"], children: e })
1890
1913
  ] }) });
1891
- }, Ht = {}, Zt = ({
1914
+ }, Ft = {}, Zt = ({
1892
1915
  strokeWeight: o = "medium",
1893
1916
  radius: e = "md",
1894
1917
  size: s = "sm",
1895
1918
  icon: t,
1896
1919
  fillStyle: n,
1897
1920
  backgroundColor: r,
1898
- ...i
1921
+ ...a
1899
1922
  }) => {
1900
- const a = A(), c = E(null), [u, l] = Q(!1), h = a.buttonSize[s].height;
1901
- return C(() => {
1923
+ const i = L(), c = O(null), [u, l] = Q(!1), h = i.buttonSize[s].height;
1924
+ return R(() => {
1902
1925
  if (!c.current) return;
1903
- const f = L.svg(c.current);
1926
+ const f = C.svg(c.current);
1904
1927
  c.current.innerHTML = "";
1905
- const d = a.stroke[o], g = f.path(
1906
- K(0, 0, h, h, a.radius[e]),
1928
+ const d = i.stroke[o], g = f.path(
1929
+ K(0, 0, h, h, i.radius[e]),
1907
1930
  {
1908
1931
  stroke: d.color,
1909
1932
  strokeWidth: d.width,
1910
- fill: r ?? a.fill.background,
1911
- roughness: u ? a.roughness.roughness + 1 : a.roughness.roughness,
1912
- bowing: a.roughness.bowing,
1933
+ fill: r ?? i.fill.background,
1934
+ roughness: u ? i.roughness.roughness + 1 : i.roughness.roughness,
1935
+ bowing: i.roughness.bowing,
1913
1936
  fillStyle: n
1914
1937
  }
1915
1938
  );
1916
1939
  c.current.appendChild(g);
1917
- }, [u, o, e, a, h, r]), /* @__PURE__ */ w.jsxs(
1940
+ }, [u, o, e, i, h, r]), /* @__PURE__ */ M.jsxs(
1918
1941
  "button",
1919
1942
  {
1920
- ...i,
1943
+ ...a,
1921
1944
  onMouseEnter: () => l(!0),
1922
1945
  onMouseLeave: () => l(!1),
1923
- className: `${Ht["drawui-button"]} ${i.className ?? ""}`,
1946
+ className: `${Ft["drawui-button"]} ${a.className ?? ""}`,
1924
1947
  style: {
1925
1948
  position: "relative",
1926
1949
  width: h,
@@ -1935,7 +1958,7 @@ const L = {
1935
1958
  padding: 0
1936
1959
  },
1937
1960
  children: [
1938
- /* @__PURE__ */ w.jsx(
1961
+ /* @__PURE__ */ M.jsx(
1939
1962
  "svg",
1940
1963
  {
1941
1964
  ref: c,
@@ -1948,7 +1971,7 @@ const L = {
1948
1971
  }
1949
1972
  }
1950
1973
  ),
1951
- /* @__PURE__ */ w.jsx(
1974
+ /* @__PURE__ */ M.jsx(
1952
1975
  "span",
1953
1976
  {
1954
1977
  style: {
@@ -1974,36 +1997,36 @@ const L = {
1974
1997
  inputSize: t = "md",
1975
1998
  className: n,
1976
1999
  fillStyle: r,
1977
- style: i,
1978
- ...a
2000
+ style: a,
2001
+ ...i
1979
2002
  }) => {
1980
- const c = A(), u = E(null), l = E(null), [h, f] = Q(!1), [d, g] = Q(!1), m = c.inputSize[t].height, b = c.inputSize[t].fontSize, v = c.inputSize[t].paddingX;
1981
- return C(() => {
2003
+ const c = L(), u = O(null), l = O(null), [h, f] = Q(!1), [d, g] = Q(!1), m = c.inputSize[t].height, k = c.inputSize[t].fontSize, v = c.inputSize[t].paddingX;
2004
+ return R(() => {
1982
2005
  if (!u.current || !l.current) return;
1983
- const y = l.current.offsetWidth, N = L.svg(u.current);
2006
+ const y = l.current.offsetWidth, D = C.svg(u.current);
1984
2007
  u.current.innerHTML = "";
1985
- const F = c.stroke[o], H = N.path(
2008
+ const H = c.stroke[o], F = D.path(
1986
2009
  K(0, 0, y, m, c.radius[s]),
1987
2010
  {
1988
- stroke: F.color,
1989
- strokeWidth: F.width,
2011
+ stroke: H.color,
2012
+ strokeWidth: H.width,
1990
2013
  fill: e ?? c.fill.background,
1991
2014
  roughness: h ? c.roughness.roughness + 1 : c.roughness.roughness,
1992
2015
  bowing: c.roughness.bowing,
1993
2016
  fillStyle: r
1994
2017
  }
1995
2018
  );
1996
- u.current.appendChild(H);
1997
- }, [h, d, o, s, t, c, e]), /* @__PURE__ */ w.jsxs(
2019
+ u.current.appendChild(F);
2020
+ }, [h, d, o, s, t, c, e]), /* @__PURE__ */ M.jsxs(
1998
2021
  "div",
1999
2022
  {
2000
2023
  ref: l,
2001
2024
  className: `${Ye["drawui-input"]} ${n ?? ""}`,
2002
- style: { height: m, ...i },
2025
+ style: { height: m, ...a },
2003
2026
  onMouseEnter: () => g(!0),
2004
2027
  onMouseLeave: () => g(!1),
2005
2028
  children: [
2006
- /* @__PURE__ */ w.jsx(
2029
+ /* @__PURE__ */ M.jsx(
2007
2030
  "svg",
2008
2031
  {
2009
2032
  ref: u,
@@ -2012,22 +2035,22 @@ const L = {
2012
2035
  style: { position: "absolute", inset: 0 }
2013
2036
  }
2014
2037
  ),
2015
- /* @__PURE__ */ w.jsx(
2038
+ /* @__PURE__ */ M.jsx(
2016
2039
  "input",
2017
2040
  {
2018
- ...a,
2041
+ ...i,
2019
2042
  className: Ye["drawui-input-field"],
2020
2043
  style: {
2021
2044
  height: m,
2022
- fontSize: b,
2045
+ fontSize: k,
2023
2046
  paddingLeft: v,
2024
2047
  paddingRight: v
2025
2048
  },
2026
2049
  onFocus: (y) => {
2027
- f(!0), a.onFocus?.(y);
2050
+ f(!0), i.onFocus?.(y);
2028
2051
  },
2029
2052
  onBlur: (y) => {
2030
- f(!1), a.onBlur?.(y);
2053
+ f(!1), i.onBlur?.(y);
2031
2054
  }
2032
2055
  }
2033
2056
  )
@@ -2040,54 +2063,54 @@ const L = {
2040
2063
  color: s,
2041
2064
  className: t
2042
2065
  }) => {
2043
- const n = A(), r = E(null);
2044
- return C(() => {
2066
+ const n = L(), r = O(null);
2067
+ return R(() => {
2045
2068
  if (!r.current) return;
2046
- const i = L.svg(r.current);
2069
+ const a = C.svg(r.current);
2047
2070
  r.current.innerHTML = "";
2048
- const a = n.stroke[e], c = s ?? a.color, u = i.path(
2071
+ const i = n.stroke[e], c = s ?? i.color, u = a.path(
2049
2072
  "M6 18 H18 L16 12 A6 6 0 0 0 8 12 Z",
2050
2073
  {
2051
2074
  stroke: c,
2052
- strokeWidth: a.width,
2075
+ strokeWidth: i.width,
2053
2076
  roughness: n.roughness.roughness,
2054
2077
  bowing: n.roughness.bowing,
2055
2078
  fill: "transparent"
2056
2079
  }
2057
2080
  );
2058
2081
  r.current.appendChild(u);
2059
- const l = i.circle(12, 18, 2, {
2082
+ const l = a.circle(12, 18, 2, {
2060
2083
  stroke: c,
2061
- strokeWidth: a.width,
2084
+ strokeWidth: i.width,
2062
2085
  roughness: n.roughness.roughness,
2063
2086
  bowing: n.roughness.bowing,
2064
2087
  fill: "transparent"
2065
2088
  });
2066
2089
  r.current.appendChild(l);
2067
- }, [n, e, s]), /* @__PURE__ */ w.jsx("svg", { ref: r, width: o, height: o, viewBox: "0 0 24 24", className: t });
2090
+ }, [n, e, s]), /* @__PURE__ */ M.jsx("svg", { ref: r, width: o, height: o, viewBox: "0 0 24 24", className: t });
2068
2091
  }, Qt = ({
2069
2092
  size: o = 24,
2070
2093
  strokeWeight: e = "medium",
2071
2094
  color: s,
2072
2095
  className: t
2073
2096
  }) => {
2074
- const n = A(), r = E(null);
2075
- return C(() => {
2097
+ const n = L(), r = O(null);
2098
+ return R(() => {
2076
2099
  if (!r.current) return;
2077
- const i = L.svg(r.current);
2100
+ const a = C.svg(r.current);
2078
2101
  r.current.innerHTML = "";
2079
- const a = n.stroke[e], c = s ?? a.color, u = i.path(
2102
+ const i = n.stroke[e], c = s ?? i.color, u = a.path(
2080
2103
  "M2 12 L12 2 L22 12 V22 H2 Z",
2081
2104
  {
2082
2105
  stroke: c,
2083
- strokeWidth: a.width,
2106
+ strokeWidth: i.width,
2084
2107
  roughness: n.roughness.roughness,
2085
2108
  bowing: n.roughness.bowing,
2086
2109
  fill: "transparent"
2087
2110
  }
2088
2111
  );
2089
2112
  r.current.appendChild(u);
2090
- }, [n, e, s]), /* @__PURE__ */ w.jsx(
2113
+ }, [n, e, s]), /* @__PURE__ */ M.jsx(
2091
2114
  "svg",
2092
2115
  {
2093
2116
  ref: r,
@@ -2103,68 +2126,68 @@ const L = {
2103
2126
  color: s,
2104
2127
  className: t
2105
2128
  }) => {
2106
- const n = A(), r = E(null);
2107
- return C(() => {
2129
+ const n = L(), r = O(null);
2130
+ return R(() => {
2108
2131
  if (!r.current) return;
2109
- const i = L.svg(r.current);
2132
+ const a = C.svg(r.current);
2110
2133
  r.current.innerHTML = "";
2111
- const a = n.stroke[e], c = s ?? a.color, u = i.line(4, 12, 20, 12, {
2134
+ const i = n.stroke[e], c = s ?? i.color, u = a.line(4, 12, 20, 12, {
2112
2135
  stroke: c,
2113
- strokeWidth: a.width,
2136
+ strokeWidth: i.width,
2114
2137
  roughness: n.roughness.roughness,
2115
2138
  bowing: n.roughness.bowing
2116
2139
  });
2117
2140
  r.current.appendChild(u);
2118
- }, [n, e, s]), /* @__PURE__ */ w.jsx("svg", { ref: r, width: o, height: o, viewBox: "0 0 24 24", className: t });
2141
+ }, [n, e, s]), /* @__PURE__ */ M.jsx("svg", { ref: r, width: o, height: o, viewBox: "0 0 24 24", className: t });
2119
2142
  }, Kt = ({
2120
2143
  size: o = 24,
2121
2144
  strokeWeight: e = "medium",
2122
2145
  color: s,
2123
2146
  className: t
2124
2147
  }) => {
2125
- const n = A(), r = E(null);
2126
- return C(() => {
2148
+ const n = L(), r = O(null);
2149
+ return R(() => {
2127
2150
  if (!r.current) return;
2128
- const i = L.svg(r.current);
2151
+ const a = C.svg(r.current);
2129
2152
  r.current.innerHTML = "";
2130
- const a = n.stroke[e], c = s ?? a.color, u = i.line(12, 4, 12, 20, {
2153
+ const i = n.stroke[e], c = s ?? i.color, u = a.line(12, 4, 12, 20, {
2131
2154
  stroke: c,
2132
- strokeWidth: a.width,
2155
+ strokeWidth: i.width,
2133
2156
  roughness: n.roughness.roughness,
2134
2157
  bowing: n.roughness.bowing
2135
- }), l = i.line(4, 12, 20, 12, {
2158
+ }), l = a.line(4, 12, 20, 12, {
2136
2159
  stroke: c,
2137
- strokeWidth: a.width,
2160
+ strokeWidth: i.width,
2138
2161
  roughness: n.roughness.roughness,
2139
2162
  bowing: n.roughness.bowing
2140
2163
  });
2141
2164
  r.current.appendChild(u), r.current.appendChild(l);
2142
- }, [n, e, s]), /* @__PURE__ */ w.jsx("svg", { ref: r, width: o, height: o, viewBox: "0 0 24 24", className: t });
2165
+ }, [n, e, s]), /* @__PURE__ */ M.jsx("svg", { ref: r, width: o, height: o, viewBox: "0 0 24 24", className: t });
2143
2166
  }, es = ({
2144
2167
  size: o = 24,
2145
2168
  strokeWeight: e = "medium",
2146
2169
  color: s,
2147
2170
  className: t
2148
2171
  }) => {
2149
- const n = A(), r = E(null);
2150
- return C(() => {
2172
+ const n = L(), r = O(null);
2173
+ return R(() => {
2151
2174
  if (!r.current) return;
2152
- const i = L.svg(r.current);
2175
+ const a = C.svg(r.current);
2153
2176
  r.current.innerHTML = "";
2154
- const a = n.stroke[e], c = s ?? a.color, u = i.circle(10, 10, 14, {
2177
+ const i = n.stroke[e], c = s ?? i.color, u = a.circle(10, 10, 14, {
2155
2178
  stroke: c,
2156
- strokeWidth: a.width,
2179
+ strokeWidth: i.width,
2157
2180
  roughness: n.roughness.roughness,
2158
2181
  bowing: n.roughness.bowing,
2159
2182
  fill: "transparent"
2160
- }), l = i.line(16, 16, 22, 22, {
2183
+ }), l = a.line(16, 16, 22, 22, {
2161
2184
  stroke: c,
2162
- strokeWidth: a.width,
2185
+ strokeWidth: i.width,
2163
2186
  roughness: n.roughness.roughness,
2164
2187
  bowing: n.roughness.bowing
2165
2188
  });
2166
2189
  r.current.appendChild(u), r.current.appendChild(l);
2167
- }, [n, e, s]), /* @__PURE__ */ w.jsx(
2190
+ }, [n, e, s]), /* @__PURE__ */ M.jsx(
2168
2191
  "svg",
2169
2192
  {
2170
2193
  ref: r,
@@ -2180,60 +2203,94 @@ const L = {
2180
2203
  color: s,
2181
2204
  className: t
2182
2205
  }) => {
2183
- const n = A(), r = E(null);
2184
- return C(() => {
2206
+ const n = L(), r = O(null);
2207
+ return R(() => {
2185
2208
  if (!r.current) return;
2186
- const i = L.svg(r.current);
2209
+ const a = C.svg(r.current);
2187
2210
  r.current.innerHTML = "";
2188
- const a = n.stroke[e], c = s ?? a.color, u = i.circle(12, 12, 14, {
2211
+ const i = n.stroke[e], c = s ?? i.color, u = a.circle(12, 12, 14, {
2189
2212
  stroke: c,
2190
- strokeWidth: a.width,
2213
+ strokeWidth: i.width,
2191
2214
  roughness: n.roughness.roughness,
2192
2215
  bowing: n.roughness.bowing,
2193
2216
  fill: "transparent"
2194
2217
  });
2195
2218
  r.current.appendChild(u);
2196
2219
  for (let l = 0; l < 8; l++) {
2197
- const h = l * Math.PI * 2 / 8, f = 12 + 7 * Math.cos(h), d = 12 + 7 * Math.sin(h), g = 12 + 10 * Math.cos(h), m = 12 + 10 * Math.sin(h), b = i.line(f, d, g, m, {
2220
+ const h = l * Math.PI * 2 / 8, f = 12 + 7 * Math.cos(h), d = 12 + 7 * Math.sin(h), g = 12 + 10 * Math.cos(h), m = 12 + 10 * Math.sin(h), k = a.line(f, d, g, m, {
2198
2221
  stroke: c,
2199
- strokeWidth: a.width,
2222
+ strokeWidth: i.width,
2200
2223
  roughness: n.roughness.roughness,
2201
2224
  bowing: n.roughness.bowing
2202
2225
  });
2203
- r.current.appendChild(b);
2226
+ r.current.appendChild(k);
2204
2227
  }
2205
- }, [n, e, s]), /* @__PURE__ */ w.jsx("svg", { ref: r, width: o, height: o, viewBox: "0 0 24 24", className: t });
2228
+ }, [n, e, s]), /* @__PURE__ */ M.jsx("svg", { ref: r, width: o, height: o, viewBox: "0 0 24 24", className: t });
2206
2229
  }, ss = ({
2207
2230
  size: o = 24,
2208
2231
  strokeWeight: e = "medium",
2209
2232
  color: s,
2210
2233
  className: t
2211
2234
  }) => {
2212
- const n = A(), r = E(null);
2213
- return C(() => {
2235
+ const n = L(), r = O(null);
2236
+ return R(() => {
2214
2237
  if (!r.current) return;
2215
- const i = L.svg(r.current);
2238
+ const a = C.svg(r.current);
2216
2239
  r.current.innerHTML = "";
2217
- const a = n.stroke[e], c = s ?? a.color, u = i.circle(12, 8, 6, {
2240
+ const i = n.stroke[e], c = s ?? i.color, u = a.circle(12, 8, 6, {
2218
2241
  stroke: c,
2219
- strokeWidth: a.width,
2242
+ strokeWidth: i.width,
2220
2243
  roughness: n.roughness.roughness,
2221
2244
  bowing: n.roughness.bowing,
2222
2245
  fill: "transparent"
2223
2246
  });
2224
2247
  r.current.appendChild(u);
2225
- const l = i.path(
2248
+ const l = a.path(
2226
2249
  "M4 20 Q12 16 20 20",
2227
2250
  {
2228
2251
  stroke: c,
2229
- strokeWidth: a.width,
2252
+ strokeWidth: i.width,
2230
2253
  roughness: n.roughness.roughness,
2231
2254
  bowing: n.roughness.bowing,
2232
2255
  fill: "transparent"
2233
2256
  }
2234
2257
  );
2235
2258
  r.current.appendChild(l);
2236
- }, [n, e, s]), /* @__PURE__ */ w.jsx("svg", { ref: r, width: o, height: o, viewBox: "0 0 24 24", className: t });
2259
+ }, [n, e, s]), /* @__PURE__ */ M.jsx("svg", { ref: r, width: o, height: o, viewBox: "0 0 24 24", className: t });
2260
+ }, ns = ({
2261
+ size: o = 24,
2262
+ strokeWeight: e = "medium",
2263
+ color: s,
2264
+ className: t
2265
+ }) => {
2266
+ const n = L(), r = O(null);
2267
+ return R(() => {
2268
+ if (!r.current) return;
2269
+ const a = C.svg(r.current);
2270
+ r.current.innerHTML = "";
2271
+ const i = n.stroke[e], u = {
2272
+ stroke: s ?? i.color,
2273
+ strokeWidth: i.width,
2274
+ roughness: n.roughness.roughness,
2275
+ bowing: n.roughness.bowing
2276
+ };
2277
+ r.current.appendChild(
2278
+ a.line(4, 7, 20, 7, u)
2279
+ ), r.current.appendChild(
2280
+ a.line(4, 12, 20, 12, u)
2281
+ ), r.current.appendChild(
2282
+ a.line(4, 17, 20, 17, u)
2283
+ );
2284
+ }, [n, e, s]), /* @__PURE__ */ M.jsx(
2285
+ "svg",
2286
+ {
2287
+ ref: r,
2288
+ width: o,
2289
+ height: o,
2290
+ viewBox: "0 0 24 24",
2291
+ className: t
2292
+ }
2293
+ );
2237
2294
  };
2238
2295
  export {
2239
2296
  Vt as DrawuiButton,
@@ -2244,11 +2301,12 @@ export {
2244
2301
  Xt as DrawuiInput,
2245
2302
  Gt as DrawuiThemeProvider,
2246
2303
  Ut as IconBell,
2304
+ ns as IconHamburger,
2247
2305
  Qt as IconHome,
2248
2306
  Jt as IconMinus,
2249
2307
  Kt as IconPlus,
2250
2308
  es as IconSearch,
2251
2309
  ts as IconSettings,
2252
2310
  ss as IconUser,
2253
- A as useDrawuiTheme
2311
+ L as useDrawuiTheme
2254
2312
  };