frame.identify 0.5.2 → 0.5.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.
@@ -31,23 +31,23 @@ function L(e) {
31
31
  }
32
32
  //#endregion
33
33
  //#region node_modules/@mui/utils/getScrollbarSize/getScrollbarSize.mjs
34
- function R(e = window) {
34
+ function te(e = window) {
35
35
  let t = e.document.documentElement.clientWidth;
36
36
  return e.innerWidth - t;
37
37
  }
38
38
  //#endregion
39
39
  //#region node_modules/@mui/material/Modal/ModalManager.mjs
40
- function z(e) {
40
+ function R(e) {
41
41
  let t = I(e);
42
42
  return e === t.body || e === t.documentElement ? L(e).innerWidth > t.documentElement.clientWidth : e.scrollHeight > e.clientHeight;
43
43
  }
44
- function te(e, t) {
44
+ function ne(e, t) {
45
45
  t ? e.setAttribute("aria-hidden", "true") : e.removeAttribute("aria-hidden");
46
46
  }
47
- function ne(e) {
47
+ function re(e) {
48
48
  return parseFloat(L(e).getComputedStyle(e).paddingRight) || 0;
49
49
  }
50
- function re(e) {
50
+ function z(e) {
51
51
  let t = [
52
52
  "TEMPLATE",
53
53
  "SCRIPT",
@@ -73,8 +73,8 @@ function ie(e, t, n, r, i) {
73
73
  ...r
74
74
  ];
75
75
  [].forEach.call(e.children, (e) => {
76
- let t = !a.includes(e), n = !re(e);
77
- t && n && te(e, i);
76
+ let t = !a.includes(e), n = !z(e);
77
+ t && n && ne(e, i);
78
78
  });
79
79
  }
80
80
  function ae(e, t) {
@@ -86,20 +86,20 @@ function ae(e, t) {
86
86
  let t = r.parentElement, n = L(r);
87
87
  e = t?.nodeName === "HTML" && n.getComputedStyle(t).overflowY === "scroll" ? t : r;
88
88
  }
89
- if (z(e)) {
90
- let t = R(L(e));
89
+ if (R(e)) {
90
+ let t = te(L(e));
91
91
  n.push({
92
92
  value: e.style.paddingRight,
93
93
  property: "padding-right",
94
94
  el: e
95
- }), e.style.paddingRight = `${ne(e) + t}px`;
95
+ }), e.style.paddingRight = `${re(e) + t}px`;
96
96
  let i = I(r).querySelectorAll(".mui-fixed");
97
97
  [].forEach.call(i, (e) => {
98
98
  n.push({
99
99
  value: e.style.paddingRight,
100
100
  property: "padding-right",
101
101
  el: e
102
- }), e.style.paddingRight = `${ne(e) + t}px`;
102
+ }), e.style.paddingRight = `${re(e) + t}px`;
103
103
  });
104
104
  }
105
105
  n.push({
@@ -135,7 +135,7 @@ var oe = class {
135
135
  add(e, t) {
136
136
  let n = this.modals.indexOf(e);
137
137
  if (n !== -1) return n;
138
- n = this.modals.length, this.modals.push(e), e.modalRef && te(e.modalRef, !1);
138
+ n = this.modals.length, this.modals.push(e), e.modalRef && ne(e.modalRef, !1);
139
139
  let r = B(t);
140
140
  ie(t, e.mount, e.modalRef, r, !0);
141
141
  let i = this.containers.findIndex((e) => e.container === t);
@@ -154,10 +154,10 @@ var oe = class {
154
154
  let n = this.modals.indexOf(e);
155
155
  if (n === -1) return n;
156
156
  let r = this.containers.findIndex((t) => t.modals.includes(e)), i = this.containers[r];
157
- if (i.modals.splice(i.modals.indexOf(e), 1), this.modals.splice(n, 1), i.modals.length === 0) i.restore && i.restore(), e.modalRef && te(e.modalRef, t), ie(i.container, e.mount, e.modalRef, i.hiddenSiblings, !1), this.containers.splice(r, 1);
157
+ if (i.modals.splice(i.modals.indexOf(e), 1), this.modals.splice(n, 1), i.modals.length === 0) i.restore && i.restore(), e.modalRef && ne(e.modalRef, t), ie(i.container, e.mount, e.modalRef, i.hiddenSiblings, !1), this.containers.splice(r, 1);
158
158
  else {
159
159
  let e = i.modals[i.modals.length - 1];
160
- e.modalRef && te(e.modalRef, !1);
160
+ e.modalRef && ne(e.modalRef, !1);
161
161
  }
162
162
  return n;
163
163
  }
@@ -264,19 +264,19 @@ var oe = class {
264
264
  function L(e) {
265
265
  return x(e) === c;
266
266
  }
267
- function R(e) {
267
+ function te(e) {
268
268
  return x(e) === s;
269
269
  }
270
- function z(e) {
270
+ function R(e) {
271
271
  return typeof e == "object" && !!e && e.$$typeof === n;
272
272
  }
273
- function te(e) {
273
+ function ne(e) {
274
274
  return x(e) === d;
275
275
  }
276
- function ne(e) {
276
+ function re(e) {
277
277
  return x(e) === i;
278
278
  }
279
- function re(e) {
279
+ function z(e) {
280
280
  return x(e) === h;
281
281
  }
282
282
  function ie(e) {
@@ -294,7 +294,7 @@ var oe = class {
294
294
  function se(e) {
295
295
  return x(e) === f;
296
296
  }
297
- e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = w, e.ContextProvider = T, e.Element = E, e.ForwardRef = D, e.Fragment = O, e.Lazy = k, e.Memo = A, e.Portal = j, e.Profiler = M, e.StrictMode = N, e.Suspense = P, e.isAsyncMode = F, e.isConcurrentMode = I, e.isContextConsumer = L, e.isContextProvider = R, e.isElement = z, e.isForwardRef = te, e.isFragment = ne, e.isLazy = re, e.isMemo = ie, e.isPortal = ae, e.isProfiler = B, e.isStrictMode = oe, e.isSuspense = se, e.isValidElementType = b, e.typeOf = x;
297
+ e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = w, e.ContextProvider = T, e.Element = E, e.ForwardRef = D, e.Fragment = O, e.Lazy = k, e.Memo = A, e.Portal = j, e.Profiler = M, e.StrictMode = N, e.Suspense = P, e.isAsyncMode = F, e.isConcurrentMode = I, e.isContextConsumer = L, e.isContextProvider = te, e.isElement = R, e.isForwardRef = ne, e.isFragment = re, e.isLazy = z, e.isMemo = ie, e.isPortal = ae, e.isProfiler = B, e.isStrictMode = oe, e.isSuspense = se, e.isValidElementType = b, e.typeOf = x;
298
298
  })();
299
299
  })), le = /* @__PURE__ */ P(((e, t) => {
300
300
  t.exports = process.env.NODE_ENV === "production" ? se() : ce();
@@ -3779,7 +3779,7 @@ function $a(t) {
3779
3779
  return;
3780
3780
  }
3781
3781
  M.current = e.reduceMotion, e.onExit?.(), E.current = "exiting", T("exiting");
3782
- }, [N]), R = e.useCallback((e, t) => {
3782
+ }, [N]), te = e.useCallback((e, t) => {
3783
3783
  if (P(), t === "entering") {
3784
3784
  let t = N.current;
3785
3785
  if (t.mountOnEnter || t.unmountOnExit) {
@@ -3794,17 +3794,17 @@ function $a(t) {
3794
3794
  L,
3795
3795
  N
3796
3796
  ]);
3797
- return Ve(() => (O.current = !0, D.current && (D.current = !1, R(!0, "entering")), () => {
3797
+ return Ve(() => (O.current = !0, D.current && (D.current = !1, te(!0, "entering")), () => {
3798
3798
  O.current = !1, P();
3799
- }), [P, R]), Ve(() => {
3799
+ }), [P, te]), Ve(() => {
3800
3800
  if (!O.current) return;
3801
3801
  let e = E.current;
3802
- n ? e !== "entering" && e !== "entered" && R(!1, "entering") : e === "entering" || e === "entered" ? R(!1, "exiting") : e === "exited" && s && (E.current = "unmounted", T("unmounted"));
3802
+ n ? e !== "entering" && e !== "entered" && te(!1, "entering") : e === "entering" || e === "entered" ? te(!1, "exiting") : e === "exited" && s && (E.current = "unmounted", T("unmounted"));
3803
3803
  }, [
3804
3804
  n,
3805
3805
  w,
3806
3806
  s,
3807
- R
3807
+ te
3808
3808
  ]), Ve(() => {
3809
3809
  if (w === "unmounted" || A.current === "unmounted") {
3810
3810
  A.current = w;
@@ -4127,7 +4127,7 @@ function Do(t) {
4127
4127
  let e = Co(n) || b().body;
4128
4128
  Eo.add(x(), e), m.current && S();
4129
4129
  }), w = () => Eo.isTopModal(x()), T = xo((e) => {
4130
- f.current = e, e && (p.current = e, l && w() ? S() : m.current && te(m.current, y));
4130
+ f.current = e, e && (p.current = e, l && w() ? S() : m.current && ne(m.current, y));
4131
4131
  }), E = e.useCallback(() => {
4132
4132
  Eo.remove(x(), y);
4133
4133
  }, [y]);
@@ -4251,23 +4251,23 @@ var ko = (e) => {
4251
4251
  let { onEnter: e, onExited: t } = A();
4252
4252
  L.onEnter = e, L.onExited = t;
4253
4253
  }
4254
- let R = {
4254
+ let te = {
4255
4255
  slots: w,
4256
4256
  slotProps: C
4257
- }, [z, te] = Pa("root", {
4257
+ }, [R, ne] = Pa("root", {
4258
4258
  ref: n,
4259
4259
  elementType: Ao,
4260
4260
  externalForwardedProps: {
4261
- ...R,
4261
+ ...te,
4262
4262
  ...E,
4263
4263
  component: d
4264
4264
  },
4265
4265
  getSlotProps: O,
4266
4266
  ownerState: F,
4267
4267
  className: V(a, I?.root, !F.open && F.exited && I?.hidden)
4268
- }), [ne, re] = Pa("backdrop", {
4268
+ }), [re, z] = Pa("backdrop", {
4269
4269
  elementType: jo,
4270
- externalForwardedProps: R,
4270
+ externalForwardedProps: te,
4271
4271
  shouldForwardComponentProp: !0,
4272
4272
  getSlotProps: (e) => k({
4273
4273
  ...e,
@@ -4282,9 +4282,9 @@ var ko = (e) => {
4282
4282
  ref: j,
4283
4283
  container: M,
4284
4284
  disablePortal: m,
4285
- children: /*#__PURE__*/ l(z, {
4286
- ...te,
4287
- children: [_ ? null : /*#__PURE__*/ c(ne, { ...re }), /*#__PURE__*/ c(Be, {
4285
+ children: /*#__PURE__*/ l(R, {
4286
+ ...ne,
4287
+ children: [_ ? null : /*#__PURE__*/ c(re, { ...z }), /*#__PURE__*/ c(Be, {
4288
4288
  disableEnforceFocus: p,
4289
4289
  disableAutoFocus: f,
4290
4290
  disableRestoreFocus: h,
@@ -4333,17 +4333,26 @@ process.env.NODE_ENV !== "production" && (Mo.propTypes = {
4333
4333
  });
4334
4334
  //#endregion
4335
4335
  //#region src/state/machine.ts
4336
- var No = "idle", Po = "Image loaded", Fo = "Values defined", Io = "Image cropped", Lo = "X-axis started", Ro = "X-axis finished", zo = "Points defined", Bo = "Shape defined", Vo = "Trademark defined", Ho = "Finished", Uo = "FINISH", Wo = "RESET", Go = "LOAD_IMAGE", Ko = "ENTER_VALUES", qo = "CROP", Jo = "SKIP_CROP", Yo = "UNDO_CROP", Xo = "START_X_AXIS", Zo = "FINISH_X_AXIS", Qo = "UNDO_X_AXIS", $o = "ADD_POINT", es = "DEFINE_TRADEMARK", ts = "FINISH_POINTS", ns = "UNDO_SHAPE", rs = "UNDO_TRADEMARK", is = "UNDO_FINISH", as = "define values", os = E({
4337
- types: { context: {} },
4336
+ var No = "idle", Po = "Image loaded", Fo = "Values defined", Io = "Image cropped", Lo = "X-axis started", Ro = "X-axis finished", zo = "Points defined", Bo = "Shape defined", Vo = "Trademark defined", Ho = "Finished", Uo = "FINISH", Wo = "RESET", Go = "LOAD_IMAGE", Ko = "ENTER_VALUES", qo = "CROP", Jo = "SKIP_CROP", Yo = "UNDO_CROP", Xo = "START_X_AXIS", Zo = "FINISH_X_AXIS", Qo = "UNDO_X_AXIS", $o = "ADD_POINT", es = "UNDO_POINT", ts = "DEFINE_TRADEMARK", ns = "FINISH_POINTS", rs = "UNDO_SHAPE", is = "UNDO_TRADEMARK", as = "UNDO_FINISH", os = "define values", ss = E({
4337
+ types: {
4338
+ events: {},
4339
+ context: {}
4340
+ },
4338
4341
  actions: {
4339
4342
  "reset rotation angle": T({ rotationAngle: 0 }),
4340
4343
  "define rotation angle": T({ rotationAngle: ({ context: e, event: t }) => (t && t.type === "FINISH_X_AXIS" && (e.rotationAngle = t.rotationAngle), e.rotationAngle) }),
4341
- [as]: T({
4344
+ "define trademark": T({ trademark: () => ({
4345
+ x: 0,
4346
+ y: 0
4347
+ }) }),
4348
+ "clear trademark": T({ trademark: () => void 0 }),
4349
+ [os]: T({
4342
4350
  SL: ({ event: e }) => e.type === "ENTER_VALUES" ? e.SL : 0,
4343
4351
  SH: ({ event: e }) => e.type === "ENTER_VALUES" ? e.SH : 0,
4344
4352
  AZG: ({ event: e }) => e.type === "ENTER_VALUES" ? e.AZG : 0
4345
4353
  })
4346
- }
4354
+ },
4355
+ guards: { hasTrademark: ({ context: e }) => !!e.trademark }
4347
4356
  }).createMachine({
4348
4357
  id: "identify",
4349
4358
  context: { rotationAngle: 0 },
@@ -4353,7 +4362,7 @@ var No = "idle", Po = "Image loaded", Fo = "Values defined", Io = "Image cropped
4353
4362
  [Po]: { on: {
4354
4363
  [Wo]: No,
4355
4364
  [Ko]: {
4356
- actions: [{ type: as }],
4365
+ actions: [{ type: os }],
4357
4366
  target: Fo
4358
4367
  }
4359
4368
  } },
@@ -4385,56 +4394,69 @@ var No = "idle", Po = "Image loaded", Fo = "Values defined", Io = "Image cropped
4385
4394
  } },
4386
4395
  [zo]: { on: {
4387
4396
  [$o]: zo,
4397
+ [es]: Ro,
4388
4398
  [Wo]: No,
4389
- [ts]: Bo
4399
+ [ns]: Bo
4390
4400
  } },
4391
4401
  [Bo]: { on: {
4392
4402
  [Wo]: No,
4393
- [ns]: zo,
4394
- [es]: Vo,
4403
+ [rs]: zo,
4404
+ [ts]: {
4405
+ actions: [{ type: "define trademark" }],
4406
+ target: Vo
4407
+ },
4395
4408
  [Uo]: Ho
4396
4409
  } },
4397
4410
  [Vo]: { on: {
4398
- [rs]: zo,
4411
+ [is]: {
4412
+ actions: [{ type: "clear trademark" }],
4413
+ target: zo
4414
+ },
4399
4415
  [Uo]: Ho
4400
4416
  } },
4401
4417
  [Ho]: { on: {
4402
- [is]: Vo,
4418
+ [as]: [{
4419
+ target: Vo,
4420
+ guard: "hasTrademark"
4421
+ }, { target: Bo }],
4403
4422
  [Wo]: No
4404
4423
  } }
4405
4424
  }
4406
4425
  });
4407
4426
  //#endregion
4408
4427
  //#region src/MachineState.tsx
4409
- function ss(e) {
4428
+ function cs(e) {
4410
4429
  let { t } = h(), n, r = e.actor.getSnapshot();
4411
4430
  switch (r.value) {
4412
4431
  case No:
4413
- n = t("main.identify.startProcess", { defaultValue: "Please load an image to start the process" });
4432
+ n = t("main.identify.help.startProcess", { defaultValue: "Please load an image to start the process" });
4414
4433
  break;
4415
4434
  case Po:
4416
- n = t("main.identify.defineValues", { defaultValue: "Please define SL, SH, AZG values and click \"Submit\"" });
4435
+ n = t("main.identify.help.defineValues", { defaultValue: "Please define SL, SH, AZG values and click \"Submit\"" });
4417
4436
  break;
4418
4437
  case Fo:
4419
- n = t("main.identify.cropImage", { defaultValue: "Please crop the image by clicking and dragging the mouse" });
4438
+ n = t("main.identify.help.cropImage", { defaultValue: "Please crop the image by clicking and dragging the mouse" });
4420
4439
  break;
4421
4440
  case Io:
4422
- n = t("main.identify.defineHorizontalLine", { defaultValue: "Please define a horizontal line (point 1)" });
4441
+ n = t("main.identify.help.defineHorizontalLine", { defaultValue: "Please define a horizontal line (point 1)" });
4423
4442
  break;
4424
4443
  case Lo:
4425
- n = t("main.identify.finishHorizontalLine", { defaultValue: "Please define a horizontal line (point 2))" });
4444
+ n = t("main.identify.help.finishHorizontalLine", { defaultValue: "Please define a horizontal line (point 2))" });
4426
4445
  break;
4427
4446
  case Ro:
4428
- n = t("main.identify.addPoints", { defaultValue: "Please mark some points to define the frame contour" });
4447
+ n = t("main.identify.help.addPoints", { defaultValue: "Please mark some points to define the frame contour" });
4429
4448
  break;
4430
4449
  case zo:
4431
- n = t("main.identify.clickDone", { defaultValue: "Please click \"Done\" to finish the process" });
4450
+ n = t("main.identify.help.clickDone", { defaultValue: "Please click \"Done\" to finish the process" });
4432
4451
  break;
4433
4452
  case Bo:
4434
- n = t("main.identify.finish", { defaultValue: "Please define a trademark" });
4453
+ n = t("main.identify.help.defineTrademark", { defaultValue: "Please define a trademark" });
4435
4454
  break;
4436
4455
  case Vo:
4437
- n = t("main.identify.trademarkDefined", { defaultValue: "trademark is now defined" });
4456
+ n = t("main.identify.help.trademarkDefined", { defaultValue: "trademark is now defined" });
4457
+ break;
4458
+ case Ho:
4459
+ n = t("main.identify.help.finished", { defaultValue: "The process is finished" });
4438
4460
  break;
4439
4461
  default: n = t("main.identify.unknownState", {
4440
4462
  defaultValue: "unknown state: {{value}}",
@@ -4462,7 +4484,7 @@ function ss(e) {
4462
4484
  }
4463
4485
  //#endregion
4464
4486
  //#region node_modules/frame.theme/dist/frame.theme.js
4465
- function cs(e) {
4487
+ function ls(e) {
4466
4488
  let t = w(), [n, i] = o(""), s = a(null), { t: l } = h(), u = (e, t, n) => {
4467
4489
  let r = parseFloat(e);
4468
4490
  i(isNaN(r) ? l("main.identify.error.validNumber", { field: t }) : r < 0 ? l("main.identify.error.positive", { field: t }) : r === 0 ? l("main.identify.error.notNull", { field: t }) : n !== void 0 && r > n ? l("main.identify.error.notGreaterThan", {
@@ -4523,7 +4545,7 @@ function cs(e) {
4523
4545
  }
4524
4546
  //#endregion
4525
4547
  //#region src/EnterValues.tsx
4526
- function ls(e) {
4548
+ function us(e) {
4527
4549
  let [t, n] = o(e.testMode ? "50" : ""), [r, i] = o(e.testMode ? "44" : ""), [a, u] = o(e.testMode ? "15" : ""), d = D(e.actor, (e) => e), f = (e, t, n, r) => {
4528
4550
  let i = parseFloat(t);
4529
4551
  n(isNaN(i) ? v("main.identify.error.validNumber", { field: e }) : i <= 0 ? v("main.identify.error.positive", { field: e }) : i > r ? v("main.identify.error.notGreaterThan", {
@@ -4537,6 +4559,8 @@ function ls(e) {
4537
4559
  }, p = {
4538
4560
  textTransform: "none",
4539
4561
  width: "calc(100% - 100px)",
4562
+ marginTop: "30px",
4563
+ marginBottom: "30px",
4540
4564
  marginLeft: "50px",
4541
4565
  marginRight: "50px"
4542
4566
  };
@@ -4566,7 +4590,7 @@ function ls(e) {
4566
4590
  gap: 2
4567
4591
  },
4568
4592
  children: [
4569
- /* @__PURE__ */ c(cs, {
4593
+ /* @__PURE__ */ c(ls, {
4570
4594
  value: t,
4571
4595
  onChange: n,
4572
4596
  checkValue: (e, t) => f("SL", e, t, 80),
@@ -4574,14 +4598,14 @@ function ls(e) {
4574
4598
  dataTestid: "scheibenlaenge-input",
4575
4599
  autofocus: !0
4576
4600
  }),
4577
- /* @__PURE__ */ c(cs, {
4601
+ /* @__PURE__ */ c(ls, {
4578
4602
  value: r,
4579
4603
  checkValue: (e, t) => f("SH", e, t, 60),
4580
4604
  onChange: i,
4581
4605
  label: v("main.identify.label.scheibenhoehe", { defaultValue: "box height" }),
4582
4606
  dataTestid: "scheibenhoehe-input"
4583
4607
  }),
4584
- /* @__PURE__ */ c(cs, {
4608
+ /* @__PURE__ */ c(ls, {
4585
4609
  value: a,
4586
4610
  checkValue: (e, t) => f("AzG", e, t, 40),
4587
4611
  onChange: u,
@@ -4603,85 +4627,122 @@ function ls(e) {
4603
4627
  }
4604
4628
  //#endregion
4605
4629
  //#region src/ModalImageLoaded.tsx
4606
- function us(e) {
4607
- let t = a(null), n = a(null), i = a(null), [s, u] = o(!1), d = a(null), [f, p] = o(null), [m, v] = o(0), b = w(), { t: x } = h(), S = D(e.actor, (e) => e), C = e.actor.getSnapshot();
4608
- r(() => {}, [e.actor]);
4609
- function T(r) {
4610
- let i = new Image();
4611
- i.onload = () => {
4612
- let e = t.current;
4613
- e && (e.width = i.naturalWidth, e.height = i.naturalHeight, e.getContext("2d")?.drawImage(i, 0, 0), n.current = i);
4614
- }, i.src = r, e.actor.send({ type: Go });
4615
- }
4616
- function E(e) {
4630
+ function ds(e) {
4631
+ let t = "ModalImageLoaded", i = a(null), s = a(null), u = a(null), [d, f] = o(!1), p = a(null), [m, v] = o(null), [b, x] = o(0), [S, C] = o(!1);
4632
+ w();
4633
+ let { t: T } = h(), E = D(e.actor, (e) => e), O = e.actor.getSnapshot(), k = n((t) => {
4634
+ let n = new Image();
4635
+ n.onload = () => {
4636
+ let e = i.current;
4637
+ e && (e.width = n.naturalWidth, e.height = n.naturalHeight, e.getContext("2d")?.drawImage(n, 0, 0), s.current = n);
4638
+ }, n.src = t, e.actor.send({ type: Go });
4639
+ }, [e.actor]);
4640
+ r(() => {}, [e.actor]), r(() => {
4641
+ if (!e.modalIsOpen || O.value !== "idle") return;
4642
+ let t = !1;
4643
+ async function n() {
4644
+ if (!navigator.clipboard?.read) {
4645
+ t || C(!1);
4646
+ return;
4647
+ }
4648
+ try {
4649
+ let e = await navigator.clipboard.read(), n = e.flatMap((e) => e.types).find((e) => e.startsWith("image/"));
4650
+ if (!n || t) {
4651
+ t || C(!1);
4652
+ return;
4653
+ }
4654
+ let r = await e.find((e) => e.types.includes(n))?.getType(n);
4655
+ if (!r || t) {
4656
+ t || C(!1);
4657
+ return;
4658
+ }
4659
+ let i = new FileReader();
4660
+ i.onload = () => {
4661
+ t || (C(!0), k(String(i.result)));
4662
+ }, i.onerror = () => {
4663
+ t || C(!1);
4664
+ }, i.readAsDataURL(r);
4665
+ } catch {
4666
+ t || C(!1);
4667
+ }
4668
+ }
4669
+ return n(), () => {
4670
+ t = !0;
4671
+ };
4672
+ }, [
4673
+ k,
4674
+ e.modalIsOpen,
4675
+ O.value
4676
+ ]);
4677
+ function A(e) {
4617
4678
  let t = e.target.files?.[0];
4618
4679
  if (!t) return;
4619
4680
  let n = new FileReader();
4620
- n.onload = () => T(n.result), n.readAsDataURL(t), e.target.value = "";
4681
+ n.onload = () => k(n.result), n.readAsDataURL(t), e.target.value = "";
4621
4682
  }
4622
- function O(e, t) {
4683
+ function j(e, t) {
4623
4684
  let n = e.getBoundingClientRect();
4624
4685
  return {
4625
4686
  x: (t.clientX - n.left) * (e.width / n.width),
4626
4687
  y: (t.clientY - n.top) * (e.height / n.height)
4627
4688
  };
4628
4689
  }
4629
- function k(e, r) {
4630
- let i = t.current, a = n.current;
4631
- if (!i || !a) return;
4632
- let o = i.getContext("2d");
4633
- o && (o.drawImage(a, 0, 0), e && (o.strokeStyle = "red", o.lineWidth = 4, o.setLineDash([6, 3]), o.strokeRect(e.x, e.y, e.w, e.h)), r && (o.setLineDash([]), o.strokeStyle = "rgba(0,0,0,0.6)", o.lineWidth = 1, o.beginPath(), o.moveTo(r.x, 0), o.lineTo(r.x, i.height), o.moveTo(0, r.y), o.lineTo(i.width, r.y), o.stroke()));
4634
- }
4635
- function A(e) {
4636
- let r = t.current;
4637
- !r || !n.current || C.value !== "Values defined" || (p(null), d.current = O(r, e));
4638
- }
4639
- function j(e) {
4640
- let r = t.current;
4641
- if (!r || !n.current) return;
4642
- let { x: i, y: a } = O(r, e), o = d.current ? {
4643
- x: d.current.x,
4644
- y: d.current.y,
4645
- w: i - d.current.x,
4646
- h: a - d.current.y
4690
+ function M(e, t) {
4691
+ let n = i.current, r = s.current;
4692
+ if (!n || !r) return;
4693
+ let a = n.getContext("2d");
4694
+ a && (a.drawImage(r, 0, 0), e && (a.strokeStyle = "red", a.lineWidth = 4, a.setLineDash([6, 3]), a.strokeRect(e.x, e.y, e.w, e.h)), t && (a.setLineDash([]), a.strokeStyle = "rgba(0,0,0,0.6)", a.lineWidth = 1, a.beginPath(), a.moveTo(t.x, 0), a.lineTo(t.x, n.height), a.moveTo(0, t.y), a.lineTo(n.width, t.y), a.stroke()));
4695
+ }
4696
+ function N(e) {
4697
+ let t = i.current;
4698
+ !t || !s.current || O.value !== "Values defined" || (v(null), p.current = j(t, e));
4699
+ }
4700
+ function P(e) {
4701
+ let t = i.current;
4702
+ if (!t || !s.current) return;
4703
+ let { x: n, y: r } = j(t, e), a = p.current ? {
4704
+ x: p.current.x,
4705
+ y: p.current.y,
4706
+ w: n - p.current.x,
4707
+ h: r - p.current.y
4647
4708
  } : void 0;
4648
- S.value === "Values defined" ? k(o, {
4649
- x: i,
4650
- y: a
4651
- }) : k(o);
4652
- }
4653
- function M(e) {
4654
- let n = t.current;
4655
- if (!n || !d.current) return;
4656
- let r = O(n, e), { x: i, y: a } = d.current;
4657
- d.current = null;
4658
- let o = Math.min(i, r.x), s = Math.min(a, r.y), c = Math.abs(r.x - i), l = Math.abs(r.y - a);
4659
- k(), !(c < 2 || l < 2) && ee(c, l, o, s, qo);
4660
- }
4661
- function N() {
4662
- k();
4663
- }
4664
- function P() {
4709
+ E.value === "Values defined" ? M(a, {
4710
+ x: n,
4711
+ y: r
4712
+ }) : M(a);
4713
+ }
4714
+ function ee(e) {
4715
+ let t = i.current;
4716
+ if (!t || !p.current) return;
4717
+ let n = j(t, e), { x: r, y: a } = p.current;
4718
+ p.current = null;
4719
+ let o = Math.min(r, n.x), s = Math.min(a, n.y), c = Math.abs(n.x - r), l = Math.abs(n.y - a);
4720
+ M(), !(c < 2 || l < 2) && L(c, l, o, s, qo);
4721
+ }
4722
+ function F() {
4723
+ M();
4724
+ }
4725
+ function I() {
4665
4726
  e.actor.send({ type: Wo });
4666
- let t = C.context.SL ?? 0, n = C.context.SH ?? 0, r = C.context.AZG ?? 0;
4667
- e.onAfterCloseModal(t, n, r, 0, [], [])();
4727
+ let t = O.context.SL ?? 0, n = O.context.SH ?? 0, r = O.context.AZG ?? 0;
4728
+ e.onAfterCloseModal(t, n, r, 0, [], [], O.context.trademark)();
4668
4729
  }
4669
- function ee(t, r, i, a, o) {
4670
- let s = document.createElement("canvas");
4671
- s.width = t * 2, s.height = r * 2, s.getContext("2d")?.drawImage(n.current, i, a, t, r, 0, 0, t * 2, r * 2);
4672
- let c = n.current.src;
4673
- p(s.toDataURL()), v((e) => e + 1), u(!0), e.onAfterCropImage?.(c, C.context.SL ?? 0, C.context.SH ?? 0, C.context.AZG ?? 0, i, a, t, r), e.actor.send({ type: o });
4730
+ function L(t, n, r, i, a) {
4731
+ let o = document.createElement("canvas");
4732
+ o.width = t * 2, o.height = n * 2, o.getContext("2d")?.drawImage(s.current, r, i, t, n, 0, 0, t * 2, n * 2);
4733
+ let c = s.current.src;
4734
+ v(o.toDataURL()), x((e) => e + 1), f(!0), e.onAfterCropImage?.(c, O.context.SL ?? 0, O.context.SH ?? 0, O.context.AZG ?? 0, r, i, t, n), e.actor.send({ type: a });
4674
4735
  }
4675
4736
  return /* @__PURE__ */ c(Mo, {
4676
4737
  keepMounted: !0,
4677
- "data-testid": "ModalImageLoaded.Modal",
4738
+ "data-testid": `${t}.Modal`,
4678
4739
  sx: {
4679
4740
  display: "flex",
4680
4741
  justifyContent: "center",
4681
4742
  alignItems: "center"
4682
4743
  },
4683
4744
  open: e.modalIsOpen,
4684
- onClose: e.onAfterCloseModal(C.context.SL ?? 0, C.context.SH ?? 0, C.context.AZG ?? 0, 0, [], [], void 0),
4745
+ onClose: e.onAfterCloseModal(O.context.SL ?? 0, O.context.SH ?? 0, O.context.AZG ?? 0, 0, [], [], O.context.trademark),
4685
4746
  children: /* @__PURE__ */ l(y, {
4686
4747
  elevation: 1,
4687
4748
  sx: {
@@ -4690,28 +4751,28 @@ function us(e) {
4690
4751
  borderRight: 1,
4691
4752
  borderColor: "divider",
4692
4753
  borderRadius: 0,
4693
- backgroundColor: b.palette.primary.light
4754
+ backgroundColor: "lightgrey"
4694
4755
  },
4695
4756
  children: [
4696
- f && /* @__PURE__ */ c(Uc, {
4757
+ m && /* @__PURE__ */ c(Kc, {
4697
4758
  actor: e.actor,
4698
- dataUrl: f,
4699
- modalIsOpen: s,
4759
+ dataUrl: m,
4760
+ modalIsOpen: d,
4700
4761
  onCloseModal: (t, n, r, i) => () => {
4701
- let a = C.context.SL ?? 0, o = C.context.SH ?? 0, s = C.context.AZG ?? 0;
4702
- e.onAfterCloseModal(a, o, s, t, n, r, i)(), u(!1);
4762
+ let a = O.context.SL ?? 0, o = O.context.SH ?? 0, s = O.context.AZG ?? 0;
4763
+ e.onAfterCloseModal(a, o, s, t, n, r, i)(), f(!1);
4703
4764
  },
4704
4765
  testMode: e.testMode
4705
- }, m),
4706
- /* @__PURE__ */ c(ss, {
4766
+ }, b),
4767
+ /* @__PURE__ */ c(cs, {
4707
4768
  actor: e.actor,
4708
4769
  testMode: e.testMode
4709
4770
  }),
4710
- C.value === "Image loaded" && /* @__PURE__ */ c(ls, {
4771
+ O.value === "Image loaded" && /* @__PURE__ */ c(us, {
4711
4772
  actor: e.actor,
4712
4773
  testMode: e.testMode
4713
4774
  }),
4714
- C.value !== "idle" && /* @__PURE__ */ c("div", {
4775
+ O.value !== "idle" && /* @__PURE__ */ c("div", {
4715
4776
  style: {
4716
4777
  background: "#fff",
4717
4778
  borderRadius: 8,
@@ -4721,18 +4782,18 @@ function us(e) {
4721
4782
  gap: 12
4722
4783
  },
4723
4784
  children: /* @__PURE__ */ c("canvas", {
4724
- ref: t,
4785
+ ref: i,
4725
4786
  style: {
4726
4787
  display: "block",
4727
4788
  border: "1px solid #ccc",
4728
4789
  maxWidth: "80vw",
4729
4790
  maxHeight: "70vh",
4730
- cursor: C.value === "Values defined" ? "none" : "not-allowed"
4791
+ cursor: O.value === "Values defined" ? "none" : "not-allowed"
4731
4792
  },
4732
- onMouseDown: A,
4733
- onMouseMove: j,
4734
- onMouseUp: M,
4735
- onMouseLeave: N
4793
+ onMouseDown: N,
4794
+ onMouseMove: P,
4795
+ onMouseUp: ee,
4796
+ onMouseLeave: F
4736
4797
  })
4737
4798
  }),
4738
4799
  /* @__PURE__ */ c("div", {
@@ -4743,24 +4804,27 @@ function us(e) {
4743
4804
  gap: 8,
4744
4805
  margin: "10px"
4745
4806
  },
4746
- children: [C.value === "idle" && /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("input", {
4747
- ref: i,
4807
+ children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("input", {
4808
+ ref: u,
4748
4809
  type: "file",
4749
4810
  accept: "image/*",
4750
4811
  style: { display: "none" },
4751
- onChange: E
4812
+ onChange: A
4752
4813
  }), /* @__PURE__ */ c(_, {
4814
+ "data-testid": `${t}.button.loadImage`,
4753
4815
  color: "secondary",
4754
4816
  variant: "contained",
4755
4817
  size: "small",
4756
- onClick: () => i.current?.click(),
4757
- children: x("main.identify.button.loadImage", { defaultValue: "Load Image" })
4818
+ onClick: () => {
4819
+ u.current?.click();
4820
+ },
4821
+ children: T("main.identify.button.loadImage", { defaultValue: "Load Image" })
4758
4822
  })] }), /* @__PURE__ */ c(_, {
4759
4823
  color: "secondary",
4760
4824
  variant: "contained",
4761
4825
  size: "small",
4762
- onClick: P,
4763
- children: x("main.identify.button.close", { defaultValue: "Close" })
4826
+ onClick: I,
4827
+ children: T("main.identify.button.close", { defaultValue: "Close" })
4764
4828
  })]
4765
4829
  })
4766
4830
  })
@@ -4770,23 +4834,23 @@ function us(e) {
4770
4834
  }
4771
4835
  //#endregion
4772
4836
  //#region node_modules/@mui/material/utils/capitalize.mjs
4773
- var ds = tt, fs = Vr, ps = xo, ms = H.default.oneOfType([H.default.func, H.default.object]);
4837
+ var fs = tt, ps = Vr, ms = xo, hs = H.default.oneOfType([H.default.func, H.default.object]);
4774
4838
  //#endregion
4775
4839
  //#region node_modules/@mui/utils/elementTypeAcceptingRef/elementTypeAcceptingRef.mjs
4776
- function hs(e) {
4840
+ function gs(e) {
4777
4841
  let { prototype: t = {} } = e;
4778
4842
  return !!t.isReactComponent;
4779
4843
  }
4780
- function gs(t, n, r, i, a) {
4844
+ function _s(t, n, r, i, a) {
4781
4845
  let o = t[n], s = a || n;
4782
4846
  if (o == null || typeof window > "u") return null;
4783
4847
  let c;
4784
- return typeof o == "function" && !hs(o) && (c = "Did you accidentally provide a plain function component instead?"), o === e.Fragment && (c = "Did you accidentally provide a React.Fragment instead?"), c === void 0 ? null : /* @__PURE__ */ Error(`Invalid ${i} \`${s}\` supplied to \`${r}\`. Expected an element type that can hold a ref. ${c} For more information see https://mui.com/r/caveat-with-refs-guide`);
4848
+ return typeof o == "function" && !gs(o) && (c = "Did you accidentally provide a plain function component instead?"), o === e.Fragment && (c = "Did you accidentally provide a React.Fragment instead?"), c === void 0 ? null : /* @__PURE__ */ Error(`Invalid ${i} \`${s}\` supplied to \`${r}\`. Expected an element type that can hold a ref. ${c} For more information see https://mui.com/r/caveat-with-refs-guide`);
4785
4849
  }
4786
- var _s = ye(H.default.elementType, gs);
4850
+ var vs = ye(H.default.elementType, _s);
4787
4851
  //#endregion
4788
4852
  //#region node_modules/@mui/utils/isFocusVisible/isFocusVisible.mjs
4789
- function vs(e) {
4853
+ function ys(e) {
4790
4854
  try {
4791
4855
  return e.matches(":focus-visible");
4792
4856
  } catch {
@@ -4796,7 +4860,7 @@ function vs(e) {
4796
4860
  }
4797
4861
  //#endregion
4798
4862
  //#region node_modules/@mui/material/utils/useFocusableWhenDisabled.mjs
4799
- function ys(t) {
4863
+ function bs(t) {
4800
4864
  let { focusableWhenDisabled: n, disabled: r, composite: i = !1, tabIndex: a = 0, isNativeButton: o } = t, s = i && n !== !1, c = i && n === !1;
4801
4865
  return e.useMemo(() => {
4802
4866
  let e = { onKeyDown(e) {
@@ -4815,9 +4879,9 @@ function ys(t) {
4815
4879
  }
4816
4880
  //#endregion
4817
4881
  //#region node_modules/@mui/material/ButtonBase/useButtonBase.mjs
4818
- var bs = {};
4819
- function xs(t) {
4820
- let { nativeButton: n, nativeButtonProp: r, internalNativeButton: i = n, allowInferredHostMismatch: a = !1, disabled: o, type: s, hasFormAction: c = !1, tabIndex: l = 0, focusableWhenDisabled: u, stopEventPropagation: d = !1, onBeforeKeyDown: f, onBeforeKeyUp: p } = t, m = e.useRef(null), h = u === !0, g = ys({
4882
+ var xs = {};
4883
+ function Ss(t) {
4884
+ let { nativeButton: n, nativeButtonProp: r, internalNativeButton: i = n, allowInferredHostMismatch: a = !1, disabled: o, type: s, hasFormAction: c = !1, tabIndex: l = 0, focusableWhenDisabled: u, stopEventPropagation: d = !1, onBeforeKeyDown: f, onBeforeKeyUp: p } = t, m = e.useRef(null), h = u === !0, g = bs({
4821
4885
  focusableWhenDisabled: h,
4822
4886
  disabled: o,
4823
4887
  isNativeButton: n,
@@ -4856,7 +4920,7 @@ function xs(t) {
4856
4920
  s
4857
4921
  ]);
4858
4922
  return {
4859
- getButtonProps: e.useCallback((e = bs) => {
4923
+ getButtonProps: e.useCallback((e = xs) => {
4860
4924
  let { onClick: t, onKeyDown: n, onKeyUp: r, ...i } = e, a = (e) => {
4861
4925
  if (d && e.stopPropagation(), o) {
4862
4926
  e.preventDefault();
@@ -4896,36 +4960,36 @@ function xs(t) {
4896
4960
  }
4897
4961
  //#endregion
4898
4962
  //#region \0@oxc-project+runtime@0.146.0/helpers/esm/typeof.js
4899
- function Ss(e) {
4963
+ function Cs(e) {
4900
4964
  "@babel/helpers - typeof";
4901
- return Ss = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
4965
+ return Cs = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
4902
4966
  return typeof e;
4903
4967
  } : function(e) {
4904
4968
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
4905
- }, Ss(e);
4969
+ }, Cs(e);
4906
4970
  }
4907
4971
  //#endregion
4908
4972
  //#region \0@oxc-project+runtime@0.146.0/helpers/esm/toPrimitive.js
4909
- function Cs(e, t) {
4910
- if (Ss(e) != "object" || !e) return e;
4973
+ function ws(e, t) {
4974
+ if (Cs(e) != "object" || !e) return e;
4911
4975
  var n = e[Symbol.toPrimitive];
4912
4976
  if (n !== void 0) {
4913
4977
  var r = n.call(e, t || "default");
4914
- if (Ss(r) != "object") return r;
4978
+ if (Cs(r) != "object") return r;
4915
4979
  throw TypeError("@@toPrimitive must return a primitive value.");
4916
4980
  }
4917
4981
  return (t === "string" ? String : Number)(e);
4918
4982
  }
4919
4983
  //#endregion
4920
4984
  //#region \0@oxc-project+runtime@0.146.0/helpers/esm/toPropertyKey.js
4921
- function ws(e) {
4922
- var t = Cs(e, "string");
4923
- return Ss(t) == "symbol" ? t : t + "";
4985
+ function Ts(e) {
4986
+ var t = ws(e, "string");
4987
+ return Cs(t) == "symbol" ? t : t + "";
4924
4988
  }
4925
4989
  //#endregion
4926
4990
  //#region \0@oxc-project+runtime@0.146.0/helpers/esm/defineProperty.js
4927
- function Ts(e, t, n) {
4928
- return (t = ws(t)) in e ? Object.defineProperty(e, t, {
4991
+ function Es(e, t, n) {
4992
+ return (t = Ts(t)) in e ? Object.defineProperty(e, t, {
4929
4993
  value: n,
4930
4994
  enumerable: !0,
4931
4995
  configurable: !0,
@@ -4934,7 +4998,7 @@ function Ts(e, t, n) {
4934
4998
  }
4935
4999
  //#endregion
4936
5000
  //#region node_modules/@mui/material/useLazyRipple/useLazyRipple.mjs
4937
- var Es = class t {
5001
+ var Ds = class t {
4938
5002
  static create() {
4939
5003
  return new t();
4940
5004
  }
@@ -4943,12 +5007,12 @@ var Es = class t {
4943
5007
  return n.shouldMount = r, n.setShouldMount = i, e.useEffect(n.mountEffect, [r]), n;
4944
5008
  }
4945
5009
  constructor() {
4946
- Ts(this, "mountEffect", () => {
5010
+ Es(this, "mountEffect", () => {
4947
5011
  this.shouldMount && !this.didMount && this.ref.current !== null && (this.didMount = !0, this.mounted.resolve());
4948
5012
  }), this.ref = { current: null }, this.mounted = null, this.didMount = !1, this.shouldMount = !1, this.setShouldMount = null;
4949
5013
  }
4950
5014
  mount() {
4951
- return this.mounted || (this.mounted = Os(), this.shouldMount = !0, this.setShouldMount(this.shouldMount)), this.mounted;
5015
+ return this.mounted || (this.mounted = ks(), this.shouldMount = !0, this.setShouldMount(this.shouldMount)), this.mounted;
4952
5016
  }
4953
5017
  start(...e) {
4954
5018
  this.mount().then(() => this.ref.current?.start(...e));
@@ -4960,10 +5024,10 @@ var Es = class t {
4960
5024
  this.mount().then(() => this.ref.current?.pulsate(...e));
4961
5025
  }
4962
5026
  };
4963
- function Ds() {
4964
- return Es.use();
4965
- }
4966
5027
  function Os() {
5028
+ return Ds.use();
5029
+ }
5030
+ function ks() {
4967
5031
  let e, t, n = new Promise((n, r) => {
4968
5032
  e = n, t = r;
4969
5033
  });
@@ -4971,17 +5035,17 @@ function Os() {
4971
5035
  }
4972
5036
  //#endregion
4973
5037
  //#region node_modules/@mui/utils/useOnMount/useOnMount.mjs
4974
- var ks = [];
4975
- function As(t) {
4976
- e.useEffect(t, ks);
5038
+ var As = [];
5039
+ function js(t) {
5040
+ e.useEffect(t, As);
4977
5041
  }
4978
5042
  //#endregion
4979
5043
  //#region node_modules/@mui/utils/useTimeout/useTimeout.mjs
4980
- var js = class e {
5044
+ var Ms = class e {
4981
5045
  constructor() {
4982
- Ts(this, "currentId", null), Ts(this, "clear", () => {
5046
+ Es(this, "currentId", null), Es(this, "clear", () => {
4983
5047
  this.currentId !== null && (clearTimeout(this.currentId), this.currentId = null);
4984
- }), Ts(this, "disposeEffect", () => this.clear);
5048
+ }), Es(this, "disposeEffect", () => this.clear);
4985
5049
  }
4986
5050
  static create() {
4987
5051
  return new e();
@@ -4992,14 +5056,14 @@ var js = class e {
4992
5056
  }, e);
4993
5057
  }
4994
5058
  };
4995
- function Ms() {
4996
- let e = Ia(js.create).current;
4997
- return As(e.disposeEffect), e;
5059
+ function Ns() {
5060
+ let e = Ia(Ms.create).current;
5061
+ return js(e.disposeEffect), e;
4998
5062
  }
4999
5063
  //#endregion
5000
5064
  //#region node_modules/@mui/material/ButtonBase/Ripple.mjs
5001
- function Ns(t) {
5002
- let { className: n, classes: r, pulsate: i = !1, rippleX: a, rippleY: o, rippleSize: s, in: l, onExited: u, timeout: d } = t, [f, p] = e.useState(!1), m = Ms(), h = e.useRef(!1), g = e.useRef(u);
5065
+ function Ps(t) {
5066
+ let { className: n, classes: r, pulsate: i = !1, rippleX: a, rippleY: o, rippleSize: s, in: l, onExited: u, timeout: d } = t, [f, p] = e.useState(!1), m = Ns(), h = e.useRef(!1), g = e.useRef(u);
5003
5067
  g.current = u;
5004
5068
  let _ = u != null, v = V(n, r.ripple, r.rippleVisible, i && r.ripplePulsate), y = {
5005
5069
  width: s,
@@ -5022,7 +5086,7 @@ function Ns(t) {
5022
5086
  children: /*#__PURE__*/ c("span", { className: b })
5023
5087
  });
5024
5088
  }
5025
- process.env.NODE_ENV !== "production" && (Ns.propTypes = {
5089
+ process.env.NODE_ENV !== "production" && (Ps.propTypes = {
5026
5090
  classes: H.default.object.isRequired,
5027
5091
  className: H.default.string,
5028
5092
  in: H.default.bool,
@@ -5043,8 +5107,8 @@ var $ = tr("MuiTouchRipple", [
5043
5107
  "child",
5044
5108
  "childLeaving",
5045
5109
  "childPulsate"
5046
- ]), Ps = 550, Fs = {}, Is = [], Ls = () => {};
5047
- function Rs(e, t) {
5110
+ ]), Fs = 550, Is = {}, Ls = [], Rs = () => {};
5111
+ function zs(e, t) {
5048
5112
  let n = new Set(t), r = /* @__PURE__ */ new Map(), i = [];
5049
5113
  for (let t of e) n.has(t) ? i.length > 0 && (r.set(t, i), i = []) : i.push(t);
5050
5114
  let a = [];
@@ -5054,7 +5118,7 @@ function Rs(e, t) {
5054
5118
  }
5055
5119
  return a.push(...i), a;
5056
5120
  }
5057
- function zs({ event: e, element: t, center: n }) {
5121
+ function Bs({ event: e, element: t, center: n }) {
5058
5122
  let r = t ? t.getBoundingClientRect() : {
5059
5123
  width: 0,
5060
5124
  height: 0,
@@ -5078,7 +5142,7 @@ function zs({ event: e, element: t, center: n }) {
5078
5142
  rippleSize: o
5079
5143
  };
5080
5144
  }
5081
- var Bs = m`
5145
+ var Vs = m`
5082
5146
  0% {
5083
5147
  transform: scale(0);
5084
5148
  opacity: 0.1;
@@ -5088,7 +5152,7 @@ var Bs = m`
5088
5152
  transform: scale(1);
5089
5153
  opacity: 0.3;
5090
5154
  }
5091
- `, Vs = m`
5155
+ `, Hs = m`
5092
5156
  0% {
5093
5157
  opacity: 1;
5094
5158
  }
@@ -5096,7 +5160,7 @@ var Bs = m`
5096
5160
  100% {
5097
5161
  opacity: 0;
5098
5162
  }
5099
- `, Hs = m`
5163
+ `, Us = m`
5100
5164
  0% {
5101
5165
  transform: scale(1);
5102
5166
  }
@@ -5109,12 +5173,12 @@ var Bs = m`
5109
5173
  transform: scale(1);
5110
5174
  }
5111
5175
  `;
5112
- function Us(e) {
5176
+ function Ws(e) {
5113
5177
  if (e.motion.reducedMotion === "always") return null;
5114
5178
  let t = p`
5115
5179
  &.${$.rippleVisible} {
5116
- animation-name: ${Bs};
5117
- animation-duration: ${Ps}ms;
5180
+ animation-name: ${Vs};
5181
+ animation-duration: ${Fs}ms;
5118
5182
  animation-timing-function: ${e.transitions.easing.easeInOut};
5119
5183
  }
5120
5184
 
@@ -5123,13 +5187,13 @@ function Us(e) {
5123
5187
  }
5124
5188
 
5125
5189
  & .${$.childLeaving} {
5126
- animation-name: ${Vs};
5127
- animation-duration: ${Ps}ms;
5190
+ animation-name: ${Hs};
5191
+ animation-duration: ${Fs}ms;
5128
5192
  animation-timing-function: ${e.transitions.easing.easeInOut};
5129
5193
  }
5130
5194
 
5131
5195
  & .${$.childPulsate} {
5132
- animation-name: ${Hs};
5196
+ animation-name: ${Us};
5133
5197
  animation-duration: 2500ms;
5134
5198
  animation-timing-function: ${e.transitions.easing.easeInOut};
5135
5199
  animation-iteration-count: infinite;
@@ -5142,7 +5206,7 @@ function Us(e) {
5142
5206
  }
5143
5207
  ` : t;
5144
5208
  }
5145
- var Ws = Q("span", {
5209
+ var Gs = Q("span", {
5146
5210
  name: "MuiTouchRipple",
5147
5211
  slot: "Root"
5148
5212
  })({
@@ -5155,7 +5219,7 @@ var Ws = Q("span", {
5155
5219
  bottom: 0,
5156
5220
  left: 0,
5157
5221
  borderRadius: "inherit"
5158
- }), Gs = Q(Ns, {
5222
+ }), Ks = Q(Ps, {
5159
5223
  name: "MuiTouchRipple",
5160
5224
  slot: "Ripple"
5161
5225
  })`
@@ -5195,29 +5259,29 @@ var Ws = Q("span", {
5195
5259
  top: 0;
5196
5260
  }
5197
5261
 
5198
- ${({ theme: e }) => Us(e)}
5199
- `, Ks = /*#__PURE__*/ e.forwardRef(function(t, n) {
5262
+ ${({ theme: e }) => Ws(e)}
5263
+ `, qs = /*#__PURE__*/ e.forwardRef(function(t, n) {
5200
5264
  let r = Ea({
5201
5265
  props: t,
5202
5266
  name: "MuiTouchRipple"
5203
- }), i = fo(Sa().motion.reducedMotion, !1), { center: a = !1, classes: o = Fs, className: s, ...l } = r, [u, d] = e.useState({
5204
- items: Is,
5205
- order: Is
5267
+ }), i = fo(Sa().motion.reducedMotion, !1), { center: a = !1, classes: o = Is, className: s, ...l } = r, [u, d] = e.useState({
5268
+ items: Ls,
5269
+ order: Ls
5206
5270
  }), f = u.items, p = e.useRef(0), m = e.useRef(null), h = e.useRef(!1);
5207
- As(() => (h.current = !0, () => {
5271
+ js(() => (h.current = !0, () => {
5208
5272
  h.current = !1;
5209
5273
  })), e.useEffect(() => {
5210
5274
  m.current && (m.current(), m.current = null);
5211
5275
  }, [f]);
5212
- let g = e.useRef(!1), _ = Ms(), v = e.useRef(null), y = e.useRef(null), b = ps((e) => {
5276
+ let g = e.useRef(!1), _ = Ns(), v = e.useRef(null), y = e.useRef(null), b = ms((e) => {
5213
5277
  h.current && d((t) => {
5214
5278
  let n = t.items.filter((t) => t.key !== e);
5215
5279
  return {
5216
5280
  items: n,
5217
- order: Rs(t.order.filter((t) => t !== e), n.filter((e) => !e.exiting).map((e) => e.key))
5281
+ order: zs(t.order.filter((t) => t !== e), n.filter((e) => !e.exiting).map((e) => e.key))
5218
5282
  };
5219
5283
  });
5220
- }), x = ps((e) => {
5284
+ }), x = ms((e) => {
5221
5285
  let { pulsate: t, rippleX: n, rippleY: r, rippleSize: i, cb: a } = e, o = p.current;
5222
5286
  p.current += 1, d((e) => {
5223
5287
  let a = [...e.items, {
@@ -5230,17 +5294,17 @@ var Ws = Q("span", {
5230
5294
  }];
5231
5295
  return {
5232
5296
  items: a,
5233
- order: Rs(e.order, a.filter((e) => !e.exiting).map((e) => e.key))
5297
+ order: zs(e.order, a.filter((e) => !e.exiting).map((e) => e.key))
5234
5298
  };
5235
5299
  }), m.current = a;
5236
- }), S = ps((e = Fs, t = Fs, n = Ls) => {
5300
+ }), S = ms((e = Is, t = Is, n = Rs) => {
5237
5301
  let { pulsate: r = !1, center: i = a || t.pulsate, fakeElement: o = !1 } = t;
5238
5302
  if (e?.type === "mousedown" && g.current) {
5239
5303
  g.current = !1;
5240
5304
  return;
5241
5305
  }
5242
5306
  e?.type === "touchstart" && (g.current = !0);
5243
- let { rippleX: s, rippleY: c, rippleSize: l } = zs({
5307
+ let { rippleX: s, rippleY: c, rippleSize: l } = Bs({
5244
5308
  event: e,
5245
5309
  element: o ? null : y.current,
5246
5310
  center: i
@@ -5262,9 +5326,9 @@ var Ws = Q("span", {
5262
5326
  rippleSize: l,
5263
5327
  cb: n
5264
5328
  });
5265
- }), C = ps(() => {
5266
- S(Fs, { pulsate: !0 });
5267
- }), w = ps((e, t) => {
5329
+ }), C = ms(() => {
5330
+ S(Is, { pulsate: !0 });
5331
+ }), w = ms((e, t) => {
5268
5332
  if (_.clear(), e?.type === "touchend" && v.current) {
5269
5333
  v.current(), v.current = null, _.start(0, () => {
5270
5334
  w(e, t);
@@ -5280,7 +5344,7 @@ var Ws = Q("span", {
5280
5344
  exiting: !0
5281
5345
  }, {
5282
5346
  items: n,
5283
- order: Rs(e.order, n.filter((e) => !e.exiting).map((e) => e.key))
5347
+ order: zs(e.order, n.filter((e) => !e.exiting).map((e) => e.key))
5284
5348
  };
5285
5349
  }), m.current = t;
5286
5350
  });
@@ -5294,11 +5358,11 @@ var Ws = Q("span", {
5294
5358
  w
5295
5359
  ]);
5296
5360
  let T = new Map(f.map((e) => [e.key, e])), E = u.order.map((e) => T.get(e)).filter(Boolean);
5297
- return /*#__PURE__*/ c(Ws, {
5361
+ return /*#__PURE__*/ c(Gs, {
5298
5362
  className: V($.root, o.root, s),
5299
5363
  ref: y,
5300
5364
  ...l,
5301
- children: E.map((e) => /*#__PURE__*/ c(Gs, {
5365
+ children: E.map((e) => /*#__PURE__*/ c(Ks, {
5302
5366
  classes: {
5303
5367
  ripple: V(o.ripple, $.ripple),
5304
5368
  rippleVisible: V(o.rippleVisible, $.rippleVisible),
@@ -5307,7 +5371,7 @@ var Ws = Q("span", {
5307
5371
  childLeaving: V(o.childLeaving, $.childLeaving),
5308
5372
  childPulsate: V(o.childPulsate, $.childPulsate)
5309
5373
  },
5310
- timeout: i.shouldReduceMotion ? 0 : Ps,
5374
+ timeout: i.shouldReduceMotion ? 0 : Fs,
5311
5375
  pulsate: e.pulsate,
5312
5376
  rippleX: e.rippleX,
5313
5377
  rippleY: e.rippleY,
@@ -5317,28 +5381,28 @@ var Ws = Q("span", {
5317
5381
  }, e.key))
5318
5382
  });
5319
5383
  });
5320
- process.env.NODE_ENV !== "production" && (Ks.propTypes = {
5384
+ process.env.NODE_ENV !== "production" && (qs.propTypes = {
5321
5385
  center: H.default.bool,
5322
5386
  classes: H.default.object,
5323
5387
  className: H.default.string
5324
5388
  });
5325
5389
  //#endregion
5326
5390
  //#region node_modules/@mui/material/ButtonBase/buttonBaseClasses.mjs
5327
- function qs(e) {
5391
+ function Js(e) {
5328
5392
  return er("MuiButtonBase", e);
5329
5393
  }
5330
- var Js = tr("MuiButtonBase", [
5394
+ var Ys = tr("MuiButtonBase", [
5331
5395
  "root",
5332
5396
  "disabled",
5333
5397
  "focusVisible"
5334
- ]), Ys = (e) => {
5398
+ ]), Xs = (e) => {
5335
5399
  let { disabled: t, focusVisible: n, focusVisibleClassName: r, suppressFocusVisible: i, classes: a } = e, o = Ce({ root: [
5336
5400
  "root",
5337
5401
  t && "disabled",
5338
5402
  n && !i && "focusVisible"
5339
- ] }, qs, a);
5403
+ ] }, Js, a);
5340
5404
  return n && !i && r && (o.root += ` ${r}`), o;
5341
- }, Xs = Q("button", {
5405
+ }, Zs = Q("button", {
5342
5406
  name: "MuiButtonBase",
5343
5407
  slot: "Root"
5344
5408
  })(Ta(({ theme: e }) => ({
@@ -5362,7 +5426,7 @@ var Js = tr("MuiButtonBase", [
5362
5426
  textDecoration: "none",
5363
5427
  color: "inherit",
5364
5428
  "&::-moz-focus-inner": { borderStyle: "none" },
5365
- [`&.${Js.disabled}`]: {
5429
+ [`&.${Ys.disabled}`]: {
5366
5430
  pointerEvents: "none",
5367
5431
  cursor: "default"
5368
5432
  },
@@ -5371,33 +5435,33 @@ var Js = tr("MuiButtonBase", [
5371
5435
  props: { internalDisabledThemeFocusVisible: !1 },
5372
5436
  style: e.focusVisible && {
5373
5437
  ...Ti,
5374
- [`&.${Js.focusVisible}`]: e.focusVisible
5438
+ [`&.${Ys.focusVisible}`]: e.focusVisible
5375
5439
  }
5376
5440
  }]
5377
- }))), Zs = /*#__PURE__*/ e.forwardRef(function(t, n) {
5441
+ }))), Qs = /*#__PURE__*/ e.forwardRef(function(t, n) {
5378
5442
  let r = Ea({
5379
5443
  props: t,
5380
5444
  name: "MuiButtonBase"
5381
- }), { action: i, centerRipple: a = !1, children: o, className: s, component: u = "button", disabled: d = !1, disableRipple: f = !1, disableTouchRipple: p = !1, focusRipple: m = !1, focusVisibleClassName: h, focusableWhenDisabled: g, suppressFocusVisible: _ = !1, internalNativeButton: v, internalDisabledThemeFocusVisible: y = !1, LinkComponent: b = "a", nativeButton: x, onBlur: S, onClick: C, onContextMenu: w, onDragLeave: T, onFocus: E, onFocusVisible: D, onKeyDown: O, onKeyUp: k, onMouseDown: A, onMouseLeave: j, onMouseUp: M, onTouchEnd: N, onTouchMove: P, onTouchStart: ee, tabIndex: F = 0, TouchRippleProps: I, touchRippleRef: L, type: R, ...z } = r, te = !!(z.href || z.to), ne = !!z.formAction, re = u;
5382
- re === "button" && te && (re = b);
5383
- let ie = typeof re == "string" ? re === "button" : v ?? !1, ae = x ?? ie, B = Ds(), oe = po(B.ref, L), [se, ce] = e.useState(!1);
5445
+ }), { action: i, centerRipple: a = !1, children: o, className: s, component: u = "button", disabled: d = !1, disableRipple: f = !1, disableTouchRipple: p = !1, focusRipple: m = !1, focusVisibleClassName: h, focusableWhenDisabled: g, suppressFocusVisible: _ = !1, internalNativeButton: v, internalDisabledThemeFocusVisible: y = !1, LinkComponent: b = "a", nativeButton: x, onBlur: S, onClick: C, onContextMenu: w, onDragLeave: T, onFocus: E, onFocusVisible: D, onKeyDown: O, onKeyUp: k, onMouseDown: A, onMouseLeave: j, onMouseUp: M, onTouchEnd: N, onTouchMove: P, onTouchStart: ee, tabIndex: F = 0, TouchRippleProps: I, touchRippleRef: L, type: te, ...R } = r, ne = !!(R.href || R.to), re = !!R.formAction, z = u;
5446
+ z === "button" && ne && (z = b);
5447
+ let ie = typeof z == "string" ? z === "button" : v ?? !1, ae = x ?? ie, B = Os(), oe = po(B.ref, L), [se, ce] = e.useState(!1);
5384
5448
  (d || _) && se && ce(!1);
5385
- let le = ps((e) => {
5449
+ let le = ms((e) => {
5386
5450
  m && !e.repeat && se && e.key === " " && B.stop(e, () => {
5387
5451
  B.start(e);
5388
5452
  });
5389
- }), ue = ps((e) => {
5453
+ }), ue = ms((e) => {
5390
5454
  m && e.key === " " && se && !e.defaultPrevented && B.stop(e, () => {
5391
5455
  B.pulsate(e);
5392
5456
  });
5393
- }), { getButtonProps: de, rootRef: fe } = xs({
5457
+ }), { getButtonProps: de, rootRef: fe } = Ss({
5394
5458
  nativeButton: ae,
5395
5459
  nativeButtonProp: x,
5396
5460
  internalNativeButton: ie,
5397
- allowInferredHostMismatch: te || typeof re == "string",
5461
+ allowInferredHostMismatch: ne || typeof z == "string",
5398
5462
  disabled: d,
5399
- type: R,
5400
- hasFormAction: ne,
5463
+ type: te,
5464
+ hasFormAction: re,
5401
5465
  tabIndex: F,
5402
5466
  onBeforeKeyDown: le,
5403
5467
  onBeforeKeyUp: ue
@@ -5418,14 +5482,14 @@ var Js = tr("MuiButtonBase", [
5418
5482
  se,
5419
5483
  B
5420
5484
  ]);
5421
- let ve = Qs(B, "start", A, p), ye = Qs(B, "stop", w, p), H = Qs(B, "stop", T, p), be = Qs(B, "stop", M, p), xe = Qs(B, "stop", (e) => {
5485
+ let ve = $s(B, "start", A, p), ye = $s(B, "stop", w, p), H = $s(B, "stop", T, p), be = $s(B, "stop", M, p), xe = $s(B, "stop", (e) => {
5422
5486
  se && e.preventDefault(), j && j(e);
5423
- }, p), Se = Qs(B, "start", ee, p), Ce = Qs(B, "stop", N, p), we = Qs(B, "stop", P, p), Te = Qs(B, "stop", (e) => {
5424
- vs(e.target) || ce(!1), S && S(e);
5425
- }, !1), Ee = ps((e) => {
5426
- fe.current || (fe.current = e.currentTarget), !_ && vs(e.target) && (ce(!0), D && D(e)), E && E(e);
5487
+ }, p), Se = $s(B, "start", ee, p), Ce = $s(B, "stop", N, p), we = $s(B, "stop", P, p), Te = $s(B, "stop", (e) => {
5488
+ ys(e.target) || ce(!1), S && S(e);
5489
+ }, !1), Ee = ms((e) => {
5490
+ fe.current || (fe.current = e.currentTarget), !_ && ys(e.target) && (ce(!0), D && D(e)), E && E(e);
5427
5491
  }), De = {};
5428
- te && (De.tabIndex = d ? -1 : F, d && (De["aria-disabled"] = d), De.type = R);
5492
+ ne && (De.tabIndex = d ? -1 : F, d && (De["aria-disabled"] = d), De.type = te);
5429
5493
  let Oe = po(n, fe), ke = {
5430
5494
  ...r,
5431
5495
  centerRipple: a,
@@ -5438,9 +5502,9 @@ var Js = tr("MuiButtonBase", [
5438
5502
  tabIndex: F,
5439
5503
  focusVisible: se,
5440
5504
  internalDisabledThemeFocusVisible: y
5441
- }, Ae = Ys(ke);
5442
- return /*#__PURE__*/ l(Xs, {
5443
- as: re,
5505
+ }, Ae = Xs(ke);
5506
+ return /*#__PURE__*/ l(Zs, {
5507
+ as: z,
5444
5508
  className: V(Ae.root, s),
5445
5509
  ownerState: ke,
5446
5510
  onBlur: Te,
@@ -5457,25 +5521,25 @@ var Js = tr("MuiButtonBase", [
5457
5521
  onTouchMove: we,
5458
5522
  onTouchStart: Se,
5459
5523
  ref: Oe,
5460
- ...te ? De : ge,
5461
- ...z,
5462
- children: [o, _e ? /*#__PURE__*/ c(Ks, {
5524
+ ...ne ? De : ge,
5525
+ ...R,
5526
+ children: [o, _e ? /*#__PURE__*/ c(qs, {
5463
5527
  ref: oe,
5464
5528
  center: a,
5465
5529
  ...I
5466
5530
  }) : null]
5467
5531
  });
5468
5532
  });
5469
- function Qs(e, t, n, r = !1) {
5470
- return ps((i) => (n && n(i), r || e[t](i), !0));
5533
+ function $s(e, t, n, r = !1) {
5534
+ return ms((i) => (n && n(i), r || e[t](i), !0));
5471
5535
  }
5472
- process.env.NODE_ENV !== "production" && (Zs.propTypes = {
5473
- action: ms,
5536
+ process.env.NODE_ENV !== "production" && (Qs.propTypes = {
5537
+ action: hs,
5474
5538
  centerRipple: H.default.bool,
5475
5539
  children: H.default.node,
5476
5540
  classes: H.default.object,
5477
5541
  className: H.default.string,
5478
- component: _s,
5542
+ component: vs,
5479
5543
  disabled: H.default.bool,
5480
5544
  disableRipple: H.default.bool,
5481
5545
  disableTouchRipple: H.default.bool,
@@ -5519,20 +5583,20 @@ process.env.NODE_ENV !== "production" && (Zs.propTypes = {
5519
5583
  });
5520
5584
  //#endregion
5521
5585
  //#region node_modules/@mui/material/utils/createSimplePaletteValueFilter.mjs
5522
- function $s(e) {
5586
+ function ec(e) {
5523
5587
  return typeof e.main == "string";
5524
5588
  }
5525
- function ec(e, t = []) {
5526
- if (!$s(e)) return !1;
5589
+ function tc(e, t = []) {
5590
+ if (!ec(e)) return !1;
5527
5591
  for (let n of t) if (!e.hasOwnProperty(n) || typeof e[n] != "string") return !1;
5528
5592
  return !0;
5529
5593
  }
5530
- function tc(e = []) {
5531
- return ([, t]) => t && ec(t, e);
5594
+ function nc(e = []) {
5595
+ return ([, t]) => t && tc(t, e);
5532
5596
  }
5533
5597
  //#endregion
5534
5598
  //#region node_modules/@mui/material/CircularProgress/circularProgressClasses.mjs
5535
- function nc(e) {
5599
+ function rc(e) {
5536
5600
  return er("MuiCircularProgress", e);
5537
5601
  }
5538
5602
  tr("MuiCircularProgress", [
@@ -5548,7 +5612,7 @@ tr("MuiCircularProgress", [
5548
5612
  ]);
5549
5613
  //#endregion
5550
5614
  //#region node_modules/@mui/material/CircularProgress/CircularProgress.mjs
5551
- var rc = 44, ic = !1, ac = !1, oc = m`
5615
+ var ic = 44, ac = !1, oc = !1, sc = m`
5552
5616
  0% {
5553
5617
  transform: rotate(0deg);
5554
5618
  }
@@ -5556,7 +5620,7 @@ var rc = 44, ic = !1, ac = !1, oc = m`
5556
5620
  100% {
5557
5621
  transform: rotate(360deg);
5558
5622
  }
5559
- `, sc = m`
5623
+ `, cc = m`
5560
5624
  0% {
5561
5625
  stroke-dasharray: 1px, 200px;
5562
5626
  stroke-dashoffset: 0;
@@ -5571,23 +5635,23 @@ var rc = 44, ic = !1, ac = !1, oc = m`
5571
5635
  stroke-dasharray: 1px, 200px;
5572
5636
  stroke-dashoffset: -126px;
5573
5637
  }
5574
- `, cc = typeof oc == "string" ? null : p`
5575
- animation: ${oc} 1.4s linear infinite;
5576
- `, lc = typeof sc == "string" ? null : p`
5577
- animation: ${sc} 1.4s ease-in-out infinite;
5578
- `, uc = (e) => {
5638
+ `, lc = typeof sc == "string" ? null : p`
5639
+ animation: ${sc} 1.4s linear infinite;
5640
+ `, uc = typeof cc == "string" ? null : p`
5641
+ animation: ${cc} 1.4s ease-in-out infinite;
5642
+ `, dc = (e) => {
5579
5643
  let { classes: t, variant: n, color: r, disableShrink: i } = e;
5580
5644
  return Ce({
5581
5645
  root: [
5582
5646
  "root",
5583
5647
  n,
5584
- `color${ds(r)}`
5648
+ `color${fs(r)}`
5585
5649
  ],
5586
5650
  svg: ["svg"],
5587
5651
  track: ["track"],
5588
5652
  circle: ["circle", i && "circleDisableShrink"]
5589
- }, nc, t);
5590
- }, dc = Q("span", {
5653
+ }, rc, t);
5654
+ }, fc = Q("span", {
5591
5655
  name: "MuiCircularProgress",
5592
5656
  slot: "Root",
5593
5657
  overridesResolver: (e, t) => {
@@ -5595,7 +5659,7 @@ var rc = 44, ic = !1, ac = !1, oc = m`
5595
5659
  return [
5596
5660
  t.root,
5597
5661
  t[n.variant],
5598
- t[`color${ds(n.color)}`]
5662
+ t[`color${fs(n.color)}`]
5599
5663
  ];
5600
5664
  }
5601
5665
  })(Ta(({ theme: e }) => {
@@ -5609,22 +5673,22 @@ var rc = 44, ic = !1, ac = !1, oc = m`
5609
5673
  },
5610
5674
  {
5611
5675
  props: { variant: "indeterminate" },
5612
- style: cc || { animation: `${oc} 1.4s linear infinite` }
5676
+ style: lc || { animation: `${sc} 1.4s linear infinite` }
5613
5677
  },
5614
5678
  ...t ? [{
5615
5679
  props: { variant: "indeterminate" },
5616
5680
  style: t
5617
5681
  }] : [],
5618
- ...Object.entries(e.palette).filter(tc()).map(([t]) => ({
5682
+ ...Object.entries(e.palette).filter(nc()).map(([t]) => ({
5619
5683
  props: { color: t },
5620
5684
  style: { color: (e.vars || e).palette[t].main }
5621
5685
  }))
5622
5686
  ]
5623
5687
  };
5624
- })), fc = Q("svg", {
5688
+ })), pc = Q("svg", {
5625
5689
  name: "MuiCircularProgress",
5626
5690
  slot: "Svg"
5627
- })({ display: "block" }), pc = Q("circle", {
5691
+ })({ display: "block" }), mc = Q("circle", {
5628
5692
  name: "MuiCircularProgress",
5629
5693
  slot: "Circle",
5630
5694
  overridesResolver: (e, t) => {
@@ -5649,7 +5713,7 @@ var rc = 44, ic = !1, ac = !1, oc = m`
5649
5713
  },
5650
5714
  {
5651
5715
  props: ({ ownerState: e }) => e.variant === "indeterminate" && !e.disableShrink,
5652
- style: lc || { animation: `${sc} 1.4s ease-in-out infinite` }
5716
+ style: uc || { animation: `${cc} 1.4s ease-in-out infinite` }
5653
5717
  },
5654
5718
  ...t ? [{
5655
5719
  props: ({ ownerState: e }) => e.variant === "indeterminate" && !e.disableShrink,
@@ -5657,18 +5721,18 @@ var rc = 44, ic = !1, ac = !1, oc = m`
5657
5721
  }] : []
5658
5722
  ]
5659
5723
  };
5660
- })), mc = Q("circle", {
5724
+ })), hc = Q("circle", {
5661
5725
  name: "MuiCircularProgress",
5662
5726
  slot: "Track"
5663
5727
  })(Ta(({ theme: e }) => ({
5664
5728
  stroke: "currentColor",
5665
5729
  opacity: (e.vars || e).palette.action.activatedOpacity
5666
- }))), hc = /*#__PURE__*/ e.forwardRef(function(e, t) {
5730
+ }))), gc = /*#__PURE__*/ e.forwardRef(function(e, t) {
5667
5731
  let n = Ea({
5668
5732
  props: e,
5669
5733
  name: "MuiCircularProgress"
5670
5734
  }), { className: r, color: i = "primary", disableShrink: a = !1, enableTrackSlot: o = !1, min: s, max: u, size: d = 40, style: f, thickness: p = 3.6, value: m = n.min ?? 0, variant: h = "indeterminate", ...g } = n;
5671
- process.env.NODE_ENV !== "production" && !ic && h === "indeterminate" && (s !== void 0 || u !== void 0) && (console.warn("MUI: You have provided the `min` or `max` props with an 'indeterminate' variant. These props will have no effect."), ic = !0);
5735
+ process.env.NODE_ENV !== "production" && !ac && h === "indeterminate" && (s !== void 0 || u !== void 0) && (console.warn("MUI: You have provided the `min` or `max` props with an 'indeterminate' variant. These props will have no effect."), ac = !0);
5672
5736
  let _ = s ?? 0, v = u ?? 100, y = {
5673
5737
  ...n,
5674
5738
  color: i,
@@ -5678,14 +5742,14 @@ var rc = 44, ic = !1, ac = !1, oc = m`
5678
5742
  value: m,
5679
5743
  variant: h,
5680
5744
  enableTrackSlot: o
5681
- }, b = uc(y), x = {}, S = {}, C = {};
5745
+ }, b = dc(y), x = {}, S = {}, C = {};
5682
5746
  if (h === "determinate") {
5683
- let e = 2 * Math.PI * ((rc - p) / 2);
5684
- process.env.NODE_ENV !== "production" && !ac && (m < _ || m > v || _ >= v) && (console.error(`MUI: The min, max, and value props in CircularProgress should be numbers where min < max and min <= value <= max. Received min=${_}, max=${v}, value=${m}.`), ac = !0);
5747
+ let e = 2 * Math.PI * ((ic - p) / 2);
5748
+ process.env.NODE_ENV !== "production" && !oc && (m < _ || m > v || _ >= v) && (console.error(`MUI: The min, max, and value props in CircularProgress should be numbers where min < max and min <= value <= max. Received min=${_}, max=${v}, value=${m}.`), oc = !0);
5685
5749
  let t = v - _;
5686
5750
  x.strokeDasharray = e.toFixed(3), x.strokeDashoffset = t > 0 ? `${((v - m) / t * e).toFixed(3)}px` : `${e.toFixed(3)}px`, S.transform = "rotate(-90deg)", C["aria-valuenow"] = m, C["aria-valuemin"] = _, C["aria-valuemax"] = v;
5687
5751
  }
5688
- return /*#__PURE__*/ c(dc, {
5752
+ return /*#__PURE__*/ c(fc, {
5689
5753
  className: V(b.root, r),
5690
5754
  style: {
5691
5755
  width: d,
@@ -5698,33 +5762,33 @@ var rc = 44, ic = !1, ac = !1, oc = m`
5698
5762
  role: "progressbar",
5699
5763
  ...C,
5700
5764
  ...g,
5701
- children: /*#__PURE__*/ l(fc, {
5765
+ children: /*#__PURE__*/ l(pc, {
5702
5766
  className: b.svg,
5703
5767
  ownerState: y,
5704
- viewBox: `${rc / 2} ${rc / 2} ${rc} ${rc}`,
5705
- children: [o ? /*#__PURE__*/ c(mc, {
5768
+ viewBox: `${ic / 2} ${ic / 2} ${ic} ${ic}`,
5769
+ children: [o ? /*#__PURE__*/ c(hc, {
5706
5770
  className: b.track,
5707
5771
  ownerState: y,
5708
- cx: rc,
5709
- cy: rc,
5710
- r: (rc - p) / 2,
5772
+ cx: ic,
5773
+ cy: ic,
5774
+ r: (ic - p) / 2,
5711
5775
  fill: "none",
5712
5776
  strokeWidth: p,
5713
5777
  "aria-hidden": "true"
5714
- }) : null, /*#__PURE__*/ c(pc, {
5778
+ }) : null, /*#__PURE__*/ c(mc, {
5715
5779
  className: b.circle,
5716
5780
  style: x,
5717
5781
  ownerState: y,
5718
- cx: rc,
5719
- cy: rc,
5720
- r: (rc - p) / 2,
5782
+ cx: ic,
5783
+ cy: ic,
5784
+ r: (ic - p) / 2,
5721
5785
  fill: "none",
5722
5786
  strokeWidth: p
5723
5787
  })]
5724
5788
  })
5725
5789
  });
5726
5790
  });
5727
- process.env.NODE_ENV !== "production" && (hc.propTypes = {
5791
+ process.env.NODE_ENV !== "production" && (gc.propTypes = {
5728
5792
  classes: H.default.object,
5729
5793
  className: H.default.string,
5730
5794
  color: H.default.oneOfType([H.default.oneOf([
@@ -5757,39 +5821,39 @@ process.env.NODE_ENV !== "production" && (hc.propTypes = {
5757
5821
  });
5758
5822
  //#endregion
5759
5823
  //#region node_modules/@mui/material/Button/buttonClasses.mjs
5760
- function gc(e) {
5824
+ function _c(e) {
5761
5825
  return er("MuiButton", e);
5762
5826
  }
5763
- var _c = tr("MuiButton", /* @__PURE__ */ "root.text.outlined.contained.disableElevation.focusVisible.disabled.colorInherit.colorPrimary.colorSecondary.colorSuccess.colorError.colorInfo.colorWarning.sizeMedium.sizeSmall.sizeLarge.fullWidth.startIcon.endIcon.icon.loading.loadingWrapper.loadingIconPlaceholder.loadingIndicator.loadingPositionCenter.loadingPositionStart.loadingPositionEnd".split(".")), vc = /*#__PURE__*/ e.createContext({});
5764
- process.env.NODE_ENV !== "production" && (vc.displayName = "ButtonGroupContext");
5827
+ var vc = tr("MuiButton", /* @__PURE__ */ "root.text.outlined.contained.disableElevation.focusVisible.disabled.colorInherit.colorPrimary.colorSecondary.colorSuccess.colorError.colorInfo.colorWarning.sizeMedium.sizeSmall.sizeLarge.fullWidth.startIcon.endIcon.icon.loading.loadingWrapper.loadingIconPlaceholder.loadingIndicator.loadingPositionCenter.loadingPositionStart.loadingPositionEnd".split(".")), yc = /*#__PURE__*/ e.createContext({});
5828
+ process.env.NODE_ENV !== "production" && (yc.displayName = "ButtonGroupContext");
5765
5829
  //#endregion
5766
5830
  //#region node_modules/@mui/material/ButtonGroup/ButtonGroupButtonContext.mjs
5767
- var yc = /*#__PURE__*/ e.createContext(void 0);
5768
- process.env.NODE_ENV !== "production" && (yc.displayName = "ButtonGroupButtonContext");
5831
+ var bc = /*#__PURE__*/ e.createContext(void 0);
5832
+ process.env.NODE_ENV !== "production" && (bc.displayName = "ButtonGroupButtonContext");
5769
5833
  //#endregion
5770
5834
  //#region node_modules/@mui/material/Button/Button.mjs
5771
- var bc = (e) => {
5835
+ var xc = (e) => {
5772
5836
  let { color: t, disableElevation: n, fullWidth: r, size: i, variant: a, loading: o, loadingPosition: s, classes: c } = e, l = Ce({
5773
5837
  root: [
5774
5838
  "root",
5775
5839
  o && "loading",
5776
5840
  a,
5777
- `size${ds(i)}`,
5778
- `color${ds(t)}`,
5841
+ `size${fs(i)}`,
5842
+ `color${fs(t)}`,
5779
5843
  n && "disableElevation",
5780
5844
  r && "fullWidth",
5781
- o && `loadingPosition${ds(s)}`
5845
+ o && `loadingPosition${fs(s)}`
5782
5846
  ],
5783
5847
  startIcon: ["icon", "startIcon"],
5784
5848
  endIcon: ["icon", "endIcon"],
5785
5849
  loadingIndicator: ["loadingIndicator"],
5786
5850
  loadingWrapper: ["loadingWrapper"]
5787
- }, gc, c);
5851
+ }, _c, c);
5788
5852
  return {
5789
5853
  ...c,
5790
5854
  ...l
5791
5855
  };
5792
- }, xc = [
5856
+ }, Sc = [
5793
5857
  {
5794
5858
  props: { size: "small" },
5795
5859
  style: { "& > *:nth-of-type(1)": { fontSize: 18 } }
@@ -5802,7 +5866,7 @@ var bc = (e) => {
5802
5866
  props: { size: "large" },
5803
5867
  style: { "& > *:nth-of-type(1)": { fontSize: 22 } }
5804
5868
  }
5805
- ], Sc = Q(Zs, {
5869
+ ], Cc = Q(Qs, {
5806
5870
  shouldForwardProp: (e) => wa(e) || e === "classes",
5807
5871
  name: "MuiButton",
5808
5872
  slot: "Root",
@@ -5811,7 +5875,7 @@ var bc = (e) => {
5811
5875
  return [
5812
5876
  t.root,
5813
5877
  t[n.variant],
5814
- t[`size${ds(n.size)}`],
5878
+ t[`size${fs(n.size)}`],
5815
5879
  n.color === "inherit" && t.colorInherit,
5816
5880
  n.disableElevation && t.disableElevation,
5817
5881
  n.fullWidth && t.fullWidth,
@@ -5833,7 +5897,7 @@ var bc = (e) => {
5833
5897
  "color"
5834
5898
  ], { duration: e.transitions.duration.short }),
5835
5899
  "&:hover": { textDecoration: "none" },
5836
- [`&.${_c.disabled}`]: { color: (e.vars || e).palette.action.disabled },
5900
+ [`&.${vc.disabled}`]: { color: (e.vars || e).palette.action.disabled },
5837
5901
  variants: [
5838
5902
  {
5839
5903
  props: { variant: "contained" },
@@ -5846,11 +5910,11 @@ var bc = (e) => {
5846
5910
  "@media (hover: none)": { boxShadow: (e.vars || e).shadows[2] }
5847
5911
  },
5848
5912
  "&:active": { boxShadow: (e.vars || e).shadows[8] },
5849
- [`&.${_c.focusVisible}`]: {
5913
+ [`&.${vc.focusVisible}`]: {
5850
5914
  ...e.focusVisible,
5851
5915
  boxShadow: e.focusVisible?.boxShadow ? `${(e.vars || e).shadows[6]}, ${e.focusVisible.boxShadow}` : (e.vars || e).shadows[6]
5852
5916
  },
5853
- [`&.${_c.disabled}`]: {
5917
+ [`&.${vc.disabled}`]: {
5854
5918
  color: (e.vars || e).palette.action.disabled,
5855
5919
  boxShadow: (e.vars || e).shadows[0],
5856
5920
  backgroundColor: (e.vars || e).palette.action.disabledBackground
@@ -5865,7 +5929,7 @@ var bc = (e) => {
5865
5929
  borderColor: "var(--variant-outlinedBorder, currentColor)",
5866
5930
  backgroundColor: "var(--variant-outlinedBg)",
5867
5931
  color: "var(--variant-outlinedColor)",
5868
- [`&.${_c.disabled}`]: { border: `1px solid ${(e.vars || e).palette.action.disabledBackground}` }
5932
+ [`&.${vc.disabled}`]: { border: `1px solid ${(e.vars || e).palette.action.disabledBackground}` }
5869
5933
  }
5870
5934
  },
5871
5935
  {
@@ -5876,7 +5940,7 @@ var bc = (e) => {
5876
5940
  backgroundColor: "var(--variant-textBg)"
5877
5941
  }
5878
5942
  },
5879
- ...Object.entries(e.palette).filter(tc()).map(([t]) => ({
5943
+ ...Object.entries(e.palette).filter(nc()).map(([t]) => ({
5880
5944
  props: { color: t },
5881
5945
  style: {
5882
5946
  "--variant-textColor": (e.vars || e).palette[t].main,
@@ -5970,9 +6034,9 @@ var bc = (e) => {
5970
6034
  style: {
5971
6035
  boxShadow: "none",
5972
6036
  "&:hover": { boxShadow: "none" },
5973
- [`&.${_c.focusVisible}`]: { boxShadow: e.focusVisible?.boxShadow ?? "none" },
6037
+ [`&.${vc.focusVisible}`]: { boxShadow: e.focusVisible?.boxShadow ?? "none" },
5974
6038
  "&:active": { boxShadow: "none" },
5975
- [`&.${_c.disabled}`]: { boxShadow: "none" }
6039
+ [`&.${vc.disabled}`]: { boxShadow: "none" }
5976
6040
  }
5977
6041
  },
5978
6042
  {
@@ -5987,12 +6051,12 @@ var bc = (e) => {
5987
6051
  "box-shadow",
5988
6052
  "border-color"
5989
6053
  ], { duration: e.transitions.duration.short }),
5990
- [`&.${_c.loading}`]: { color: "transparent" }
6054
+ [`&.${vc.loading}`]: { color: "transparent" }
5991
6055
  }
5992
6056
  }
5993
6057
  ]
5994
6058
  };
5995
- })), Cc = Q("span", {
6059
+ })), wc = Q("span", {
5996
6060
  name: "MuiButton",
5997
6061
  slot: "StartIcon",
5998
6062
  overridesResolver: (e, t) => {
@@ -6032,9 +6096,9 @@ var bc = (e) => {
6032
6096
  },
6033
6097
  style: { marginRight: -8 }
6034
6098
  },
6035
- ...xc
6099
+ ...Sc
6036
6100
  ]
6037
- })), wc = Q("span", {
6101
+ })), Tc = Q("span", {
6038
6102
  name: "MuiButton",
6039
6103
  slot: "EndIcon",
6040
6104
  overridesResolver: (e, t) => {
@@ -6068,9 +6132,9 @@ var bc = (e) => {
6068
6132
  },
6069
6133
  style: { marginLeft: -8 }
6070
6134
  },
6071
- ...xc
6135
+ ...Sc
6072
6136
  ]
6073
- })), Tc = Q("span", {
6137
+ })), Ec = Q("span", {
6074
6138
  name: "MuiButton",
6075
6139
  slot: "LoadingIndicator"
6076
6140
  })(({ theme: e }) => ({
@@ -6147,18 +6211,18 @@ var bc = (e) => {
6147
6211
  }
6148
6212
  }
6149
6213
  ]
6150
- })), Ec = Q("span", {
6214
+ })), Dc = Q("span", {
6151
6215
  name: "MuiButton",
6152
6216
  slot: "LoadingIconPlaceholder"
6153
6217
  })({
6154
6218
  display: "inline-block",
6155
6219
  width: "1em",
6156
6220
  height: "1em"
6157
- }), Dc = /*#__PURE__*/ e.forwardRef(function(t, n) {
6158
- let r = e.useContext(vc), i = e.useContext(yc), a = Ea({
6221
+ }), Oc = /*#__PURE__*/ e.forwardRef(function(t, n) {
6222
+ let r = e.useContext(yc), i = e.useContext(bc), a = Ea({
6159
6223
  props: vr(r, t),
6160
6224
  name: "MuiButton"
6161
- }), { children: o, color: s = "primary", component: u = "button", className: d, disabled: f = !1, disableElevation: p = !1, disableFocusRipple: m = !1, endIcon: h, focusVisibleClassName: g, fullWidth: _ = !1, id: v, loading: y = null, loadingIndicator: b, loadingPosition: x = "center", size: S = "medium", startIcon: C, type: w, variant: T = "text", ...E } = a, D = fs(v), O = b ?? /*#__PURE__*/ c(hc, {
6225
+ }), { children: o, color: s = "primary", component: u = "button", className: d, disabled: f = !1, disableElevation: p = !1, disableFocusRipple: m = !1, endIcon: h, focusVisibleClassName: g, fullWidth: _ = !1, id: v, loading: y = null, loadingIndicator: b, loadingPosition: x = "center", size: S = "medium", startIcon: C, type: w, variant: T = "text", ...E } = a, D = ps(v), O = b ?? /*#__PURE__*/ c(gc, {
6162
6226
  "aria-labelledby": D,
6163
6227
  color: "inherit",
6164
6228
  size: 16
@@ -6176,30 +6240,30 @@ var bc = (e) => {
6176
6240
  size: S,
6177
6241
  type: w,
6178
6242
  variant: T
6179
- }, A = bc(k), j = (C || y && x === "start") && /*#__PURE__*/ c(Cc, {
6243
+ }, A = xc(k), j = (C || y && x === "start") && /*#__PURE__*/ c(wc, {
6180
6244
  className: A.startIcon,
6181
6245
  ownerState: k,
6182
- children: C || /*#__PURE__*/ c(Ec, {
6246
+ children: C || /*#__PURE__*/ c(Dc, {
6183
6247
  className: A.loadingIconPlaceholder,
6184
6248
  ownerState: k
6185
6249
  })
6186
- }), M = (h || y && x === "end") && /*#__PURE__*/ c(wc, {
6250
+ }), M = (h || y && x === "end") && /*#__PURE__*/ c(Tc, {
6187
6251
  className: A.endIcon,
6188
6252
  ownerState: k,
6189
- children: h || /*#__PURE__*/ c(Ec, {
6253
+ children: h || /*#__PURE__*/ c(Dc, {
6190
6254
  className: A.loadingIconPlaceholder,
6191
6255
  ownerState: k
6192
6256
  })
6193
6257
  }), N = i || "", P = typeof y == "boolean" ? /*#__PURE__*/ c("span", {
6194
6258
  className: A.loadingWrapper,
6195
6259
  style: { display: "contents" },
6196
- children: y && /*#__PURE__*/ c(Tc, {
6260
+ children: y && /*#__PURE__*/ c(Ec, {
6197
6261
  className: A.loadingIndicator,
6198
6262
  ownerState: k,
6199
6263
  children: O
6200
6264
  })
6201
6265
  }) : null, { root: ee, ...F } = A;
6202
- return /*#__PURE__*/ l(Sc, {
6266
+ return /*#__PURE__*/ l(Cc, {
6203
6267
  ownerState: k,
6204
6268
  className: V(r.className, A.root, d, N),
6205
6269
  component: u,
@@ -6221,7 +6285,7 @@ var bc = (e) => {
6221
6285
  ]
6222
6286
  });
6223
6287
  });
6224
- process.env.NODE_ENV !== "production" && (Dc.propTypes = {
6288
+ process.env.NODE_ENV !== "production" && (Oc.propTypes = {
6225
6289
  children: H.default.node,
6226
6290
  classes: H.default.object,
6227
6291
  className: H.default.string,
@@ -6275,54 +6339,54 @@ process.env.NODE_ENV !== "production" && (Dc.propTypes = {
6275
6339
  });
6276
6340
  //#endregion
6277
6341
  //#region node_modules/ai.akima/dist/ai-akima.es.js
6278
- function Oc(e) {
6342
+ function kc(e) {
6279
6343
  let t = e % 1;
6280
6344
  return t < 0 ? t + 1 : t;
6281
6345
  }
6282
- function kc(e, t, n) {
6346
+ function Ac(e, t, n) {
6283
6347
  return {
6284
6348
  x: e.x + (t.x - e.x) * n,
6285
6349
  y: e.y + (t.y - e.y) * n
6286
6350
  };
6287
6351
  }
6288
- function Ac(e, t, n, r, i) {
6352
+ function jc(e, t, n, r, i) {
6289
6353
  let a = i * i, o = a * i;
6290
6354
  return {
6291
6355
  x: .5 * (2 * t.x + (-e.x + n.x) * i + (2 * e.x - 5 * t.x + 4 * n.x - r.x) * a + (-e.x + 3 * t.x - 3 * n.x + r.x) * o),
6292
6356
  y: .5 * (2 * t.y + (-e.y + n.y) * i + (2 * e.y - 5 * t.y + 4 * n.y - r.y) * a + (-e.y + 3 * t.y - 3 * n.y + r.y) * o)
6293
6357
  };
6294
6358
  }
6295
- function jc(e, t) {
6359
+ function Mc(e, t) {
6296
6360
  return e[(t % e.length + e.length) % e.length];
6297
6361
  }
6298
- function Mc(e, t) {
6362
+ function Nc(e, t) {
6299
6363
  return (e % t + t) % t;
6300
6364
  }
6301
- function Nc(e, t) {
6365
+ function Pc(e, t) {
6302
6366
  let n = t * e.length, r = Math.floor(n), i = n - r;
6303
- return Ac(jc(e, r - 1), jc(e, r), jc(e, r + 1), jc(e, r + 2), i);
6367
+ return jc(Mc(e, r - 1), Mc(e, r), Mc(e, r + 1), Mc(e, r + 2), i);
6304
6368
  }
6305
- function Pc(e) {
6369
+ function Fc(e) {
6306
6370
  let t = e.length;
6307
6371
  if (t === 0) return [];
6308
- let n = Array.from({ length: t }, (n, r) => e[Mc(r + 1, t)] - e[r]);
6372
+ let n = Array.from({ length: t }, (n, r) => e[Nc(r + 1, t)] - e[r]);
6309
6373
  return Array.from({ length: t }, (e, r) => {
6310
- let i = n[Mc(r - 2, t)], a = n[Mc(r - 1, t)], o = n[Mc(r, t)], s = n[Mc(r + 1, t)], c = Math.abs(s - o), l = Math.abs(a - i), u = c + l;
6374
+ let i = n[Nc(r - 2, t)], a = n[Nc(r - 1, t)], o = n[Nc(r, t)], s = n[Nc(r + 1, t)], c = Math.abs(s - o), l = Math.abs(a - i), u = c + l;
6311
6375
  return u > 1e-12 ? (c * a + l * o) / u : (a + o) / 2;
6312
6376
  });
6313
6377
  }
6314
- function Fc(e, t, n, r, i) {
6378
+ function Ic(e, t, n, r, i) {
6315
6379
  let a = i * i, o = a * i;
6316
6380
  return (2 * o - 3 * a + 1) * e + (o - 2 * a + i) * t + (-2 * o + 3 * a) * n + (o - a) * r;
6317
6381
  }
6318
- function Ic(e, t) {
6319
- let n = e.length, r = e.map((e) => e.x), i = e.map((e) => e.y), a = Pc(r), o = Pc(i), s = t * n, c = Math.floor(s), l = s - c, u = Mc(c, n), d = Mc(c + 1, n);
6382
+ function Lc(e, t) {
6383
+ let n = e.length, r = e.map((e) => e.x), i = e.map((e) => e.y), a = Fc(r), o = Fc(i), s = t * n, c = Math.floor(s), l = s - c, u = Nc(c, n), d = Nc(c + 1, n);
6320
6384
  return {
6321
- x: Fc(r[u], a[u], r[d], a[d], l),
6322
- y: Fc(i[u], o[u], i[d], o[d], l)
6385
+ x: Ic(r[u], a[u], r[d], a[d], l),
6386
+ y: Ic(i[u], o[u], i[d], o[d], l)
6323
6387
  };
6324
6388
  }
6325
- function Lc(e) {
6389
+ function Rc(e) {
6326
6390
  if (e.length < 3) return e;
6327
6391
  let t = e.reduce((e, t) => ({
6328
6392
  x: e.x + t.x,
@@ -6341,7 +6405,7 @@ function Lc(e) {
6341
6405
  distanceSquared: (e.x - n.x) * (e.x - n.x) + (e.y - n.y) * (e.y - n.y)
6342
6406
  })).sort((e, t) => e.angle - t.angle || e.distanceSquared - t.distanceSquared || e.index - t.index).map(({ point: e }) => e);
6343
6407
  }
6344
- function Rc(e) {
6408
+ function zc(e) {
6345
6409
  if (e.length === 0) return {
6346
6410
  x: 0,
6347
6411
  y: 0
@@ -6358,8 +6422,8 @@ function Rc(e) {
6358
6422
  y: t.y / e.length
6359
6423
  };
6360
6424
  }
6361
- function zc(e, t, n) {
6362
- let r = Rc(e), i = Hc(e, 1024, n), a = Math.cos(t), o = Math.sin(t), s = i[0] ?? {
6425
+ function Bc(e, t, n) {
6426
+ let r = zc(e), i = Uc(e, 1024, n), a = Math.cos(t), o = Math.sin(t), s = i[0] ?? {
6363
6427
  x: r.x,
6364
6428
  y: r.y
6365
6429
  }, c = Infinity;
@@ -6374,62 +6438,92 @@ function zc(e, t, n) {
6374
6438
  }
6375
6439
  return s;
6376
6440
  }
6377
- function Bc(e, t = "catmull") {
6378
- let n = Lc(e), r = Rc(n);
6441
+ function Vc(e, t = "catmull") {
6442
+ let n = Rc(e), r = zc(n);
6379
6443
  return (e) => {
6380
- let i = zc(n, e, t);
6444
+ let i = Bc(n, e, t);
6381
6445
  return {
6382
6446
  x: i.x + r.x,
6383
6447
  y: i.y + r.y
6384
6448
  };
6385
6449
  };
6386
6450
  }
6387
- function Vc(e, t, n = "catmull") {
6388
- let r = Lc(e);
6451
+ function Hc(e, t, n = "catmull") {
6452
+ let r = Rc(e);
6389
6453
  if (r.length === 0) return {
6390
6454
  x: 0,
6391
6455
  y: 0
6392
6456
  };
6393
6457
  if (r.length === 1) return { ...r[0] };
6394
- let i = Oc(t);
6458
+ let i = kc(t);
6395
6459
  if (r.length === 2) {
6396
6460
  let e = i * 2;
6397
- return e <= 1 ? kc(r[0], r[1], e) : kc(r[1], r[0], e - 1);
6461
+ return e <= 1 ? Ac(r[0], r[1], e) : Ac(r[1], r[0], e - 1);
6398
6462
  }
6399
- return n === "akima" ? Ic(r, i) : Nc(r, i);
6463
+ return n === "akima" ? Lc(r, i) : Pc(r, i);
6400
6464
  }
6401
- function Hc(e, t, n = "catmull") {
6465
+ function Uc(e, t, n = "catmull") {
6402
6466
  if (t <= 0) return [];
6403
6467
  let r = [];
6404
- for (let i = 0; i < t; i += 1) r.push(Vc(e, i / t, n));
6468
+ for (let i = 0; i < t; i += 1) r.push(Hc(e, i / t, n));
6405
6469
  return r;
6406
6470
  }
6407
6471
  //#endregion
6472
+ //#region src/rotate.ts
6473
+ function Wc(e, t, n = {
6474
+ x: 0,
6475
+ y: 0
6476
+ }) {
6477
+ if (t !== 0) {
6478
+ let r = e.x - n.x, i = e.y - n.y, a = Math.cos(t), o = Math.sin(t);
6479
+ return {
6480
+ x: n.x + r * a - i * o,
6481
+ y: n.y + r * o + i * a
6482
+ };
6483
+ }
6484
+ return e;
6485
+ }
6486
+ function Gc(e, t, n = {
6487
+ x: 0,
6488
+ y: 0
6489
+ }) {
6490
+ return t === 0 ? e : e.map((e) => Wc(e, t, n));
6491
+ }
6492
+ //#endregion
6408
6493
  //#region src/ModalImageCropped.tsx
6409
- function Uc(e) {
6410
- let t = "ModalImageCropped", s = a(null), u = a(null), [d, f] = o([]), [p, m] = o([]), [g, _] = o(0), [x, T] = o(0), [E, D] = o(!1), [O, k] = o(void 0), [A, j] = o(0), [M, N] = o(0), [P, ee] = o(!1), [F, I] = o("[{ \"x\": 225.77, \"y\": 71.09 },\n{ \"x\": 225.77, \"y\": 289.70 },\n{ \"x\": 394.13, \"y\": 114.60 },\n{ \"x\": 60.40, \"y\": 176.28 },\n{ \"x\": 82.32, \"y\": 269.80 },\n{ \"x\": 335.36, \"y\": 271.79 },\n{ \"x\": 70.37, \"y\": 94.70 },\n{ \"x\": 376.20, \"y\": 89.72 },\n{ \"x\": 380.19, \"y\": 206.13 },\n{ \"x\": 320.41, \"y\": 75.80 },\n{ \"x\": 65.38, \"y\": 119.57 },\n{ \"x\": 113.20, \"y\": 78.78 }]"), L = w(), { t: R } = h(), z = e.actor.getSnapshot();
6411
- function te(e, t) {
6494
+ function Kc(e) {
6495
+ let t = "ModalImageCropped", s = a(null), u = a(null), [d, f] = o([]), [p, m] = o([]), [g, _] = o(0), [x, T] = o(0), [E, D] = o(!1), [O, k] = o(void 0), [A, j] = o(0), [M, N] = o(0), [P, ee] = o(!1), [F, I] = o("[{ \"x\": 225.77, \"y\": 71.09 },\n{ \"x\": 225.77, \"y\": 289.70 },\n{ \"x\": 394.13, \"y\": 114.60 },\n{ \"x\": 60.40, \"y\": 176.28 },\n{ \"x\": 82.32, \"y\": 269.80 },\n{ \"x\": 335.36, \"y\": 271.79 },\n{ \"x\": 70.37, \"y\": 94.70 },\n{ \"x\": 376.20, \"y\": 89.72 },\n{ \"x\": 380.19, \"y\": 206.13 },\n{ \"x\": 320.41, \"y\": 75.80 },\n{ \"x\": 65.38, \"y\": 119.57 },\n{ \"x\": 113.20, \"y\": 78.78 }]"), L = w(), { t: te } = h(), R = e.actor.getSnapshot();
6496
+ function ne(e, t) {
6412
6497
  e.save(), e.fillStyle = "black", e.font = "bold 14px sans-serif", e.textAlign = "center", e.textBaseline = "middle", e.fillText("®", t.x, t.y), e.restore();
6413
6498
  }
6414
- let ne = n((e) => {
6415
- O && te(e, O);
6499
+ let re = n((e) => {
6500
+ if (d.length < 2) return;
6501
+ let t = {
6502
+ x: e.canvas.width / 2,
6503
+ y: e.canvas.height / 2
6504
+ }, n = Gc(d, x, t);
6505
+ e.strokeStyle = "green", e.lineWidth = 2, e.beginPath(), e.moveTo(n[0].x, n[0].y);
6506
+ for (let t = 1; t < n.length; t++) e.lineTo(n[t].x, n[t].y);
6507
+ e.stroke();
6508
+ }, [d, x]), z = n((e) => {
6509
+ O && ne(e, O);
6416
6510
  }, [O]);
6417
- function re(e, t, n = "blue") {
6511
+ function ie(e, t, n = "blue") {
6418
6512
  e.fillStyle = n, e.beginPath(), e.arc(t.x, t.y, 5, 0, Math.PI * 2), e.fill();
6419
6513
  }
6420
- function ie(e, t) {
6514
+ function ae(e, t) {
6421
6515
  let n = t.map((t) => {
6422
6516
  let n = t.x - e.x, r = t.y - e.y;
6423
6517
  return Math.sqrt(n * n + r * r);
6424
6518
  }), r = Math.min(...n);
6425
6519
  return n.findIndex((e) => e === r);
6426
6520
  }
6427
- let ae = n((e, t, n = "blue") => {
6521
+ let B = n((e, t, n = "blue") => {
6428
6522
  t.forEach((t) => {
6429
- re(e, t, n);
6523
+ ie(e, t, n);
6430
6524
  });
6431
6525
  }, []);
6432
- function B(e, t, n, r = "red") {
6526
+ function oe(e, t, n, r = "red") {
6433
6527
  if (t.length < 2) return;
6434
6528
  e.strokeStyle = r, e.lineWidth = 2, e.beginPath();
6435
6529
  let i = t.length - 1;
@@ -6437,14 +6531,14 @@ function Uc(e) {
6437
6531
  for (let n = 1; n <= i; n++) e.lineTo(t[n].x, t[n].y);
6438
6532
  e.stroke();
6439
6533
  }
6440
- let oe = n((e, t, n = "magenta", r = !1) => {
6534
+ let se = n((e, t, n = "magenta", r = !1) => {
6441
6535
  if (t.length < 2) return;
6442
6536
  e.strokeStyle = n;
6443
6537
  let i = Infinity, a = -Infinity, o = Infinity, s = -Infinity;
6444
6538
  for (let e of t) e.x < i && (i = e.x), e.x > a && (a = e.x), e.y < o && (o = e.y), e.y > s && (s = e.y);
6445
6539
  r && (j(a - i), N(s - o)), e.strokeRect(i, o, a - i, s - o);
6446
6540
  }, []);
6447
- function se(t, n = 2) {
6541
+ function ce(t, n = 2) {
6448
6542
  let r = "", i = "";
6449
6543
  for (let e = 0; e < t.length; e += 1) {
6450
6544
  let a = t[e], o = `${a.x.toFixed(2)}; ${a.y.toFixed(2)}`.replaceAll(".", ","), s = Math.round(Math.hypot(a.x * n, a.y * n) * 100);
@@ -6453,17 +6547,17 @@ function Uc(e) {
6453
6547
  }
6454
6548
  return e.testMode && console.log(i), r;
6455
6549
  }
6456
- function ce(e) {
6550
+ function le(e) {
6457
6551
  let t = Math.atan2(e.y, e.x);
6458
6552
  return t < 0 && (t += 2 * Math.PI), t;
6459
6553
  }
6460
- function le(t) {
6554
+ function ue(t) {
6461
6555
  if (t.length < 2) return [];
6462
6556
  let n = [], r = 0, i = "";
6463
6557
  for (let e = 0; e < 128; e++) {
6464
6558
  let a = 2 * Math.PI * e / 128, o = 0;
6465
6559
  for (let e = 0; e < t.length; e += 1) {
6466
- let s = t[e], c = ce(s);
6560
+ let s = t[e], c = le(s);
6467
6561
  if (c >= a) {
6468
6562
  let l = (a - o) / (c - o), u = e > 0 ? t[e - 1] : t[t.length - 1], d = Math.hypot(u.x, u.y), f = d + l * (Math.hypot(s.x, s.y) - d), p = {
6469
6563
  x: u.x + l * (s.x - u.x),
@@ -6479,30 +6573,30 @@ function Uc(e) {
6479
6573
  }
6480
6574
  return e.testMode && (console.log("maximum difference between interpolated and actual radius:", r), console.log(`createEquidistantPoints: ${i}`)), n;
6481
6575
  }
6482
- function ue(e, t) {
6576
+ function de(e, t) {
6483
6577
  if (e.length === 0) return [];
6484
6578
  let n = Math.max(0, Math.min(t, e.length - 1));
6485
6579
  return e.slice(n + 1).concat(e.slice(0, n + 1));
6486
6580
  }
6487
- let de = n((t) => {
6581
+ let fe = n((t) => {
6488
6582
  let n = -1, r = -1;
6489
6583
  for (let e = 0; e < t.length; e += 1) {
6490
- let i = t[e], a = ce(i);
6584
+ let i = t[e], a = le(i);
6491
6585
  if (e > 0 && a < n) {
6492
6586
  console.log(`switched from negative to positive at index ${e} -> [${i.x}, ${i.y}]`), r = e;
6493
6587
  break;
6494
6588
  }
6495
6589
  n = a;
6496
6590
  }
6497
- return e.testMode && console.log(`splitIndex: ${r}`), ue(t, r - 1);
6498
- }, [e.testMode]), fe = n((e, t, n) => e.map((e) => ({
6591
+ return e.testMode && console.log(`splitIndex: ${r}`), de(t, r - 1);
6592
+ }, [e.testMode]), pe = n((e, t, n) => e.map((e) => ({
6499
6593
  x: e.x * t,
6500
6594
  y: e.y * (n ?? t)
6501
- })), []), pe = (e) => {
6595
+ })), []), me = (e) => {
6502
6596
  let t = e[0], n = e[1];
6503
6597
  return -Math.atan2(t.y, t.x) > -Math.atan2(n.y, n.x);
6504
- }, me = n((e, t, n, r = !1) => {
6505
- let i = Bc(n, E ? "akima" : "catmull"), a = -Infinity, o = Infinity, s = -Infinity, c = Infinity, l = Array.from({ length: 128 }, (e, t) => {
6598
+ }, he = n((e, t, n, r = !1) => {
6599
+ let i = Vc(n, E ? "akima" : "catmull"), a = -Infinity, o = Infinity, s = -Infinity, c = Infinity, l = Array.from({ length: 128 }, (e, t) => {
6506
6600
  let n = i(t * 2 * Math.PI / 128);
6507
6601
  return n.x > a && (a = n.x), n.x < o && (o = n.x), n.y > s && (s = n.y), n.y < c && (c = n.y), n;
6508
6602
  });
@@ -6513,9 +6607,9 @@ function Uc(e) {
6513
6607
  })).map((e) => ({
6514
6608
  x: e.x,
6515
6609
  y: -e.y
6516
- })), u = fe(i, r);
6517
- return pe(u) || u.reverse(), {
6518
- polygon: de(u),
6610
+ })), u = pe(i, r);
6611
+ return me(u) || u.reverse(), {
6612
+ polygon: fe(u),
6519
6613
  box: {
6520
6614
  minX: o,
6521
6615
  maxX: a,
@@ -6535,18 +6629,18 @@ function Uc(e) {
6535
6629
  };
6536
6630
  }, [
6537
6631
  E,
6538
- fe,
6539
- de
6632
+ pe,
6633
+ fe
6540
6634
  ]);
6541
- function he(t, n, r = !1) {
6542
- let i = le(me(t, n, p, r).polygon);
6635
+ function ge(t, n, r = !1) {
6636
+ let i = ue(he(t, n, p, r).polygon);
6543
6637
  if (e.testMode) {
6544
- let e = se(i);
6638
+ let e = ce(i);
6545
6639
  console.log("rt1:"), console.log(e);
6546
6640
  }
6547
6641
  return i;
6548
6642
  }
6549
- let ge = i(() => p.length < 2 ? {
6643
+ let _e = i(() => p.length < 2 ? {
6550
6644
  polygon: [],
6551
6645
  box: {
6552
6646
  minX: 0,
@@ -6554,25 +6648,25 @@ function Uc(e) {
6554
6648
  minY: 0,
6555
6649
  maxY: 0
6556
6650
  }
6557
- } : me(z.context.SL ?? 0, z.context.SH ?? 0, p), [
6651
+ } : he(R.context.SL ?? 0, R.context.SH ?? 0, p), [
6558
6652
  p,
6559
- me,
6560
- z.context.SH,
6561
- z.context.SL
6562
- ]), _e = n((e) => {
6563
- if (ge.polygon.length === 0) return ge;
6564
- e.beginPath(), e.strokeStyle = "green", e.lineWidth = 3, e.fillStyle = "rgba(255, 0, 0, 0.3)", e.moveTo(ge.polygon[0].x, ge.polygon[0].y);
6565
- for (let t of ge.polygon) e.lineTo(t.x, t.y);
6566
- return e.closePath(), e.fill(), e.stroke(), ge;
6567
- }, [ge]), V = i(() => {
6568
- if (z.value !== "Shape defined" && z.value !== "Trademark defined" || ge.polygon.length === 0) return {
6653
+ he,
6654
+ R.context.SH,
6655
+ R.context.SL
6656
+ ]), V = n((e) => {
6657
+ if (_e.polygon.length === 0) return _e;
6658
+ e.beginPath(), e.strokeStyle = "green", e.lineWidth = 3, e.fillStyle = "rgba(255, 0, 0, 0.3)", e.moveTo(_e.polygon[0].x, _e.polygon[0].y);
6659
+ for (let t of _e.polygon) e.lineTo(t.x, t.y);
6660
+ return e.closePath(), e.fill(), e.stroke(), _e;
6661
+ }, [_e]), ve = i(() => {
6662
+ if (R.value !== "Shape defined" && R.value !== "Trademark defined" || _e.polygon.length === 0) return {
6569
6663
  points: [],
6570
6664
  center: {
6571
6665
  x: 0,
6572
6666
  y: 0
6573
6667
  }
6574
6668
  };
6575
- let { polygon: e, box: t } = ge, n = {
6669
+ let { polygon: e, box: t } = _e, n = {
6576
6670
  x: (t.minX + t.maxX) / 2,
6577
6671
  y: (t.minY + t.maxY) / 2
6578
6672
  };
@@ -6583,23 +6677,33 @@ function Uc(e) {
6583
6677
  })).slice(40, 80),
6584
6678
  center: n
6585
6679
  };
6586
- }, [ge, z.value]);
6587
- function ve(e, t, n) {
6680
+ }, [_e, R.value]);
6681
+ function ye(e, t, n) {
6588
6682
  e.strokeStyle = "red", e.lineWidth = 3, n ? e.setLineDash([4, 3]) : e.setLineDash([]), e.beginPath(), e.moveTo(t[0].x, t[0].y), e.lineTo(n?.x ?? t[1].x, n?.y ?? t[1].y), e.stroke(), n && e.setLineDash([]);
6589
6683
  }
6590
- let ye = n((e, t) => {
6684
+ let H = n((e, t) => {
6591
6685
  let n = s.current, r = u.current;
6592
6686
  if (!n || !r) return [];
6593
6687
  let i = n.getContext("2d");
6594
- switch (x === 0 ? i.drawImage(r, 0, 0) : (i.clearRect(0, 0, n.width, n.height), i.save(), i.translate(n.width / 2, n.height / 2), i.rotate(x), i.drawImage(r, -r.naturalWidth / 2, -r.naturalHeight / 2), i.restore()), i.setLineDash([]), x === 0 && ae(i, e, "red"), z.value) {
6688
+ x === 0 ? i.drawImage(r, 0, 0) : (i.clearRect(0, 0, n.width, n.height), i.save(), i.translate(n.width / 2, n.height / 2), i.rotate(x), i.drawImage(r, -r.naturalWidth / 2, -r.naturalHeight / 2), i.restore()), i.setLineDash([]);
6689
+ let a = {
6690
+ x: n.width / 2,
6691
+ y: n.height / 2
6692
+ };
6693
+ switch (Gc(e, x, a), R.value) {
6694
+ case Io:
6695
+ case Lo: break;
6696
+ case Ro:
6697
+ re(i);
6698
+ break;
6595
6699
  case zo:
6596
- ae(i, p, "orange"), oe(i, p, "magenta", !0);
6700
+ B(i, p, "orange"), se(i, p, "magenta", !0);
6597
6701
  break;
6598
6702
  case Bo:
6599
6703
  {
6600
- let { points: e, center: n } = V;
6601
- if (B(i, e, n, "red"), t && e.length > 0) {
6602
- let n = e[ie(t, e)], r = [
6704
+ let { points: e, center: n } = ve;
6705
+ if (oe(i, e, n, "red"), t && e.length > 0) {
6706
+ let n = e[ae(t, e)], r = [
6603
6707
  {
6604
6708
  x: n.x + 10,
6605
6709
  y: n.y
@@ -6617,15 +6721,15 @@ function Uc(e) {
6617
6721
  y: n.y - 10
6618
6722
  }
6619
6723
  ];
6620
- oe(i, r, "black"), ne(i);
6724
+ se(i, r, "black"), z(i);
6621
6725
  }
6622
6726
  }
6623
6727
  break;
6624
6728
  case Vo:
6625
6729
  {
6626
- let { points: e, center: n } = V;
6627
- if (B(i, e, n, "red"), t && e.length > 0) {
6628
- let n = e[ie(t, e)], r = [
6730
+ let { points: e, center: n } = ve;
6731
+ if (oe(i, e, n, "red"), t && e.length > 0) {
6732
+ let n = e[ae(t, e)], r = [
6629
6733
  {
6630
6734
  x: n.x + 10,
6631
6735
  y: n.y
@@ -6643,30 +6747,34 @@ function Uc(e) {
6643
6747
  y: n.y - 10
6644
6748
  }
6645
6749
  ];
6646
- oe(i, r, "black"), ne(i);
6750
+ se(i, r, "black"), z(i);
6647
6751
  }
6648
6752
  }
6649
- ne(i);
6753
+ z(i);
6650
6754
  break;
6651
6755
  case Ho:
6652
- ne(i);
6756
+ z(i);
6653
6757
  break;
6654
- default: console.log(`unknown state: ${z.value}`);
6758
+ default: console.log(`unknown state: ${R.value}`);
6759
+ }
6760
+ let { polygon: o } = V(i);
6761
+ if (e.length === 2 && (R.value === "Image cropped" || R.value === "X-axis started") && ye(i, Gc(e, x, a)), e.length === 1 && R.value === "X-axis started" && t) {
6762
+ let n = Wc(t, x, a);
6763
+ ye(i, Gc(e, x, a), n);
6655
6764
  }
6656
- let { polygon: a } = _e(i);
6657
- return e.length === 2 && (z.value === "Image cropped" || z.value === "X-axis started") && ve(i, e), e.length === 1 && z.value === "X-axis started" && t && ve(i, e, t), a;
6765
+ return o;
6658
6766
  }, [
6659
6767
  p,
6660
- oe,
6661
- _e,
6662
- ae,
6663
- ne,
6768
+ re,
6769
+ se,
6770
+ V,
6771
+ B,
6772
+ z,
6664
6773
  x,
6665
- z.value,
6666
- O,
6667
- V
6774
+ R.value,
6775
+ ve
6668
6776
  ]);
6669
- function H(e) {
6777
+ function be(e) {
6670
6778
  let t = s.current, n = u.current;
6671
6779
  if (!t || !n) return;
6672
6780
  let r = t.getContext("2d");
@@ -6679,29 +6787,32 @@ function Uc(e) {
6679
6787
  e && (e.width = t.naturalWidth, e.height = t.naturalHeight, e.getContext("2d")?.drawImage(t, 0, 0), u.current = t);
6680
6788
  }, t.src = e.dataUrl;
6681
6789
  }, [e.dataUrl]), r(() => {
6682
- ye(d);
6683
- }, [d, ye]), r(() => {
6684
- H(x);
6790
+ H(d);
6791
+ }, [d, H]), r(() => {
6792
+ be(x);
6685
6793
  }, [x]);
6686
- function be(t) {
6794
+ function xe(t) {
6687
6795
  e.actor.send({ type: t }), _((e) => e + 1);
6688
6796
  }
6689
- function xe(t, n) {
6797
+ function Se(t, n) {
6690
6798
  let r = n.x - t.x, i = n.y - t.y, a = -Math.atan2(i, r);
6691
6799
  a > Math.PI / 2 && (a -= Math.PI), a < -Math.PI / 2 && (a += Math.PI), T(a), e.actor.send({
6692
6800
  type: Zo,
6693
6801
  rotationAngle: a
6694
6802
  }), _((e) => e + 1);
6695
6803
  }
6696
- function Se(e, t) {
6804
+ function Ce(e, t) {
6697
6805
  let n = e.getBoundingClientRect();
6698
6806
  return {
6699
6807
  x: (t.clientX - n.left) * (e.width / n.width),
6700
6808
  y: (t.clientY - n.top) * (e.height / n.height)
6701
6809
  };
6702
6810
  }
6703
- function Ce() {
6704
- e.actor.getSnapshot().value === "Image cropped" && e.actor.send({ type: Xo }), e.actor.getSnapshot().value === "X-axis started" && e.actor.send({ type: Zo }), e.actor.getSnapshot().value === "X-axis finished" && e.actor.send({ type: $o }), m((e) => [
6811
+ function we() {
6812
+ e.actor.getSnapshot().value === "Image cropped" && e.actor.send({ type: Xo }), e.actor.getSnapshot().value === "X-axis started" && e.actor.send({
6813
+ type: Zo,
6814
+ rotationAngle: 0
6815
+ }), e.actor.getSnapshot().value === "X-axis finished" && e.actor.send({ type: $o }), m((e) => [
6705
6816
  ...e,
6706
6817
  {
6707
6818
  x: 50,
@@ -6729,27 +6840,31 @@ function Uc(e) {
6729
6840
  }
6730
6841
  ]);
6731
6842
  }
6732
- function we() {
6733
- if (!Fe) throw Error("SL is undefined");
6734
- if (!Ie) throw Error("SH is undefined");
6735
- let t = he(Fe, Ie, !0);
6736
- z.value === "Points defined" ? e.actor.send({ type: ts }) : z.value === "Shape defined" || z.value === "Trademark defined" ? e.actor.send({ type: Uo }) : e.onCloseModal(x, p, t, O)();
6737
- }
6738
6843
  function Te() {
6739
- ee(!1);
6844
+ if (!Ie) throw Error("SL is undefined");
6845
+ if (!Le) throw Error("SH is undefined");
6846
+ let t = ge(Ie, Le, !0);
6847
+ if (R.value === "Points defined") e.actor.send({ type: ns });
6848
+ else if (R.value === "Shape defined") e.actor.send({ type: Uo });
6849
+ else if (R.value === "Trademark defined") e.actor.send({ type: Uo });
6850
+ else if (R.value === "Finished") e.onCloseModal(x, p, t, O)(), e.actor.send({ type: Wo });
6851
+ else throw Error(`Unexpected state: ${R.value}`);
6740
6852
  }
6741
6853
  function Ee() {
6854
+ ee(!1);
6855
+ }
6856
+ function De() {
6742
6857
  ee(!0);
6743
6858
  }
6744
- function De(e) {
6859
+ function Oe(e) {
6745
6860
  console.log(`handleChange called with value: ${e.target.value}`), I(e.target.value);
6746
6861
  }
6747
- function Oe() {
6748
- e.actor.getSnapshot().value === "Image cropped" && e.actor.send({ type: Xo }), e.actor.getSnapshot().value === "X-axis started" && e.actor.send({ type: Zo }), e.actor.getSnapshot().value === "X-axis finished" && e.actor.send({ type: $o });
6862
+ function ke() {
6863
+ e.actor.getSnapshot().value === "Image cropped" && e.actor.send({ type: Xo }), e.actor.getSnapshot().value === "X-axis finished" && e.actor.send({ type: $o });
6749
6864
  let t = JSON.parse(F);
6750
6865
  Array.isArray(t) && m((e) => [...e, ...t]);
6751
6866
  }
6752
- function ke(e, t) {
6867
+ function Ae(e, t) {
6753
6868
  if (e.length === 0) return -1;
6754
6869
  let n = 0, r = Infinity;
6755
6870
  return e.forEach((e, i) => {
@@ -6757,10 +6872,10 @@ function Uc(e) {
6757
6872
  s < r && (r = s, n = i);
6758
6873
  }), n;
6759
6874
  }
6760
- function Ae(t) {
6875
+ function je(t) {
6761
6876
  let n = e.actor.getSnapshot(), r = s.current;
6762
6877
  if (!r || !u.current) return;
6763
- let i = Se(r, t), a = t.button === 2;
6878
+ let i = Ce(r, t), a = t.button === 2;
6764
6879
  switch (n.value) {
6765
6880
  case No:
6766
6881
  console.log("handleMouseDown: state is IDLE");
@@ -6768,63 +6883,99 @@ function Uc(e) {
6768
6883
  case Io:
6769
6884
  case Lo:
6770
6885
  if (a) {
6771
- console.log("right mouse button clicked"), f((e) => e.slice(0, -1)), T(0), be(Qo);
6886
+ console.log("right mouse button clicked"), f((e) => e.slice(0, -1)), T(0), xe(Qo);
6772
6887
  return;
6773
6888
  }
6774
6889
  {
6775
- let e = Se(r, t);
6776
- f((t) => (t.length % 2 == 0 ? be(Xo) : t.length % 2 == 1 && xe(t[0], e), t.length < 2 ? [...t, e] : [e]));
6890
+ let e = Ce(r, t);
6891
+ f((t) => (t.length % 2 == 0 ? xe(Xo) : t.length % 2 == 1 && Se(t[0], e), t.length < 2 ? [...t, e] : [e]));
6777
6892
  }
6778
6893
  break;
6779
- case zo:
6780
6894
  case Ro:
6895
+ if (a) f((e) => e.slice(0, -1)), T(0), xe(Qo);
6896
+ else {
6897
+ let e = Ce(r, t);
6898
+ m((t) => [...t, e]), xe($o);
6899
+ }
6900
+ break;
6901
+ case zo:
6781
6902
  {
6782
- let e = Se(r, t);
6903
+ let e = Ce(r, t);
6783
6904
  a ? m((t) => {
6784
- let n = ke(t, e);
6785
- if (n !== -1) {
6786
- let e = [...t];
6787
- return e.splice(n, 1), e;
6788
- }
6789
- return t;
6790
- }) : (m((t) => [...t, e]), be($o));
6905
+ let n = [...t], r = Ae(t, e);
6906
+ return r !== -1 && n.splice(r, 1), n.length === 0 && xe(es), n;
6907
+ }) : (m((t) => [...t, e]), xe($o));
6791
6908
  }
6792
6909
  break;
6793
6910
  case Bo:
6794
- if (a) k(void 0), e.actor.send({ type: ns });
6911
+ if (a) k(void 0), e.actor.send({ type: rs });
6795
6912
  else {
6796
- let { points: t } = V, n = t[ie(i, t)];
6797
- k(n), e.actor.send({ type: es });
6913
+ let { points: t } = ve, n = t[ae(i, t)];
6914
+ k(n), e.actor.send({
6915
+ type: ts,
6916
+ trademark: n
6917
+ });
6798
6918
  }
6799
6919
  break;
6800
6920
  case Vo:
6801
- if (console.log("handleMouseDown: state is TRADEMARK_DEFINED"), a) k(void 0), e.actor.send({ type: rs });
6921
+ if (console.log("handleMouseDown: state is TRADEMARK_DEFINED"), a) k(void 0), e.actor.send({ type: is });
6802
6922
  else {
6803
- let { points: t } = V, n = t[ie(i, t)];
6804
- k(n), e.actor.send({ type: es });
6923
+ let { points: t } = ve, n = t[ae(i, t)];
6924
+ k(n), e.actor.send({
6925
+ type: ts,
6926
+ trademark: n
6927
+ });
6805
6928
  }
6806
6929
  break;
6807
6930
  case Ho:
6808
- console.log("handleMouseDown: state is FINISHED"), a && e.actor.send({ type: is });
6931
+ console.log("handleMouseDown: state is FINISHED"), a && e.actor.send({ type: as });
6809
6932
  break;
6810
6933
  default: console.log(`handleMouseDown: unhandled state ${n.value}`);
6811
6934
  }
6812
6935
  }
6813
- function je(e) {
6936
+ function Me(e) {
6814
6937
  let t = s.current;
6815
6938
  if (!t || !u.current) return;
6816
- let n = Se(t, e);
6817
- ye(d, n);
6939
+ let n = Ce(t, e);
6940
+ H(d, n);
6818
6941
  }
6819
- function Me() {
6820
- ye(d);
6942
+ function Ne() {
6943
+ H(d);
6821
6944
  }
6822
- function Ne(e) {
6945
+ function Pe(e) {
6823
6946
  e.preventDefault();
6824
6947
  }
6825
- let Pe = (e) => {
6948
+ let Fe = (e) => {
6826
6949
  D(e.target.checked);
6827
- }, Fe = e.actor.getSnapshot().context.SL, Ie = e.actor.getSnapshot().context.SH, Le = e.actor.getSnapshot().context.AZG, Re = z.value === "Points defined" && p.length > 3 ? R("main.identify.button.finish", { defaultValue: "Finish" }) : z.value === "Trademark defined" ? R("main.identify.button.finish1", { defaultValue: "Finish 1" }) : z.value === "idle" ? R("main.identify.button.finishActionReally", { defaultValue: "Finish now" }) : z.value === "Shape defined" ? R("main.identify.button.finishAction", { defaultValue: "Finish action" }) : R("main.identify.button.finishXXX", { defaultValue: "Undo" });
6950
+ }, Ie = e.actor.getSnapshot().context.SL, Le = e.actor.getSnapshot().context.SH, Re = e.actor.getSnapshot().context.AZG, ze, Be = !1;
6951
+ switch (R.value) {
6952
+ case Io:
6953
+ ze = "imageCropped", Be = !0;
6954
+ break;
6955
+ case Lo:
6956
+ Be = !0;
6957
+ break;
6958
+ case Ro:
6959
+ Be = !0;
6960
+ break;
6961
+ case zo:
6962
+ ze = "confirmShape", p.length <= 3 && (Be = !0);
6963
+ break;
6964
+ case Vo:
6965
+ ze = "confirmTrademark";
6966
+ break;
6967
+ case Bo:
6968
+ ze = "withoutTrademark";
6969
+ break;
6970
+ case No:
6971
+ ze = "finishActionReally";
6972
+ break;
6973
+ case Ho:
6974
+ ze = "finished";
6975
+ break;
6976
+ default: ze = "unknownState";
6977
+ }
6978
+ let Ve = te(`main.identify.button.${ze}`, { defaultValue: `main.identify.button.${ze}` });
6828
6979
  return /* @__PURE__ */ c(Mo, {
6829
6980
  "data-testid": `${t}.Modal`,
6830
6981
  sx: {
@@ -6845,7 +6996,7 @@ function Uc(e) {
6845
6996
  backgroundColor: L.palette.primary.main
6846
6997
  },
6847
6998
  children: [
6848
- /* @__PURE__ */ c(ss, {
6999
+ /* @__PURE__ */ c(cs, {
6849
7000
  actor: e.actor,
6850
7001
  testMode: e.testMode
6851
7002
  }, g),
@@ -6858,10 +7009,10 @@ function Uc(e) {
6858
7009
  maxHeight: "70vh",
6859
7010
  cursor: "crosshair"
6860
7011
  },
6861
- onMouseDown: Ae,
6862
- onMouseMove: je,
6863
- onMouseLeave: Me,
6864
- onContextMenu: Ne
7012
+ onMouseDown: je,
7013
+ onMouseMove: Me,
7014
+ onMouseLeave: Ne,
7015
+ onContextMenu: Pe
6865
7016
  }),
6866
7017
  /* @__PURE__ */ l("div", {
6867
7018
  className: "modal-content",
@@ -6881,13 +7032,13 @@ function Uc(e) {
6881
7032
  },
6882
7033
  children: [
6883
7034
  "SL: ",
6884
- Fe,
6885
- ", SH: ",
6886
7035
  Ie,
7036
+ ", SH: ",
7037
+ Le,
6887
7038
  " -> [",
6888
- Fe && Ie && Ie !== 0 ? (Fe / Ie).toFixed(3) : 0,
7039
+ Ie && Le && Le !== 0 ? (Ie / Le).toFixed(3) : 0,
6889
7040
  "], AZG: ",
6890
- Le
7041
+ Re
6891
7042
  ]
6892
7043
  }),
6893
7044
  /* @__PURE__ */ l(C, {
@@ -6912,7 +7063,7 @@ function Uc(e) {
6912
7063
  control: /* @__PURE__ */ c(b, {
6913
7064
  "data-testid": `${t}.Switch`,
6914
7065
  checked: E,
6915
- onChange: Pe
7066
+ onChange: Fe
6916
7067
  }),
6917
7068
  label: /* @__PURE__ */ c(C, {
6918
7069
  sx: {
@@ -6923,43 +7074,44 @@ function Uc(e) {
6923
7074
  })
6924
7075
  })
6925
7076
  ] }),
6926
- (z.value === "Image cropped" || z.value === "X-axis started" || z.value === "X-axis finished") && /* @__PURE__ */ l("div", { children: [
6927
- /* @__PURE__ */ c(Dc, {
7077
+ (R.value === "Image cropped" || R.value === "X-axis started" || R.value === "X-axis finished") && /* @__PURE__ */ l("div", { children: [
7078
+ /* @__PURE__ */ c(Oc, {
6928
7079
  color: "secondary",
6929
7080
  variant: "outlined",
6930
7081
  size: "small",
6931
- onClick: Ce,
7082
+ onClick: we,
6932
7083
  children: "Test"
6933
7084
  }),
6934
- /* @__PURE__ */ c(Dc, {
7085
+ /* @__PURE__ */ c(Oc, {
6935
7086
  color: "secondary",
6936
7087
  variant: "outlined",
6937
7088
  size: "small",
6938
- onClick: Ee,
7089
+ onClick: De,
6939
7090
  children: "Insert points"
6940
7091
  }),
6941
7092
  /* @__PURE__ */ c(Mo, {
6942
7093
  open: P,
6943
- onClose: Te,
6944
- children: /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c(Dc, {
7094
+ onClose: Ee,
7095
+ children: /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c(Oc, {
6945
7096
  color: "secondary",
6946
7097
  variant: "outlined",
6947
7098
  size: "small",
6948
- onClick: Oe,
7099
+ onClick: ke,
6949
7100
  children: "OK"
6950
7101
  }), /* @__PURE__ */ c(S, {
6951
7102
  value: "[{ \"x\": 225.77, \"y\": 71.09 },\n{ \"x\": 225.77, \"y\": 289.70 },\n{ \"x\": 394.13, \"y\": 114.60 },\n{ \"x\": 60.40, \"y\": 176.28 },\n{ \"x\": 82.32, \"y\": 269.80 },\n{ \"x\": 335.36, \"y\": 271.79 },\n{ \"x\": 70.37, \"y\": 94.70 },\n{ \"x\": 376.20, \"y\": 89.72 },\n{ \"x\": 380.19, \"y\": 206.13 },\n{ \"x\": 320.41, \"y\": 75.80 },\n{ \"x\": 65.38, \"y\": 119.57 },\n{ \"x\": 113.20, \"y\": 78.78 }]",
6952
- onChange: De
7103
+ onChange: Oe
6953
7104
  })] })
6954
7105
  })
6955
7106
  ] }),
6956
- /* @__PURE__ */ c(Dc, {
7107
+ /* @__PURE__ */ c(Oc, {
6957
7108
  "data-testId": `${t}.button.finish`,
6958
7109
  color: "secondary",
6959
7110
  variant: "contained",
6960
7111
  size: "small",
6961
- onClick: we,
6962
- children: Re
7112
+ disabled: Be,
7113
+ onClick: Te,
7114
+ children: Ve
6963
7115
  })
6964
7116
  ]
6965
7117
  })
@@ -6968,6 +7120,6 @@ function Uc(e) {
6968
7120
  });
6969
7121
  }
6970
7122
  //#endregion
6971
- export { qo as ACTION_CROP, Wo as ACTION_RESET, Jo as ACTION_SKIP_CROP, Yo as ACTION_UNDO_CROP, Uc as ModalImageCropped, us as ModalImageLoaded, os as identifyMachine };
7123
+ export { qo as ACTION_CROP, Wo as ACTION_RESET, Jo as ACTION_SKIP_CROP, Yo as ACTION_UNDO_CROP, Kc as ModalImageCropped, ds as ModalImageLoaded, ss as identifyMachine };
6972
7124
 
6973
7125
  //# sourceMappingURL=frame.identify.js.map